You are already testing, but likely in a non-systematic way: you write a function, run it, and see its output on the console to check check if it's right. You will save you a lot of time if you test systematically, with an automatic unit testing system such as the testthat package. To use testthat run:
usethis::use_testthat()
Then you will see tests/ in the root directory of your package. Then you add new tests with:
From @maurolepore on September 18, 2018 15:12
You are already testing, but likely in a non-systematic way: you write a function, run it, and see its output on the console to check check if it's right. You will save you a lot of time if you test systematically, with an automatic unit testing system such as the testthat package. To use testthat run:
Then you will see
tests/
in the root directory of your package. Then you add new tests with:This video shows the testing workflow: https://youtu.be/Ajtfdc2hnxo
_Copied from original issue: ervanSTRI/AGBfluxpack#10