# NOT RUN {
## Use the model parser to create a 'SimInf_mparse' object that
## expresses an SIR model, where 'b' is the transmission rate and
## 'g' is the recovery rate.
m <- mparse(c("S -> b*S*I/(S+I+R) -> I", "I -> g*I -> R"),
c("S", "I", "R"), b = 0.16, g = 0.077)
## View the C code.
C_code(m)
## Modify the C code for a package named "XYZ"
C_code(m, "XYZ")
# }
Run the code above in your browser using DataLab