Creates a square symmetric matrix from a vector.
Arguments
- x
A numeric vector used to fill the upper or lower triangle of the matrix.
- diag
Logical. If
TRUE(the default), the diagonals of the created matrix are replaced by elements of x; otherwise, the diagonals of the created matrix are replaced by "1".- byrow
Logical. If
FALSE(the default), the created matrix is filled by columns; otherwise, the matrix is filled by rows.- names
Either a logical or a character vector of names for the rows and columns of the matrix. If
FALSE, no names are assigned; ifTRUE, rows and columns are namedX1,X2, ... .
