Learn R Programming

hyper2 (version 3.0-0)

tidy: Tidy up a hyper2 object

Description

Tidy up a hyper2 object by removing players about which we have no information

Usage

tidy(H)

Arguments

H

A hyper2 object

Author

Robin K. S. Hankin

Details

Function tidy(H) returns a hyper2 object mathematically identical to H but with unused players (that is, players that do not appear in any bracket) removed. Players about which H is uninformative are removed from the pnames attribute.

Note that idiom pnames(H) <- foo can also be used to manipulate the pnames attribute.

Examples

Run this code


H <- hyper2(pnames=letters)
H["a"] <- 1
H["b"] <- 2
H[c("a","b")] <- -3

pnames(H)
pnames(tidy(H))

H == tidy(H)  # should be TRUE



Run the code above in your browser using DataLab