Skip to content

Commit

Permalink
Merge pull request #3 from mcguinlu/dev
Browse files Browse the repository at this point in the history
Move to new GHA R CMD check workflow
  • Loading branch information
mcguinlu authored Oct 19, 2023
2 parents 1b2872c + 94267e2 commit 5ef1ab2
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 28 deletions.
29 changes: 10 additions & 19 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
Expand All @@ -18,7 +18,7 @@ jobs:
fail-fast: false
matrix:
config:
- {os: macOS-latest, r: 'release'}
- {os: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
Expand All @@ -29,30 +29,21 @@ jobs:
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: r-lib/actions/setup-pandoc@v1
- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v1
- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v1
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: rcmdcheck
extra-packages: any::rcmdcheck
needs: check

- uses: r-lib/actions/check-r-package@v1

- name: Show testthat output
if: always()
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash

- name: Upload check results
if: failure()
uses: actions/upload-artifact@main
- uses: r-lib/actions/check-r-package@v2
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check
upload-snapshots: true
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ knitr::opts_chunk$set(

<!-- badges: start -->
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![R-CMD-check](https://github.com/mcguinlu/triangulate/workflows/R-CMD-check/badge.svg)](https://github.com/mcguinlu/triangulate/actions)
[![R-CMD-check](https://github.com/mcguinlu/triangulate/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/mcguinlu/triangulate/actions/workflows/R-CMD-check.yaml)
<!-- badges: end -->

The goal of triangulate is to create a generalised version of the bias-adjusted meta-analysis approach originally proposed by Turner et al.
Expand Down
20 changes: 12 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

[![Lifecycle:
experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![R-CMD-check](https://github.com/mcguinlu/triangulate/workflows/R-CMD-check/badge.svg)](https://github.com/mcguinlu/triangulate/actions)
[![R-CMD-check](https://github.com/mcguinlu/triangulate/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/mcguinlu/triangulate/actions/workflows/R-CMD-check.yaml)
<!-- badges: end -->

The goal of triangulate is to create a generalised version of the
Expand Down Expand Up @@ -50,7 +50,6 @@ The approach described
``` r
# Load libraries
library(magrittr)
#> Warning: package 'magrittr' was built under R version 3.6.3
library(triangulate)

# See column names of dat_bias
Expand Down Expand Up @@ -97,7 +96,10 @@ tri_dat_check(dat_bias)
#> All expected columns are present in the dataset.
```

For details
For details on how to create these datasets, see the [Creating
triangulation
datasets](https://mcguinlu.github.io/triangulate/articles/Creating-triangulation-datasets.html)
vignette (under construction).

### Absolute directions of bias

Expand Down Expand Up @@ -126,6 +128,7 @@ Once we load our data, helper functions will convert it to *long* format
and convert to absolute directions of bias/indirectness.

``` r

dat_bias <- triangulate::dat_bias %>%

# Convert to long format
Expand Down Expand Up @@ -166,18 +169,19 @@ that we can use to

``` r
dat_final <- tri_prep_data(dat_bias, dat_ind)
#> Joining, by = "result_id"
#> Joining, by = "result_id"
#> Joining, by = "result_id"
#> Joining, by = "result_id"
#> Joining with `by = join_by(result_id)`
#> Joining with `by = join_by(result_id)`
#> Joining with `by = join_by(result_id)`
#> Joining with `by = join_by(result_id)`
```

At this point, we have an unadjusted (*yi*, *vi*) and adjusted
(*yi\_adj*, *vi\_adj*) estimates for each result.
(*yi_adj*, *vi_adj*) estimates for each result.

These estimates can then simply be passed to `metafor` for analysis

``` r

model_adj <- metafor::rma.uni(
yi = yi_adj,
vi = vi_adj,
Expand Down
Binary file modified man/figures/README-unnamed-chunk-8-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5ef1ab2

Please sign in to comment.