From a5396951c2b2c0a2cf59e2a36a20b3b84ee6b509 Mon Sep 17 00:00:00 2001 From: Serkan Korkmaz <77464572+serkor1@users.noreply.github.com> Date: Wed, 6 Nov 2024 21:32:45 +0100 Subject: [PATCH] Updated Documentation :books: * Added pkg-anchors (were missing, and CRAN checks did not pass) --- .gitignore | 1 + R/chart_ma.R | 18 +++++++++--------- R/get_fgi.R | 2 +- R/get_fundingrate.R | 2 +- R/get_lsratio.R | 2 +- R/get_openinterest.R | 2 +- R/get_quote.R | 2 +- R/helper.R | 2 +- R/store_xts.R | 4 ++-- R/utils.R | 2 +- man/alma.Rd | 2 +- man/assert.Rd | 2 +- man/dema.Rd | 2 +- man/ema.Rd | 2 +- man/evwma.Rd | 2 +- man/fetch.Rd | 2 +- man/get_fgindex.Rd | 2 +- man/get_fundingrate.Rd | 2 +- man/get_lsratio.Rd | 2 +- man/get_openinterest.Rd | 2 +- man/get_quote.Rd | 2 +- man/hma.Rd | 2 +- man/sma.Rd | 2 +- man/vwap.Rd | 2 +- man/wma.Rd | 2 +- man/write_xts.Rd | 4 ++-- man/zlema.Rd | 2 +- 27 files changed, 37 insertions(+), 36 deletions(-) diff --git a/.gitignore b/.gitignore index d53c6d89..830332d4 100644 --- a/.gitignore +++ b/.gitignore @@ -55,3 +55,4 @@ docs /*.html .vdoc.r +*.Rproj diff --git a/R/chart_ma.R b/R/chart_ma.R index a7a60485..bf1505a5 100644 --- a/R/chart_ma.R +++ b/R/chart_ma.R @@ -52,7 +52,7 @@ chart_ma <- function( #' #' @inheritParams TTR::SMA #' @param price A [character]-vector of [length] 1. "close" by default. -#' The name of the vector to passed into [TTR::SMA]. +#' The name of the vector to passed into [TTR::SMA()]. #' @param ... For internal use. Please ignore. #' #' @example man/examples/scr_MAindicator.R @@ -128,7 +128,7 @@ sma <- function( #' ) #' #' @param price A [character]-vector of [length] 1. "close" by default. -#' The name of the vector to passed into [TTR::EMA]. +#' The name of the vector to passed into [TTR::EMA()]. #' @inheritParams TTR::EMA #' @param ... For internal use. Please ignore. #' @@ -206,7 +206,7 @@ ema <- function( #' ) #' #' @param price A [character]-vector of [length] 1. "close" by default. -#' The name of the vector to passed into [TTR::DEMA]. +#' The name of the vector to passed into [TTR::DEMA()]. #' @inheritParams TTR::DEMA #' @param ... For internal use. Please ignore. #' @@ -286,7 +286,7 @@ dema <- function( #' ) #' #' @param price A [character]-vector of [length] 1. "close" by default. -#' The name of the vector to passed into [TTR::WMA]. +#' The name of the vector to passed into [TTR::WMA()]. #' @inheritParams TTR::WMA #' @param ... For internal use. Please ignore. #' @@ -362,7 +362,7 @@ wma <- function( #' ) #' #' @param price A [character]-vector of [length] 1. "close" by default. -#' The name of the vector to passed into [TTR::EVWMA] +#' The name of the vector to passed into [TTR::EVWMA()] #' @inheritParams TTR::EVWMA #' @param ... For internal use. Please ignore. #' @@ -434,7 +434,7 @@ evwma <- function( #' ) #' #' @param price A [character]-vector of [length] 1. "close" by default. -#' The name of the vector to passed into [TTR::ZLEMA]. +#' The name of the vector to passed into [TTR::ZLEMA()]. #' @inheritParams TTR::ZLEMA #' @param ... For internal use. Please ignore. #' @@ -507,7 +507,7 @@ zlema <- function( #' ) #' #' @param price A [character]-vector of [length] 1. "close" by default. -#' The name of the vector to passed into [TTR::VWAP] +#' The name of the vector to passed into [TTR::VWAP()] #' @inheritParams TTR::VWAP #' @param ... For internal use. Please ignore. #' @@ -583,7 +583,7 @@ vwap <- function( #' ) #' #' @param price A [character]-vector of [length] 1. "close" by default. -#' The name of the vector to passed into [TTR::HMA]. +#' The name of the vector to passed into [TTR::HMA()]. #' @inheritParams TTR::HMA #' @param ... For internal use. Please ignore. #' @@ -654,7 +654,7 @@ hma <- function( #' ) #' #' @param price A [character]-vector of [length] 1. "close" by default -#' The name of the vector to passed into [TTR::ALMA]. +#' The name of the vector to passed into [TTR::ALMA()]. #' @inheritParams TTR::ALMA #' @param ... For internal use. Please ignore. #' diff --git a/R/get_fgi.R b/R/get_fgi.R index a70d9b37..bec11937 100644 --- a/R/get_fgi.R +++ b/R/get_fgi.R @@ -24,7 +24,7 @@ #' #' @inherit get_quote details #' -#' @returns An [xts]-object containing, +#' @returns An [xts::xts]-object containing, #' #' \item{index}{<[POSIXct]> the time-index} #' \item{fgi}{<[numeric]> the daily fear and greed index value} diff --git a/R/get_fundingrate.R b/R/get_fundingrate.R index d1d1057b..a297b731 100644 --- a/R/get_fundingrate.R +++ b/R/get_fundingrate.R @@ -24,7 +24,7 @@ #' #' @inheritParams get_quote #' -#' @returns An [xts]-object containing, +#' @returns An [xts::xts]-object containing, #' #' \item{index}{<[POSIXct]> the time-index} #' \item{funding_rate}{<[numeric]> the current funding rate} diff --git a/R/get_lsratio.R b/R/get_lsratio.R index 6e1be638..68306310 100644 --- a/R/get_lsratio.R +++ b/R/get_lsratio.R @@ -27,7 +27,7 @@ #' If [TRUE] it returns the top traders Long-Short ratios. #' #' -#' @returns An [xts]-object containing, +#' @returns An [xts::xts]-object containing, #' #' \item{index}{<[POSIXct]> the time-index} #' \item{long}{<[numeric]> the share of longs} diff --git a/R/get_openinterest.R b/R/get_openinterest.R index 7eddc801..7373d47e 100644 --- a/R/get_openinterest.R +++ b/R/get_openinterest.R @@ -27,7 +27,7 @@ #' @inheritParams get_quote #' #' @returns -#' An [xts]-object containing, +#' An [xts::xts]-object containing, #' #' \item{index}{<[POSIXct]> the time-index} #' \item{open_interest}{<[numeric]> open perpetual contracts on both both sides} diff --git a/R/get_quote.R b/R/get_quote.R index 26b6e4aa..76a4858a 100644 --- a/R/get_quote.R +++ b/R/get_quote.R @@ -30,7 +30,7 @@ #' @param to An optional [character]-, [date]- or #' [POSIXct]-vector of [length] 1. [NULL] by default. #' -#' @returns An [xts]-object containing, +#' @returns An [xts::xts]-object containing, #' #' \item{index}{<[POSIXct]> The time-index} #' \item{open}{<[numeric]> Opening price} diff --git a/R/helper.R b/R/helper.R index 07720516..9f5cc8f6 100644 --- a/R/helper.R +++ b/R/helper.R @@ -306,7 +306,7 @@ is.date <- function(x){ #' @param ... expressions >= 1. If named the names are used #' as error messages, otherwise R's internal error-messages are thrown #' -#' @param error_message character. An error message, supports [cli]-formatting. +#' @param error_message character. An error message, supports [cli::cli]-formatting. #' @example man/examples/scr_assert.R #' @seealso [stopifnot()], [cli::cli_abort()], [tryCatch()] #' @keywords internal diff --git a/R/store_xts.R b/R/store_xts.R index 6bdfd46a..69e3df95 100644 --- a/R/store_xts.R +++ b/R/store_xts.R @@ -22,12 +22,12 @@ #' ... #' ) #' -#' @param x An <[xts]>-object. +#' @param x An <[xts::xts]>-object. #' @inheritParams zoo::write.zoo #' @inheritParams zoo::read.zoo #' #' @details -#' When reading and writing <[xts]>-objects the [attributes] does not follow the object. +#' When reading and writing <[xts::xts]>-objects the [attributes] does not follow the object. #' #' #' @author diff --git a/R/utils.R b/R/utils.R index 374cd3b1..42d38f0b 100644 --- a/R/utils.R +++ b/R/utils.R @@ -176,7 +176,7 @@ endPoint <- function( #' #' @returns #' -#' It returns an [xts]-object from the desired endpoint. +#' It returns an [xts::xts]-object from the desired endpoint. #' #' #' @author Serkan Korkmaz diff --git a/man/alma.Rd b/man/alma.Rd index 9e786902..6ef9913e 100644 --- a/man/alma.Rd +++ b/man/alma.Rd @@ -14,7 +14,7 @@ alma( } \arguments{ \item{price}{A \link{character}-vector of \link{length} 1. "close" by default -The name of the vector to passed into \link[TTR:MovingAverages]{TTR::ALMA}.} +The name of the vector to passed into \code{\link[TTR:MovingAverages]{TTR::ALMA()}}.} \item{n}{Number of periods to average over. Must be between 1 and \code{nrow(x)}, inclusive.} diff --git a/man/assert.Rd b/man/assert.Rd index 6405a6c1..bb8f500a 100644 --- a/man/assert.Rd +++ b/man/assert.Rd @@ -10,7 +10,7 @@ assert(..., error_message = NULL) \item{...}{expressions >= 1. If named the names are used as error messages, otherwise R's internal error-messages are thrown} -\item{error_message}{character. An error message, supports \link{cli}-formatting.} +\item{error_message}{character. An error message, supports \link[cli:cli]{cli::cli}-formatting.} } \value{ \link{NULL} if all statements in ... are \link{TRUE} diff --git a/man/dema.Rd b/man/dema.Rd index f15aef88..dafffdaa 100644 --- a/man/dema.Rd +++ b/man/dema.Rd @@ -15,7 +15,7 @@ dema( } \arguments{ \item{price}{A \link{character}-vector of \link{length} 1. "close" by default. -The name of the vector to passed into \link[TTR:MovingAverages]{TTR::DEMA}.} +The name of the vector to passed into \code{\link[TTR:MovingAverages]{TTR::DEMA()}}.} \item{n}{Number of periods to average over. Must be between 1 and \code{nrow(x)}, inclusive.} diff --git a/man/ema.Rd b/man/ema.Rd index b72b2a88..91cb5e6f 100644 --- a/man/ema.Rd +++ b/man/ema.Rd @@ -14,7 +14,7 @@ ema( } \arguments{ \item{price}{A \link{character}-vector of \link{length} 1. "close" by default. -The name of the vector to passed into \link[TTR:MovingAverages]{TTR::EMA}.} +The name of the vector to passed into \code{\link[TTR:MovingAverages]{TTR::EMA()}}.} \item{n}{Number of periods to average over. Must be between 1 and \code{nrow(x)}, inclusive.} diff --git a/man/evwma.Rd b/man/evwma.Rd index cdfbcd98..5069e9d7 100644 --- a/man/evwma.Rd +++ b/man/evwma.Rd @@ -12,7 +12,7 @@ evwma( } \arguments{ \item{price}{A \link{character}-vector of \link{length} 1. "close" by default. -The name of the vector to passed into \link[TTR:MovingAverages]{TTR::EVWMA}} +The name of the vector to passed into \code{\link[TTR:MovingAverages]{TTR::EVWMA()}}} \item{n}{Number of periods to average over. Must be between 1 and \code{nrow(x)}, inclusive.} diff --git a/man/fetch.Rd b/man/fetch.Rd index ca415c91..f9e0e8e8 100644 --- a/man/fetch.Rd +++ b/man/fetch.Rd @@ -40,7 +40,7 @@ contracts on both sides. See the \code{\link[=get_openinterest]{get_openinterest \item{...}{additional parameters passed down the endpoint} } \value{ -It returns an \link{xts}-object from the desired endpoint. +It returns an \link[xts:xts]{xts::xts}-object from the desired endpoint. } \description{ \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#experimental}{\figure{lifecycle-experimental.svg}{options: alt='[Experimental]'}}}{\strong{[Experimental]}} diff --git a/man/get_fgindex.Rd b/man/get_fgindex.Rd index 6a0f12f1..3367b1c2 100644 --- a/man/get_fgindex.Rd +++ b/man/get_fgindex.Rd @@ -18,7 +18,7 @@ get_fgindex( \link{POSIXct}-vector of \link{length} 1. \link{NULL} by default.} } \value{ -An \link{xts}-object containing, +An \link[xts:xts]{xts::xts}-object containing, \item{index}{<\link{POSIXct}> the time-index} \item{fgi}{<\link{numeric}> the daily fear and greed index value} diff --git a/man/get_fundingrate.Rd b/man/get_fundingrate.Rd index 80f5212f..23ad944f 100644 --- a/man/get_fundingrate.Rd +++ b/man/get_fundingrate.Rd @@ -25,7 +25,7 @@ See \code{\link[=available_exchanges]{available_exchanges()}} for available exch \link{POSIXct}-vector of \link{length} 1. \link{NULL} by default.} } \value{ -An \link{xts}-object containing, +An \link[xts:xts]{xts::xts}-object containing, \item{index}{<\link{POSIXct}> the time-index} \item{funding_rate}{<\link{numeric}> the current funding rate} diff --git a/man/get_lsratio.Rd b/man/get_lsratio.Rd index da1a1596..0af4fef4 100644 --- a/man/get_lsratio.Rd +++ b/man/get_lsratio.Rd @@ -33,7 +33,7 @@ See \code{\link[=available_exchanges]{available_exchanges()}} for available exch If \link{TRUE} it returns the top traders Long-Short ratios.} } \value{ -An \link{xts}-object containing, +An \link[xts:xts]{xts::xts}-object containing, \item{index}{<\link{POSIXct}> the time-index} \item{long}{<\link{numeric}> the share of longs} diff --git a/man/get_openinterest.Rd b/man/get_openinterest.Rd index dc080ed1..a507feca 100644 --- a/man/get_openinterest.Rd +++ b/man/get_openinterest.Rd @@ -29,7 +29,7 @@ See \code{\link[=available_exchanges]{available_exchanges()}} for available exch \link{POSIXct}-vector of \link{length} 1. \link{NULL} by default.} } \value{ -An \link{xts}-object containing, +An \link[xts:xts]{xts::xts}-object containing, \item{index}{<\link{POSIXct}> the time-index} \item{open_interest}{<\link{numeric}> open perpetual contracts on both both sides} diff --git a/man/get_quote.Rd b/man/get_quote.Rd index b1d15d93..ababbe51 100644 --- a/man/get_quote.Rd +++ b/man/get_quote.Rd @@ -33,7 +33,7 @@ See \code{\link[=available_intervals]{available_intervals()}} for available inte \link{POSIXct}-vector of \link{length} 1. \link{NULL} by default.} } \value{ -An \link{xts}-object containing, +An \link[xts:xts]{xts::xts}-object containing, \item{index}{<\link{POSIXct}> The time-index} \item{open}{<\link{numeric}> Opening price} diff --git a/man/hma.Rd b/man/hma.Rd index 1a293732..7a7a09a8 100644 --- a/man/hma.Rd +++ b/man/hma.Rd @@ -12,7 +12,7 @@ hma( } \arguments{ \item{price}{A \link{character}-vector of \link{length} 1. "close" by default. -The name of the vector to passed into \link[TTR:MovingAverages]{TTR::HMA}.} +The name of the vector to passed into \code{\link[TTR:MovingAverages]{TTR::HMA()}}.} \item{n}{Number of periods to average over. Must be between 1 and \code{nrow(x)}, inclusive.} diff --git a/man/sma.Rd b/man/sma.Rd index 0000d911..ef4c73dd 100644 --- a/man/sma.Rd +++ b/man/sma.Rd @@ -12,7 +12,7 @@ sma( } \arguments{ \item{price}{A \link{character}-vector of \link{length} 1. "close" by default. -The name of the vector to passed into \link[TTR:MovingAverages]{TTR::SMA}.} +The name of the vector to passed into \code{\link[TTR:MovingAverages]{TTR::SMA()}}.} \item{n}{Number of periods to average over. Must be between 1 and \code{nrow(x)}, inclusive.} diff --git a/man/vwap.Rd b/man/vwap.Rd index 30a66f3f..98267f18 100644 --- a/man/vwap.Rd +++ b/man/vwap.Rd @@ -13,7 +13,7 @@ vwap( } \arguments{ \item{price}{A \link{character}-vector of \link{length} 1. "close" by default. -The name of the vector to passed into \link[TTR:MovingAverages]{TTR::VWAP}} +The name of the vector to passed into \code{\link[TTR:MovingAverages]{TTR::VWAP()}}} \item{n}{Number of periods to average over. Must be between 1 and \code{nrow(x)}, inclusive.} diff --git a/man/wma.Rd b/man/wma.Rd index 70ee0ac8..96c7e4a6 100644 --- a/man/wma.Rd +++ b/man/wma.Rd @@ -13,7 +13,7 @@ wma( } \arguments{ \item{price}{A \link{character}-vector of \link{length} 1. "close" by default. -The name of the vector to passed into \link[TTR:MovingAverages]{TTR::WMA}.} +The name of the vector to passed into \code{\link[TTR:MovingAverages]{TTR::WMA()}}.} \item{n}{Number of periods to average over. Must be between 1 and \code{nrow(x)}, inclusive.} diff --git a/man/write_xts.Rd b/man/write_xts.Rd index 23eb753c..df72488b 100644 --- a/man/write_xts.Rd +++ b/man/write_xts.Rd @@ -18,7 +18,7 @@ file ) } \arguments{ -\item{x}{An <\link{xts}>-object.} +\item{x}{An <\link[xts:xts]{xts::xts}>-object.} \item{file}{character string or strings giving the name of the file(s) which the data @@ -40,7 +40,7 @@ file The \code{\link[=write_xts]{write_xts()}}- and \code{\link[=read_xts]{read_xts()}}-functions are \code{\link[zoo:read.zoo]{zoo::write.zoo()}}- and \code{\link[zoo:read.zoo]{zoo::read.zoo()}}-wrapper functions. } \details{ -When reading and writing <\link{xts}>-objects the \link{attributes} does not follow the object. +When reading and writing <\link[xts:xts]{xts::xts}>-objects the \link{attributes} does not follow the object. } \seealso{ Other utility: diff --git a/man/zlema.Rd b/man/zlema.Rd index 2145efc8..87c14d31 100644 --- a/man/zlema.Rd +++ b/man/zlema.Rd @@ -13,7 +13,7 @@ zlema( } \arguments{ \item{price}{A \link{character}-vector of \link{length} 1. "close" by default. -The name of the vector to passed into \link[TTR:MovingAverages]{TTR::ZLEMA}.} +The name of the vector to passed into \code{\link[TTR:MovingAverages]{TTR::ZLEMA()}}.} \item{n}{Number of periods to average over. Must be between 1 and \code{nrow(x)}, inclusive.}