appendtofolderh: Adds a data frame to a 'folderh'.

View source: R/appendtofolderh.R

appendtofolderhR Documentation

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

appendtofolderh(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, Gilles Hunault, Sabine Demotes-Mainard

See Also

folderh.


dad documentation built on Aug. 30, 2023, 5:06 p.m.