Swarchal / platetools

An R package for plotting microtitre plates
Other
54 stars 15 forks source link

bhit_map fails when plates contain missing data #35

Open Swarchal opened 1 year ago

Swarchal commented 1 year ago
Error in if (platemap[row, "values"] > threshold) { : 
  missing value where TRUE/FALSE needed

https://github.com/Swarchal/platetools/blob/2934bd8df4bcfea1c07c1b7f47ca0ff3c1487508/R/bhit_map.R#L102-L111

This can be fixed with an initial if statement, checking if the value is NaN, and if so, return an NaN.