# Create an example data.frame
oldDataframe <- as.data.frame(mtcars)
# Add a single row to the example data.frame
newDataframe <- addRow(oldDataframe, list(mpg = 100, wt = 10))
# Create an example data.frame with more than one row of data
multipleRows <- data.frame(mpg = c(40, 50, 75), wt = c(4, 7, 6))
# Add the old example data.frame to the new example data.frame
newDataframe <- addRow(oldDataframe, multipleRows)
Run the code above in your browser using DataLab