R/factorall.R

factorall <-
function(x){
	if (length(dim(x))>1){
		for(i in 1:length(x)){
			{
				x[,i]=factor(x[,i])}
			}
		return(x)
		} else {
		x=factor(x)
		return(x)
		}
	}

Try the erpR package in your browser

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

erpR documentation built on June 7, 2019, 3 a.m.