nutterb / HydeNet

Hybrid Decision Networks in R
Other
23 stars 3 forks source link

Need an escape in `writeJagsModel` to ... #72

Closed nutterb closed 9 years ago

nutterb commented 9 years ago

allow using the node types not accounted for.

writeJagsModel handles dbern, dcat, dnorm, and dpois, which satisfies all of the major model types, but anything else that might get specified in a custom manner won't go through.

I just tried to do an example with a node defined

setNode(net, x2, 
    nodeType = 'dexp',
    lambda = 4)

and it wouldn't work because writeJagsModel doesn't have the facilities to write x2 ~ dexp(lambda = 4).

This should be a quick fix. I'll toss it in and test it a little before submitting to CRAN. I think the bigger issue we'll hit is it won't know what to do with a model, or with fromData() or fromFormula(), but we can cross that bridge later.

nutterb commented 9 years ago

In my basic testing, this is resolved. I will reopen if I come across any errors.