Analysis to view patterns or correlations between multiple variables I have a dataset with many variables (yes/no) questions from a questionnaire on different symptoms experienced (yes I have symptom/no I don't have symptom) with thousands of participants. As an example:
da<-(rbinom(5000,1,.1))
db<-(rbinom(5000,1,.1))
dc<-(rbinom(5000,1,.1))
dd<-(rbinom(5000,1,.1))
de<-(rbinom(5000,1,.1))
df<-(rbinom(5000,1,.1))
dg<-(rbinom(5000,1,.1))
dh<-(rbinom(5000,1,.1))
di<-(rbinom(5000,1,.1))
dj<-(rbinom(5000,1,.1))
dk<-(rbinom(5000,1,.1))
dl<-(rbinom(5000,1,.1))
dm<-(rbinom(5000,1,.1))
dat<-data.frame(da,db,dc,dd,de,df,dg,dh,di,dj,dk,dl,dm)

I am hoping to identify if there are any clusters of variables that seem to be related among these variables (for example maybe dh, di, dk, and dm all seem to have correlations or relations to one another). Would I just go about this by looking at all of the correlations between all variables and try to identify patterns or is there any easier way to do this in R?
 A: You can try it like this. I use a small dataset from cluster, about animal features. In this example I group the observations instead of the columns, so for you use, you need to transpose the matrix but same concept applies. The data is in 1,2: 
library(cluster)
data(animals)
animals = animals[complete.cases(animals),]
head(animals)
    war fly ver end gro hai
ant   1   1   1   1   2   1
bee   1   2   1   1   2   2
cat   2   1   2   1   1   2
cpl   1   1   1   1   1   2
chi   2   1   2   2   2   2
cow   2   1   2   1   2   2

First use a distance measure, here I use "binary" from the dist() which is jaccard similarity or you try one the measures from dist.binary() from ade4, and then group by hierarchical clustering:
D = dist(1-animals,method="binary")
plot(hclust(D,method="ward.D"))


You can see the similar animals cluster. Another option is latent class analysis and you get groups, just that you need to define number of groups. From your hclust, let's say we try 4:
library(poLCA)
f = with(animals, cbind(war,fly,ver,end,gro,hai)~1)
fit = poLCA(f,animals,nclass=4)
predicted_class = data.frame(polLCA=factor(fit$predclass))
rownames(predicted_class) = rownames(animals)

We now put them together on a heatmap, I tranpose the matrix so it might look like what you are after:
library(pheatmap)
pheatmap(t(animals-1),
clustering_distance_cols = "binary",
clustering_method ="ward.D",
annotation_col = predicted_class)


We can also cut the tree on the hierarchical clustering to get groups, and you can see here it agrees well with LCA because it's quite a simple dataset. For your data, might be good to combine these two to see if they differ. You can also check out the LCA tutorial
