News for hackers. Stuff that matters.
Re:R: Introduction to Data Science by acc_297 on Saturday March 02, 2024 @08:12AM (#39572301)
Pk/PD work for pharmaceutical data analysis I didn’t like using R at first but I’ve come to appreciate the speed that comes with months of experience.

It’s a language which feels like it has a lot of magical incantations you need to remember - the default namespace is much more crowded. Functions like sapply vs mapply are tricky to reason about from the documentation alone. The values NA vs Null vs integer(0) are all used as standins for real thrown errors and knowing which one to check for after calling a function can be tough.

But after using it for a few hundred hours to do data processing and statistical regression it’s hard to imagine python or Julia being faster to use. But in all honesty for the pharmaceutical industry it’s mostly momentum that keeps R on top same reason they use a lot of FORTRAN90.

Re:R: Introduction to Data Science by klmr on Saturday March 02, 2024 @09:20AM (#39572703)
> But in all honesty for the pharmaceutical industry it’s mostly momentum that keeps R on top

I can’t agree with this: especially in PK/PD, R is only just now taking over from the previous (closed-source) systems. Momentum would keep R out, not in.

Re:R: Introduction to Data Science by nutshell42 on Saturday March 02, 2024 @05:12PM (#39576225)
> Functions like sapply vs mapply are tricky to reason about from the documentation alone.

Could you please expand on that? It's unclear what you're referring to.

> The values NA vs Null vs integer(0) are all used as standins for real thrown errors and knowing which one to check for after calling a function can be tough.

`checkmate::assert_numeric()` (or similar)

with base R you want isTRUE():

`stopifnot(isTRUE(is.finite(x)))` (or is.na or anything else) will error on empty values.

Re:R: Introduction to Data Science by acc_297 on Sunday March 03, 2024 @09:34AM (#39581052)
I’ll check out those assert functions and I only meant that having apply,lapply,sapply,mapply took some getting used to most programming languages I had used prior include only 1 map / apply function and it’s still not clicking for me when there are performance penalties choosing one over another although I’ve read in the documentation that there are pros and cons