Reputation: 1400
Given these two objects:
v <- "new.name"
w <- 1:10
How can I tell R
to rename w as new.name, so I can have this
> new.name
[1] 1 2 3 4 5 6 7 8 9 10
Thanks
Upvotes: 2
Views: 64
Reputation: 92310
You could do
assign(v, w)
new.name
# [1] 1 2 3 4 5 6 7 8 9 10
But it is considered a very bad practice in R, so read this first
Upvotes: 6