as.data.frame.folder {dad} | R Documentation |
Folder to data frame
Description
Builds a data frame from an object of class folder
.
Usage
## S3 method for class 'folder'
as.data.frame(x, row.names = NULL, optional = FALSE, ..., group.name = "group")
Arguments
x |
object of class |
row.names , optional |
for consistency with |
... |
further arguments passed to or from other methods. |
group.name |
the name of the grouping variable. It is the name of the last column of the returned data frame. |
Details
The data frame is simply obtained by row binding the data frames of the folder and adding a factor (as last column). The name of this column is given by group.name
argument. The levels of this factor are the names of the elements of the folder.
Value
as.data.frame.folder
returns a data frame.
Author(s)
Rachid Boumaza, Pierre Santagostini, Smail Yousfi, Gilles Hunault, Sabine Demotes-Mainard
See Also
folder
: object of class folder
.
as.folder.data.frame
: build an object of class folder
from a data frame.
Examples
data(iris)
iris.fold <- as.folder(iris, "Species")
print(iris.fold)
iris.df <- as.data.frame(iris.fold)
print(iris.df)