From ccf2943ceda6ff2586346a868bf55574d1a48a12 Mon Sep 17 00:00:00 2001 From: "Andrew G. Brown" Date: Mon, 13 Nov 2023 16:10:16 -0800 Subject: [PATCH] `parse_family()`: Fix for R<4.0 --- R/family-classes.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/R/family-classes.R b/R/family-classes.R index 614c7a0..592f7e3 100644 --- a/R/family-classes.R +++ b/R/family-classes.R @@ -131,7 +131,8 @@ parse_family <- function(family, column_metadata = TRUE, flat = TRUE) { taxsub <- as.data.frame(data.table::rbindlist(lapply(decompose_taxon_code(res$code), function(x) { y <- taxon_code_to_taxon(as.character(rev(x))) z <- data.frame(taxsubgrp = NA_character_, taxgrtgroup = NA_character_, - taxsuborder = NA_character_, taxorder = NA_character_) + taxsuborder = NA_character_, taxorder = NA_character_, + stringsAsFactors = FALSE) z[1, ] <- tail(c(rep(NA_character_, 4), y), 4) z })), stringsAsFactors = FALSE)