get_data: Get Data

View source: R/data_import.R

get_dataR Documentation

Get Data

Description

Gets serosurvey data from a cache or the SeroTracker servers. If new data is requested, it is cached to the path_to_cache_folder. Otherwise, new data is loaded from the path_to_cache_folder.

Usage

get_data(params, import_new_data, path_to_cache_folder, server = "prod")

Arguments

params

datareq_params object itemizing request parameters

import_new_data

logical: requests data from server if TRUE, from cache if FALSE Note that if import_new_data is TRUE, data will be repeatedly requested from server even if a cache is present, and that cache will be overwritten import_new_data must be set to FALSE to use cached data

path_to_cache_folder

path to cache new data to, or read cache from

server

whether to use the production server ('prod') or a local dev server ('dev')

See Also

calls retrieve_data

Examples

## Not run: 
fs_males_tbl <- retrieve_data(fs_males_params,
                              TRUE,
                              '.cache')

## End(Not run)

serotracker/serosurvr documentation built on July 1, 2022, 7:49 p.m.