Skip to content

Instantly share code, notes, and snippets.

View R on Bede
#!/bin/bash
# Script for installing R 3.6.3 on Bede
#
# The require dependancies are
# * bzip2
# * curl
# |-> openssl
# * pcre
# * xz
# * R
View logistic.json
{
"version": "0.2.0",
"config": {
"base": "odin",
"include": []
},
"meta": {
"internal": "internal",
"user": "user",
"state": "state",
@richfitz
richfitz / Dockerfile
Created Feb 11, 2019
Create a really old version of R
View Dockerfile
FROM yamamuteki/debian-etch-i386
RUN apt-get update && apt-get install -y \
build-essential \
gfortran \
less \
wget
RUN wget http://cran.r-project.org/src/base/R-1/R-1.8.0.tgz && \
tar -zxvf R-1.8.0.tgz
RUN cd R-1.8.0 && \
./configure && \
View keybase.md

Keybase proof

I hereby claim:

  • I am richfitz on github.
  • I am richfitz (https://keybase.io/richfitz) on keybase.
  • I have a public key ASDSmLr0l6hCM-au6sVjf8C1QLSgSd_5Gf9fxVuOVFOmFwo

To claim this, I am signing this object:

View extract_variables.R
find_symbols <- function(expr) {
functions <- variables <- character(0)
f <- function(e) {
if (!is.recursive(e)) {
if (!is.symbol(e)) { # A literal of some type
return()
}
variables <<- c(variables, deparse(e))
} else {
View kitten
#' Download kittens from the internet
#'
#' This is the details section
#'
#' @title Download kittens
#' @param width Width of the kitten, in pixels
#' @param height Height of the kitten, in pixels
#' @param destfile Place to download the kitten to. \code{\link{tempfile}()} makes a good place
#' @param ... Additional arguments passed through to \code{\link{download.file}}
#'
View fish.eps
%!PS-Adobe-3.0 EPSF-3.0
%%Creator: cairo 1.10.2 (http://cairographics.org)
%%CreationDate: Fri Apr 18 22:50:20 2014
%%Pages: 1
%%BoundingBox: 0 -1 482 191
%%DocumentData: Clean7Bit
%%LanguageLevel: 2
%%EndComments
%%BeginProlog
/cairo_eps_state save def
View read_other_peoples_excel.R
parse_col <- function(x) {
d <- strsplit(x, NULL)
f <- function(x) {
sum(match(x, LETTERS) * 26^(seq_along(x) - 1L))
}
vapply(d, f, numeric(1))
}
inspect_xlsx <- function(path, sheet) {
tmp <- tempfile()
View Dockerfile
FROM stateline
# Python dependencies for the example:
RUN apt-get update && apt-get install -y \
python \
python-dev \
python-matplotlib \
python-numpy \
python-pip && \
pip install \
pyzmq \
@richfitz
richfitz / functions.R
Last active Aug 29, 2015
mclapply -> rrqlapply
View functions.R
use <- function(x, default){
if(is.null(x))
default
else
x
}
sim_fkf <- function(fit){
n <- fit[["n"]]
dt <- fit[["dt"]]
You can’t perform that action at this time.