cascade: make ascending and descending vector

Description Usage Arguments Value Examples

View source: R/utils.r

Description

along a given length n make ascending indices until reaching the midpoint and descend afterwards again.

Usage

1
cascade(n, type = 1)

Arguments

n

integer The length of the indexes

type

(integer, default=1). If 1 the cascade index is returned. 2 returns the index of left and right side, 3 returns the length of the left and right index vector

Value

vector (type 1 or 3) or list (type 2)

Examples

1
2
3
4
5
## Not run: 
   for(n in 1:10) 
       print(cascade(n)) 

## End(Not run)

markheckmann/OpenRepGrid documentation built on April 30, 2021, 2:33 a.m.