subset.gcod_db: Subset the local or remote perspective of a 'gcod_db' object

Description Usage Arguments Details Value Examples

View source: R/db_management.R

Description

Subset the local or remote perspective of a gcod_db object

Usage

1
2
## S3 method for class 'gcod_db'
subset(x, subset, perspective = "remote", ...)

Arguments

x

an object of class gcod_db

subset

logical expression indicating records to keep in either remote_perspective(x) or local_perspective(x) according to the value of perspective; missing values are taken as FALSE.

perspective

either "remote" (default) or "local", for the perspective to subset.

...

currently not used.

Details

See get_athlete_ids() for the variables each perspective holds.

Value

An object of class gcod_db with the selected athlete IDs according to subset in its remote or local perspective.

Examples

1
2
3
4
5
6
## Get all available athelte IDs
db <- get_athlete_ids()
## Return athletes from the remote perspective of db with "b7-9" in
## their IDs
db79 <- subset(db, subset = grepl("b7-9", athlete_id(db)), perspective = "remote")
athlete_id(db79, perspective = "remote")

ikosmidis/GoldenCheetahOpenData documentation built on June 3, 2020, 9:25 a.m.