is_single | R Documentation |
Check whether a vector of ages consists in single ages. This makes sense sometimes when age intervals are not explicitly given.
is_single(Age)
Age |
integer. Vector of age classes. |
In cases where ages are indeed single, but repeated, this will still return FALSE
.
Therefore make sure that the age vector given refers to a single year of a single population.
logical. TRUE
if detected as single ages, FALSE
otherwise.
Age <- 0:99
Age2 <- c(0:10,0:10)
Age3 <- seq(0,80,by=5)
Age4 <- seq(0,10,by=.5)
is_single(Age) # TRUE
is_single(Age2) # FALSE repeated, can't tell.
is_single(Age3) # FALSE not single ages
is_single(Age4) # FALSE not single ages
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.