-
Notifications
You must be signed in to change notification settings - Fork 16
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
Store set of categories in CategoricalVariable #74
Comments
This feels quite related to #47 Is it a duplicate? Deffo needed |
Ah, even more simple, just adding a value to |
Ah ok, but then how do we initialise individuals who have more than one category? |
Oh, this isn't touching issue #47. This one would be as simple as adding a line like:
to CategoricalVariable$initialize. I just opened an issue for it because I was wanted to make sure this doesn't go against some design philosophy I'm not aware of. It's probably superfluous to have opened an entire issue for such a small change... |
Oh I seeeee! Yes that would be useful. self$.categories <- categories would not be DRY. A |
Cool =] So it was a good idea to check. Yeah I mostly wanted it so I can do something like this to get marginal counts, or something more elegant to get the cross tabulation table of counts. I see now how it originally came across as being similar to #47
|
I think it might be a good idea to store the set of valid states within
CategoricalVariable
. I have a use case where I'll need multiple categorical variables and having each object know its set of valid states makes rendering output easier. I'm considering writing a rendering prefab to take in an indeterminate number of categorical variables to output counts of each, which would be greatly eased by storing states within the variables (for outputting the marginals or intersections).The text was updated successfully, but these errors were encountered: