An interdisciplinary research team at the University of California, Berkeley, seeks a programmer to build a scientific computing framework for statistical algorithms as part of a project funded by the National Science Foundation. The successful applicant will implement a Domain-Specific Language, built in R and C++, for programming hierarchical statistical models and algorithms. This position will be supervised by faculty and staff in biology (Perry de Valpine), statistics (Chris Paciorek), and computer science (Ras Bodik). Applicants must have experience implementing language and compiler components, including context-free grammars and abstract syntax trees. They must know how to use closures and tree rewriting to implement a Domain-Specific language. Applicants must have experience with object-oriented programming, C++, and R or a related functional programming language. Knowledge of numerical computational methods would be beneficial. The successful applicant will gain experience with computational s
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
library(rImpactStory) | |
# I precreated this collection via the website | |
# If your impactstory key is not stored in your .rprofile, add it below with key = | |
metrics <- collection_metrics(collection_id = "d4npn7") | |
# From all the fields returned, I just need the metrics | |
data <- metrics[[5]] | |
tabular_data <- llply(data, function(x) { | |
# stars | |
stars_metrics <- data.frame(x$metrics$`github:stars`$values$github) | |
stars_data <- data.frame(count = x$metrics$`github:stars`$values$raw, |
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('pander') | |
library(pander) | |
table_1 <- read.csv("table_1.csv", header = TRUE) | |
# To generate a pandoc friendly table that respects margins, wrap at some character limit | |
# default is 30, use a lower number to make it fit. | |
pandoc.table(table_1, split.cells = 30) |
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
# This is my entry for devtools in my .rprofile | |
options(devtools.desc.author = "Karthik Ram <[email protected]> [aut, cre]") | |
# However, during load_all(), it throws up the following error: | |
> load_all() | |
Loading ropensciDemos | |
Invalid DESCRIPTION: | |
Malformed Authors@R field: | |
<text>:1:9: unexpected symbol |
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
This is the __holy grail__ of metadata infrastructure and ostensibly the primary purpose of EML, see [Jones et al 2006]. Despite that, integration is not actually possible without semantic definitions as well, see [Michener & Jones 2012], from which we adapt this minimal example below. | |
This example provides minimal and sometimes missing semantics; which may make it unresolvable. A complete semantic solution is diagrammed in the figure from [Michener & Jones 2012]. | |
### Dataset 1 | |
```ruby | |
dat = data.frame(river=c("SAC", "SAC", "AM"), | |
spp = c("king", "king", "ccho"), |
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
# First install some packages | |
install.packages("wordcloud") | |
# Next run this in R | |
library(wordcloud) | |
setwd('~/Desktop') | |
words <- structure(list(term = c("effect size", "review (but not systematic)", | |
"synthesis", "meta-anal", "summary", "integration", "nceas", |
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
# Example for Julie | |
# So I read the data in through the script because you didn't give me a file. | |
# If you did, all this would be one line. | |
# example: | |
# df <- read.csv("julies_data.csv", header = T) | |
# Function reads your csv into an object called df. I also noted that it has a header row. | |
df <- read.table(textConnection(" | |
Student Question Response_Option Answer_Match |
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
# Acquiring data from the web | |
# combining 3 APIs | |
library(rgbif) | |
library(taxize) | |
library(rfisheries) | |
# rfisheries | |
# list of species |
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
```{r, echo = FALSE} | |
head(iris[, 1:3]) | |
``` | |
```{r echo = FALSE} | |
install.packages("ggplot2") | |
library(ggplot2) | |
``` |
Notes:
-
I've tried to break up in to separate pieces, but it's not always possible: e.g. knowledge of data structures and subsetting are tidy intertwined.
-
Level of Bloom's taxonomy listed in square brackets, e.g. http://bit.ly/15gqPEx. Few categories currently assess components higher in the taxonomy.