subsample: Subsample Track by Constant Factor

View source: R/functions.R

subsampleR Documentation

Subsample Track by Constant Factor

Description

Make tracks more coarse-grained by keeping only every kth position.

Usage

subsample(x, k = 2)

Arguments

x

an input track or tracks object.

k

a positive integer. Every kth position of each input track is kept.

Value

A tracks object with the new, more coarse-grained tracks.

See Also

interpolateTrack, which can be used for more flexible track coarse-graining.

Examples

## Compare original and subsampled versions of the T cell tracks
plot( TCells, col=1 )
plot( subsample( TCells, 3 ), col=2, add=TRUE, pch.start=NULL )


celltrackR documentation built on March 21, 2022, 5:06 p.m.