Last data update: 2014.03.03

R: Longest increasing subsequence for a univariate sample
lisR Documentation

Longest increasing subsequence for a univariate sample

Description

It compute the size of the longest increasing subsequence from a sample of a (continuous) random variable.

Usage

lis(x)

Arguments

x

numeric vector of data values.

Details

See example 2.1-Main reference.

Value

Integer, the size of the longest increasing subsequence.

Author(s)

J. E. Garcia and V. A. Gonzalez-Lopez

References

J. E. Garcia, V. A. Gonzalez-Lopez, Independence tests for continuous random variables based on the longest increasing subsequence, Journal of Multivariate Analysis (2014), http://dx.doi.org/10.1016/j.jmva.2014.02.010

Examples

#see Example 2.1 (reference)
a<-lis(c(3,6,1,7,4,2,5,8))
a

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(LIStest)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/LIStest/lis.Rd_%03d_medium.png", width=480, height=480)
> ### Name: lis
> ### Title: Longest increasing subsequence for a univariate sample
> ### Aliases: lis
> ### Keywords: ~longest increasing subsequence ~copula
> 
> ### ** Examples
> 
> #see Example 2.1 (reference)
> a<-lis(c(3,6,1,7,4,2,5,8))
> a
[1] 4
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>