R/formulaAm.R

Defines functions formulaAm

Documented in formulaAm

formulaAm <- function(X,Y){
	
	X <- data.frame(X)
	p <- dim(X)[2]
	Y <- data.frame(Y)  

  F <- paste(names(Y),"~s(",names(X)[1],")",sep="")
  if (p>1){
    for (i in 2:p){
	F <- paste(F,"+s(",names(X)[i],")",sep="")
    }
  }
  return(as.formula(F))
}

Try the DiceEval package in your browser

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

DiceEval documentation built on May 2, 2019, 2:09 a.m.