Displaying 1 result from an estimated 1 matches for "xvarnum".
Did you mean:
varnum
2015 Jun 30
3
Loop for: mostrar el nombre de la variables
...la función real definitiva la descriptiva es más completa):
***************************
# Data.frame para pruebas:
TBL <- data.frame(SE=sample(c("H","M"),10,TRUE),
ED=(rnorm(10)+2.5)*20)
# Función DES:
DES = function(XDADES)
{
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.tab...