powered by
simple_triplet_matrix
matrix
corr(x, y)
cor(x,y)
nrow(y)=nrow(x)
ncol(x)
ncol(y)
data(congress109) r <- corr(congress109Counts, congress109Ideology$repshare) ## 20 terms for Democrats sort(r[,1])[1:20] ## 20 terms for Republicans sort(r[,1], decreasing=TRUE)[1:20]
Run the code above in your browser using DataLab