From f5bd2e1baee0980674526c5f17cb5e009fc1462b Mon Sep 17 00:00:00 2001 From: David Lawrence Miller Date: Sat, 13 May 2017 18:26:53 +0200 Subject: [PATCH] defensive drop=FALSE in create.bins --- R/create.bins.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/create.bins.R b/R/create.bins.R index e28f179..5d4a6fd 100644 --- a/R/create.bins.R +++ b/R/create.bins.R @@ -25,7 +25,7 @@ create.bins <- function(data,cutpoints){ if(!all(in.cp.ind)){ warning("Some distances were outside bins and have been removed.") } - data <- data[in.cp.ind,] + data <- data[in.cp.ind, , drop=FALSE] # pull out the distances (removing the NAs for now) na.ind <- is.na(data$distance)