Work with Look at NanoSIMS Data in R

R interface for working with nanometer scale secondary ion mass spectrometry (NanoSIMS) data exported from Look at NanoSIMS.

Build Status AppVeyor Build Status


The [email protected] (short LANS) Matlab module written by Lubos Polerecky (Polerecky L., Adam B., Milucka J., Musat N., Vagner T. and Kuypers M. M. M. (2012) [email protected] - a tool for the analysis of nanoSIMS data in environmental microbiology. Environ. Microbiol. 14, 1009–1023.) makes it easy to process NanoSIMS data and draw regions of interest (ROIs). The lans2r package provides a convenient interface to import ion maps and ROI data generated by LANS for processing and plotting in R/RMarkdown. Additionally, it can process NanoSIMS tuning (HMR) files.


#install.packages("lans2r") # NOTE: v. 1.0 currently in submission proces
# Or the the development version directly from GitHub using devtools:


Once installed, load the package with:


A concise overview demonstrating the functionality of the lans2r package is provided in the main vignette for the package (HTML, source), which can also be access from within R by calling:


Additional vignettes provide details on extended functionality and can be accessed easily by browsing the package vignettes from within R:


For details on individual funcation, please consult the package help (e.g. ?load_LANS_summary).


library(dplyr) # use of %>% and filter
library(lans2r) # the lans2r package
# load two of the data sets supplied with lans2r
load_LANS_maps (
  analysis = c("analysis1", "analysis2"),
  base_dir = system.file("extdata", "nanosims_data", package = "lans2r")
) %>% 
  # focus on the NC ions
  filter(variable %in% c("14N12C", "15N12C")) %>% 
  # plot the ion maps normalized by ion counts for each ion
  plot_maps(normalize = TRUE, draw_ROIs = FALSE)


lans2r 1.0.0

Major Features

Data import

  • import and combine LANS matlab ion map files from multiple analyses
  • import and combine LANS ROI summary and z-stack files from multiple analyses
  • import tuning information from HMR text files


  • calculate any derived quantities and errors for ROIs and ion maps across multiple analyses and based on any combination of raw and prior derived quantities
  • automatically calculate ratios, fractional abundances and ion sums


  • plot panelled ion maps with ROI outlines for any number of ions and analyses

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


1.0.5 by Sebastian Kopf, a year ago

Report a bug at

Browse source code at

Authors: Sebastian Kopf [aut, cre]

Documentation:   PDF Manual  

GPL-3 | file LICENSE license

Imports dplyr, tidyr, reshape2, ggplot2, lazyeval, R.matlab

Suggests testthat, rmarkdown, knitr, covr

See at CRAN