Skip to content

anthonynorth/cloudview

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cloudview

lifecycle release latest R-CMD-check

View htmlwidget objects over ssh connections, eg. with vscode-remote.

Installation

You can install the development version of cloudview from GitHub with:

# install.packages("devtools")
devtools::install_github("anthonynorth/cloudview")

Usage

Cloudview can be used to explicitly serve a htmlwidget with cloudview(object), or you can setup cloudview to implicitly serve widgets on print(view = TRUE).

Serving htmlwidgets on print(view = TRUE) is achieved with enable_cloudview(). This function masks print.htmlwidget with a wrapper function that replaces the viewer() which is called when running R interactively (by default). Undo this operation with disable_cloudview().

Add enable_cloudview() to .Rprofile to always serve widgets on print(view = TRUE). Example from my dot-files:

# serve htmlwidgets with servr
local({
  has_cloudview <- "cloudview" %in% .packages(all.available = TRUE)
  is_ssh <- Sys.getenv("SSH_CONNECTION") != ""
  if (interactive() && is_ssh && has_cloudview) cloudview::enable_cloudview()
})

About

No description, website, or topics provided.

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages