releaf: "Re-leaf" a Vine

Description Usage Arguments Value Examples

View source: R/releaf.rvine.R

Description

Convert a vine array (releafvarray) or a vine (releaf.rvine) so that a variable of your choice appears last in the vine array – if possible. This might only work for regular vines, with arrays truncated in the traditional sense.

Usage

1
2
3
4
releafvarray(G, leaf)

## S3 method for class 'rvine'
releaf(rv, leaf)

Arguments

G

Regular vine array.

leaf

Vector of variables that you want to get new vine array for, if such a vine array exists.

rv

Object of type "rvine".

Value

A vine array or vine with leaf at the end, if such a vine array exists; NULL otherwise.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
A <- makeuppertri(c(4,4,4,4,6,5,
                    6,6,6,4,4,
                    1,1,1,6,
                    5,5,1,
                    2,2,
                    3), 6, 6, incDiag=T)
G <- AtoG(A)
releafvarray(G, 2)
releafvarray(G, 1)
releafvarray(truncvarray(G, 0), 1)
releaf(rvine(G, "frk", 3), 2)

vincenzocoia/copsupp documentation built on Aug. 23, 2020, 7:37 a.m.