library(plyr)
rename(d, c("beta"="two", "gamma"="three"))
#> alpha two three
#> 1 1 4 7
#> 2 2 5 8
#> 3 3 6 9
my_data %>%
rename(
sepal_length = Sepal.Length,
sepal_width = Sepal.Width
)
colnames(trSamp)[2] <- "newname2"
rename(table_name, new_column = old_column)
#For multiple column change:
rename(table_name, new_column = old_column, new_col2 = old_col2)
# df = dataframe
# old.var.name = The name you don't like anymore
# new.var.name = The name you want to get
names(df)[names(df) == 'old.var.name'] <- 'new.var.name'
colnames(df)[which(names(df) == "columnName")] <- "newColumnName"
Code Example |
---|
R :: how to read file in r |
R :: rename columns based on a variable in r |
R :: r - change column name |
R :: sort dataframe dplyr |
R :: r concatenate data frame |
R :: count word in a string r |
R :: r - extracting specific columns from a data frame |
R :: r library tidyverse |
R :: export csv file in r |
R :: calculating RMSE, Rsquared with caret in R |
R :: r type of object |
R :: lubridate sequence of dates |
R :: how to create a loop for different categories in a column in r |
R :: boucle sur r |
R :: R find n largest |
R :: rename a variable in r |
R :: bar plot r |
R :: elseif r |
R :: r2 metrics r |
R :: save large nested list to text R |
R :: how to filter in R whitout lossing NA values |
R :: SSL certificate problem in R |
R :: r - check if a column has non numrical values |
Rust :: hello world rust |
Rust :: rust count occurrences of a substring |
Rust :: bevy input |
Rust :: rust new vec |
Rust :: create a new rust project folder with cargo |
Rust :: rust•armanriazi•trait |
Rust :: set interval Rust |