% Generated by roxygen2: do not edit by hand
\name{matrix}
\alias{matrix}
\title{Create a Matrix}
\arguments{
  \item{data}{a vector of values to populate the matrix}
  \item{nrow}{number of rows}
  \item{ncol}{number of columns}
  \item{byrow}{logical. Should the matrix be filled by rows?
}
}

\details{
Create a matrix with default parameters
\code{
matrix(1:6)  # 1-column matrix
}

Create a matrix with specific number of rows and columns
\code{
matrix(1:6, nrow = 2, ncol = 3)  # 2x3 matrix filled by column
}

Fill a matrix by rows
\code{
matrix(1:6, nrow = 2, ncol = 3, byrow = TRUE)  # 2x3 matrix filled by row
}}

