relabel: Relabel Variables in a Vine/Vine Array

Description Usage Arguments Details Value Examples

View source: R/relabel.rvine.R

Description

Relabel Variables in a Vine/Vine Array

Usage

1
2
3
4
## S3 method for class 'rvine'
relabel(rv, labs = 1:ncol(rv$G))

relabelvarray(G, labs = 1:ncol(G))

Arguments

rv

Object of type 'rvine'

labs

Vector of new labels. The order of the labels correspond to the order of the variables in the vine array G.

G

Vine array

Details

Similar to CopulaModel::varrayperm but allows for the posibility that G is not square, as well as labels outside of the set {1:ncol(G)}.

Value

The inputted rv or G with the array matrix relabelled.

Examples

1
2
3
4
5
6
7
8
9
(G <- AtoG(CopulaModel::Cvinearray(5))[1:3, ])
rv <- rvine(G, "frk", 4)

relabelvarray(G, c(3, 2, 1, 5, 4))
relabel(rv, c(3, 2, 1, 5, 4))

## Labels don't need to be in the set {1:ncol(G)}.
relabelvarray(G, c(54, 234, 1, 35, 42))
relabel(rv, c(54, 234, 1, 35, 42))

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