Skip to content
Back to formatted view

Raw Message

Message-ID: <OF8D82BBD9.4138E6C4-ONC1257FA1.002BF1AF-C1257FA1.002CDBA6@lotus.hawesko.de>
Date: 2016-04-26T08:09:57Z
From: G.Maubach at weinwolf.de
Subject: Missing Values in Logical Expressions

Hi All,

I need to evaluate missing values in my data. I am able to filter these 
values and do simple statistics on it. But I do need new variables based 
on variables with missing values in my dataset:

Check_Kunde_2011 <- ifelse(is.na(Umsatz_2011) == TRUE & Kunde_2011 == 1, 
1, 0)
Check_Kunde_2011 <- factor(Check_Kunde_2011, levels = c(1,0), labels = 
c("Check", "OK"))

The new variable is not correctly created. It contains no values:

table(Check_Kunde_2011)
< table of extent 0 >

I searched the web but could not find a solution.

How can I work with variables and missing values in logical expressions?

Where could I find something about this?

Kind regards

Georg