"sloan jones" <[EMAIL PROTECTED]> writes:

> I have been trying to open data that I have saved in an excel spread sheet.  
> I saved it as a csv.  Then I tried using the read.csv command. However, 
> everytime I do this--
> 
> diseasedat<-read.csv("M:/sloan/R/disease/disease.csv", sep=,  header = TRUE, 
> fill= TRUE)--
> 
> I get an error message:  
> 
> Error in file(file, "r") : unable to open connection
> In addition: Warning message:
> cannot open file 'M:/sloan/R/disease/disease.csv'
> 
> What am I doing wrong or what should I look for to correct this?

First (must be said) check that you got the filename right...

If the name is right: Did you close Excel before trying to read the
file? Sometimes Windows applications hang onto their files and prevent
others from opening them. Can you open it in other applications?

The read.csv call looks a little odd -- you shouldn't need extra
arguments, just read.csv or read.csv2 depending on locale. However,
that shouldn't cause that sort of error message.

-- 
   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
~~~~~~~~~~ - ([EMAIL PROTECTED])                  FAX: (+45) 35327907

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to