EHRtemporalVariability (version 1.2.1)

trimDataTemporalMap: Trims a DataTemporalMap

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

trimDataTemporalMap(
  dataTemporalMap,
  startDate = min(dataTemporalMap@dates),
  endDate = max(dataTemporalMap@dates)
)

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

Value

A DataTemporalMap object between the specified dates.

Arguments

dataTemporalMap

of class DataTemporalMap.

startDate

Date indicating the start date to trim from.

endDate

Date indicating the end date to trim to.

Examples

Run this code
load(system.file("extdata",
                 "variabilityDemoNHDSdiagcode1-phewascode.RData",
                  package="EHRtemporalVariability"))

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

Run the code above in your browser using DataLab