{"id":1047,"name":"rSFSW2","description":"An R package to create soil water balance simulation experiment.","url":"https://github.com/DrylandEcology/rSFSW2","last_synced_at":"2026-04-07T17:01:20.696Z","repository":{"id":8136005,"uuid":"9554075","full_name":"DrylandEcology/rSFSW2","owner":"DrylandEcology","description":"rSFSW2: A R package to create soil water balance simulation experiment","archived":false,"fork":false,"pushed_at":"2026-02-24T22:23:13.000Z","size":58262,"stargazers_count":8,"open_issues_count":90,"forks_count":7,"subscribers_count":7,"default_branch":"main","last_synced_at":"2026-03-08T06:46:22.242Z","etag":null,"topics":["r","r-package","simulation-framework","soil-water-balance"],"latest_commit_sha":null,"homepage":"","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DrylandEcology.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2013-04-19T20:35:13.000Z","updated_at":"2023-09-08T16:38:57.000Z","dependencies_parsed_at":"2026-03-08T03:01:28.845Z","dependency_job_id":null,"html_url":"https://github.com/DrylandEcology/rSFSW2","commit_stats":{"total_commits":1934,"total_committers":15,"mean_commits":"128.93333333333334","dds":0.4963805584281282,"last_synced_commit":"efdd60ef2781f9350e9cb97b6a72f012dda1a06a"},"previous_names":[],"tags_count":68,"template":false,"template_full_name":null,"purl":"pkg:github/DrylandEcology/rSFSW2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DrylandEcology%2FrSFSW2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DrylandEcology%2FrSFSW2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DrylandEcology%2FrSFSW2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DrylandEcology%2FrSFSW2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DrylandEcology","download_url":"https://codeload.github.com/DrylandEcology/rSFSW2/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DrylandEcology%2FrSFSW2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30571146,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-16T06:02:37.763Z","status":"ssl_error","status_checked_at":"2026-03-16T06:02:14.913Z","response_time":96,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"owner":{"login":"DrylandEcology","name":"Dryland Ecology","uuid":"4193619","kind":"organization","description":"","email":null,"website":null,"location":null,"twitter":null,"company":null,"icon_url":"https://avatars.githubusercontent.com/u/4193619?v=4","repositories_count":27,"last_synced_at":"2024-03-27T03:52:15.849Z","metadata":{"has_sponsors_listing":false},"html_url":"https://github.com/DrylandEcology","funding_links":[],"total_stars":25,"followers":7,"following":0,"created_at":"2022-11-05T07:48:26.842Z","updated_at":"2024-03-27T03:52:16.351Z","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DrylandEcology","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DrylandEcology/repositories"},"packages":[],"commits":{"id":1254569,"full_name":"DrylandEcology/rSFSW2","default_branch":"master","total_commits":1934,"total_committers":15,"total_bot_commits":0,"total_bot_committers":0,"mean_commits":128.93333333333334,"dds":0.4963805584281282,"past_year_total_commits":0,"past_year_total_committers":0,"past_year_total_bot_commits":0,"past_year_total_bot_committers":0,"past_year_mean_commits":0.0,"past_year_dds":0.0,"last_synced_at":"2026-03-14T06:02:16.371Z","last_synced_commit":"efdd60ef2781f9350e9cb97b6a72f012dda1a06a","created_at":"2023-03-27T11:49:46.154Z","updated_at":"2026-03-14T06:00:53.502Z","committers":[{"name":"dschlaep","email":"daniel.schlaepfer@alumni.ethz.ch","login":"dschlaep","count":974},{"name":"dschlaep","email":"daniel.schlaepfer@unibas.ch","login":null,"count":555},{"name":"Ryan Murphy","email":"ryanmurf@gmail.com","login":"ryanmurf","count":137},{"name":"Zachary Kramer","email":"kramer.zachary.nau@gmail.com","login":"Zachary-Kramer","count":73},{"name":"candrews","email":"candrews@usgs.gov","login":"CaitlinA","count":46},{"name":"dschlaep","email":"dschlaep@uwyo.edu","login":null,"count":40},{"name":"charlieduso","email":"dusocharles@hotmail.com","login":null,"count":35},{"name":"Alexander Reeder","email":"alexreeder@bmac3170.nlu.unibas.ch","login":null,"count":24},{"name":"[CaitlinA]","email":"[candrews@usgs.gov]","login":null,"count":22},{"name":"nip5","email":"nip5@nau.edu","login":"nip5","count":21},{"name":"BrendenBe1","email":"brendenbe1@gmail.com","login":"BrendenBe1","count":2},{"name":"Ryan Murphy","email":"ryan@Aspire.(none)","login":null,"count":2},{"name":"Kyle Taylor","email":"kyle.a.taylor@gmail.com","login":"ktaylora","count":1},{"name":"kpalmqui","email":"kapalmqu@eo.uwyo.edu","login":null,"count":1},{"name":"CaitlinA","email":"candrews@IGSWZDWBLTSB181.gs.doi.net","login":null,"count":1}],"past_year_committers":[],"commits_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub/repositories/DrylandEcology%2FrSFSW2/commits","host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2026-03-16T00:00:25.424Z","repositories_count":6204197,"commits_count":934842857,"contributors_count":36185479,"owners_count":1149484,"icon_url":"https://github.com/github.png","host_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub/repositories"}},"issues_stats":{"full_name":"DrylandEcology/rSFSW2","html_url":"https://github.com/DrylandEcology/rSFSW2","last_synced_at":"2026-02-25T20:13:25.468Z","status":"active","issues_count":277,"pull_requests_count":114,"avg_time_to_close_issue":4357842.6875,"avg_time_to_close_pull_request":1200156.9816513762,"issues_closed_count":192,"pull_requests_closed_count":109,"pull_request_authors_count":6,"issue_authors_count":5,"avg_comments_per_issue":1.3429602888086642,"avg_comments_per_pull_request":1.5526315789473684,"merged_pull_requests_count":104,"bot_issues_count":0,"bot_pull_requests_count":0,"past_year_issues_count":0,"past_year_pull_requests_count":1,"past_year_avg_time_to_close_issue":null,"past_year_avg_time_to_close_pull_request":null,"past_year_issues_closed_count":0,"past_year_pull_requests_closed_count":0,"past_year_pull_request_authors_count":1,"past_year_issue_authors_count":0,"past_year_avg_comments_per_issue":null,"past_year_avg_comments_per_pull_request":0.0,"past_year_bot_issues_count":0,"past_year_bot_pull_requests_count":0,"past_year_merged_pull_requests_count":0,"created_at":"2023-05-09T10:40:42.012Z","updated_at":"2026-02-25T20:13:25.468Z","repository_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/DrylandEcology%2FrSFSW2","issues_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/DrylandEcology%2FrSFSW2/issues","issue_labels_count":{"bug":101,"enhancement":89,"in progress":83,"high priority":31,"question":13,"low priority":8,"reminder":1},"pull_request_labels_count":{"enhancement":5,"bug":1},"issue_author_associations_count":{"MEMBER":240,"CONTRIBUTOR":36,"NONE":1},"pull_request_author_associations_count":{"MEMBER":103,"CONTRIBUTOR":11},"issue_authors":{"dschlaep":213,"Zachary-Kramer":32,"CaitlinA":27,"nip5":4,"hrdawson":1},"pull_request_authors":{"dschlaep":91,"CaitlinA":12,"nip5":3,"Zachary-Kramer":3,"gopherchucks":3,"alexreeder":2},"host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2026-03-14T00:00:06.550Z","repositories_count":13709061,"issues_count":34648398,"pull_requests_count":113101382,"authors_count":11201822,"icon_url":"https://github.com/github.png","host_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories","owners_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/owners","authors_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors"},"past_year_issue_labels_count":{},"past_year_pull_request_labels_count":{},"past_year_issue_author_associations_count":{},"past_year_pull_request_author_associations_count":{"MEMBER":1},"past_year_issue_authors":{},"past_year_pull_request_authors":{"dschlaep":1},"maintainers":[{"login":"dschlaep","count":304,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/dschlaep"},{"login":"CaitlinA","count":39,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/CaitlinA"}],"active_maintainers":[{"login":"dschlaep","count":1,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/dschlaep"}]},"events":{"total":{"DeleteEvent":1,"PushEvent":9,"CreateEvent":1},"last_year":{"DeleteEvent":1,"PushEvent":6,"CreateEvent":1}},"keywords":["r","r-package","simulation-framework","soil-water-balance"],"dependencies":[{"ecosystem":"cran","filepath":"DESCRIPTION","sha":null,"kind":"manifest","created_at":"2022-08-24T13:39:40.728Z","updated_at":"2022-08-24T13:39:40.728Z","repository_link":"https://github.com/DrylandEcology/rSFSW2/blob/main/DESCRIPTION","dependencies":[{"id":2501911432,"package_name":"R","ecosystem":"cran","requirements":"\u003e= 3.5.0","direct":true,"kind":"depends","optional":false},{"id":2501911433,"package_name":"rSOILWAT2","ecosystem":"cran","requirements":"\u003e= 4.0.0","direct":true,"kind":"depends","optional":false},{"id":2501911434,"package_name":"rSW2utils","ecosystem":"cran","requirements":"*","direct":true,"kind":"depends","optional":false},{"id":2501911435,"package_name":"rSW2funs","ecosystem":"cran","requirements":"*","direct":true,"kind":"depends","optional":false},{"id":2501911436,"package_name":"RSQLite","ecosystem":"cran","requirements":"\u003e= 2.1.1","direct":true,"kind":"imports","optional":false},{"id":2501911437,"package_name":"raster","ecosystem":"cran","requirements":"\u003e= 2.5.8","direct":true,"kind":"imports","optional":false},{"id":2501911438,"package_name":"sp","ecosystem":"cran","requirements":"\u003e= 1.2.3","direct":true,"kind":"imports","optional":false},{"id":2501911439,"package_name":"methods","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":2501911440,"package_name":"Rmpi","ecosystem":"cran","requirements":"\u003e= 0.6","direct":true,"kind":"suggests","optional":false},{"id":2501911441,"package_name":"parallel","ecosystem":"cran","requirements":"*","direct":true,"kind":"suggests","optional":false},{"id":2501911442,"package_name":"rgdal","ecosystem":"cran","requirements":"\u003e= 1.1.10","direct":true,"kind":"suggests","optional":false},{"id":2501911443,"package_name":"rgeos","ecosystem":"cran","requirements":"\u003e= 0.3.19","direct":true,"kind":"suggests","optional":false},{"id":2501911444,"package_name":"ncdf4","ecosystem":"cran","requirements":"\u003e= 1.15","direct":true,"kind":"suggests","optional":false},{"id":2501911445,"package_name":"RCurl","ecosystem":"cran","requirements":"\u003e= 1.95.4.8","direct":true,"kind":"suggests","optional":false},{"id":2501911446,"package_name":"fastmatch","ecosystem":"cran","requirements":"\u003e= 1.0.4","direct":true,"kind":"suggests","optional":false},{"id":2501911447,"package_name":"iotools","ecosystem":"cran","requirements":"\u003e= 0.1","direct":true,"kind":"suggests","optional":false},{"id":2501911448,"package_name":"Hmisc","ecosystem":"cran","requirements":"\u003e= 4.0","direct":true,"kind":"suggests","optional":false},{"id":2501911449,"package_name":"SPEI","ecosystem":"cran","requirements":"\u003e= 1.6","direct":true,"kind":"suggests","optional":false},{"id":2501911450,"package_name":"qmap","ecosystem":"cran","requirements":"\u003e= 1.0.4","direct":true,"kind":"suggests","optional":false},{"id":2501911451,"package_name":"daymetr","ecosystem":"cran","requirements":"\u003e= 1.3.1","direct":true,"kind":"suggests","optional":false},{"id":2501911452,"package_name":"weathergen","ecosystem":"cran","requirements":"\u003e= 0.1.2","direct":true,"kind":"suggests","optional":false},{"id":2501911453,"package_name":"lubridate","ecosystem":"cran","requirements":"*","direct":true,"kind":"suggests","optional":false},{"id":2501911454,"package_name":"zoo","ecosystem":"cran","requirements":"*","direct":true,"kind":"suggests","optional":false},{"id":2501911455,"package_name":"dplyr","ecosystem":"cran","requirements":"*","direct":true,"kind":"suggests","optional":false},{"id":2501911456,"package_name":"knitr","ecosystem":"cran","requirements":"*","direct":true,"kind":"suggests","optional":false},{"id":2501911457,"package_name":"rmarkdown","ecosystem":"cran","requirements":"*","direct":true,"kind":"suggests","optional":false},{"id":2501911458,"package_name":"testthat","ecosystem":"cran","requirements":"\u003e= 2.0.0","direct":true,"kind":"suggests","optional":false},{"id":2501911459,"package_name":"spelling","ecosystem":"cran","requirements":"\u003e= 1.1","direct":true,"kind":"suggests","optional":false},{"id":2501911460,"package_name":"hunspell","ecosystem":"cran","requirements":"\u003e= 2.9","direct":true,"kind":"suggests","optional":false},{"id":2501911461,"package_name":"covr","ecosystem":"cran","requirements":"*","direct":true,"kind":"suggests","optional":false},{"id":2501911462,"package_name":"lintr","ecosystem":"cran","requirements":"\u003e= 2.0.0","direct":true,"kind":"suggests","optional":false},{"id":2501911463,"package_name":"goodpractice","ecosystem":"cran","requirements":"*","direct":true,"kind":"suggests","optional":false},{"id":2501911464,"package_name":"pkgload","ecosystem":"cran","requirements":"*","direct":true,"kind":"suggests","optional":false}]}],"score":7.293017679772783,"created_at":"2023-09-11T11:54:36.752Z","updated_at":"2026-04-07T17:01:20.720Z","avatar_url":"https://github.com/DrylandEcology.png","language":"R","category":"Natural Resources","sub_category":"Soil and Land","monthly_downloads":0,"total_dependent_repos":0,"total_dependent_packages":0,"readme":"\n| Unix | Windows | Release | License | Coverage | Downloads |\n| :---- | :---- | :---- | :---- | :---- | :---- |\n[ ![Travis build status][1]][2] | [![Appveyor build status][3]][4] | [ ![github release][5]][6] | [![license][7]][8] | [![codecov status][9]][10] | [![github downloads][11]][12] |\n\n[1]: https://travis-ci.org/DrylandEcology/rSFSW2.svg?branch=master\n[2]: https://travis-ci.org/DrylandEcology/rSFSW2\n[3]: https://ci.appveyor.com/api/projects/status/die00t8rjjhrb8i0/branch/master?svg=true\n[4]: https://ci.appveyor.com/project/dschlaep/rSFSW2/branch/master\n[5]: https://img.shields.io/github/release/DrylandEcology/rSFSW2.svg?label=current+release\n[6]: https://github.com/DrylandEcology/rSFSW2/releases\n[7]: https://img.shields.io/github/license/DrylandEcology/rSFSW2.svg\n[8]: https://www.gnu.org/licenses/gpl.html\n[9]: https://codecov.io/gh/DrylandEcology/rSFSW2/branch/master/graph/badge.svg\n[10]: https://codecov.io/gh/DrylandEcology/rSFSW2\n[11]: https://img.shields.io/github/downloads/DrylandEcology/rSFSW2/total.svg\n[12]: https://github.com/DrylandEcology/rSFSW2\n\n\u003cbr\u003e\n\n# rSFSW2: A R package to create soil water balance simulation experiment\n\nPlease cite the package if you publish results based on simulations carried\nout with our package, see `citation(\"rSFSW2\")`, and we would like to hear\nabout your publication.\n\nSome other references\n\n* Bradford, J. B., D. R. Schlaepfer, and W. K. Lauenroth. 2014. Ecohydrology of\n  adjacent sagebrush and lodgepole pine ecosystems: The consequences of climate\n  change and disturbance. Ecosystems 17:590-605.\n* Palmquist, K.A., Schlaepfer, D.R., Bradford, J.B., and Lauenroth, W.K. 2016.\n  Mid-latitude shrub steppe plant communities: climate change consequences for\n  soil water resources. Ecology 97:2342-2354.\n* Schlaepfer, D. R., W. K. Lauenroth, and J. B. Bradford. 2012. Ecohydrological\n  niche of sagebrush ecosystems. Ecohydrology 5:453-466.\n\n\n### Obtain the source package\n\nThere are several options:\n\n- Download the\n  [package zip file](https://github.com/DrylandEcology/rSFSW2/archive/master.zip)\n  via your web browser.\n\n- Use git to clone\n  ```\n  git clone -b master --single-branch https://github.com/DrylandEcology/rSFSW2.git rSFSW2\n  ```\n\n- Use git to clone step by step\n  ```\n  git clone https://github.com/DrylandEcology/rSFSW2.git rSFSW2\n  cd rSFSW2/\n  git checkout master\n  ```\n\n### Installation\n\n'rSFSW2' will compile some c code via 'Rcpp'. Your computer must be set up\nadequately.\n- If you use a Windows OS, then you need the\n  [Rtools](https://cran.r-project.org/bin/windows/Rtools/)\n  installed that match your R version; please find further information for\n  instance [here](https://www.biostat.wisc.edu/~kbroman/Rintro/Rwinpack.html).\n- If you use a macOS, then you need [Xcode](https://developer.apple.com/xcode/)\n  and its\n  [command-line tools](https://developer.apple.com/library/content/technotes/tn2339/_index.html)\n  installed; please find further information for instance\n  [here](https://railsapps.github.io/xcode-command-line-tools.html).\n\n\nAfter you downloaded the source package, run\n```\nR CMD INSTALL rSFSW2\n```\n\nOr do all at once from within R:\n```{r}\nsystem2(command = \"git\", args = \"clone -b master --single-branch https://github.com/DrylandEcology/rSFSW2.git rSFSW2\")\ntools::Rcmd(args = paste(\"INSTALL rSFSW2\"))\n```\n\n### Binary package version\nIf you want a binary version of the 'rSFSW2' package (e.g., to distribute to\nsomeone without development tools) for a platform to which you do not have\naccess, then you may consider using one of the cloud services (no endorsements):\n- [r-hub](https://builder.r-hub.io) offers different Linux, Windows, and mac OS\n  flavors as targets\n- [win-builder](https://win-builder.r-project.org/) offers Windows OS as target\n\nAlternatively, you may access the previous binary package version for Windows\nOS from our CI appveyor service if the build was successful and an artifact was\ngenerated for the binary package (this would be named 'rSWSF2_X.Y.Z.zip' with\nversion number X.Y.Z) from\n[here](https://ci.appveyor.com/project/dschlaep/rSFSW2/build/artifacts).\nIf the latest build should have failed, then you may want to check out the\n'History' tab for binaries of older versions.\n\n\n\u003cbr\u003e\n\n# Use rSFSW2 for your simulation project\n\nFamiliarize yourself with the demos and information at ```package?rSFSW2```\nas well as FAQs with ```vignette(\"rSFSW2_FAQs\", package = \"rSFSW2\")```.\n\n__Setup a new simulation project__:\n1) Install and attach 'rSFSW2' if not already done so (Note: required version\n   of rSOILWAT2 must already be present)\n2) Create a skeleton project `setup_rSFSW2_project_infrastructure(dir_prj =\n   \"path/to/project_folder\")\n   - This function will copy a default version of '1_Input' and the three\n   demo R files to your directory\n3) Work your way through 'SFSW2_project_code.R', i.e., define paths and actions,\n   and provide simulation project description in 'SFSW2_project_descriptions.R'\n   and run settings in 'SFSW2_project_settings.R'\n\n\n\u003cbr\u003e\n\n# How to contribute\nYou can contribute to this project in different ways:\n\n1. Reporting [issues](https://github.com/DrylandEcology/rSFSW2/issues)\n2. Contributing code following our\n   [protocols/guidelines](https://github.com/DrylandEcology/DrylandEcologyProtocols)\n   and sending a\n   [pull request](https://github.com/DrylandEcology/rSFSW2/pulls)\n\n\u003cbr\u003e\n\n### __Code development: Tests, documentation, and code__ form a trinity\n\n- __Code style__\n  * Use code style that passes our\n    [`lintr`](https://github.com/jimhester/lintr) unit tests\n    which basically reflect\n    [Hadley's style recommendation](http://r-pkgs.had.co.nz/r.html#style).\n    Note: we require `lintr v1.0.2.900` or later.\n  * Use 2-spaces instead of tabs and indent code hierarchically\n  * Note, many function and variable names are \"ancient\" (too long; combine\n    snake and camel-case)\n\n- __Updates to input files and/or demo code__\n  * If `SOILWAT2` and `rSOILWAT2` change their `default` inputs, then `rSFSW2`\n    will automatically experience these changes through function\n    `read_SOILWAT2_DefaultInputs`. This function may need to be updated\n    accordingly to provide suitable `defaults` for `rSFSW2` runs.\n  * If you change 'input files' in `data-raw/1_Input` (e.g., added a new column\n    to experimental/design treatment file) then update the `R/sysdata.rda`\n    object by running the Rscript from terminal\n    `./data-raw/prepare_default_project_infrastructure.R`.\n    The file `R/sysdata.rda` is used to setup a new simulation project.\n  * Additionally, if 'input files' and/or 'demo code' in `demo/` changes, then\n    update the unit test 'test project' `tests/test_data/TestPrj4/` by\n    running the Rscript from terminal\n    `./data-raw/update_test_project_infrastructure.R` and make any necessary\n    additional changes by hand.\n\n- __Interactive code development__\n  * Use (a copy of) `tests/test_data/TestPrj4/` as basis to interact with code\n    and a real simulation project, for instance:\n    ```{r}\n    library(\"devtools\")\n    load_all()\n    setwd(\"rSFSW2/tests/test_data/TestPrj4/\")\n\n    # Adjust inputs if necessary and insert break points (e.g., calls to\n    # `browser()` or `stop()`) if needed\n    source(\"SFSW2_project_code.R\") # run `TestPrj4` and stop where you need it\n\n    # Develop/debug code\n    # e.g., compare output with reference as if running `tests()`:\n    compare_two_dbOutput(\"../0_ReferenceOutput/dbOutput_TestPrj4_v2.7.4.sqlite3\", \"4_Simulation/dbOutput.sqlite3\")\n\n    # Clean up `TestPrj4/`\n    delete_test_output(dir_test = \".\")\n    ```\n\n  * *Do not* commit, please:\n    * Any changes to settings/inputs etc. in your local copy unless those\n      changes are a feature of your coding task\n    * Do not comment/turn-off any tests and/or checks\n    * Print statements for local debugging purposes\n    * Package bundles or binaries (e.g., as from `R CMD build`)\n    * Package check reports (e.g., as from `R CMD check`)\n    * Built vignettes\n    * etc\n\n\n- __Code documentation__\n  * Read the section 'Object documentation' in\n    [Wickham's book 'R packages'](http://r-pkgs.had.co.nz/man.html)\n  * Use [roxygen2](https://CRAN.R-project.org/package=roxygen2/vignettes/formatting.html)\n    to write inline code documentation\n  * Update help pages and NAMESPACE with the command `devtools::document()`;\n    note: you may need to compile dynamic libraries first with\n    `pkgbuild::compile_dll()`.\n  * Ideally, add examples to function documentation and check these examples\n    with the command `devtools::run_examples()`.\n    Note: \"devtools\" v2.0.1 mixed up the logic for \"dontrun\" examples (see\n    https://github.com/r-lib/devtools/issues/2003); until this is fixed,\n    use `devtools::run_examples(run = FALSE)`.\n  * Ideally, expand and/or add vignettes.\n\n\n- __Code tests__\n  * Notes:\n    * Our code coverage is incomplete as of now at [![codecov status][9]][10];\n      thus, any change may introduce bugs that may not be detected by our\n      testing framework.\n    * Please be careful and considerate and strive to write tests for any new\n      feature.\n    * Our tests behave differently depending on several run-time conditions:\n      1) Level of verbosity is determined by interactive/non-interactive status\n         whether or not simulations are run in parallel (non-interactive) or\n         sequentially (interactive),\n      2) Simulation runs are processed in parallel if session is\n         non-interactive, not on travis-ci, not on appveyor-ci, and not on CRAN\n         whereas they are processed sequentially if session is interactive,\n         on travis-ci, on appveyor-ci, or on CRAN\n      3) Live access to the internet is required by some unit tests, e.g.,\n         `tests/testthat/test_netCDF_functions.R` and\n         `tests/testthat/test_WeatherDB_DayMet.R`\n      4) Some unit tests are skipped if on CRAN, and/or on travis-ci, and/or\n         on appveyor-ci, e.g.,\n         `test/testthat/test_rSFSW2_Spelling.R` and\n         `test/testthat/test_rSFSW2_CodeStylePractices.R`\n\n  * __Test code locally during code development:__\n    * Interactive execution and exploration\n    * Interactive execution of individual expectations `expect_*` and/or\n      `test_that()` statements; write new expectations at the same time as\n      writing and developing code.\n    * Run tests from an individual test file with `testthat::test_file()`\n        - You may likely need to first load the latest code version with\n          `devtools::load_all()` for R code, and with\n          `devtools::load_all(recompile = TRUE)` if your changes include C code\n        - Most likely, this will run tests as if on CRAN (depending on your\n          specific setup), i.e., it will skip several of our tests:\n           * it is set as `NOT_CRAN=\"true\"` if run with:\n              * `devtools::test()` unless `NOT_CRAN` was previously set\n              * `devtools::check(cran = FALSE)`\n              * `R CMD check *tar.gz`\n           * it is set as `NOT_CRAN=\"false\"` (i.e, behaving as if run on CRAN)\n           if run with:\n              * `Sys.setenv(NOT_CRAN = \"false\"); devtools::test()`\n              * `devtools::check(cran = TRUE)`\n              * `R CMD check *tar.gz --as-cran`\n\n        - If you don't like the output format of the tests (which differs\n          depending on whether you run R interactively or not, whether you run\n          R via RStudio or not, etc.), then chose a testthat-'reporter'\n          explicitly, e.g., `testthat::test_file(reporter = SummaryReporter)`\n    * Run all tests together with `testthat::test()`, but it is a waste of time\n      and resources to re-run tests again and again during development\n      that are not affected by your code changes\n    * Currently defunct: Ideally, run test projects in repository\n      [rSFSW2_tools](https://github.com/DrylandEcology/rSFSW2_tools)\n      and add a new test project, if necessary due to new features.\n\n  * __Run the following steps locally__\n    in order to prepare a pull-request or commit that will be reviewed.\n    Fix any problem and repeat as necessary.\n\n    1. Make sure that the anticipated version of `rSOILWAT2` is indeed\n       installed, e.g.,\n       ```{r}\n       packageVersion(\"rSOILWAT2\")\n       ```\n\n    1. Make sure that the documentation is up-to-date with:\n       ```{r}\n       pkgbuild::compile_dll()\n       devtools::document()\n       ```\n\n    1. Run and check the code from the examples and vignettes:\n       ```{r}\n       devtools::run_examples()\n       ```\n       Note: \"devtools\" v2.0.1 mixed up the logic for \"dontrun\" examples (see\n       https://github.com/r-lib/devtools/issues/2003); until this is fixed,\n       use `devtools::run_examples(run = FALSE)`.\n\n    1. Run tests as if not on CRAN, in an interactive R session,\n       and with a sequential schedule.\n       ```{r}\n       # Run in R.app, RStudio, or in an R terminal-session:\n       Sys.setenv(NOT_CRAN = \"true\")\n       devtools::test()\n       ```\n       Notes:\n        - Make sure that no test is skipped. Investigate if any is skipped.\n        - Investigate if any warning is reported.\n        - This combines unit tests, documentation and code-style checks,\n          and integration tests (e.g., `TestPrj4`); the latter two take a\n          substantial amount of time to complete.\n       The environmental variable `RSFSW2_ALLTESTS` determines whether or not\n       long-running expectations/unit-tests are skipped; the default is \"true\",\n       i.e., run all expectations/unit-tests. You may decide to run tests\n       while temporary skipping time-intensive tests, e.g.,\n       - `Sys.setenv(RSFSW2_ALLTESTS = \"false\"); devtools::test()`\n       - `RSFSW2_ALLTESTS=\"false\" R CMD check *tar.gz`\n\n    1. Run tests as if not on CRAN, in an non-interactive session,\n       and with a parallel schedule.\n       ```{bash}\n       # Run via shell in the terminal:\n       R CMD INSTALL .\n       Rscript -e 'Sys.setenv(NOT_CRAN = \"true\"); devtools::test()'\n       ```\n       Notes:\n        - Parallel workers will load the package `rSFSW2` \"normally\", i.e.,\n          from the R library path. Thus, the workers do not see the development\n          version. Therefore, we need to install the current version before\n          running tests in parallel.\n          You can convince yourself of this by first removing `rSFSW2` with\n          `remove.packages(\"rSFSW2\")` and then run above command -- the tests\n          will fail with errors such as `object 'SFSW2_glovars' not found` or\n          `all(tp[[\"res\"]][, \"has_run\"]) isn't true`.\n        - Make sure that the integration test (e.g., `TestPrj4`) was indeed run\n          in parallel (output reports on the number of workers).\n\n    1. The environmental variable `RSFSW2_SAVETESTS` determines whether or not\n       the otherwise invisible internal `testthat` results are saved to file\n       which can be useful for debugging; the default is \"true\" in\n       non-interactive mode, i.e., save results, and \"false\" in interactive\n       mode.\n       To set it to true, e.g.,\n         * `Sys.setenv(RSFSW2_SAVETESTS = \"true\"); devtools::test()`\n         * `RSFSW2_SAVETESTS=\"true\" R CMD check *tar.gz`\n\n       To illustrate how to read in such reporter output and display\n       its content (note: you may need to adjust the file path):\n       ```{r}\n         utres \u003c- readRDS(file.path(\"rSFSW2.Rcheck\", \"tests\", \"testthat_results.rds\"))\n         r \u003c- ListReporter$new()\n         r$start_reporter()\n         force(utres) # print test results with `ListReporter`\n         r$end_reporter()\n\n         utres[[1]] # explore results of first set of tests\n       ```\n\n\n\n    1. Run R package-level checks as if on CRAN.\n       ```{r}\n       # Run in R.app, RStudio, or in an R terminal-session:\n       Sys.setenv(NOT_CRAN = \"false\")\n       devtools::check(cran = TRUE)\n       ```\n       Notes:\n        - Avoid adding new `R CMD check` warnings and/or notes; see, milestone\n          [Clean code](https://github.com/DrylandEcology/rSFSW2/milestone/2)\n\n\n    __Notes__: The above steps can also be executed with different commands\n    and there are more combinations that could be tested. For instance, you\n    could use `R CMD` instead of `devtools::check`, e.g., see\n    [Writing R Extensions](https://cran.r-project.org/doc/manuals/R-exts.html).\n    As an example, R-package level checks could also be run with:\n    ```{bash}\n    R CMD build . \u0026\u0026 R CMD check *tar.gz\n    ```\n    Unless the build-step fails due to latex-troubles while building the\n    vignette and/or help pages, then maybe:\n    ```{bash}\n    R CMD build --no-build-vignettes --no-manual .\n    R CMD check *tar.gz --ignore-vignettes --no-manual\n    ```\n    You could also pass the argument `--as-cran` to `R CMD check` to simulate\n    checks as if on CRAN.\n\n    1. Fix any problem and repeat.\n\n\n  * On github:\n    * The command-line checks which include our unit tests will be run on the\n      continuous integration frameworks 'travis' and 'appveyor'\n    * Development/feature branches can only be merged into master if they pass\n      all checks\n    * Ideally, each pull-request will include fully-tested changes, at least\n      they should be as thoroughly tested as master so that overall code\n      coverage after merging into master does not decrease.\n    * Please, don't use the CIs for debugging -- debug locally\n\n  * We use the framework of [testthat](https://github.com/hadley/testthat) for\n    unit testing and other tests for the package\n\n  * Read the section 'Testing' in\n    [Wickham's book 'R packages'](http://r-pkgs.had.co.nz/tests.html)\n    for additional information\n\n\n\u003cbr\u003e\n\n# Code of conduct\nPlease note that this project is released with a\n[Contributor Code of Conduct](CONDUCT.md). By participating in this project you\nagree to abide by its terms.\n\n\n\u003cbr\u003e\n\n# Funding\nWork on this package has been supported by various funds managed by\nDr. Bill Lauenroth (Yale University), Dr. John Bradford (USGS), and\nDr. Daniel Schlaepfer.\n\n\n\u003cbr\u003e\n\n# License\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, [version 3 of the License](LICENSE).\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n\n\n\u003cbr\u003e\n\n# Notes\n\n__Organization renamed from Burke-Lauenroth-Lab to DrylandEcology on Dec 22, 2017__\n\nAll existing information should\n[automatically be redirected](https://help.github.com/articles/renaming-a-repository/) to the new name.\nContributors are encouraged, however, to update local clones to [point to the new URL](https://help.github.com/articles/changing-a-remote-s-url/), i.e.,\n```\ngit remote set-url origin https://github.com/DrylandEcology/rSFSW2.git\n```\n\n\n__Repository renamed from SoilWat_R_Wrapper to rSFSW2 on Feb 23, 2017__\nAll existing information should [automatically be redirected](https://help.github.com/articles/renaming-a-repository/) to the new name.\nContributors are encouraged, however, to update local clones to [point to the new URL](https://help.github.com/articles/changing-a-remote-s-url/), i.e.,\n```\ngit remote set-url origin https://github.com/DrylandEcology/rSFSW2.git\n```\n","funding_links":[],"readme_doi_urls":[],"works":{},"citation_counts":{},"total_citations":0,"keywords_from_contributors":["simulation-model"],"project_url":"https://ost.ecosyste.ms/api/v1/projects/1047","html_url":"https://ost.ecosyste.ms/projects/1047"}