Skip to content

Commit

Permalink
export S3 methods
Browse files Browse the repository at this point in the history
  • Loading branch information
emitanaka committed Nov 12, 2023
1 parent 3bbd04e commit 64c9953
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ S3method(examine_recipe,takeout)
S3method(format,edbl_lvls)
S3method(levels,edbl_fct)
S3method(levels,edbl_lvls)
S3method(order_trts,blocksdesign)
S3method(order_trts,dae)
S3method(order_trts,default)
S3method(pillar_shaft,edbl_rcrd)
S3method(pillar_shaft,edbl_trt)
S3method(pillar_shaft,edbl_unit)
Expand Down
4 changes: 3 additions & 1 deletion R/permute.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

#' @export
order_trts.blocksdesign <- function(x, trts_df, units_df, unit, vparents, prov, model = NULL, ...) {
if(!requireNamespace("blocksdesign")) abort("You need to install `blocksdesign` package.")
udf <- units_df[, setdiff(names(units_df), as.character(unit)), drop = FALSE]
Expand Down Expand Up @@ -130,10 +130,12 @@ order_trts <- function(x, ...) {
UseMethod("order_trts")
}

#' @export
order_trts.default <- function(x, ...) {
abort(paste("The", cli::col_blue(x), "order is not implemented."))
}

#' @export
order_trts.dae <- function(x, prov, constrain, trts, ...) {
# FIXME
dat <- assign_trts(prov$design, order = "systematic", constrain = constrain, .record = FALSE) %>%
Expand Down

0 comments on commit 64c9953

Please sign in to comment.