-
Notifications
You must be signed in to change notification settings - Fork 17
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
Getting levels of categorical distributions and samples #89
Comments
Thanks! Not sure what the best interface would be for this, but |
Thanks! |
Improved method for |
awesome thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there / should there be a way to get the levels in the support of a categorical distribution (or in a sample from one?).
Currently
support()
does not list the levels:It would be nice to be able to get the list of unique values in the support, maybe here (perhaps in
$lim
)? That would be consistent with how ggplot uses "limits" on discrete versus continuous scales, for example. I could also see something like a "levels" field.Relatedly, if we create a
dist_sample()
on a character, factor, or ordered vector,support()
fails:Happy to submit a PR implementing the desired solution.
The text was updated successfully, but these errors were encountered: