-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
multiple types of labelling attributes may affect results. (skim) #606
Comments
Hi! The fundamental issue is that skimr dispatches summary functions based on data type. Or you can follow the guide here on how to add another data type: Best wishes, |
Hi Michael, I'll look at the skimrextra package |
My guess, from looking at your original error message, is that this is a consequence of stricter behavior in the vctrs package. We recently had to update this package to better work with those changes, but certain behavior that was allowed before now throws errors. From what I can tell:
Like I mentioned above, the safest solution within skimr is to have a different summary type for haven labelled. The approach could be as simple as forking the numeric skimmers.
@elinw, is this something we should directly support? We would add haven to suggests and one more method? |
Thank you Michael, and for the function. That explanation you gave about the vctrs package makes sense to me! |
I actually added skimmers for |
Hi - thank you Ruben!
|
The interesting thing to me is that when skimming directly (as opposed to via codebook) the fall back to character works but generates this warning (twice):
But as you can see
So I guess for skimr the question is whether when a variable has multiple classes we should try to search for a match to the sfls that currently exist. |
I think using |
Thank you! Once labeling is done with
|
That's all good, but I'm really thinking about the bigger question @michaelquinn32 of why we aren't just treating it as numeric. (I do think it's useful to put it in it's own subtable but maybe we need to make our fall back smarter about checking %in% the classes and use the first match or something.) |
ps. I ended up just doing a quick regex capture group find and rearrange for the reams of code I had in Hmisc and used the base R label(cars$am) = "Somebinary2" to attr(cars$am,"label") <- "Somebinary2" |
I think I should close this and that the question I asked is really more of a separate issue from labelled variables. |
hello: Thank you for the package. I had mentioned an error being received in other package
rubenarslan/codebook#52
and now think this may be related to skimr.
Would there be any suggestions. I think multiple types of labelling attributes may affect results.
Error: Problem with summarise() input skimmed.
x Problem with summarise() input ~!@#$%^&()-+haven_labelled.sd.
x Can't convert to .
i Input ~!@#$%^&()-+haven_labelled.sd is (structure(function (..., .x = ..1, .y = ..2, . = ..1) ....
i Input skimmed is purrr::map2(...).
i The error occured in group 3: skim_type = "haven_labelled".
The text was updated successfully, but these errors were encountered: