Blog Archives

On Formality

On Formality

As I said on the About page, I don’t like formality. There is absolutely no need to tie my educational degree to my last name. Actually I feel uncomfortable with other people calling me “Dr Xie”. Anyone can just call me by my first name.1 In my opinion, the best way to show respect to people is not through these titles (Doctor or Professor), but the true care about their…

Read more »

The Ghost Printer Behind Top-level R Expressions

The Ghost Printer Behind Top-level R Expressions

For any developers who have ever written an S3 method for the print() function, they probably know what a top-level R expression means, but this is a very confusing concept to non-developers. I have to explain this every now and then, so I decided to write a short post about it. Yesterday I saw a Github issue in the rmarkdown repository, and you can see that there are still users…

Read more »

Consider Netlify instead of GitHub Pages for Your Static Websites

If you do not have a personal website yet, congratulations! I think now is the best time to create a website.1 I started blogging in 2005, and benefited a lot from writing, although a lot of my blog posts were crap.2 I have used many website tools, including Dreamweaver, Bo-Blog, WordPress, and Jekyll. Then I discovered Hugo, and created the blogdown package. I don’t think I will need to change…

Read more »

Rediscovering Rd2roxygen

During a lunch with Rob Hyndman and Earo Wang last week in Melbourne, I was surprised to know that there still existed packages that did not use roxygen to write the R documentation (my greatest sympathy to those poor authors), and I was also pleasantly surprised that Rob knew and actually used my Rd2roxgyen package to convert the documentation of his packages to roxygen. After Earo heard about this, she…

Read more »

Finally, Four Backticks on Github

Finally, Four Backticks on Github

It is always the little things… Over the years, I have been totally happy with almost everything about Github, but I have also been waiting for one little thing:1 I wish we could enclose text that contains N backticks with a pair of N + 1 backticks in Github issues/comments, i.e., ```` ```{r, echo=TRUE} 1 + 1 ``` ```` so that we could show a literal R code chunk like…

Read more »

A Note on on.exit()

I have used on.exit() for several years, but it was not until the other day that I realized a very weird thing about it: you’d better follow the default positions of its arguments expr and add, i.e., the first argument has to be expr and the second has to be add. on.exit(expr = NULL, add = FALSE) If you do on.exit(add = TRUE, {...}), weird things can happen. I discovered…

Read more »

How I Find, Manage, and Use GIFs

How I Find, Manage, and Use GIFs

A few months ago Jenny wanted me (and Karthik, if I remember correctly) to share some experience with GIFs. I have been busy with writing the blogdown book recently and don’t really have much time, so I’m going to write a quick post just to take a short break. I may expand this post in the future. First thing first. I tend to pronounce “GIF” with the soft G, but…

Read more »

When in Doubt, Upgrade

When in Doubt, Upgrade

I have said this many times in several Github issues and it is also the very first FAQ of knitr. It is a little exaggerative and certainly not a universal rule, but it helps a lot if you could try to upgrade everything before you report a software issue. It is even more helpful if you could also install the development version of the software and see if the problem…

Read more »

A Note on missing()

I had misunderstood the function missing() for several years. Originally I thought it only applies to an argument that does not have a default or user-specified value. For example, this is fairly easy to understand: f = function(x) { missing(x) } f() # should be TRUE One day I was surprised to find that this also returned TRUE: f = function(x = 1) { missing(x) } f() What?! x does…

Read more »

Some Facts about Jeff Leek

Some Facts about Jeff Leek

Note: What other facts about Jeff Leek do you “know”? Please feel free to click the edit button above and submit a pull request on Github. I have not written blog posts for quite a while. It is not because I don’t have anything to...

Read more »


Subscribe

Email:

  Subscribe