downloadFile: Downloads a file and checks the size

Description Usage Arguments Value Examples

View source: R/download.R

Description

This function downloads the specified file and verifies its size. Since the Census servers don't always work without error, the function tries downloading each file ten times before it gives up.

Usage

1
downloadFile(url, filename, size)

Arguments

url

contains the url of the file to be downloaded

filename

to be used locally

size

of the file in bytes

Value

true if the function concludes without error

Examples

1
2
3
downloadFile(url = "ftp://ftp.census.gov/Econ2001_And_Earlier/CBP_CSV/cbp00co.zip",
             filename = "cbp00co.zip",
             size = 16024897)

jtilly/cbpR documentation built on May 20, 2019, 3:13 a.m.