[Rd] Set Repositories problem in R2.4.0

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Aug 22 08:20:42 CEST 2006


The point is that there is no `read.table' line in setRepositories, just 
read.delim.  And the NEWS for R-devel (there is no 2.4.0 yet) says

    o	The functions read.csv, read.csv2, read.delim, read.delim2 now
	default the comment.char argument to "".  (These functions are
	designed to read files produced by other software, which might
	use the # character inside fields, but are unlikely to use it for
	comments.)

It needs the person who made that change to fix the consquences: thank you 
for altering us.

On Tue, 22 Aug 2006, Keith Satterley wrote:

> 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
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
> 

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-devel mailing list