RNested – Nested Sampling in R & analysis of spectra

The RNested package is a re-implementation of the main algorithms from the radiospec package into the R statistical data analysis environment. Its advantages compared to radiospec are:

  • Very easy install through the R packaging mechanism
  • Easy to use and extend with new models
  • Naturally good integration with R, which is a very popular environment for doing statistics
  • Easy-to-understand code


To install on source-based R systems (i.e., Linux) you can do simply:

install.packages("RNested", repos=c("http://www.mrao.cam.ac.uk/~bn204/soft/R","http://cran.us.r-project.org"))

On R systems that tend to use binary packages (Windows & OS X), it is easier to install the dependent packages and RNested separately:

install.packages(c("plyr", "foreach", "ks", "plotrix")
install.packages("RNested", repos=c("http://www.mrao.cam.ac.uk/~bn204/soft/R","http://cran.us.r-project.org"), type="source")


The RNested package is documented using the standard R environment documentation tools. Therefore it is recommended that you install the package and browse the documentation using help() and vignette() functions. For convenience, here are the links to PDF documentation:

  • Reference manual PDF
  • One dimensional fitting vignette PDF
  • Bayesian Fitting of Spectra of Radio Sources Using Polynomials vignette PDF


Development of RNested is fully open, see the GitHub Repository. The code is licensed under GPL version 2.

Table Of Contents

Previous topic

Analysis of (radio) spectra

Next topic

Download & building of the radiospec package