getTimeLimSubjectProfilePlots: Get the limits to set for the subject profile plots,...

View source: R/report_subjectProfileCombine.R

getTimeLimSubjectProfilePlotsR Documentation

Get the limits to set for the subject profile plots, depending on the alignment policy set.

Description

These limits are extracted from specified timeLim for each module (stored in the attributes()$metaData$timeLim), and if empty for all modules: from the maximal range of the x-coordinates across all plots.

Usage

getTimeLimSubjectProfilePlots(
  listPlots,
  timeAlign = "all",
  timeAlignPerSubject = "none"
)

Arguments

listPlots

list of list of subjectProfile[X]Plot plots

timeAlign

Character vector with time alignment across modules/subjects, either:

  • 'all' (by default): all plots have the same time limits

  • 'none': each of the plot (module*subject) has its own time limits

  • character vector with names of the modules which should have the same time limits (should correspond to the names of listPlots)

timeAlignPerSubject

Character vector, specifying if the plots should be aligned (or not) across subjects

  • 'none' (by default): all modules to align have the same time limit across subjects

  • 'all': all modules to align have different time limits per subject

  • character vector with subset of the modules to align per subject (should correspond to the names of listPlots)

Only the modules already specified in timeAlign can be aligned by subject.

Value

Time limits, as a numeric vector of length 2. If time limits should be set by module, named list with time limits by module. If time limits should be set by module and subject, nested list with time limits 1) by module 2) by subject.
The names of the list contains the module/subject name extracted from the names of listPlots.
The time limits are only returned if they will need to be explicitly set for a plot. Otherwise, NULL is returned.

Author(s)

Laure Cougnaud


patientProfilesVis documentation built on Nov. 18, 2022, 5:12 p.m.