GithubHelp home page GithubHelp logo

ewan-keith / shinyshortcut Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 2.0 40 KB

Create executable files to run shiny apps directly in your browser

License: GNU General Public License v3.0

R 100.00%
r r-shiny shortcut

shinyshortcut's Introduction

shinyShortcut

Travis Build Status AppVeyor Build Status codecov CRAN_Status_Badge

Overview

This package allows users to create a shortcut for their shiny app that, when run, will launch the app directly in the user's default browser. No need to navigate to the correct working directory in R (or even to open R at all!). Simply run the shortcut and the app will fire up. Works for both windows and linux based systems.

Inspired by this blog post by Mark Sellors at Mango Solutions.

Installation

# Install from CRAN
install.packages("shinyShortcut")

# Install from Github
# install.packages("devtools")
devtools::install_github("ewan-keith/shinyShortcut")

Usage

The package loads just a single function, also named shinyShortcut(). It takes three arguments:

  • shinyDirectory: The home directory of your shiny app (that contains your server.r, ui.r, or app.r files).
  • OS: The operating system for the app to be ran on, must be "windows" or "unix".
  • gitIgnore: Whether to update the .gitignore file to prevent the shortcut files being tracked by git.

The function writes an exectuable script (.vbs on windows and .desktop on unix) in to the app's home directory. Shortcuts to this file can then be created elsewhere on the user's system. The function also creates a new directory /.shiny_run into which is written the raw batch or bash script (Windows and unix respectively) that runs the shiny app.

When the shinyDirectory is the current working directory then the default arguments are sufficient.

library(shinyShortcut)

shinyShortcut()

shinyshortcut's People

Contributors

ewan-keith avatar pabgamu avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

pabgamu pseegaha

shinyshortcut's Issues

Fails due to libgcc dll error

Hello, I installed shinyShortcut() from CRAN on 32-bit R. I followed instruction and the shinyShortcut VB script was created. But when I double click I get this error:

Rscript.exe - System Error.
The code execution cannot proceed because libgcc_s_dw2-1.dll was not found. Reinstalling the program may fix this problem.

I tested on even the simplest possible shiny app:

library(shiny)
ui <- fluidPage()
server <- function(input, output) {}
shinyApp(ui = ui, server = server)

Any advise? Thanks!

Windows Script Host error

The shinyShortcut.vbs script that is created by the shinyShortcut function produces the following error upon clicking (in a pop up window):

Line:     2
Char:     1
Error:    The system cannot find the file specified.
Code:     80070002
Source:   (null)

I have exlcluded the Script path for security reasons.

The shinyShortcut.cmd file in the .shiny_run folder runs successfully, however. Thought I would just flag this up.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.