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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://trifacta.github.io/vega/lib/d3.v3.min.js"></script> | |
<script src="http://trifacta.github.io/vega/vega.js"></script> | |
</head> | |
<body> | |
<script type="text/javascript"> | |
var iris_spec = { |
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
String collection speed tests | |
======================================================== | |
Source for this document at https://gist.github.com/wch/9233873 | |
What's the fastest way to collect strings together in R and put them into a single output string? Probably the fastest way is to simply use `paste0('string1', 'string2')`, and so on -- but this assumes that you have all the strings collected and ready at one time. In many cases, this isn't possible, and you need to collect the strings together as you go. | |
This document contains benchmarks for different ways of collecting strings together. Some highlights: | |
* `textConnection` is super slow. |
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
================================== | |
R version 3.0.3 (2014-03-06) | |
Platform: x86_64-apple-darwin10.8.0 (64-bit) | |
locale: | |
[1] C/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 |
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
Type: Shiny | |
Title: Vertical Layout | |
License: MIT | |
Author: Winston Chang <winston@rstudio.com> | |
AuthorUrl: http://www.rstudio.com/ | |
Tags: vertical-layout | |
DisplayMode: Showcase | |
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
Type: Shiny | |
Title: submitButton demo | |
License: MIT | |
Author: Winston Chang <winston@rstudio.com> | |
AuthorUrl: http://www.rstudio.com/ | |
Tags: submitbutton | |
DisplayMode: Showcase |
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
Type: Shiny | |
Title: isolate demo | |
License: MIT | |
Author: Winston Chang <winston@rstudio.com> | |
AuthorUrl: http://www.rstudio.com/ | |
Tags: isolate | |
DisplayMode: Showcase |
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
Type: Shiny | |
Title: Observer demo | |
License: MIT | |
Author: Winston Chang <winston@rstudio.com> | |
AuthorUrl: http://www.rstudio.com/ | |
Tags: observer | |
DisplayMode: Showcase |
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
Type: Shiny | |
Title: navlistPanel example | |
License: MIT | |
Author: Winston Chang <winston@rstudio.com> | |
AuthorUrl: http://www.rstudio.com/ | |
Tags: navlistpanel | |
DisplayMode: Showcase |
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
Class6 <- function(...) { | |
structure(list(...), class = "Class6") | |
} | |
# Methods for the class | |
Class6_methods <- list( | |
sum_xy = function(self) { | |
self$x + self$y | |
}, | |
inc_x = function(self, amount = 1) { |
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) | |
# Reactives with no changes (after first) | |
v <- reactiveValues(x = 0) | |
r0 <- reactive(1) # 0 levels of dependence | |
r1 <- reactive(v$x) # 1 level | |
r2 <- reactive(r1()) # 2 levels | |
# Reactives with change | |
vc <- reactiveValues(x = 0) |
OlderNewer