From 0934667bb185281d2761e78c500a6e82bf3b9965 Mon Sep 17 00:00:00 2001 From: Bill Denney Date: Thu, 17 Jan 2019 20:20:41 -0500 Subject: [PATCH] Allow assignment into xpose_data class without conversion to uneval --- R/xpose_data.R | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/R/xpose_data.R b/R/xpose_data.R index 68c11b22..a2a3e5f1 100644 --- a/R/xpose_data.R +++ b/R/xpose_data.R @@ -169,4 +169,10 @@ xpose_data <- function(runno = NULL, structure(class = c('xpose_data', 'uneval')) } - +#' Allow assignment into xpose_data without conversion to class uneval +`[[<-.xpose_data` <- function(x, i, value) { + x <- unclass(x) + x[[i]] <- value + as.xpdb(x) +} +`$<-.xpose_data` <- `[[<-.xpose_data`