Estou tentando usar a função glht com uma lista de contrastes. Tem solução? 


require(multcomp)
 
x=structure(list(t = structure(c(1L, 1L, 2L, 2L, 3L,
3L, 4L, 4L
), .Label = c("t1", "t2",
"t3", "t4"), class = "factor"), r = c(5L, 
6L, 23L, 29L, 12L, 16L, 45L, 49L)), .Names =
c("t", "r"), class = "data.frame", row.names =
c(NA, 
-8L))
 
m=lm(r~t, data=x)
 
teste3=glht (m,  linfct = mcp(t =
"Tukey" ))
mc=teste3$linfct
 
 
y=row.names(mc)
 
dd=list(y[c(1,2)],y[3])
 
c=lapply(dd, function(ddi)
{        mc[ddi,]    })

 

# ?????lapply(c, function(ci) {summary(glht(m,  linfct =ci))})
_______________________________________________
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