Skip to content
Prev 315641 / 398502 Next

columns called X rename Y

If you have a lot of names to change, or you need to do it regularly, you can use something like:

renames <- read.table(text=
"oldname newname
constant c
numbers b
", header=TRUE, as.is=TRUE )
names(seba)[match(renames$oldname, names(seba))] <- renames$newnames

---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
--------------------------------------------------------------------------- 
Sent from my phone. Please excuse my brevity.
Rui Barradas <ruipbarradas at sapo.pt> wrote: