An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/r-help/attachments/20051109/32b3dccd/attachment.pl
read.table error with R 2.2.0
5 messages · Duncan Murdoch, Florence Combes, Peter Dalgaard +1 more
On 11/9/2005 10:07 AM, Florence Combes wrote:
Dear all, I just upgraded version of R to R 2.2.0, and I have a problem with a script that did not happen with my previous version. Here is the error : -----------------------------------------
param<-read.table(file="param.dat",sep ="\t",header=TRUE,fill=TRUE,
na.strings="NA") Erreur dans read.table.default(file = "param.dat", sep = "\t", header = TRUE, : 5 arguments passed to 'readTableHead' which requires 6 ----------------------------------------- whereas all was OK before. I cannot understand what's happening. Has someone already encountered this ?? Any help greatly appreciated,
There is no "read.table.default" in standard R 2.2.0, so it appears that
you have installed a replacement for read.table, and it no longer works.
If you type
getAnywhere("read.table")$where
and
getAnywhere("read.table.default")$where
you are likely to see where those functions came from. (I see
> getAnywhere("read.table")$where
[1] "package:base" "namespace:base"
> getAnywhere("read.table.default")$where
character(0)
indicating that read.table comes from the base package, and
read.table.default doesn't exist.
Duncan Murdoch
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/r-help/attachments/20051109/22957fb5/attachment.pl
Florence Combes <fcombes at gmail.com> writes:
Dear all, I just upgraded version of R to R 2.2.0, and I have a problem with a script that did not happen with my previous version. Here is the error : -----------------------------------------
param<-read.table(file="param.dat",sep ="\t",header=TRUE,fill=TRUE,
na.strings="NA") Erreur dans read.table.default(file = "param.dat", sep = "\t", header = TRUE, : 5 arguments passed to 'readTableHead' which requires 6 ----------------------------------------- whereas all was OK before. I cannot understand what's happening.
read.table is not generic in 2.2.0 and it calls
.Internal(readTableHead(file, nlines, comment.char,
blank.lines.skip, quote, sep))
So where did read.table.default() come into play? Is it picking up a
version that you yourself have modified perhaps? Or are you using some
package which redefines read.table and needs to be updated for 2.2.0?
-p
Has someone already encountered this ?? Any help greatly appreciated, Thanks a lot, Florence. [[alternative HTML version deleted]]
______________________________________________ R-help at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
O__ ---- Peter Dalgaard ??ster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
Florence Combes wrote:
Thanks a lot for your answer. In fact I found the solution, it's seems strange to me so I put it here if it could bu useful for other people ... I have the same as you
getAnywhere("read.table")$where
[1] "package:base" "namespace:base"
getAnywhere("read.table.default")$where
character(0) when I run it in a "native" R console, and the line : param<-read.table(file="param.dat",sep ="\t",header=TRUE,fill=TRUE, na.strings="NA") works very well. (I didn't test this before). BUT when I load the aroma package (which I need for what I want to do), then I have :
getAnywhere("read.table")$where
[1] "package:aroma" [2] "package:base" [3] "registered S3 method for read from namespace base" [4] "namespace:base"
getAnywhere("read.table.default")$where
[1] "package:aroma" "registered S3 method for read" and the "read.table" didn't work. So I reinstall the aroma package (even if I had the latest version) and it works well now). best regards, Florence.
Hi, author of aroma here. This was fixed a few months ago. From showHistory(aroma): Version: 0.84 [2005-07-01] ... o BUG FIX: GenePixData$read() would give "Error in read.table.default(... ...): 5 arguments passed to 'readTableHead' which requires 6". What I have done/did is that I created a read.table.QuantArrayData() function, rename base::read.table() to read.table.default() and made read.table() generic. This should make things rather backward compatible. When I looked at my source code history, the reason for this was: # 2002-08-18 # o Since the 'Measurements' section in QuantArray files seems to contain # rows with tailing TAB's (that just should be ignored) read.table() fails # to read them. read.table() is making use of scan() and scan() has the # argument 'flush' which flushes such trailing cells, but it is not used # by read.table(). For this reason I created the static read.table() # method of QuantArrrayData which has the 'flush' argument. I other words, I just added the argument 'flush=FALSE' to read.table[.QuantArrayData]() and passes 'flush=flush' to its internal calls to scan(). I'll send R-devel a note and see if it is possible to add this argument to the default read.table(). However, everything should work correctly as it is now. Cheers Henrik
On 11/9/05, Duncan Murdoch <murdoch at stats.uwo.ca> wrote:
On 11/9/2005 10:07 AM, Florence Combes wrote:
Dear all,
I just upgraded version of R to R 2.2.0, and I have a problem with a
script
that did not happen with my previous version.
Here is the error :
-----------------------------------------
param<-read.table(file="param.dat",sep ="\t",header=TRUE,fill=TRUE,
na.strings="NA")
Erreur dans read.table.default(file = "param.dat", sep = "\t", header =
TRUE, :
5 arguments passed to 'readTableHead' which requires 6
-----------------------------------------
whereas all was OK before. I cannot understand what's happening.
Has someone already encountered this ??
Any help greatly appreciated,
There is no "read.table.default" in standard R 2.2.0, so it appears that
you have installed a replacement for read.table, and it no longer works.
If you type
getAnywhere("read.table")$where
and
getAnywhere("read.table.default")$where
you are likely to see where those functions came from. (I see
getAnywhere("read.table")$where
[1] "package:base" "namespace:base"
getAnywhere("read.table.default")$where
character(0) indicating that read.table comes from the base package, and read.table.default doesn't exist. Duncan Murdoch
[[alternative HTML version deleted]]
______________________________________________ R-help at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html