# NOT RUN {
# Data preparation
df <- as.table(rbind(c(762, 327, 468), c(484, 239, 477)))
dimnames(df) <- list(
gender = c("F", "M"),
party = c("Democrat","Independent", "Republican")
)
df
# Compute cramer's V
cramer_v(df)
# }
Run the code above in your browser using DataLab