tests/testthat/test_normalization1.R

context("normalization1")

test_that("normalization1", {
  a<-matrix(runif(10,1,10),10,1)
  b<-as.vector(a[,1])
  for(i in 0:13){
    t=paste("n",i,sep="")
    an<-data.Normalization(a,type=t)
    bn<-data.Normalization(b,type=t)
    expect_equal(as.vector(an[,1]),as.vector(bn))
  }

  for(i in c(3,5,6,9,12)){
    t=paste("n",i,"a",sep="")
    an<-data.Normalization(a,type=t)
    bn<-data.Normalization(b,type=t)
    expect_equal(as.vector(an[,1]),as.vector(bn))
  }  
})

Try the clusterSim package in your browser

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

clusterSim documentation built on Jan. 8, 2021, 2:13 a.m.