Provides Dedicated, Platform-Specific Viewers for âhttpgdâ Graphics Devices
The âhttpgdâ packages provides a super-fast, asynchronous graphics device for R graphics via âsvgliteâ and âlaterâ packages. Tools are provided to use dedicated, platform-specific graphics âbrowsersâ for âhttpgdâ graphics devices.
This is an EXPERIMENTAL standalone viewer, written in Go, for the
super-cool {httpgd} package remotes::install_github("nx10/httpgd")
.
The Windows viewer is not built yet because I havenât got round to it because I detest Windows.
The goal is to have a âQuartzâ-like window (for folks familiar with that on macOS) with full functionality. Right now, itâs just a basic viewer (and âsaveâ doesnât work for some reason that Iâm trying to figure out.)
If I were you, I wouldnât waste time on this package as itâll likely just get Sherlocked w/o notice by RStudio at some point and baked into their ecosystem. I made it mainly for myself as I also detest using the âbrowser for researchâ as an application runner.
Iâm also just as likely to add an {httpgd} viewer functionality into RSwitch since it already functions as an RStudio Server client and it wonât take much to have it work with {httpgd} directly (or via this package).
If you donât trust the pre-built viewers, tools-raw
has what you need
to make your own. They go into tools::R_user_dir(package = "grandview"), "app")
and for the macOS one youâll need to use your own
signing cert (you may need to right-click open my built one once due to
faux security theatre by Apple).
Because I rely on tools::R_user_dir()
this package requires R 4.0.0+.
That was a deliberate choice since the adoption rate for R 4.0.0+ is
likely low (so I have time to refine this package) and Iâd rather rely
on it than {rappdirs}.
The following functions are implemented:
hgd
: Initialize httpgd graphics device, start server, and launch viewer.install_viewer
: Install the binary viewer for your platform
remotes::install_git("https://git.rud.is/hrbrmstr/grandview.git")
# or
remotes::install_git("https://git.sr.ht/~hrbrmstr/grandview")
# or
remotes::install_gitlab("hrbrmstr/grandview")
# or
remotes::install_bitbucket("hrbrmstr/grandview")
# or
remotes::install_github("hrbrmstr/grandview")
NOTE: To use the âremotesâ install options you will need to have the {remotes} package installed.
library(grandview)
# current version
packageVersion("grandview")
## [1] '0.1.0'
install_viewer() # you'll get prompts to do this
hgd() # it accepts params which will get passed to the viewer
# plot stuff
dev.off()
Lang | # Files | (%) | LoC | (%) | Blank lines | (%) | # Lines | (%) |
---|---|---|---|---|---|---|---|---|
R | 6 | 0.67 | 134 | 0.73 | 40 | 0.48 | 53 | 0.54 |
Go | 1 | 0.11 | 23 | 0.13 | 15 | 0.18 | 5 | 0.05 |
make | 1 | 0.11 | 15 | 0.08 | 3 | 0.04 | 1 | 0.01 |
Rmd | 1 | 0.11 | 11 | 0.06 | 26 | 0.31 | 40 | 0.40 |
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.