Hi:

I created a data frame

df <- data.frame( person = c('John','Bob','Mary'), team =
c('a','b','c'), stringsAsFactors = F);

and obtained the expected  output

 df
  person   team
1   John      a
2    Bob      b
3   Mary      c

now I want to save the whole content of df preserving its row and
column order to a file in disk with the following command:

write(df, file = "testfile",  append=FALSE, sep=" ");

and I get the error message

Error in cat(list(...), file, sep, fill, labels, append) :   argument
1 (type 'list') cannot be handled by 'cat'

Can you help to solve the problem? Thanks in advance.

deb

______________________________________________
R-help@r-project.org mailing list
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