Learn R Programming

celltrackR (version 1.2.1)

projectDimensions: Extract Spatial Dimensions

Description

Projects tracks onto the given spatial dimensions.

Usage

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

Value

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

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.

Examples

Run this code
## 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 ) )

Run the code above in your browser using DataLab