The package celltrackR is designed to help with describing, visualising, and quantifying tracks of moving objects. Many common measures used in physics and biology are implemented, such as mean square displacement and autocorrelation. The package also provides a flexible function to import tracks from text files.

The celltrackR package has been developed as part of the MotilityLab project. On the project website (motilitylab.net), a simple GUI frontend to many functions in the package is implemented, and public datasets are available to download and analyse. Indeed, the CelltrackR package was formerly called “MotilityLab”, but we changed the name to make this functionality easier to find.


See the following tutorials for detailed instructions on how to use the package and the included example data sets. These are also available from the package itself:

browseVignettes( "celltrackR" )

The following tutorials are available:

1. Reading, Converting, and Filtering Tracking Data

Learn how to load your own data into R, to subset parts of your data, and to convert between different data structures in R.

2. Quality Control and Preprocessing

An overview of quality control and preprocessing methods in the package.

3. Quality Control and Preprocessing of the Datasets in the Package

QC and preprocessing methods applied to the example datasets of the package. Where tutorial 2 provides a general overview of available methods, this tutorial shows the full workflow of applying them to raw data to obtain the cleaned up data sets included in celltrackR.

4. Track Analysis Methods

Learn how to compute several analysis metrics on tracks. This includes simple metrics such as speed, turning angles, and straightness, but also mean squared displacement (MSD) and autocorrelation plots. The tutorial will also address the different (step-based, cell-based, staggered) methods of calculating these metrics.

5. Clustering

Learn how to apply several clustering and dimensionality reduction methods to a track datasets, and to compare different datasets using multiple track features.

6. Simulating Tracks

Learn how to simulate tracks using different random walk models, or to bootstrap them from an input data set.

Cheat sheet

The package cheat sheet provides an overview of the available functionalities; it is accessible from R when the package is installed by typing:


Alternatively, you can access it here.

CRAN version

CelltrackR is available on CRAN and can be installed using:

(Note the small c in the package name).

Development version

The latest, development version of the package is available from our Github repository and can be installed using:

devtools::install_github( "ingewortel/celltrackR" )

If you do not have the devtools package installed, first run:

install.packages( "devtools" )


If you use celltrackR in your research, please consider supporting us by citing the following paper: