Skip to content
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

modify SIR model by 'odin::odin' #305

Open
CMSscu opened this issue Sep 1, 2023 · 1 comment
Open

modify SIR model by 'odin::odin' #305

CMSscu opened this issue Sep 1, 2023 · 1 comment

Comments

@CMSscu
Copy link

CMSscu commented Sep 1, 2023

Maybe a silly question. I can make sure that I have the most recent versions of everything:
dust 0.14.10
odin.dust 0.3.7
mcstate 0.9.17
odin 1.5.6
However, I'm still running into some problems using the "odin::odin" statement in the R software. I have installed R package "pkgbuild", but I still get an error when I run the following code (figure 1). And, I have followed the instructions to download the additional tools as shown in figure 2. Unfortunately, the code still doesn't work (as in figure 3). Is it because my computer lacks a C++ environment configuration? I would appreciate your guidance on how to make modifications.
gen <- odin::odin({ ylag <- delay(y, tau) initial(y) <- 0.5 deriv(y) <- 0.2 * ylag * 1 / (1 + ylag^10) - 0.1 * y tau <- user(10) output(ylag) <- ylag })
The error is:
Error: Could not find tools necessary to compile a package Call pkgbuild::check_build_tools(debug = TRUE) to diagnose the problem.
figure 1
figure 2
figure 3

@richfitz
Copy link
Member

richfitz commented Sep 1, 2023

This is an issue with your computer, or internet connection. Please see the errors you have copied for hints as to the solution; unfortunately none of them come from odin, so there is no guidance I can give here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants