[This article was first published on Blog on Credibly Curious, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) Want to share [Read more...]
I think that I have learnt and forgotten, and then learnt about this feature of R a few times in the past 4 years. The idea (I think), is this:
R allows you to pass functions as arguments
Functions can be modified inside a function
So what the hell does that ... [Read more...]
Let’s say we’ve managed to find an interesting dataset 1 on heights for given countries since 1550 (yup!):
country
year
height_cm
continent
Afghanistan
1870
168.40
Asia
Afghanistan
1880
165.69
Asia
Afghanistan
1930
166.80
Asia
Afghanistan
1990
167.10
Asia
Afghanistan
2000
161.40
Asia
Albania
1880
170.10
Europe
We’ve got country, year, height (in centimetres), and continent. Neat!
Now, let’s look ...
I’ve recently asked on the Rstudio community page how to make code chunks appear verbatim.
Not sure what I mean by this?
Well, showing your entire code chunk is something taht comes up when you are teaching people about rmarkdown. One of the issues is that you want to ...
Lately I’ve found myself using Jim Hester’s glue package instead of paste0 or sprintf. This post marks the start of an ongoing series of little magic spells using the glue package.
The back story
I’ve been through a few stages of discovery for combining strings of text ... [Read more...]
I recently had a question from a colleague, and thanks to the awesome recent work on rlang this is now super straightforward. I thought I’d share a bit about that.
I still remember when I had just learnt how to write a function in R, and I wanted to ...
While visiting Canberra to present for the SSA R skills workshop with Damjan Vukcevic, I am going to stay in Canberra for a few days, visiting CSIRO. I will be presenting a talk there on Thursday 4th July on the brolgar package for explorin... [Read more...]
TL;DR str_subset(string, pattern) returns the strings that match a pattern.
I don’t often need to work with string data, but when I do, I usually jump to two tools:
grepl, and
stringr.
What I usually want to do is return strings that match some pattern.
For ... [Read more...]
On July 3rd, I will be presenting my half-day workshop on Rmarkdown for Scientists in Canberra at ANU, which is based on my living book of the same title available online.
This will be the third time I have taught this course, the first time being in Melbourne in late 2018, ... [Read more...]
A little while ago I showed Karthik Ram the percent function from scales, and he said something along the lines of:
There should be a high quality screencase where someone shows a couple of rstats tricks and thats it.
So this is it! I just uploaded a screencast to youtube ...