File: mxAlgebraFromString.Rd

package info (click to toggle)
r-cran-openmx 2.21.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 14,412 kB
  • sloc: cpp: 36,577; ansic: 13,811; fortran: 2,001; sh: 1,440; python: 350; perl: 21; makefile: 5
file content (32 lines) | stat: -rw-r--r-- 1,162 bytes parent folder | download | duplicates (3)
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
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/MxAlgebra.R
\name{mxAlgebraFromString}
\alias{mxAlgebraFromString}
\title{Create MxAlgebra object from a string}
\usage{
mxAlgebraFromString(algString, name = NA, dimnames = NA, ...)
}
\arguments{
\item{algString}{the character string to convert into an R expression}

\item{name}{An optional character string indicating the name of the object.}

\item{dimnames}{list. The dimnames attribute for the algebra: a list of length 2 giving the row and column names respectively. An empty list is treated as NULL, and a list of length one as row names. The list can be named, and the list names will be used as names for the dimensions.}

\item{...}{Forwarded verbatim to \link{mxAlgebra}}
}
\description{
Create MxAlgebra object from a string
}
\examples{
A <- mxMatrix(values = runif(25), nrow = 5, ncol = 5, name = 'A')
B <- mxMatrix(values = runif(25), nrow = 5, ncol = 5, name = 'B')
model <- mxModel(A, B, name = 'model',
  mxAlgebraFromString("A * (B + A)", name = 'test'))
model <- mxRun(model)
model[['test']]$result
A$values * (B$values + A$values)
}
\seealso{
\link{mxAlgebra}
}