Skip to content

Commit

Permalink
remove "Some distances were outside bins and have been removed." warning
Browse files Browse the repository at this point in the history
when creating bins
  • Loading branch information
David Lawrence Miller committed May 26, 2018
1 parent e999869 commit c65ca90
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions R/create_bins.R
Expand Up @@ -21,9 +21,10 @@ create_bins <- function(data, cutpoints){

# remove distances outside bins
in.cp.ind <- data$distance>=cp[1] & data$distance<=cp[length(cp)]
if(!all(in.cp.ind)){
warning("Some distances were outside bins and have been removed.")
}
# is this warning really necessary here?
#if(!all(in.cp.ind)){
# warning("Some distances were outside bins and have been removed.")
#}
data <- data[in.cp.ind,]

# pull out the distances (removing the NAs for now)
Expand Down

0 comments on commit c65ca90

Please sign in to comment.