Learn R Programming

simsem (version 0.2-8)

extractMatrixNames: Extract a vector of parameter names based on specified rows and columns

Description

Extract a vector of parameter names based on specified rows and columns

Usage

extractMatrixNames(columnName, keepRow=NULL, keepCol=NULL)

Arguments

columnName
A column name representing matrix elements (e.g., LY2_1) that will be used to be extracted
keepRow
The rows of the matrix that we need to keep
keepCol
The columns of the matrix that we need to keep

Value

  • A list that contains: 1) columnName: Original column name and 2) newName: Reordered column name.

Examples

Run this code
# The function is not public

# vec <- c("LY1_1", "LY2_1", "LY3_1", "LY4_2", "LY5_2", "LY6_2", "LY7_3")
# extractMatrixNames(vec, 5:6, 2)

Run the code above in your browser using DataLab