1. Error: clickSelects 300 makes 300 <circle> elements --------------------------
Summary: InvalidElementState
Detail: An element command could not be completed because the element is in an invalid state (e.g. attempting to click a disabled element).
class: org.openqa.selenium.InvalidElementStateException
1: clickHTML(id = 300) at test-interactivity.R:77
2: remDr$mouseMoveToLocation(webElement = e) at test-interactivity.R:71
3: queryRD(paste0(serverURL, "/session/", sessionInfo$id, "/moveto"), "POST", qdata = sendLoc)
4: checkStatus()
5: stop(errMessage, call. = FALSE)
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
<mariokart> | |
<driver name="Bowser" occupation="Koopa"> | |
<vehicle model="Wario Bike"> | |
<stats> | |
<speed>40</speed> | |
<weight>60</weight> | |
<drift>25</drift> | |
</stats> | |
</vehicle> | |
<vehicle model="Piranha Prowler"> |
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(knitr); knit2pdf("qplot.Rnw") | |
processing file: qplot.Rnw | |
|.. | 2% | |
ordinary text without R code | |
|... | 5% | |
label: r setup (with options) |
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(mgcv) | |
library(animint) | |
library(dplyr) | |
# load the model and data from this post: | |
# http://baseballwithr.wordpress.com/2014/10/23/a-probabilistic-model-for-interpreting-strike-zone-expansion-7/ | |
load("~/pitchfx/model2.rdata") | |
load("~/pitchfx/dat2.rdata") | |
# make predictions over a (somewhat) arbitrary grid | |
grid <- expand.grid(px = seq(-2, 2, by = 0.5), pz = seq(0.7, 4.2, by = 0.5), |
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
<mariokart> | |
<driver name="Bowser" occupation="Koopa"> | |
<vehicle speed="55" weight="25"> Wario Bike </vehicle> | |
<vehicle speed="40" weight="67"> Piranha Prowler </vehicle> | |
</driver> | |
<driver name="Peach" occupation="Princess"> | |
<vehicle speed="54" weight="29"> Royal Racer </vehicle> | |
<vehicle speed="50" weight="34"> Wild Wing </vehicle> | |
</driver> | |
</mariokart> |
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
[ | |
{ | |
"driver": "Bowser", | |
"occupation": "Koopa", | |
"vehicles": [ | |
{ | |
"model": "Wario Bike", | |
"speed": 55, | |
"weight": 25 | |
}, |
mario <- jsonlite::fromJSON("http://bit.ly/mario-json")
(1) Just tidyr
mario[, c("driver", "occupation")]
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(XML) | |
library(RSelenium) | |
pJS <- phantom() | |
Sys.sleep(5) # give the binary a moment | |
remDr <- remoteDriver(browserName = 'phantomjs') | |
remDr$open(silent = TRUE) | |
remDr$navigate("http://www.cbssports.com/collegebasketball/gametracker/live/NCAAB_20140407_UK@UCONN") | |
src <- remDr$getPageSource()[[1]] | |
doc <- htmlParse(src, asText = TRUE) |
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
d3 = function() { | |
var d3 = { | |
version: "3.2.7" | |
}; | |
if (!Date.now) Date.now = function() { | |
return +new Date(); | |
}; | |
var d3_document = document, d3_documentElement = d3_document.documentElement, d3_window = window; | |
try { | |
d3_document.createElement("div").style.setProperty("opacity", 0, ""); |
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
d3 = function() { | |
var d3 = { | |
version: "3.2.7" | |
}; | |
if (!Date.now) Date.now = function() { | |
return +new Date(); | |
}; | |
var d3_document = document, d3_documentElement = d3_document.documentElement, d3_window = window; | |
try { | |
d3_document.createElement("div").style.setProperty("opacity", 0, ""); |