mirror of
https://github.com/prise6/aVirtualTwins.git
synced 2024-05-04 20:13:11 +02:00
Fix some bug and documentation
This commit is contained in:
parent
241e4cf467
commit
31e16ab68d
|
@ -12,6 +12,8 @@
|
|||
#' @param tables set to TRUE if tables of incidence must be shown. FALSE is
|
||||
#' default.
|
||||
#' @param verbose print infos during computation. FALSE is default.
|
||||
#' @param compete print competitors rules thanks to competitors computation of
|
||||
#' the tree
|
||||
#'
|
||||
#' @return data.frame of rules
|
||||
#'
|
||||
|
@ -37,11 +39,11 @@
|
|||
vt.subgroups <- function(vt.trees, only.leaf = T, only.fav = T, tables = F, verbose = F){
|
||||
|
||||
if(is.list(vt.trees)){
|
||||
subgroups <- lapply(vt.trees, function(x)x$getRules(only.leaf = only.leaf, only.fav = only.fav, tables = tables, verbose = verbose))
|
||||
subgroups <- lapply(vt.trees, function(x)x$getRules(only.leaf = only.leaf, only.fav = only.fav, tables = tables, verbose = verbose, compete = F))
|
||||
unique(do.call(rbind, subgroups))
|
||||
}
|
||||
else{
|
||||
subgroups <- vt.tree$getRules(only.leaf = only.leaf, only.fav = only.fav, tables = tables, verbose = verbose)
|
||||
subgroups <- vt.tree$getRules(only.leaf = only.leaf, only.fav = only.fav, tables = tables, verbose = verbose, compete = compete)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
2
R/tree.R
2
R/tree.R
|
@ -168,7 +168,7 @@ VT.tree <- setRefClass(
|
|||
warning("VT.tree : no rules"); return(invisible(NULL));
|
||||
}
|
||||
|
||||
pth <- path.rpart(.self$tree, nodes = row.names(frm), print.it = F)
|
||||
pth <- rpart::path.rpart(.self$tree, nodes = row.names(frm), print.it = F)
|
||||
# Delete 'root' node des règles
|
||||
pth <- lapply(pth, FUN = function(d) return(d[-1]))
|
||||
|
||||
|
|
Loading…
Reference in a new issue