balance: Enforce the zero power sum condition

balanceR Documentation

Enforce the zero power sum condition

Description

Sometimes a hyper2 object is unbalanced in the sense that its powers do not sum to zero. This is rectified by balance(), which modifies the power of the bracket corresponding to the sum of all pnames accordingly.

Usage

balance(H)

Arguments

H

object of class hyper2 or hyper3

Details

This is just a convenience function, all it does is

    H[pnames(H)] <- 0
    H[pnames(H)] <- -sum(pnames(H))
    H
  

Package vignette zeropower discusses the zero power sum condition.

Value

Returns a balanced hyper2 object

Author(s)

Robin K. S. Hankin

See Also

print.hyper2

Examples



H <- hyper2()
H["a"] <- 6
H["b"] <- 3
H[c("a","c")] <- 7
H <- balance(H)
maxp(H)

hyper2 documentation built on June 22, 2024, 9:57 a.m.