createNmMatrix: Creates a matrix based on a "NONMEM style" vector

createNmMatrixR Documentation

Creates a matrix based on a "NONMEM style" vector

Description

Creates a matrix based on a vector specifying the lower diagonal elements (as would be defined in NONMEM outputs)

Usage

createNmMatrix(x, dimnames = NULL, byrow = TRUE)

Arguments

x

Vector of values to be placed in the matrix

dimnames

Optional dimension names for output matrix

byrow

(Optional) Should we read in the data into the matrix diagonal by row (default) or by column

Details

Places the values in the lower diagonal of an output matrix, and reflects these values across the diagonal. Adds dimension names if provided

Value

A matrix

Author(s)

Mike K Smith mstoolkit@googlemail.com

Examples


	createNmMatrix(1:3)
	createNmMatrix(1:6)
	createNmMatrix(1:10, list(LETTERS[1:4], letters[1:4]))


MikeKSmith/MSToolkit documentation built on Feb. 15, 2024, 5:32 p.m.