View source: R/watanabe-df-manipulation.R
addCol | R Documentation |
Adds a column to a dataframe. New column will be the last column in the data frame. Note, this should not be used to add columns from another data frame.
addCol(df, colData, colName = NULL, overwrite = FALSE)
df |
A data frame |
colData |
Vector. Must have same number of elements as the rows in df containing the data for the new column. |
colName |
Character vector. Name for the new column. If NULL, make.names() will be used to give the column a name. |
overwrite |
Boolean. Overwrite any existing data in the column named. Ignored if |
The data frame with a new column added.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.