From 5971cdc7add12147a9addedc3d656bb308e1b161 Mon Sep 17 00:00:00 2001 From: Imanuel Costigan Date: Sat, 7 Sep 2019 12:48:15 +1000 Subject: [PATCH] Confirm to new_tibble() interface --- R/vol-surface-class.R | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/R/vol-surface-class.R b/R/vol-surface-class.R index 42c4eb4..01b4b50 100644 --- a/R/vol-surface-class.R +++ b/R/vol-surface-class.R @@ -104,9 +104,10 @@ print.VolSurface <- function(x, ...) { #' @param smile numeric vector containing the values of the second dimension #' of the volatility surface. The elements of the vector can either contain #' the strikes, the moneyness or the delta. The input type is specified in -#' `type` parameter. +#' `type` parameter. Must be the same length as `maturity` #' @param value numeric vector containing the values of the volatilities. Should -#' typically be represented as a decimal value (e.g. 30\% should be 0.3). +#' typically be represented as a decimal value (e.g. 30\% should be 0.3) and +#' must be the same length as `maturity` #' @param reference_date `Date` that captures the as of date. This is stored as #' an attribute to the tibble and can be extracted by calling #' `attr(x, "reference_date")` @@ -145,6 +146,7 @@ new_VolQuotes <- function(maturity, smile, value, reference_date, type, ticker, smile = smile, value = value ), + nrow = length(maturity), reference_date = reference_date, type = type, ticker = ticker,