Skip to content

Commit

Permalink
fix obtuse logic as requested by @dylanbeaudette
Browse files Browse the repository at this point in the history
  • Loading branch information
brownag committed Jun 19, 2020
1 parent 43b6f12 commit ce41cab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/SoilProfileCollection-setters.R
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ setReplaceMethod("horizons", signature(object = "SoilProfileCollection"),
horizon.new[[hzidname(object)]])
chnew <- .coalesce.idx(horizon.new[[idname(object)]])
if(length(chnew) != length(original.site.order) |
sum(suppressWarnings(original.site.order != chnew)) > 0) {
suppressWarnings(any(original.site.order != chnew))) {
message("join condition resulted in sorting of horizons, re-applying original order")
horizon.new <- horizon.new[new.horizon.order,]
}
Expand Down

1 comment on commit ce41cab

@dylanbeaudette
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for that, much cleaner.

Please sign in to comment.