appendtofolderh function

Adds a data frame to a folderh.

Adds a data frame to a folderh.

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.

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 1toN1 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.

Returns

Returns an object of class folderh, that is a list of n+1n+1 data frames where nn 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.

  • Maintainer: Pierre Santagostini
  • License: GPL (>= 2)
  • Last published: 2024-11-22