Extracts a specific one-digit number from a five-digit number.

eq5d_3l(input, place)

Arguments

input

EQ-5D profile, usually a five-digit number.

place

Number from 1 to 5 indicating which number to extract.

Value

Number if input is a five-digit number, else NA.

Examples

eq5d_3l(input = 12312, 3)
#> [1] 3
# [1] 3 eq5d_3l(input = NA, 3)
#> [1] NA
# [1] NA eq5d_3l(input = 1231, 3)
#> [1] NA
# [1] NA eq5d_3l(input = c(12312, NA, 1231, 11121), 3)
#> [1] 3 NA NA 1
# [1] 3 NA NA 1