Learn R Programming

berryFunctions (version 1.22.5)

addRows: Add n rows to a data.frame

Description

simple Helper-Function to add n rows to a data.frame.

Usage

addRows(df, n, values = NA)

Value

A data.frame

Arguments

df

Dataframe object

n

Number of rows to add

values

Values to be used in the new rows. DEFAULT: NA

Author

Berry Boessenkool, berry-b@gmx.de, Jan 2014

See Also

insertRows, sortDF, data.frame, matrix, rbind

Examples

Run this code

MYDF <- data.frame(A=5:3, B=2:4)
addRows(MYDF, 3)

Run the code above in your browser using DataLab