Skip to content

Commit

Permalink
Corrected input check for missing of distance matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
animusnaturae committed Oct 30, 2020
1 parent 48e6a6c commit 10a696e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/select_trees.R
Expand Up @@ -42,7 +42,7 @@ select_trees <- function(rf, num.trees = NULL, distance.matrix = NULL){
if(!checkmate::testDouble(num.trees) | !checkmate::testCount(num.trees)){
stop("num.trees has to be a single numerical value.")
}
if(checkmate::testNull(num.trees)){
if(checkmate::testNull(distance.matrix)){
stop("Specify precalculated pair-wise distances.")
}
if(sum(dim(distance.matrix) == rf$num.trees) != 2){
Expand Down

0 comments on commit 10a696e

Please sign in to comment.