diff --git a/R/quantec_get_data.R b/R/quantec_get_data.R index c009eda..1e73a84 100644 --- a/R/quantec_get_data.R +++ b/R/quantec_get_data.R @@ -5,9 +5,7 @@ #' @param freq frequency to return `M`, `Q` or `A` #' @param start_year year to start #' @param end_year year to end -#' @param respformat to return `csv` or `json` #' @param log_file log file to output to if in parallel -#' @param is_tidy tidyformat for easy read #' #' @return tibble #' @export @@ -15,11 +13,9 @@ quantec_get_data <- function(time_series_code, freq = c("M", "Q", "A")[1], - start_year = "1900-01-01", - end_year = Sys.Date(), - respformat = c("csv", "json")[1], - log_file, - is_tidy = TRUE){ + start_year = "", + end_year = "", + log_file){ if(!missing(log_file)) @@ -31,7 +27,7 @@ quantec_get_data <- function(time_series_code, query_list <- all_param <- list( timeSeriesCodes = time_series_code, - respFormat = respformat, + respFormat = "csv", freqs = freq, auth_token = apikey, startYear = start_year, diff --git a/README.Rmd b/README.Rmd index 27d0405..cb7904f 100644 --- a/README.Rmd +++ b/README.Rmd @@ -79,18 +79,15 @@ Sys.setenv(QUANTEC_API="place_your_key_here") Sys.getenv("QUANTEC_API") ``` - # The API interface The package currently provides an interface to the [Quantec](https://www.easydata.co.za/) data API. The function `quantec_get_data` has the following options: * `time_series_code` time series code to return, `NMS-EC_BUS,NMS-GA_BUS` * `freq` frequency to return `M`, `Q` or `A` -* `start_year` year to start -* `end_year` year to end -* `respformat` to return `csv` or `json` +* `start_year` year to start (OPTIONAL) +* `end_year` year to end (OPTIONAL) * `log_file` log file to output to -* `is_tidy` tidyformat for easy read ```{r} library(quantec)