Update corr.R

update: final result is diff from example, very little difference.