generated from UofUEpiBio/egpkg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add my tests and finish the lab UofUEpiBio/PHS7045-advanced-programmi…
- Loading branch information
Showing
5 changed files
with
63 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#' Rcpp function for ps_match | ||
#' @param X matrix of covariates for treatment group | ||
#' @export | ||
Rcpp::sourceCpp("ps_match.cpp") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# test add_plot function | ||
# when input is not numeric | ||
|
||
library(testthat) | ||
library(egpkg) | ||
|
||
test_that("add_plot function", { | ||
expect_error(myplot("a", 1), "x and y must be numeric") | ||
expect_error(myplot(1, "a"), "x and y must be numeric") | ||
expect_silent(myplot(1, 2)) | ||
}) |
This file was deleted.
Oops, something went wrong.