I am trying to assign labels to ggplot2
outliers the way it is specified here:
Labeling Outliers of Boxplots in R
And to create a new outlier
column I am using the following code:
splitData %>%
group_by(Sample.group) %>%
mutate(outlier=ifelse(is_outlier(value), value, as.numeric(NA)))
And I am getting the error:
Error in mutate_impl(.data, dots) : Evaluation error: missing values and NaN's not allowed if 'na.rm' is FALSE.
The splitData
looks like that:
I guess, wrong as.numeric()
happens somewhere; there is a similar thread:
Error: missing values and NaN's not allowed if 'na.rm' is FALSE
But I am having trouble figuring out where. Any suggestions would be greatly appreciated.