mod <- house()
temp <- tempfile(fileext = ".yaml")
mwrite_yaml(mod, file = temp)
# Note: this model is not compiled
mod <- mread_yaml(temp, model = "new-house", compile = FALSE)
mod
cppfile <- yaml_to_cpp(temp, project = tempdir())
readLines(cppfile)
Run the code above in your browser using DataLab