R/norm3.R

norm3 <-
function(X,n,m,p,mode){

Y=as.matrix(X)
if (mode==1){
    Y=t(nrm2(t(Y)))
	Y=((m*p)^.5)*Y
}
if (mode==2){
    Y=permnew(Y,n,m,p)
    Y=t(nrm2(t(Y)))
    Y=permnew(Y,m,p,n)
    Y=permnew(Y,p,n,m)
    Y=((n*p)^.5)*Y
}
if (mode==3){
    Y=permnew(Y,n,m,p)
    Y=permnew(Y,m,p,n)
    Y=t(nrm2(t(Y)))
    Y=permnew(Y,p,n,m)
    Y=((n*m)^.5)*Y
}
return(Y)
}

Try the ThreeWay package in your browser

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

ThreeWay documentation built on May 2, 2019, 9:20 a.m.