Learn R Programming

berryFunctions (version 1.11.0)

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)

Arguments

df
Dataframe object
n
Number of rows to add
values
Values to be used in the new rows. DEFAULT: NA

Value

A data.frame

See Also

insertRows, 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