projectDimensions {celltrackR}R Documentation

Extract Spatial Dimensions

Description

Projects tracks onto the given spatial dimensions.

Usage

projectDimensions(x, dims = c("x", "y"))

Arguments

x

the input tracks object.

dims

a character vector (for column names) or an integer vector (for column indices) giving the dimensions to extract from each track. The time dimension (i.e., the first column of all tracks) is always included.

Value

A tracks object is returned that contains only those dimensions of the input tracks that are given in dims.

Examples

## Compare 2D and 3D speeds
load( system.file("extdata", "TCellsRaw.rda", package="celltrackR" ) )
speed.2D <- mean( sapply( subtracks( projectDimensions( TCellsRaw, c("x","z") ), 2 ), speed ) )
speed.3D <- mean( sapply( TCellsRaw, speed ) )


[Package celltrackR version 1.2.0 Index]