search for: cumfreq

Displaying 2 results from an estimated 2 matches for "cumfreq".

2015 Jun 30
3
Loop for: mostrar el nombre de la variables
...ES) { attach(XDADES) for (XVARNUM in XDADES) { if(is.numeric(XVARNUM)) { print (c("Var Num: ", mean(XVARNUM))) } else if(is.factor(XVARNUM)) { print (c("Var factor: ")) XOUT <- as.data.frame(table(XVARNUM)) print(XOUT <- transform(XOUT, cumFreq = cumsum(Freq), relative = prop.table(Freq))) } else { print ("Var desc") } } detach(XDADES) } DES(XDADES=TBL) *************************** Tengo dos problemas: 1. En: print (c("Var Num: ", mean(XVARNUM))) no consigo que imprima el nombre de...
2015 Jul 14
4
Conservar el nombre de la variable entre varias funciones: ejemplos de resultados
...------------------ ## DES_QUALI: Descriptiva variables factor ##-------------------------------------------------------------- DES_QUALI <- function(X) { cat("Var factor: ",X,"\n") XOUT <- as.data.frame(table(get(X))) names(XOUT)[1] = X XOUT <- transform(XOUT, cumFreq = cumsum(Freq), Percentatge = prop.table(Freq)) print(XOUT) print("-----------------------------------------------------") } ##-------------------------------------------------------------- ## UNI: AnĂ¡lisis univarido ##-------------------------------------------------------------- U...