[R] Error while trying to save summary() output as csv

Kamil Sijko Kamil.Sijko at swps.edu.pl
Mon Mar 22 19:54:11 CET 2010


Hi,

I need to save output of summary() procedure to a csv file. It's all
OK when it's applied to a 'factor' class variable, but when I try to
save a 'integer' class summary to csv it gives me :

> summary(rnorm(100, 10)) -> object
> write.csv2(object, file='name.csv')
Error in do.call("expand.grid", c(dimnames(x), stringsAsFactors =
stringsAsFactors)) :
  second argument must be a list

It's the same when I use write.csv instead of write.csv2

summary() produces a very simple table:

structure(c(7.803, 9.633, 10.15, 10.17, 10.75, 12.41), .Names = c("Min.",
"1st Qu.", "Median", "Mean", "3rd Qu.", "Max."), class = "table")

I have no idea, what to do... So Group, please help me: what does this
error mean, and how to cope with it?

Thanks for your help.
Kamil



More information about the R-help mailing list