From f767a3815eafb6c5321dc9bcf95198cc049bfffd Mon Sep 17 00:00:00 2001 From: Xiuwen Zheng Date: Tue, 25 Jun 2024 11:20:01 -0500 Subject: [PATCH] seqAddValue with a factor variable --- R/AddValue.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/AddValue.R b/R/AddValue.R index 3d66c83..13cc6e1 100644 --- a/R/AddValue.R +++ b/R/AddValue.R @@ -196,7 +196,7 @@ # modify annotation/filter .r_annot_flt <- function(gdsfile, val, replace, nvar, compress, verbose) { - stopifnot(is.vector(val), length(val)==nvar) + stopifnot(is.vector(val) || is.factor(val), length(val)==nvar) if (!is.null(index.gdsn(gdsfile, "annotation/filter", silent=TRUE))) stopifnot(replace) n <- add.gdsn(index.gdsn(gdsfile, "annotation"), "filter", val,