R/defunct.R

Defines functions write_qlt_data plot_qlt_data download_qlt_data

Documented in download_qlt_data plot_qlt_data write_qlt_data

#' Write QLT data
#'
#' Writes QLT data to a csv file.
#'
#' @param data The QLT data to write.
#' @param file A string of the file name.
#' @export
write_qlt_data <- function(data, file = paste0(Sys.Date(), ".csv")) {
  .Defunct()
}

#' Plot QLT Data
#'
#' Plots QLT data.
#'
#' @param data The QLT data to plot.
#' @export
plot_qlt_data <- function(data) {
  .Defunct()
}

#' Download QLT data
#'
#' Downloads QLT data from SQLite database.
#'
#' @param code A character vector of the station codes.
#' @param period A string of the period to average by (by default 'hourly' but can also be 'raw' or 'daily').
#' @param startDate A Date element of the beginning of the time series.
#' @param endDate A Date element of the end of the time series.
#' @param status A string indicating which type of values should be included possible
#' values are 'reasonable', 'questionable' and 'erroneous'. The status of the values
#' is indicated in the returned data.frame.
#' @param surrogate A string indicating whether to exclude surrogates ('none'),
#' replace missing values with surrogates ('missing')
#' or include all surrogates ('duplicate')
#' @param add_spaces A flag indicating whether missing values should be filled in with NAs.
#' @param n A number indicating the maximum number of rows to download.
#' @param db A string indicating the path to the database.
#' @return A data.frame object.
#' @export
download_qlt_data <- function(
  code = "DDM", period = "hourly", startDate = as.Date("2014-01-01"),
  endDate = Sys.Date(),
  status = "questionable", surrogate = "missing", add_spaces = TRUE, n = Inf,
  db = getOption("kootqlt.db", "kootqlt.db")) {

  .Defunct("qlt_download_data")
}
poissonconsulting/kootqlt documentation built on May 25, 2019, 10:25 a.m.