Category Archives: R

Introducing ggpalaeo

I’ve put some code I used for plotting figures for my soon-to-be-resubmitted manuscript into a package because I thought it might be useful to others. The main use of ggpalaeo is to make ggplot2 plots of transfer function diagnostics from … Continue reading

Posted in R, transfer function | Tagged | 3 Comments

The elevation of Lake Tilo

For my PhD, I studied the palaeolimnology of two lakes in the Ethiopian rift valley, using diatoms to reconstruct changes in the water chemistry of Lake Awassa, an oligosaline caldera lake which retains its low salinity despite having no effluent … Continue reading

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

Insist() on the text and numbers agree in Rmarkdown

The manuscript I submitted a long time ago contains multiple sentences where I describe the result with both text and numbers. For example: With a three-year moving average, the correlation is weak (r = 0.21) and not statistically significant (p … Continue reading

Posted in R, reproducible research | Tagged | Leave a comment

Citing R and packages automatically

Almost every manuscript I write has a paragraph that looks something like this: All analyses were done in R version 3.4.4 (R Core Team 2017). Ordinations were fitted with vegan version 2.4-6 (Oksanen et al. 2017) with square-root transformed assemblage … Continue reading

Posted in R, reproducible research | Tagged | 2 Comments

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