createDownloadText {RepoGenerator} | R Documentation |
Builds text for file that downloads data
createDownloadText(info)
info |
data.frame listing data sources. Must have at least the following columns: Local (the name the file should be on disk after downloaded), Remote (the URL of the file), Mode (the way to write to disk, either 'w' or 'wb'). |
Creates a block of code. The first line is a comment of the file name, then is uses download.file()
using the remote URL and the local filename.
Returns the block of text
Jared P. Lander
dataList <- read.csv(system.file('metadata/DataList.csv', package='RepoGenerator'), stringsAsFactors=FALSE, header=TRUE) cat(RepoGenerator:::createDownloadText(dataList))