Displaying 1 result from an estimated 1 matches for "tiy5".
Did you mean:
tiy
2012 Nov 02
4
Loop over several Variables, add on question
...g the dataset using Jan?s approach from my previous posting
(http://r.789695.n4.nabble.com/Loop-over-several-variables-td4648112.html) I
want to rename the Variables in the new dataset so that all y will be called
tiy. Doing it separately the following line works fine:
ti<-rename (ti,c(y5="tiy5"))
So I thought I simply extend to the following and the loop will be fine:
ti<-rename (ti,c([paste0("y", 1:5)] = [paste0("tiy", 1:5)]))
However, this will give me the following error message:
Error: unexpected '[' in "ti<-rename (ti,c(["
Removi...