Re: [R] getting elements out of list automatically

2009-06-02 Thread stephen sefick
yes sorry for not being clearer. Thank you very much. regards, Stephen Sefick On Tue, Jun 2, 2009 at 4:37 PM, jim holtman wrote: > Is this what you want: > >> x <- lapply(o, function(z) c(P.value=z$p.value, W=z$statistic)) >> do.call(rbind,x) >     P.value   W.W > sand.silt 

Re: [R] getting elements out of list automatically

2009-06-02 Thread jim holtman
Is this what you want: > x <- lapply(o, function(z) c(P.value=z$p.value, W=z$statistic)) > do.call(rbind,x) P.value W.W sand.silt 0.047883577 185.0 gravel 0.528568587 249.5 cobble 0.19523 340.0 boulder.bedrock 0.019343358 368.0 fine.root 0.01

[R] getting elements out of list automatically

2009-06-02 Thread stephen sefick
o <- (structure(list(sand.silt = structure(list(statistic = structure(185, .Names = "W"), parameter = NULL, p.value = 0.0478835773838087, null.value = structure(0, .Names = "location shift"), alternative = "two.sided", method = "Wilcoxon rank sum test with continuity correction", data.n