0

I'm using the Amelia package in R and after some processing I get a Missingness Map that is all blue: that is good it means all my cells contain something.

Now, what if some cells around the map contain a string value like: draw_me.

Is it possible to draw those cells with a different color?

(I'm free to use any extra/other package)

Example:

CSV file (data.csv):

field1,field2,field3,field4
3,1,45
draw_me,1,44,4.4
1,,draw_me,4
7,,,9
543,5,,5
7.7,draw_me,2,5
3,2,6,8
5.5,6,7,8
3,1,draw_me,6.2
1,2,3,4

R code:

library(Amelia)
data <- read.csv("data.csv", header = TRUE,na.strings = c("NA","NaN","","#DIV/0!"))
missmap(data, col=c("gray90", "red"), legend = FALSE, rank.order = FALSE, y.labels = NULL, y.at = NULL)
data <- data[complete.cases(data),]
missmap(data, col=c("gray90", "red"), legend = FALSE, rank.order = FALSE, y.labels = NULL, y.at = NULL)

Initial missmap:

enter image description here

After cleaning out the rows with empty cells: enter image description here

What I'm looking for to draw (the blue boxes represent cells with the "draw_me" string in them):

enter image description here

Anna K.
  • 95
  • 10
  • It would be easier to help you if you provided a [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input data and the code you are currently using. Right now it isn't clear at all exactly what's going on. – MrFlick Jan 10 '18 at 19:06
  • @MrFlick Will do, thank you for the feedback. – Anna K. Jan 10 '18 at 19:20
  • @MrFlick I included an example and the visual output I'm trying to get to. – Anna K. Jan 10 '18 at 20:06

0 Answers0