Skip to content

Instantly share code, notes, and snippets.

@imanuelcostigan
imanuelcostigan / ordering.xml
Last active May 5, 2016 10:42
Test XML file
<?xml version="1.0" encoding="utf-8"?>
<!-- # https://github.com/hadley/xml2/issues/79 -->
<Items>
<Item index_0="0" index_1="0">
<Value>1</Value>
</Item>
<Item index_0="0" index_1="1">
<Value>2</Value>
</Item>
</Items>
@imanuelcostigan
imanuelcostigan / setup_library.R
Last active August 29, 2015 14:23
Setup library after fresh install of R
# Make sure devtools is installed
# install.packages("devtools")
# Then source this gist
# devtools::source_gist("bb6b3704f6c45bc50769")
ingesters <- c("readr", "readxl", "haven")
manipulatrs <- c("dplyr", "tidyr", "lubridate")
others <- c("testthat", "ggplot2", "knitr", "yaml", "rmarkdown")
install.packages(c(ingesters, manipulatrs, others))
@imanuelcostigan
imanuelcostigan / keybase.md
Created April 2, 2015 08:15
Keybase verification

Keybase proof

I hereby claim:

  • I am imanuelcostigan on github.
  • I am imanuel (https://keybase.io/imanuel) on keybase.
  • I have a public key whose fingerprint is 4087 0C16 D22B C367 C3F3 5F0D 5193 B04B F7A2 5EF1

To claim this, I am signing this object:

@imanuelcostigan
imanuelcostigan / rro.markdown
Created February 21, 2015 19:34
RRO performance vs base R

Base R

library("microbenchmark")
x <- 1:10
y <- rnorm(10)
microbenchmark(R = approx(x, y, x+0.5))
#> Unit: microseconds
#> expr    min      lq     mean median    uq      max neval
#&gt; R 69.698 85.2985 173.4748 86.277 87.98 8411.178 100
@imanuelcostigan
imanuelcostigan / reference_classes.md
Last active January 1, 2016 21:39
Documenting ReferenceClass generators and their methods

ReferenceClass (RC) documentation

The problem

RC generators should be documented the same way S4 objects are documented. However, there is no convention to documenting RC methods.

Guidance that is available

Generator objects

The documentation of RC generator objects follows the general pattern of S4 classes. The sections or bits automatically generated (using promptClass) for an RC that I have written are: