MFI domain score calculator
Usage
mfi_domains(
ds,
reverse = TRUE,
reverse.vars = c(2, 5, 9, 10, 13, 14, 16, 17, 18, 19)
)
Examples
mfi_mess <- data.frame(matrix(
sample(c(" 1. ", "2. -A", "3.", " 4 ", "5.", NA),200,replace=TRUE),ncol=20))
mfi_mess |> mfi_domains()
#> # A tibble: 10 × 5
#> act gen men mot phy
#> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 NA 10 14 12 13
#> 2 7 NA NA NA NA
#> 3 8 NA 16 13 NA
#> 4 NA 15 NA 15 15
#> 5 NA NA 14 NA 11
#> 6 13 13 NA 16 12
#> 7 10 NA NA 12 14
#> 8 NA 15 NA NA 16
#> 9 NA 13 NA NA 10
#> 10 NA NA 10 NA NA