VIM package detects values of zero in dataset as missing data

Viewed 79

I'm working with a dataset that is comparing the abundance of certain species against environmental variables in various sampling sites.

For some of the sites, environmental variables could not be measured in the field. As a result, these values are written as "NA" in my dataset.

However, for the variables relating to species abundance, there are some values which are zero, simply because at that particular site, one or more species were simply not observed.

I'm using the mice package to deal with these NA values using imputation methods. However, I also want to use the VIM package with the functions "md.pattern" and "aggr" to assess the proportion of missing values. The issue is that when using these functions, R is not only considering the NA values as missing data, but also the zero values as missing data. How can I make it so R only detects NA as missing data and not the values which are zero?

0 Answers
Related