Learn R Programming

BNPTSclust (version 2.0)

comp11: Univariate ties function

Description

Computes the distinct observations and frequencies in a numeric vector.

Usage

comp11(y)

Arguments

y

Numeric vector.

Value

jstar

variable that rearranges "y" into a vector with its unique values.

nstar

frequency of each distinct observation in "y".

rstar

number of distinct observations in "y".

gn

variable that indicates the group number to which every entry in "y" belongs.

Details

The code of the function is the same as the "comp1" function from the "BNPdensity" package. The change is in the output of the function. This function is for internal use.