Friday, August 07, 2009

simpler way to count the number of elements in a vector that are not NA

simpler way to count the number of elements in a vector that are not NA

sum( !is.na( yourvector ) )

No comments: