tests/testthat/test-plotPCA.R

test_that("plotPCA works", {
  data("freelive2")
   pca_object<-prcomp(XRVIP2)

   ### The number of principal component should not exceed number of observations and number of variables
   expect_error(
   plotPCA(pca_object,
           PC1=1,
           PC2=min(dim(XRVIP))+1)
   )
})

Try the MUVR2 package in your browser

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

MUVR2 documentation built on Sept. 16, 2024, 9:06 a.m.