View source: R/as.folder.data.frame.R
as.folder.data.frame | R Documentation |
Builds an object of class folder
from a data frame.
## S3 method for class 'data.frame'
as.folder(x, groups = tail(colnames(x), 1), ...)
x |
data frame. |
groups |
string. The name of the column of x containing the grouping variable. If omitted, the last column of |
... |
further arguments passed to or from other methods. |
as.folder.data.frame
returns an object of class folder
that is a list of data frames with the same column names.
Each element of the folder contains the data corresponding to one level of x[, groups]
.
Rachid Boumaza, Pierre Santagostini, Smail Yousfi, Gilles Hunault, Sabine Demotes-Mainard
folder
: objects of class folder
.
as.data.frame.folder
: build a data frame from an object of class folder
.
as.folder.folderh
: build an object of class folder
from an object of class folderh
.
# First example: iris (Fisher)
data(iris)
iris.fold <- as.folder(iris, "Species")
print(iris.fold)
# Second example: roses
data(roses)
roses.fold <- as.folder(roses, "rose")
print(roses.fold)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.