R/add_es.R

Defines functions add_es

Documented in add_es

add_es <- function(eg,eg2,current_rank,ff=0,method=c("esm","isvd")){
  if(method=="esm"){
    if (missing("current_rank")) {
      #current_rank = full rank
      current_rank =  length(eg$d)
    }
 
    out = add_eig(eg, eg2, current_rank)}
  else{
    if (is.null(eg$m)) {
      m = dim(eg$u)[1]
    } 
    else
    {
      m = eg$m
    }
    B = eg2
    if (missing("current_rank")) {
      #current_rank = full rank
      current_rank =  dim(B)[2]
    }
    out = add_svd(eg,B,m,current_rank,ff = ff)
  }
  return(out)
}

Try the idm package in your browser

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

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