library(lfe)
cbind(data_fernando,
.group=con_check(data_fernando, ~ gen + herd))
library(connected)
set.seed(42)
data_fernando = transform(data_fernando,
y=stats::rnorm(9, mean=100))
con_view(data_fernando, y ~ gen*herd, cluster=FALSE,
main = "Fernando unsorted")
con_view(data_fernando, y ~ gen*herd, main="Fernando clustered")
Run the code above in your browser using DataLab