From dcc0b6d2ffbd9605ade2940289952a1ed356c41a Mon Sep 17 00:00:00 2001 From: Colin Gillespie Date: Fri, 23 Sep 2016 13:16:46 +0100 Subject: [PATCH] Empty Global Env before each chapter (#162) --- 01-introduction.Rmd | 7 +++++++ 02-set-up.Rmd | 3 +++ 04-workflow.Rmd | 3 +++ 05-input-output.Rmd | 3 +++ 06-data-carpentry.Rmd | 3 +++ 08-hardware.Rmd | 3 +++ 09-collaboration.Rmd | 3 +++ 10-learning.Rmd | 3 +++ 8 files changed, 28 insertions(+) diff --git a/01-introduction.Rmd b/01-introduction.Rmd index e3ecee53..30ee192f 100644 --- a/01-introduction.Rmd +++ b/01-introduction.Rmd @@ -1,3 +1,10 @@ +--- +knit: "bookdown::preview_chapter" +--- +```{r} +rm(list=ls()) +``` + # Introduction {#introduction} This chapter introduces the book. It describes the wide range of people it was written for, in terms of R and programming experience, and how you can get the most out of it. Anyone setting out to improve efficiency should have an understanding of precisely what they mean by the term, and this is discussed, with reference to *algorithmic* and *programmer* efficiency in Section \@ref(what-is-efficiency), and with reference to R in particular in \@ref(what-is-efficient-r-programming). It may seem obvious, but it's also worth thinking about *why* anyone would bother with efficient code now that powerful computers are cheap and accessible. This is covered in Section \@ref(why-efficiency). diff --git a/02-set-up.Rmd b/02-set-up.Rmd index 366e6cff..d05152a1 100644 --- a/02-set-up.Rmd +++ b/02-set-up.Rmd @@ -1,6 +1,9 @@ --- knit: "bookdown::preview_chapter" --- +```{r} +rm(list=ls()) +``` ```{r echo=FALSE} data("USArrests", package="datasets") diff --git a/04-workflow.Rmd b/04-workflow.Rmd index 3ec066e7..4b9d2576 100644 --- a/04-workflow.Rmd +++ b/04-workflow.Rmd @@ -1,6 +1,9 @@ --- knit: "bookdown::preview_chapter" --- +```{r} +rm(list=ls()) +``` # Efficient workflow {#workflow} diff --git a/05-input-output.Rmd b/05-input-output.Rmd index 69efb5f2..123e6927 100644 --- a/05-input-output.Rmd +++ b/05-input-output.Rmd @@ -1,6 +1,9 @@ --- knit: "bookdown::preview_chapter" --- +```{r} +rm(list=ls()) +``` # Efficient input/output {#input-output} diff --git a/06-data-carpentry.Rmd b/06-data-carpentry.Rmd index ba390817..44876b55 100644 --- a/06-data-carpentry.Rmd +++ b/06-data-carpentry.Rmd @@ -1,6 +1,9 @@ --- knit: "bookdown::preview_chapter" --- +```{r} +rm(list=ls()) +``` diff --git a/08-hardware.Rmd b/08-hardware.Rmd index 79178f7b..61c2a6f3 100644 --- a/08-hardware.Rmd +++ b/08-hardware.Rmd @@ -1,6 +1,9 @@ --- knit: "bookdown::preview_chapter" --- +```{r} +rm(list=ls()) +``` # Efficient hardware {#hardware} diff --git a/09-collaboration.Rmd b/09-collaboration.Rmd index b58b5db1..0dd03669 100644 --- a/09-collaboration.Rmd +++ b/09-collaboration.Rmd @@ -1,6 +1,9 @@ --- knit: "bookdown::preview_chapter" --- +```{r} +rm(list=ls()) +``` ```{r echo=FALSE, message=FALSE} library(dplyr) diff --git a/10-learning.Rmd b/10-learning.Rmd index 098d31af..e03b2fca 100644 --- a/10-learning.Rmd +++ b/10-learning.Rmd @@ -1,6 +1,9 @@ --- knit: "bookdown::preview_chapter" --- +```{r} +rm(list=ls()) +``` # Efficient learning {#learning}