eq5d_3l: Simple function to extract dimensions of EQ-5D profile

View source: R/eq5dswe.r

eq5d_3lR Documentation

Simple function to extract dimensions of EQ-5D profile

Description

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

Usage

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

eq5d_3l(input = NA, 3)
# [1] NA

eq5d_3l(input = 1231, 3)
# [1] NA

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

swehip/shprplotfun documentation built on Oct. 21, 2022, 8:26 a.m.