Skip to content

Commit 9a23992

Browse files
committed
docs: don't run real long-term examples, seems to be a bug in the feed
1 parent ab37797 commit 9a23992

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

R/interest-rate.R

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -213,18 +213,14 @@ clean_real_yield_curves <- function(dt) {
213213
#' @family interest rate
214214
#' @export
215215
#' @examples
216-
#' \donttest{
216+
#' \dontrun{
217217
#' # get data for a single month
218218
#' tr_real_long_term("202201")
219219
#' # or for the entire year
220220
#' tr_real_long_term(2022)
221221
#' }
222222
tr_real_long_term <- function(date = NULL) {
223-
dt <- treasury("daily_treasury_real_long_term", date, parse_real_long_term)
224-
if (is.null(dt)) {
225-
return()
226-
}
227-
dt
223+
treasury("daily_treasury_real_long_term", date, parse_real_long_term)
228224
}
229225

230226
parse_real_long_term <- function(x) {

R/yield-curve.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ tr_curve_rate <- function(
6464
urls <- sub("88\\.xls$", "88_0.xls", urls)
6565
}
6666

67-
months <- rep.int(month.name, 5L)
67+
months <- rep(month.name, 5L)
6868
res <- lapply(seq_along(urls), function(i) {
6969
tf <- tempfile()
7070
on.exit(unlink(tf), add = TRUE)

man/tr_real_long_term.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)