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

replace current check of other modules run with suggestModule() package function #8

Open
cboisvenue opened this issue Feb 24, 2021 · 1 comment

Comments

@cboisvenue
Copy link
Contributor

Eliot and Celine built a function is intended to check in certain modules were run before the current module. Not sure where with function went (suggestModule()) in the SpaDES world, but it needs to replace line 270-281 in the CBM_core.R.

@cboisvenue
Copy link
Contributor Author

cboisvenue commented Feb 24, 2021

  io <- inputObjects(sim, currentModule(sim))
  objectNamesExpected <- io$objectName
  available <- objectNamesExpected %in% ls(sim)
  if (any(!available)) {
    stop(
      "The inputObjects for CBM_core are not all available:",
      "These are missing:", paste(objectNamesExpected[!available], collapse = ", "),
      ". \n\nHave you run ",
      paste0("spadesCBM", c("defaults", "inputs", "m3ToBiomass"), collapse = ", "),
      "?"
    )
  }

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

1 participant