Live data from Hacker News

R Markdown: The Definitive Guide

bookdown.org

31–40 of 61 posts

Re: R Markdown: The Definitive Guide

#31
post #10

Earlier quoted context omitted.

Funny thing is this has actually motivated me to move away from using rmarkdown. To the point that I went "backwards" and wrote several reports and an academic paper in Sweave after using rmarkdown for years. My primary motivation was that I needed to know the documents could be built by any R session, not just from within RStudio. I didn't want to be in a situation where my "reproducible" document relied on a specif…

I'm all for finding alternatives to RStudio's dominance in the R space. No doubt they do some excellent things, but I also have a vague uneasiness at the cultishness surrounding some of their products. It sometimes feels like if you're not using the 'tidyverse', you're viewed as doing it wrong. Anyway, this feeling set me off on an exploration of alternative tools and packages. Instead of rmarkdown I'm now exploring…

For me part of the cultish ness is justified because I have to teach about 100 non programmers to use R and rmd every year. Tidyverse solves the big problem that R used to have was that there were hundreds of ways to do things, none of the functions had consistent naming or calling signatures and it was hard to Google sensible answers. Tidyvers is fast, consistent and has good docs. Pipes discourage lots of mutable state which is a major cause of errors in non programmers code. I think if you are going to be sharing your code with other researchers and are not using tidyverse then These days I think you basically are doing it wrong.

Re: R Markdown: The Definitive Guide

#32
post #10

Earlier quoted context omitted.

Funny thing is this has actually motivated me to move away from using rmarkdown. To the point that I went "backwards" and wrote several reports and an academic paper in Sweave after using rmarkdown for years. My primary motivation was that I needed to know the documents could be built by any R session, not just from within RStudio. I didn't want to be in a situation where my "reproducible" document relied on a specif…

I'm all for finding alternatives to RStudio's dominance in the R space. No doubt they do some excellent things, but I also have a vague uneasiness at the cultishness surrounding some of their products. It sometimes feels like if you're not using the 'tidyverse', you're viewed as doing it wrong. Anyway, this feeling set me off on an exploration of alternative tools and packages. Instead of rmarkdown I'm now exploring…

As someone who learnt R before tidyverse was a thing, I would have quit R a long time ago without the tidyverse.

Base R is that much of a pain.

Re: R Markdown: The Definitive Guide

#33
post #10

R Markdown/Notebooks, IMO, has evolved to be the key value proposition of RStudio over the years. From a productivity standpoint when both working with R and publishing pretty reports/PDFs it has been incredible. (that said, if VS Code gets more robust R Markdown support, I may consider switching from RStudio) I wrote a blog post a few years ago comparing R Markdown/Notebooks to Jupyter Notebooks: https://minimaxir.c…

Funny thing is this has actually motivated me to move away from using rmarkdown. To the point that I went "backwards" and wrote several reports and an academic paper in Sweave after using rmarkdown for years. My primary motivation was that I needed to know the documents could be built by any R session, not just from within RStudio. I didn't want to be in a situation where my "reproducible" document relied on a specif…

Hi, I’m with RStudio.

We generally treat “working in RStudio but not elsewhere” as serious bugs, especially in our open source R packages. Not only because we don’t want to artificially limit usage of other interactive environments, but because a lot of what people do with R is run their code in non-interactive settings like CI/CD pipelines or ETL jobs.

(Actually, an R Markdown compilation is a particularly good example of something people often do from Travis or GitHub Actions)

Re: R Markdown: The Definitive Guide

#34

Earlier quoted context omitted.

I'm all for finding alternatives to RStudio's dominance in the R space. No doubt they do some excellent things, but I also have a vague uneasiness at the cultishness surrounding some of their products. It sometimes feels like if you're not using the 'tidyverse', you're viewed as doing it wrong. Anyway, this feeling set me off on an exploration of alternative tools and packages. Instead of rmarkdown I'm now exploring…

For me part of the cultish ness is justified because I have to teach about 100 non programmers to use R and rmd every year. Tidyverse solves the big problem that R used to have was that there were hundreds of ways to do things, none of the functions had consistent naming or calling signatures and it was hard to Google sensible answers. Tidyvers is fast, consistent and has good docs. Pipes discourage lots of mutable s…

Hmmm... I've always found tideverse syntax inelegant. Data.table syntax does more with fewer different words. But it can get a bit convoluted. Any ways: there are different ways to solveing problems and writing code. Should we not encourage this? Otherwise it's just cargo cult again and again.

Re: R Markdown: The Definitive Guide

#35
post #17

Earlier quoted context omitted.

Could you expand on what you mean by using it effectively? I've just started using RStudio and any tips/ways to use it more efficiently are welcome! Thanks.

I could imagine the time invested on making the same report in another language takes 3x.

Something I find that people don't appreciate about better tools is that it's not just about going faster, it's about going farther.

There's a whole bunch of stuff you can do by hand. But if you do it by hand, you'll compromise your sense of satisficing. It amazes me how often the 'work harder' crowd doesn't reconcile the two.

If you can quickly and reliably figure out we're spending $100k a month, you get a raise. If you can figure out why it's $100k instead of $80k, you might be up for a promotion.

Re: R Markdown: The Definitive Guide

#36

Jupyter Book is more flexible, simpler and tested to death since it is build upon Sphinx and docstrings. Since jupyter uses pandoc for converting notebooks, pandoc is the power tool for publication creations nowadays.

Jupyter has downsides too, e.g. version control. An R Markdown document "in the raw" is just a text file. For info, Rmd also uses pandoc under the covers. Agree it's the power tool, quite a wonderful thing.

I haven't use it myself but apparently jupytext (https://github.com/mwouts/jupytext) allows you to save Jupyter notebooks as R markdown files.

Re: R Markdown: The Definitive Guide

#37
post #33
post #10

Earlier quoted context omitted.

Funny thing is this has actually motivated me to move away from using rmarkdown. To the point that I went "backwards" and wrote several reports and an academic paper in Sweave after using rmarkdown for years. My primary motivation was that I needed to know the documents could be built by any R session, not just from within RStudio. I didn't want to be in a situation where my "reproducible" document relied on a specif…

Hi, I’m with RStudio. We generally treat “working in RStudio but not elsewhere” as serious bugs, especially in our open source R packages. Not only because we don’t want to artificially limit usage of other interactive environments, but because a lot of what people do with R is run their code in non-interactive settings like CI/CD pipelines or ETL jobs. (Actually, an R Markdown compilation is a particularly good exam…

I actually use Emacs to author R Markdown and the exporting works pretty flawlessly.

Before anyone asks, I use Org Mode. I just don't feel like pushing that format on my co-workers. If it's for me only, I use Org. If it's for a collaboration or export into a report, it goes into an R Markdown file.

Re: R Markdown: The Definitive Guide

#38
post #3

As an occasional R user, I think R markdown one of the things that R does really well. For data scientists who want to output reports (mix of text and calculations), I haven't come across anything as mature or easy to use in the Python ecosystem. I'm a big user of Jupyter notebooks, but version control issues put me off, and I've never got to grips customising the formatting of jupyter nbconvert. It's worth highlight…

Currently working on a DA masters with a background in markdown and was so happy to discover this.

Then I was baffled to discover that there wasn’t an equivalent for Python. Jupyter is great, but I really love the simplicity of my text files and I’m surprised that there isn’t a major implementation given how popular both markdown and Python are. I guess notebooks are just too appealing.

Re: R Markdown: The Definitive Guide

#39
post #9

Using RMarkdown effectively pretty much tripled my salary. It's an amazing tool that is wholly underappreciated in the "data" space.

Could you expand on what you mean by using it effectively? I've just started using RStudio and any tips/ways to use it more efficiently are welcome! Thanks.

Find a business problem in your job that requires information to get into the hands of many people but require tweaks between them. i.e. person X needs to know A but person Y needs to know B.

Read up the section on parameterized reports and realize you can do the work of dozens .

https://bookdown.org/yihui/rmarkdown/parameterized-reports.h...

rmarkdown is insanely effective at getting information out of your hands and into stakeholders repeatedly and in an visually appealing way. When you combine that with your domain knowledge, your value to your company will increase.

Re: R Markdown: The Definitive Guide

#40
post #39

Earlier quoted context omitted.

Could you expand on what you mean by using it effectively? I've just started using RStudio and any tips/ways to use it more efficiently are welcome! Thanks.

Find a business problem in your job that requires information to get into the hands of many people but require tweaks between them. i.e. person X needs to know A but person Y needs to know B. Read up the section on parameterized reports and realize you can do the work of dozens . https://bookdown.org/yihui/rmarkdown/parameterized-reports.h... rmarkdown is insanely effective at getting information out of your hands an…

It boggles my mind that in 2021 IPython/Jupyter notebooks _still_ don't have inline code evaluation or sensible parameterization without using extensions.
Post reply on HN