knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

easyshiny

Travis build status AppVeyor build status Coverage status

Easyshiny is a package, that implements a shiny template for uploading and visualizing data. It tries to make the fill out process for this template as easy as possible. The goal is to make the difference between plotting data and showing it in a shiny app very small.

Installation

This package will most probably never be on CRAN. But it can be installed via github.

library(devtools)
install_github("mYstar/easyshiny")

Example

The simple goal of a easyshiny app is to let the user upload a file (or a set of files) and calculate some visualizations (e.g. plots) from it. This can be achieved by:

library(shiny)
library(shinyBS)
library(easyshiny)
library(ggplot2)

es_init()

es_read('bike_buyers.csv')

es_renderPlot(
  { 
    ggplot(bike_buyers(), aes(x=Commute.Distance, fill=Purchased.Bike)) +
    geom_bar(position = 'fill')
  }
)

es_start(title = 'Buying Bikes')

After starting the app, the user then needs to upload a file named bike_buyers.csv and a plot will be generated in the 'Results' tab.

Useful Functions

To make the most of your visuals, you should see the documentation of these functions:

After running: devtools::build_vignettes('easyshiny') there is also a vignette in vignette('example-app', package = 'easyshiny') that shows how to use these functions.

Console Mode

For development the data and visualizations can also be generated locally (without starting a server). This is called console mode and the vignette vignette('console-mode', package = 'easyshiny') shows how to use it, at the end.

Contribute

If someone wants to contribute, has questions or finds a bug, just contact me at: eric.starke@htw-dresden.de. Pull requests and patches are very welcome.



mYstar/easyshiny documentation built on June 21, 2019, 10:37 a.m.