When working on an R Markdown Rmd., can I prevent Knitr from downloading a file each time the Markdown is knitted?
My code chunk is:
download.file(url = paste('https://d396qusza40orc.cloudfront.net/',
'repdata/data/StormData.csv.bz2',
sep = ''),
destfile = './storm.csv.bz2',
method = 'curl'))
The system time of the chunk isn't that significant in and by itself:
user system elapsed
0.893 1.139 28.825
But perhaps there's a way to cache the download or something so I can review the HTML quicker.
if
statement, likeif (!file.exists('./storm.csv.bz2')) {
– David Robinson