[R] Filtering Cases with != NA

G.Maubach at weinwolf.de G.Maubach at weinwolf.de
Thu Dec 17 13:50:29 CET 2015


Dear All,

I am new to "R" and search for a solution to exclude cases if a certain 
variable contains NA for a case.

Example

No Name Turnover
1 Smith 1500
2 Mayor 200
3 Miller 
4 Batic 750

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?

Kind regards

Georg


	[[alternative HTML version deleted]]



More information about the R-help mailing list