distribution.reorder: Reorder a 'Distribution' object according to another...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/distribution.R

Description

The distribution.reorder function reorder a Distribution object to make its names be in the same order than a another Distribution object. Both objects have to be comparable.

Usage

1
2
3
4
5
distribution.reorder(
  x,
  model,
  quiet = T
)

Arguments

x

A Distribution object.

model

A Distribution object which is the model for name ordering.

quiet

A logical.

Value

The x Distribution object with names reordered according to names of model.

Author(s)

Emmanuel Rousseaux

See Also

distribution.comparable

Examples

1
2
3
4
5
6
7
8
x <- distribution(c(0.5,0.5))
y <- distribution(c(0.1,0.9))
distribution.reorder(x,y)

x <- distribution(c("well" = 0.5, "poor" = 0.5))
y <- distribution(c("poor" = 0.1, "well" = 0.9))
distribution.reorder(x,y)
distribution.reorder(x,y, quiet = FALSE)

trim documentation built on May 2, 2019, 5:36 p.m.