Extract.brob {hyperdirichlet} | R Documentation

## Extract or Replace parameters of a hyperdirichlet object

### 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

- x[i]
- x[i] <- value

### 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

    a <- uniform(4)
    a[5] <- 1.2

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

[Package hyperdirichlet version 1.3-8 Index]