Skip to content

Commit

Permalink
bug!: fix #76 don't call data(*) after reverting to lazy loading da…
Browse files Browse the repository at this point in the history
…ta in `ManyEcoEvo::`

---

refs: egouldo/ManyEcoEvo#110
  • Loading branch information
egouldo committed Sep 1, 2024
1 parent 36651f2 commit e7c8bce
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 35 deletions.
10 changes: 0 additions & 10 deletions index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -2282,7 +2282,6 @@ Absolute deviation scores were Box-Cox transformed using the `step_box_cox()` fu
```{r eqn-boxcox-ratings-bt, results = 'asis', eval = FALSE, echo = FALSE}
# Ratings Continuous blue tit
data(ManyEcoEvo_viz)
ManyEcoEvo_viz %>%
filter(str_detect(model_name, "box_cox_rating"),
str_detect(model_name, "_no_int", negate = TRUE),
Expand Down Expand Up @@ -2436,7 +2435,6 @@ The full manuscript, including further analysis and presentation of results is w
# Results
```{r descriptive-munging, eval=TRUE,include=TRUE, echo = FALSE, message=FALSE, warning=FALSE}
data(ManyEcoEvo_study_summary)
filter_vars_main_analysis <- rlang::exprs(estimate_type == "Zr",
exclusion_set == "complete",
Expand Down Expand Up @@ -2495,8 +2493,6 @@ SorensenSummary <-
## ----- Review Summaries -----
data(ManyEcoEvo_results)
ReviewData <-
ManyEcoEvo_results %>%
ungroup %>%
Expand Down Expand Up @@ -2605,7 +2601,6 @@ Table4 %>%
### Standardized Effect Sizes ($Z_r$)
```{r calc_MA_mod_coefs, eval=TRUE,include=TRUE, echo = FALSE}
data("ManyEcoEvo_viz")
coefs_MA_mod <- bind_rows( ManyEcoEvo_viz %>%
filter(model_name == "MA_mod") %>%
filter(exclusion_set == "complete"),
Expand Down Expand Up @@ -2793,8 +2788,6 @@ euc_forest
### Out-of-sample predictions $y_{i}$
```{r define-plot-forest-function, echo = FALSE, message=FALSE, warning=FALSE}
data("ManyEcoEvo_yi")
data("ManyEcoEvo_yi_results")
plot_forest <- function(data, intercept = TRUE, MA_mean = TRUE){
if(MA_mean == FALSE){
Expand Down Expand Up @@ -3336,9 +3329,6 @@ mean_n_euc_Zr <- sample_size_euc_Zr %>%
N_outliers_Zr_euc <- sample_size_euc_Zr %>%
filter(term %in% min_outlier_euc) %>%
arrange(desc(sample_size))
data("euc_data")
```
The outlier *Eucalyptus* $Z_r$ values were striking and merited special examination.
Expand Down
5 changes: 0 additions & 5 deletions supp_mat/SM1_summary.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ source(here::here("utils.R"))

```{r descriptive-munging-2, eval=TRUE,include=FALSE, eval=TRUE}
# ----- Using complete objects in 'ManyEcoEvo' -----
data(ManyEcoEvo_study_summary)
data(ManyEcoEvo)
Table1 <- # Teams, analyses and model types
ManyEcoEvo_study_summary %>%
Expand Down Expand Up @@ -191,7 +189,6 @@ We observed few clear trends in the blue tit specification curve (@fig-specr-bt)
```{r calc_MA_mod_coefs-2, eval=TRUE, cache = FALSE, eval = TRUE, warning=FALSE, message = FALSE}
# knitr::read_chunk(here::here("index.qmd"), labels = "calc_MA_mod_coefs")
#TODO why is here??
data(ManyEcoEvo_viz)
coefs_MA_mod <- bind_rows( ManyEcoEvo_viz %>%
filter(model_name == "MA_mod",
Expand Down Expand Up @@ -300,8 +297,6 @@ forest_plot_new_labels <- forest_plot_new_labels %>%
#| fig-cap: "**A.** Forest plot for blue tit analyses: standardized effect-sizes (circles) and their 95% confidence intervals are displayed for each analysis included in the meta-analysis model. The meta-analytic mean effect-size is denoted by a black diamond, with error bars also representing the 95% confidence interval. The dashed black line demarcates effect sizes of 0, whereby no effect of the test variable on the response variable is found. Blue points where Zr and its associated confidence intervals are greater than 0 indicate analyses that found a negative effect of sibling number on nestling growth. Gray coloured points have confidence intervals crossing 0, indicating no relationship between the test and response variable. Red points indicate the analysis found a positive relationship between sibling number and nestling growth. **B.** Analysis specification plot: for each analysis plotted in A, the corresponding combination of analysis decisions is plotted. Each decision and its alternative choices is grouped into its own facet, with the decision point described on the right of the panel, and the option shown on the left. Lines indicate the option chosen used in the corresponding point in plot A. **C.** Sample sizes of each analysis. Note that empty bars indicate analyst did not report sample size and sample size could not be derived by lead team."
#| column: page-right
data(ManyEcoEvo_results)
analytical_choices_bt <- ManyEcoEvo_results$effects_analysis[[1]] %>%
select(study_id,
response_transformation_description, # Don't need constructed, as this is accounted for in y
Expand Down
8 changes: 0 additions & 8 deletions supp_mat/SM2_EffectSizeAnalysis.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ source(here::here("utils.R"))
#| warning: false
#| message: false
data(ManyEcoEvo_results)
ManyEcoEvo_results <-
ManyEcoEvo_results %>%
mutate(effects_analysis =
Expand Down Expand Up @@ -122,8 +120,6 @@ The forest plots in @fig-all-forest-plots-Zr compare the distributions of $Z_r$
#| fig-width: 10
# TeamIdentifier_lookup <- read_csv(here::here("data-raw/metadata_and_key_data/TeamIdentifierAnonymised.csv"))
data(ManyEcoEvo_viz)
plot_forest <- function(data, intercept = TRUE, MA_mean = TRUE){
if (MA_mean == FALSE){
data <- filter(data, Parameter != "overall")
Expand Down Expand Up @@ -652,8 +648,6 @@ ManyEcoEvo_viz %>%
#| echo: false
#| message: false
data(ManyEcoEvo)
# Constructed Variables Included in the ManyAnalysts meta-analysis
ManyEcoEvo_constructed_vars <-
tribble(~response_variable_name,
Expand Down Expand Up @@ -745,8 +739,6 @@ Below is the non-truncated version of @fig-euc-yi-forest-plot showing a forest p
#| echo: true
#| message: false
data("ManyEcoEvo_yi")
plot_forest_2 <- function(data, intercept = TRUE, MA_mean = TRUE, y_zoom = numeric(2L)){
if(MA_mean == FALSE){
data <- filter(data, study_id != "overall")
Expand Down
10 changes: 0 additions & 10 deletions supp_mat/SM3_ExplainingDeviation.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ library(rlang)
set.seed(1234)
source(here::here("utils.R"))
data("ManyEcoEvo_yi")
```


Expand Down Expand Up @@ -342,9 +341,6 @@ Consequently, each dataset has its own unique value of $\lambda$, and therefore
#| fig-height: 8
#| message: false
data(ManyEcoEvo_yi_results)
data(ManyEcoEvo_results)
back_transformed_predictions <-
ManyEcoEvo_yi %>%
dplyr::mutate(data =
Expand Down Expand Up @@ -652,8 +648,6 @@ Zr_singularity_convergence %>%
#| warning: false
#| message: false
data(ManyEcoEvo_yi_results)
plot_data_logged <- mod_data_logged %>%
mutate(tidy_mod = map(.x = MA_mod,
~broom::tidy(.x,
Expand Down Expand Up @@ -742,8 +736,6 @@ MA_yi_summary_stats <- # ALL ON logged RESPONSE SCALE for EUC, standardized resp
euc_yi_results <-
ManyEcoEvo::make_viz(deviation_models_yi_euc)
data(ManyEcoEvo_yi_viz)
yi_convergence_singularity <-
ManyEcoEvo_yi_viz %>%
filter(exclusion_set == "complete",
Expand Down Expand Up @@ -1248,8 +1240,6 @@ patchwork::wrap_plots(yi_deviation_RE_plots, byrow = TRUE) +

```{r}
#| label: multivariate-models-mod-summary
data(ManyEcoEvo_viz)
filter_vars <- rlang::exprs(exclusion_set == "complete",
expertise_subset == "All",
publishable_subset == "All",
Expand Down
2 changes: 0 additions & 2 deletions supp_mat/SM4_case_study_datasets.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ library(ManyEcoEvo)
library(GGally)
set.seed(1234)
source(here::here("utils.R"))
data("euc_data")
data("blue_tit_data")
```

Pairwise-correlation plots for the *Eucalyptus* and blue tit case-study data provided to analysts are shown in @fig-ggpairs-eucalyptus and @fig-ggpairs-bt, respectively. Plots were created with R package `GGally` [@GGally].
Expand Down

0 comments on commit e7c8bce

Please sign in to comment.