cut_bound {popEpi} | R Documentation |
Change output values from cut(..., labels = NULL) output
Description
Selects lowest values of each factor after cut() based on the assumption that the value starts from index 2 and end in comma ",".
Usage
cut_bound(t, factor = TRUE)
Arguments
t |
is a character vector of elements, e.g. "(20,60]" |
factor |
logical; TRUE returns informative character string, FALSE numeric (left value) |
Details
type = 'factor': "[50,52)" -> "50-51" OR "[50,51)" -> "50"
type = 'numeric': lowest bound in numeric.
Value
If 'factor = TRUE', returns a character vector; else returns a numeric vector.
Author(s)
Matti Rantanen
Examples
cut_bound("[1900, 1910)") ## "1900-1909"
[Package popEpi version 0.4.12 Index]