tests/testthat/test_lower.upper.R

context("lower.upper")

test_that("lower and upper bounds of variables works", 
  {
	d <- structure(c(2,0, 1, 1, 1, 0, 1, 1, 0, 2, 0, 2, 2, 1, 2, 2, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 2, 0, 2, 2), .Dim = c(5L, 6L))
    res2 <- lower.upper(d)   
	
	  expect_equal( res2,  structure(list(lower = structure(c(0.841621233572914, -Inf, -0.841621233572914, 
-0.841621233572914, -0.841621233572914, -Inf, -0.2533471031358, 
-0.2533471031358, -Inf, 0.841621233572914, -Inf, -0.2533471031358, 
-0.2533471031358, -0.841621233572914, -0.2533471031358, 0.841621233572914, 
-0.2533471031358, -Inf, -Inf, -0.2533471031358, -0.2533471031358, 
-0.2533471031358, -Inf, -Inf, -0.2533471031358, -Inf, -0.2533471031358, 
-Inf, -0.2533471031358, -0.2533471031358), .Dim = 5:6), upper = structure(c(Inf, 
-0.841621233572914, 0.841621233572914, 0.841621233572914, 0.841621233572914, 
-0.2533471031358, 0.841621233572914, 0.841621233572914, -0.2533471031358, 
Inf, -0.841621233572914, Inf, Inf, -0.2533471031358, Inf, Inf, 
0.841621233572914, -0.2533471031358, -0.2533471031358, 0.841621233572914, 
Inf, Inf, -0.2533471031358, -0.2533471031358, Inf, -0.2533471031358, 
Inf, -0.2533471031358, Inf, Inf), .Dim = 5:6)), .Names = c("lower", 
"upper")) )  
   })

Try the netgwas package in your browser

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

netgwas documentation built on May 29, 2024, 5:33 a.m.