Learn R Programming

rsyncrosim (version 1.2.9)

addRow: Add row(s) to a dataframe.

Description

Adds row(s) to a dataframe.

Usage

addRow(targetDataframe, value)

# S4 method for data.frame addRow(targetDataframe, value)

Arguments

targetDataframe

Dataframe.

value

Dataframe, character string vector, or list. Columns in value should be a subset of columns in targetDataframe.

Value

A dataframe with new rows.

Details

Preserves the types and factor levels of the targetDataframe. Fills missing values if possible using factor levels. If value is a named vector or list, it will be converted to a single row dataframe. If value is an unnamed vector or list, the number of elements should equal the number of columns in the targetDataframe; elements are assumed to be in same order as dataframe columns.