Two-sex demographic models in R

Tom Miller (a prof here at Rice) and Brian Inouye have a paper out in Ecology (paper, appendices) that confronts two-sex models of dispersal with empirical data. They conducted the first confrontation of two-sex demographic models with empirical data on lab populations of bean beetles Callosobruchus. Their R code for the modeling work is available at Ecological Archives (link here). Here is a figure made from running the five blocks of code in ‘Miller_and_Inouye_figures.txt’ that reproduces Fig. 4 (A-E) in their Ecology paper (p = proportion female, Nt = density). Nice! ...

October 26, 2011 · 1 min · Scott Chamberlain

New food web dataset

So, there is a new food web dataset out that was put in Ecological Archives here, and I thought I would play with it. The food web is from Otago Harbour, an intertidal mudflat ecosystem in New Zealand. The web contains 180 nodes, with 1,924 links. Fun stuff… igraph, default layout plot igraph, circle layout plot, nice My funky little gggraph function plotget the gggraph function, and make it better, here at Github

October 14, 2011 · 1 min · Scott Chamberlain

Phylogenetic community structure: PGLMMs

So, I’ve blogged about this topic before, way back on 5 Jan this year. Matt Helmus, a postdoc in the Wootton lab at the University of Chicago, published a paper with Anthony Ives in Ecological Monographs this year (abstract here). The paper addressed a new statistical approach to phylogenetic community structure. As I said in the original post, part of the power of the PGLMM (phylogenetic generalized linear mixed models) approach is that you don’t have to conduct quite so many separate statistical tests as with the previous null model/randomization approach. ...

October 13, 2011 · 1 min · Scott Chamberlain

R talk on regular expressions (regex)

Regular expressions are a powerful in any language to manipulate, search, etc. data. For example: > fruit <- c("apple", "banana", "pear", "pineapple") > fruit [1] "apple" "banana" "pear" "pineapple" > grep("a", fruit) # there is an "a" in each of the words [1] 1 2 3 4 > > strsplit("a string", "s") # strsplit splits the string on the "s" [[1]] [1] "a " "tring" R base has many functions for regular expressions, see slide 9 of Ed’s talk below. The package stringr, created by Hadley Wickham, is a nice alternative that wraps the base regex functions for easier use. I highly recommend stringr. ...

October 6, 2011 · 1 min · Scott Chamberlain

R tutorial on visualizations/graphics

Rolf Lohaus, a Huxley postdoctoral fellow here in the EEB dept at Rice University, gave our R course a talk on basic visualizations in R this morning. Enjoy!

September 30, 2011 · 1 min · Scott Chamberlain

My take on an R introduction talk

UPDATE: I put in an R tutorial as a Github gist below. Here is a short intro R talk I gave today…for what it’s worth… R Introduction View more presentations from schamber Here’s the tutorial in a GitHub gist: https://gist.github.com/1208321

September 9, 2011 · 1 min · Scott Chamberlain

rnpn: An R interface for the National Phenology Network

The team at rOpenSci and I have been working on a wrapper for the USA National Phenology Network API. The following is a demo of some of the current possibilities. We will have more functions down the road. Get the publicly available code, and contribute, at Github here. If you try this out look at the Description file for the required R packages to run rnpn. Let us know at Github (here) or at our website http://ropensci.org/, or in the comments below, or on twitter (@rOpenSci), what use cases you would like to see with the rnpn package. ...

August 31, 2011 · 2 min · Scott Chamberlain

Tenure track position in systematics at the University of Vermont

There is an awesome position opening up for an assistant professor in systematics at the University of Vermont. Below is the announcement, and see the original post at the Distributed Ecology blog. Why is this related to R? One can do a lot of systematics work in R, including retrieving scientific collections data through an upcoming package handshaking with VertNet (part of the rOpenSci project), managing large data sets, retrieval of GenBank data through the ape package (see fxn read.genbank), phylogenetic reconstruction and analysis, and more. So I am sure a systematist with R ninja skills will surely have a head up on the rest of the field. ...

August 22, 2011 · 3 min · Scott Chamberlain

(#ESA11) rOpenSci: a collaborative effort to develop R-based tools for facilitating Open Science

Our development team would like to announce the launch of rOpenSci. As the title states, this project aims to create R packages to make open science more available to researchers. http://ropensci.org/ What this means is that we seek to connect researchers using R with as much open data as possible, mainly through APIs. There are a number of R packages that already do this (e.g., infochimps, twitteR), but we are making more packages, e.g., for Mendeley, PLoS Journals, and taxonomic sources (ITIS, EOL, TNRS, Phylomatic, UBio). ...

August 8, 2011 · 1 min · Scott Chamberlain

CRdata vs. Cloudnumbers

Cloudnumbers and CRdata are two new cloud computing services. I tested the two services with a very simple script. The script simply creates a dataframe of 10000 numbers via rnorm, and assigns them to a factor of one of two levels (a or b). I then take the mean of the two factor levels with the aggregate function. ...

July 14, 2011 · 2 min · Scott Chamberlain