columns look like this
col1|col2|col3|col4|
When i want to create a new column
TEST <- df %>%
group_by(col1,paste0(col3,col4))
I get
col1|col2|col3|col4|paste0(col4,col4)
is there a way i can rename it and get it be
col1|col2|col3|col4|AnyNameIWant
TEST <- df %>% group_by(col1,AnyNameIWant = paste0(col3,col4))
might be what you're looking for.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.