powered by
Converts the results of by() to a data.frame if possible, (reducing dimensionality and adding repetition as necessary)
# S3 method for by as.data.frame (x, row.names = NULL, optional = FALSE, colnames = paste("IDX", seq(length(dim(x))), sep = ""), na.rm = TRUE, ...)
The by object
Names of the rows. If NULL, function tries guessing them
Ignored.
Names of columns
Remove NAs or not.
Pass-alongs.
A data.frame.
# NOT RUN { test.by <- by( ChickWeight$weight, ChickWeight$Diet, mean) test.by class(test.by) str(test.by) test.df <-as.data.frame(test.by) str(test.df) # }
Run the code above in your browser using DataLab