Skip to content

Commit

Permalink
#97 #104 tar_make()
Browse files Browse the repository at this point in the history
  • Loading branch information
egouldo committed Aug 12, 2024
1 parent 83f1264 commit 495e0f0
Show file tree
Hide file tree
Showing 10 changed files with 687 additions and 680 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ analysis in *Gould et al.*, complete the following steps:
2. Run `renv::restore()` to load the packages used in the analysis
pipeline locally on your machine (see
[`renv::`](https://rstudio.github.io/renv/index.html) for details)
3. Run `tar_destroy()` to remove any record and caches of existing
targets
3. Run `targets::tar_destroy()` to remove any record and caches of
existing targets
4. Run `targets::tar_make()` in your console, depending on the power of
your machine, the analysis pipeline will take between 2 and 7
minutes to execute (plus or minus some!)
Expand All @@ -64,7 +64,8 @@ targets::tar_read("ManyEcoEvo")
1 blue tit <tibble [174 × 38]> <tibble [174 × 54]> Zr
2 eucalyptus <tibble [128 × 38]> <tibble [128 × 61]> Zr

The script that generates the ManyEcoEvo package datasets is located in
The script that generates datasets used in the `ManyEcoEvo::` package is
located in
[`ManyEcoEvo/data-raw/tar_make.R`](https://github.com/egouldo/ManyEcoEvo/blob/main/data-raw/tar_make.R).

## License
Expand Down
1,293 changes: 647 additions & 646 deletions _targets/meta/meta

Large diffs are not rendered by default.

67 changes: 36 additions & 31 deletions data-raw/analysis_datasets/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,46 +44,50 @@ library(purrr)
library(stringr)
library(tidyr)
library(tibble)
data("ManyEcoEvo")

# Constructed Variables Included in the ManyAnalysts meta-analysis
ManyEcoEvo_constructed_vars <-
tribble(~response_variable_name,
"euc_sdlgs_all",
"euc_sdlgs>50cm",
"euc_sdlgs0_2m",
"small*0.25+medium*1.25+large*2.5",
"euc_sdlgs50cm_2m",
"average.proportion.of.plots.containing.at.least.one.euc.seedling.of.any.size",
"day_14_weight/(day_14_tarsus_length^2)",
"day_14_weight/day_14_tarsus_length",
"day_14_weight*day_14_tarsus_length"
tribble(
~response_variable_name,
"euc_sdlgs_all",
"euc_sdlgs>50cm",
"euc_sdlgs0_2m",
"small*0.25+medium*1.25+large*2.5",
"euc_sdlgs50cm_2m",
"average.proportion.of.plots.containing.at.least.one.euc.seedling.of.any.size",
"day_14_weight/(day_14_tarsus_length^2)",
"day_14_weight/day_14_tarsus_length",
"day_14_weight*day_14_tarsus_length"
)

# Analyst Constructed Variables
all_constructed_vars <-
ManyEcoEvo %>%
pull(data, dataset) %>%
list_rbind(names_to = "dataset") %>%
filter(str_detect(response_variable_type, "constructed")) %>%
distinct(response_variable_name) %>%
drop_na() %>%
arrange()
all_constructed_vars <-
ManyEcoEvo %>%
pull(data, dataset) %>%
list_rbind(names_to = "dataset") %>%
filter(str_detect(response_variable_type, "constructed")) %>%
distinct(response_variable_name) %>%
drop_na() %>%
arrange()

by <- join_by(response_variable_name)

all_constructed_vars %>%
semi_join(ManyEcoEvo_constructed_vars, by) %>%
mutate(included_in_yi = TRUE) %>%
bind_rows(
{
all_constructed_vars %>%
anti_join(ManyEcoEvo_constructed_vars, by) %>%
mutate(included_in_yi = FALSE)
}
) %>%
knitr::kable(col.names = c("Constructed Variable",
"Included in $y_i$ meta-analysis?"),
format = "markdown")
all_constructed_vars %>%
semi_join(ManyEcoEvo_constructed_vars, by) %>%
mutate(included_in_yi = TRUE) %>%
bind_rows({
all_constructed_vars %>%
anti_join(ManyEcoEvo_constructed_vars, by) %>%
mutate(included_in_yi = FALSE)
}) %>%
knitr::kable(
col.names = c(
"Constructed Variable",
"Included in $y_i$ meta-analysis?"
),
format = "markdown"
)
```

</details>
Expand All @@ -104,3 +108,4 @@ all_constructed_vars %>%
| day_14_tarsus_length_deviation | FALSE |
| residual_day14_weight | FALSE |
| residual_day_14_weight_males | FALSE |
| euc_sdlgs\>2m | FALSE |
Binary file modified data/ManyEcoEvo.rda
Binary file not shown.
Binary file modified data/ManyEcoEvo_results.rda
Binary file not shown.
Binary file modified data/ManyEcoEvo_study_summary.rda
Binary file not shown.
Binary file modified data/ManyEcoEvo_viz.rda
Binary file not shown.
Binary file modified data/ManyEcoEvo_yi.rda
Binary file not shown.
Binary file modified data/ManyEcoEvo_yi_results.rda
Binary file not shown.
Binary file modified data/ManyEcoEvo_yi_viz.rda
Binary file not shown.

0 comments on commit 495e0f0

Please sign in to comment.