Blog Archives

Posts

September 28, 2019
By

. (You can report issue about the content on this page here) Want to share your content on R-bloggers? click here if you have a blog, or here if you don't. To leave a comment for the author, please follow the link and comment on...

Read more »

Just Quickly: The unexpected use of functions as arguments

September 28, 2019
By

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 mean? Well, I think I can summarise it down to this crazy...

Read more »

Explore longitudinal data with brolgar

August 12, 2019
By
Explore longitudinal data with brolgar

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 at it over time. Oh no. What is even happening here? This might seem familiar to you. Looking at longitudinal (panel) data often yields these kinds of “spaghetti” plots. These can be...

Read more »

Just Quickly: How to show verbatim inline R code

Just Quickly: How to show verbatim inline R code

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 show people what an rmarkdown code chunk looks like - not just...

Read more »

Glue magic Part I

Glue magic Part I

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 together. First, it was just the very idea that this was possible - was AMAZING. paste When...

Read more »

Curly Curly: How to pass bare variable arguments to things?

Curly Curly: How to pass bare variable arguments to things?

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 do the thing where you use a function argument that isn’t...

Read more »

Upcoming Talk: Canberra July 2019

June 19, 2019
By

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 »

Just Quickly: What I usually want from stringr

June 18, 2019
By

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 example, say there are 5 items: items

Read more »

Rmarkdown for Scientists in Canberra 3rd July 2019

June 18, 2019
By

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, and the second time at Monash University. I will...

Read more »

Announcing ‘Just Three Things’

February 17, 2019
By
Announcing ‘Just Three Things’

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 called “Just Three Things”. I can’t promise that it is as...

Read more »

Search R-bloggers

Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)