h <- hypr(mu1~0, mu2~mu1)
# To retrieve the hypothesis matrix of `h`:
hmat(h)
# To retrieve the transposed hypothesis matrix of `h`:
thmat(h)
# Setting the hypothesis matrix of `h`:
hmat(h) <- matrix(c(1,-1,0,1), ncol=2, dimnames=list(NULL, c("mu1","mu2")))
h
h2 <- hypr() # an empty hypr object
thmat(h2) <- matrix(c(1,0,-1,1), ncol=2, dimnames=list(c("mu1","mu2"), NULL))
h2
# `h` and `h2` should be identical:
stopifnot(all.equal(hmat(h), hmat(h2)))
stopifnot(all.equal(cmat(h), cmat(h2)))
Run the code above in your browser using DataLab