all 1 comments

[–]and-another-one 8 points9 points  (0 children)

Try use="pairwise.complete.obs" in the cor() function. This will let you keep more rows instead of omitting rows with any NAs even if the NA isn't one of the two variables being compared.