x = structure(list(ID = 1, AF1MEDIDA1 = 11.7, AF1MEDIDA2 = 5, AF2MEDIDA1 =
21,
AF2MEDIDA2 = 21, AF3MEDIDA1 = 33, AF3MEDIDA2 = 20.03), .Names = c("ID",
"AF1MEDIDA1", "AF1MEDIDA2", "AF2MEDIDA1", "AF2MEDIDA2", "AF3MEDIDA1",
"AF3MEDIDA2"), row.names = c(NA, -1L), class = "data.frame")
y = with(reshape(x, varying=2:7, idvar="ID", direction="long", sep="",
timevar="Grupo", ),
data.frame(ID=ID,
REP=substr(Grupo, 2, nchar(Grupo)),
AF=paste("AF", substr(Grupo, 1, 1), sep=""),
VALOR=AF))
_______________________________________________
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.