Learn R Programming

MotilityLab (version 0.2-5)

projectDimensions: 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

Run this code
## Compare 2D and 3D speeds
speed.2D <- mean( sapply( subtracks( projectDimensions( TCells, c("x","z") ), 2 ), speed ) )
speed.3D <- mean( sapply( TCells, speed ) )

Run the code above in your browser using DataLab