-
Notifications
You must be signed in to change notification settings - Fork 0
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
vector format in defaults #188
Comments
I'm thinking about this stuff now. In the meantime, I feel like just passing ordinary numeric matrices either with or without names should be sufficient. The standard R |
Makes sense, not an urgent concern because I can work around this. I just tested using
I'm thinking it's common for people to work with |
Thanks @jfree-man. I'll think as well. Please put any notes you might have here. Thank you! |
setColnames <- function(x, nm) {
colnames(x) <- nm
return(x)
} Does that help? |
It helps to know this information. So we can't use matrices with |
When comparing the high and low-level calibration interfaces with different vector defaults,
To reproduce these results,
|
Thanks! Would you mind pasting outputs from example results in 2? |
Thanks Jen. I didn't even think about 2iii, and 2iv. But they are reasonable so thanks for adding them. |
I think we need a better way to pass vectors as defaults. Can we have an
mp_vector(y,labels)
function, that works similar tomp_zero_vector
for a numeric vectory
and optional character vector of labelslabels
if we want to givey
names or not. This function would return the vector in the correct format for the simulator.A first start would be to better document the types of objects that can be passed as defaults, because I think it's likely other users may need to read in defaults from external files, and getting these vectors into the right format for the simulator isn't obvious.
The hypothetical
mp_vector
function has optional labels because:names()
. Ex. if the specified model uses a state vector and individual state names in expressions. The object class of the vector, as well as attributes (names and dimnames) seem to determine whether the simulator will error or not. See here for some experiments/motivation for this.names()
. Ex. for the NFDS model, we read in an initial state vector from a csv file. This vector doesn't need labels because the state vector is ordered. I usedas.matrix()
andunname()
to get the vector in an acceptable format for the simulator.The text was updated successfully, but these errors were encountered: