Create an empty git repo or reinitialize an existing one
$ git initCreate an empty git repo or reinitialize an existing one
$ git init| library("shiny") | |
| library("ggplot2") | |
| ui <- pageWithSidebar( | |
| headerPanel("Tooltips in ggplot2 + shiny"), | |
| sidebarPanel( | |
| HTML("Tooltips are managed by combination of shiny+ggplot hover functionality", | |
| "and css styles. By setting hover argument of 'plotOutput' we could access", | |
| "hover data from the server side, as an ordinary input. Hover input is", |
| library(nycflights13) | |
| library(microbenchmark) | |
| library(dplyr) | |
| library(tidyr) | |
| library(purrr) | |
| data <- flights | |
| for_loop <- microbenchmark::microbenchmark(times = 1, { | |
| carriers <- unique(data$carrier) |
| --- | |
| title: "Dynamic R Markdown Code Chunk" | |
| output: | |
| html_document: | |
| theme: united | |
| params: | |
| insights: "NA" | |
| --- | |
| ```{r setup, echo=FALSE} |
| library(shiny) | |
| library(dplyr) | |
| library(ggplot2) | |
| library(noteMD) | |
| ######################################## | |
| # ui and server functions for the module | |
| ######################################## | |
| commInsightInput <- function(id){ | |
| ns <- NS(id) |
| my_summarise() is a custom function that automatically choose between sym() and enquo() for input type "character" and ^quosure | |
| ## This works! | |
| my_summarise <- function(df, var){ | |
| if(inherits(substitute(var), "character")){ | |
| var = sym(var) | |
| } | |
| else if(inherits(substitute(var), "name")){ | |
| var = enquo(var) | |
| } |
| # robosat workflow to classify buildings in rutland, vt: | |
| # (to check on any file locally in this process): | |
| # docker cp <IMAGE_ID>:/app/<filename> . | |
| docker pull mapbox/robosat:latest-cpu | |
| docker run -i -t mapbox/robosat:latest-cpu /bin/bash | |
| # configure some things | |
| apt-get update && apt-get install -y sudo && rm -rf /var/lib/apt/lists/* |
| #!/bin/bash | |
| # Marwick Lab Computational Environment Setup (Anh's version) | |
| # this script can be run from the terminal with the next line (minus the #) | |
| # bash install_things.sh | |
| # you will need to enter your password at a few points, so keep an eye on it while it runs. | |
| # in case we need to step through: |
| ############################################################################################ | |
| # Benchmark fst against saveRDS, fread/fwrite, and feather # | |
| ############################################################################################ | |
| # get data.table dev version from GitHub (multithreaded): | |
| # install.packages("data.table", type = "source", repos = "http://Rdatatable.github.io/data.table") | |
| require(fst) # v0.7.2 | |
| require(data.table) # dev version v1.10.5 (2017/4/14) |
| ## Authentication | |
| ## This is a small app to demonstrate user-managed authentication using a hash to encode passwords. | |
| ## Users are stored in a SQL database with passwords along with roles. | |
| ## Once a user is logged in the shiny app responds to the user's role. | |
| ## In order to use in a real setting, additional code for password management, | |
| ## changing and resetting would need to be implemented. | |
| library(shiny) | |
| library(RSQLite) | |
| library(sodium) |