as.data.frame.tracks: Convert Tracks to Data Frame

Description Usage Arguments Value Examples

Description

Converts tracks from the list-of-matrices format, which is good for efficient processing and therefore the default in this package, to a single dataframe which is convenient for plotting or saving the data.

Usage

1
2
3
## S3 method for class 'tracks'
as.data.frame(x, row.names = NULL, optional = FALSE,
  include.timepoint.column = FALSE, ...)

Arguments

x

the tracks object to be coerced to a data frame.

row.names

NULL or a character vector giving row names for the data frame. Missing values are not allowed.

optional

logical. Required for S3 consistency, but has no effect: column names are always assigned to the resulting data frame regardless of the setting of this option.

include.timepoint.column

logical. If set to TRUE, then the resulting dataframe will contain a column that consecutively numbers the positions according to their time. Note that this information is anyway implicitly present in the time information.

...

further arguments to be passed from or to other methods.

Value

A single data frame containing all individual tracks from the input with a prepended column named "id" containing each track's identifier in 'x'.

Examples

1
2
## Display overall average position of the T cell data
colMeans( as.data.frame( TCells )[-c(1,2)] )

MotilityLab documentation built on May 2, 2019, 8:31 a.m.