View source: R/ss_rename_columns.R
ss_rename_columns | R Documentation |
Rename a set of columns. One of the following must be true:
column_names is not NULL
column_locs is not NULL, or
new_names is the same length as the number of columns of the ss_id sheet
ss_rename_columns(ss_id, new_names, column_names = NULL, column_locs = NULL)
ss_id |
The sheetId, permalink, or name of the Smartsheet sheet to read |
new_names |
A character vector of new names for the chosen columns |
column_names |
A vector of names of columns within the sheet to be replaced |
column_locs |
A vector of locations of columns within the sheet to be replaced |
A list of ss_resp objects
## Not run:
df = data.frame("PK"=character(), "temp"=character())
ss_id = ss_sheetid(ss_write_sheet(paste0("smartsheetr-example-",random_sheet_name()), data=df))
ss_rename_columns(ss_id, new_names="FK", column_names="temp")
ss_read_sheet(ss_id)
# clean up
ss_delete_sheet(ss_id)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.