Skip to content

Instantly share code, notes, and snippets.

# This file contains two functions:
# - combine.samples (used by par.trace.samples)
# - par.trace.samples
# and an example at the bottom.
## Author: Mikhail Popov (mikhail [at] mpopov.com)
# install.packages("rjags") # JAGS must be installed on system
# install.packages("doMC") # Unix only
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
setwd('~/Downloads')
dat <- read.csv('VennDiagrams2-data.csv', stringsAsFactors=F)
for(u in c('visited','joined')){
dat[[u]] <- as.Date(dat[[u]])
}
library(plyr)
library(reshape2)
library(chron)
dat$monthly = paste(months(as.chron(dat$visited)), years(as.chron(dat$visited)))
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.