Skip to content
Snippets Groups Projects
Verified Commit 80ddc0a3 authored by Gärber, Florian's avatar Gärber, Florian
Browse files

fix: `addLayer` not including trees original classes

parent 8e3be4e1
No related branches found
No related tags found
No related merge requests found
Type: Package Type: Package
Package: RFSurrogates Package: RFSurrogates
Title: Surrogate Minimal Depth Variable Importance Title: Surrogate Minimal Depth Variable Importance
Version: 0.3.3.9004 Version: 0.3.3.9005
Authors@R: c( Authors@R: c(
person("Stephan", "Seifert", , "stephan.seifert@uni-hamburg.de", role = c("aut", "cre"), person("Stephan", "Seifert", , "stephan.seifert@uni-hamburg.de", role = c("aut", "cre"),
comment = c(ORCID = "0000-0003-2567-5728")), comment = c(ORCID = "0000-0003-2567-5728")),
......
...@@ -23,11 +23,11 @@ addLayer <- function(trees, num.threads = 1) { ...@@ -23,11 +23,11 @@ addLayer <- function(trees, num.threads = 1) {
stop("`trees` must be a `getTreeranger` `RangerTrees` object.") stop("`trees` must be a `getTreeranger` `RangerTrees` object.")
} }
trees <- parallel::mclapply(trees, add_layer_to_tree, mc.cores = num.threads) layer.trees <- parallel::mclapply(trees, add_layer_to_tree, mc.cores = num.threads)
class(trees) <- c(class(trees), "LayerTrees") class(layer.trees) <- c(class(trees), "LayerTrees")
return(trees) return(layer.trees)
} }
#' Internal function #' Internal function
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment