Pergunta1)

sort(apply(expand.grid(0:5, 0:2, 1:2, 0:2), 1, paste, collapse=''))

Pergunta2)

do.call(rbind, tapply(x, y, function(z) c(media=mean(z), desvp=sd(z),
fper=fper(z))))

ou

aggregate(x, by=list(Grupo=y), function(z) c(media=mean(z),
desvp=sd(z), fper=fper(z)))

ou, se vc quiser "embelezar":

g = function(z) c(media=mean(z), desvp=sd(z), fper=fper(z))
do.call(rbind, tapply(x, y, g))
aggregate(x, by=list(Grupo=y), g)


b
_______________________________________________
R-br mailing list
[email protected]
https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br
Leia o guia de postagem (http://www.leg.ufpr.br/r-br-guia) e forneça código 
mínimo reproduzível.

Responder a