> Hi, > I recently downloaded R on window and running Rgui on NT. I have never use > R before and trying to learn R by following An introduction to R. > I generated a table of 900x5 in excel and saved as tab delimited txt file. > I then do read.table but I keeping getting the following message > > data <- read.table("ML4mm25.txt", header=T, sep=" ") > Error in count.fields(file, sep, quote, skip) : > can't open file ML4mm25.txt > and when I try to count.fields, again there is error message. I was able > to use the same command to read the file into S-plus with no problem, can > you tell me what is wrong? also, what is the value for quote? > Thanks. > Chuang Fong Kong, Ph D > Head, Microarrays > Peter MacCallum Cancer Institute - Research > St. Andrew's Place, East Melbourne > Victoria 3002, Australia > Tel: 61 3 9656-1796 or 1138 > Fax: 61 3 9656-1411 > e-mail: c.kong at pmci.unimelb.edu.au > >-------------- next part -------------- An HTML attachment was scrubbed... URL: https://stat.ethz.ch/pipermail/r-help/attachments/20000225/9984299f/attachment.html
On Fri, 25 Feb 2000, Kong, Chuang Fong wrote:> > I recently downloaded R on window and running Rgui on NT. I have never use > > R before and trying to learn R by following An introduction to R. > > I generated a table of 900x5 in excel and saved as tab delimited txt file. > > I then do read.table but I keeping getting the following message > > > data <- read.table("ML4mm25.txt", header=T, sep=" ")If it is tab-delimited, you want sep = "\t" there, in both R and S-PLUS.> > Error in count.fields(file, sep, quote, skip) : > > can't open file ML4mm25.txt > > and when I try to count.fields, again there is error message. I was able > > to use the same command to read the file into S-plus with no problem, can > > you tell me what is wrong? also, what is the value for quote?See the help page for read.table. The idea is to that "A label with spaces" will get read as one field, not four. I hope that helps. If you need further help, we would need to see the file, as there are too many possibilities to guess from. (One is that Excel tends to leave off trailing fields if they are missing.) -- 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 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Fri, 25 Feb 2000, Kong, Chuang Fong wrote:> > > > Hi, > > I recently downloaded R on window and running Rgui on NT. I have never use > > R before and trying to learn R by following An introduction to R. > > I generated a table of 900x5 in excel and saved as tab delimited txt file. > > I then do read.table but I keeping getting the following message > > > data <- read.table("ML4mm25.txt", header=T, sep=" ") > > Error in count.fields(file, sep, quote, skip) : > > can't open file ML4mm25.txt > > and when I try to count.fields, again there is error message. I was able > > to use the same command to read the file into S-plus with no problem, can > > you tell me what is wrong? also, what is the value for quote? > > Thanks. > > Chuang Fong Kong, Ph D > > Head, Microarrays > > Peter MacCallum Cancer Institute - Research > > St. Andrew's Place, East Melbourne > > Victoria 3002, Australia > > Tel: 61 3 9656-1796 or 1138 > > Fax: 61 3 9656-1411 > > e-mail: c.kong at pmci.unimelb.edu.auWell, I think you can take for granted that R doesn't find your file ... Is your file in the default directory? Try changing directory to the place where your file is. You can do that somewhere in the menus. You should normally not use count.fields. G?ran ---------------------------------------------------------- G?ran Brostr?m tel: +46 90 786-5223 Department of Statistics fax: +46 90 786-6614 Ume? University SE-90187 Ume?, Sweden email: gb at stat.umu.se http://www.stat.umu.se/egna/gb ftp://capa.stat.umu.se ---------------------------------------------------------- -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._