add_columns {metasnf} | R Documentation |
Add columns to a dataframe
Description
Add new columns to a dataframe by providing a character vector of column
names (param newcols
) and a value to occupy each row of the new columns
(param fill
, NA by default).
Usage
add_columns(df, newcols, fill = NA)
Arguments
df |
The dataframe to extend |
newcols |
The vector containing new column names |
fill |
The values of the elements of the newly added columns. NA by default. |
Value
extended_df The dataframe containing the added columns
[Package metasnf version 1.1.2 Index]