This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Suppose a function has an argument "x". If a "child function" has multiple | |
# argument beginning with "x" and I want to pass the param "x" to its parent, | |
# I get error: `argument n matches multiple formal arguments` | |
# The reason this happens is clear, but at 3am my brain is firing blanks | |
# trying to find a solution. Help! | |
library(magrittr) | |
foo <- function(x, ...) UseMethod("foo") | |
foo.parent <- function(x, n = 5, ...) n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:14.04 | |
MAINTAINER Winston Chang "[email protected]" | |
# ===================================================================== | |
# R | |
# ===================================================================== | |
# Need this to add R repo | |
RUN apt-get update && apt-get install -y software-properties-common |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(shiny) | |
library(ggplot2) | |
authorized <- TRUE | |
shinyServer(function(input, output, session) { | |
if (authorized) { | |
data <- iris | |
p <- qplot(Sepal.Width, Sepal.Length, data = iris, color = Species) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(shiny) | |
library(ggplot2) | |
shinyServer(function(input, output, session) { | |
if (!is.null(session$user)) { | |
data <- iris | |
p <- qplot(Sepal.Width, Sepal.Length, data = iris, color = Species) | |
output$ui <- renderUI({ | |
navbarPage( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sortListInput <- function(inputId,data) { | |
tagList( | |
singleton(tags$head(tags$script(src = "js/sortList.js"))), | |
HTML(paste(' | |
<script> | |
$(function() { | |
$( ".sortableList" ).sortable(); | |
$( ".sortableList" ).disableSelection(); | |
}); |