Skip to content

Commit

Permalink
Fix bug with missing values. Bump version to 0.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
hadley committed Nov 18, 2008
1 parent c755c8b commit 154ed82
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
@@ -1,7 +1,7 @@
Package: plyr
Type: Package
Title: Tools for splitting, applying and combining data
Version: 0.1.2
Version: 0.1.3
Date: 2008-10-10
Author: Hadley Wickham <h.wickham@gmail.com>
Maintainer: Hadley Wickham <h.wickham@gmail.com>
Expand Down
6 changes: 5 additions & 1 deletion NEWS
@@ -1,4 +1,8 @@
plyr 0.1.2 (2008-XX-XX) ---------------------------------------------------
plyr 0.1.3 (2008-XX-XX) ---------------------------------------------------

Fixed problem where when splitting by a variable that contained missing values, missing combinations would be drop, and labels wouldn't match up

plyr 0.1.2 (2008-11-19) ---------------------------------------------------

* a*ply now works correctly with array-lists
* drop. -> .drop
Expand Down
3 changes: 2 additions & 1 deletion R/split.r
Expand Up @@ -20,7 +20,8 @@
#X splitter_d(mtcars, .(am, vs))
splitter_d <- function(data, .variables = NULL) {
splits <- eval.quoted(.variables, data, parent.frame())
splitv <- interaction(splits, drop=TRUE)
factors <- llply(splits, factor, exclude = NULL)
splitv <- interaction(factors, drop=TRUE)

representative <- which(!duplicated(splitv))[order(unique(splitv))]
split_labels <- data.frame(lapply(splits, function(x) x[representative]))
Expand Down

0 comments on commit 154ed82

Please sign in to comment.