Adds a data frame to a folderh.

Description

Creates an object of class folderh by appending a data frame to an object of class folderh. The appended data frame will be the first or last element of the returned folderh.

Usage

1
append.df2folderh(fh, df, key, after = FALSE)

Arguments

fh

object of class folderh.

df

data frame to be appended to fh.

key

character string. The key defining the relation 1 to N between df and the first (if after = FALSE, the default value) or last (if after = TRUE) data frame of fh.

after

logical. If FALSE (default), the data frame df is related to the first data frame of fh, and is appended as the first element of the returned folderh. If TRUE, df is related to the last data frame of fh and becomes the last element of the returned folderh.

Value

Returns an object of class folderh, that is a list of n+1 data frames where n is the number of data frames of fh. The value of the attribute attr(, "keys") is c(key, attr(fh, "keys")) if after = FALSE), c(attr(fh, "keys"), key) otherwise.

Author(s)

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

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

See Also

folderh.

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