add_row: add_row Add one row of data to a data frame

Description Usage Arguments Details Examples

View source: R/add_row.R

Description

Easily add one row to a data frame when columns are not all of one class, when you have the format colname1 = value1, colname2 = value2, etc. Similar to SQL INSERT INTO. Maintains same class as original data frame. Any missing values will be changed to NA.

Usage

1
add_row(mydf, ...)

Arguments

mydf

A data frame to which you'd like to add a row

...

Additional arguments in the format colname=value

Details

WARNING: THIS IS STILL A WORK IN PROGRESS!!!

Examples

1
2
# Idea from Hadley Wickham
 add_row(mtcars, cyl = 4, disp = 7)

smach/rmiscutils documentation built on Dec. 15, 2021, 1:49 a.m.