View source: R/df_add_constant_columns.R
df_add_constant_columns | R Documentation |
Add columns with constant values
df_add_constant_columns(x, ccols)
x |
[ |
ccols |
[ |
Modified data frame.
Other data frame helpers:
df_add_category()
,
df_explode()
,
df_rows_to_list()
,
df_split_col()
x = data.frame(a = 1:2, b = 3:4)
y = df_add_constant_columns(x, list(c = "a", d = 0.1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.