laresbernardo / lares

Analytics & Machine Learning R Sidekick
https://laresbernardo.github.io/lares/
233 stars 49 forks source link

corr_cross function, contains argument, inescapable "Faceting variables" error? #22

Closed RickPack closed 4 years ago

RickPack commented 4 years ago

It looks to me like the contains argument of the corr_cross function always returns a "Faceting variables" error.

Can someone confirm it still works?

I am using R 4.0.0 and all CRAN packages have been updated. Lares package version is 4.8.4.

lares::corr_cross(mtcars,
           contains = "mpg")

Error: Faceting variables must have at least one value

laresbernardo commented 4 years ago

Hi @RickPack

Thanks for reaching out. I think that this is what you actually are looking for: corr_var(mtcars, mpg)

Screen Shot 2020-06-29 at 17 41 18

On the other hand, when using corr_cross, the contains parameter actually had a bug. Works when intended to be used on categorical values, as shown in the example of the clusterKmeans function but the redundant argument had a bad logic around it. Fixed now!