Skip to content

Instantly share code, notes, and snippets.

View agwells's full-sized avatar

Aaron Wells agwells

View GitHub Profile
@agwells
agwells / r-random-grades.R
Last active November 1, 2017 09:05
Generating a skewed bell curve of random data in R
minVal <- 0
maxVal <- 100
medVal <- 70
numRows <- 1000000
adjMax <- maxVal - minVal
adjMed <- medVal - minVal
# Generate a vector that sets how likel
# each value is to be chosen.
@agwells
agwells / r-style-help-in-bash.sh
Last active October 12, 2017 23:57
Use R-style "?CMD" to pull up man pages in Bash
# Add the following to your ~/.bashrc file.
#
# I was inspired to do this because, after learning R and getting
# used to doing e.g. "?install.packages" when I wanted a reminder
# of the parameters list for a function, I kept accidentally trying
# to use the question mark to pull up help in Bash as well, e.g.
# "?grep" instead of "man grep"
# R-style help lookup, by doing "?CMD" for "man CMD"
# or "??CMD" for "man -K CMD"