Description Usage Arguments Details Examples
View source: R/add_row_from_list.R
Easily add one row to a data frame when columns are not all of one class. Data should be in a list format, one row only, in same order as columns in the original data frame. Any missing values must be explicitly included as NAs. Similar to SQL INSERT INTO. Maintains same class as original data frame.
1 | add_row_from_list(mydf, mylist)
|
mydf |
A data frame to which you'd like to add a row |
mylist |
A list holding a single row of data, in the exact order of columns in the original data frame. |
WARNING: THIS IS STILL A WORK IN PROGRESS!!!
1 2 | # Idea from Jennifer Bryan
add_row_from_list(iris, list(5.1, 3.5, 1.4, 0.2, "setosa"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.