-
Notifications
You must be signed in to change notification settings - Fork 131
/
Copy pathframe_matrix.Rd
35 lines (35 loc) · 1.13 KB
/
frame_matrix.Rd
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
28
29
30
31
32
33
34
35
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tribble.R
\name{frame_matrix}
\alias{frame_matrix}
\title{Row-wise matrix creation}
\usage{
frame_matrix(...)
}
\arguments{
\item{...}{<\code{\link[rlang:dyn-dots]{dynamic-dots}}>
Arguments specifying the structure of a \code{frame_matrix}.
Column names should be formulas, and may only appear before the data.
These arguments are processed with \code{\link[rlang:list2]{rlang::list2()}}
and support unquote via \code{\link[rlang:injection-operator]{rlang::!!}} and unquote-splice via \code{\link[rlang:splice-operator]{rlang::!!!}}.}
}
\value{
A \link{matrix}.
}
\description{
Create matrices laying out the data in rows, similar to
\code{matrix(..., byrow = TRUE)}, with a nicer-to-read syntax.
This is useful for small matrices, e.g. covariance matrices, where readability
is important. The syntax is inspired by \code{\link[=tribble]{tribble()}}.
}
\examples{
frame_matrix(
~col1, ~col2,
1, 3,
5, 2
)
}
\seealso{
See \link[rlang:topic-inject]{rlang::quasiquotation} for more details on tidy dots semantics,
i.e. exactly how the \code{...} argument is processed.
}