Monday, November 12, 2012

Australopithecus bahrelghazali: cow-man of the Pliocene?

Following on the recent announcement that Paranthropus boisei was eating lots of grass and/or some other kind of C4 resources by the Pleistocene, we now have isotopic evidence that Australopithecus bahrelghazali was eating a diet with a similar isotopic composition by about 3 million years ago in north-central Africa (Chad).  Keep in mind that that the Chadian australopith is gracile, similar to A. afarensis, so it lacked the mega-chewing apparatus of P. boisei

It remains to be seen what kind of C4 resources A. bahrelghazali was could be grass leaves and stems, or maybe the carbohydrate rich tubers and corms of many sedges.  Dental microwear data  should help to resolve this.  

Any way you slice it, it is clear that early hominin diets were diverse....much more diverse than we have previously appreciated. 

Monday, October 22, 2012

Beautiful Visualization of Tree of Life

OneZoom tree zoomed into the primates.

I just discovered this awesome new web project to visualize the tree of life. It is called OneZoom, and it provides a beautiful way to see the tree of life all at once.  It is like google maps in that at broad zoom levels it shows very little detail, but as you zoom in on a clade, it gives you more and more detail.  At the species level, it gives you conservation details, plus a link to the wikipedia page to learn more.  What a great tool for teaching primate systematics! Or any other systematics for that matter.

Species level entry

Tuesday, October 16, 2012

An R Book for the Rest of Us

R for Dummies is here!  Initial reviews are very positive for this book (I haven't gotten it yet).  I am very hopeful though, because the word on the street is that it doesn't assume you have any programming knowledge or much statistical knowledge, and that it provides you with the tools you need to start tackling concrete problems.

Shameless commerce disclosure: I will receive a small percentage of the purchase price if you use the above link. 

Sunday, September 30, 2012

Plot R Data With googleVis

Here is a little code snippet that shows how to do two things

  1. Use the Google Maps API to resolve place names into lat-long coordinate pairs.
  2. Plot R dataframes that contain lat-long data (for example from #1) onto Google Maps for quick visualization using the googleVis package.  The embedded map looks a little wonky here but it looks perfectly normal when you plot it locally in your browser. (Note: you need an internet connection for these maps to plot properly). 
Data: plotData • Chart ID: MapID71b85742e7
R version 2.14.1 (2011-12-22) • googleVis-0.2.15Google Terms of UseData Policy
####functions borrwed from
getDocNodeVal=function(doc, path)
   sapply(getNodeSet(doc, path), function(el) xmlValue(el))
  doc = xmlTreeParse(u, useInternal=TRUE)
  str=gsub(' ','%20',str)
  lat=getDocNodeVal(doc, "/GeocodeResponse/result/geometry/location/lat")
  lng=getDocNodeVal(doc, "/GeocodeResponse/result/geometry/location/lng")
  list(lat = lat, lng = lng)
#### End functions borrowed from
# get some names of paleoanthropological sites in France. 
placeNames<-c("Cro Magnon","La Ferrassie","Chauvet Cave","La Chapelle aux Saints", "Le Moustier")
#resolve the placenames into latlong
latLong<-lapply(placeNames, FUN=gGeoCode)
#format the latlong coordinates into the proper format lat:long
#create a dataframe, formatting the place name string first and making the latlong a vector, not list
sites<-gvisMap(plotData,locationvar="latlong",tipvar="name", options=list(mapType='normal'))
Created by Pretty R at

Wednesday, June 27, 2012

A. sediba ate like a giraffe

Amanda Henry and colleageus report in Nature on the diet of Australopithecus sediba.  The results are somewhat surprising, with carbon isotope values indicating an almost exclusively C3 diet (trees, leaves,  fruit, bark etc), even thought A. sediba lived in an environment with plentiful C4 resources (grasses and sedges).  Dental microwear complexity analyses indicate some hard object feeding, consistent with that seen in P. robustus. Finally, taxonomic identification of the plant phytoliths preserved in the dental calculus of one of the specimens supports a diet including fruit and bark.  

These results are somewhat surprising given that most other early hominins had a diet with considerably more C4 resources.  A. sediba continues to be weird and interesting, and adds new evidence that early hominin diets were more diverse than we have previously acknowledged

Full Citation:
Henry, AG et al. (2012). The diet of Australopithecus sediba Nature DOI: 10.1038/nature11185

Monday, June 25, 2012

Fossil ears and ancient primate locomotion

Ryan and colleages report in the Preceedings of the Royal Society B on a large study of fossilized inner ears of primates. In particular this study examined the size of the semicircular canals, part of the vestibular apparatus. This portion of the inner ear consists of three fluid filled tubes that are oriented at right angles to one another.  The brain detects the movement of fluid through these canals, and this is a crucial part of how critters (ourselves included) detect angular rotation and maintain balance during locomotion.  

The relative size of these canals is related to locomotor agility. Fast moving, agile critters tend to have larger semicircular canals. These bony tubes often get preserved as fossils, and with the help of CT scanning technology, they can be imaged and measured. This data helps illuminate the locomotor style of extinct primates, even those with no post-cranial fossils preserved. Ryan and colleagues offer locomotor agility reconstructions for 17 fossil anthropoids (the group that includes monkeys and apes - including humans humans). This study reveals three major aspects of primate locomotor agility.  First, that the earliest anthropoids were slow and not very agile. Second, that New World monkeys from the Miocene are notable for being much more agile than earlier anthropoids.  Finally, this study suggests that the earliest Old World monkeys were relatively agile, even though later Miocene descendants were relatively slow. 

Cast of semicircular canal of Aegypopithecus zeuxis. Ryan et al. ,2012  Figure 1.

Full Citation:
Ryan et al. (2012). Evolution of locomotion in Anthropoidea: the semicircular canal evidence Proceedings of the Royal Society B DOI: 10.1098/rspb.2012.0939

Wednesday, May 30, 2012

Send emails with attachments from R command line

The sendmailR package makes it easy to send emails with attachments from the R command line. 

#load package

#use string formatting and your system info to format FROM address
from <- sprintf("<Project1@%s>",[4])
to <- "<>"
subject <- "Test Email From R"
#create list with text of body as first element
#second list element is R object to attach using the mime_part() function
body <- list("Email sent from R. Dataframe attached.",mime_part(data.frame(x=rnorm(1000),y=rnorm(1000)),name="output"))

sendmail(from, to, subject, body, control=list(smtpServer="ASPMX.L.GOOGLE.COM"))

Why would you want to do this, you ask?  Suppose you are doing some lengthy simulations and you need to do other things while they are running.  Just code up an email to be sent alerting you when they are finished. 

It is also a nice way to export data computed during an R session by sending it to your webmail account.  You can change the from address from Project1 (as in example code above) to something more meaningful for a specific project, then set up an email filter to organize your output emails.  The useful possibilities are numerous.

Wednesday, May 23, 2012

Yellowstone Elk Bones Reflect Spatial Landuse

Good news for fossil folks! Something that keeps people like me awake at night is pondering the degree to which the spatial patterning of fossils on the landscapes where we find them are meaningful.  This is because in order to reconstruct past environments from fossils, we have to assume (at least to some degree) that the spatial provenience of fossils contains information about where the individual animals lived (even though we know that bones get moved around after death by many biologic and geologic processes),

Modern hyaena bone accumlation on landscape in Dikika - Ethiopia

In an article in preview in the journal Ecology, Joshua Miller reports the results of a study in which he analyzed the distribution of elk skeletal remains (shed antlers and neonate remains) across Yellowstone National Park. The spatial distribution of shed antlers was as good at predicting bull elk geographic use as aerial surveys, and neonate bones were great predictors of known calving areas. This study demonstrates that these large ungulates tend to die where they lived, and that the spatial patterning of their skeletal remains is a high fidelity proxy for their land use patterns. Good news!

Full Citation:
Miller, J. (2012). Spatial fidelity of skeletal remains: Elk wintering and calving grounds revealed by bones on the Yellowstone landscape Ecology DOI: 10.1890/12-0272.1

Wednesday, May 16, 2012

Quickly Visualize Your Whole Dataset

The tabplot package makes it extremely easy to visualize an entire data table with a single command. This is useful for exploratory analysis, to get a sense of how your data are structured. A quick example with the diamonds dataset from the ggplot2 package.

#load required packages
# import data set
# make the plot

plot of chunk unnamed-chunk-2

The result of tableplot() is a nice figure with all continuous variables as barcharts, and each categorical variable as a stacked barchart, showing the relative proportions for that category. Default binwitdh can be changed with the nBins = 100 argument, and you can change which column everything is sorted by by changing the sortCol = 1 argument.

The default plot is pretty informative here though. For instance….it is clear that carat is highly correlated with price, and with the x,y,z dimensions of the diamond. Also, it is clear that the diamonds with the highest clarity ratings (like VVS2 and VVS1) are much more common at the lower carat sizes.

Obviously, tableplot() is only a first step, but it is hard to beat for quickly getting a sense of what is happening in a dataset.