On Mon, 9 Jul 2007, Thomas Lumley wrote:
On Mon, 9 Jul 2007, Jim Lemon wrote:
Hi folks,
I thought I recalled a request for turning a character string into an
object name as in:
Yes. It's a FAQ.
There is an FAQ about turning character strings into objects (Q7.21), but
this seems a bit
Hi folks,
I thought I recalled a request for turning a character string into an
object name as in:
x$as.name(y)-1:4
OR
x-data.frame(as.name(y)=1:4)
However, as.name and a few other uninformed attempts didn't even come
close. A search of character to name produced no helpful functions.
This
Is one of these alternatives what you want?
# 1
x - list()
x[[y]] - 1:4
x - as.data.frame(x)
x
# 2
x - data.frame(1:4)
names(x) - y
x
# 3
x - as.data.frame(sapply(y, function(x, y) y, 1:4, simplify = FALSE))
x
On 7/9/07, Jim Lemon [EMAIL PROTECTED] wrote:
Hi folks,
I thought I recalled a
On Mon, 9 Jul 2007, Jim Lemon wrote:
Hi folks,
I thought I recalled a request for turning a character string into an
object name as in:
Yes. It's a FAQ.
-thomas
x$as.name(y)-1:4
OR
x-data.frame(as.name(y)=1:4)
However, as.name and a few other uninformed attempts didn't even
Jim Lemon wrote:
Hi folks,
I thought I recalled a request for turning a character string into an
object name as in:
x$as.name(y)-1:4
...
Thanks to those who replied to this eminently dumb question.
OT:
I put this down to the Euthermic Model of Cognitive Efficiency. This
model,