Comments (6)
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
render_multiple_categorical_variables <- function(renderer, ...) {
vars <- match.call(expand.dots = FALSE)$`...`
function(t) {
for( v in vars) {
for (c in v$get_categories()) {
renderer$render(paste0(v,"_",c, '_count'), v$get_size_of(c), t)
}
}
}
}
from individual.
This feels quite related to #47
Is it a duplicate?
Deffo needed
from individual.
Ah, even more simple, just adding a value to CategoricalVariable
that stores the unique categories (passed as argument categories
in the constructor).
from individual.
Ah ok, but then how do we initialise individuals who have more than one category?
from individual.
Oh, this isn't touching issue #47. This one would be as simple as adding a line like:
self$.categories <- categories
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...
from individual.
Oh I seeeee!
Yes that would be useful.
self$.categories <- categories
would not be DRY.
A bitset_get_categories
function that gets the categories from the C++ class is the principled way to do it
from individual.
Related Issues (20)
- randomly sample bitset given fixed number of elements to retain HOT 3
- CRAN's LTO check issue HOT 1
- IntegerVariables return bad values if given out of bound bitsets HOT 1
- rendering `DoubleVariable` objects HOT 3
- [JOSS] plain LICENSE file not showing OSI conform text HOT 2
- [JOSS] Statement of need HOT 5
- Bug: can schedule targeted events with non finite numbers HOT 2
- Bug: queuing bad update for CategoricalVariable HOT 2
- Make the inverse/complement operator for bitsets `!` HOT 2
- variable reset update for DoubleVariable and IntegerVariable changes variable size HOT 5
- shadow variable benchmark HOT 4
- Bitset removal with indices HOT 4
- Remove deprecation warning for Bitset$not HOT 1
- Extend CategoricalVariable$queue_update() functionality to take a vector of values as input
- Documentation for Bitset$sample is misleading
- Difficulty installing https://github.com/mrc-ide/individual/tree/feat/logi_size on Linux machine
- Problem in linking to "individual" from another R package HOT 4
- Different formats for output data? HOT 6
- epidemics on networks HOT 10
- CategoricalVariable allows unspecified categories to be queued
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from individual.