Description Usage Arguments Details Value Examples
View source: R/renameDataframeColumn.R
This function renames a single column in R.
1 | renameDataframeColumn(dataframe, oldColumnName, newColumnName)
|
dataframe |
the dataframe to edit |
oldColumnName |
the old column name (Can also be the number of the column) |
newColumnName |
the new name to change the old name to |
The first parameter is the dataframe name to change
The second column name is either the old column name or the index of the column.
The third is the name to change the dataframe to
same dataframe except with columns renamed
1 2 3 | df <- data.frame(Column1 = 1, Column2 = 2)
df <- renameDataframeColumn(df, 'Column1', 'ColumnX')
df <- renameDateframeColumn(df, 2, 'ColumnY')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.