[R] Simple extraction of level,x,y from contourLines()
albmont at centroin.com.br
Thu Oct 22 21:20:35 CEST 2009
Ted Harding asked:
> I can of course get these individually with, for the 5th one for
> But I can't see how to obtain, in one line and without running
> a nasty loop, to get all the levels at once!
> In other words, I'm looking for an expression which will return
> the vector
Did you try this?
# reproducible example
C.W <- list(list(level = 1, x = 2), list(level = 2, y = 3), list(level = 10,
z = 4))
sapply(C.W, function(x) x$level)
More information about the R-help