Folder to data frame

Share:

Description

Builds a data frame from an object of class folder.

Usage

1
folder2df(fold)

Arguments

fold

object of class folder that is a list of data frames. These data frames have the same column names.

Details

The data frame is simply obtained by row binding the data frames of the folder and adding a factor (as last column), named groups. The levels of this factor are the names of the elements of the folder.

Value

folder2df returns a data frame.

Author(s)

Rachid Boumaza, Pierre Santagostini, Smail Yousfi, Sabine Demotes-Mainard

Maintainer: Rachid Boumaza <rachid.boumaza@agrocampus-ouest.fr>

See Also

folder: object of class folder. df2folder: build an object of class folder from a data frame.

Examples

1
2
3
4
5
6
7
data(iris)

iris.fold <- df2folder(iris, "Species")
print(iris.fold)

iris.df <- folder2df(iris.fold)
print(iris.df)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.