Skip to content

Instantly share code, notes, and snippets.

@richfitz
Created February 22, 2013 02:32
Show Gist options
  • Save richfitz/5010286 to your computer and use it in GitHub Desktop.
Save richfitz/5010286 to your computer and use it in GitHub Desktop.
## Follow steps in original post to download files using ghrabber.
## https://github.com/trestletech/rhistory/
## Then load as one big character vector (161828 entries on 21 Feb 2013).
dat <- unlist(lapply(dir("fetched", full=TRUE), readLines))
## Count uses of TRUE / FALSE
length(grep("\\b(TRUE|FALSE)\\b", dat)) # 4389
## and of T / F shortcuts
length(dat[grep("\\b[TF]\\b", dat)]) # 2432
## TRUE and FALSE are used about twice as often as T/F, but that means
## that about a third of cases using T or F.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment