1 testEMGLLF = function(){
5 dimensions = read.table(strcat(testFolder,'dimensions'), header=FALSE)
12 phiInit = read.table(strcat(testFolder,'phiInit'), header=FALSE)
13 rhoInit = read.table(strcat(testFolder,'rhoInit'), header=FALSE)
14 piInit = t(read.table(strcat(testFolder,'piInit'), header=FALSE))
15 gamInit = read.table(strcat(testFolder,'gamInit'), header=FALSE)
16 mini = read.table(strcat(testFolder,'mini'), header=FALSE)
17 maxi = read.table(strcat(testFolder,'maxi'), header=FALSE)
18 gamma = read.table(strcat(testFolder,'gamma'), header=FALSE)
19 lambda = read.table(strcat(testFolder,'lambda'), header=FALSE)
20 X = rread.table(strcat(testFolder,'X'), header=FALSE)
21 Y = read.table(strcat(testFolder,'Y'), header=FALSE)
22 tau = read.table(strcat(testFolder,'tau'), header=FALSE)
25 EMG = .Call("EMGLLF_core",phiInit,rhoInit,piInit1,gamInit,mini,maxi,gamma,lambda,X,Y,tau)
32 #get all stored outputs
33 ref_phi =read.table(strcat(testFolder,'phi'), header=FALSE)
34 ref_rho = read.table(strcat(testFolder,'rho'), header=FALSE)
35 ref_pi = read.table(strcat(testFolder,'pi'), header=FALSE)
36 ref_LLF = read.table(strcat(testFolder,'LLF'), header=FALSE)
37 ref_S = read.table(strcat(testFolder,'S'), header=FALSE)
39 #check that output correspond to stored output
41 checkOutput('phi',phi,ref_phi,tol);
42 checkOutput('rho',rho,ref_rho,tol);
43 checkOutput('pi',pi,ref_pi,tol);
44 checkOutput('LLF',LLF,ref_LLF,tol);
45 checkOutput('S',S,ref_S,tol);