## get correlation to subset of the data. cor(data[3:length(data)], method="spearman")
## get correlation to all data. It creates matrix of correlations. cor(data, method="spearman")
## Draw pie charts require(corrgram) corrgram(data[3:length(data)], method="spearman", upper.panel=panel.pie)
Code snippet first read the data from a .cvs file and load it in a data frame structure. Then, I call the correlation calculation function. In the example above, due to the custom structure of my data I start at column 3. Please note that the cor function does a correlation calculation as a matrix. This means every column will have its own correlation with all the other columns. At the end, I show how to calculate and display the correlation results in a user-friendly look using pie charts.
_________________ Sami PHD student - SAIL - School Of Computing Queens' University Canada