5

I'm not that well versed in R but have recently installed the ggpubr package as want to make a paired box plot. I've tried been using:

ggpaired(question1, cond1 = question1$q1, cond2 = question1$q2,
     fill = "condition", palette = "jco")

and I keep coming out with the error message:

Error: Only strings can be converted to symbols

and I've been prompted to run a last error check. and the output is as follows:

Only strings can be converted to symbols
Backtrace:
  1. ggpubr::ggpaired(...)
 10. tidyr::gather_(...)
 12. rlang::syms(gather_cols)
 13. rlang:::map(x, sym)
 14. base::lapply(.x, .f, ...)
 15. rlang:::FUN(X[[i]], ...)

Can someone please please help me!! Thank you so much!

OTStats
  • 1,820
  • 1
  • 13
  • 22
Amber Jaffrey
  • 51
  • 1
  • 2
  • 2
    Use something like this, ggpaired doesn't allow variable to pass like df$variable_name, `ggpaired(data=iris, cond1 = 'Sepal.Length', cond2='Sepal.Width', fill= 'Species', palette = 'jco')`, using iris dataset here, Use variable names as strings – PKumar Feb 25 '20 at 13:01

0 Answers0