News for hackers. Stuff that matters.
Re:R is a joy if you treat it like Awk by lliamander on Monday October 07, 2019 @06:18PM (#21186587)
It the little bits of R programming I've done, the biggest pain for me was debugging. If something fails, I had no idea what line of code the error happened. Since some of the functions were rather long, step-wise debugging was laborious.
Re:R is a joy if you treat it like Awk by scottlocklin on Monday October 07, 2019 @07:27PM (#21187085)
Yeah, I had this problem until I discovered options(error=recover) which drops you into a nice lispy stack. And ya, someone told me about it: I don't know where you'd read about such things. There's probably a dozen alternatives I also don't know where to read about.
Re:R is a joy if you treat it like Awk by Eugeleo on Tuesday October 08, 2019 @12:25PM (#21193959)
Theres a pretty nice chapter on debugging in the great book Advanced R [1]. Hadley for the rescue! (As is commonplace in the context of R)

[1]: https://adv-r.hadley.nz/debugging.html

Re:R is a joy if you treat it like Awk by eliashaddad on Thursday October 10, 2019 @10:28AM (#21214891)
Besides the aforementioned browser(), try() and tryCatch(), you would check the packages assertive and assertr to guarantee the expected inputs, and testthat to create tests for your scripts. All awesome.
Re:R is a joy if you treat it like Awk by gbrown on Monday October 07, 2019 @08:07PM (#21187347)
It's got tryCatch, and the browser function works wonders.