tests/testthat/test_getPathpVals.R

context("getPathpVals")

gitHubPath_char <-
  "https://raw.githubusercontent.com/lizhongliu1996/pathwayPCAdata/master/"
colon_aespcOut <- readRDS(
  url(paste0(gitHubPath_char, "colon_aespcOut.rds"))
)

test_that("getPathpVals returns df with correct classes", {
  
  expect_s3_class(
    getPathpVals(colon_aespcOut,
                 numPaths = 5), 
    class = c("tbl_df", "tbl", "data.frame")
  )
  
  expect_s3_class(
    getPathpVals(colon_aespcOut,
                 alpha = 0.01), 
    class = c("tbl_df", "tbl", "data.frame")
  )
  
})

Try the pathwayPCA package in your browser

Any scripts or data that you put into this service are public.

pathwayPCA documentation built on Dec. 15, 2020, 6:14 p.m.