[R] working on a vector with named elements - unname

2012-02-15 Thread Alexander
Hi, I am working under R2.11.1 Windows. I work with a set of parameters which is save under a vector. I think it is easier to understand, which parameter is called in the vector by naming all vector elements. For example, we have a vector which the parameters a,b,c,d. Is it normal to allow, that

Re: [R] working on a vector with named elements - unname

2012-02-15 Thread Petr PIKAL
Hi Hi, I am working under R2.11.1 Windows. Rather old one, consider upgrading I work with a set of parameters which is save under a vector. I think it is easier to understand, which parameter is called in the vector by naming all vector elements. For example, we have a vector which the

Re: [R] working on a vector with named elements - unname

2012-02-15 Thread Alexander
Thanks for your help. I already considered using list. But as I want to put some constraints on the entries and the form of the vector, I thought it would be easier to verify them by using a vector instead of a list. -- View this message in context:

Re: [R] working on a vector with named elements - unname

2012-02-15 Thread William Dunlap
tibco.com -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Alexander Sent: Wednesday, February 15, 2012 1:43 AM To: r-help@r-project.org Subject: [R] working on a vector with named elements - unname Hi, I am working under

Re: [R] working on a vector with named elements - unname

2012-02-15 Thread William Dunlap
: Wednesday, February 15, 2012 8:57 AM To: Alexander; r-help@r-project.org Subject: Re: [R] working on a vector with named elements - unname You could use [[ instead of [, as the XXlatterXX drops former the names. E.g., after v - c(a=3,a=4,c=5,d=6