h <- hypr(mu1~0, mu2~mu1)
hmat(h)
ginv2(hmat(h))
cmat(h)
# cmat is effectively the generalized inverse of hmat
stopifnot(all.equal(
`class<-`(ginv2(hmat(h)), "matrix"),
`class<-`(cmat(h), "matrix"), check.attributes = FALSE))
Run the code above in your browser using DataLab