add_columns | R Documentation |
Add new columns to a data frame by specifying their names and a value to initialize them with.
add_columns(df, cols, value = NA)
df |
The data frame to extend. |
cols |
The vector containing new column names. |
value |
The values stored in the newly added columns. NA by default. |
A data frame containing with the same columns as the df
argument
as well as the new columns specified in the cols
argument.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.