tests/testthat/test_LoadOntoPCs.R

context("LoadOntoPCs")

data("colonSurv_df")

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


test_that("LoadOntoPCs returns df with correct classes", {
  
  expect_s3_class(
    LoadOntoPCs(
      design_df = colonSurv_df,
      loadings_ls = colon_aespcOut$loadings_ls
    ),
    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.