Skip to content
Prev 181903 / 398513 Next

logical vector as a matrix

On Sat, May 30, 2009 at 2:48 AM, Grze? <gregorio99 at gmail.com> wrote:
Why don't you create vector g like this:
g <- ! is.na(h)
As what you tried to do:
m <- h[g] # which got (4,6,12)
you can directly use:
m <- h[ ! is.na(h) ]