This file contains hidden or 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
| .Rproj.user | |
| .Rhistory | |
| .RData | |
| *.Rproj | |
| *.html |
This file contains hidden or 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) | |
| shinyServer(function(input, output) { | |
| re <- reactive(function(){ | |
| cat("re called\n",file=stderr()) | |
| input$n | |
| }) | |
| output$ntext <- reactiveText(function() { | |
| cat("output$ntext called\n",file=stderr()) |
This file contains hidden or 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) | |
| shinyServer(function(input, output) { | |
| cat('shinyServer called\n',file=stderr()) | |
| output$foo <- reactivePrint(function(){ | |
| cat('output$foo called\n',file=stderr()) | |
| input | |
| }) | |
| runIfVisible <- function(visibleTab,val,expr){ |
This file contains hidden or 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) | |
| shinyServer(function(input, output) { | |
| cat('shinyServer called\n',file=stderr()) | |
| output$foo <- reactivePrint(function(){ | |
| cat('output$foo called\n',file=stderr()) | |
| input$n | |
| }) | |
| output$afunc <- reactivePrint(function() { |
This file contains hidden or 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
| require(lattice) | |
| library(RMySQL) | |
| ## The following functions are in the HH package | |
| panel.ae.dotplot <- | |
| function (x, y, groups, ..., col.AB, pch.AB, lower, upper) | |
| { | |
| panel.num <- panel.number() | |
| if (panel.num == 1) | |
| panel.ae.leftplot(x, y, groups = groups, | |
| col = col.AB, pch = pch.AB, ...) |
This file contains hidden or 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
| require(lattice) | |
| library(RMySQL) | |
| ## The following functions are in the HH package | |
| panel.ae.dotplot <- | |
| function (x, y, groups, ..., col.AB, pch.AB, lower, upper) | |
| { | |
| panel.num <- panel.number() | |
| if (panel.num == 1) | |
| panel.ae.leftplot(x, y, groups = groups, | |
| col = col.AB, pch = pch.AB, ...) |
This file contains hidden or 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
| require(lattice) | |
| ## The following functions are in the HH package | |
| panel.ae.dotplot <- | |
| function (x, y, groups, ..., col.AB, pch.AB, lower, upper) | |
| { | |
| panel.num <- panel.number() | |
| if (panel.num == 1) | |
| panel.ae.leftplot(x, y, groups = groups, | |
| col = col.AB, pch = pch.AB, ...) | |
| if (panel.num == 2) |
This file contains hidden or 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
| toSeconds <- function(x){ | |
| if (!is.character(x)) stop("x must be a character string of the form H:M:S") | |
| if (length(x)<=0)return(x) | |
| unlist( | |
| lapply(x, | |
| function(i){ | |
| i <- as.numeric(strsplit(i,':',fixed=TRUE)[[1]]) | |
| if (length(i) == 3) | |
| i[1]*3600 + i[2]*60 + i[3] |
This file contains hidden or 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(stringr) | |
| library(evaluate) | |
| library(sinartra) | |
| is.pass <- function(x) inherits(x,'pass') | |
| #' Parse route (with parameters) into regular expression. | |
| #' | |
| #' @param route route url. | |
| #' @return | |
| #' \item{match}{regular expression to match route} | |
| #' \item{params}{parameter names} |
This file contains hidden or 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(twitteR) | |
| library(infochimps) | |
| library(datamap) | |
| infochimps('YOUR_API_KEY') | |
| # Creates a new mapper, similar to an OO class | |
| newMapper(type='twitchimps:influence', | |
| # Init is called once during newMap(). Note that |