From 22cbae7fccb82e07de6c85503d6cccc997c744dc Mon Sep 17 00:00:00 2001 From: shikokuchuo <53399081+shikokuchuo@users.noreply.github.com> Date: Thu, 12 Sep 2024 00:09:07 +0100 Subject: [PATCH] refresh docs --- R/ichimoku.R | 14 ++++--- R/iplot.R | 26 ++++++------- R/methods.R | 67 +++++++++++++++++---------------- R/mltools.R | 34 +++++++++-------- R/plot.R | 24 ++++++------ R/switch.R | 5 ++- R/utils.R | 70 ++++++++++++++++++----------------- man/as.data.frame.ichimoku.Rd | 10 ++--- man/autoplot.ichimoku.Rd | 14 ++++--- man/autostrat.Rd | 10 ++--- man/coredata.ichimoku.Rd | 15 ++++---- man/df_append.Rd | 23 +++++++----- man/df_merge.Rd | 10 ++--- man/dot-ichimoku.Rd | 10 +++-- man/grid_dup.Rd | 6 +-- man/ichimoku.Rd | 8 ++-- man/index.ichimoku.Rd | 15 ++++---- man/iplot.Rd | 27 +++++++------- man/is.ichimoku.Rd | 3 +- man/look.Rd | 4 +- man/matrix_df.Rd | 2 +- man/mlgrid.Rd | 24 ++++++------ man/oanda_chart.Rd | 7 ++-- man/oanda_studio.Rd | 10 ++--- man/oanda_switch.Rd | 5 ++- man/plot.ichimoku.Rd | 24 ++++++------ man/print.ichimoku.Rd | 6 +-- man/str.ichimoku.Rd | 8 ++-- man/summary.ichimoku.Rd | 13 ++++--- man/tradingDays.Rd | 10 ++--- man/xts_df.Rd | 6 +-- 31 files changed, 272 insertions(+), 238 deletions(-) diff --git a/R/ichimoku.R b/R/ichimoku.R index 7c931439..2cce82a5 100644 --- a/R/ichimoku.R +++ b/R/ichimoku.R @@ -34,11 +34,12 @@ #' ichimoku analysis. #' @param keep.data [default FALSE] set to TRUE to retain additional data #' present in the input object as additional columns and/or attributes. -#' @param ... additional arguments, for instance 'holidays', passed along to -#' \code{\link{tradingDays}} for calculating the future cloud on daily data. - +#' @param ... additional arguments, for instance \sQuote{holidays}, passed along +#' to \code{\link{tradingDays}} for calculating the future cloud on daily +#' data. #' -#' @return An ichimoku object with S3 classes of 'ichimoku', 'xts' and 'zoo'. +#' @return An ichimoku object with S3 classes of \sQuote{ichimoku}, \sQuote{xts} +#' and \sQuote{zoo}. #' #' @details Calling an ichimoku object automatically invokes its print method, #' which by default produces a printout of the data to the console as well @@ -308,9 +309,10 @@ ichimoku.default <- function(x, ticker, periods = c(9L, 26L, 52L), keep.data = F #' #' @details A faster version of \code{\link{ichimoku}} which can be used when #' the data is a dataframe in the prescribed format. Does not support the -#' argument 'keep.data'. +#' argument \sQuote{keep.data}. #' -#' @return An ichimoku object with S3 classes of 'ichimoku', 'xts' and 'zoo'. +#' @return An ichimoku object with S3 classes of \sQuote{ichimoku}, \sQuote{xts} +#' and \sQuote{zoo}. #' #' @keywords internal #' @export diff --git a/R/iplot.R b/R/iplot.R index aef1e617..77caa87e 100644 --- a/R/iplot.R +++ b/R/iplot.R @@ -23,20 +23,20 @@ #' environment. Intuitive cursor infotip provides ready access to the data #' directly from the chart. #' -#' @param x an object of class 'ichimoku'. -#' @param theme [default 'classic'] with further choices of 'dark', 'mono', -#' 'noguchi', 'okabe-ito' or 'solarized'. +#' @param x an object of class \sQuote{ichimoku}. +#' @param theme [default 'classic'] with further choices of \sQuote{dark}, +#' \sQuote{mono}, \sQuote{noguchi}, \sQuote{okabe-ito} or \sQuote{solarized}. #' @inheritParams plot.ichimoku -#' @param ... additional parameters passed along to the 'options' argument of -#' \code{shiny::shinyApp()}. -#' @param launch.browser [default TRUE] If TRUE, the system's default web browser -#' will be launched automatically after the app is started. The value of this -#' argument can also be a function to call with the application's URL. To use -#' the default Shiny viewer in RStudio, please specify -#' \code{getOption("shiny.launch.browser")}. -#' -#' @return A Shiny app object with class 'shiny.appobj'. With default arguments, -#' the Shiny app is launched in the default browser. +#' @param ... additional parameters passed along to the \sQuote{options} +#' argument of \code{shiny::shinyApp()}. +#' @param launch.browser [default TRUE] If TRUE, the system's default web +#' browser will be launched automatically after the app is started. The +#' value of this argument can also be a function to call with the +#' application's URL. To use the default Shiny viewer in RStudio, please +#' specify \code{getOption("shiny.launch.browser")}. +#' +#' @return A Shiny app object with class \sQuote{shiny.appobj}. With default +#' arguments, the Shiny app is launched in the default browser. #' #' @details For further details please refer to the reference vignette by #' calling: \code{vignette("reference", package = "ichimoku")} diff --git a/R/methods.R b/R/methods.R index 5c591b7b..0e85982a 100644 --- a/R/methods.R +++ b/R/methods.R @@ -21,7 +21,7 @@ #' Default print method for ichimoku objects to enable automatic plotting of the #' ichimoku cloud chart. #' -#' @param x an object of class 'ichimoku'. +#' @param x an object of class \sQuote{ichimoku}. #' @param plot [default TRUE] set to FALSE to prevent automatic plotting of #' the ichimoku cloud chart. #' @param rows [default 26L] integer number of rows to print. @@ -33,8 +33,8 @@ #' depending on the parameters set. #' #' @details This function is an S3 method for the generic function print() for -#' class 'ichimoku'. It can be invoked by calling print(x) on an object 'x' -#' of class 'ichimoku'. +#' class \sQuote{ichimoku}. It can be invoked by calling print(x) on an +#' object \sQuote{x} of class \sQuote{ichimoku}. #' #' @examples #' cloud <- ichimoku(sample_ohlc_data, ticker = "TKR") @@ -59,15 +59,15 @@ print.ichimoku <- function(x, plot = TRUE, rows = 26L, ...) { #' #' Compactly display the internal structure of ichimoku objects. #' -#' @param object an object of class 'ichimoku'. +#' @param object an object of class \sQuote{ichimoku}. #' @param ... arguments passed to or from other methods. #' #' @return Invisible NULL. A compact display of the structure of the object is #' output to the console. #' -#' @details This function is an S3 method for the generic function str() -#' for class 'ichimoku'. It can be invoked by calling str(x) on an -#' object 'x' of class 'ichimoku'. +#' @details This function is an S3 method for the generic function str() for +#' class \sQuote{ichimoku}. It can be invoked by calling str(x) on an object +#' \sQuote{x} of class \sQuote{ichimoku}. #' #' @examples #' cloud <- ichimoku(sample_ohlc_data, ticker = "TKR") @@ -118,18 +118,19 @@ str.ichimoku <- function(object, ...) { #' #' Display summary information for an ichimoku object or its strategy. #' -#' @param object an object of class 'ichimoku'. +#' @param object an object of class \sQuote{ichimoku}. #' @param strat [default TRUE] to show the strategy summary if present. Set to #' FALSE to show the object summary instead. #' @param ... arguments passed to or from other methods. #' -#' @return A matrix containing the strategy summary, if present and 'strat' is -#' set to TRUE, otherwise a character vector containing an abbreviated object -#' summary (the full object summary is output to the console). +#' @return A matrix containing the strategy summary, if present and +#' \sQuote{strat} is set to TRUE, otherwise a character vector containing an +#' abbreviated object summary (the full object summary is output to the +#' console). #' #' @details This function is an S3 method for the generic function summary() for -#' class 'ichimoku'. It can be invoked by calling summary(x) on an object 'x' -#' of class 'ichimoku'. +#' class \sQuote{ichimoku}. It can be invoked by calling summary(x) on an +#' object \sQuote{x} of class \sQuote{ichimoku}. #' #' Performs basic validation for an ichimoku object and will inform if an #' ichimoku object contains invalid information. @@ -201,19 +202,19 @@ summary.ichimoku <- function(object, strat = TRUE, ...) { #' #' An optimised 'ichimoku' to 'data.frame' constructor. #' -#' @param x an object of class 'ichimoku'. +#' @param x an object of class \sQuote{ichimoku}. #' @param row.names not used. #' @param optional not used. #' @param keep.attrs [default FALSE] if set to TRUE, will preserve any custom #' attributes set on the original object. #' @param ... arguments passed to or from other methods. #' -#' @return A 'data.frame' object. The ichimoku object index is preserved as the -#' first column with header 'index'. +#' @return A \sQuote{data.frame} object. The ichimoku object index is preserved +#' as the first column with header \sQuote{index}. #' #' @details This function is an S3 method for the generic function -#' as.data.frame() for class 'ichimoku'. It can be invoked by calling -#' as.data.frame(x) on an object 'x' of class 'ichimoku'. +#' as.data.frame() for class \sQuote{ichimoku}. It can be invoked by calling +#' as.data.frame(x) on an object \sQuote{x} of class \sQuote{ichimoku}. #' #' @examples #' cloud <- ichimoku(sample_ohlc_data) @@ -238,19 +239,20 @@ NULL #' #' Method for extracting the core data matrix of ichimoku objects. #' -#' @param x an object of class 'ichimoku'. +#' @param x an object of class \sQuote{ichimoku}. #' @param fmt (optional) set to TRUE to retain the index as row names of the -#' returned matrix, or a character string passed on to the 'format' argument -#' of \code{format.POSIXct()} to format these values in a specific way. +#' returned matrix, or a character string passed on to the \sQuote{format} +#' argument of \code{format.POSIXct()} to format these values in a specific +#' way. #' @param ... arguments passed to or from other methods. #' #' @return A numeric matrix containing the ichimoku object data, stripped of the -#' index unless 'fmt' is specified in which case the index will be retained -#' as character values in the matrix row names. +#' index unless \sQuote{fmt} is specified in which case the index will be +#' retained as character values in the matrix row names. #' #' @details This function is an S3 method for the generic function coredata() -#' for class 'ichimoku'. It can be invoked by calling coredata(x) on an -#' object 'x' of class 'ichimoku'. +#' for class \sQuote{ichimoku}. It can be invoked by calling coredata(x) on +#' an object \sQuote{x} of class \sQuote{ichimoku}. #' #' @examples #' cloud <- ichimoku(sample_ohlc_data) @@ -284,20 +286,21 @@ NULL #' #' Method for extracting the date-time index of ichimoku objects. #' -#' @param x an object of class 'ichimoku'. -#' @param subset an integer or logical value or vector by which to subset the index. +#' @param x an object of class \sQuote{ichimoku}. +#' @param subset an integer or logical value or vector by which to subset the +#' index. #' @param ... arguments passed to or from other methods. #' #' @return The date-time index of the ichimoku object as a vector of POSIXct #' values. #' -#' @details This function is an S3 method for the generic function index() -#' for class 'ichimoku'. It can be invoked by calling index(x) on an -#' object 'x' of class 'ichimoku'. +#' @details This function is an S3 method for the generic function index() for +#' class \sQuote{ichimoku}. It can be invoked by calling index(x) on an +#' object \sQuote{x} of class \sQuote{ichimoku}. #' -#' Subsetting by specifying the 'subset' parameter subsets using the +#' Subsetting by specifying the \sQuote{subset} parameter subsets using the #' numerical values underlying the POSIXct times and results in a faster -#' operation than usual subset operators such as '['. +#' operation than usual subset operators such as \sQuote{\[}. #' #' @examples #' cloud <- ichimoku(sample_ohlc_data) diff --git a/R/mltools.R b/R/mltools.R index 98deb59e..da80b701 100644 --- a/R/mltools.R +++ b/R/mltools.R @@ -31,16 +31,16 @@ #' @param quietly (optional) if set to TRUE, will suppress printing of additional #' output to the console and return quietly. #' -#' @return Returned invisibly, a list of 'n' ichimoku objects containing -#' strategies, with attributes 'logret' (a vector of cumulative log returns -#' for all strategies) and 'summary' (a matrix of summaries for the top 'n' -#' strategies). +#' @return Returned invisibly, a list of \sQuote{n} ichimoku objects containing +#' strategies, with attributes \sQuote{logret} (a vector of cumulative log +#' returns for all strategies) and \sQuote{summary} (a matrix of summaries +#' for the top \sQuote{n} strategies). #' #' In addition, the strategy summaries are printed to the console. #' #' @details Ichimoku objects for each strategy are returned as a list. The #' cumulative log returns for all strategies as well as the summaries for -#' the top 'n' strategies are saved as attributes to the list. This +#' the top \sQuote{n} strategies are saved as attributes to the list. This #' information may be retrieved by using \code{\link{look}} on the returned #' list. #' @@ -173,8 +173,8 @@ autostrat <- function(x, #' @param type [default 'boolean'] choose 'boolean', 'numeric' or 'z-score'. #' 'boolean' creates a grid of dummy variables for ichimoku indicator #' conditions of the form 1 if c1 > c2, 0 otherwise. 'numeric' creates a -#' grid of the numeric difference c1 - c2. 'z-score' standardises the numeric -#' grid by the mean and standard deviation of each feature. +#' grid of the numeric difference c1 - c2. 'z-score' standardises the +#' numeric grid by the mean and standard deviation of each feature. #' @param format [default 'dataframe'] select either 'dataframe' or 'matrix' for #' the format of returned object. #' @param unique [default TRUE] to return only unique combinations of c1 and c2. @@ -184,16 +184,18 @@ autostrat <- function(x, #' within the function, referencing intermediate objects such as: #' 'core', the coredata matrix of the ichimoku object, 'xlen' the number of #' observations, or any of the function parameters etc. Each evaluated -#' expression must return a vector of length 'xlen' for inclusion in the grid. +#' expression must return a vector of length 'xlen' for inclusion in the +#' grid. #' -#' @return A data.frame or matrix in a 'tidy' format with one observation per -#' row and one feature per column with the target 'y' as the first column -#' (unless set to 'none'). +#' @return A data.frame or matrix in a tidy format with one observation per +#' row and one feature per column with the target \sQuote{y} as the first +#' column (unless set to \sQuote{none}). #' -#' The 'y' and 'k' parameters, trade direction and grid type are set as -#' attributes, with 'means' and 'sdevs' also populated for type 'z-score' to -#' return the mean and standard deviation for each column. To view these, -#' use \code{\link{look}} on the returned object. +#' The \sQuote{y} and \sQuote{k} parameters, trade direction and grid type +#' are set as attributes, with \sQuote{means} and \sQuote{sdevs} also +#' populated for type \sQuote{z-score} to return the mean and standard +#' deviation for each column. To view these, use \code{\link{look}} on the +#' returned object. #' #' @details The date-time index corresponds to when the indicator condition is #' met at the close for that period. The return is the k-period return @@ -201,7 +203,7 @@ autostrat <- function(x, #' the next opening price. #' #' Only valid combinations are included. This excludes any combination -#' involving 'open' as it is in effect a lagged indicator and not +#' involving \sQuote{open} as it is in effect a lagged indicator and not #' contemporaneous. The following trivial or highly-collinear pairs are also #' excluded: (high, close), (low, close), (low, high), (cloudTop, Senkou A), #' (cloudBase, senkou A), (cloudTop, senkouB), (cloudBase, senkouB), diff --git a/R/plot.R b/R/plot.R index f9a2f778..d9542ee6 100644 --- a/R/plot.R +++ b/R/plot.R @@ -20,17 +20,19 @@ #' #' Plot Ichimoku Kinko Hyo cloud charts from ichimoku objects. #' -#' @param x an object of class 'ichimoku'. +#' @param x an object of class \sQuote{ichimoku}. #' @param window (optional) a date-time window to subset the plot, in ISO-8601 -#' compatible range strings of the format used for 'xts' objects, for example -#' "2020-02-15/2020-08-15" or "2020-02-15/", "/2020-08" or "2020-07". +#' compatible range strings of the format used for \sQuote{xts} objects, for +#' example "2020-02-15/2020-08-15" or "2020-02-15/", "/2020-08" or "2020-07". #' @param ticker (optional) specify a ticker (or other text) to include in the #' chart heading. If not set, the ticker saved within the ichimoku object #' will be used. -#' @param subtitle (optional) specify a subtitle to display under the chart title. -#' @param theme [default 'classic'] with further choices of 'dark', 'mono', -#' 'noguchi', 'okabe-ito' or 'solarized'. Alternatively, supply a vector -#' of 12 colour values (hex codes or names) as a user-defined theme. +#' @param subtitle (optional) specify a subtitle to display under the chart +#' title. +#' @param theme [default 'classic'] with further choices of \sQuote{dark}, +#' \sQuote{mono}, \sQuote{noguchi}, \sQuote{okabe-ito} or \sQuote{solarized}. +#' Alternatively, supply a vector of 12 colour values (hex codes or names) +#' as a user-defined theme. #' @param strat [default TRUE] if the ichimoku object contains a strategy, the #' periods for which the strategy results in a position will be shaded, and #' the strategy printed as the chart subtitle (if not otherwise specified). @@ -42,15 +44,15 @@ #' matching the column name of the variable to be displayed as sub-plot. #' Specify \code{type = 'bar'} or \code{type = 'line'}, otherwise other type #' settings will take precedence. -#' @param ... additional arguments passed along to the print method for 'ggplot' -#' objects. +#' @param ... additional arguments passed along to the print method for +#' \sQuote{ggplot} objects. #' #' @return The ichimoku object supplied (invisibly). The requested plot is output #' to the graphical device. #' #' @details This function is an S3 method for the generic function plot() for -#' class 'ichimoku'. It can be invoked by calling plot(x) on an object 'x' -#' of class 'ichimoku'. +#' class \sQuote{ichimoku}. It can be invoked by calling plot(x) on an +#' object \sQuote{x} of class \sQuote{ichimoku}. #' #' For further details please refer to the reference vignette by calling: #' \code{vignette("reference", package = "ichimoku")} diff --git a/R/switch.R b/R/switch.R index cdcdd1a7..4f524821 100644 --- a/R/switch.R +++ b/R/switch.R @@ -18,8 +18,9 @@ #' Switch Default OANDA Server #' -#' Switch the default OANDA fxTrade server from 'practice' to 'live' or vice versa. -#' Settings persist for the current session only. +#' Switch the default OANDA fxTrade server from \sQuote{practice} to +#' \sQuote{live} or vice versa. Settings persist for the current session +#' only. #' #' @return Invisible NULL. A message informs the resulting default server setting. #' diff --git a/R/utils.R b/R/utils.R index ff8fe6a5..b52e8ed9 100644 --- a/R/utils.R +++ b/R/utils.R @@ -25,14 +25,14 @@ #' dates defined as holidays. Set to NULL for a continuously-traded market. #' @param ... other arguments not used by this function. #' -#' @return A vector of logical values: TRUE if the corresponding element of 'x' -#' is a weekday and not a holiday, FALSE otherwise. +#' @return A vector of logical values: TRUE if the corresponding element of +#' \sQuote{x} is a weekday and not a holiday, FALSE otherwise. #' -#' Or, if the parameter 'holidays' is set to NULL, a vector of TRUE values -#' of the same length as 'x'. +#' Or, if the parameter \sQuote{holidays} is set to NULL, a vector of TRUE +#' values of the same length as \sQuote{x}. #' #' @details New Year's Day (01-01) and Christmas Day (12-25) are defined as -#' holidays by default if 'holidays' is not specified. +#' holidays by default if \sQuote{holidays} is not specified. #' #' @examples #' dates <- seq(from = as.POSIXct("2020-01-01"), by = "1 day", length.out = 7) @@ -67,9 +67,9 @@ tradingDays <- function(x, holidays, ...) { #' Duplicates of expand.grid for 2 Variables #' -#' Create a vector of element positions of duplicates in the output of expand.grid -#' on 2 identical vectors. An efficient method of creating combinations for -#' 2 variables. +#' Create a vector of element positions of duplicates in the output of +#' expand.grid on 2 identical vectors. An efficient method of creating +#' combinations for 2 variables. #' #' @param n the length of vector passed to \code{expand.grid()}. #' @param omit.id (optional) set to TRUE to also select the elements where the 2 @@ -102,12 +102,12 @@ grid_dup <- function(n, omit.id) { #' #' An optimised 'xts' to 'data.frame' constructor. #' -#' @param x an 'xts' object. +#' @param x an \sQuote{xts} object. #' @param keep.attrs [default FALSE] if set to TRUE, will preserve any custom #' attributes set on the original object. #' -#' @return A 'data.frame' object. The 'xts' index is preserved as the first -#' column with header 'index'. +#' @return A \sQuote{data.frame} object. The \sQuote{xts} index is preserved as +#' the first column with header \sQuote{index}. #' #' @details The optimised data.frame constructors are used internally within #' the package and made available as utilities. Please note that no data @@ -133,9 +133,8 @@ xts_df <- function(x, keep.attrs = FALSE) { attributes(core) <- NULL df <- vector(mode = "list", length = len + 1L) df[[1L]] <- index(x) - for (i in seq_len(len)) { + for (i in seq_len(len)) df[[i + 1L]] <- core[start[i]:end[i]] - } `attributes<-`(df, c(list(names = c("index", dn2), class = "data.frame", row.names = .set_row_names(xlen)), @@ -150,7 +149,7 @@ xts_df <- function(x, keep.attrs = FALSE) { #' @param keep.attrs [default FALSE] if set to TRUE, will preserve any custom #' attributes set on the original object. #' -#' @return A 'data.frame' object. If the matrix has row names, these are +#' @return A \sQuote{data.frame} object. If the matrix has row names, these are #' retained by the dataframe. #' #' @details The optimised data.frame constructors are used internally within @@ -197,11 +196,11 @@ matrix_df <- function(x, keep.attrs = FALSE) { #' #' @details Can be used to join price dataframes retrieved by \code{\link{oanda}}. #' The function is designed to join complete historical data. If the data to -#' be merged contains data with incomplete periods, all entries are preserved -#' rather than updated. If incomplete periods are detected within the data, -#' a warning is issued, and the resulting dataframe should be manually checked -#' in case it contains unwanted duplicates. Use \code{\link{df_append}} for -#' updating dataframes with new values. +#' be merged contains data with incomplete periods, all entries are +#' preserved rather than updated. If incomplete periods are detected within +#' the data, a warning is issued, and the resulting dataframe should be +#' manually checked in case it contains unwanted duplicates. Use +#' \code{\link{df_append}} for updating dataframes with new values. #' #' @examples #' data1 <- sample_ohlc_data[1:6, ] @@ -237,20 +236,23 @@ df_merge <- function(...) { #' @param new data.frame object containing new data. #' @param key [default 'time'] column name used as key, provided as a character #' string. -#' @param keep.attr [default 'timestamp'] name of an attribute in 'new' to -#' retain, if present, provided as a character string. +#' @param keep.attr [default 'timestamp'] name of an attribute in \sQuote{new} +#' to retain, if present, provided as a character string. #' #' @return A data.frame of the existing data appended with the new data. If the -#' data in 'new' contains data with the same value for the key column as 'old', -#' the data in 'new' will overwrite the data in 'old'. +#' data in \sQuote{new} contains data with the same value for the key column +#' as \sQuote{old}, the data in \sQuote{new} will overwrite the data in +#' \sQuote{old}. #' -#' If the attribute specified by 'keep.attr' is present in 'new', this is -#' retained. All other non-required attributes are dropped. +#' If the attribute specified by \sQuote{keep.attr} is present in +#' \sQuote{new}, this is retained. All other non-required attributes are +#' dropped. #' -#' @details Can be used to update price dataframes retrieved by \code{\link{oanda}}. -#' The function is designed to update existing data with new values as they -#' become available. As opposed to \code{\link{df_merge}}, the data in 'new' -#' will overwrite the data in 'old' rather than create duplicates. +#' @details Can be used to update price dataframes retrieved by +#' \code{\link{oanda}}. The function is designed to update existing data +#' with new values as they become available. As opposed to +#' \code{\link{df_merge}}, the data in \sQuote{new} will overwrite the data +#' in \sQuote{old} rather than create duplicates. #' #' @examples #' data1 <- sample_ohlc_data[1:8, ] @@ -276,8 +278,8 @@ df_append <- function(old, new, key = "time", keep.attr = "timestamp") { #' #' Inspect the informational attributes of objects. #' -#' @param x an object (optional). If 'x' is not supplied, \code{\link{.Last.value}} -#' will be used instead. +#' @param x an object (optional). If \sQuote{x} is not supplied, +#' \code{\link{.Last.value}} will be used instead. #' #' @return For objects created by the ichimoku package, a list of attributes #' specific to that data type. @@ -347,7 +349,8 @@ more <- function(rows) #' #' @param x an object. #' -#' @return A logical value of TRUE if 'x' is of class 'ichimoku', otherwise FALSE. +#' @return A logical value of TRUE if \sQuote{x} is of class \sQuote{ichimoku}, +#' FALSE otherwise. #' #' @examples #' cloud <- ichimoku(sample_ohlc_data) @@ -369,7 +372,8 @@ is.ichimoku <- function(x) .Call(ichimoku_isichimoku, x) #' @param choice function parameter to match. #' @param choices character vector listing the candidates to match to. #' -#' @return Integer position of 'choice' in 'choices' if matched, else 0L. +#' @return Integer position of \sQuote{choice} in \sQuote{choices} if matched, +#' else 0L. #' #' @noRd #' diff --git a/man/as.data.frame.ichimoku.Rd b/man/as.data.frame.ichimoku.Rd index 3881f6e8..d5ac6cfe 100644 --- a/man/as.data.frame.ichimoku.Rd +++ b/man/as.data.frame.ichimoku.Rd @@ -7,7 +7,7 @@ \method{as.data.frame}{ichimoku}(x, row.names, optional, keep.attrs = FALSE, ...) } \arguments{ -\item{x}{an object of class 'ichimoku'.} +\item{x}{an object of class \sQuote{ichimoku}.} \item{row.names}{not used.} @@ -19,16 +19,16 @@ attributes set on the original object.} \item{...}{arguments passed to or from other methods.} } \value{ -A 'data.frame' object. The ichimoku object index is preserved as the - first column with header 'index'. +A \sQuote{data.frame} object. The ichimoku object index is preserved + as the first column with header \sQuote{index}. } \description{ An optimised 'ichimoku' to 'data.frame' constructor. } \details{ This function is an S3 method for the generic function - as.data.frame() for class 'ichimoku'. It can be invoked by calling - as.data.frame(x) on an object 'x' of class 'ichimoku'. + as.data.frame() for class \sQuote{ichimoku}. It can be invoked by calling + as.data.frame(x) on an object \sQuote{x} of class \sQuote{ichimoku}. } \examples{ cloud <- ichimoku(sample_ohlc_data) diff --git a/man/autoplot.ichimoku.Rd b/man/autoplot.ichimoku.Rd index bd573cc5..b3c75448 100644 --- a/man/autoplot.ichimoku.Rd +++ b/man/autoplot.ichimoku.Rd @@ -21,18 +21,20 @@ \item{object}{an object of class 'ichimoku'.} \item{window}{(optional) a date-time window to subset the plot, in ISO-8601 -compatible range strings of the format used for 'xts' objects, for example -"2020-02-15/2020-08-15" or "2020-02-15/", "/2020-08" or "2020-07".} +compatible range strings of the format used for \sQuote{xts} objects, for +example "2020-02-15/2020-08-15" or "2020-02-15/", "/2020-08" or "2020-07".} \item{ticker}{(optional) specify a ticker (or other text) to include in the chart heading. If not set, the ticker saved within the ichimoku object will be used.} -\item{subtitle}{(optional) specify a subtitle to display under the chart title.} +\item{subtitle}{(optional) specify a subtitle to display under the chart +title.} -\item{theme}{[default 'classic'] with further choices of 'dark', 'mono', -'noguchi', 'okabe-ito' or 'solarized'. Alternatively, supply a vector -of 12 colour values (hex codes or names) as a user-defined theme.} +\item{theme}{[default 'classic'] with further choices of \sQuote{dark}, +\sQuote{mono}, \sQuote{noguchi}, \sQuote{okabe-ito} or \sQuote{solarized}. +Alternatively, supply a vector of 12 colour values (hex codes or names) +as a user-defined theme.} \item{strat}{[default TRUE] if the ichimoku object contains a strategy, the periods for which the strategy results in a position will be shaded, and diff --git a/man/autostrat.Rd b/man/autostrat.Rd index e0014cbf..5d673bd2 100644 --- a/man/autostrat.Rd +++ b/man/autostrat.Rd @@ -21,10 +21,10 @@ level to 3 to return asymmetric strategies of the form 's1 x s2'.} output to the console and return quietly.} } \value{ -Returned invisibly, a list of 'n' ichimoku objects containing - strategies, with attributes 'logret' (a vector of cumulative log returns - for all strategies) and 'summary' (a matrix of summaries for the top 'n' - strategies). +Returned invisibly, a list of \sQuote{n} ichimoku objects containing + strategies, with attributes \sQuote{logret} (a vector of cumulative log + returns for all strategies) and \sQuote{summary} (a matrix of summaries + for the top \sQuote{n} strategies). In addition, the strategy summaries are printed to the console. } @@ -37,7 +37,7 @@ Generate a list of the top performing ichimoku cloud strategies based on \details{ Ichimoku objects for each strategy are returned as a list. The cumulative log returns for all strategies as well as the summaries for - the top 'n' strategies are saved as attributes to the list. This + the top \sQuote{n} strategies are saved as attributes to the list. This information may be retrieved by using \code{\link{look}} on the returned list. diff --git a/man/coredata.ichimoku.Rd b/man/coredata.ichimoku.Rd index b9db7704..97b12eff 100644 --- a/man/coredata.ichimoku.Rd +++ b/man/coredata.ichimoku.Rd @@ -8,26 +8,27 @@ \method{coredata}{ichimoku}(x, fmt, ...) } \arguments{ -\item{x}{an object of class 'ichimoku'.} +\item{x}{an object of class \sQuote{ichimoku}.} \item{fmt}{(optional) set to TRUE to retain the index as row names of the -returned matrix, or a character string passed on to the 'format' argument -of \code{format.POSIXct()} to format these values in a specific way.} +returned matrix, or a character string passed on to the \sQuote{format} +argument of \code{format.POSIXct()} to format these values in a specific +way.} \item{...}{arguments passed to or from other methods.} } \value{ A numeric matrix containing the ichimoku object data, stripped of the - index unless 'fmt' is specified in which case the index will be retained - as character values in the matrix row names. + index unless \sQuote{fmt} is specified in which case the index will be + retained as character values in the matrix row names. } \description{ Method for extracting the core data matrix of ichimoku objects. } \details{ This function is an S3 method for the generic function coredata() - for class 'ichimoku'. It can be invoked by calling coredata(x) on an - object 'x' of class 'ichimoku'. + for class \sQuote{ichimoku}. It can be invoked by calling coredata(x) on + an object \sQuote{x} of class \sQuote{ichimoku}. } \examples{ cloud <- ichimoku(sample_ohlc_data) diff --git a/man/df_append.Rd b/man/df_append.Rd index b95f35b9..209e2d5e 100644 --- a/man/df_append.Rd +++ b/man/df_append.Rd @@ -14,16 +14,18 @@ df_append(old, new, key = "time", keep.attr = "timestamp") \item{key}{[default 'time'] column name used as key, provided as a character string.} -\item{keep.attr}{[default 'timestamp'] name of an attribute in 'new' to -retain, if present, provided as a character string.} +\item{keep.attr}{[default 'timestamp'] name of an attribute in \sQuote{new} +to retain, if present, provided as a character string.} } \value{ A data.frame of the existing data appended with the new data. If the - data in 'new' contains data with the same value for the key column as 'old', - the data in 'new' will overwrite the data in 'old'. + data in \sQuote{new} contains data with the same value for the key column + as \sQuote{old}, the data in \sQuote{new} will overwrite the data in + \sQuote{old}. - If the attribute specified by 'keep.attr' is present in 'new', this is - retained. All other non-required attributes are dropped. + If the attribute specified by \sQuote{keep.attr} is present in + \sQuote{new}, this is retained. All other non-required attributes are + dropped. } \description{ Update a 'data.frame' object with new data. Can be used to append new updated @@ -31,10 +33,11 @@ Update a 'data.frame' object with new data. Can be used to append new updated indexed by a unique timestamp/identifier in a key column. } \details{ -Can be used to update price dataframes retrieved by \code{\link{oanda}}. - The function is designed to update existing data with new values as they - become available. As opposed to \code{\link{df_merge}}, the data in 'new' - will overwrite the data in 'old' rather than create duplicates. +Can be used to update price dataframes retrieved by + \code{\link{oanda}}. The function is designed to update existing data + with new values as they become available. As opposed to + \code{\link{df_merge}}, the data in \sQuote{new} will overwrite the data + in \sQuote{old} rather than create duplicates. } \examples{ data1 <- sample_ohlc_data[1:8, ] diff --git a/man/df_merge.Rd b/man/df_merge.Rd index a45e5a42..1eea3817 100644 --- a/man/df_merge.Rd +++ b/man/df_merge.Rd @@ -22,11 +22,11 @@ Full join on an arbitrary number of 'data.frame' objects passed as arguments, \details{ Can be used to join price dataframes retrieved by \code{\link{oanda}}. The function is designed to join complete historical data. If the data to - be merged contains data with incomplete periods, all entries are preserved - rather than updated. If incomplete periods are detected within the data, - a warning is issued, and the resulting dataframe should be manually checked - in case it contains unwanted duplicates. Use \code{\link{df_append}} for - updating dataframes with new values. + be merged contains data with incomplete periods, all entries are + preserved rather than updated. If incomplete periods are detected within + the data, a warning is issued, and the resulting dataframe should be + manually checked in case it contains unwanted duplicates. Use + \code{\link{df_append}} for updating dataframes with new values. } \examples{ data1 <- sample_ohlc_data[1:6, ] diff --git a/man/dot-ichimoku.Rd b/man/dot-ichimoku.Rd index 27eee73c..7e3210a4 100644 --- a/man/dot-ichimoku.Rd +++ b/man/dot-ichimoku.Rd @@ -18,11 +18,13 @@ periods used for the cloud. This parameter shoud not normally be modified as using other values would be invalid in the context of traditional ichimoku analysis.} -\item{...}{additional arguments, for instance 'holidays', passed along to -\code{\link{tradingDays}} for calculating the future cloud on daily data.} +\item{...}{additional arguments, for instance \sQuote{holidays}, passed along +to \code{\link{tradingDays}} for calculating the future cloud on daily +data.} } \value{ -An ichimoku object with S3 classes of 'ichimoku', 'xts' and 'zoo'. +An ichimoku object with S3 classes of \sQuote{ichimoku}, \sQuote{xts} + and \sQuote{zoo}. } \description{ Create an ichimoku object containing values for all components of the @@ -34,6 +36,6 @@ Create an ichimoku object containing values for all components of the \details{ A faster version of \code{\link{ichimoku}} which can be used when the data is a dataframe in the prescribed format. Does not support the - argument 'keep.data'. + argument \sQuote{keep.data}. } \keyword{internal} diff --git a/man/grid_dup.Rd b/man/grid_dup.Rd index 43602163..09dd2e59 100644 --- a/man/grid_dup.Rd +++ b/man/grid_dup.Rd @@ -18,9 +18,9 @@ duplicates with 'omit.id' set to TRUE would be the equivalent of A numeric vector. } \description{ -Create a vector of element positions of duplicates in the output of expand.grid - on 2 identical vectors. An efficient method of creating combinations for - 2 variables. +Create a vector of element positions of duplicates in the output of + expand.grid on 2 identical vectors. An efficient method of creating + combinations for 2 variables. } \examples{ n <- 3 diff --git a/man/ichimoku.Rd b/man/ichimoku.Rd index 9a75d93c..edd8620e 100644 --- a/man/ichimoku.Rd +++ b/man/ichimoku.Rd @@ -36,11 +36,13 @@ ichimoku analysis.} \item{keep.data}{[default FALSE] set to TRUE to retain additional data present in the input object as additional columns and/or attributes.} -\item{...}{additional arguments, for instance 'holidays', passed along to -\code{\link{tradingDays}} for calculating the future cloud on daily data.} +\item{...}{additional arguments, for instance \sQuote{holidays}, passed along +to \code{\link{tradingDays}} for calculating the future cloud on daily +data.} } \value{ -An ichimoku object with S3 classes of 'ichimoku', 'xts' and 'zoo'. +An ichimoku object with S3 classes of \sQuote{ichimoku}, \sQuote{xts} + and \sQuote{zoo}. } \description{ Create an ichimoku object containing values for all components of the diff --git a/man/index.ichimoku.Rd b/man/index.ichimoku.Rd index da92da59..c3a46439 100644 --- a/man/index.ichimoku.Rd +++ b/man/index.ichimoku.Rd @@ -8,9 +8,10 @@ \method{index}{ichimoku}(x, subset, ...) } \arguments{ -\item{x}{an object of class 'ichimoku'.} +\item{x}{an object of class \sQuote{ichimoku}.} -\item{subset}{an integer or logical value or vector by which to subset the index.} +\item{subset}{an integer or logical value or vector by which to subset the +index.} \item{...}{arguments passed to or from other methods.} } @@ -22,13 +23,13 @@ The date-time index of the ichimoku object as a vector of POSIXct Method for extracting the date-time index of ichimoku objects. } \details{ -This function is an S3 method for the generic function index() - for class 'ichimoku'. It can be invoked by calling index(x) on an - object 'x' of class 'ichimoku'. +This function is an S3 method for the generic function index() for + class \sQuote{ichimoku}. It can be invoked by calling index(x) on an + object \sQuote{x} of class \sQuote{ichimoku}. - Subsetting by specifying the 'subset' parameter subsets using the + Subsetting by specifying the \sQuote{subset} parameter subsets using the numerical values underlying the POSIXct times and results in a faster - operation than usual subset operators such as '['. + operation than usual subset operators such as \sQuote{\[}. } \examples{ cloud <- ichimoku(sample_ohlc_data) diff --git a/man/iplot.Rd b/man/iplot.Rd index da4d1308..c0069cb6 100644 --- a/man/iplot.Rd +++ b/man/iplot.Rd @@ -17,16 +17,17 @@ iplot( ) } \arguments{ -\item{x}{an object of class 'ichimoku'.} +\item{x}{an object of class \sQuote{ichimoku}.} \item{ticker}{(optional) specify a ticker (or other text) to include in the chart heading. If not set, the ticker saved within the ichimoku object will be used.} -\item{subtitle}{(optional) specify a subtitle to display under the chart title.} +\item{subtitle}{(optional) specify a subtitle to display under the chart +title.} -\item{theme}{[default 'classic'] with further choices of 'dark', 'mono', -'noguchi', 'okabe-ito' or 'solarized'.} +\item{theme}{[default 'classic'] with further choices of \sQuote{dark}, +\sQuote{mono}, \sQuote{noguchi}, \sQuote{okabe-ito} or \sQuote{solarized}.} \item{strat}{[default TRUE] if the ichimoku object contains a strategy, the periods for which the strategy results in a position will be shaded, and @@ -42,18 +43,18 @@ matching the column name of the variable to be displayed as sub-plot. Specify \code{type = 'bar'} or \code{type = 'line'}, otherwise other type settings will take precedence.} -\item{...}{additional parameters passed along to the 'options' argument of -\code{shiny::shinyApp()}.} +\item{...}{additional parameters passed along to the \sQuote{options} +argument of \code{shiny::shinyApp()}.} -\item{launch.browser}{[default TRUE] If TRUE, the system's default web browser -will be launched automatically after the app is started. The value of this -argument can also be a function to call with the application's URL. To use -the default Shiny viewer in RStudio, please specify -\code{getOption("shiny.launch.browser")}.} +\item{launch.browser}{[default TRUE] If TRUE, the system's default web +browser will be launched automatically after the app is started. The +value of this argument can also be a function to call with the +application's URL. To use the default Shiny viewer in RStudio, please +specify \code{getOption("shiny.launch.browser")}.} } \value{ -A Shiny app object with class 'shiny.appobj'. With default arguments, - the Shiny app is launched in the default browser. +A Shiny app object with class \sQuote{shiny.appobj}. With default + arguments, the Shiny app is launched in the default browser. } \description{ Plot Ichimoku Kinko Hyo cloud charts from ichimoku objects in R Shiny, diff --git a/man/is.ichimoku.Rd b/man/is.ichimoku.Rd index 36126d5d..676f1e40 100644 --- a/man/is.ichimoku.Rd +++ b/man/is.ichimoku.Rd @@ -10,7 +10,8 @@ is.ichimoku(x) \item{x}{an object.} } \value{ -A logical value of TRUE if 'x' is of class 'ichimoku', otherwise FALSE. +A logical value of TRUE if \sQuote{x} is of class \sQuote{ichimoku}, + FALSE otherwise. } \description{ A function for checking if an object is an ichimoku object. diff --git a/man/look.Rd b/man/look.Rd index 44cc180d..893ec2fe 100644 --- a/man/look.Rd +++ b/man/look.Rd @@ -7,8 +7,8 @@ look(x = .Last.value) } \arguments{ -\item{x}{an object (optional). If 'x' is not supplied, \code{\link{.Last.value}} -will be used instead.} +\item{x}{an object (optional). If \sQuote{x} is not supplied, +\code{\link{.Last.value}} will be used instead.} } \value{ For objects created by the ichimoku package, a list of attributes diff --git a/man/matrix_df.Rd b/man/matrix_df.Rd index 1bbac423..598d41d0 100644 --- a/man/matrix_df.Rd +++ b/man/matrix_df.Rd @@ -13,7 +13,7 @@ matrix_df(x, keep.attrs = FALSE) attributes set on the original object.} } \value{ -A 'data.frame' object. If the matrix has row names, these are +A \sQuote{data.frame} object. If the matrix has row names, these are retained by the dataframe. } \description{ diff --git a/man/mlgrid.Rd b/man/mlgrid.Rd index b2bc5acb..397ddba8 100644 --- a/man/mlgrid.Rd +++ b/man/mlgrid.Rd @@ -29,8 +29,8 @@ target variable 'y'.} \item{type}{[default 'boolean'] choose 'boolean', 'numeric' or 'z-score'. 'boolean' creates a grid of dummy variables for ichimoku indicator conditions of the form 1 if c1 > c2, 0 otherwise. 'numeric' creates a -grid of the numeric difference c1 - c2. 'z-score' standardises the numeric -grid by the mean and standard deviation of each feature.} +grid of the numeric difference c1 - c2. 'z-score' standardises the +numeric grid by the mean and standard deviation of each feature.} \item{format}{[default 'dataframe'] select either 'dataframe' or 'matrix' for the format of returned object.} @@ -43,17 +43,19 @@ quoted language objects or expressions, which are evaluated internally within the function, referencing intermediate objects such as: 'core', the coredata matrix of the ichimoku object, 'xlen' the number of observations, or any of the function parameters etc. Each evaluated -expression must return a vector of length 'xlen' for inclusion in the grid.} +expression must return a vector of length 'xlen' for inclusion in the +grid.} } \value{ -A data.frame or matrix in a 'tidy' format with one observation per - row and one feature per column with the target 'y' as the first column - (unless set to 'none'). +A data.frame or matrix in a tidy format with one observation per + row and one feature per column with the target \sQuote{y} as the first + column (unless set to \sQuote{none}). - The 'y' and 'k' parameters, trade direction and grid type are set as - attributes, with 'means' and 'sdevs' also populated for type 'z-score' to - return the mean and standard deviation for each column. To view these, - use \code{\link{look}} on the returned object. + The \sQuote{y} and \sQuote{k} parameters, trade direction and grid type + are set as attributes, with \sQuote{means} and \sQuote{sdevs} also + populated for type \sQuote{z-score} to return the mean and standard + deviation for each column. To view these, use \code{\link{look}} on the + returned object. } \description{ Create a grid of ichimoku indicator conditions and next period returns. The @@ -69,7 +71,7 @@ The date-time index corresponds to when the indicator condition is the next opening price. Only valid combinations are included. This excludes any combination - involving 'open' as it is in effect a lagged indicator and not + involving \sQuote{open} as it is in effect a lagged indicator and not contemporaneous. The following trivial or highly-collinear pairs are also excluded: (high, close), (low, close), (low, high), (cloudTop, Senkou A), (cloudBase, senkou A), (cloudTop, senkouB), (cloudBase, senkouB), diff --git a/man/oanda_chart.Rd b/man/oanda_chart.Rd index fce96a45..1a4b69e6 100644 --- a/man/oanda_chart.Rd +++ b/man/oanda_chart.Rd @@ -40,9 +40,10 @@ chart to ensure a full cloud is always displayed.} \item{price}{[default "M"] pricing component, one of "M" (midpoint), "B" (bid) or "A" (ask).} -\item{theme}{[default 'classic'] with further choices of 'dark', 'mono', -'noguchi', 'okabe-ito' or 'solarized'. Alternatively, supply a vector -of 12 colour values (hex codes or names) as a user-defined theme.} +\item{theme}{[default 'classic'] with further choices of \sQuote{dark}, +\sQuote{mono}, \sQuote{noguchi}, \sQuote{okabe-ito} or \sQuote{solarized}. +Alternatively, supply a vector of 12 colour values (hex codes or names) +as a user-defined theme.} \item{type}{[default 'none'] type of sub-plot to display beneath the ichimoku cloud chart, with a choice of 'none', 'r' or 's' for the corresponding diff --git a/man/oanda_studio.Rd b/man/oanda_studio.Rd index d382f2dc..b18411ac 100644 --- a/man/oanda_studio.Rd +++ b/man/oanda_studio.Rd @@ -65,11 +65,11 @@ of the R console.} calculating the ichimoku cloud, \code{\link{autoplot}} to set chart parameters, or the 'options' argument of \code{shiny::shinyApp()}.} -\item{launch.browser}{[default TRUE] If TRUE, the system's default web browser -will be launched automatically after the app is started. The value of this -argument can also be a function to call with the application's URL. To use -the default Shiny viewer in RStudio, please specify -\code{getOption("shiny.launch.browser")}.} +\item{launch.browser}{[default TRUE] If TRUE, the system's default web +browser will be launched automatically after the app is started. The +value of this argument can also be a function to call with the +application's URL. To use the default Shiny viewer in RStudio, please +specify \code{getOption("shiny.launch.browser")}.} \item{periods}{[default c(9L, 26L, 52L)] a vector defining the length of periods used for the cloud. This parameter shoud not normally be modified diff --git a/man/oanda_switch.Rd b/man/oanda_switch.Rd index 9aec8d14..515b35de 100644 --- a/man/oanda_switch.Rd +++ b/man/oanda_switch.Rd @@ -10,8 +10,9 @@ oanda_switch() Invisible NULL. A message informs the resulting default server setting. } \description{ -Switch the default OANDA fxTrade server from 'practice' to 'live' or vice versa. - Settings persist for the current session only. +Switch the default OANDA fxTrade server from \sQuote{practice} to + \sQuote{live} or vice versa. Settings persist for the current session + only. } \details{ The default server at the start of a new session is the practice server. diff --git a/man/plot.ichimoku.Rd b/man/plot.ichimoku.Rd index 8300196d..a4ff969d 100644 --- a/man/plot.ichimoku.Rd +++ b/man/plot.ichimoku.Rd @@ -17,21 +17,23 @@ ) } \arguments{ -\item{x}{an object of class 'ichimoku'.} +\item{x}{an object of class \sQuote{ichimoku}.} \item{window}{(optional) a date-time window to subset the plot, in ISO-8601 -compatible range strings of the format used for 'xts' objects, for example -"2020-02-15/2020-08-15" or "2020-02-15/", "/2020-08" or "2020-07".} +compatible range strings of the format used for \sQuote{xts} objects, for +example "2020-02-15/2020-08-15" or "2020-02-15/", "/2020-08" or "2020-07".} \item{ticker}{(optional) specify a ticker (or other text) to include in the chart heading. If not set, the ticker saved within the ichimoku object will be used.} -\item{subtitle}{(optional) specify a subtitle to display under the chart title.} +\item{subtitle}{(optional) specify a subtitle to display under the chart +title.} -\item{theme}{[default 'classic'] with further choices of 'dark', 'mono', -'noguchi', 'okabe-ito' or 'solarized'. Alternatively, supply a vector -of 12 colour values (hex codes or names) as a user-defined theme.} +\item{theme}{[default 'classic'] with further choices of \sQuote{dark}, +\sQuote{mono}, \sQuote{noguchi}, \sQuote{okabe-ito} or \sQuote{solarized}. +Alternatively, supply a vector of 12 colour values (hex codes or names) +as a user-defined theme.} \item{strat}{[default TRUE] if the ichimoku object contains a strategy, the periods for which the strategy results in a position will be shaded, and @@ -47,8 +49,8 @@ matching the column name of the variable to be displayed as sub-plot. Specify \code{type = 'bar'} or \code{type = 'line'}, otherwise other type settings will take precedence.} -\item{...}{additional arguments passed along to the print method for 'ggplot' -objects.} +\item{...}{additional arguments passed along to the print method for +\sQuote{ggplot} objects.} } \value{ The ichimoku object supplied (invisibly). The requested plot is output @@ -59,8 +61,8 @@ Plot Ichimoku Kinko Hyo cloud charts from ichimoku objects. } \details{ This function is an S3 method for the generic function plot() for - class 'ichimoku'. It can be invoked by calling plot(x) on an object 'x' - of class 'ichimoku'. + class \sQuote{ichimoku}. It can be invoked by calling plot(x) on an + object \sQuote{x} of class \sQuote{ichimoku}. For further details please refer to the reference vignette by calling: \code{vignette("reference", package = "ichimoku")} diff --git a/man/print.ichimoku.Rd b/man/print.ichimoku.Rd index 62f24b1c..862077e9 100644 --- a/man/print.ichimoku.Rd +++ b/man/print.ichimoku.Rd @@ -7,7 +7,7 @@ \method{print}{ichimoku}(x, plot = TRUE, rows = 26L, ...) } \arguments{ -\item{x}{an object of class 'ichimoku'.} +\item{x}{an object of class \sQuote{ichimoku}.} \item{plot}{[default TRUE] set to FALSE to prevent automatic plotting of the ichimoku cloud chart.} @@ -28,8 +28,8 @@ Default print method for ichimoku objects to enable automatic plotting of the } \details{ This function is an S3 method for the generic function print() for - class 'ichimoku'. It can be invoked by calling print(x) on an object 'x' - of class 'ichimoku'. + class \sQuote{ichimoku}. It can be invoked by calling print(x) on an + object \sQuote{x} of class \sQuote{ichimoku}. } \examples{ cloud <- ichimoku(sample_ohlc_data, ticker = "TKR") diff --git a/man/str.ichimoku.Rd b/man/str.ichimoku.Rd index 6f277bbc..36920cd5 100644 --- a/man/str.ichimoku.Rd +++ b/man/str.ichimoku.Rd @@ -7,7 +7,7 @@ \method{str}{ichimoku}(object, ...) } \arguments{ -\item{object}{an object of class 'ichimoku'.} +\item{object}{an object of class \sQuote{ichimoku}.} \item{...}{arguments passed to or from other methods.} } @@ -19,9 +19,9 @@ Invisible NULL. A compact display of the structure of the object is Compactly display the internal structure of ichimoku objects. } \details{ -This function is an S3 method for the generic function str() - for class 'ichimoku'. It can be invoked by calling str(x) on an - object 'x' of class 'ichimoku'. +This function is an S3 method for the generic function str() for + class \sQuote{ichimoku}. It can be invoked by calling str(x) on an object + \sQuote{x} of class \sQuote{ichimoku}. } \examples{ cloud <- ichimoku(sample_ohlc_data, ticker = "TKR") diff --git a/man/summary.ichimoku.Rd b/man/summary.ichimoku.Rd index 61d54c11..cf99ecae 100644 --- a/man/summary.ichimoku.Rd +++ b/man/summary.ichimoku.Rd @@ -7,7 +7,7 @@ \method{summary}{ichimoku}(object, strat = TRUE, ...) } \arguments{ -\item{object}{an object of class 'ichimoku'.} +\item{object}{an object of class \sQuote{ichimoku}.} \item{strat}{[default TRUE] to show the strategy summary if present. Set to FALSE to show the object summary instead.} @@ -15,17 +15,18 @@ FALSE to show the object summary instead.} \item{...}{arguments passed to or from other methods.} } \value{ -A matrix containing the strategy summary, if present and 'strat' is - set to TRUE, otherwise a character vector containing an abbreviated object - summary (the full object summary is output to the console). +A matrix containing the strategy summary, if present and + \sQuote{strat} is set to TRUE, otherwise a character vector containing an + abbreviated object summary (the full object summary is output to the + console). } \description{ Display summary information for an ichimoku object or its strategy. } \details{ This function is an S3 method for the generic function summary() for - class 'ichimoku'. It can be invoked by calling summary(x) on an object 'x' - of class 'ichimoku'. + class \sQuote{ichimoku}. It can be invoked by calling summary(x) on an + object \sQuote{x} of class \sQuote{ichimoku}. Performs basic validation for an ichimoku object and will inform if an ichimoku object contains invalid information. diff --git a/man/tradingDays.Rd b/man/tradingDays.Rd index 73ad490a..a8a35f88 100644 --- a/man/tradingDays.Rd +++ b/man/tradingDays.Rd @@ -15,18 +15,18 @@ dates defined as holidays. Set to NULL for a continuously-traded market.} \item{...}{other arguments not used by this function.} } \value{ -A vector of logical values: TRUE if the corresponding element of 'x' - is a weekday and not a holiday, FALSE otherwise. +A vector of logical values: TRUE if the corresponding element of + \sQuote{x} is a weekday and not a holiday, FALSE otherwise. - Or, if the parameter 'holidays' is set to NULL, a vector of TRUE values - of the same length as 'x'. + Or, if the parameter \sQuote{holidays} is set to NULL, a vector of TRUE + values of the same length as \sQuote{x}. } \description{ Used by \code{\link{ichimoku}} to subset a vector of dates to trading days. } \details{ New Year's Day (01-01) and Christmas Day (12-25) are defined as - holidays by default if 'holidays' is not specified. + holidays by default if \sQuote{holidays} is not specified. } \examples{ dates <- seq(from = as.POSIXct("2020-01-01"), by = "1 day", length.out = 7) diff --git a/man/xts_df.Rd b/man/xts_df.Rd index c9d3f95d..5590d0c3 100644 --- a/man/xts_df.Rd +++ b/man/xts_df.Rd @@ -7,14 +7,14 @@ xts_df(x, keep.attrs = FALSE) } \arguments{ -\item{x}{an 'xts' object.} +\item{x}{an \sQuote{xts} object.} \item{keep.attrs}{[default FALSE] if set to TRUE, will preserve any custom attributes set on the original object.} } \value{ -A 'data.frame' object. The 'xts' index is preserved as the first - column with header 'index'. +A \sQuote{data.frame} object. The \sQuote{xts} index is preserved as + the first column with header \sQuote{index}. } \description{ An optimised 'xts' to 'data.frame' constructor.