Re: [R] eval and as.name

2009-02-05 Thread Dieter Menne
Wacek Kusnierczyk idi.ntnu.no> writes: > equal? you mean equivalent? mostly, yes. briefly, this is why: > > 1. a copy-over from other programming languages; > 2. to avoid learning yet another operator; > 3. after having learned the other operator, to avoid that ugly operator; > 4. after an r

Re: [R] eval and as.name

2009-02-05 Thread Gabor Grothendieck
expression. >>> >>> >>> On Feb 5, 2009, at 5:50 PM, wrote: >>> >>>> Hi: there's mget but I couldn't figure out how to use it. if you >>>> figure >>>> it out, let me know. >>>> I'm sure one of the guRus w

Re: [R] eval and as.name

2009-02-05 Thread Fuchs Ira
em which is that n is an arbitrary length vector and I'd like to find a way that avoids having to enumerate the elements of the character vector. Thanks, Ira - Original Message - From: markle...@verizon.net To: Fuchs Ira Sent: Thu Feb 05 17:25:39 2009 Subject: RE: [R] eval and

Re: [R] eval and as.name

2009-02-05 Thread Fuchs Ira
ks, > > Ira > > ----- Original Message - > > From: markle...@verizon.net > > To: Fuchs Ira > > Sent: Thu Feb 05 17:25:39 2009 > > Subject: RE: [R] eval and as.name > > > > > > Hi: below works but it's not much shorter than yours. there must

Re: [R] eval and as.name

2009-02-05 Thread Wacek Kusnierczyk
Marie Sivertsen wrote: > Hi, > > Why do you use the equals sign for assignment instead of the arrow, is this > equal? > > equal? you mean equivalent? mostly, yes. briefly, this is why: 1. a copy-over from other programming languages; 2. to avoid learning yet another operator; 3. after havin

Re: [R] eval and as.name

2009-02-05 Thread Marie Sivertsen
Hi, Why do you use the equals sign for assignment instead of the arrow, is this equal? Mvh. Marie On Thu, Feb 5, 2009 at 11:59 PM, Wacek Kusnierczyk < waclaw.marcin.kusnierc...@idi.ntnu.no> wrote: > > you may want to avoid this sort of indirection by using lists with named > components: > > d =

Re: [R] eval and as.name

2009-02-05 Thread Wacek Kusnierczyk
Wacek Kusnierczyk wrote: > Fuchs Ira wrote: > >> I'm sure there is a more general way to ask this question but how do >> you use the elements of a character vector as names of objects in an >> expression? >> For example, say you have: >> >> a = c(1,3,5,7) >> b = c(2,4,6,8) >> >> n=c("a","b") >>

Re: [R] eval and as.name

2009-02-05 Thread Wacek Kusnierczyk
u need to lookup ('dereference') the names in some way. vQ > > Murray M Cooper, Ph.D. > Richland Statistics > 9800 N 24th St > Richland, MI, USA 49083 > Mail: richs...@earthlink.net > - Original Message - From: "Fuchs Ira" > To: > Sent: Thur

Re: [R] eval and as.name

2009-02-05 Thread Wacek Kusnierczyk
Fuchs Ira wrote: > I'm sure there is a more general way to ask this question but how do > you use the elements of a character vector as names of objects in an > expression? > For example, say you have: > > a = c(1,3,5,7) > b = c(2,4,6,8) > > n=c("a","b") > > and you want to use the names a and b in

Re: [R] eval and as.name

2009-02-05 Thread Murray Cooper
: Thursday, February 05, 2009 5:10 PM Subject: [R] eval and as.name I'm sure there is a more general way to ask this question but how do you use the elements of a character vector as names of objects in an expression? For example, say you have: a = c(1,3,5,7) b = c(2,4,6,8) n=c("a&

[R] eval and as.name

2009-02-05 Thread Fuchs Ira
I'm sure there is a more general way to ask this question but how do you use the elements of a character vector as names of objects in an expression? For example, say you have: a = c(1,3,5,7) b = c(2,4,6,8) n=c("a","b") and you want to use the names a and b in a function (e.g. sum) sum(eva