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()
| #!/bin/bash | |
| # requires imagemagick | |
| ######################################################### | |
| # Unzip a large set of NEF, JEPG, and other image files # | |
| # resize and convert to pdf for easy printing # | |
| ######################################################### | |
| # unzip the compressed zip achieves | |
| for i in *.zip; |
| # objective - plot circles and polygons such that | |
| # 0. A circle | |
| # 1. An equilateral triangle such that the edges are tangent to the circle | |
| # 2. A circle such that the vertices of the triangle are on the circumference | |
| # 3. A square with edges tangent to the circle drown in step 2. | |
| # 4. A circle with the vertices of the square on the circumference | |
| # 5. A regular pentagon.... | |
| # | |
| # A vertex of the regular polygons will all be co-linear. That is, with the | |
| # initial circle centered at the Cartesian point (0, 0), then on vertex for each |
| library(ggplot2) | |
| library(magrittr) | |
| library(parallel) | |
| # Padovan Sequence | |
| # 1, 1, 1, 2, 2, 3, 4, ... | |
| padovan <- function(n) { | |
| n <- floor(n) | |
| if (n <= 3) stop("n needs to be an integer greater than 3") |
| #!/bin/bash | |
| HOST=git.neptuneinc.org | |
| REMOTEUSER=pdewitt | |
| KEY=/home/$USER/.ssh/id_rsa.pub | |
| ssh -l $REMOTEUSER $HOST mkdir -p .ssh | |
| cat $KEY | ssh -l $REMOTEUSER $HOST 'cat >> .ssh/authorized_keys' | |
| ssh -l $REMOTEUSER $HOST "chmod 700 .ssh; chmod 640 .ssh/authorized_keys" |
| # 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) |
| 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 |
| library(rmarkdown) | |
| library(knitr) | |
| render("eqn-numbering.Rmd") |
| # 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 |
| # ---------------------------------------------------------------------------- # | |
| # 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 | |
| # ---------------------------------------------------------------------------- # |