ggplot2 plot not rendering in Rj Editor after update to 1.6.

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)
SMackinnon
Posts: 12
Joined: Tue Apr 02, 2019 2:18 pm

ggplot2 plot not rendering in Rj Editor after update to 1.6.

Post by SMackinnon »

Something seems to have broken with the RjEditor and how it interacts with ggplot2() since the update to version 1.6.15 solid. During this teaching term, we have been using version 1.2.27 solid with no issues, but RjEditor seems to be not properly rendering the plots from ggplot2 after updating jamovi and RjEditor to the latest versions. I get an endless blue circle loading screen whenever I run the code. Some details:

a) This is on a Mac platform, replicated on two different computers
b) I'm using jamovi R, not system R
c) Other stuff in RjEditor works, like 1+1 or even base R plots like plot(data$var) seem to work fine. But no ggplots
d) tried fresh installs of jamovi and RjEditor and restarting computers
e) I've given a sample .omv file below, the last plot doesn't render in version 1.6.15 on my mac, but still works fine on version1.2.27 on my PC.

I had this problem once before, but with system R and it had to do with the jmvcore package on your end, in case that helps:
viewtopic.php?f=6&t=742&p=2593&hilit=smackinnon#p2593\

Any thoughts?

If this isn't fixable, is there any way to temporarily still download version 1.2.27 for my students so we're all using the same version to survive the end of winter term?
Attachments
week7.ttest1.omv
(240.26 KiB) Downloaded 216 times
SMackinnon
Posts: 12
Joined: Tue Apr 02, 2019 2:18 pm

Re: ggplot2 plot not rendering in Rj Editor after update to

Post by SMackinnon »

Also, I tried version 1.6.16 current, but same issue.

Another strange thing on my end is that the plot appears when I first open jamovi. BUT, if I re-run the code once jamovi has already loaded, it produces an indefinite loading icon.
yoshi
Posts: 10
Joined: Sat Aug 10, 2019 6:24 am

Re: ggplot2 plot not rendering in Rj Editor after update to

Post by yoshi »

Hi!

I get the same error.

The plot is displayed without a problem by the same cord in R.

My environment is as follows.

Jamovi 1.6.16
Rj-Editor 1.1.0
R version 4.0.4 (2021-02-15)

MacOS 11.2.1(20D75)

Regards,
User avatar
jonathon
Posts: 2613
Joined: Fri Jan 27, 2017 10:04 am

Re: ggplot2 plot not rendering in Rj Editor after update to

Post by jonathon »

the issue stems from the size that the ggplot objects serialize to.

serialization in R, unfortunately results in incredibly large file objects -- relative to other languages.

so it's not an easy issue to work around ... but i'm thinking about it.

cheers

jonathon
User avatar
Ravi
Posts: 194
Joined: Sat Jan 28, 2017 11:18 am

Re: ggplot2 plot not rendering in Rj Editor after update to

Post by Ravi »

Btw, you can still download the 1.2.27 from our download page:
Screenshot 2021-02-25 at 11.29.47.png
Screenshot 2021-02-25 at 11.29.47.png (159.74 KiB) Viewed 4163 times
SMackinnon
Posts: 12
Joined: Tue Apr 02, 2019 2:18 pm

Re: ggplot2 plot not rendering in Rj Editor after update to

Post by SMackinnon »

Ok, thanks! The older version is a workaround for me in the short term, thanks. Not sure how I missed that on the website! A couple of other pieces of info, in case it's helpful:

a) This problem with the new version doesn't appear on PCs; the ggplots load just fine on PC, it's only on Macs the issue occurs.

b) Reinstalling 1.2.27 (and uninstalling and reinstalling the RjEditor module) on a mac resolves the issue with .omv files created using version 1.2.27. However, it won't open a file that was saved using the new version 1.6.15, "a newer version of jamovi is required."
User avatar
jonathon
Posts: 2613
Joined: Fri Jan 27, 2017 10:04 am

Re: ggplot2 plot not rendering in Rj Editor after update to

Post by jonathon »

try the 1.6.18, and see if it fixes it for you.

cheers

jonathon
SMackinnon
Posts: 12
Joined: Tue Apr 02, 2019 2:18 pm

Re: ggplot2 plot not rendering in Rj Editor after update to

Post by SMackinnon »

This fixes the issue on my mac!

I'll follow up a little later if I hear back from my students who also had this issue to see if it resolves on other computers too.

Thanks so much, you really are amazing!!
yoshi
Posts: 10
Joined: Sat Aug 10, 2019 6:24 am

Re: ggplot2 plot not rendering in Rj Editor after update to

Post by yoshi »

The problem of this issue (https://github.com/jamovi/jamovi/issues/935) is solved partially.
( There is still the problem not to be able to draw two or more graphs )

Thanks!
acshephard
Posts: 1
Joined: Thu Mar 11, 2021 7:00 pm

Re: ggplot2 plot not rendering in Rj Editor after update to

Post by acshephard »

I work with SMackinnon and some students (now using v1.6.18) are still having the infinite loading icon, but only when they make a slightly more complex plot - in this case, it occurs when adding fill to aes. However, by removing the automatically added legend from the plot, the students are able to get the plot to load. Could this be a continuation of yoshi's problem, where adding a second element/plot causes a resource error?
Post Reply