Hi, 

For years I've been writing text to the beginning of files with cat(append=F) , 
then following that text with data written by write.table(append=T).  It is now 
giving me an error message.  I'm using R-3.1.2.  What gives?

df <- data.frame(x = 1, y = 1:10, z = 10:1)
cat(file="junk.txt", sep="", "# An introductory note.\n")
write.table(df, file="junk.txt", sep=",", append=T, quote=F, row.names=F, 
col.names=F)

Error in file(file, ifelse(append, "a", "w")) : invalid 'open' argument

Thanks,
Scott Waichler
Pacific Northwest National Laboratory
Richland, WA  USA

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to