I would like to calculate percentage of NA-values in a dataframe and for variables.
My dataframe has this:
mean(is.na(dataframe))
# 0.03354
How I read this result? Na 0,033%? I don't understand.
For the individual variables I did the following for the count of NAs
sapply(DATAFRAME, function(x) sum(is.na(x)))
Then, for the percentage of NA-values:
colMeans(is.na(VARIABLEX)) 
Doesn't work because I get the following error:
"x must be an array of at least two dimension"
Why does this error occur? Anyway, afterwards I tried the following:
mean(is.na(VariableX))
# 0.1188
Should I interpret this as having 0.11% NA-values? 
 
     
     
    