Description Arguments Value Methods Note Author(s) Examples
Methods for "["
and "[<-"
, i.e., extraction or
subsetting of hyperdirichlet objects.
x |
Object of class hyperdirichlet |
i |
elements to extract or replace |
value |
replacement value |
Always returns an object of class hyperdirichlet.
x[i]
x[i] <- value
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.
Robin K. S. Hankin
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.