Running examples in 'gaussquad-Ex.R' failed
The error most likely occurred in:

> ### Name: ghermite.h.quadrature
> ### Title: Perform generalized Gauss Hermite quadrature
> ### Aliases: ghermite.h.quadrature
> ### Keywords: math
> 
> ### ** Examples
> 
> ###
> ### this example evaluates the quadrature function for
> ### the generalized Hermite H polynomials.  it computes the integral
> ### of the product for all pairs of orthogonal polynomials
> ### from order 0 to order 10.  the results are compared to
> ### the diagonal matrix of the inner products for the
> ### polynomials.  it also computes the integral of the product
> ### of all pairs of orthonormal polynomials from order 0
> ### to order 10.  the resultant matrix should be an identity matrix
> ###
> ###
> ### set the polynomial parameter
> ###
>     mu <- 1
> ###
> ### set the value for the maximum polynomial order
> ###
>     n <- 10
> ###
> ### maximum order plus 1
> ###
>     np1 <- n + 1
> ###
> ### function to construct the polynomial products by column
> ###
> by.column.products <- function( c, p.list, p.p.list )
+ {
+ ###
+ ### function to construct the polynomial products by row
+ ###
+     by.row.products <- function( r, c, p.list )
+     {
+         row.column.product <- p.list[[r]] * p.list[[c]]
+         return (row.column.product )
+     }
+     np1 <- length( p.list )
+     row.list <- lapply( 1:np1, by.row.products, c, p.list )
+     return( row.list )
+ }
> ###
> ### function construct the polynomial functions by column
> ###
> by.column.functions <- function( c, p.p.products )
+ {
+ ###
+ ### function to construct the polynomial functions by row
+ ###
+     by.row.functions <- function( r, c, p.p.products )
+     {
+         row.column.function <- as.function( p.p.products[[r]][[c]] )
+         return( row.column.function )
+     }
+     np1 <- length( p.p.products[[1]] )
+     row.list <- lapply( 1:np1, by.row.functions, c, p.p.products )
+     return( row.list )
+ }
> ###
> ### function to compute the integral of the polynomials by column
> ###
> by.column.integrals <- function( c, p.p.functions )
+ {
+ ###
+ ### function to compute the integral of the polynomials by row
+ ###
+     by.row.integrals <- function( r, c, p.p.functions )
+     {
+         row.column.integral <- ghermite.h.quadrature(
+             p.p.functions[[r]][[c]], order.np1.rule, mu )
+         return( row.column.integral )
+     }
+     np1 <- length( p.p.functions[[1]] )
+     row.vector <- sapply( 1:np1, by.row.integrals, c, p.p.functions )
+     return( row.vector )
+ }
> ###
> ### construct a list of the generalized Hermite H orthogonal polynomials
> ###
> p.list <- ghermite.h.polynomials( n, mu )
> ###
> ### construct the two dimensional list of pair products
> ### of polynomials
> ###
> p.p.products <- lapply( 1:np1, by.column.products, p.list )
> ###
> ### compute the two dimensional list of functions
> ### corresponding to the polynomial products in
> ### the two dimensional list p.p.products
> ###
> p.p.functions <- lapply( 1:np1, by.column.functions, p.p.products )
> ###
> ### get the rule table for the order np1 polynomial
> ###
> rules <- ghermite.h.quadrature.rules( np1, mu )
> order.np1.rule <- rules[[np1]]
> ###
> ### construct the square symmetric matrix containing
> ### the definite integrals over the default limits
> ### corresponding to the two dimensional list of
> ### polynomial functions
> ###
> p.p.integrals <- sapply( 1:np1, by.column.integrals, p.p.functions )
> ###
> ### construct the diagonal matrix with the inner products
> ### of the orthogonal polynomials on the diagonal
> ###
> p.p.inner.products <- diag( ghermite.h.inner.products( n, mu ) )
> print( "Integral of cross products for the orthogonal polynomials " )
[1] "Integral of cross products for the orthogonal polynomials "
> print( apply( p.p.integrals, 2, round, digits=5 ) )
         [,1]    [,2]     [,3]     [,4]     [,5]     [,6]     [,7]
 [1,] 0.88623 0.00000  0.00000   0.0000    0.000     0.00      0.0
 [2,] 0.00000 5.31736  0.00000   0.0000    0.000     0.00      0.0
 [3,] 0.00000 0.00000 21.26945   0.0000    0.000     0.00      0.0
 [4,] 0.00000 0.00000  0.00000 212.6945    0.000     0.00      0.0
 [5,] 0.00000 0.00000  0.00000   0.0000 1701.556     0.00      0.0
 [6,] 0.00000 0.00000  0.00000   0.0000    0.000 23821.78      0.0
 [7,] 0.00000 0.00000  0.00000   0.0000    0.000     0.00 285861.4
 [8,] 0.00000 0.00000  0.00000   0.0000    0.000     0.00      0.0
 [9,] 0.00000 0.00000  0.00000   0.0000    0.000     0.00      0.0
[10,] 0.00000 0.00000  0.00000   0.0000    0.000     0.00      0.0
[11,] 0.00000 0.00000  0.00000   0.0000    0.000     0.00      0.0
               [,8]          [,9]        [,10]         [,11]
 [1,]       0.00000  0.000000e+00 0.000000e+00  0.000000e+00
 [2,]       0.00000  0.000000e+00 0.000000e+00  0.000000e+00
 [3,]       0.00000  0.000000e+00 0.000000e+00  0.000000e+00
 [4,]       0.00000  0.000000e+00 0.000000e+00  0.000000e+00
 [5,]       0.00000  0.000000e+00 0.000000e+00  0.000000e+00
 [6,]       0.00000  0.000000e+00 0.000000e+00  0.000000e+00
 [7,]       0.00000  0.000000e+00 0.000000e+00  0.000000e+00
 [8,] 5145504.42733  0.000000e+00 0.000000e+00 -2.000000e-05
 [9,]       0.00000  8.232807e+07 0.000000e+00 -8.000000e-05
[10,]       0.00000  0.000000e+00 1.811218e+09  1.010000e-03
[11,]      -0.00002 -8.000000e-05 1.010000e-03  3.622435e+10
> print( apply( p.p.inner.products, 2, round, digits=5 ) )
         [,1]    [,2]     [,3]     [,4]     [,5]     [,6]     [,7]    [,8]
 [1,] 0.88623 0.00000  0.00000   0.0000    0.000     0.00      0.0       0
 [2,] 0.00000 5.31736  0.00000   0.0000    0.000     0.00      0.0       0
 [3,] 0.00000 0.00000 21.26945   0.0000    0.000     0.00      0.0       0
 [4,] 0.00000 0.00000  0.00000 212.6945    0.000     0.00      0.0       0
 [5,] 0.00000 0.00000  0.00000   0.0000 1701.556     0.00      0.0       0
 [6,] 0.00000 0.00000  0.00000   0.0000    0.000 23821.78      0.0       0
 [7,] 0.00000 0.00000  0.00000   0.0000    0.000     0.00 285861.4       0
 [8,] 0.00000 0.00000  0.00000   0.0000    0.000     0.00      0.0 5145504
 [9,] 0.00000 0.00000  0.00000   0.0000    0.000     0.00      0.0       0
[10,] 0.00000 0.00000  0.00000   0.0000    0.000     0.00      0.0       0
[11,] 0.00000 0.00000  0.00000   0.0000    0.000     0.00      0.0       0
          [,9]      [,10]       [,11]
 [1,]        0          0           0
 [2,]        0          0           0
 [3,]        0          0           0
 [4,]        0          0           0
 [5,]        0          0           0
 [6,]        0          0           0
 [7,]        0          0           0
 [8,]        0          0           0
 [9,] 82328071          0           0
[10,]        0 1811217558           0
[11,]        0          0 36224351168
> ###
> ### construct a list of the Hermite H orthonormal polynomials
> ###
> p.list <- ghermite.h.polynomials( n, mu, TRUE )
> ###
> ### construct the two dimensional list of pair products
> ### of polynomials
> ###
> p.p.products <- lapply( 1:np1, by.column.products, p.list )
> ###
> ### compute the two dimensional list of functions
> ### corresponding to the polynomial products in
> ### the two dimensional list p.p.products
> ###
> p.p.functions <- lapply( 1:np1, by.column.functions, p.p.products )
> ###
> ### get the rule table for the order np1 polynomial
> ###
> rules <- ghermite.h.quadrature.rules( np1, mu, TRUE )
> order.np1.rule <- rules[[np1]]
> ###
> ### construct the square symmetric matrix containing
> ### the definite integrals over the default limits
> ### corresponding to the two dimensional list of
> ### polynomial functions
> ###
> p.p.integrals <- sapply( 1:np1, by.column.integrals, p.p.functions )
> ###
> ### display the matrix of integrals
> ###
> 
> print(apply( p.p.integrals, 2, round, digits=5 ) )
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11]
 [1,]    1    0    0    0    0    0    0    0    0     0     0
 [2,]    0    1    0    0    0    0    0    0    0     0     0
 [3,]    0    0    1    0    0    0    0    0    0     0     0
 [4,]    0    0    0    1    0    0    0    0    0     0     0
 [5,]    0    0    0    0    1    0    0    0    0     0     0
 [6,]    0    0    0    0    0    1    0    0    0     0     0
 [7,]    0    0    0    0    0    0    1    0    0     0     0
 [8,]    0    0    0    0    0    0    0    1    0     0     0
 [9,]    0    0    0    0    0    0    0    0    1     0     0
[10,]    0    0    0    0    0    0    0    0    0     1     0
[11,]    0    0    0    0    0    0    0    0    0     0     1
> 
> 
> 
> ")
+ {### ** Examples
+ 
+ ###
+ ### this example evaluates the quadrature function for
+ ### the Hermite H polynomials.  it computes the integral
+ ### of the product for all pairs of orthogonal polynomials
+ ### from order 0 to order 8.  the results are compared to
+ ### the diagonal matrix of the inner products for the
+ ### polynomials.  it also computes the integral of the product
+ ### of all pairs of orthonormal polynomials from order 0
+ ### to order 8.  the resultant matrix should be an identity matrix
+ ###
+ ###
+ ### set the value for the maximum polynomial order
+ ###
+     n <- 8
+ ###
+ ### maximum order plus 1
+ ###
+     np1 <- n + 1
+ ###
+ ### function to construct the polynomial products by column
+ ###
+ by.column.products <- function( c, p.list, p.p.list )
+ {
+ ###
+ ### function to construct the polynomial products by row
+ ###
+     by.row.products <- function( r, c, p.list )
+     {
+         row.column.product <- p.list[[r]] * p.list[[c]]
+         return (row.column.product )
+     }
+     np1 <- length( p.list )
+     row.list <- lapply( 1:np1, by.row.products, c, p.list )
+     return( row.list )
+ }
+ ###
+ ### function construct the polynomial functions by column
+ ###
+ by.column.functions <- function( c, p.p.products )
+ {
+ ###
+ ### function to construct the polynomial functions by row
+ ###
+     by.row.functions <- function( r, c, p.p.products )
+     {
+         row.column.function <- as.function( p.p.products[[r]][[c]] )
+         return( row.column.function )
+     }
+     np1 <- length( p.p.products[[1]] )
+     row.list <- lapply( 1:np1, by.row.functions, c, p.p.products )
+     return( row.list )
+ }
+ ###
+ ### function to compute the integral of the polynomials by column
+ ###
+ by.column.integrals <- function( c, p.p.functions )
+ {
+ ###
+ ### function to compute the integral of the polynomials by row
+ ###
+     by.row.integrals <- function( r, c, p.p.functions )
+     {
+         row.column.integral <- hermite.h.quadrature(
+             p.p.functions[[r]][[c]], order.np1.rule )
+         return( row.column.integral )
+     }
+     np1 <- length( p.p.functions[[1]] )
+     row.vector <- sapply( 1:np1, by.row.integrals, c, p.p.functions )
+     return( row.vector )
+ }
+ ###
+ ### construct a list of the Hermite H orthogonal polynomials
+ ###
+ p.list <- hermite.h.polynomials( n )
+ ###
+ ### construct the two dimensional list of pair products
+ ### of polynomials
+ ###
+ p.p.products <- lapply( 1:np1, by.column.products, p.list )
+ ###
+ ### compute the two dimensional list of functions
+ ### corresponding to the polynomial products in
+ ### the two dimensional list p.p.products
+ ###
+ p.p.functions <- lapply( 1:np1, by.column.functions, p.p.products )
+ ###
+ ### get the rule table for the order np1 polynomial
+ ###
+ rules <- hermite.h.quadrature.rules( np1 )
+ order.np1.rule <- rules[[np1]]
+ ###
+ ### construct the square symmetric matrix containing
+ ### the definite integrals over the default limits
+ ### corresponding to the two dimensional list of
+ ### polynomial functions
+ ###
+ p.p.integrals <- sapply( 1:np1, by.column.integrals, p.p.functions )
+ ###
+ ### construct the diagonal matrix with the inner products
+ ### of the orthogonal polynomials on the diagonal
+ ###
+ p.p.inner.products <- diag( hermite.h.inner.products( n ) )
+ print( "Integral of cross products for the orthogonal polynomials " )
Error: unexpected symbol in:
"p.p.inner.products <- diag( hermite.h.inner.products( n ) )
print( "Integral"
Execution halted