# Example using the spi dataset from the psychTools package
sc <- psych::scoreVeryFast(psychTools::spi.keys, psychTools::spi)
spi_sc <- cbind(psychTools::spi, sc)
spi_sc_age_sex_B5 <- spi_sc |>
dplyr::select(age, sex, Agree, Consc, Neuro, Extra, Open)
OPCP_mat(data = spi_sc_age_sex_B5)
Run the code above in your browser using DataLab