From e8e7ad3d9164337bc6bdd038537241fd7d6ac901 Mon Sep 17 00:00:00 2001 From: Tianjian Date: Mon, 17 Jul 2023 18:30:51 +0200 Subject: [PATCH] Minor improvement --- R/edd_stat.R | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/R/edd_stat.R b/R/edd_stat.R index 69cd3a0..fc85509 100644 --- a/R/edd_stat.R +++ b/R/edd_stat.R @@ -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) }