Hi,
I want to generate object names out of variables in a sort of variable
substitution.
first i generate some vectors and an empty list:
vector.a-c(a,b)
vector.b-c(c,d)
vector.c-c(e,f)
vectors-c(vector.a, vector.b, vector.c)
vectors
[1] vector.a vector.b vector.c
vectorlist-list()
What
Try this:
sapply(vectors, get, simplify = FALSE)
or
lapply(vectors, get)
although the last one does not give you the names.
On 7/14/06, Georg Otto [EMAIL PROTECTED] wrote:
Hi,
I want to generate object names out of variables in a sort of variable
substitution.
first i generate some
On Fri, 2006-07-14 at 16:57 +0200, Georg Otto wrote:
Hi,
I want to generate object names out of variables in a sort of variable
substitution.
first i generate some vectors and an empty list:
vector.a-c(a,b)
vector.b-c(c,d)
vector.c-c(e,f)
vectors-c(vector.a, vector.b, vector.c)
I collected some advice about this question a couple of years ago.
This might help.
http://pj.freefaculty.org/R/Rtips.html#2.1 Add variables to a data
frame (or list)
and the next one after that.
On 7/14/06, Marc Schwartz (via MN) [EMAIL PROTECTED] wrote:
On Fri, 2006-07-14 at 16:57 +0200,