extract: Extract or Replace parameters of a hyperdirichlet object

Description Arguments Value Methods Note Author(s) Examples

Description

Methods for "[" and "[<-", i.e., extraction or subsetting of hyperdirichlet objects.

Arguments

x

Object of class hyperdirichlet

i

elements to extract or replace

value

replacement value

Value

Always returns an object of class hyperdirichlet.

Methods

Note

The replacement method “[<-” invokes the validity checking method .hd.valid() by default; this may be time-consuming for hyperdirichlet objects of high dimension.

Users may use the functional form for replacement to override this behaviour; the method takes recalculate and a validated arguments, defaulting to FALSE, that may be set if desired.

Author(s)

Robin K. S. Hankin

Examples

1
2
3
4
5
6
7
a <- uniform(4)
a[5] <- 1.2

## Not run: 
a <- as.hyperdirichlet(a, TRUE)  # recommended way to calculate NC

## End(Not run)

hyperdirichlet documentation built on May 31, 2017, 5:18 a.m.