This file contains 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
stat_bin_step <- function(mapping = NULL, data = NULL, | |
geom = "step", position = "stack", | |
..., | |
binwidth = NULL, | |
bins = NULL, | |
center = NULL, | |
boundary = NULL, | |
breaks = NULL, | |
closed = c("right", "left"), | |
pad = FALSE, |
This file contains 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
find . -name "*.odc" -exec sh -c '/Users/rjbg/Documents/Work/src/odcread/odcread {} > {}.txt; rm {}' \; |
This file contains 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
1. Download and compile Gert van Valkenhoef's excellent odcread | |
https://github.com/gertvv/odcread | |
This require "iconv" | |
2. Add the lines below to you ~/.gitconfig | |
3. Add the lines below to the .gitattributes file in the git repository |
This file contains 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
# Basic operation of structmcmc. See https://github.com/rbtgde/structmcmc | |
# Setup data frame | |
x1 <- rnorm(20) | |
x2 <- rnorm(20) | |
x3 <- rnorm(20) | |
x <- matrix(c(x1, x2, x3), ncol = 3) | |
net <- bn(integer(0), 1, 2) | |
# Draw samples from the posterior using MC^3. |
This file contains 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
# A `bn` object is created by specifying the parents of each node. | |
x <- bn(c(2), c(), c(1, 2)) | |
grplot(x) | |
# Adjacency matrices can be converted to a `bn` using `as.bn`. | |
adj <- matrix(c(0, 0, 1, 1, 0, 0, 0, 0, 0), 3, 3) | |
x <- as.bn(adj) | |
grplot(x) | |
# Properties of a `bn` |
This file contains 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
def document(package) | |
rload = 'load(".RData")' | |
rdoc = "document(\"#{package}\")" | |
rsave = 'save.image()' | |
system "Rscript -e '#{rload}; #{rdoc}; #{rsave}'" | |
end | |
def build(package) | |
system "R CMD build #{package}" | |
end |
This file contains 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
# Basic operation of structmcmc. See https://github.com/rbtgde/structmcmc | |
# Setup data frame | |
x1 <- factor(c("a", "a", "g", "c", "c", "a", "g", "a", "a")) | |
x2 <- factor(c(2, 2, 4, 3, 1, 4, 4, 4, 1)) | |
x3 <- factor(c(FALSE, FALSE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, TRUE)) | |
x <- data.frame(x1 = x1, x2 = x2, x3 = x3) | |
# Draw samples from the posterior using MC^3. | |
set.seed(1234) |
This file contains 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
# Latex files | |
*.aux | |
*.glo | |
*.idx | |
*.log | |
*.toc | |
*.ist | |
*.acn | |
*.acr |