[R] Error with write.table

Peter Dalgaard p.dalgaard at biostat.ku.dk
Thu Mar 9 19:26:00 CET 2006

"mark salsburg" <mark.salsburg at gmail.com> writes:

> I'm having this error when I try to output out a gene expression data frame
> Error in file(file, ifelse(append, "a", "w")) :
>         unable to open connection
> In addition: Warning message:
> cannot open file 'SAMPLES.txt'
> when issuing the command:
> write.table(SAMPLES, file = "SAMPLES.txt")
> write.table(SAMPLES)
> will work fine, but when I specify a location it gives me the above error

The first guess would be that you do not have write permission to the
working directory. If so, either obtain permissions or place the file
in a directory where you can write: Use setwd() or give the full path
to the file.

   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

More information about the R-help mailing list