num_dt: num_dt: Compute median date, range.

Description Usage Arguments Value Examples

View source: R/numeric_funcs.R

Description

Given a single integer vector (with origin specified) or data class vector, will compute median day and a range (default min/max) and percent of total, returning results in string. Mostly called by other functions.

Usage

1
num_dt(x, median = TRUE, range='min/max', origin=NULL)

Arguments

range

A character string to indicate range values. options: 'min/max'.

origin

Default NULL. If specified, must be a date class object of length 1. For use if date variable is in raw integer format.

x

A integer or date class vector

nomedian

A logical vector, indicates whether to report median or not. Default = TRUE.

Value

A character string of length 1, 'Median date (date1, date2)'

Examples

1
2
3
require(mdsR)
mds_dta <- mdsR::mds_cohort
num_dt(mds_dta$dmdate)

kmcconeghy/Scotty documentation built on Aug. 26, 2020, 11:45 p.m.