Frédéric Santos' notebook
Emacs and R tricks for anthropologists and archaeologists.

How to define custom line types with R?

02 déc. 2020

There are already six default line types defined in R; but how can one create a new, custom line type? It’s quite easy to do this in Python… and just as easy to do in R!

Tags: R

How to perform a NPMANOVA with R?

07 mai 2020

Performing a non-parametric multivariate analysis of variance (NPMANOVA), also known as permutational multivariate analysis of variance (PERMANOVA), is relatively easy thanks to the function adonis() implemented in the R package vegan. In this blog post :

Tags: R statistics

Reading and sending mails from within Emacs: a tutorial for mu4e

24 avril 2020

There are several ways to handle (i.e., to read and send) all your emails directly from within Emacs. As you can read on this reddit thread, there are essentially three candidates: the built-in Emacs tools (Rmail and Gnus), mu4e and NotMuch. mu4e is a solution I find especially convenient and easy to use. In this post, I’ll propose a quick tutorial and a reasonable mu4e configuration. Another tutorials out there are really well done, such as this one (the present post is essentially a modified and extended version of this excellent tuto), but most of them are quite old, and do not necessarily play well with the latest versions of mu. This tutorial works for mu 1.4.x (and, I hope, later versions).

Tags: emacs

How to know if an individual specimen may be a member of a given reference population?

15 avril 2020

Let’s say you have one given specimen of unknown origin or species. Although you do not know precisely to which group this individual belongs, you have several hypotheses; e.g., you think that this individual might belong to populations A or B, but is certainly not a member of population C. In this post, we will illustrate some possible methods to assess the credibility of those hypotheses, depending on the data you were able to collect (or you are willing to use).

Tags: R statistics

Comment boxes for R scripts within Emacs

06 avril 2020

Some people like to insert nice comment boxes in their R scripts. Using Emacs and ESS, this is easy to achieve thanks to the lisp function comment-box.

Tags: emacs R
Other posts