R: A Language and Environment for Statistical Computing, R Core Team, R Foundation for Statistical Computing, Vienna, Austria, 2013, http://www.R-project.org/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| install.packages("kst") | |
| library(kst) | |
| ksta <- kstructure(set(set(), set("a"), set("b"), set("a","b"), | |
| set("a","d"), set("b","c"), set("a","b","c"), set("a","b","d"), | |
| set("b","c","d"), set("a","b","c","d"), set("a","b","c","d","e"))) | |
| lpath(ksta) | |
| kst <- endorelation(graph=set(tuple(1,1), tuple(2,2), tuple(3,3), | |
| tuple(4,4), tuple(2,1), tuple(3,1), tuple(4,1), | |
| tuple(3,2), tuple(4,2))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| doInstall <- TRUE | |
| toInstall <- c("ggplot2", "poLCA", "reshape2") | |
| if(doInstall){install.packages(toInstall, repos = "http://cran.us.r-project.org")} | |
| lapply(toInstall, library, character.only = TRUE) | |
| ANES <- read.csv("http://www.oberlin.edu/faculty/cdesante/assets/downloads/ANES.csv") | |
| ANES <- ANES[ANES$year == 2008, -c(1, 11, 17)] # Limit to just 2008 respondents, | |
| head(ANES) # remove some non-helpful variables | |
| # Adjust so that 1 is the minimum value for each variable: | |
| ANES <- data.frame(apply(ANES, 2, function(cc){ cc - min(cc, na.rm = T) + 1 })) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ############################################################################ | |
| #BACKLOG | |
| ############################################################################ | |
| ### | |
| ### | |
| ### | |
| ### | |
| ############################################################################ | |
| #SETTING ENVIRONMENT | |
| ############################################################################# |
As partially described in previous sections, we followed a reproducible research protocol along the lines previously described by our group (Vissoci, 2013). Briefly, all data sets, scripts, templates, software and workflows generated under this project were deposited under the public repositories Github and figshare. For access to the specific data for this project please refer to
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| title : | |
| subtitle : | |
| author : | |
| job : | |
| framework : io2012 # {deckjs, shower, dzslides, landslide, html5slides, ...} | |
| highlighter : highlight.js # {highlight.js, prettify, highlight} | |
| hitheme : tomorrow # | |
| widgets : [] # {mathjax, quiz, bootstrap} | |
| mode : standalone # {, draft, selfcontained} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # options http://goo.gl/2JGwlX | |
| Models | |
| ```{r, eval:TRUE, cache=TRUE, results=asis, warning=FALSE, error=TRUE, message=FALSE, include=FALSE, tidy=TRUE} | |
| summary(cars) | |
| ``` | |
| Plots | |
| ```{r, fig.width=7, fig.height=6} | |
| plot(cars) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| setwd("~/Desktop") | |
| require(devtools) | |
| # pkgs = c('slidify', 'slidifyLibraries') | |
| # install_github(pkgs, 'ramnathv', ref = 'dev') | |
| library(slidify) | |
| library("slidifyLibraries") | |
| author("") | |
| slidify("index.Rmd") | |
| publish(user = "USER", repo = "REPO") |