File: omxCheckCloseEnough.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 (41 lines) | stat: -rw-r--r-- 1,396 bytes parent folder | download | duplicates (2)
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
36
37
38
39
40
41
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/MxUnitTesting.R
\name{omxCheckCloseEnough}
\alias{omxCheckCloseEnough}
\title{Approximate Equality Testing Function}
\usage{
omxCheckCloseEnough(a, b, epsilon = 10^(-15))
}
\arguments{
\item{a}{a numeric vector or matrix}

\item{b}{a numeric vector or matrix}

\item{epsilon}{a non-negative tolerance threshold}
}
\description{
This function tests whether two numeric vectors or matrixes are
approximately equal to one another, within a specified threshold.
}
\details{
Arguments \sQuote{a} and \sQuote{b} must be of the same type,
ie. they must be either vectors of equal dimension or matrices of
equal dimension. The two arguments are compared element-wise for
approximate equality.  If the absolute value of the difference of
any two values is greater than the threshold, then an error will
be thrown.
}
\examples{
omxCheckCloseEnough(c(1, 2, 3), c(1.1, 1.9 ,3.0), epsilon = 0.5)
omxCheckCloseEnough(matrix(3, 3, 3), matrix(4, 3, 3), epsilon = 2)
# Throws an error
try(omxCheckCloseEnough(c(1, 2, 3), c(1.1, 1.9 ,3.0), epsilon = 0.01))
}
\references{
The OpenMx User's guide can be found at <https://openmx.ssri.psu.edu/documentation>.
}
\seealso{
\code{\link{omxCheckWithinPercentError}},
\code{\link{omxCheckIdentical}}, \code{\link{omxCheckSetEquals}},
\code{\link{omxCheckTrue}}, \code{\link{omxCheckEquals}}
}