-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
Description
Consider the following example.
renamer <- function(df, b, a) { colnames(df)[colnames(df) == b] <- a; df }
iris2 <- munge(iris, list(Renamer = list(renamer, "Sepal.Length", "seplen"), "Renamer2" = list(renamer, "Sepal.Width", "sepwid")))
length(attr(iris2, "mungepieces")) # 2
iris3 <- munge(iris2, iris2)
length(attr(iris3, "mungepieces")) # 4Since mungepieces are "sticky": munging iris2 against itself means that the initial munging history is remembered followed by another copy of the munging history. Is that really the right behavior, or should each operation of munge destroy the copy of the mungepieces? The answer is presumably no to support chaining of munge operations, but the results here are counter-intuitive.
Reactions are currently unavailable