renderpf90.matrix: Render a sparse matrix into non-zero values and column...

Description Usage Arguments Details Value See Also

View source: R/renderpf90.R

Description

This function provides a representation of a sparse matrix suited to progsf90.

Usage

1
2
## S3 method for class 'matrix'
renderpf90(x)

Arguments

x

object of class breedr_modelframe, effect_group or breedr_effect.

Details

For each row, it keeps the non-zero elements and their respective column index. The gaps are filled with zeros.

Value

A matrix with a number of columns equal to twice the maximum number of non-zero elements in one row. The first half of the columns are the non-zero values (except for filling-in) while the second half are the column indices.

For indicator matrices (i.e. each row has at most one non-zero value of 1), it returns a one-column matrix of the corresponding column indices.

See Also

Other renderpf90: renderpf90()


famuvie/breedR documentation built on Sept. 6, 2021, 4:50 a.m.