[Rd] Set Repositories problem in R2.4.0

Keith Satterley keith at wehi.EDU.AU
Tue Aug 22 07:33:22 CEST 2006


In R2.4.0 when I select Set Repositories from the menu I get
 > setRepositories()
Error in read.table(file = file, header = header, sep = sep, quote = quote,  :
         more columns than column names
The reposotories file is as installed.

 > sessionInfo()
R version 2.4.0 Under development (unstable) (2006-08-14 r38872)
i386-pc-mingw32

locale:
LC_COLLATE=English_Australia.1252;LC_CTYPE=English_Australia.1252;LC_MONETARY=English_Australia.1252;LC_NUMERIC=C;LC_TIME=English_Australia.1252

attached base packages:
[1] "methods"   "stats"     "graphics"  "grDevices" "utils"     "datasets" 
"base"
 >


In R2.3.1 it works fine.


On checking the code for setRepositories in 2.3.1 and 2.4.0, it is identical. 
With Identical repositories files I still get the error in 2.4.0.
If I insert comment.char="#" in the read.table line 2.4.0 code works. See copy 
of screen output below:

 >  p <- file.path(R.home("etc"), "repositories")
 > p
[1] "C:\\R\\R-2.4.0/etc/repositories"
 >  a <- read.delim(p, header = TRUE, colClasses = c(rep("character",3), 
rep("logical", 4)))
Error in read.table(file = file, header = header, sep = sep, quote = quote,  :
         more columns than column names
 >  a <- read.delim(p, header = TRUE, colClasses = c(rep("character",3), 
rep("logical", 4)),comment.char="#")
 > a
               menu_name                                URL default source 
win.binary mac.binary
CRAN               CRAN                             @CRAN@    TRUE   TRUE 
TRUE       TRUE
CRANextra CRAN (extras) http://www.stats.ox.ac.uk/pub/RWin    TRUE  FALSE 
TRUE      FALSE
BioC       Bioconductor        http://www.bioconductor.org   FALSE   TRUE 
TRUE      FALSE
Omegahat       Omegahat          http://www.omegahat.org/R   FALSE   TRUE 
TRUE      FALSE
 >

Did I hear that there was a bug in read.table in R2.4.0?
Is this comment.char parameter the correct solution?

cheers,

Keith

========================
Keith Satterley
Bioinformatics Division
The Walter and Eliza Hall Institute of Medical Research
Parkville, Melbourne,
Victoria, Australia
ph: +61 3 9345 2628
mob:+61 4 2570 0419
email:keith at wehi.edu.au



More information about the R-devel mailing list