You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Making it a simpler, smaller function would make it a more useful function and have it better fit our API. Right now it recodes and tabulates. If it just recoded, it could still feed tabyl for the same thing, but also could feed crosstab, and be used in data cleaning, to generate a new column.
I'm pretty sure this is a good idea, and also pretty sure hardly anyone uses this function...
The text was updated successfully, but these errors were encountered:
I think it's a sign that to implement this, all that's required is to delete these lines at the end of the function:
# tabulate grouped variable, then reset name to match input variable name
result <- tabyl(new_vec, show_na = show_na, sort = sort)
names(result)[1] <- var_name
result
and have it return new_vec instead. (also need to change the parameters and make new tests of course)
As long as I'm on this, is there a better name than top_levels? It gives bottom levels too.
And is this function only in janitor because I use it in my particular use cases with Likert survey data, but really it is out of scope and belongs either in forcats or the internal TNTP package at work?
Yeah, I think this is out of scope for janitor. Not really a big deal either way (removing it or keeping). If tidyverse/forcats#28 gets implemented, I can deprecate and then remove.
This would be better as it returning a vector, that can then be fed to tabyl... but is that worth doing for v 1.0?
Making it a simpler, smaller function would make it a more useful function and have it better fit our API. Right now it recodes and tabulates. If it just recoded, it could still feed tabyl for the same thing, but also could feed crosstab, and be used in data cleaning, to generate a new column.
I'm pretty sure this is a good idea, and also pretty sure hardly anyone uses this function...
The text was updated successfully, but these errors were encountered: