is a factor a likert scale

is_likert(vec, lev)

Arguments

vec

a factor

lev

le scale

Value

boolean

Examples

is_likert(iris$Species,c("setosa","versicolor","virginica"))
#> [1] TRUE
is_likert(iris$Species,c("setosa","versicolor","virginica","banana"))
#> At least one element of lev is not in levels of vec
#> [1] TRUE
is_likert(iris$Species,c("setosa","versicolor"))
#> [1] FALSE