igrf 1.0 CRAN release

The Earth magnetic field in R

We’re happy to announce a new R package igrf. This package provides an R implementation of the International Geomagnetic Reference Field. Its most common use is to calculate the magnetic declination, the deviation of the magnetic north from true geographic north. This angle varies depending on your position and the date. Below you find an example of such a declination field.

This package provides, among others, ways to calculate this declination in space and time to correct magnetic orientation means. Applications can range from sailboat course corrections to ornithological research. Beware, we do not accept any liability if accidents stem from the use of this model.

Install by running


If you need help, or encounter issues with the package please file an issue at https://github.com/bluegreen-labs/igrf/issues.

Koen Hufkens, PhD
Partner, Researcher

As an earth system scientist and ecologist I model ecosystem processes.