ggplot2 plot not rendering in Rj Editor

General help and assistance with jamovi. Bug reports can be made at our issues page: https://github.com/jamovi/jamovi/issues . (If you're unsure feel free to discuss it here)
Post Reply
SMackinnon
Posts: 12
Joined: Tue Apr 02, 2019 2:18 pm

ggplot2 plot not rendering in Rj Editor

Post by SMackinnon »

I've been playing around with jamovi to potentially use it with teaching undergrads next year. The Rj editor feature is particularly nice. That said, I've had some issues rendering plots using the "system R" version.

I'm creating an errorbar plot using ggplot2. It works just fine when:

a) I run it in RStudio, using R version 3.5.2
b) I run it in jamovi Rj editor with the R version "jamovi R"
c) Using the jmvconnect package to read in the dataset into Rstudio, then creating the plot

But .. it does not work when I run it like this:

d) Using the Rj editor with the R version "system R"

The error is basically that the plot shows a loading symbol indefinitely, and the plot never renders. Any idea what's causing this? I attached the .omv file that's producing the issue, and a screenshot of what it looks like when it's not working.
Attachments
error.PNG
error.PNG (34.93 KiB) Viewed 3641 times
lecture6.perfectionism.omv
(89.87 KiB) Downloaded 323 times
User avatar
jonathon
Posts: 2613
Joined: Fri Jan 27, 2017 10:04 am

Re: ggplot2 plot not rendering in Rj Editor

Post by jonathon »

hi,

i think if you update your version of jmvcore, you should be in business. i'll bump the jmvcore dependency in jmvconnect in the next CRAN submission, so jmvcore will get automatically updated.

cheers
User avatar
MAgojam
Posts: 421
Joined: Thu Jun 08, 2017 2:33 pm
Location: Parma (Italy)

Re: ggplot2 plot not rendering in Rj Editor

Post by MAgojam »

Hi, @SMackinnon.
Try checking your versions.
Your example works for me, take a look at the attached screenshot.
Screenshot_20190403.PNG
Screenshot_20190403.PNG (65.52 KiB) Viewed 3622 times
Cheers.
Maurizio
SMackinnon
Posts: 12
Joined: Tue Apr 02, 2019 2:18 pm

Re: ggplot2 plot not rendering in Rj Editor

Post by SMackinnon »

Ah, yes updating jmvcore by running this fixed my problem:

install.packages("jmvcore")

I figured it was something re: my install in R. Thanks so much!
User avatar
jonathon
Posts: 2613
Joined: Fri Jan 27, 2017 10:04 am

Re: ggplot2 plot not rendering in Rj Editor

Post by jonathon »

no worries, and thanks for reporting. i'll be able to smooth out this issue for other users now.

with thanks

jonathon
Post Reply