Re: [R] error: no such index at level 2

2009-07-09 Thread Petr PIKAL
Hi Godmar Back napsal dne 08.07.2009 15:28:50: > On Wed, Jul 8, 2009 at 4:22 AM, Petr PIKAL wrote: > Hi > > r-help-boun...@r-project.org napsal dne 07.07.2009 19:06:17: > > > Hi, > > > > I am confused about how to select elements from a list. > > > > I'm trying to select all rows of a table

Re: [R] error: no such index at level 2

2009-07-08 Thread Godmar Back
--- > > > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf Of Godmar Back > Sent: Wednesday, July 08, 2009 9:58 AM > To: Henrique Dallazuanna > Cc: r-help@r-project.org; Petr

Re: [R] error: no such index at level 2

2009-07-08 Thread David Huffer
p-boun...@r-project.org] On Behalf Of Godmar Back Sent: Wednesday, July 08, 2009 9:58 AM To: Henrique Dallazuanna Cc: r-help@r-project.org; Petr PIKAL Subject: Re: [R] error: no such index at level 2 On Wed, Jul 8, 2009 at 9:40 AM, Henrique Dallazuanna wrote: > Its because '[[' accep

Re: [R] error: no such index at level 2

2009-07-08 Thread Godmar Back
On Wed, Jul 8, 2009 at 9:40 AM, Henrique Dallazuanna wrote: > Its because '[[' accept only element, so you need use '[': > > q[crossRsorted[,1]] > > Henrique, I figured out what q[crossRsorted[,1]] does - it produces q[i] for all i in crossRsorted[,1]. Ok. Since a given index 'k' of q[[k]] can oc

Re: [R] error: no such index at level 2

2009-07-08 Thread Godmar Back
On Wed, Jul 8, 2009 at 9:40 AM, Henrique Dallazuanna wrote: > Its because '[[' accept only element, so you need use '[': > > q[crossRsorted[,1]] > This appears to be doing something different. For instance, my 'q' has 165 components, but what you suggest has 15750: > length(q) [1] 165 > length(q[

Re: [R] error: no such index at level 2

2009-07-08 Thread Henrique Dallazuanna
Its because '[[' accept only element, so you need use '[': q[crossRsorted[,1]] On Wed, Jul 8, 2009 at 10:28 AM, Godmar Back wrote: > On Wed, Jul 8, 2009 at 4:22 AM, Petr PIKAL wrote: > > > Hi > > > > r-help-boun...@r-project.org napsal dne 07.07.2009 19:06:17: > > > > > Hi, > > > > > > I am

Re: [R] error: no such index at level 2

2009-07-08 Thread Godmar Back
On Wed, Jul 8, 2009 at 4:22 AM, Petr PIKAL wrote: > Hi > > r-help-boun...@r-project.org napsal dne 07.07.2009 19:06:17: > > > Hi, > > > > I am confused about how to select elements from a list. > > > > I'm trying to select all rows of a table 'crossRsorted' such that the > > mean of a related vec