1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
\name{ones}
\alias{ones}
\title{Generates a matrix of ones}
\description{
\code{ones} generates a matrix of ones.
}
\usage{
ones(n, p = n)
}
\arguments{
\item{n}{ number of rows }
\item{p}{ number of columns }
}
\details{
if only n is specified, the resulting matrix will be square.
}
\value{
a matrix filled with ones.
}
\author{ Jan Graffelman (jan.graffelman@upc.edu) }
\seealso{\code{\link{matrix}}}
\examples{
Id <- ones(3)
print(Id)
}
\keyword{multivariate}
|