[R] renaming objects

From: <Giles.Crane_at_doh.state.nj.us>
Date: Mon, 03 Mar 2008 16:20:18 -0500

Is there a way to rename R objects?
I am looking for a way to rename objects without making new objects.

#For example:
x = c(1:40)
# I wish to use a function to rename x, already created, to y, perhaps by
obj.rename(x,y)
# or

obj.rename("x","y")

There are numerous examples of renaming
variables (columns) in dataframes, but I have found no methods for renaming objects.
The functionassign() does not do this.

Thank you for any help you can give.
Cordially

Giles Crane, M.Phil., MPH
Research Scientist & Statistician
New Jersey Department of Health & Senior Services Tel 609 292-8012, -5666
Fax 609 292-9288
giles.crane_at_doh.state.nj.us



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Mon 03 Mar 2008 - 21:32:08 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 04 Mar 2008 - 00:30:18 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive