AddTimeToFirstVitals: Add time to first vitals

Description Usage Arguments

View source: R/AddTimeToFirstVitals.R

Description

Adds the variable time to first vitals, defined as the difference in time between arrival to participating centre and time when first set of vitals was recorded.

Usage

1
2
3
4
5
AddTimeToFirstVitals(study.sample, from.date = "doar",
  from.time = "toar", to.date = "dom_1", to.time = "tom_1",
  date.format = "%Y-%m-%d", time.format = "%H:%M",
  units = "hours", variable.name = "tt1v",
  drop.used.variables = TRUE)

Arguments

study.sample

Data frame. The study sample. No default.

from.date

Character or POSIXt vector of length 1. The name of the variable with the date from which to start counting. Defaults to "doar".

from.time

Character or POSIXt vector of length 1. The name of the variable with the time from which to start counting. Defaults to "toar".

to.date

Character or POSIXt vector of length 1. The name of the variable with the date from which to start counting. Defaults to "dom_1".

to.time

Character or POSIXt vector of length 1. The name of the variable with the time from which to start counting. Defaults to "tom_1".

date.format

Character vector of length 1. The date format. Defaults to "%Y-%m-%d".

time.format

Character vector of length 1. The date format. Defaults to "%H:%M".

units

Character vector of length 1. Should be one of "days", "hours", "minutes", or "seconds". Defaults to "hours".

variable.name

Character vector of length 1. The name of the time between injury and arrival variable. Defaults to "tt1v".

drop.used.variables

Logical vector of length 1. If TRUE the date and time variables used to calculate time between injury and arrival are dropped from the sample. Defaults to TRUE.


martingerdin/bengaltiger documentation built on Feb. 29, 2020, 4:46 p.m.