R/formulaLm.R

Defines functions formulaLm

Documented in formulaLm

formulaLm <- function(X,Y){

	X <- data.frame(X)
	p <- dim(X)[2]
	Y <- data.frame(Y)  

  F <- paste(names(Y),"~",names(X)[1],sep="")
  if (p>1){
    for (i in 2:p){
	F <- paste(F,"+",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 July 4, 2022, 9:05 a.m.