corrr icon indicating copy to clipboard operation
corrr copied to clipboard

Adding a "weights" option

Open aljoscha-j opened this issue 4 years ago • 0 comments

Would it be possible to add a "weights" option?

Most tidyverse packages do not really support weights and there is probably a good reason for that. Still, weights can be important when using survey data.

I am not an expert at package writing, but since no standard errors are needed this could be done by multiplying the observations with an integer weight internally before calculating the correlations. Granted, this is quite easily done in the tidyverse (e.g. tidyr::uncount), but I still think it would improve usability if this option was built in?

All the best!

aljoscha-j avatar Nov 19 '21 16:11 aljoscha-j