Find the visit number given age and donor data name

Find the visit age given the visit number and donor data name

Find the visit label given the visit number and donor data name

visit_number(age, dnr = "smocc")

visit_age(number, dnr = "smocc")

visit_label(number, dnr = "smocc")

Arguments

age

Numeric vector with decimal age

dnr

Name of donor dataset

number

Integer, visit numbers

Value

visit_number returns a vector of length length(age)

visit_age returns a vector of length length(number)

visit_label returns a vector of length length(number)

Examples

chartplotter:::visit_number(age = c(0.5, 1))
#> [1] 6 9
chartplotter:::visit_number(age = c(0.5, 1), "pops")
#> [1] 3 4
chartplotter:::visit_age(1:3)
#> [1] 0.0000 0.0767 0.1533
chartplotter:::visit_age(1:3, "pops")
#> [1] 0.00 0.25 0.50
chartplotter:::visit_label(1:3)
#> [1] "0w" "4w" "8w"
chartplotter:::visit_label(1:3, "pops")
#> [1] "0w" "3m" "6m"