diff --git a/R/data.R b/R/data.R index 02dceec..62795bb 100644 --- a/R/data.R +++ b/R/data.R @@ -47,4 +47,18 @@ "consumption" +#' Candlestick demo data +#' +#' +#' @format A data frame with 60 observations and the following 5 variables: +#' \describe{ +#' \item{\code{datetime}}{Timestamp.} +#' \item{\code{open}}{Open value.} +#' \item{\code{high}}{Highest value.} +#' \item{\code{low}}{Lowest value.} +#' \item{\code{close}}{Close value.} +#' } +#' @source Apexcharts (\url{https://apexcharts.com/javascript-chart-demos/candlestick-charts/basic/}) +"candles" + diff --git a/data-raw/candlestick.R b/data-raw/candlestick.R index 28e46c7..ebeed95 100644 --- a/data-raw/candlestick.R +++ b/data-raw/candlestick.R @@ -32,5 +32,6 @@ cdle apex(cdle, aes(x = datetime, open = open, close = close, low = low, high = high), type = "candlestick") +candles <- as.data.frame(cdle) - +usethis::use_data(candles, overwrite = TRUE) diff --git a/data/candles.rda b/data/candles.rda new file mode 100644 index 0000000..894ce19 Binary files /dev/null and b/data/candles.rda differ