Closed jarrod-dalton closed 9 years ago
I think I fixed it, but you should review. The problem was that we were doing logic on the nodeFitter
list elements but sometimes they were NULL.
So I just put a little bitwise and in there to first ensure that the nodeFitter element is populated before checking its equivalence to "cpt".
#*** Type 'dcat'
else if (network$nodeType[[node_str]] == "dcat"){
if (length(network$nodeFitter[[node_str]]) > 0 && network$nodeFitter[[node_str]] == "cpt"){
I changed length(network$nodeFitter[[node_str]]) > 0
to !is.null(network$nodeFitter[[node_str]])
, but otherwise, this checks out.
The error message is from a call to
writeNetworkModel()
but the problem is apparently inwriteJagsModel()
.