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
I was thinking about doing a PR for tabyl that would enhance handling of NA.
Currently if a variable has NAs, and show_na = T you get a line in the tabyl with <NA> and an extra valid_percent column (which is awesome!).
Would it be useful to allow an argument to re-lable the row in the tabyl? ie na_label = "Missing" or na_label = "Did not respond"?
Would it be useful to allow for specifying that one or more values are to be treated in the same way that NAs are currently treated in 1-way tables so that they are not counted for the valid_percent? For isntance, if I Have data that has both NAs and a value like "Skipped" (in my data, this is when a person sees a question on a survey but doesn't respond, as opposed to the NA when the question isn't displayed perhaps based on logic flow of the survey). So you'd still get separate rows for "Skipped" and "NA", but neither would be counted in valid_percent.
The text was updated successfully, but these errors were encountered:
Thanks for these ideas. I get the appeal of (2) but the argument wouldn't apply to a two-way tabyl, yet it would be added to the function call for tabyl generally for what I think is too-niche an application.
For (1), that's interesting - because I think it would apply to a two-way tabyl, too, which has NA. Having those say a user-specified value like "Missing" could make the result more polished. Right now I would see the analyst needing one line to change this manually for the 1-way tabyl and two lines for a 2-way. The question is, does the convenience of avoiding those lines justify adding another argument to tabyl for something that's relatively minor? I'm not sure.
I was thinking about doing a PR for
tabyl
that would enhance handling of NA.Currently if a variable has NAs, and
show_na = T
you get a line in the tabyl with<NA>
and an extravalid_percent
column (which is awesome!).Would it be useful to allow an argument to re-lable the row in the tabyl? ie
na_label = "Missing"
orna_label = "Did not respond"
?Would it be useful to allow for specifying that one or more values are to be treated in the same way that NAs are currently treated in 1-way tables so that they are not counted for the valid_percent? For isntance, if I Have data that has both NAs and a value like "Skipped" (in my data, this is when a person sees a question on a survey but doesn't respond, as opposed to the NA when the question isn't displayed perhaps based on logic flow of the survey). So you'd still get separate rows for "Skipped" and "NA", but neither would be counted in valid_percent.
The text was updated successfully, but these errors were encountered: