daya6489 / SmartEDA

a R package for data exploratory analysis
https://daya6489.github.io/SmartEDA/
Other
42 stars 14 forks source link

weight argument to Expctable, Expcatstat, ExpNumStat etc #7

Closed lewishounkpevi closed 1 year ago

lewishounkpevi commented 3 years ago

Hello, Thanks for developping and maintaining this package. that's my favorite for quick eda.

I've noticed that I can't make a weighted count or weighted summary. I did with dplyr::count(df, x, y, wt = z) or questionr::wtd.table.

So if you can add this option, it will be a huge gain of time !

thanks a lot !

Lewis

daya6489 commented 3 years ago

Sure Lewis. Thanks for the request. We will add the weight option in the next release.

lewishounkpevi commented 3 years ago

amazing !

daya6489 commented 1 year ago

Thanks @lewishounkpevi, we have added weight arguments to Num stat and cat stat functions, see below are one-two examples for reference

ExpNumStat(mtcars,by="GA",gp="gear",Qnt=c(0.1,0.2),MesofShape=2, Outlier=FALSE,round=2,dcast = TRUE,val = "IQR", weight = "wt")

ExpCTable(mtcars, margin = 1, clim = 10, nlim = 3, bin = NULL, per = FALSE, weight = "wt")