View source: R/AddTimeBetweenArrivalAndDischarge.R
Adds the variable time between arrival to and discharge from participating centre.
1 2 3 4 | AddTimeBetweenArrivalAndDishcarge(study.sample, from.date = "doar",
from.time = "toar", to.date = "dodd", to.time = "todd",
date.format = "%Y-%m-%d", time.format = "%H:%M",
units = "days", variable.name = "tadd", drop.used.variables = TRUE)
|
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 "dodd". |
to.time |
Character or POSIXt vector of length 1. The name of the variable with the time from which to start counting. Defaults to "todd". |
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 "days". |
variable.name |
Character vector of length 1. The name of the time between injury and arrival variable. Defaults to "tadd". |
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. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.