Nice simple elegant solution .... care to have a crack at this one ...!!
Thanks for help and answer!
Jim
In a parallel routine using foreach and doMPI have to put calculated values into a list of lists such as
list(one=one,
two=two,
three=three)
It uses the same (large) list of variable names as in the previous question. Is there a simpler way to accomplish this with a lapply statement?
I've tried several permutations but no luck!
===============================
Dr. Jim Maas
University of East Anglia
From: Eik Vettorazzi [E.Vettorazzi at uke.uni-hamburg.de]
Sent: 14 March 2011 18:07
To: Maas James Dr (MED)
Cc: r-help at r-project.org
Subject: Re: [R] creating character vector
Hi Jim
create <-function(...) paste(substitute(list(...)))[-1]
create(a,b,c)
should work.
hth.
Am 14.03.2011 10:29, schrieb Maas James Dr (MED):
Is there a way to convince R to create a character vector without using the quotes?
This works
ex1 <- c("first","second")
but when I try this it doesn't
ext <- as.character(c(first,second))
it complains. I have many variables to put into character vectors so dispensing with the quotes would be useful.
Thanks
Jim
===============================
Dr. Jim Maas
University of East Anglia
[[alternative HTML version deleted]]