BBB <- lapply( CCC, function( v ) v[ 0 wrote:
>Hi All--
>
>I have a list which contain variables 0s at the end of each vector on
>the isit. I want to create a new list with only numbers > 0.
>It seems simple, but i tried several option, none of which worked.
>
>CCC <- list(A=c(1,2,3,0,0,0,0), B=c(
Hi All--
I have a list which contain variables 0s at the end of each vector on
the isit. I want to create a new list with only numbers > 0.
It seems simple, but i tried several option, none of which worked.
CCC <- list(A=c(1,2,3,0,0,0,0), B=c(2,3,4,5,0,0,0,0,0,0))
for (i in 1:length(CCC)) {
f
2 matches
Mail list logo