Comment by lottin
6 months ago
A "pipe" is simply a composition of functions. Tidyverse adds a different syntax for doing function composition, using the pipe operator, which I don't particularly like. My general objection to Tidyverse is that it tries to reinvent everything but the end result is a language that is less practical and less transparent than standard R.
Can you rewrite some of those snippets in standard R w/o Tidyverse? Curious what it would look like
I didn't rewrite the whole thing. But here's the first part. It uses the `histogram` function from the lattice package.
The following code essentially redoes what the code up to the first conf_interval block does there. Which one is more clear may be debatable but it's shorter by a factor of two and faster by a factor of ten (45 seconds vs 4 for me).
One can do simple plots similar to the ones in that page as follows:
I mean, for the main simulation I would do it like this:
I am old, so I do not like tidyverse either -- I can concede it is of personal preference though. (Personally do not agree with the lattice vs ggplot comment for example.)