[R] Define column names to a series of data.frames

Linlin Yan yanlinlin82 at gmail.com
Thu Mar 11 15:07:21 CET 2010


Amazing! I haven't seen usage of calling `names<-` like this before.
Thanks so much!

On Thu, Mar 11, 2010 at 9:50 PM, Henrique Dallazuanna <wwwhsd at gmail.com> wrote:
> Yes, just in the list.
> If they want change the name in Environment GlobalEnv:
>
>  for(i in ls(pattern = "DF[0-9]"))
>       assign(i, `names<-`(get(i), c("SDev","PC1", "PC2", "PC3",
> "PC4", "PC5", "PC6")), globalenv())
>
> --
> Henrique Dallazuanna
> Curitiba-Paraná-Brasil
> 25° 25' 40" S 49° 16' 22" O
>



More information about the R-help mailing list