R/fd2coef.R

fd2coef <- function (x, basis, byrow = TRUE) 
{
 	if (!is.matrix(x))
 		return(as.vector(basis$S %*% x))
    if (byrow) 
        return(tcrossprod(x, basis$S))
    return(basis$S %*% x)
}

Try the onlinePCA package in your browser

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

onlinePCA documentation built on Nov. 15, 2023, 9:07 a.m.