Skip to content

Commit

Permalink
Minor improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
EvoLandEco committed Jul 17, 2023
1 parent 1ad7909 commit e8e7ad3
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions R/edd_stat.R
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,17 @@ edd_summarize <- function(raw_data, method = NULL) {
#' @author Tianjian Qin
#' @export edd_stat_rtree
edd_stat_rtree <- function(data, combo) {
data <- lapply(data, function (x) {
x <- list(tes = x)
return(x)
})

params <- combo_to_tibble(combo)
meta <- params[rep(seq_len(nrow(params)), each = 1000), ]
meta <- params[rep(seq_len(nrow(params)), each = length(data[[1]]$tes)), ]
statistics <- lapply(data, edd_summarize, method = "treestats")

stats <- cbind(meta, dplyr::bind_rows(statistics))

stats <- tidyr::pivot_longer(stats, cols = -(age:beta_phi), names_to = "stats", values_to = "value")
stats <- transform_data(stats)

return(stats)
}

Expand Down

0 comments on commit e8e7ad3

Please sign in to comment.