summaryrefslogtreecommitdiff
path: root/math/R/patches/patch-doc_manual_R-intro.texi
diff options
context:
space:
mode:
Diffstat (limited to 'math/R/patches/patch-doc_manual_R-intro.texi')
-rw-r--r--math/R/patches/patch-doc_manual_R-intro.texi53
1 files changed, 53 insertions, 0 deletions
diff --git a/math/R/patches/patch-doc_manual_R-intro.texi b/math/R/patches/patch-doc_manual_R-intro.texi
new file mode 100644
index 00000000000..90a75e74cf0
--- /dev/null
+++ b/math/R/patches/patch-doc_manual_R-intro.texi
@@ -0,0 +1,53 @@
+$NetBSD: patch-doc_manual_R-intro.texi,v 1.1 2013/08/19 13:30:30 jperkin Exp $
+
+Texinfo 5.1 fixes.
+
+--- doc/manual/R-intro.texi.orig 2013-04-03 22:05:07.000000000 +0000
++++ doc/manual/R-intro.texi
+@@ -1981,12 +1981,27 @@ is available, so we could have used @cod
+ @node Matrix facilities, Forming partitioned matrices, Generalized transpose of an array, Arrays and matrices
+ @section Matrix facilities
+
++@iftex
+ @macro xTx{}
+- @eqn{@strong{x}^T @strong{x}, x'x}
++@tex
++@strong{x}^T @strong{x}$%
++@end tex
+ @end macro
+ @macro xxT{}
+- @eqn{@strong{x}@strong{x}^T, x x'}
++@tex
++@strong{x}@strong{x}^T$%
++@endtex
+ @end macro
++@end iftex
++
++@ifnottex
++@macro xTx{}
++x'x
++@end macro
++@macro xxT{}
++x x'
++@end macro
++@end ifnottex
+
+ As noted above, a matrix is just an array with two subscripts. However
+ it is such an important special case it needs a separate discussion.
+@@ -2106,10 +2121,12 @@ potentially unstable to compute @code{x
+ The quadratic form @eqn{@strong{x^T A^{-1} x},@ @code{x %*% A^@{-1@} %*%
+ x} @ } which is used in multivariate computations, should be computed by
+ something like@footnote{Even better would be to form a matrix square
+-root @eqn{B, B} with @eqn{A = BB^T, A = BB'} and find the squared length of the
+-solution of @eqn{By = x, By = x}, perhaps using the Cholesky or
+-eigendecomposition of @eqn{A, A}.} @code{x %*% solve(A,x)}, rather than
+-computing the inverse of @code{A}.
++root @eqn{B, B}
++ with @eqn{A = BB^T, A = BB'}
++ and find the squared length of the solution of
++@eqn{By = x, By = x}
++, perhaps using the Cholesky or eigendecomposition of @eqn{A, A}.
++} @code{x %*% solve(A,x)}, rather than computing the inverse of @code{A}.
+
+ @node Eigenvalues and eigenvectors, Singular value decomposition and determinants, Linear equations and inversion, Matrix facilities
+ @subsection Eigenvalues and eigenvectors