search for: rothehausstr

Displaying 1 result from an estimated 1 matches for "rothehausstr".

2012 Dec 04
3
How to find matching columns in a matrix of lists?
Dear R users, I have a matrix composed of lists: m <- matrix( list(), nrow=1, ncol=3 ) m[[ 1, 1 ]] <- list("A", "B") m[[ 1, 2 ]] <- list("A", "C") m[[ 1, 3 ]] <- list("A", "B") and want to get the sub-matrix where cells contain "B". But m[ , "B" %in% m[ 1, ], drop=F ] as well as m[ , "B"