24 Spatial Point Patterns: Methodology and Applications with R
[[1]]
[1] "Tuesday" "Friday"
[[2]]
[1] 3 4 5 6 7
[[3]]
[1] FALSE TRUE
The key fact is that lists are vectors. Consequently all of the extraction pr ocedures described above
are applicable when x is a list. The subset operator [ ] applied to a list will always retur n a list
(because a subset of a list is another list). If for example x is a list (having length at least 6) then
x[c(2,4,6)] is a list of length 3, i.e. havin g 3 compon ents. Notice in particular that if the length of
the index vector s is 1, then what we get from x[s] is a list of length 1. For example, b[2] will
return the list, of length 1, whose first (and only) entry is the vector 3:7.
If you want to get at the object constituting ...