fillup | R Documentation |
Function fillup()
concatenates a vector with a ‘fillup’
value to ensure a unit sum; if given a matrix, attaches a column so
the rowsums are 1.
Function indep()
is the inverse: it removes the final element
of a vector, leaving only an independent set.
fillup(x,H=NULL,total=1)
indep(x)
x |
Numeric vector |
H |
Object with |
total |
Total value for probability |
Usually you want the total to be one, to enforce the unit sum
constraint. Passing total=0
constrains the sum to be
zero. This is useful when considering \delta p
; see the
example at gradient.Rd
.
Robin K. S. Hankin
equalp
,gradient
fillup(c(1/2,1/3))
indep(c(1/2,1/3,1/6))
fillup(indep(icons_maxp))
fillup(indep(icons_maxp),icons)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.