Skip to content
Prev 58296 / 398502 Next

deleting specified NA values

How about:

all.nas <- apply( old, 1, function(x) sum( is.na( x ) ) )
new <- old[all.nas < dim( old )[2], ]

----------------------
Bendix Carstensen
Senior Statistician
Steno Diabetes Center
Niels Steensens Vej 2
DK-2820 Gentofte
Denmark
tel: +45 44 43 87 38
mob: +45 30 75 87 38
fax: +45 44 43 07 06
bxc at steno.dk
www.biostat.ku.dk/~bxc
----------------------