Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upPipeline crosstab #34
Conversation
Needed crosstab.default to accept lists, expect_equal was also failing on the percent='all' test but shouldnt' have been.
Current coverage is 98.82%@@ master #34 diff @@
========================================
Files 9 9
Lines 151 170 +19
Methods 0 0
Messages 0 0
Branches 0 0
========================================
+ Hits 151 168 +17
- Misses 0 2 +2
Partials 0 0
|
|
Wow! Wizardry. I don't entirely follow and will need to do some reading to 100% understand, but it works great. The one question I have now is, I see when I start typing "crosstab" in RStudio I get "crosstab.data.frame" and "crosstab.default" suggested. Is it standard to export those? Is it possible some users will want to call them directly? I don't immediately see a purpose to exporting them. |
|
Your probably right regarding exporting them. I'll double check tomorrow and make changes as necessary. |
|
I don't think you generally export the functions that only do method dispatch. I think those stay internal |
This creates an S3 generic for crosstab as well as default and
data.tablemethods. Thecrosstabis now pipeable. One side effect of this is I had to allowlistobjects as acceptable objects forvec1andvec2parameters in thecrosstab.default. (Essentially as a way to deal with NSE in both thecrosstab.data.frameandcrosstab.defaultmethods). I've updated the tests and the package is currently passing R CMD CHECK on my MBP.