From 74057e5dee753a255ae1fcf341d763765bb0cb72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kirill=20M=C3=BCller?= Date: Thu, 15 Nov 2018 23:17:36 +0100 Subject: [PATCH] Use nrow argument in new_tibble() --- R/nabular.R | 2 +- R/shadows.R | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/R/nabular.R b/R/nabular.R index 7aa885f5..38fb29fc 100644 --- a/R/nabular.R +++ b/R/nabular.R @@ -10,7 +10,7 @@ new_nabular <- function(x){ if (sum(are_shade(x) == ncol(x)) | !any_shade(x)) { rlang::abort(message = "data must have shadow data with the regular data") } - tibble::new_tibble(x, subclass = "nabular") + tibble::new_tibble(x, subclass = "nabular", nrow = nrow(x)) } #' Convert data into nabular form by binding shade to it diff --git a/R/shadows.R b/R/shadows.R index 1bf4b4f2..854c78c7 100644 --- a/R/shadows.R +++ b/R/shadows.R @@ -165,9 +165,7 @@ bind_shadow <- function(data, only_miss = FALSE, ...){ #' @return object with class "shadow", inheriting from it's original class #' @export new_shadow <- function(x){ - # structure(x, - # class = c("shadow", class(x))) - tibble::new_tibble(x, subclass = "shadow") + tibble::new_tibble(x, subclass = "shadow", nrow = nrow(x)) }