[R] Filtering Cases with != NA

David Wolfskill r at catwhisker.org
Thu Dec 17 16:33:30 CET 2015


On Thu, Dec 17, 2015 at 01:50:29PM +0100, G.Maubach at weinwolf.de wrote:
> Dear All,
> 
> I am new to "R" and search for a solution to exclude cases if a certain 
> variable contains NA for a case.
> ... 
> I would like to create a subset excluding case 3 Miller NA.
> 
> I tried to following:
> 
> new_dataset <- subset(dataset, subset = Turnover != NA)
> 
> This does not work. The new_dataset contains all variables but not cases 
> are left. R responds "Variables with all observations missing".
> 
> How could I do it right?
> ....

Please review the documentation for na.omit() (and related functions.

Peace,
david
-- 
David H. Wolfskill				r at catwhisker.org
Those who would murder in the name of God or prophet are blasphemous cowards.

See http://www.catwhisker.org/~david/publickey.gpg for my public key.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 603 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20151217/14e53d97/attachment.bin>


More information about the R-help mailing list