## The function is currently defined as
function (sim)
{
meanVec <- apply(sim, 1, mean, na.rm = TRUE)
sdVec <- apply(sim, 1, sd, na.rm = TRUE)
sim <- t(scale(t(sim), meanVec, sdVec))
return(sim)
}
Run the code above in your browser using DataLab