Skip to content

Commit

Permalink
Add pharmaverse shield and change website
Browse files Browse the repository at this point in the history
  • Loading branch information
statasaurus committed Feb 2, 2022
1 parent 3447850 commit fa53310
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 15 deletions.
2 changes: 1 addition & 1 deletion R/build.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#' that is optional to specify.
#' @param metacore Metacore object that contains the specifications for the
#' dataset of interest.
#' @param ds_list Named list of datsets that are needed to build the from
#' @param ds_list Named list of datasets that are needed to build the from
#' @param dataset_name Optional string to specify the dataset. This is only
#' needed if the metacore object provided hasn't already been subsetted.
#' @param predecessor_only By default `FALSE`, but if `TRUE` will only use
Expand Down
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ knitr::opts_chunk$set(
# metatools <a href='https://github.com/pharmaverse/metatools'><img src="man/figures/metatools.png" align="right" style="height:139px;"/></a>

<!-- badges: start -->
[<img src="http://pharmaverse.org/shields/metatools.svg">](https://pharmaverse.org)
[![R-CMD-check](https://github.com/pharmaverse/metatools/workflows/R-CMD-check/badge.svg)](https://github.com/pharmaverse/metatools/actions)
[![codecov](https://codecov.io/gh/pharmaverse/metatools/branch/main/graph/badge.svg?token=55N5APFLPA)](https://codecov.io/gh/pharmaverse/metatools)
[<img src="https://img.shields.io/badge/License-MIT-blue.svg">](https://github.com/pharmaverse/metatools/blob/main/LICENSE)
Expand Down Expand Up @@ -54,7 +55,6 @@ ds_list <- list(DM = read_xpt(metatools_example("dm.xpt")))
build_from_derived(metacore, ds_list) %>% # To pull in columns from DM to be in ADSL
create_cat_var(metacore, AGE, AGEGR1, AGEGR1N) %>% #Add an AGEGR1 and AGEGR1N column
convert_var_to_fct(metacore, ETHNIC) # Change ETHNIC to as factor
```

Metatools can also be used to run checks
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

<!-- badges: start -->

[<img src="http://pharmaverse.org/shields/metatools.svg">](https://pharmaverse.org)
[![R-CMD-check](https://github.com/pharmaverse/metatools/workflows/R-CMD-check/badge.svg)](https://github.com/pharmaverse/metatools/actions)
[![codecov](https://codecov.io/gh/pharmaverse/metatools/branch/main/graph/badge.svg?token=55N5APFLPA)](https://codecov.io/gh/pharmaverse/metatools)
[<img src="https://img.shields.io/badge/License-MIT-blue.svg">](https://github.com/pharmaverse/metatools/blob/main/LICENSE)
Expand Down
3 changes: 0 additions & 3 deletions _pkgdown-BREWL19H13393.yml

This file was deleted.

3 changes: 3 additions & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
url: https://pharmaverse.github.io/metatools
template:
bootstrap: 5
bootswatch: sandstone
2 changes: 1 addition & 1 deletion man/build_from_derived.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions tests/testthat/test-sort.R
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
library(haven)

spec <- define_to_metacore(metacore_example("ADaM_define.xml"), quiet = TRUE) %>%
select_dataset("ADSL")
select_dataset("ADSL")
data <- read_xpt(metatools_example("adsl.xpt"))
test_that("sort_order", {
data %>%
select(AGE, SITEID, everything()) %>%
sort_order(spec) %>%
expect_equal(data)
data %>%
select(AGE, SITEID, everything()) %>%
order_cols(spec) %>%
expect_equal(data)
})

test_that("sort_key", {
data %>%
arrange(TRT01P, AGE) %>%
sort_key(spec) %>%
expect_equal(data)
data %>%
arrange(TRT01P, AGE) %>%
sort_by_key(spec) %>%
expect_equal(data)
})

0 comments on commit fa53310

Please sign in to comment.