Skip to content

Commit

Permalink
Fixing spelling issues, links, brought in join file
Browse files Browse the repository at this point in the history
  • Loading branch information
bms63 committed Jul 29, 2022
1 parent 3871cbc commit 369795f
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Thank you for your Pull Request! We have developed this task checklist from the [Development Process Guide](https://pharmaverse.github.io/admiral/main/articles/development_process.html) to help with the final steps of the process. Completing the below tasks helps to ensure our reviewers can maximize their time on your code as well as making sure the admiral codebase remains robust and consistent.
Thank you for your Pull Request! We have developed this task checklist from the [Development Process Guide](https://pharmaverse.github.io/admiral/articles/development_process.html) to help with the final steps of the process. Completing the below tasks helps to ensure our reviewers can maximize their time on your code as well as making sure the admiral codebase remains robust and consistent.

Please check off each taskbox as an acknowledgment that you completed the task or check off that it is not relevant to your Pull Request. This checklist is part of the Github Action workflows and the Pull Request will not be merged into the `devel` branch until you have checked off each task.

Expand Down
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ Authors@R: c(
)
Description: A toolbox for developers working on (pharmaverse admiral packages, <https://github.com/pharmaverse>).
Package contains functions that are used internally to admiral and admiral extension packages to
check data, variables and conditions. Package also contains utilitiy functions to help developer with
documentaion, testing and genearl upkeep of admiral and admiral extension packages.
check data, variables and conditions. Package also contains utility functions to help developer with
documentation, testing and general upkeep of admiral and admiral extension packages.
License: Apache License (>= 2)
URL: https://pharmaverse.github.io/admiraldev, https://github.com/pharmaverse/admiraldev
Encoding: UTF-8
Expand Down
20 changes: 20 additions & 0 deletions R/joins.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
anti_join <- function(x, y, by = NULL, copy = FALSE, ...) {
suppress_warning(
dplyr::anti_join(x, y, by = by, copy = copy, ...),
"^Column `.+` has different attributes on LHS and RHS of join$"
)
}

inner_join <- function(x, y, by = NULL, copy = FALSE, suffix = c(".x", ".y"), ...) {
suppress_warning(
dplyr::inner_join(x, y, by = by, copy = copy, suffix = suffix, ...),
"^Column `.+` has different attributes on LHS and RHS of join$"
)
}

left_join <- function(x, y, by = NULL, copy = FALSE, suffix = c(".x", ".y"), ...) {
suppress_warning(
dplyr::left_join(x, y, by = by, copy = copy, suffix = suffix, ...),
"^Column `.+` has different attributes on LHS and RHS of join$"
)
}
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ remotes::install_github("pharmaverse/admiraldev", ref = "devel")

```{r tree, echo=FALSE}
library(fs)
tree <- dir_tree("R",recurse=2)
tree <- dir_tree("R", recurse = 2)
```

## Keyword/Family
Expand Down
1 change: 1 addition & 0 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ pharmaverse
renv
repo
www
th
22 changes: 11 additions & 11 deletions tests/testthat/test-assertions.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@ library(admiral.test)

test_that("Test 1 : `assert_has_variables` an error is thrown if a required
variable is missing", {
data(admiral_dm)
data(admiral_dm)

expect_error(
assert_has_variables(admiral_dm, "TRT01P"),
"Required variable `TRT01P` is missing."
)
})
expect_error(
assert_has_variables(admiral_dm, "TRT01P"),
"Required variable `TRT01P` is missing."
)
})

test_that("Test 2 : `assert_has_variables` no error is thrown if a required
variable exists", {
data(admiral_dm)
data(admiral_dm)

expect_error(assert_has_variables(admiral_dm, "USUBJID"), NA)
})
expect_error(assert_has_variables(admiral_dm, "USUBJID"), NA)
})

test_that("Test 3 : `assert_filter_cond` works as expected", {
fc <- quo(AGE == 64)
Expand Down Expand Up @@ -74,7 +74,7 @@ test_that("Test 7 : `assert_data_frame` throws an error if dataframe is grouped"
test_that("Test 8 : `assert_character_scalar` throws an error if not a character scaler string", {
example_fun2 <- function(msg_type) {
msg_type <- assert_character_scalar(msg_type,
values = c("warning", "error"), case_sensitive = FALSE
values = c("warning", "error"), case_sensitive = FALSE
)

if (msg_type == "warning") {
Expand All @@ -87,7 +87,7 @@ test_that("Test 8 : `assert_character_scalar` throws an error if not a character
test_that("Test 9 : `assert_character_scalar` throws an error if input is a vector", {
example_fun2 <- function(msg_type) {
msg_type <- assert_character_scalar(msg_type,
values = c("warning", "error"), case_sensitive = FALSE
values = c("warning", "error"), case_sensitive = FALSE
)

if (msg_type == "warning") {
Expand Down

0 comments on commit 369795f

Please sign in to comment.