Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
KlausVigo committed Nov 11, 2024
1 parent bb7e092 commit 9424a66
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 24 deletions.
3 changes: 0 additions & 3 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ S3method(simSeq,pml)
S3method(subset,phyDat)
S3method(summary,SOWH)
S3method(summary,clanistics)
S3method(tidy,modelTest)
S3method(unique,dist)
S3method(unique,phyDat)
S3method(unique,splits)
Expand Down Expand Up @@ -240,7 +239,6 @@ export(sprdist)
export(superTree)
export(supgma)
export(threshStateC)
export(tidy)
export(transferBootstrap)
export(treedist)
export(upgma)
Expand All @@ -267,7 +265,6 @@ importFrom(cli,cli_progress_bar)
importFrom(cli,cli_progress_done)
importFrom(cli,cli_progress_update)
importFrom(generics,glance)
importFrom(generics,tidy)
importFrom(grDevices,adjustcolor)
importFrom(grDevices,col2rgb)
importFrom(grDevices,hcl.colors)
Expand Down
36 changes: 18 additions & 18 deletions R/modelTest.R
Original file line number Diff line number Diff line change
Expand Up @@ -258,26 +258,26 @@ modelTest <- function(object, tree = NULL, model = NULL, G = TRUE, I = TRUE,
}


#' @importFrom generics tidy
#' @export
generics::tidy
## @importFrom generics tidy
## @export
#generics::tidy


#' @export
tidy.modelTest <- function(x, ...) {
env <- attr(x, "env")
l <- nrow(x)
k <- rep(1L, l)
shape <- rep(NA_real_, l)
inv <- rep(0, l)
for (i in seq_len(l)) {
tmp <- get(x$Model[i], env)
if (!is.null(tmp[["k"]])) k[i] <- tmp[["k"]]
if (!is.null(tmp[["shape"]])) shape[i] <- tmp[["shape"]]
if (!is.null(tmp[["inv"]])) inv[i] <- tmp[["inv"]]
}
data.frame(Model = x$Model, k = k, shape = shape, inv = inv)
}
## @export
#tidy.modelTest <- function(x, ...) {
# env <- attr(x, "env")
# l <- nrow(x)
# k <- rep(1L, l)
# shape <- rep(NA_real_, l)
# inv <- rep(0, l)
# for (i in seq_len(l)) {
# tmp <- get(x$Model[i], env)
# if (!is.null(tmp[["k"]])) k[i] <- tmp[["k"]]
# if (!is.null(tmp[["shape"]])) shape[i] <- tmp[["shape"]]
# if (!is.null(tmp[["inv"]])) inv[i] <- tmp[["inv"]]
# }
# data.frame(Model = x$Model, k = k, shape = shape, inv = inv)
#}


#' @rdname pml
Expand Down
5 changes: 2 additions & 3 deletions man/reexports.Rd

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

0 comments on commit 9424a66

Please sign in to comment.