From 3a7f86b1666be82668353803a4b1c6e88366455d Mon Sep 17 00:00:00 2001 From: Sebastian Krantz Date: Tue, 4 Mar 2025 19:10:03 +0100 Subject: [PATCH] Fixes #645. --- NAMESPACE | 1 + R/GRP.R | 1 + 2 files changed, 2 insertions(+) diff --git a/NAMESPACE b/NAMESPACE index 6f839e8e..4c49ab40 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -745,6 +745,7 @@ importFrom("stats", "as.formula", "complete.cases", "cor", "cov", "var", "pt", S3method('[[', GRP_df) S3method('[<-', GRP_df) S3method('[[<-', GRP_df) + S3method('names<-', GRP_df) S3method('[', indexed_series) S3method(Math, indexed_series) S3method(Ops, indexed_series) diff --git a/R/GRP.R b/R/GRP.R index ce737aba..f3eed2b1 100644 --- a/R/GRP.R +++ b/R/GRP.R @@ -502,6 +502,7 @@ print.invisible <- function(x, ...) cat("") `[[.GRP_df` <- function(x, ...) UseMethod("[[", fungroup(x)) # function(x, ..., exact = TRUE) .subset2(x, ..., exact = exact) `[<-.GRP_df` <- function(x, ..., value) UseMethod("[<-", fungroup(x)) `[[<-.GRP_df` <- function(x, ..., value) UseMethod("[[<-", fungroup(x)) +`names<-.GRP_df` <- function(x, value) `oldClass<-`(`names<-`(unclass(x), value), oldClass(x)) # Produce errors... # print_GRP_df_core <- function(x) {