From 56b5d9ad49312c9d867636a0bc2a53ab9d9ee4c3 Mon Sep 17 00:00:00 2001 From: S'busiso Mkhondwane Date: Fri, 19 Aug 2016 20:39:48 +0200 Subject: [PATCH] Update pipes.Rmd (#290) Typo --- pipes.Rmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipes.Rmd b/pipes.Rmd index 72c7cd2..6eb3367 100644 --- a/pipes.Rmd +++ b/pipes.Rmd @@ -56,7 +56,7 @@ The main downside of this form is that it forces you to name each intermediate e Whenever I write code like this, I invariably use the wrong number on one line and then spend 10 minutes scratching my head and trying to figure out what went wrong with my code. -You may also worry that this form creates many copies of your data and takes up a lot of memory. Suprisingly, that's not the case. First, note that proactively worrying about memory is not a useful way to spend your time: worry about it when it becomes a problem (i.e. you run out of memory), not before. Second, R isn't stupid, and it will share columns across data frames, where possible. Let's take a look at an actual data manipulation pipeline where we add a new column to `ggplot2::diamonds`: +You may also worry that this form creates many copies of your data and takes up a lot of memory. Surprisingly, that's not the case. First, note that proactively worrying about memory is not a useful way to spend your time: worry about it when it becomes a problem (i.e. you run out of memory), not before. Second, R isn't stupid, and it will share columns across data frames, where possible. Let's take a look at an actual data manipulation pipeline where we add a new column to `ggplot2::diamonds`: ```{r} diamonds <- ggplot2::diamonds