Nothing
#' @keywords internal
ca.intern <- function(X, tol=10^-7,ncp.max = 100){
df <- X/sum(X)
row.w <- col.w <- apply(df, 1, sum)
w.sqrt <- sqrt(col.w)
df <- df/row.w
df <- sweep(df, 2, col.w, "/") - 1
df.ori <- df
df <- df * w.sqrt
df <- sweep(df, 2, w.sqrt, "*")
df <- Rfast::Crossprod(df, df)
res.eigen <- Rfast::eigen.sym(df, k= min(ncp.max,ncol(X)-1))
eig <- res.eigen$values
rank <- sum((eig/eig[1]) > tol)
auxi <- res.eigen$vectors[, seq.int(rank)]/w.sqrt
auxi2 <- sweep(df.ori, 2, col.w, "*")
auxi2 <- Rfast::mat.mult(auxi2,auxi)
return(auxi2)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.