From b02c1718b22287d6470570ee969d72cec736dbc9 Mon Sep 17 00:00:00 2001 From: Christian Zang Date: Wed, 18 Sep 2024 14:26:30 +0200 Subject: [PATCH] do not compare class to string anymore --- R/as_tcclimate.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/as_tcclimate.R b/R/as_tcclimate.R index cb51f76..e09e9d4 100644 --- a/R/as_tcclimate.R +++ b/R/as_tcclimate.R @@ -122,7 +122,7 @@ as_tcclimate <- function(x, varnames = NULL) { } } - if (is.null(varnames) & !is.null(names(x)) & (class(x) == "list")) { + if (is.null(varnames) & !is.null(names(x)) & inherits(x, "list")) { colnames(output)[-c(1,2)] <- names(x) }