Update rmarkdown.Rmd (#489)

Changed cached = TRUE to cache = TRUE.
This commit is contained in:
Nirmal Patel 2016-10-26 18:59:40 +05:30 committed by Hadley Wickham
parent e1e3e78b7c
commit e2fcf4928d
1 changed files with 2 additions and 2 deletions

View File

@ -232,7 +232,7 @@ The caching system must be used with care, because by default it is based on the
rawdata <- readr::read_csv("a_very_large_file.csv")
`r chunk`
`r chunk`{r processed_data, cached = TRUE}
`r chunk`{r processed_data, cache = TRUE}
processed_data <- rawdata %>%
filter(!is.na(import_var)) %>%
mutate(new_variable = complicated_transformation(x, y, z))
@ -240,7 +240,7 @@ The caching system must be used with care, because by default it is based on the
Caching the `processed_data` chunk means that it will get re-run if the dplyr pipeline is changed, but it won't get rerun if the `read_csv()` call changes. You can avoid that problem with the `dependson` chunk option:
`r chunk`{r processed_data, cached = TRUE, dependson = "raw_data"}
`r chunk`{r processed_data, cache = TRUE, dependson = "raw_data"}
processed_data <- rawdata %>%
filter(!is.na(import_var)) %>%
mutate(new_variable = complicated_transformation(x, y, z))