Category Archives: R

Merging taxa in assemblage data

One possible reason for the impossible percent values I’ve found in assemblages data is that taxa have been merged in Excel after percent were calculated. Doing anything in Excel is to invite disaster, if nothing else, it is very difficult … Continue reading

Posted in Data manipulation, R | Leave a comment

Extracting data from a PDF image

Some scientists archive their data. Some scientists email their data on request. Some editors cajole authors into releasing data to interested parties. And sometimes none of these approaches yields data. What then? One option is to request data via the … Continue reading

Posted in Peer reviewed literature, R | Tagged , , , | 2 Comments

Bergen: a year with some sunshine

May was glorious.  December less so. The data are from the Geofysisk Institutt in Bergen. Here is the code I used

Posted in climate, R, Uncategorized | Tagged | Leave a comment

Statigraphic diagrams with ggplot

rioja::strat.plot is a great tool for plotting stratigraphic plots in R, but sometimes it is not obvious how to do something I want, perhaps a summary panel showing the percent trees/shrubs/herbs. Of course, I could extend strat.plot, but I do … Continue reading

Posted in Data manipulation, R, Uncategorized | Tagged , | Leave a comment

How to calculate percent from counts in R

Micropaleontologists and others often want to calculate percent from count data. From looking at archived data, I realise that what should be an easy process goes wrong far more often that it should (which is of course never). Yesterday, I … Continue reading

Posted in Data manipulation, R | 1 Comment

Package version control

One aspect of writing a manuscript that I find tedious is checking the versions of the R packages I used. So I wrote a small function to do this automatically. (I don’t use ​= as an assignment operator in my … Continue reading

Posted in R, Uncategorized | Leave a comment

Please archive assemblage data as counts not percent

A large fraction of the microfossil assemblage that has been archived on-line by palaeoecologists is percent data, often without the count sums, rather than the raw count data. This is unfortunate as some analyses need count data. Calculating percent from … Continue reading

Posted in R | Tagged | 1 Comment