blind-contours / CVtreeMLE

:deciduous_tree: :dart: Cross Validated Decision Trees with Targeted Maximum Likelihood Estimation
MIT License
5 stars 1 forks source link

Issue with package manual: incomplete section Value #18

Closed GaryBAYLOR closed 1 year ago

GaryBAYLOR commented 2 years ago

A large number of function miss the description for the section Value. This section simply contains the following sentence

#' @return Rules object. TODO: add more detail here.

The functions having the above issue include

calc_marginal_ate
calc_mixtures_ate
calc_v_fold_marginal_ate
calc_v_fold_mixtures_ate
common_mixture_rules
est_comb_exposure
est_marg_nuisance_params
evaluate_marginal_rules
evaluate_mixture_rules
find_common_marginal_rules
fit_mix_rule_backfitting
meta_mix_results
simulate_mixture_cube

Please add complete description in this section so the users know the details of returned value of a function.

blind-contours commented 2 years ago

@GaryBAYLOR - thanks for catching this. I've updated all the return values for these functions. Originally, these functions were not exported to the user. However, because now I am using furrr to parallelize using future_map, this requires passing the function in furrr_options so the functions for CVtreeMLE are available during parallelization. It seems that only exported functions are available so I had to export all the functions. For the advanced user this is likely more helpful as they can better trace what's going on under the hood.

GaryBAYLOR commented 1 year ago

I checked the above issue still exists in calc_v_fold_mixtures_ate.Rd which has the following lines

\value{
Rules object. TODO: add more detail here.

The reason is that in the file calc_v_fold_mixture_ate.R we can see there is a duplicate return. Removing the first return and regenerate Rd file will likely solve the problem.

#' @return Rules object. TODO: add more detail here.
#' @importFrom stats as.formula glm p.adjust plogis predict qlogis qnorm
#' @importFrom stats qunif rnorm runif
#' @importFrom rlang :=
#' @return A data frame of mixture results for each variable level combination
#' for each fold
blind-contours commented 1 year ago

Just fixed this.