Learn R Programming

nspmix (version 2.0-0)

sort.npnorm: Sorting of an Object of Class npnorm

Description

Function sort.npnorm sorts an object of class npnorm in the order of the obsersed values.

Usage

# S3 method for npnorm
sort(x, decreasing = FALSE, ...)

Arguments

x

an object of class npnorm.

decreasing

logical, in the decreasing (default) or increasing order.

...

arguments passed to function order.

Examples

Run this code

mix = disc(pt=c(0,4), pr=c(0.3,0.7))  # a discrete distribution
x = rnpnorm(20, mix, sd=1)
sort(x)

 

Run the code above in your browser using DataLab