From d87bfe82f7fd6a4963b348a36b0fa0b6dac2a430 Mon Sep 17 00:00:00 2001 From: rgrannell1 Date: Sun, 29 Jun 2014 20:11:26 +0100 Subject: [PATCH] added support for collection names to select, reject and partition --- NEWS | 2 ++ R/xPartition.R | 2 +- R/xReject.R | 2 +- R/xSelect.R | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index cb0fc976..d6572d0c 100644 --- a/NEWS +++ b/NEWS @@ -3,7 +3,9 @@ Kiwi 0.29.0 ----------------------------------------------------------------------------- Date: 2014-6- +Enhancements: +* xSelect, xPartition & xReject now preserve collection names. Bug-Fixes: diff --git a/R/xPartition.R b/R/xPartition.R index d84e05f9..3975a9ef 100755 --- a/R/xPartition.R +++ b/R/xPartition.R @@ -53,7 +53,7 @@ xPartition <- MakeFun('xPartition', function (pred, coll) { isTRUE(is_match) - }, logical(1), USE.NAMES = False) + }, logical(1)) true_ind <- !elem_is_na(ind) & ind diff --git a/R/xReject.R b/R/xReject.R index 93a2ba8c..6427e87c 100755 --- a/R/xReject.R +++ b/R/xReject.R @@ -57,7 +57,7 @@ xReject <- MakeFun('xReject', function (pred, coll) { isTRUE(is_match) - }, logical(1), USE.NAMES = False) + }, logical(1)) as.list( coll[elem_is_na(ind) | !ind ] ) } diff --git a/R/xSelect.R b/R/xSelect.R index e2f7042a..bbcbd720 100755 --- a/R/xSelect.R +++ b/R/xSelect.R @@ -57,7 +57,7 @@ xSelect <- MakeFun('xSelect', function (pred, coll) { isTRUE(is_match) - }, logical(1), USE.NAMES = False) + }, logical(1)) as.list( coll[ !elem_is_na(ind) & ind ] ) }