R/getTypeX.R

Defines functions getTypeX

Documented in getTypeX

getTypeX <-
function(X){
  typeX = rep(0,ncol(X))
  for(i in 1:ncol(X)){ #numeric: 1; categorical: 2s
    if(is.numeric(X[,i])){ typeX[i] = 1 }else{
      typeX[i] = 2
    }
  }
  return(typeX)
}

Try the inTrees package in your browser

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

inTrees documentation built on June 1, 2022, 1:06 a.m.