Skip to content

Commit

Permalink
Remove defaults from contructors and validators
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmbaazam committed Jan 15, 2024
1 parent de9ec93 commit 6761962
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 42 deletions.
36 changes: 18 additions & 18 deletions R/epichains.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
#' @author James M. Azam
#' @keywords internal
new_epichains_tree <- function(tree_df,
ntrees = integer(),
statistic = character(),
offspring_dist = character(),
stat_max = integer(),
track_pop = logical()) {
ntrees,
statistic,
offspring_dist,
stat_max,
track_pop) {
# Assemble the elements of the object
obj <- structure(
tree_df,
Expand Down Expand Up @@ -58,11 +58,11 @@ new_epichains_tree <- function(tree_df,
#' @author James M. Azam
#' @export
epichains_tree <- function(tree_df,
ntrees = integer(),
statistic = character(),
offspring_dist = character(),
stat_max = integer(),
track_pop = logical()) {
ntrees,
statistic,
offspring_dist,
stat_max,
track_pop) {
# Check that inputs are well specified
checkmate::assert_data_frame(tree_df)
checkmate::assert_integerish(ntrees, null.ok = TRUE)
Expand Down Expand Up @@ -107,10 +107,10 @@ epichains_tree <- function(tree_df,
#' @author James M. Azam
#' @keywords internal
new_epichains_summary <- function(chains_summary,
ntrees = integer(),
statistic = character(),
offspring_dist = character(),
stat_max = integer()) {
ntrees,
statistic,
offspring_dist,
stat_max) {
# Assemble the elements of the object
obj <- structure(
chains_summary,
Expand Down Expand Up @@ -139,10 +139,10 @@ new_epichains_summary <- function(chains_summary,
#' @author James M. Azam
#' @export
epichains_summary <- function(chains_summary,
ntrees = integer(),
statistic = character(),
offspring_dist = character(),
stat_max = integer()) {
ntrees,
statistic,
offspring_dist,
stat_max) {
# Check that inputs are well specified
checkmate::assert_vector(chains_summary)
checkmate::assert_integerish(ntrees, null.ok = TRUE)
Expand Down
8 changes: 1 addition & 7 deletions man/epichains_summary.Rd

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

9 changes: 1 addition & 8 deletions man/epichains_tree.Rd

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

8 changes: 4 additions & 4 deletions man/new_epichains_summary.Rd

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

10 changes: 5 additions & 5 deletions man/new_epichains_tree.Rd

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

0 comments on commit 6761962

Please sign in to comment.