Blog Archives

One Little Thing: knitr::imgur_upload()

Earlier this year, Nick Tierney wrote a blog post titled “Magic reprex”. I strongly recommend to you to read it. The credit mostly goes to Jenny Bryan (for the excellent reprex package), but I think this post is worth reading because it shares the joy of discovering little things, which is extremely valuable in my eyes. Nick mentioned the function knitr::imgur_upload(), and this is one of the many little functions…

Read more »

Pull Requests as A Teaching Tool

Amelia quoted Feynman on Twitter a while ago, “What I cannot create, I do not understand.” I replied, “To me ‘create’ means ‘create a minimal example’.” One of my examples was the first Hugo theme I had ever written, hugo-xmin. Motivation As I mentioned in the announcement of the blogdown package, the blogdown book was quite painful for me to write. The chapter on Hugo was particularly painful, because it…

Read more »

The bookdown Book in Retrospect

When the bookdown book was published in last December, my editor John Kimmel told me that I made a record in his career. This book was the fastest one he had ever published. It only took a couple of months from me signing the contract to the printed copies being available on the market. I want to share a few random memories in this process. Get it done before talking…

Read more »

Redundancy in "if (x == TRUE)"

Last year when I was at JSM, I attended an excellent talk by Nicholas Horton and later nitpicked his R code: ifelse(dest == "ORD" | dest == "MDW", TRUE, FALSE) There is no need to use ifelse() here. The code above is equivalent to: dest == "ORD" | dest == "MDW" I have a feeling that some people are not comfortable when they think about Boolean values without literally seeing…

Read more »

Python: The Incredibly Confusing Language?

Last week David Robinson published an interesting post titled “The Incredible Growth of Python”. Just like naming is hard, I think coming up with a proper title of an article is also hard. In this article, “growth” was defined by StackOverflow traffic. I certainly don’t mean to criticize David here (he has written so many informative and useful articles and blog posts), but I feel a lot of articles on…

Read more »

Getting Rid of the .DS_Store Crap

When browsing repositories on Github or reviewing pull requests, I often frown upon the .DS_Store file, the crap that macOS constantly generates under all folders that you have browsed, just like Windows generates the Thumbs.db crap. For myself, I have ignored it globally in GIT: $ cat ~/.gitignore_global *~ .DS_Store But I still hate it (out of OCD), so I actually set up a cron job to delete it recursively…

Read more »

Am(az|us)ingly Arrogant

KDnuggets just published an article titled “Python overtakes R, becomes the leader in Data Science, Machine Learning platforms”. I’m not going to comment on this article,1 but I noticed that one person made several comments under the article, and one of them was particularly amazing & amusing: […] Go to to any major machine learning conference and see if anybody presents anything in R. Look into top arxiv.org papers for…

Read more »

Twitter Threads vs Blogging

This year I have been intentionally quiet on Twitter. So far I have tweeted 9 times over the past 8 months. Of course, this number does not include my replies – I still reply to other people’s messages frequently. I just saw Lincoln Mullen said on Twitter: Of all the inferior technologies that have replaced better ones, surely tweet threads replacing blogging is high on the list. I absolutely agree.…

Read more »

Incremental Slides with xaringan / remark.js

Incremental Slides with xaringan / remark.js

Sometimes we do not want to show everything at once on a slide, but show the content incrementally. A most useful presentation trick is to hold certain surprises or funny GIFs until the last moment. Today I spent a couple of hours on creating an example presentation based on xaringan and remark.js, which covered the three approaches to incremental slides. You can find the Markdown source document on the last…

Read more »

We Cannot Be Friends If You Share Source Code As Screenshots

After having seen this many times before, I decided to write a short post about it. I don’t know why some people prefer using screenshots when sharing source code (e.g., rstudio/rmarkdown#520 and rstudio/rmarkdown#1133). One day Robert Flight said that he realized he was silly to include source code as screenshots, and I replied: “We cannot be friends if you insert source code as screenshots.” Screenshots are good for showing problems…

Read more »


Subscribe

Email:

  Subscribe