Thanks David and Jorge for your comments!
--
View this message in context:
http://r.789695.n4.nabble.com/Selections-in-lists-tp3768562p3784816.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
https://st
Hi mdvaan,
Not the best solution, but it should get you started:
lapply(g, function(l){
n <- names(l)
res <- lapply(1:length(n), function(ii){
rr <- l[[n[ii]]]
rn <- rownames(rr)
cn <- colnames(rr)
i <- rn %in% n[[ii]]
rr
On Aug 25, 2011, at 11:24 AM, mdvaan wrote:
Hi,
I have produced a list g and I would like to reduce the amount of
information contained in each object in g.
For each matrix I would like to keep the values where the column
name equals
g[year][[1]][[x]] and the row names equals g[year][[1]][[
Hi,
I have produced a list g and I would like to reduce the amount of
information contained in each object in g.
For each matrix I would like to keep the values where the column name equals
g[year][[1]][[x]] and the row names equals g[year][[1]][[-x]]. So in
g$`1999`$`8029`, year = 1999 and x = 8
4 matches
Mail list logo