kimmolinna / rsconnect

R connection for Dyalog APL with Rserve.
MIT License
5 stars 0 forks source link

Need to call print twice to get a plot to show #9

Open dyavc opened 2 years ago

dyavc commented 2 years ago

R 4.2.1, Dyalog 18.2.45749 64-bit Unicode on MS Windows 10 ⍝ in R, I have installed packages usmap and ggplot2 ⍝ I have downloaded rsconnect to d:\git\rsconnect ]load D:\git\rsconnect\rserve.dyalog RS.start r←⎕NEW #.RS.Rserve r.eval 'library(usmap)' r.eval 'library(ggplot2)' r.eval 'print(plot_usmap())' ⍝ The R graphics window does show, but nothing is shown yet. ⍝ Need to repeat the r.eval print call again and the map is shown. r.eval 'print(plot_usmap())'

kimmolinna commented 2 years ago

This could be a timeout issue. If you do the same in the R the first print(plot_usmap() will take quite much time. You can try to set up the longer timeout in settings.json

dyavc commented 2 years ago

Hi Kimmo,

Thanks for your reply! I have increased the timeout to 40000, but I still see the issue. I do not see any output, even after 40 seconds. In rgui console, I can see the map within 2 seconds.

In rsconnect, I can see output very quickly if I do the expression twice quickly.

Regards,

Vince

kimmolinna commented 2 years ago

Hi Vince,

I have to start Dyalog in Windows as admin that I can see the graphics window. The window won't get a focus automatically so I have to find it manually. Still there is a NOT RESPONDING problem which I try to figure out why...