as.data.frame.tracks {celltrackR} | R Documentation |
Convert Tracks to Data Frame
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
## S3 method for class 'tracks'
as.data.frame(
x,
row.names = NULL,
optional = FALSE,
include.timepoint.column = FALSE,
idsAsFactors = TRUE,
...
)
Arguments
x |
the |
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 |
idsAsFactors |
logical. If |
... |
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
## Display overall average position of the T cell data
colMeans( as.data.frame( TCells )[-c(1,2)] )