Learn R Programming

MoTBFs (version 2.0)

getMotbfVar: Extract Variables of MoTBFs

Description

Get the names of the variables involved in a "univmotbf" or jointmotbf object.

Usage

getMotbfVar(P)

Value

A "character" vector with the names of the variables in the function.

Arguments

P

An object of class "univmotbf" or "jointmotbf".

Examples

Run this code

# 1. EXAMPLE
## Generate a dataset
data <- data.frame(X1 = rnorm(100), X2 = rnorm(100))

## Joint function
dim <-c(3,2)
P <- jointmotbf.fit(data, dimensions = dim)
P

## Variables
getMotbfVar(P)

##############################################################################
## MORE EXAMPLES #############################################################
##############################################################################
# \donttest{
## Generate a dataset
data <- data.frame(X1 = rnorm(100), X2 = rnorm(100), X3 = rnorm(100))

## Joint function
dim <- c(2,1,3)
P <- jointmotbf.fit(data, dimensions = dim)

## Variables
getMotbfVar(P)
# }

Run the code above in your browser using DataLab