tests/testthat/test_z.score.R

library(BioData)
x <- loadObj('TestData.tRNAMINT.RData')
x <- renew(x)
#all the different sample norm types have to be z.scored separately!

expect_equal( as.numeric(x$data[6,]), c( 46, 67.3, 0.75, 36, 37.56, 0.55, 60, 45.22, 0.94, 55, 45.98, 0.88, 44, 51.5, 0.75, 16, 19.05, 0.26, 16, 18.38, 0.28, 59, 28.56, 0.92 ) )

z.score(x)
expect_equal( as.numeric(x$data[6,]), c( 0.254529353820192, 1.67179727741713, 0.305292478805591, -0.311091432446901, -0.0971776313802171, -0.423764186998806, 1.04639845459412, 0.358449396238735, 0.997896311319768, 0.763588061460575, 0.40365521098944, 0.779179311578449, 0.141405196566773, 0.731992181284038, 0.305292478805591, -1.44233300498109, -1.19817714590069, -1.48089635241518, -1.44233300498109, -1.23802964048355, -1.40799068583474, 0.989836375967412, -0.632509648164887, 0.924990644739329 ))
stela2502/BioData documentation built on Feb. 23, 2022, 5:47 a.m.