R/getTable.R

Defines functions getTable

getTable = function(vars, varsLevels){

  vars = data.frame(vars)
  for (i in 1:ncol(vars)){
    vars[,i] = factor(vars[,i], levels = varsLevels[[i]])
  }

  return(data.frame(table(vars))$Freq)

}

Try the blatent package in your browser

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

blatent documentation built on May 29, 2024, 5:42 a.m.