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
This feels a little too specialised to me, but maybe fct_relabel() could also supply the length of the factor as an additional second argument. Then you could do:
Would it be useful to include a function which quickly modifies factor values with information about how many rows take that value? e.g.
fac <- factor(c("A","A","B","C","C","C"))
with levels A B C
fct_relabel_with_counts(fac)
with levels 'A (n=2)' 'B (n=1)' 'C (n=3)'
This would be useful for including on plots. I'm sure this would get used a lot.
The text was updated successfully, but these errors were encountered: