Exploring the ICD codes between the
icd
package and the
pccc
package.
In general there are R scripts which are used to produce .md files via
knitr::spin()
################################################################################ | |
# file: stirling.R | |
# author: Peter DeWitt | |
# date: 27 Nov 2013 | |
# | |
# purpose: | |
# | |
# 1) stirling2(n, k) returns the Stirling number of the second kind. This is | |
# the number of ways to place n descript objects into k non-nondescript boxes, | |
# non-empty boxes. |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Example of a table with two header rows and one spanning multiple columns</title> | |
</head> | |
<body> | |
<h1> Example of a table with two header rows - year spanning two columns (n and %). </h1> | |
Create a silly example table: |
# My answer to http://stackoverflow.com/questions/25272387 | |
library(ggplot2) | |
library(reshape2) | |
library(dplyr) | |
library(magrittr) | |
library(splines) | |
set.seed(42) |
# Tweet from Erin Jonaitis: | |
# Hey nerds. y[x==1] is shorthand for "elements of y where the corresponding x | |
# is 1." What if I want y[i] such that x[i+e]==1? | |
set.seed(42) | |
# random data for example | |
y <- round(rnorm(30), 2) | |
x <- sample(1:3, size = 30, replace = TRUE) |
# ---------------------------------------------------------------------------- # | |
# file: random-number-images.R | |
# author: Peter DeWitt | |
# | |
# inspired by the work presented at http://boallen.com/random-numbers.html | |
# this file generates several images based on random number generators in R | |
# ---------------------------------------------------------------------------- # | |
# ---------------------------------------------------------------------------- # | |
# libraries | |
# ---------------------------------------------------------------------------- # |
# Example using regular expressions and setting col_types for use with | |
# readr::read_delim | |
# function select_cols | |
# args: | |
# clnms a character vector of column names | |
# rexprs a character vector of regular expressions to search clnms for. These | |
# rexprs select the columns form the .csv | |
# types a character vector of "l", "i", "d", "c" for logical, integer, | |
# double, and character. see documentation for readr for more detail |
library(rmarkdown) | |
library(knitr) | |
render("eqn-numbering.Rmd") |
date | value | |
---|---|---|
1995-01-01 | 100 | |
1995-02-01 | 98.9 | |
1995-03-01 | 97.8 | |
1995-04-01 | 97.9 | |
1995-05-01 | 98.2 | |
1995-06-01 | 104.4 | |
1995-07-01 | 101.1 | |
1995-08-01 | 101.9 | |
1995-09-01 | 103.3 |
# my_extractor.R | |
# | |
# Given an M dimensional array, extract the last index based on prescribed | |
# values of the first M-1 values. | |
# | |
# For example, for a 3D array with indices [x, y, z] write a function that will | |
# extract z as function of x and y. | |
set.seed(42) |