I\'m working with an imported data set that corresponds to the extract below:
set.seed(1) dta <- data.frame(\"This is Column One\" = runif(n = 10),
Set column names with the pipe like so:
iris %>% `colnames<-`(c("newcol1", "newcol2", "newcol3", "newcol4", "newcol5"))
Which returns
newcol1 newcol2 newcol3 newcol4 newcol5 1 5.1 3.5 1.4 0.2 setosa 2 4.9 3.0 1.4 0.2 setosa 3 4.7 3.2 1.3 0.2 setosa