R/prettyHierFormula.R

prettyHierFormula <-
function (generators, tools) {
 
  formula <- c()

  for(i in tools$nVarSets:1) {
    if(generators[i] == 1) {
      formula <- paste (formula, "[", sep = "")
      first <- 1
      for(j in 1:tools$n) {
        if(tools$varSets[i,j] == 1) { 
          if (first == 1) {
            first <- 0  
            formula <- paste (formula,  tools$varNames[j], sep = "")
          }
          else 
            formula <- paste (formula, ",", tools$varNames[j], sep = "")
        }
      }

      formula <- paste (formula, "]", sep = "")    
    }
  } 
  
  return(formula)

}

Try the genMOSSplus package in your browser

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

genMOSSplus documentation built on May 1, 2019, 10:31 p.m.