Description Usage Arguments Author(s)
Insert a column into a data frame in a specified position
1 2 | insert_col(df, new_col, col_name = "new_col", numeric_index = TRUE,
insert_index, insert_name, insert_left = TRUE)
|
df |
a data frame |
new_col |
a vector of same length of df to be added to df |
col_name |
name of the new column |
numeric_index |
should the new column be inserted by index (TRUE) or name (FALSE) |
insert_index |
position for new column to be inserted |
insert_name |
if numeric_index is FALSE, the column name the new column will be inserted adjacent to |
insert_left |
if numeric_index is FALSE, will the column be inserted to left of insert_name (TRUE), or to the right (FALSE) |
Philip Goddard
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.