Skip to content

Commit

Permalink
Fix daply bug
Browse files Browse the repository at this point in the history
  • Loading branch information
hadley committed Apr 21, 2009
1 parent 5ba6a1e commit 25902b2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions NEWS
@@ -1,6 +1,7 @@
plyr 0.1.8 (2008-XX-XX) --------------------------------------------------- plyr 0.1.8 (2008-XX-XX) ---------------------------------------------------


* made rbind a little faster (~20%) using an idea from Richard Raubertas * made rbind a little faster (~20%) using an idea from Richard Raubertas
* daply now works correctly when splitting variables that contain empty factor levels


plyr 0.1.7 (2008-04-15) --------------------------------------------------- plyr 0.1.7 (2008-04-15) ---------------------------------------------------


Expand Down
3 changes: 2 additions & 1 deletion R/simplify-array.r
Expand Up @@ -42,7 +42,8 @@ list_to_array <- function(res, labels = NULL, .drop = FALSE) {
in_labels <- list(NULL) in_labels <- list(NULL)
in_dim <- n in_dim <- n
} else { } else {
in_labels <- lapply(labels, unique) in_labels <- lapply(labels,
function(x) if(is.factor(x)) levels(x) else unique(x))
in_dim <- sapply(in_labels, length) in_dim <- sapply(in_labels, length)
} }


Expand Down

0 comments on commit 25902b2

Please sign in to comment.