При использовании stat_compare_means возникает ошибка - PullRequest
0 голосов
/ 23 октября 2018

Я пытался с помощью R добавить значения "p" на блок-график, но возникает ошибка, когда я использую stat_compare_means.Я быстро посмотрел на Google, но я все еще не понимаю ...

Вот поле, которое я пытаюсь отобразить:

boxplot <- ggplot(data, aes(x = Produit, y = P.cell.ouv)) +
  geom_boxplot() +
  scale_y_continuous(name ="Proportion de cellules vidées", limits=c(0,0.5)) +
  scale_x_discrete(name ="") +
  geom_text(data = myletters_df, aes(label = letter, y = 0.35 ), colour="black", size=5) +
  stat_compare_means( label.x = 0.7, method = "kruskal.test")

И здесь возникла ошибка

> boxplot
Don't know how to automatically pick scale for object of type quosure/formula. Defaulting to continuous.
Don't know how to automatically pick scale for object of type quosure/formula. Defaulting to continuous.
Error in validDetails.text(x) : 
  'pairlist' object cannot be coerced to type 'double'

Как я могу это исправить?

...