python ghclone.py
Follow the prompts
Notes
| # Customize BASH PS1 prompt to show current GIT repository and branch. | |
| # by Mike Stewart - http://MediaDoneRight.com | |
| # SETUP CONSTANTS | |
| # Bunch-o-predefined colors. Makes reading code easier than escape sequences. | |
| # I don't remember where I found this. o_O | |
| # Reset | |
| Color_Off="\[\033[0m\]" # Text Reset |
| \documentclass[]{article} | |
| \usepackage{tikz} | |
| \usetikzlibrary{positioning} | |
| \begin{document} | |
| %Graph 1 | |
| \begin{figure} | |
| \caption{Graph 1} | |
| \large{\begin{tikzpicture}[% |
| library(ggplot2) | |
| library(lme4) | |
| library(mvtnorm) | |
| fixed.intercept <- 1 | |
| n.subject <- 10 | |
| n.replicate <- 10 | |
| mean.subject <- c(1, 2, 3, 3, 2, 1) | |
| sd.subject <- 0.1 * diag(length(mean.subject)) | |
| sd.noise <- 0.5 |
| RMDFILE=demo-rmd-pandoc | |
| PANDOC=~/.cabal/bin/pandoc | |
| all: | |
| Rscript -e "require(knitr); require(markdown); knit('$(RMDFILE).rmd', '$(RMDFILE).md'); purl('$(RMDFILE).rmd')" | |
| ${PANDOC} --mathjax --toc -B header.html -A footer.html --bibliography refs.bib --css markdown.css -s $(RMDFILE).md -o $(RMDFILE).html | |
| doInstall <- TRUE | |
| toInstall <- c("Hmisc", "ggplot2", "proxy", "grid") | |
| if(doInstall){install.packages(toInstall, repos = "http://cran.us.r-project.org")} | |
| lapply(toInstall, library, character.only = TRUE) | |
| # Example usage | |
| x <- c(4,6,4,5,6,7) | |
| y <- 1:6 | |
| plot(x, y, "o", pch=20) # bezier() generates smoothed curves from these points | |
| points(bezier(x, y), type="l", col="red") |
| a <- data.frame(id = c(1,2,3,7,9), y1 = rnorm(5)) | |
| b <- data.frame(id = 1:3, y2 = rnorm(3)) | |
| c <- data.frame(id = 1:4, y3 = rnorm(4)) | |
| a | |
| b | |
| c | |
| Reduce(function(x,y){merge(x, y, by.x = "id", by.y = "id", all = TRUE)}, | |
| list(a, b, c), accumulate = FALSE) |
| ## | |
| ## See "Counting with by" for a Stata example | |
| ## http://www.ats.ucla.edu/stat/stata/notes/countn.htm | |
| ## Hadley's version (which I like most) using ave() and seq_along() | |
| mydf <- data.frame(id = c(1,1,1,2,2,2,2,3,3,3), v1 = 1) | |
| mydf | |
| mydf$v2 <- ave(mydf$v1, mydf$id, FUN = seq_along) | |
| mydf | |
| ## Note: No missing values in tvc.start_/tvc.stop_ allowed! | |
| ## 0. Step: Make up some data | |
| ## event: event status | |
| ## start: starting time | |
| ## stop: ending time | |
| ## tvc.start_: starting time of qualitative/categorial TVC | |
| ## tvc.stop_: ending time of qualitative/categorial TVC | |
| df <- data.frame(id=c(1, 2), |
| In R | |
| dfr <- read.table(file="c:/tmp/dataset.csv", sep=",", header=TRUE) | |
| head(dfr) | |
| length(table(dfr$ipnum)) | |
| lmer(ene ~ videocond + ifrelevant + videorelevant + choicenum +(1|ipnum), data=dfr) | |
| > lmer(ene ~ videocond + ifrelevant + videorelevant + choicenum +(1|ipnum), data=dfr) | |
| Linear mixed model fit by REML | |
| Formula: ene ~ videocond + ifrelevant + videorelevant + choicenum + (1 | ipnum) |