sq_matrix: Takes a vector and converts it into a square matrix

Description Usage Arguments Value See Also Examples

Description

sq_matrix takes a vector and converts it into a square matrix.

Usage

1
  sq_matrix(data, byrow = TRUE)

Arguments

data

Object (probably vector) to be turned into square matrix

byrow

Whether to fill in the matrix by row or by column

Value

A matrix with the same number of columns and rows

See Also

link{matrix}

Examples

1
2
3
sq_matrix(1:4)
sq_matrix(1:4, FALSE)
matrix(1:4, nrow=2)


Search within the tldutils package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.