Skip to content

Commit de8b212

Browse files
author
hornik
committed
Avoid issues with ave(). PR#18223, by Thomas Soeiro.
git-svn-id: https://svn.r-project.org/R/trunk@87749 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent 12f93d9 commit de8b212

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/library/base/R/interaction.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# https://www.R-project.org/Licenses/
1818

1919
### This is almost like the Primitive ":" for factors
20-
### but with drop=TRUE, used in reshape
20+
### but with drop=TRUE, used in reshape and ave
2121
interaction <- function(..., drop = FALSE, sep = ".", lex.order = FALSE)
2222
{
2323
args <- list(...)

src/library/stats/R/ave.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ ave <- function (x, ..., FUN = mean)
2121
if(missing(...))
2222
x[] <- FUN(x)
2323
else {
24-
g <- interaction(...)
24+
g <- interaction(..., drop = TRUE)
2525
split(x,g) <- lapply(split(x, g), FUN)
2626
}
2727
x

0 commit comments

Comments
 (0)