Keybase proof
I hereby claim:
- I am andrie on github.
- I am apdevries (https://keybase.io/apdevries) on keybase.
- I have a public key ASDOCA6xxvGsbQQS_v860hBzhtmtZ2Jf-sscY3X2a2kl5wo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
# Original blog post | |
# https://fronkonstin.com/2019/01/10/rcpp-camaron-de-la-isla-and-the-beauty-of-maths/ | |
# For this example to work, you must have a conda environment with the datashader library | |
# See http://datashader.org/getting_started/index.html#installation for installation instructions | |
library(Rcpp) | |
library(reticulate) | |
library(dplyr) | |
use_condaenv("datashader", required = TRUE) |
# load the package ---------------------------------------------------- | |
# install.packages("secret") | |
library(secret) | |
library(magrittr) | |
# set up local user --------------------------------------------------- |
library(segmented) | |
library(Ecdat) | |
library(ggplot2) | |
data("CRANpackages") | |
str(CRANpackages) | |
CRANpackages$Version <- as.character(CRANpackages$Version) | |
CRANpackages <- rbind(CRANpackages, | |
data.frame(Version = "3.2", |
# Instructions for using miniCRAN to create a package repository for installing packages on SQL Server 2016 | |
# | |
# 1. Create a local repository on a machine connected to the Internet | |
# 2. Copy the miniCRAN repository to the target machine | |
# 3. Install the packages on the target machine |
# Scrapes CRAN archives to determine the number of packages per release | |
# Create a list of pages to scrape, including both archive and current | |
extract_url <- function(){ | |
url <- list( | |
archive = "https://cran-archive.r-project.org/bin/windows/contrib/", | |
active = "https://cran.r-project.org/bin/windows/contrib/" | |
) | |
get_urls <- function(url){ |
library(ggplot2) | |
dat <- read.csv("world records.csv", stringsAsFactors = FALSE) | |
# Clean and transform the data -------------------------------------------- | |
track <- within(dat, { | |
Time <- as.numeric(Time.in.hours) | |
Date <- as.Date(Date, format = "%d-%b-%y") | |
Speed <- Distance / Time | |
logDistance <- log10(Distance) |
# Install from github ---------------- | |
# install.packages(c("chron", "ggplot2", "dplyr", "stringi")) | |
# devtools::install_github("trinker/wakefield") | |
# Create a sample data frame --------- | |
library(wakefield) | |
r_data_frame( | |
n = 500, | |
id, |
library(magrittr) | |
library(dplyr) | |
library(tidyr) | |
library(ggplot2) | |
set.seed(1) | |
dat <- r_data_frame(12, | |
name, | |
r_series(grade, 100, relate = "+1_6") | |
) |
library(parallel) | |
set.seed(1) | |
m <- 10000 | |
n <- 2000 | |
A <- matrix(runif (m*n),m,n) | |
setMKLthreads(1) | |
system.time(S <- svd (A,nu=0,nv=0)) | |
# user system elapsed |