R/Xj_star_stacking.R

Defines functions Xj_star_stacking

Xj_star_stacking <- function(dat,n,R,p){ #stack the data by replicates
  for(i in 1:n){
    dat[R*i,] <- 0 #put 0 for the 1st replicate of every R replicates
  }
  a <- matrix(0,1,p) #1st row is 0
  b <- rbind(a,dat)
  Xj_star <- b[-dim(b)[1],] #exclude the last row
  return(Xj_star)
}

Try the latentgraph package in your browser

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

latentgraph documentation built on Dec. 15, 2020, 5:23 p.m.