correlation matrix of a bunch of categorical variables in R ...
stackoverflow.com › questions › 31238284Jul 06, 2015 · Show activity on this post. For binary variables, you might consider cross tabs (the table function in R). However, getting the correlation matrix is pretty straightforward: # example data set.seed (1) DF <- data.frame (x=sample (c ("Y","N"),100,T),y=sample (c ("Y","N"),100,T)) # how to get correlation DF [] <- lapply (DF,as.integer) cor (DF ...