[R] Problems with lists...

David Huffer David.Huffer at csosa.gov
Thu Jul 16 19:03:53 CEST 2009


Like,

> a = list (1:3,4:6,7:9)
> a
[[1]]
[1] 1 2 3

[[2]]
[1] 4 5 6

[[3]]
[1] 7 8 9

> a [[2]] [2]
[1] 5
> a [[3]] [3]
[1] 9
> 

HTH

--
 David  

-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
On Behalf Of voidobscura
Sent: Thursday, July 16, 2009 12:11 PM
To: r-help at r-project.org
Subject: [R] Problems with lists...


> a
[[1]]
[1] 1 2 3

[[2]]
[1] 4 5 6

[[3]]
[1] 7 8 9

I need to access individual elements, such as the 5 or the 9.  Can
anyone
please tell me the syntax to do this?

tia
-- 
View this message in context:
http://www.nabble.com/Problems-with-lists...-tp24519517p24519517.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.




More information about the R-help mailing list