You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I hope it's ok for me to post this in this issue tracker.
I spent the last couple days writing a graphics device driver for R that is accessible via HTTP.
The main use case would be IDE integration for VSCode and other editors.
It basically collects draw calls in a kind of "virtual DOM" and runs a http server in a background thread. On http request the DOM is rendered to SVG and sent to the client.
This already works surprisingly well.
The code is very experimental, I am not a very experienced C++ programmer and am not too familiar with the R/C++ API.
What do you think of this? Any advice and suggestions from you are very welcome! The project is basically a "proof of concept" right now.
Automatic detection of redraw and window resize are implemented (window resize has some limitations).
I am unsure what causes this error. I only tested on my machine (Windows, R 4.0).
You might be missing a dependancy. Try installing gdtools and RcppThread from CRAN beforehand.
Edit: I just remembered I do have platform specific code that starts the webserver. Sorry for the inconveniences I will fix it soon and come back to you.
I just pushed changes that enables it to successfully compile and run under linux (Ubuntu). It should also work with macOS but I do not have a suitable machine for testing.
I just modified the DESCRIPTION file, can you try again to make sure its not caused by some caching?
I also cleaned up the project so that R CMD check gives me 0 warnings and 0 notes (yay) so maybe I fixed it while doing that.
I didn't clone the repo and install it from github (no cache issue) but it still does not compile on macOS. Maybe I'll clone the repo and take a closer look.
I have worked a lot on the graphics server in the last couple of days.
Automatic resizing, plot history and concurrently running multiple servers is now possible.
What next steps should I take for it to be considered for including it in vscode-R?
Should I work on a CRAN release? Are there API changes you want to see?
Thanks for the quick fix! It now works out of the box on Ubuntu and macOS (without xquartz, maybe due to the latest macOS Catalina 10.15.5 update? Never sure about that).
But currently there's no way for user to change device in ~/.Rprofile if R: Create R terminal is used to start R session in VSCode.
I'll bring together several issues about controling the behavior of session watcher include default device, plot watcher and viewer, viewer position, browser position, etc. so that it is easier for user to customize session watcher features and behaviors.
Activity
renkun-ken commentedon May 18, 2020
Thanks for sharing your work on web-based R graphics device!
I try to install the package but it ends up with the following error:
Not sure if it is supposed to work on macOS and R 4.0?
My session info
nx10 commentedon May 18, 2020
Thank you for your response!
I am unsure what causes this error. I only tested on my machine (Windows, R 4.0).
You might be missing a dependancy. Try installing
gdtoolsandRcppThreadfrom CRAN beforehand.Edit: I just remembered I do have platform specific code that starts the webserver. Sorry for the inconveniences I will fix it soon and come back to you.
renkun-ken commentedon May 19, 2020
I tried installing the package on Ubuntu and the following error occurs:
Obviously, Windows header
<winsock2.h>is used but unfortunately I don't have a Windows to try it.nx10 commentedon May 19, 2020
I just pushed changes that enables it to successfully compile and run under linux (Ubuntu). It should also work with macOS but I do not have a suitable machine for testing.
renkun-ken commentedon May 19, 2020
I tried it on Ubuntu and it works! But no luck for macOS:
nx10 commentedon May 19, 2020
I just modified the DESCRIPTION file, can you try again to make sure its not caused by some caching?
I also cleaned up the project so that R CMD check gives me 0 warnings and 0 notes (yay) so maybe I fixed it while doing that.
renkun-ken commentedon May 20, 2020
I didn't clone the repo and install it from github (no cache issue) but it still does not compile on macOS. Maybe I'll clone the repo and take a closer look.
[-]Virtual R graphics device with HTTP access.[/-][+]R graphics device with HTTP access.[/+]nx10 commentedon May 24, 2020
I was able to borrow a mac book and found the source of your problem with running the graphics device under mac OS:
It seems like a recent mac OS update (Catalina) removed shared libraries used by the package systemfonts (see: r-lib/systemfonts#17).
You can install XQuartz as a workaround (https://www.xquartz.org/).
nx10 commentedon May 28, 2020
I have worked a lot on the graphics server in the last couple of days.
Automatic resizing, plot history and concurrently running multiple servers is now possible.
What next steps should I take for it to be considered for including it in vscode-R?
Should I work on a CRAN release? Are there API changes you want to see?
renkun-ken commentedon May 29, 2020
Thanks for the hard work!
I cannot install it on Ubuntu like the following:
nx10 commentedon May 29, 2020
Sorry, just fixed it.
renkun-ken commentedon May 29, 2020
Thanks for the quick fix! It now works out of the box on Ubuntu and macOS (without xquartz, maybe due to the latest macOS Catalina 10.15.5 update? Never sure about that).
I'll do more testing and give feedback soon.
renkun-ken commentedon Jun 9, 2020
I'm trying overwriting device specified by session watcher with httpgd device and it works well.
But currently there's no way for user to change device in
~/.RprofileifR: Create R terminalis used to start R session in VSCode.I'll bring together several issues about controling the behavior of session watcher include default device, plot watcher and viewer, viewer position, browser position, etc. so that it is easier for user to customize session watcher features and behaviors.
When we have those, we could use something like
erhoppe commentedon Jul 26, 2022
This just fixed my problem on my M1 Mac (OS 12.4). Had been running into Base64 header errors. Thank you!