I\'ve created a R markdown file that starts by loading a file from the web. I found the cache=TRUE to be a little flaky so I want to put an if condition in to check for the
As per the answer given by @agstudy
destfile="./data/samsungData.rda" fileURL <- "https://dl.dropbox.com/u/7710864/courseraPublic/samsungData.rda" if (!file.exists(destfile)) { setInternet2(TRUE) download.file(fileURL ,destfile,method="auto") } load("./data/samsungData.rda") } load(destfile)