I agree with Naupaka that it is a bit advanced. However, the package `testthat` is not for defensive programming per se, but for unit tests. For defensive programming specifically there is the `assertive` and `assertr` packages. However, unlike Python, the facilities for defensive programming are not as well developed in R and are a bit unwieldy. Considering programming is not often done in R for a larger user base but rather for data analysis at a individual researcher/team level, I don't think it is worthwhile to add too much/anything to the defensive programming for R. The lessons are packed enough as it is.
In addition to that, most people coming to the R workshops are looking to learn about data and statistical analysis. Defensive programming is something they would likely never use. I've used R for several years and develop a few packages and even I very rarely use these defensive facilities. Just my two cents. Luke On 2016-09-30 12:52 PM, Naupaka Zimmerman wrote: > > Hi Raniere - > > I think it isn't a part of the materials because it's a bit advanced > for the usual audience level. But that's not to say it wouldn't be > nice to have. I imagine such a lesson could intro the base assertion > functions like |stopifnot()| and also Hadley's testthat package. PRs > welcome! > > Best, > Naupaka > > On 30 Sep 2016, at 8:19, Raniere Silva wrote: > > Hi all, > on our Programming with Python, > http://swcarpentry.github.io/python-novice-inflammation/08-defensive/, > > we have a "Defensive Programming" section. > This section is missing on the R lesson. > Any experience R instructor can let me know why? > And if you have your "translation" of that lesson in R > could you send me a copy of it? > Cheers, > Raniere > _______________________________________________ > Discuss mailing list > [email protected] > > http://lists.software-carpentry.org/listinfo/discuss > > > > _______________________________________________ > Discuss mailing list > [email protected] > http://lists.software-carpentry.org/listinfo/discuss
_______________________________________________ Discuss mailing list [email protected] http://lists.software-carpentry.org/listinfo/discuss
