Skip to content

Commit f5bd2e1

Browse files
author
David Lawrence Miller
committed
defensive drop=FALSE in create.bins
1 parent 52eb627 commit f5bd2e1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/create.bins.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ create.bins <- function(data,cutpoints){
2525
if(!all(in.cp.ind)){
2626
warning("Some distances were outside bins and have been removed.")
2727
}
28-
data <- data[in.cp.ind,]
28+
data <- data[in.cp.ind, , drop=FALSE]
2929

3030
# pull out the distances (removing the NAs for now)
3131
na.ind <- is.na(data$distance)

0 commit comments

Comments
 (0)