Skip to content
Back to formatted view

Raw Message

Message-ID: <OF8FD40D8F.EA61D81C-ON85257401.0074A7BA-85257401.007536B9@doh.state.nj.us>
Date: 2008-03-03T21:20:18Z
From: Giles.Crane at doh.state.nj.us
Subject: renaming objects

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