Skip to content

Instantly share code, notes, and snippets.

View jeroen's full-sized avatar

Jeroen Ooms jeroen

View GitHub Profile
@jeroen
jeroen / test-katex.Rmd
Last active July 13, 2021 19:10 — forked from jmcastagnetto/test-katex.Rmd
Testing the rOpenSci {katex} package
---
title: "Testing rOpenSci katex"
author: "Jesus M. Castagnetto, Jeroen Ooms"
date: "2021-07-12"
output:
html_document:
mathjax: null
---
```{r setup, include=FALSE}
@jeroen
jeroen / libpng_test.c
Created December 27, 2015 19:34 — forked from niw/libpng_test.c
How to read and write PNG file using libpng. Covers trivial method calls like png_set_filler.
/*
* A simple libpng example program
* http://zarb.org/~gc/html/libpng.html
*
* Modified by Yoshimasa Niwa to make it much simpler
* and support all defined color_type.
*
* To build, use the next instruction on OS X.
* $ brew install libpng
* $ clang -lz -lpng15 libpng_test.c
@jeroen
jeroen / lm.R
Last active August 29, 2015 14:15 — forked from timelyportfolio/Readme.md
Linear regression in JavaScript using simple statistics
# Load in simple statistics
library(V8)
ct <- new_context("window")
ct$source("https://raw.githubusercontent.com/tmcw/simple-statistics/master/src/simple_statistics.js")
# Run Regression
ct$assign("mydata", cbind(mtcars$wt, mtcars$mpg))
ct$eval("var lm = ss.linear_regression().data(mydata)")
ct$get("[ lm.b(), lm.m() ]")
@jeroen
jeroen / simplified.geojson
Last active August 29, 2015 14:15 — forked from timelyportfolio/code.R
V8 example with turf.js
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jeroen
jeroen / escape_chars.R
Last active August 29, 2015 14:06 — forked from wch/escape_chars.R
#' @useDynLib nameOfPackage C_escape_chars
deparse_vector3 <- function(x) {
.Call(C_escape_chars, x)
}