oobianom / quickcode

An R package made out of mine and Brice's scrapbook of much needed functions.
https://quickcode.obi.obianom.com
Other
5 stars 0 forks source link

Bug in the sample_by_column Function #1

Closed brichard1638 closed 1 year ago

brichard1638 commented 1 year ago

The sample_by_column function does not return the correct number of records consistent with its n argument.

To reproduce this error, execute the following code via iteration: library(quickcode) data("airquality") nrow(sample_by_column(.dt = airquality, col = Ozone, n = 12)) [1] 15 nrow(sample_by_column(.dt = airquality, col = Ozone, n = 12)) [1] 22 nrow(sample_by_column(.dt = airquality, col = Ozone, n = 12)) [1] 19 nrow(sample_by_column(.dt = airquality, col = Ozone, n = 12)) [1] 19

oobianom commented 1 year ago

Thanks for bring this issue up. I will work to address it soonest.

oobianom commented 1 year ago

Addressed!