Skip to content

Commit

Permalink
Fix documentation issues
Browse files Browse the repository at this point in the history
The try.xts() example was more than 100 characters wide, which threw a
warning in R CMD check.

The [timeSeries] link was malformed because it was missing the second
component with package reference.
  • Loading branch information
joshuaulrich committed Jun 3, 2024
1 parent e3a5862 commit 0fdc320
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 14 deletions.
2 changes: 1 addition & 1 deletion R/reclass.R
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ use.xts <- try.xts
#' try.xts(a, error = FALSE) # fails silently, still an integer vector
#'
#' # control the result with a function
#' try.xts(a, error = function(x, ...) { paste0("I'm sorry ", Sys.info()[["user"]], ", I'm afraid I can't do that.") })
#' try.xts(a, error = function(x, ...) { "I'm afraid I can't do that." })
#'
#' z <- zoo(1:10, timeBasedSeq("2020-01-01/2020-01-10"))
#'
Expand Down
5 changes: 3 additions & 2 deletions R/xts.R
Original file line number Diff line number Diff line change
Expand Up @@ -412,8 +412,9 @@ function(x) {
#' format for use within \R.
#'
#' `as.xts()` can convert objects of the following classes into an xts object:
#' object: [timeSeries], [ts], [matrix], [data.frame], and [zoo]. `xtsible()`
#' safely checks whether an object can be converted to an xts object.
#' object: [timeSeries][timeSeries::timeSeries], [ts], [matrix], [data.frame],
#' and [zoo]. `xtsible()` safely checks whether an object can be converted to
#' an xts object.
#'
#' Additional `name = value` pairs may be passed to the function to be added to
#' the new object. A special [`print.xts()`] method ensures the attributes are
Expand Down
5 changes: 3 additions & 2 deletions man/as.xts.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 1 addition & 9 deletions man/reclass.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0fdc320

Please sign in to comment.