trimDataTemporalMap-methods: Trims a 'DataTemporalMap'

Description Usage Arguments Value Examples

Description

Trims a DataTemporalMap object between an start and end date. If one is not specified it takes as default the first/last chronological date in the input DataTemporalMap.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
trimDataTemporalMap(
  dataTemporalMap,
  startDate = min(dataTemporalMap@dates),
  endDate = max(dataTemporalMap@dates)
)

## S4 method for signature 'DataTemporalMap'
trimDataTemporalMap(
  dataTemporalMap,
  startDate = min(dataTemporalMap@dates),
  endDate = max(dataTemporalMap@dates)
)

Arguments

dataTemporalMap

of class DataTemporalMap.

startDate

Date indicating the start date to trim from.

endDate

Date indicating the end date to trim to.

Value

A DataTemporalMap object between the specified dates.

Examples

1
2
3
4
5
6
7
8
9
load(system.file("extdata",
                 "variabilityDemoNHDSdiagcode1-phewascode.RData",
                  package="EHRtemporalVariability"))

probMapTrimmed <- trimDataTemporalMap( 
                         dataTemporalMap = probMaps[[1]],
                         startDate       = "2005-01-01",
                         endDate         = "2008-12-01"
)

EHRtemporalVariability documentation built on May 31, 2021, 5:07 p.m.