getTimeTrans: Get useful transformation for the time variable in patient...

View source: R/timeTransformations.R

getTimeTransR Documentation

Get useful transformation for the time variable in patient profiles.

Description

Get useful transformation for the time variable in patient profiles.

Usage

getTimeTrans(
  type = c("asinh", "asinh-neg"),
  scale = 1,
  formatFct = prettyNum,
  n = 10
)

Arguments

type

String with transformation type, either:

  • 'asinh': hyperbolic arc-sine (asinh) transformation

  • 'asinh-neg': hyperbolic arc-sine transformation only for the negative values, otherwise linear scale

scale

Numeric vector of length 1 (1 by default) with size of the linear region around 0, only used if in case type is: 'asinh'.
If specified, the time variable is first scaled with: x/scale, then transformed.

formatFct

function formatting the time axis breaks, (prettyNum by default), see format parameter of the trans_new.

n

Integer of length 1 with number of breaks, 10 by default.

Value

ggplot2 transformation (see trans_new)

Author(s)

Pieter-Jan Stiers, Laure Cougnaud


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