From 407f83e96df7a9c398ec244897c7e28d30e7e277 Mon Sep 17 00:00:00 2001 From: Dirk Eddelbuettel Date: Mon, 14 Aug 2023 15:55:54 -0500 Subject: [PATCH] Small adjustments in one helper function --- apis/r/R/utils-arrow.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apis/r/R/utils-arrow.R b/apis/r/R/utils-arrow.R index 400946e168..7975e08a59 100644 --- a/apis/r/R/utils-arrow.R +++ b/apis/r/R/utils-arrow.R @@ -195,11 +195,11 @@ check_arrow_pointers <- function(arrlst) { #' @noRd extract_levels <- function(arrtbl) { stopifnot("Argument must be an Arrow Table object" = is_arrow_table(arrtbl)) - nm <- names(AT) # we go over the table column by column + nm <- names(arrtbl) # we go over the table column by column reslst <- vector(mode = "list", length = length(nm)) names(reslst) <- nm # and fill a named list, entries default to NULL for (n in nm) { - if (inherits(infer_type(arrtbl[[n]]), "DictionaryType")) { + if (inherits(arrow::infer_type(arrtbl[[n]]), "DictionaryType")) { # levels() extracts the enumeration levels from the factor vector we have reslst[[n]] <- levels(arrtbl[[n]]$as_vector()) }