Hi,
Is there any quick and easy way to rename a number of objects, without
having to rename each one individually and then remove the old one? And
if so, is there anything I can do to adjust the associated comments
accordingly?
Thanks for any help,
Robin Williams
Met Office summer intern -
names, colnames, rownames - list of names
I think it depends on what you are renaming?
Stephen
On Thu, Aug 28, 2008 at 4:03 AM, Williams, Robin
[EMAIL PROTECTED] wrote:
Hi,
Is there any quick and easy way to rename a number of objects, without
having to rename each one individually and then
On Thu, 2008-08-28 at 07:39 -0400, stephen sefick wrote:
names, colnames, rownames - list of names
I think it depends on what you are renaming?
Those alter the dimnames of objects that have them, not the names of the
objects themselves.
I think a short answer to the question is no. There is a
Thank you all for your enlightening replies.
Hadley mentioned first that a mere assignment in R does not double storage.
Hence once solution is:
y - x
rm(x)
Gabor gave a deeper solution which permits assigning a second name:
makeActive Binding(y,function() x, .GlobalEnv)
The reason for my
You might be able to just read in that single column rather than
read the file in chunks by using colClasses arg of read.table
with NULL for all columns except the one you want.
The sqldf package is another way -- see example 6 on the home
page. You specify what you want using SQL:
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
On 03/03/2008, at 22.20, [EMAIL PROTECTED] wrote:
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
On 4/03/2008, at 10:38 AM, Ericka Lundström wrote:
On 03/03/2008, at 22.20, [EMAIL PROTECTED] wrote:
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,
On Mon, Mar 3, 2008 at 4:37 PM, Rolf Turner [EMAIL PROTECTED] wrote:
On 4/03/2008, at 10:38 AM, Ericka Lundström wrote:
On 03/03/2008, at 22.20, [EMAIL PROTECTED] wrote:
Is there a way to rename R objects?
I am looking for a way to rename objects
without making new objects.
This does not really answer your question but the following
lets you refer to an object by a second name although the object
still has its original name as well.
a - 3
makeActiveBinding(b, function() a, .GlobalEnv)
NULL
b
[1] 3
a - 4
b
[1] 4
On Mon, Mar 3, 2008 at 4:20 PM, [EMAIL
] renaming objects
On Mon, Mar 3, 2008 at 4:37 PM, Rolf Turner [EMAIL PROTECTED] wrote:
On 4/03/2008, at 10:38 AM, Ericka Lundström wrote:
On 03/03/2008, at 22.20, [EMAIL PROTECTED] wrote:
Is there a way to rename R objects?
I am looking for a way to rename objects
without making new
or, in other terms:
set.seed(1)
x - runif(1e7)
x.add - tracemem(x)
y - x
y.add - tracemem(y)
identical(x.add, y.add)
[1] TRUE
ie, both objects have the same memory address - therefore, not a copy:
x.add
[1] 0x200
y.add
[1] 0x200
now, observe what happens when you modify y
On 4/03/2008, at 11:48 AM, hadley wickham wrote:
On Mon, Mar 3, 2008 at 4:37 PM, Rolf Turner
[EMAIL PROTECTED] wrote:
On 4/03/2008, at 10:38 AM, Ericka Lundström wrote:
On 03/03/2008, at 22.20, [EMAIL PROTECTED] wrote:
Is there a way to rename R objects?
I am looking for a way to
13 matches
Mail list logo