Skip to content
Prev 349641 / 398513 Next

From replicate to accesing sublists

Thanks.The code you gave me at the end works correctly.. I was wondering if there is more efficient way to access each element withouth this classic for loop.
RegardsAlex
On Wednesday, April 1, 2015 5:54 PM, David Winsemius <dwinsemius at comcast.net> wrote:

        
On Apr 1, 2015, at 3:34 AM, Alaios via R-help wrote:

            
It would have been better to show the results of dim() or dput(). Matrix objects (which are capable of holding lists) should be accessible with either a single or double argument to "[". This should deliver contents:

for (i in 1:4)? print(? error_suburban_0[i]$Shadowing )

If the matrix has 4 or more rows, then that would be accessing only from the first column. If fewer than 4 rows, you would be wrapping around to later columns.

-- 
David.
This is a plain text mailing list. Please reconfigure your email client to sent in plain text.