download_statistics: Download all statistics

Description Usage Arguments Details Value Examples

View source: R/watchdog.R

Description

Download all statistics

Usage

1
2
3
4
5
6
7
download_statistics(
  path,
  watchdog,
  access_date = Sys.Date(),
  method = "curl",
  extra = "-L"
)

Arguments

path

path to raw data folde

watchdog

watchdog file Structure of watchdog: url - url of file to download, may be NA file_raw - name for local raw file file_main - name for local processed file processing - name of processing function univariate - TRUE/FALSE frequency - 4/12/etc comment - self explanatory :)

access_date

access date

method

for downloading files, passed to 'download.file()': "curl", "wget", "libcurl", "auto", "internal", "wininet"

extra

options for downloading files, passed to 'download.file()': used for "wget" and "curl" methods

Details

Download all statistics

Value

downloads log

Examples

1
2
3
4
path = tempdir()
mini_watchdog = tibble::tibble(url = "http://www.gks.ru/free_doc/new_site/prices/potr/I_ipc.xlsx",
    file_raw = "i_ipc.xlsx", file_main = "i_ipc.csv", processing = "convert_i_ipc_xlsx")
download_log_new = download_statistics(path, mini_watchdog)

kassandra-ru/kassandr documentation built on Jan. 1, 2022, 7:39 a.m.