Learn R Programming

shuffleCI (version 0.1.0)

rseq: Rising Sequences

Description

Determines the number of rising sequences in a list of numbers.

Usage

rseq(x)

Arguments

x

List of numbers

Value

nrise - the number of rising sequences.

Details

A rising sequence is maximal consecutively increasing subsequence.

Ex: 1,4,2,5,6,3,7 There are 3 rising sequences in this list.

(1,4,5,6,7),(2,3)

References

Mann, B. (1995). How many times should you shuffle a deck of cards. Topics in Contemporary Probability and Its Applications, 15, 1-33.

Williams, C. O. (1912). A card reading. The Magician Monthly, 8, 67.

Examples

Run this code
# NOT RUN {
rseq(c(1,4,2,5,6,3,7))
# }

Run the code above in your browser using DataLab