% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dynrRecipe.R
\docType{methods}
\name{diag,character-method}
\alias{diag}
\alias{diag,character-method}
\alias{diag.character}
\title{Create a diagonal matrix from a character vector}
\usage{
\S4method{diag}{character}(x = 1, nrow, ncol)
}
\arguments{
\item{x}{Character vector used to create the matrix}

\item{nrow}{Numeric. Number of rows for the resulting matrix.}

\item{ncol}{Numeric. Number of columns for the resulting matrix.}
}
\value{
A matrix
}
\description{
Create a diagonal matrix from a character vector
}
\details{
We create a new method for \code{diag} with character input.  The default behavior for missing \code{nrow} and/or \code{ncol} arguments is the same
as for the \code{\link{diag}} function in the base package.  Off-diagonal entries
are filled with "0".
}
\examples{
diag(letters[1:3])
}

