Permalink
Browse files

Make aaply work with vectors

  • Loading branch information...
1 parent 3ddc6be commit b4c541bab5cbab6c3f73fefcc7483f8cb982d836 @hadley committed Mar 20, 2009
Showing with 2 additions and 1 deletion.
  1. +1 −0 NEWS
  2. +1 −1 R/split.r
View
1 NEWS
@@ -3,6 +3,7 @@ plyr 0.1.6 (2008-XX-XX) ---------------------------------------------------
* use list names where present
* failwith now accepts a function name, as well as a function itself
* fix typo that was causing a 50% speed penalty for d*ply
+* aaply now works with vectors
plyr 0.1.5 (2008-02-23) ---------------------------------------------------
View
@@ -85,7 +85,7 @@ split_labels <- function(splits, drop) {
splitter_a <- function(data, .margins = 1) {
if (!all(.margins %in% seq_len(dims(data)))) stop("Invalid margin")
- dimensions <- lapply(dim(data), seq, from=1)
+ dimensions <- lapply(amv_dim(data), seq, from=1)
dimensions[-.margins] <- list(TRUE)
indices <- expand.grid(dimensions, KEEP.OUT.ATTRS = FALSE)
names(indices) <- paste("X", 1:ncol(indices), sep="")

0 comments on commit b4c541b

Please sign in to comment.