summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSuraj Yerramilli2015-02-06 23:12:24 +0530
committerSuraj Yerramilli2015-02-06 23:12:24 +0530
commit36badfa251da470b534029eecf62dba8276ddba9 (patch)
tree3d03b82f4da8dd7870b09508144304fa42e84fdf
parentee9d6e1533070c63cd21d5a2f67799415d328845 (diff)
downloadSysID-R-code-36badfa251da470b534029eecf62dba8276ddba9.tar.gz
SysID-R-code-36badfa251da470b534029eecf62dba8276ddba9.tar.bz2
SysID-R-code-36badfa251da470b534029eecf62dba8276ddba9.zip
fixed automatic conversion of single column to vector while slicing
-rw-r--r--R/partition.R4
1 files changed, 2 insertions, 2 deletions
diff --git a/R/partition.R b/R/partition.R
index 0c92e76..e64e1fb 100644
--- a/R/partition.R
+++ b/R/partition.R
@@ -14,8 +14,8 @@ dataSlice <- function(object,indices){
stop("Invalid indices")
trim <- object
- trim$output <- trim$output[indices,]
- trim$input <- trim$input[indices,]
+ trim$output <- trim$output[indices,,drop=F]
+ trim$input <- trim$input[indices,,drop=F]
if(trim$type=="freq"){
trim$frequncies <- trim$frequencies[indices]