MoTBFs (version 1.4.1)

nVariables: Number of Variables in a Joint Function

Description

Compute the number of variables which are in a jointmotbf object.

Usage

nVariables(P)

Arguments

P

An "motbf" object or a "jointmotbf" object.

Value

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

Examples

Run this code
# NOT RUN {
# 1. EXAMPLE
## Generate a dataset
data <- data.frame(X1 = rnorm(100), X2 = rnorm(100))

## Joint function
dim <-c(3,2)
param <- parametersJointMoTBF(data, dimensions = dim)
P <- jointMoTBF(param)
P

## Variables
nVariables(P)

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

## Joint function
dim <- c(2,1,3)
param <- parametersJointMoTBF(data, dimensions = dim)
P <- jointMoTBF(param)

## Variables
nVariables(P)
# }

Run the code above in your browser using DataLab