Skip to content

Commit

Permalink
more cran tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
bcjaeger committed Jan 12, 2024
1 parent a55596e commit 8cdb854
Show file tree
Hide file tree
Showing 11 changed files with 190 additions and 138 deletions.
7 changes: 7 additions & 0 deletions R/orsf_R6.R
Original file line number Diff line number Diff line change
Expand Up @@ -2643,6 +2643,7 @@ ObliqueForest <- R6::R6Class(

pd_vals <- do.call(orsf_cpp, cpp_args)$pd_values


row_delim <- switch(self$tree_type,
"survival" = pred_horizon_ordered,
"regression" = 1,
Expand All @@ -2659,6 +2660,12 @@ ObliqueForest <- R6::R6Class(

for(j in seq_along(pd_vals[[i]])){

nans <- which(is.nan(pd_vals[[i]][[j]]))

if(!is_empty(nans)){
pd_vals[[i]][[j]][nans] <- NA_real_
}

pd_vals[[i]][[j]] <- matrix(pd_vals[[i]][[j]],
nrow=length(row_delim),
byrow = T)
Expand Down
5 changes: 5 additions & 0 deletions R/orsf_summary.R
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,8 @@ print.orsf_summary_uni <- function(x, n_variables = NULL, ...){
#'
#' @examples
#'
#'\dontrun{
#'
#' library(data.table)
#'
#' object <- orsf(pbc_orsf, Surv(time, status) ~ . - id, n_tree = 25)
Expand All @@ -278,6 +280,9 @@ print.orsf_summary_uni <- function(x, n_variables = NULL, ...){
#'
#' as.data.table(smry)
#'
#'}
#'
#'
as.data.table.orsf_summary_uni <- function(x, ...){
x$dt
}
Expand Down
9 changes: 7 additions & 2 deletions man/as.data.table.orsf_summary_uni.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 18 additions & 18 deletions man/orsf.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 11 additions & 13 deletions man/orsf_control.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

99 changes: 45 additions & 54 deletions man/orsf_ice_oob.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 8cdb854

Please sign in to comment.