I use sapply all the time to transform data all the time. It tends to be less code (no counter, no output initialisation ) and easier to follow if that style is familiar.
I am curious now, what do you use instead of lapply (or other *apply variants)?
There is also this in the futureverse if you like for loop style code more:
library(doFuture)
plan(multisession)
y <- foreach(x = 1:4, y = 1:10) %dofuture% {
z <- x + y
slow_sqrt(z)
}
https://dofuture.futureverse.org/
Re:Coloring in R's Blind Spot
by Dylan16807 on Thursday May 11, 2023 @04:12PM
(#35907764)
> just
This isn't documentation or a guide or helping someone.
It's a friendly competition between languages so it gets to use the perspective of someone that's familiar with things.
> just
https://justsimply.dev/