[.track {trackdf} | R Documentation |
Extract or Replace Parts of a Track Table
Description
Accessing columns, rows, or cells via $, [[, or [ is mostly
similar to regular data frames
.
However, the behavior is sometimes different for track tables based on
tibble
and data.table
. For
more info, refer to tibble's and
data.table
's subsetting documentation.
Usage
## S3 method for class 'track'
x[...]
## S3 replacement method for class 'track'
x[...] <- value
Arguments
x |
A track table. |
... |
Other parameters to be passed to the extracting/subsetting
functions of |
value |
A suitable replacement value: it will be repeated a whole number
of times if necessary and it may be coerced: see the 'Coercion' section in
|
Value
A subset of the track table is [
is called, or a modified version
of the track table if [<-
is called.
Author(s)
Simon Garnier, garnier@njit.edu
See Also
Examples
data(short_tracks)
short_tracks[1]
short_tracks[1, ]
short_tracks[1, 1]
short_tracks$id[short_tracks$id == "1"] <- "0"
short_tracks[short_tracks[, 1] == "0", 1] <- "1"
[Package trackdf version 0.3.3 Index]