Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/share/zoneinfo/America/Indiana/Marengo
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/share/zoneinfo/America/Indiana/Marengo
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/share/zoneinfo/America/Indiana/Tell_City
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/share/zoneinfo/America/Indiana/Tell_City
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/share/zoneinfo/America/Indiana/Vincennes
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/share/zoneinfo/America/Indiana/Vincennes
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/share/zoneinfo/America/Indiana/Indianapolis
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/share/zoneinfo/America/Indiana/Indianapolis
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/share/zoneinfo/America/Indiana/Vevay
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/share/zoneinfo/America/Indiana/Vevay
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/share/zoneinfo/America/Indiana/Knox
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/share/zoneinfo/America/Indiana/Knox
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/share/zoneinfo/America/Indiana/Winamac
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/share/zoneinfo/America/Indiana/Winamac
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/share/zoneinfo/America/Indiana/Petersburg
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/share/zoneinfo/America/Indiana/Petersburg
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/share/zoneinfo/America/Kentucky/Monticello
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/share/zoneinfo/America/Kentucky/Monticello
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/share/zoneinfo/America/Kentucky/Louisville
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/share/zoneinfo/America/Kentucky/Louisville
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/share/zoneinfo/America/Argentina/Catamarca
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/share/zoneinfo/America/Argentina/Catamarca
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/share/zoneinfo/America/Argentina/Tucuman
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/share/zoneinfo/America/Argentina/Tucuman
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/share/zoneinfo/America/Argentina/Mendoza
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/share/zoneinfo/America/Argentina/Mendoza
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/share/zoneinfo/America/Argentina/San_Luis
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/share/zoneinfo/America/Argentina/San_Luis
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/share/zoneinfo/America/Argentina/Buenos_Aires
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/share/zoneinfo/America/Argentina/Buenos_Aires
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/share/zoneinfo/America/Argentina/San_Juan
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/share/zoneinfo/America/Argentina/San_Juan
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/share/zoneinfo/America/Argentina/Ushuaia
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/share/zoneinfo/America/Argentina/Ushuaia
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/share/zoneinfo/America/Argentina/La_Rioja
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/share/zoneinfo/America/Argentina/La_Rioja
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/share/zoneinfo/America/Argentina/Salta
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/share/zoneinfo/America/Argentina/Salta
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/share/zoneinfo/America/Argentina/Jujuy
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/share/zoneinfo/America/Argentina/Jujuy
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/share/zoneinfo/America/Argentina/Rio_Gallegos
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/share/zoneinfo/America/Argentina/Rio_Gallegos
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/share/zoneinfo/America/Argentina/ComodRivadavia
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/share/zoneinfo/America/Argentina/ComodRivadavia
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/share/zoneinfo/America/Argentina/Cordoba
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/share/zoneinfo/America/Argentina/Cordoba
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/share/zoneinfo/America/North_Dakota/Beulah
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/share/zoneinfo/America/North_Dakota/Beulah
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/share/zoneinfo/America/North_Dakota/Center
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/share/zoneinfo/America/North_Dakota/Center
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/share/zoneinfo/America/North_Dakota/New_Salem
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/share/zoneinfo/America/North_Dakota/New_Salem
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/tests/Examples/splines-Ex.Rout.save
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/tests/Examples/splines-Ex.Rout.save	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/tests/Examples/splines-Ex.Rout.save	(revision 2477)
@@ -0,0 +1,594 @@
+
+R version 3.3.2 RC (2016-10-26 r71594) -- "Sincere Pumpkin Patch"
+Copyright (C) 2016 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
+
+R is free software and comes with ABSOLUTELY NO WARRANTY.
+You are welcome to redistribute it under certain conditions.
+Type 'license()' or 'licence()' for distribution details.
+
+  Natural language support but running in an English locale
+
+R is a collaborative project with many contributors.
+Type 'contributors()' for more information and
+'citation()' on how to cite R or R packages in publications.
+
+Type 'demo()' for some demos, 'help()' for on-line help, or
+'help.start()' for an HTML browser interface to help.
+Type 'q()' to quit R.
+
+> pkgname <- "splines"
+> source(file.path(R.home("share"), "R", "examples-header.R"))
+> options(warn = 1)
+> library('splines')
+> 
+> base::assign(".oldSearch", base::search(), pos = 'CheckExEnv')
+> cleanEx()
+> nameEx("asVector")
+> ### * asVector
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: asVector
+> ### Title: Coerce an Object to a Vector
+> ### Aliases: asVector
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> require(stats)
+> ispl <- interpSpline( weight ~ height,  women )
+> pred <- predict(ispl)
+> class(pred)
+[1] "xyVector"
+> utils::str(pred)
+List of 2
+ $ x: num [1:51] 58 58.3 58.6 58.8 59.1 ...
+ $ y: num [1:51] 115 115 116 117 117 ...
+ - attr(*, "class")= chr "xyVector"
+> asVector(pred)
+ [1] 115.0000 115.4908 116.0170 116.6137 117.3153 118.1214 118.9894 119.8747
+ [9] 120.7384 121.5787 122.4078 123.2380 124.0759 124.9181 125.7601 126.5980
+[17] 127.4340 128.2735 129.1220 129.9792 130.8301 131.6572 132.4454 133.2228
+[25] 134.0528 135.0000 136.1000 137.2727 138.4090 139.4026 140.2416 141.0276
+[33] 141.8690 142.8564 143.9707 145.1507 146.3356 147.4868 148.6046 149.6935
+[41] 150.7604 151.8353 152.9613 154.1817 155.5178 156.9329 158.3808 159.8173
+[49] 161.2269 162.6180 164.0000
+> 
+> 
+> 
+> cleanEx()
+> nameEx("backSpline")
+> ### * backSpline
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: backSpline
+> ### Title: Monotone Inverse Spline
+> ### Aliases: backSpline
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> ispl <- interpSpline( women$height, women$weight )
+> bspl <- backSpline( ispl )
+> plot( bspl )                   # plots over the range of the knots
+> points( women$weight, women$height )
+> 
+> 
+> 
+> cleanEx()
+> nameEx("bs")
+> ### * bs
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: bs
+> ### Title: B-Spline Basis for Polynomial Splines
+> ### Aliases: bs
+> ### Keywords: smooth
+> 
+> ### ** Examples
+> 
+> require(stats); require(graphics)
+> bs(women$height, df = 5)
+                 1           2           3            4           5
+ [1,] 0.000000e+00 0.000000000 0.000000000 0.000000e+00 0.000000000
+ [2,] 4.534439e-01 0.059857872 0.001639942 0.000000e+00 0.000000000
+ [3,] 5.969388e-01 0.203352770 0.013119534 0.000000e+00 0.000000000
+ [4,] 5.338010e-01 0.376366618 0.044278426 0.000000e+00 0.000000000
+ [5,] 3.673469e-01 0.524781341 0.104956268 0.000000e+00 0.000000000
+ [6,] 2.001640e-01 0.595025510 0.204719388 9.110787e-05 0.000000000
+ [7,] 9.110787e-02 0.566326531 0.336734694 5.830904e-03 0.000000000
+ [8,] 3.125000e-02 0.468750000 0.468750000 3.125000e-02 0.000000000
+ [9,] 5.830904e-03 0.336734694 0.566326531 9.110787e-02 0.000000000
+[10,] 9.110787e-05 0.204719388 0.595025510 2.001640e-01 0.000000000
+[11,] 0.000000e+00 0.104956268 0.524781341 3.673469e-01 0.002915452
+[12,] 0.000000e+00 0.044278426 0.376366618 5.338010e-01 0.045553936
+[13,] 0.000000e+00 0.013119534 0.203352770 5.969388e-01 0.186588921
+[14,] 0.000000e+00 0.001639942 0.059857872 4.534439e-01 0.485058309
+[15,] 0.000000e+00 0.000000000 0.000000000 0.000000e+00 1.000000000
+attr(,"degree")
+[1] 3
+attr(,"knots")
+33.33333% 66.66667% 
+ 62.66667  67.33333 
+attr(,"Boundary.knots")
+[1] 58 72
+attr(,"intercept")
+[1] FALSE
+attr(,"class")
+[1] "bs"     "basis"  "matrix"
+> summary(fm1 <- lm(weight ~ bs(height, df = 5), data = women))
+
+Call:
+lm(formula = weight ~ bs(height, df = 5), data = women)
+
+Residuals:
+     Min       1Q   Median       3Q      Max 
+-0.31764 -0.13441  0.03922  0.11096  0.35086 
+
+Coefficients:
+                    Estimate Std. Error t value Pr(>|t|)    
+(Intercept)         114.8799     0.2167 530.146  < 2e-16 ***
+bs(height, df = 5)1   3.4657     0.4595   7.543 3.53e-05 ***
+bs(height, df = 5)2  13.0300     0.3965  32.860 1.10e-10 ***
+bs(height, df = 5)3  27.6161     0.4571  60.415 4.70e-13 ***
+bs(height, df = 5)4  40.8481     0.3866 105.669 3.09e-15 ***
+bs(height, df = 5)5  49.1296     0.3090 158.979  < 2e-16 ***
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Residual standard error: 0.2276 on 9 degrees of freedom
+Multiple R-squared:  0.9999,	Adjusted R-squared:  0.9998 
+F-statistic: 1.298e+04 on 5 and 9 DF,  p-value: < 2.2e-16
+
+> 
+> ## example of safe prediction
+> plot(women, xlab = "Height (in)", ylab = "Weight (lb)")
+> ht <- seq(57, 73, length.out = 200)
+> lines(ht, predict(fm1, data.frame(height = ht)))
+Warning in bs(height, degree = 3L, knots = c(62.6666666666667, 67.3333333333333 :
+  some 'x' values beyond boundary knots may cause ill-conditioned bases
+> ## Don't show: 
+> ## Consistency:
+> x <- c(1:3, 5:6)
+> stopifnot(identical(bs(x), bs(x, df = 3)),
++           identical(bs(x, df = 4), bs(x, df = 4, knots = NULL)), # not true till 2.15.2
++           !is.null(kk <- attr(bs(x), "knots")), # not true till 1.5.1
++           length(kk) == 0)
+> ## End(Don't show)
+> 
+> 
+> cleanEx()
+> nameEx("interpSpline")
+> ### * interpSpline
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: interpSpline
+> ### Title: Create an Interpolation Spline
+> ### Aliases: interpSpline
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> require(graphics); require(stats)
+> ispl <- interpSpline( women$height, women$weight )
+> ispl2 <- interpSpline( weight ~ height,  women )
+> # ispl and ispl2 should be the same
+> plot( predict( ispl, seq( 55, 75, length.out = 51 ) ), type = "l" )
+> points( women$height, women$weight )
+> plot( ispl )    # plots over the range of the knots
+> points( women$height, women$weight )
+> splineKnots( ispl )
+ [1] 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
+> 
+> 
+> 
+> cleanEx()
+> nameEx("ns")
+> ### * ns
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: ns
+> ### Title: Generate a Basis Matrix for Natural Cubic Splines
+> ### Aliases: ns
+> ### Keywords: smooth
+> 
+> ### ** Examples
+> 
+> require(stats); require(graphics)
+> ns(women$height, df = 5)
+                 1            2           3          4             5
+ [1,] 0.000000e+00 0.000000e+00  0.00000000 0.00000000  0.0000000000
+ [2,] 7.592323e-03 0.000000e+00 -0.08670223 0.26010669 -0.1734044626
+ [3,] 6.073858e-02 0.000000e+00 -0.15030440 0.45091320 -0.3006088020
+ [4,] 2.047498e-01 6.073858e-05 -0.16778345 0.50335034 -0.3355668952
+ [5,] 4.334305e-01 1.311953e-02 -0.13244035 0.39732106 -0.2648807067
+ [6,] 6.256681e-01 8.084305e-02 -0.07399720 0.22199159 -0.1479943948
+ [7,] 6.477162e-01 2.468416e-01 -0.02616007 0.07993794 -0.0532919575
+ [8,] 4.791667e-01 4.791667e-01  0.01406302 0.02031093 -0.0135406187
+ [9,] 2.468416e-01 6.477162e-01  0.09733619 0.02286023 -0.0152401533
+[10,] 8.084305e-02 6.256681e-01  0.27076826 0.06324188 -0.0405213106
+[11,] 1.311953e-02 4.334305e-01  0.48059836 0.12526031 -0.0524087186
+[12,] 6.073858e-05 2.047498e-01  0.59541597 0.19899261  0.0007809246
+[13,] 0.000000e+00 6.073858e-02  0.50097182 0.27551020  0.1627793975
+[14,] 0.000000e+00 7.592323e-03  0.22461127 0.35204082  0.4157555879
+[15,] 0.000000e+00 0.000000e+00 -0.14285714 0.42857143  0.7142857143
+attr(,"degree")
+[1] 3
+attr(,"knots")
+ 20%  40%  60%  80% 
+60.8 63.6 66.4 69.2 
+attr(,"Boundary.knots")
+[1] 58 72
+attr(,"intercept")
+[1] FALSE
+attr(,"class")
+[1] "ns"     "basis"  "matrix"
+> summary(fm1 <- lm(weight ~ ns(height, df = 5), data = women))
+
+Call:
+lm(formula = weight ~ ns(height, df = 5), data = women)
+
+Residuals:
+     Min       1Q   Median       3Q      Max 
+-0.38333 -0.12585  0.07083  0.15401  0.30426 
+
+Coefficients:
+                    Estimate Std. Error t value Pr(>|t|)    
+(Intercept)         114.7447     0.2338  490.88  < 2e-16 ***
+ns(height, df = 5)1  15.9474     0.3699   43.12 9.69e-12 ***
+ns(height, df = 5)2  25.1695     0.4323   58.23 6.55e-13 ***
+ns(height, df = 5)3  33.2582     0.3541   93.93 8.91e-15 ***
+ns(height, df = 5)4  50.7894     0.6062   83.78 2.49e-14 ***
+ns(height, df = 5)5  45.0363     0.2784  161.75  < 2e-16 ***
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Residual standard error: 0.2645 on 9 degrees of freedom
+Multiple R-squared:  0.9998,	Adjusted R-squared:  0.9997 
+F-statistic:  9609 on 5 and 9 DF,  p-value: < 2.2e-16
+
+> 
+> ## To see what knots were selected
+> attr(terms(fm1), "predvars")
+list(weight, ns(height, knots = c(60.8, 63.6, 66.4, 69.2), Boundary.knots = c(58, 
+72), intercept = FALSE))
+> 
+> ## example of safe prediction
+> plot(women, xlab = "Height (in)", ylab = "Weight (lb)")
+> ht <- seq(57, 73, length.out = 200)
+> lines(ht, predict(fm1, data.frame(height = ht)))
+> ## Don't show: 
+> ## Consistency:
+> x <- c(1:3, 5:6)
+> stopifnot(identical(ns(x), ns(x, df = 1)),
++           identical(ns(x, df = 2), ns(x, df = 2, knots = NULL)), # not true till 2.15.2
++           !is.null(kk <- attr(ns(x), "knots")), # not true till 1.5.1
++           length(kk) == 0)
+> ## End(Don't show)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("periodicSpline")
+> ### * periodicSpline
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: periodicSpline
+> ### Title: Create a Periodic Interpolation Spline
+> ### Aliases: periodicSpline
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> require(graphics); require(stats)
+> xx <- seq( -pi, pi, length.out = 16 )[-1]
+> yy <- sin( xx )
+> frm <- data.frame( xx, yy )
+> pispl <- periodicSpline( xx, yy, period = 2 * pi)
+> pispl2 <- periodicSpline( yy ~ xx, frm, period = 2 * pi )
+> stopifnot(all.equal(pispl, pispl2))  # pispl and pispl2 are the same
+> 
+> plot( pispl )          # displays over one period
+> points( yy ~ xx, col = "brown")
+> plot( predict( pispl, seq(-3*pi, 3*pi, length.out = 101) ), type = "l" )
+> 
+> 
+> 
+> cleanEx()
+> nameEx("polySpline")
+> ### * polySpline
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: polySpline
+> ### Title: Piecewise Polynomial Spline Representation
+> ### Aliases: polySpline as.polySpline
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> ispl <- polySpline(interpSpline( weight ~ height,  women, bSpline = TRUE))
+> print( ispl )   # print the piecewise polynomial representation
+polynomial representation of spline for weight ~ height
+   constant   linear   quadratic       cubic
+58      115 1.731918  0.00000000  0.26808191
+59      117 2.536164  0.80424574 -0.34040957
+60      120 3.123427 -0.21698298  0.09355638
+61      123 2.970130  0.06368616 -0.03381595
+62      126 2.996054 -0.03776168  0.04170740
+63      129 3.045653  0.08736054 -0.13301367
+64      132 2.821333 -0.31168048  0.49034728
+65      135 3.669014  1.15936136 -0.82837545
+66      139 3.502610 -1.32576498  0.82315452
+67      142 3.320544  1.14369857 -0.46424262
+68      146 4.215213 -0.24902928  0.03381595
+69      150 3.818603 -0.14758144  0.32897883
+70      154 4.510376  0.83935505 -0.34973127
+71      159 5.139893 -0.20983876  0.06994625
+72      164 4.930054  0.00000000  0.00000000
+> plot( ispl )    # plots over the range of the knots
+> points( women$height, women$weight )
+> 
+> 
+> 
+> cleanEx()
+> nameEx("predict.bSpline")
+> ### * predict.bSpline
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: predict.bSpline
+> ### Title: Evaluate a Spline at New Values of x
+> ### Aliases: predict.bSpline predict.nbSpline predict.pbSpline
+> ###   predict.npolySpline predict.ppolySpline
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> require(graphics); require(stats)
+> ispl <- interpSpline( weight ~ height,  women )
+> opar <- par(mfrow = c(2, 2), las = 1)
+> plot(predict(ispl, nseg = 201),     # plots over the range of the knots
++      main = "Original data with interpolating spline", type = "l",
++      xlab = "height", ylab = "weight")
+> points(women$height, women$weight, col = 4)
+> plot(predict(ispl, nseg = 201, deriv = 1),
++      main = "First derivative of interpolating spline", type = "l",
++      xlab = "height", ylab = "weight")
+> plot(predict(ispl, nseg = 201, deriv = 2),
++      main = "Second derivative of interpolating spline", type = "l",
++      xlab = "height", ylab = "weight")
+> plot(predict(ispl, nseg = 401, deriv = 3),
++      main = "Third derivative of interpolating spline", type = "l",
++      xlab = "height", ylab = "weight")
+> par(opar)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("predict.bs")
+> ### * predict.bs
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: predict.bs
+> ### Title: Evaluate a Spline Basis
+> ### Aliases: predict.bs predict.ns
+> ### Keywords: smooth
+> 
+> ### ** Examples
+> 
+> require(stats)
+> basis <- ns(women$height, df = 5)
+> newX <- seq(58, 72, length.out = 51)
+> # evaluate the basis at the new data
+> predict(basis, newX)
+                 1            2            3          4            5
+ [1,] 0.0000000000 0.0000000000  0.000000000 0.00000000  0.000000000
+ [2,] 0.0001666667 0.0000000000 -0.025270112 0.07581034 -0.050540224
+ [3,] 0.0013333333 0.0000000000 -0.050033132 0.15009940 -0.100066264
+ [4,] 0.0045000000 0.0000000000 -0.073781966 0.22134590 -0.147563933
+ [5,] 0.0106666667 0.0000000000 -0.096009523 0.28802857 -0.192019047
+ [6,] 0.0208333333 0.0000000000 -0.116208710 0.34862613 -0.232417420
+ [7,] 0.0360000000 0.0000000000 -0.133872434 0.40161730 -0.267744868
+ [8,] 0.0571666667 0.0000000000 -0.148493603 0.44548081 -0.296987205
+ [9,] 0.0853333333 0.0000000000 -0.159565123 0.47869537 -0.319130247
+[10,] 0.1215000000 0.0000000000 -0.166579904 0.49973971 -0.333159807
+[11,] 0.1666666667 0.0000000000 -0.169030851 0.50709255 -0.338061702
+[12,] 0.2211666667 0.0001666667 -0.166622161 0.49986648 -0.333244323
+[13,] 0.2826666667 0.0013333333 -0.159903185 0.47970955 -0.319806370
+[14,] 0.3481666667 0.0045000000 -0.149634561 0.44890368 -0.299269122
+[15,] 0.4146666667 0.0106666667 -0.136576928 0.40973078 -0.273153855
+[16,] 0.4791666667 0.0208333333 -0.121490924 0.36447277 -0.242981848
+[17,] 0.5386666667 0.0360000000 -0.105137189 0.31541157 -0.210274379
+[18,] 0.5901666667 0.0571666667 -0.088276362 0.26482909 -0.176552724
+[19,] 0.6306666667 0.0853333333 -0.071669081 0.21500724 -0.143338162
+[20,] 0.6571666667 0.1215000000 -0.056075985 0.16822795 -0.112151970
+[21,] 0.6666666667 0.1666666667 -0.042257713 0.12677314 -0.084515425
+[22,] 0.6571666667 0.2211666667 -0.030651111 0.09245333 -0.061635555
+[23,] 0.6306666667 0.2826666667 -0.020397854 0.06519356 -0.043462374
+[24,] 0.5901666667 0.3481666667 -0.010315824 0.04444747 -0.029631648
+[25,] 0.5386666667 0.4146666667  0.000777096 0.02966871 -0.019779141
+[26,] 0.4791666667 0.4791666667  0.014063024 0.02031093 -0.013540619
+[27,] 0.4146666667 0.5386666667  0.030724078 0.01582777 -0.010551844
+[28,] 0.3481666667 0.5901666667  0.051942375 0.01567287 -0.010448583
+[29,] 0.2826666667 0.6306666667  0.078900034 0.01929990 -0.012866600
+[30,] 0.2211666667 0.6571666667  0.112779171 0.02616249 -0.017441658
+[31,] 0.1666666667 0.6666666667  0.154761905 0.03571429 -0.023809524
+[32,] 0.1215000000 0.6571666667  0.205345238 0.04746429 -0.031476190
+[33,] 0.0853333333 0.6306666667  0.262285714 0.06114286 -0.039428571
+[34,] 0.0571666667 0.5901666667  0.322654762 0.07653571 -0.046523810
+[35,] 0.0360000000 0.5386666667  0.383523810 0.09342857 -0.051619048
+[36,] 0.0208333333 0.4791666667  0.441964286 0.11160714 -0.053571429
+[37,] 0.0106666667 0.4146666667  0.495047619 0.13085714 -0.051238095
+[38,] 0.0045000000 0.3481666667  0.539845238 0.15096429 -0.043476190
+[39,] 0.0013333333 0.2826666667  0.573428571 0.17171429 -0.029142857
+[40,] 0.0001666667 0.2211666667  0.592869048 0.19289286 -0.007095238
+[41,] 0.0000000000 0.1666666667  0.595238095 0.21428571  0.023809524
+[42,] 0.0000000000 0.1215000000  0.578428571 0.23571429  0.064357143
+[43,] 0.0000000000 0.0853333333  0.543619048 0.25714286  0.113904762
+[44,] 0.0000000000 0.0571666667  0.492809524 0.27857143  0.171452381
+[45,] 0.0000000000 0.0360000000  0.428000000 0.30000000  0.236000000
+[46,] 0.0000000000 0.0208333333  0.351190476 0.32142857  0.306547619
+[47,] 0.0000000000 0.0106666667  0.264380952 0.34285714  0.382095238
+[48,] 0.0000000000 0.0045000000  0.169571429 0.36428571  0.461642857
+[49,] 0.0000000000 0.0013333333  0.068761905 0.38571429  0.544190476
+[50,] 0.0000000000 0.0001666667 -0.036047619 0.40714286  0.628738095
+[51,] 0.0000000000 0.0000000000 -0.142857143 0.42857143  0.714285714
+attr(,"degree")
+[1] 3
+attr(,"knots")
+ 20%  40%  60%  80% 
+60.8 63.6 66.4 69.2 
+attr(,"Boundary.knots")
+[1] 58 72
+attr(,"intercept")
+[1] FALSE
+attr(,"class")
+[1] "ns"     "basis"  "matrix"
+> 
+> 
+> 
+> cleanEx()
+> nameEx("splineDesign")
+> ### * splineDesign
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: splineDesign
+> ### Title: Design Matrix for B-splines
+> ### Aliases: splineDesign spline.des
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> splineDesign(knots = 1:10, x = 4:7)
+          [,1]      [,2]      [,3]      [,4]      [,5]      [,6]
+[1,] 0.1666667 0.6666667 0.1666667 0.0000000 0.0000000 0.0000000
+[2,] 0.0000000 0.1666667 0.6666667 0.1666667 0.0000000 0.0000000
+[3,] 0.0000000 0.0000000 0.1666667 0.6666667 0.1666667 0.0000000
+[4,] 0.0000000 0.0000000 0.0000000 0.1666667 0.6666667 0.1666667
+> splineDesign(knots = 1:10, x = 4:7, deriv = 1)
+     [,1] [,2] [,3] [,4] [,5] [,6]
+[1,] -0.5  0.0  0.5  0.0  0.0  0.0
+[2,]  0.0 -0.5  0.0  0.5  0.0  0.0
+[3,]  0.0  0.0 -0.5  0.0  0.5  0.0
+[4,]  0.0  0.0  0.0 -0.5  0.0  0.5
+> ## visualize band structure
+> 
+> knots <- c(1,1.8,3:5,6.5,7,8.1,9.2,10)  # 10 => 10-4 = 6 Basis splines
+> x <- seq(min(knots)-1, max(knots)+1, length.out = 501)
+> bb <- splineDesign(knots, x = x, outer.ok = TRUE)
+> 
+> plot(range(x), c(0,1), type = "n", xlab = "x", ylab = "",
++      main =  "B-splines - sum to 1 inside inner knots")
+> mtext(expression(B[j](x) *"  and "* sum(B[j](x), j == 1, 6)), adj = 0)
+> abline(v = knots, lty = 3, col = "light gray")
+> abline(v = knots[c(4,length(knots)-3)], lty = 3, col = "gray10")
+> lines(x, rowSums(bb), col = "gray", lwd = 2)
+> matlines(x, bb, ylim = c(0,1), lty = 1)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("splineKnots")
+> ### * splineKnots
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: splineKnots
+> ### Title: Knot Vector from a Spline
+> ### Aliases: splineKnots
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> ispl <- interpSpline( weight ~ height, women )
+> splineKnots( ispl )
+ [1] 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
+> 
+> 
+> 
+> cleanEx()
+> nameEx("splineOrder")
+> ### * splineOrder
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: splineOrder
+> ### Title: Determine the Order of a Spline
+> ### Aliases: splineOrder
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> splineOrder( interpSpline( weight ~ height, women ) )
+[1] 4
+> 
+> 
+> 
+> cleanEx()
+> nameEx("xyVector")
+> ### * xyVector
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: xyVector
+> ### Title: Construct an 'xyVector' Object
+> ### Aliases: xyVector
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> require(stats); require(graphics)
+> ispl <- interpSpline( weight ~ height, women )
+> weights <- predict( ispl, seq( 55, 75, length.out = 51 ))
+> class( weights )
+[1] "xyVector"
+> plot( weights, type = "l", xlab = "height", ylab = "weight" )
+> points( women$height, women$weight )
+> weights
+$x
+ [1] 55.0 55.4 55.8 56.2 56.6 57.0 57.4 57.8 58.2 58.6 59.0 59.4 59.8 60.2 60.6
+[16] 61.0 61.4 61.8 62.2 62.6 63.0 63.4 63.8 64.2 64.6 65.0 65.4 65.8 66.2 66.6
+[31] 67.0 67.4 67.8 68.2 68.6 69.0 69.4 69.8 70.2 70.6 71.0 71.4 71.8 72.2 72.6
+[46] 73.0 73.4 73.8 74.2 74.6 75.0
+
+$y
+ [1] 109.8042 110.4970 111.1898 111.8825 112.5753 113.2681 113.9608 114.6536
+ [9] 115.3485 116.0971 117.0000 118.1214 119.3694 120.6168 121.8162 123.0000
+[17] 124.1961 125.3995 126.5980 127.7930 129.0000 130.2237 131.4243 132.5557
+[25] 133.6865 135.0000 136.6001 138.2531 139.6541 140.8021 142.0000 143.4815
+[33] 145.1507 146.8334 148.4468 150.0000 151.5249 153.1289 154.9329 156.9329
+[41] 159.0000 161.0269 163.0134 164.9860 166.9580 168.9301 170.9021 172.8741
+[49] 174.8461 176.8181 178.7902
+
+attr(,"class")
+[1] "xyVector"
+> 
+> 
+> 
+> ### * <FOOTER>
+> ###
+> options(digits = 7L)
+> base::cat("Time elapsed: ", proc.time() - base::get("ptime", pos = 'CheckExEnv'),"\n")
+Time elapsed:  0.102 0.003 0.106 0 0 
+> grDevices::dev.off()
+null device 
+          1 
+> ###
+> ### Local variables: ***
+> ### mode: outline-minor ***
+> ### outline-regexp: "\\(> \\)?### [*]+" ***
+> ### End: ***
+> quit('no')
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/tests/Examples/stats-Ex.Rout.save
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/tests/Examples/stats-Ex.Rout.save	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/tests/Examples/stats-Ex.Rout.save	(revision 2477)
@@ -0,0 +1,18061 @@
+
+R version 3.3.2 RC (2016-10-26 r71594) -- "Sincere Pumpkin Patch"
+Copyright (C) 2016 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
+
+R is free software and comes with ABSOLUTELY NO WARRANTY.
+You are welcome to redistribute it under certain conditions.
+Type 'license()' or 'licence()' for distribution details.
+
+  Natural language support but running in an English locale
+
+R is a collaborative project with many contributors.
+Type 'contributors()' for more information and
+'citation()' on how to cite R or R packages in publications.
+
+Type 'demo()' for some demos, 'help()' for on-line help, or
+'help.start()' for an HTML browser interface to help.
+Type 'q()' to quit R.
+
+> pkgname <- "stats"
+> source(file.path(R.home("share"), "R", "examples-header.R"))
+> options(warn = 1)
+> library('stats')
+> 
+> base::assign(".oldSearch", base::search(), pos = 'CheckExEnv')
+> cleanEx()
+> nameEx("AIC")
+> ### * AIC
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: AIC
+> ### Title: Akaike's An Information Criterion
+> ### Aliases: AIC BIC
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> lm1 <- lm(Fertility ~ . , data = swiss)
+> AIC(lm1)
+[1] 326.0716
+> stopifnot(all.equal(AIC(lm1),
++                     AIC(logLik(lm1))))
+> BIC(lm1)
+[1] 339.0226
+> 
+> lm2 <- update(lm1, . ~ . -Examination)
+> AIC(lm1, lm2)
+    df      AIC
+lm1  7 326.0716
+lm2  6 325.2408
+> BIC(lm1, lm2)
+    df      BIC
+lm1  7 339.0226
+lm2  6 336.3417
+> 
+> 
+> 
+> cleanEx()
+> nameEx("ARMAacf")
+> ### * ARMAacf
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: ARMAacf
+> ### Title: Compute Theoretical ACF for an ARMA Process
+> ### Aliases: ARMAacf
+> ### Keywords: ts
+> 
+> ### ** Examples
+> 
+> ARMAacf(c(1.0, -0.25), 1.0, lag.max = 10)
+          0           1           2           3           4           5 
+1.000000000 0.875000000 0.625000000 0.406250000 0.250000000 0.148437500 
+          6           7           8           9          10 
+0.085937500 0.048828125 0.027343750 0.015136719 0.008300781 
+> 
+> ## Example from Brockwell & Davis (1991, pp.92-4)
+> ## answer: 2^(-n) * (32/3 + 8 * n) /(32/3)
+> n <- 1:10
+> a.n <- 2^(-n) * (32/3 + 8 * n) /(32/3)
+> (A.n <- ARMAacf(c(1.0, -0.25), 1.0, lag.max = 10))
+          0           1           2           3           4           5 
+1.000000000 0.875000000 0.625000000 0.406250000 0.250000000 0.148437500 
+          6           7           8           9          10 
+0.085937500 0.048828125 0.027343750 0.015136719 0.008300781 
+> stopifnot(all.equal(unname(A.n), c(1, a.n)))
+> 
+> ARMAacf(c(1.0, -0.25), 1.0, lag.max = 10, pacf = TRUE)
+ [1]  0.8750000 -0.6000000  0.3750000 -0.2727273  0.2142857 -0.1764706
+ [7]  0.1500000 -0.1304348  0.1153846 -0.1034483
+> zapsmall(ARMAacf(c(1.0, -0.25), lag.max = 10, pacf = TRUE))
+ [1]  0.80 -0.25  0.00  0.00  0.00  0.00  0.00  0.00  0.00  0.00
+> 
+> ## Cov-Matrix of length-7 sub-sample of AR(1) example:
+> toeplitz(ARMAacf(0.8, lag.max = 7))
+          [,1]     [,2]    [,3]   [,4]   [,5]    [,6]     [,7]      [,8]
+[1,] 1.0000000 0.800000 0.64000 0.5120 0.4096 0.32768 0.262144 0.2097152
+[2,] 0.8000000 1.000000 0.80000 0.6400 0.5120 0.40960 0.327680 0.2621440
+[3,] 0.6400000 0.800000 1.00000 0.8000 0.6400 0.51200 0.409600 0.3276800
+[4,] 0.5120000 0.640000 0.80000 1.0000 0.8000 0.64000 0.512000 0.4096000
+[5,] 0.4096000 0.512000 0.64000 0.8000 1.0000 0.80000 0.640000 0.5120000
+[6,] 0.3276800 0.409600 0.51200 0.6400 0.8000 1.00000 0.800000 0.6400000
+[7,] 0.2621440 0.327680 0.40960 0.5120 0.6400 0.80000 1.000000 0.8000000
+[8,] 0.2097152 0.262144 0.32768 0.4096 0.5120 0.64000 0.800000 1.0000000
+> 
+> 
+> 
+> cleanEx()
+> nameEx("ARMAtoMA")
+> ### * ARMAtoMA
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: ARMAtoMA
+> ### Title: Convert ARMA Process to Infinite MA Process
+> ### Aliases: ARMAtoMA
+> ### Keywords: ts
+> 
+> ### ** Examples
+> 
+> ARMAtoMA(c(1.0, -0.25), 1.0, 10)
+ [1] 2.00000000 1.75000000 1.25000000 0.81250000 0.50000000 0.29687500
+ [7] 0.17187500 0.09765625 0.05468750 0.03027344
+> ## Example from Brockwell & Davis (1991, p.92)
+> ## answer (1 + 3*n)*2^(-n)
+> n <- 1:10; (1 + 3*n)*2^(-n)
+ [1] 2.00000000 1.75000000 1.25000000 0.81250000 0.50000000 0.29687500
+ [7] 0.17187500 0.09765625 0.05468750 0.03027344
+> 
+> 
+> 
+> cleanEx()
+> nameEx("Beta")
+> ### * Beta
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: Beta
+> ### Title: The Beta Distribution
+> ### Aliases: Beta dbeta pbeta qbeta rbeta
+> ### Keywords: distribution
+> 
+> ### ** Examples
+> 
+> x <- seq(0, 1, length = 21)
+> dbeta(x, 1, 1)
+ [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
+> pbeta(x, 1, 1)
+ [1] 0.00 0.05 0.10 0.15 0.20 0.25 0.30 0.35 0.40 0.45 0.50 0.55 0.60 0.65 0.70
+[16] 0.75 0.80 0.85 0.90 0.95 1.00
+> 
+> ## Visualization, including limit cases:
+> pl.beta <- function(a,b, asp = if(isLim) 1, ylim = if(isLim) c(0,1.1)) {
++   if(isLim <- a == 0 || b == 0 || a == Inf || b == Inf) {
++     eps <- 1e-10
++     x <- c(0, eps, (1:7)/16, 1/2+c(-eps,0,eps), (9:15)/16, 1-eps, 1)
++   } else {
++     x <- seq(0, 1, length = 1025)
++   }
++   fx <- cbind(dbeta(x, a,b), pbeta(x, a,b), qbeta(x, a,b))
++   f <- fx; f[fx == Inf] <- 1e100
++   matplot(x, f, ylab="", type="l", ylim=ylim, asp=asp,
++           main = sprintf("[dpq]beta(x, a=%g, b=%g)", a,b))
++   abline(0,1,     col="gray", lty=3)
++   abline(h = 0:1, col="gray", lty=3)
++   legend("top", paste0(c("d","p","q"), "beta(x, a,b)"),
++          col=1:3, lty=1:3, bty = "n")
++   invisible(cbind(x, fx))
++ }
+> pl.beta(3,1)
+> 
+> pl.beta(2, 4)
+> pl.beta(3, 7)
+> pl.beta(3, 7, asp=1)
+> 
+> pl.beta(0, 0)   ## point masses at  {0, 1}
+> 
+> pl.beta(0, 2)   ## point mass at 0 ; the same as
+> pl.beta(1, Inf)
+> 
+> pl.beta(Inf, 2) ## point mass at 1 ; the same as
+> pl.beta(3, 0)
+> 
+> pl.beta(Inf, Inf)# point mass at 1/2
+> 
+> 
+> 
+> cleanEx()
+> nameEx("Binomial")
+> ### * Binomial
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: Binomial
+> ### Title: The Binomial Distribution
+> ### Aliases: Binomial dbinom pbinom qbinom rbinom
+> ### Keywords: distribution
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> # Compute P(45 < X < 55) for X Binomial(100,0.5)
+> sum(dbinom(46:54, 100, 0.5))
+[1] 0.6317984
+> 
+> ## Using "log = TRUE" for an extended range :
+> n <- 2000
+> k <- seq(0, n, by = 20)
+> plot (k, dbinom(k, n, pi/10, log = TRUE), type = "l", ylab = "log density",
++       main = "dbinom(*, log=TRUE) is better than  log(dbinom(*))")
+> lines(k, log(dbinom(k, n, pi/10)), col = "red", lwd = 2)
+> ## extreme points are omitted since dbinom gives 0.
+> mtext("dbinom(k, log=TRUE)", adj = 0)
+> mtext("extended range", adj = 0, line = -1, font = 4)
+> mtext("log(dbinom(k))", col = "red", adj = 1)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("Cauchy")
+> ### * Cauchy
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: Cauchy
+> ### Title: The Cauchy Distribution
+> ### Aliases: Cauchy dcauchy pcauchy qcauchy rcauchy
+> ### Keywords: distribution
+> 
+> ### ** Examples
+> 
+> dcauchy(-1:4)
+[1] 0.15915494 0.31830989 0.15915494 0.06366198 0.03183099 0.01872411
+> 
+> 
+> 
+> cleanEx()
+> nameEx("Chisquare")
+> ### * Chisquare
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: Chisquare
+> ### Title: The (non-central) Chi-Squared Distribution
+> ### Aliases: Chisquare dchisq pchisq qchisq rchisq
+> ### Keywords: distribution
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> dchisq(1, df = 1:3)
+[1] 0.2419707 0.3032653 0.2419707
+> pchisq(1, df =  3)
+[1] 0.198748
+> pchisq(1, df =  3, ncp = 0:4)  # includes the above
+[1] 0.19874804 0.13229855 0.08787311 0.05824691 0.03853592
+> 
+> x <- 1:10
+> ## Chi-squared(df = 2) is a special exponential distribution
+> all.equal(dchisq(x, df = 2), dexp(x, 1/2))
+[1] TRUE
+> all.equal(pchisq(x, df = 2), pexp(x, 1/2))
+[1] TRUE
+> 
+> ## non-central RNG -- df = 0 with ncp > 0:  Z0 has point mass at 0!
+> Z0 <- rchisq(100, df = 0, ncp = 2.)
+> graphics::stem(Z0)
+
+  The decimal point is at the |
+
+  0 | 0000000000000000000000000000000000000013356778899
+  1 | 0001333456678888899
+  2 | 0011444467
+  3 | 00233345888
+  4 | 111246
+  5 | 
+  6 | 
+  7 | 178
+  8 | 23
+
+> 
+> 
+> ## "analytical" test
+> lam <- seq(0, 100, by = .25)
+> p00 <- pchisq(0,      df = 0, ncp = lam)
+> p.0 <- pchisq(1e-300, df = 0, ncp = lam)
+> stopifnot(all.equal(p00, exp(-lam/2)),
++           all.equal(p.0, exp(-lam/2)))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("Exponential")
+> ### * Exponential
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: Exponential
+> ### Title: The Exponential Distribution
+> ### Aliases: Exponential dexp pexp qexp rexp
+> ### Keywords: distribution
+> 
+> ### ** Examples
+> 
+> dexp(1) - exp(-1) #-> 0
+[1] 0
+> 
+> ## a fast way to generate *sorted*  U[0,1]  random numbers:
+> rsunif <- function(n) { n1 <- n+1
++    cE <- cumsum(rexp(n1)); cE[seq_len(n)]/cE[n1] }
+> plot(rsunif(1000), ylim=0:1, pch=".")
+> abline(0,1/(1000+1), col=adjustcolor(1, 0.5))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("Fdist")
+> ### * Fdist
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: FDist
+> ### Title: The F Distribution
+> ### Aliases: FDist df pf qf rf
+> ### Keywords: distribution
+> 
+> ### ** Examples
+> 
+> ## Equivalence of pt(.,nu) with pf(.^2, 1,nu):
+> x <- seq(0.001, 5, len = 100)
+> nu <- 4
+> stopifnot(all.equal(2*pt(x,nu) - 1, pf(x^2, 1,nu)),
++           ## upper tails:
++  	  all.equal(2*pt(x,     nu, lower=FALSE),
++ 		      pf(x^2, 1,nu, lower=FALSE)))
+> 
+> ## the density of the square of a t_m is 2*dt(x, m)/(2*x)
+> # check this is the same as the density of F_{1,m}
+> all.equal(df(x^2, 1, 5), dt(x, 5)/x)
+[1] TRUE
+> 
+> ## Identity:  qf(2*p - 1, 1, df)) == qt(p, df)^2)  for  p >= 1/2
+> p <- seq(1/2, .99, length = 50); df <- 10
+> rel.err <- function(x, y) ifelse(x == y, 0, abs(x-y)/mean(abs(c(x,y))))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("GammaDist")
+> ### * GammaDist
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: GammaDist
+> ### Title: The Gamma Distribution
+> ### Aliases: GammaDist dgamma pgamma qgamma rgamma
+> ### Keywords: distribution
+> 
+> ### ** Examples
+> 
+> -log(dgamma(1:4, shape = 1))
+[1] 1 2 3 4
+> p <- (1:9)/10
+> pgamma(qgamma(p, shape = 2), shape = 2)
+[1] 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
+> 1 - 1/exp(qgamma(p, shape = 1))
+[1] 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
+> 
+> 
+> 
+> cleanEx()
+> nameEx("Geometric")
+> ### * Geometric
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: Geometric
+> ### Title: The Geometric Distribution
+> ### Aliases: Geometric dgeom pgeom qgeom rgeom
+> ### Keywords: distribution
+> 
+> ### ** Examples
+> 
+> qgeom((1:9)/10, prob = .2)
+[1]  0  0  1  2  3  4  5  7 10
+> Ni <- rgeom(20, prob = 1/4); table(factor(Ni, 0:max(Ni)))
+
+ 0  1  2  3  4  5  6  7  8  9 10 11 
+ 5  3  3  1  2  2  0  1  0  1  1  1 
+> 
+> 
+> 
+> cleanEx()
+> nameEx("HoltWinters")
+> ### * HoltWinters
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: HoltWinters
+> ### Title: Holt-Winters Filtering
+> ### Aliases: HoltWinters print.HoltWinters residuals.HoltWinters
+> ### Keywords: ts
+> 
+> ### ** Examples
+> 
+> ## Don't show: 
+> od <- options(digits = 5)
+> ## End(Don't show)
+> require(graphics)
+> 
+> ## Seasonal Holt-Winters
+> (m <- HoltWinters(co2))
+Holt-Winters exponential smoothing with trend and additive seasonal component.
+
+Call:
+HoltWinters(x = co2)
+
+Smoothing parameters:
+ alpha: 0.51265
+ beta : 0.0094977
+ gamma: 0.47289
+
+Coefficients:
+         [,1]
+a   364.76162
+b     0.12474
+s1    0.22153
+s2    0.95528
+s3    1.59847
+s4    2.87580
+s5    3.28201
+s6    2.44070
+s7    0.89694
+s8   -1.37964
+s9   -3.41124
+s10  -3.25702
+s11  -1.91349
+s12  -0.58442
+> plot(m)
+> plot(fitted(m))
+> 
+> (m <- HoltWinters(AirPassengers, seasonal = "mult"))
+Holt-Winters exponential smoothing with trend and multiplicative seasonal component.
+
+Call:
+HoltWinters(x = AirPassengers, seasonal = "mult")
+
+Smoothing parameters:
+ alpha: 0.27559
+ beta : 0.032693
+ gamma: 0.87073
+
+Coefficients:
+         [,1]
+a   469.32322
+b     3.02154
+s1    0.94646
+s2    0.88292
+s3    0.97174
+s4    1.03048
+s5    1.04769
+s6    1.18053
+s7    1.35908
+s8    1.33317
+s9    1.10834
+s10   0.98688
+s11   0.83613
+s12   0.92099
+> plot(m)
+> 
+> ## Non-Seasonal Holt-Winters
+> x <- uspop + rnorm(uspop, sd = 5)
+> m <- HoltWinters(x, gamma = FALSE)
+> plot(m)
+> 
+> ## Exponential Smoothing
+> m2 <- HoltWinters(x, gamma = FALSE, beta = FALSE)
+> lines(fitted(m2)[,1], col = 3)
+> ## Don't show: 
+> options(od)
+> ## End(Don't show)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("Hypergeometric")
+> ### * Hypergeometric
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: Hypergeometric
+> ### Title: The Hypergeometric Distribution
+> ### Aliases: Hypergeometric dhyper phyper qhyper rhyper
+> ### Keywords: distribution
+> 
+> ### ** Examples
+> 
+> m <- 10; n <- 7; k <- 8
+> x <- 0:(k+1)
+> rbind(phyper(x, m, n, k), dhyper(x, m, n, k))
+     [,1]         [,2]       [,3]     [,4]      [,5]      [,6]      [,7]
+[1,]    0 0.0004113534 0.01336898 0.117030 0.4193747 0.7821884 0.9635952
+[2,]    0 0.0004113534 0.01295763 0.103661 0.3023447 0.3628137 0.1814068
+           [,8]       [,9] [,10]
+[1,] 0.99814891 1.00000000     1
+[2,] 0.03455368 0.00185109     0
+> all(phyper(x, m, n, k) == cumsum(dhyper(x, m, n, k)))  # FALSE
+[1] FALSE
+> 
+> 
+> cleanEx()
+> nameEx("IQR")
+> ### * IQR
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: IQR
+> ### Title: The Interquartile Range
+> ### Aliases: IQR
+> ### Keywords: univar robust distribution
+> 
+> ### ** Examples
+> 
+> IQR(rivers)
+[1] 370
+> 
+> 
+> 
+> cleanEx()
+> nameEx("KalmanLike")
+> ### * KalmanLike
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: KalmanLike
+> ### Title: Kalman Filtering
+> ### Aliases: KalmanLike KalmanRun KalmanSmooth KalmanForecast makeARIMA
+> ### Keywords: ts
+> 
+> ### ** Examples
+> 
+> ## an ARIMA fit
+> fit3 <- arima(presidents, c(3, 0, 0))
+> predict(fit3, 12)
+$pred
+         Qtr1     Qtr2     Qtr3     Qtr4
+1975 29.84194 34.41014 39.30815 43.02779
+1976 46.18808 48.56947 50.44866 51.86064
+1977 52.94295 53.75521 54.37019 54.83150
+
+$se
+         Qtr1     Qtr2     Qtr3     Qtr4
+1975  9.00655 11.25606 13.43389 14.51516
+1976 15.25538 15.65611 15.90158 16.03792
+1977 16.11764 16.16229 16.18785 16.20220
+
+> ## reconstruct this
+> pr <- KalmanForecast(12, fit3$model)
+> pr$pred + fit3$coef[4]
+ [1] 29.84194 34.41014 39.30815 43.02779 46.18808 48.56947 50.44866 51.86064
+ [9] 52.94295 53.75521 54.37019 54.83150
+> sqrt(pr$var * fit3$sigma2)
+ [1]  9.00655 11.25606 13.43389 14.51516 15.25538 15.65611 15.90158 16.03792
+ [9] 16.11764 16.16229 16.18785 16.20220
+> ## and now do it year by year
+> mod <- fit3$model
+> for(y in 1:3) {
++   pr <- KalmanForecast(4, mod, TRUE)
++   print(list(pred = pr$pred + fit3$coef["intercept"], 
++              se = sqrt(pr$var * fit3$sigma2)))
++   mod <- attr(pr, "mod")
++ }
+$pred
+[1] 29.84194 34.41014 39.30815 43.02779
+
+$se
+[1]  9.00655 11.25606 13.43389 14.51516
+
+$pred
+[1] 46.18808 48.56947 50.44866 51.86064
+
+$se
+[1] 15.25538 15.65611 15.90158 16.03792
+
+$pred
+[1] 52.94295 53.75521 54.37019 54.83150
+
+$se
+[1] 16.11764 16.16229 16.18785 16.20220
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("Logistic")
+> ### * Logistic
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: Logistic
+> ### Title: The Logistic Distribution
+> ### Aliases: Logistic dlogis plogis qlogis rlogis
+> ### Keywords: distribution
+> 
+> ### ** Examples
+> 
+> var(rlogis(4000, 0, scale = 5))  # approximately (+/- 3)
+[1] 86.93007
+> pi^2/3 * 5^2
+[1] 82.2467
+> 
+> 
+> 
+> cleanEx()
+> nameEx("Lognormal")
+> ### * Lognormal
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: Lognormal
+> ### Title: The Log Normal Distribution
+> ### Aliases: Lognormal dlnorm plnorm qlnorm rlnorm
+> ### Keywords: distribution
+> 
+> ### ** Examples
+> 
+> dlnorm(1) == dnorm(0)
+[1] TRUE
+> 
+> 
+> 
+> cleanEx()
+> nameEx("Multinom")
+> ### * Multinom
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: Multinom
+> ### Title: The Multinomial Distribution
+> ### Aliases: Multinomial rmultinom dmultinom
+> ### Keywords: distribution
+> 
+> ### ** Examples
+> 
+> rmultinom(10, size = 12, prob = c(0.1,0.2,0.8))
+     [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
+[1,]    0    1    0    3    1    0    1    2    2     1
+[2,]    2    4    4    2    0    1    2    2    5     3
+[3,]   10    7    8    7   11   11    9    8    5     8
+> 
+> pr <- c(1,3,6,10) # normalization not necessary for generation
+> rmultinom(10, 20, prob = pr)
+     [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
+[1,]    3    0    0    0    1    1    1    1    1     1
+[2,]    1    2    3    3    2    4    3    4    4     4
+[3,]    7    6    9    7    8    3    8    6    2     7
+[4,]    9   12    8   10    9   12    8    9   13     8
+> 
+> ## all possible outcomes of Multinom(N = 3, K = 3)
+> X <- t(as.matrix(expand.grid(0:3, 0:3))); X <- X[, colSums(X) <= 3]
+> X <- rbind(X, 3:3 - colSums(X)); dimnames(X) <- list(letters[1:3], NULL)
+> X
+  [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
+a    0    1    2    3    0    1    2    0    1     0
+b    0    0    0    0    1    1    1    2    2     3
+c    3    2    1    0    2    1    0    1    0     0
+> round(apply(X, 2, function(x) dmultinom(x, prob = c(1,2,5))), 3)
+ [1] 0.244 0.146 0.029 0.002 0.293 0.117 0.012 0.117 0.023 0.016
+> 
+> 
+> 
+> cleanEx()
+> nameEx("NLSstAsymptotic")
+> ### * NLSstAsymptotic
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: NLSstAsymptotic
+> ### Title: Fit the Asymptotic Regression Model
+> ### Aliases: NLSstAsymptotic NLSstAsymptotic.sortedXyData
+> ### Keywords: manip
+> 
+> ### ** Examples
+> 
+> Lob.329 <- Loblolly[ Loblolly$Seed == "329", ]
+> print(NLSstAsymptotic(sortedXyData(expression(age),
++                                    expression(height),
++                                    Lob.329)), digits = 3)
+    b0     b1    lrc 
+ -8.25 102.38  -3.22 
+> 
+> 
+> 
+> cleanEx()
+> nameEx("NLSstClosestX")
+> ### * NLSstClosestX
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: NLSstClosestX
+> ### Title: Inverse Interpolation
+> ### Aliases: NLSstClosestX NLSstClosestX.sortedXyData
+> ### Keywords: manip
+> 
+> ### ** Examples
+> 
+> DNase.2 <- DNase[ DNase$Run == "2", ]
+> DN.srt <- sortedXyData(expression(log(conc)), expression(density), DNase.2)
+> NLSstClosestX(DN.srt, 1.0)
+[1] 0.9795406
+> 
+> 
+> 
+> cleanEx()
+> nameEx("NLSstLfAsymptote")
+> ### * NLSstLfAsymptote
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: NLSstLfAsymptote
+> ### Title: Horizontal Asymptote on the Left Side
+> ### Aliases: NLSstLfAsymptote NLSstLfAsymptote.sortedXyData
+> ### Keywords: manip
+> 
+> ### ** Examples
+> 
+> DNase.2 <- DNase[ DNase$Run == "2", ]
+> DN.srt <- sortedXyData( expression(log(conc)), expression(density), DNase.2 )
+> NLSstLfAsymptote( DN.srt )
+[1] -0.1869375
+> 
+> 
+> 
+> cleanEx()
+> nameEx("NLSstRtAsymptote")
+> ### * NLSstRtAsymptote
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: NLSstRtAsymptote
+> ### Title: Horizontal Asymptote on the Right Side
+> ### Aliases: NLSstRtAsymptote NLSstRtAsymptote.sortedXyData
+> ### Keywords: manip
+> 
+> ### ** Examples
+> 
+> DNase.2 <- DNase[ DNase$Run == "2", ]
+> DN.srt <- sortedXyData( expression(log(conc)), expression(density), DNase.2 )
+> NLSstRtAsymptote( DN.srt )
+[1] 2.157437
+> 
+> 
+> 
+> cleanEx()
+> nameEx("NegBinomial")
+> ### * NegBinomial
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: NegBinomial
+> ### Title: The Negative Binomial Distribution
+> ### Aliases: NegBinomial dnbinom pnbinom qnbinom rnbinom
+> ### Keywords: distribution
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> x <- 0:11
+> dnbinom(x, size = 1, prob = 1/2) * 2^(1 + x) # == 1
+ [1] 1 1 1 1 1 1 1 1 1 1 1 1
+> 126 /  dnbinom(0:8, size  = 2, prob  = 1/2) #- theoretically integer
+[1]   504.0   504.0   672.0  1008.0  1612.8  2688.0  4608.0  8064.0 14336.0
+> 
+> 
+> x <- 0:15
+> size <- (1:20)/4
+> persp(x, size, dnb <- outer(x, size, function(x,s) dnbinom(x, s, prob = 0.4)),
++       xlab = "x", ylab = "s", zlab = "density", theta = 150)
+> title(tit <- "negative binomial density(x,s, pr = 0.4)  vs.  x & s")
+> 
+> image  (x, size, log10(dnb), main = paste("log [", tit, "]"))
+> contour(x, size, log10(dnb), add = TRUE)
+> 
+> ## Alternative parametrization
+> x1 <- rnbinom(500, mu = 4, size = 1)
+> x2 <- rnbinom(500, mu = 4, size = 10)
+> x3 <- rnbinom(500, mu = 4, size = 100)
+> h1 <- hist(x1, breaks = 20, plot = FALSE)
+> h2 <- hist(x2, breaks = h1$breaks, plot = FALSE)
+> h3 <- hist(x3, breaks = h1$breaks, plot = FALSE)
+> barplot(rbind(h1$counts, h2$counts, h3$counts),
++         beside = TRUE, col = c("red","blue","cyan"),
++         names.arg = round(h1$breaks[-length(h1$breaks)]))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("Normal")
+> ### * Normal
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: Normal
+> ### Title: The Normal Distribution
+> ### Aliases: Normal dnorm pnorm qnorm rnorm
+> ### Keywords: distribution
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> dnorm(0) == 1/sqrt(2*pi)
+[1] TRUE
+> dnorm(1) == exp(-1/2)/sqrt(2*pi)
+[1] TRUE
+> dnorm(1) == 1/sqrt(2*pi*exp(1))
+[1] TRUE
+> 
+> ## Using "log = TRUE" for an extended range :
+> par(mfrow = c(2,1))
+> plot(function(x) dnorm(x, log = TRUE), -60, 50,
++      main = "log { Normal density }")
+> curve(log(dnorm(x)), add = TRUE, col = "red", lwd = 2)
+> mtext("dnorm(x, log=TRUE)", adj = 0)
+> mtext("log(dnorm(x))", col = "red", adj = 1)
+> 
+> plot(function(x) pnorm(x, log.p = TRUE), -50, 10,
++      main = "log { Normal Cumulative }")
+> curve(log(pnorm(x)), add = TRUE, col = "red", lwd = 2)
+> mtext("pnorm(x, log=TRUE)", adj = 0)
+> mtext("log(pnorm(x))", col = "red", adj = 1)
+> 
+> ## if you want the so-called 'error function'
+> erf <- function(x) 2 * pnorm(x * sqrt(2)) - 1
+> ## (see Abramowitz and Stegun 29.2.29)
+> ## and the so-called 'complementary error function'
+> erfc <- function(x) 2 * pnorm(x * sqrt(2), lower = FALSE)
+> ## and the inverses
+> erfinv <- function (x) qnorm((1 + x)/2)/sqrt(2)
+> erfcinv <- function (x) qnorm(x/2, lower = FALSE)/sqrt(2)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("Poisson")
+> ### * Poisson
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: Poisson
+> ### Title: The Poisson Distribution
+> ### Aliases: Poisson dpois ppois qpois rpois
+> ### Keywords: distribution
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> -log(dpois(0:7, lambda = 1) * gamma(1+ 0:7)) # == 1
+[1] 1 1 1 1 1 1 1 1
+> Ni <- rpois(50, lambda = 4); table(factor(Ni, 0:max(Ni)))
+
+ 0  1  2  3  4  5  6  7  8  9 10 
+ 1  2  7  9  8 13  5  4  0  0  1 
+> 
+> 1 - ppois(10*(15:25), lambda = 100)  # becomes 0 (cancellation)
+ [1] 1.233094e-06 1.261664e-08 7.085799e-11 2.252643e-13 4.440892e-16
+ [6] 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00
+[11] 0.000000e+00
+>     ppois(10*(15:25), lambda = 100, lower.tail = FALSE)  # no cancellation
+ [1] 1.233094e-06 1.261664e-08 7.085800e-11 2.253110e-13 4.174239e-16
+ [6] 4.626179e-19 3.142097e-22 1.337219e-25 3.639328e-29 6.453883e-33
+[11] 7.587807e-37
+> 
+> par(mfrow = c(2, 1))
+> x <- seq(-0.01, 5, 0.01)
+> plot(x, ppois(x, 1), type = "s", ylab = "F(x)", main = "Poisson(1) CDF")
+> plot(x, pbinom(x, 100, 0.01), type = "s", ylab = "F(x)",
++      main = "Binomial(100, 0.01) CDF")
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("SSD")
+> ### * SSD
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: SSD
+> ### Title: SSD Matrix and Estimated Variance Matrix in Multivariate Models
+> ### Aliases: SSD estVar
+> ### Keywords: models multivariate
+> 
+> ### ** Examples
+> 
+> # Lifted from Baron+Li:
+> # "Notes on the use of R for psychology experiments and questionnaires"
+> # Maxwell and Delaney, p. 497
+> reacttime <- matrix(c(
++ 420, 420, 480, 480, 600, 780,
++ 420, 480, 480, 360, 480, 600,
++ 480, 480, 540, 660, 780, 780,
++ 420, 540, 540, 480, 780, 900,
++ 540, 660, 540, 480, 660, 720,
++ 360, 420, 360, 360, 480, 540,
++ 480, 480, 600, 540, 720, 840,
++ 480, 600, 660, 540, 720, 900,
++ 540, 600, 540, 480, 720, 780,
++ 480, 420, 540, 540, 660, 780),
++ ncol = 6, byrow = TRUE,
++ dimnames = list(subj = 1:10,
++               cond = c("deg0NA", "deg4NA", "deg8NA",
++                        "deg0NP", "deg4NP", "deg8NP")))
+> 
+> mlmfit <- lm(reacttime ~ 1)
+> SSD(mlmfit)
+$SSD
+        cond
+cond     deg0NA deg4NA deg8NA deg0NP deg4NP deg8NP
+  deg0NA  29160  30600  26640  23760  32400  25560
+  deg4NA  30600  66600  32400   7200  36000  30600
+  deg8NA  26640  32400  56160  41040  57600  69840
+  deg0NP  23760   7200  41040  70560  72000  63360
+  deg4NP  32400  36000  57600  72000 108000 100800
+  deg8NP  25560  30600  69840  63360 100800 122760
+
+$call
+lm(formula = reacttime ~ 1)
+
+$df
+[1] 9
+
+attr(,"class")
+[1] "SSD"
+> estVar(mlmfit)
+        cond
+cond     deg0NA deg4NA deg8NA deg0NP deg4NP deg8NP
+  deg0NA   3240   3400   2960   2640   3600   2840
+  deg4NA   3400   7400   3600    800   4000   3400
+  deg8NA   2960   3600   6240   4560   6400   7760
+  deg0NP   2640    800   4560   7840   8000   7040
+  deg4NP   3600   4000   6400   8000  12000  11200
+  deg8NP   2840   3400   7760   7040  11200  13640
+> 
+> 
+> 
+> cleanEx()
+> nameEx("SSasymp")
+> ### * SSasymp
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: SSasymp
+> ### Title: Self-Starting Nls Asymptotic Regression Model
+> ### Aliases: SSasymp
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> ## Don't show: 
+> options(show.nls.convergence=FALSE)
+> ## End(Don't show)
+> Lob.329 <- Loblolly[ Loblolly$Seed == "329", ]
+> SSasymp( Lob.329$age, 100, -8.5, -3.2 )  # response only
+[1]  3.988924 11.505611 27.822517 41.130854 51.985354 60.838463
+> Asym <- 100
+> resp0 <- -8.5
+> lrc <- -3.2
+> SSasymp( Lob.329$age, Asym, resp0, lrc ) # response and gradient
+[1]  3.988924 11.505611 27.822517 41.130854 51.985354 60.838463
+attr(,"gradient")
+          Asym     resp0      lrc
+[1,] 0.1151053 0.8848947 11.74087
+[2,] 0.1843835 0.8156165 18.03613
+[3,] 0.3347697 0.6652303 29.42113
+[4,] 0.4574272 0.5425728 35.99454
+[5,] 0.5574687 0.4425313 39.14366
+[6,] 0.6390642 0.3609358 39.90776
+> getInitial(height ~ SSasymp( age, Asym, resp0, lrc), data = Lob.329)
+$Asym
+[1] 94.1282
+
+$resp0
+[1] -8.250753
+
+$lrc
+[1] -3.217578
+
+> ## Initial values are in fact the converged values
+> fm1 <- nls(height ~ SSasymp( age, Asym, resp0, lrc), data = Lob.329)
+> summary(fm1)
+
+Formula: height ~ SSasymp(age, Asym, resp0, lrc)
+
+Parameters:
+      Estimate Std. Error t value Pr(>|t|)    
+Asym   94.1282     8.4030  11.202 0.001525 ** 
+resp0  -8.2508     1.2261  -6.729 0.006700 ** 
+lrc    -3.2176     0.1386 -23.218 0.000175 ***
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Residual standard error: 0.7493 on 3 degrees of freedom
+
+> ## Don't show: 
+> require(graphics)
+> 
+>   xx <- seq(0, 5, len = 101)
+>   yy <- 5 - 4 * exp(-xx/(2*log(2)))
+>   par(mar = c(0, 0, 4.1, 0))
+>   plot(xx, yy, type = "l", axes = FALSE, ylim = c(0,6), xlim = c(-1, 5),
++        xlab = "", ylab = "", lwd = 2,
++        main = "Parameters in the SSasymp model")
+>   usr <- par("usr")
+>   arrows(usr[1], 0, usr[2], 0, length = 0.1, angle = 25)
+>   arrows(0, usr[3], 0, usr[4], length = 0.1, angle = 25)
+>   text(usr[2] - 0.2, 0.1, "x", adj = c(1, 0))
+>   text(-0.1, usr[4], "y", adj = c(1, 1))
+>   abline(h = 5, lty = 2, lwd = 0)
+>   arrows(-0.8, 2.1, -0.8, 0, length = 0.1, angle = 25)
+>   arrows(-0.8, 2.9, -0.8, 5, length = 0.1, angle = 25)
+>   text(-0.8, 2.5, expression(phi[1]), adj = c(0.5, 0.5))
+>   segments(-0.4, 1, 0, 1, lty = 2, lwd = 0.75)
+>   arrows(-0.3, 0.25, -0.3, 0, length = 0.07, angle = 25)
+>   arrows(-0.3, 0.75, -0.3, 1, length = 0.07, angle = 25)
+>   text(-0.3, 0.5, expression(phi[2]), adj = c(0.5, 0.5))
+>   segments(1, 3.025, 1, 4, lty = 2, lwd = 0.75)
+>   arrows(0.2, 3.5, 0, 3.5, length = 0.08, angle = 25)
+>   arrows(0.8, 3.5, 1, 3.5, length = 0.08, angle = 25)
+>   text(0.5, 3.5, expression(t[0.5]), adj = c(0.5, 0.5))
+> ## End(Don't show)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("SSasympOff")
+> ### * SSasympOff
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: SSasympOff
+> ### Title: Self-Starting Nls Asymptotic Regression Model with an Offset
+> ### Aliases: SSasympOff
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> CO2.Qn1 <- CO2[CO2$Plant == "Qn1", ]
+> SSasympOff(CO2.Qn1$conc, 32, -4, 43)  # response only
+[1] 19.65412 29.14785 31.27791 31.88435 31.99259 31.99970 32.00000
+> Asym <- 32; lrc <- -4; c0 <- 43
+> SSasympOff(CO2.Qn1$conc, Asym, lrc, c0) # response and gradient
+[1] 19.65412 29.14785 31.27791 31.88435 31.99259 31.99970 32.00000
+attr(,"gradient")
+          Asym          lrc            c0
+[1,] 0.6141911 1.175838e+01 -2.261227e-01
+[2,] 0.9108704 6.895531e+00 -5.223887e-02
+[3,] 0.9774346 2.737698e+00 -1.322559e-02
+[4,] 0.9963859 6.503026e-01 -2.118250e-03
+[5,] 0.9997683 6.204920e-02 -1.357751e-04
+[6,] 0.9999906 3.479529e-03 -5.505583e-06
+[7,] 1.0000000 1.369435e-05 -1.430967e-08
+> getInitial(uptake ~ SSasympOff(conc, Asym, lrc, c0), data = CO2.Qn1)
+$Asym
+[1] 38.13978
+
+$lrc
+[1] -4.380647
+
+$c0
+[1] 51.22324
+
+> ## Initial values are in fact the converged values
+> fm1 <- nls(uptake ~ SSasympOff(conc, Asym, lrc, c0), data = CO2.Qn1)
+> summary(fm1)
+
+Formula: uptake ~ SSasympOff(conc, Asym, lrc, c0)
+
+Parameters:
+     Estimate Std. Error t value Pr(>|t|)    
+Asym  38.1398     0.9164  41.620 1.99e-06 ***
+lrc   -4.3806     0.2042 -21.457 2.79e-05 ***
+c0    51.2232    11.6698   4.389   0.0118 *  
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Residual standard error: 1.663 on 4 degrees of freedom
+
+> ## Don't show: 
+> require(graphics)
+> 
+>   xx <- seq(0.5, 5, len = 101)
+>   yy <- 5 * (1 -  exp(-(xx - 0.5)/(2*log(2))))
+>   par(mar = c(0, 0, 4.0, 0))
+>   plot(xx, yy, type = "l", axes = FALSE, ylim = c(0,6), xlim = c(-1, 5),
++        xlab = "", ylab = "", lwd = 2,
++        main = "Parameters in the SSasympOff model")
+>   usr <- par("usr")
+>   arrows(usr[1], 0, usr[2], 0, length = 0.1, angle = 25)
+>   arrows(0, usr[3], 0, usr[4], length = 0.1, angle = 25)
+>   text(usr[2] - 0.2, 0.1, "x", adj = c(1, 0))
+>   text(-0.1, usr[4], "y", adj = c(1, 1))
+>   abline(h = 5, lty = 2, lwd = 0)
+>   arrows(-0.8, 2.1, -0.8, 0, length = 0.1, angle = 25)
+>   arrows(-0.8, 2.9, -0.8, 5, length = 0.1, angle = 25)
+>   text(-0.8, 2.5, expression(phi[1]), adj = c(0.5, 0.5))
+>   segments(0.5, 0, 0.5, 3, lty = 2, lwd = 0.75)
+>   text(0.5, 3.1, expression(phi[3]), adj = c(0.5, 0))
+>   segments(1.5, 2.525, 1.5, 3, lty = 2, lwd = 0.75)
+>   arrows(0.7, 2.65, 0.5, 2.65, length = 0.08, angle = 25)
+>   arrows(1.3, 2.65, 1.5, 2.65, length = 0.08, angle = 25)
+>   text(1.0, 2.65, expression(t[0.5]), adj = c(0.5, 0.5))
+> ## End(Don't show)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("SSasympOrig")
+> ### * SSasympOrig
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: SSasympOrig
+> ### Title: Self-Starting Nls Asymptotic Regression Model through the Origin
+> ### Aliases: SSasympOrig
+> ### Keywords: models
+> 
+> ### ** Examples
+> ## Don't show: 
+> require(graphics)
+> 
+>   xx <- seq(0, 5, len = 101)
+>   yy <- 5 * (1- exp(-xx/(2*log(2))))
+>   par(mar = c(0, 0, 3.5, 0))
+>   plot(xx, yy, type = "l", axes = FALSE, ylim = c(0,6), xlim = c(-1, 5),
++        xlab = "", ylab = "", lwd = 2,
++        main = "Parameters in the SSasympOrig model")
+>   usr <- par("usr")
+>   arrows(usr[1], 0, usr[2], 0, length = 0.1, angle = 25)
+>   arrows(0, usr[3], 0, usr[4], length = 0.1, angle = 25)
+>   text(usr[2] - 0.2, 0.1, "x", adj = c(1, 0))
+>   text(-0.1, usr[4], "y", adj = c(1, 1))
+>   abline(h = 5, lty = 2, lwd = 0)
+>   arrows(-0.8, 2.1, -0.8, 0, length = 0.1, angle = 25)
+>   arrows(-0.8, 2.9, -0.8, 5, length = 0.1, angle = 25)
+>   text(-0.8, 2.5, expression(phi[1]), adj = c(0.5, 0.5))
+>   segments(1, 2.525, 1, 3.5, lty = 2, lwd = 0.75)
+>   arrows(0.2, 3.0, 0, 3.0, length = 0.08, angle = 25)
+>   arrows(0.8, 3.0, 1, 3.0, length = 0.08, angle = 25)
+>   text(0.5, 3.0, expression(t[0.5]), adj = c(0.5, 0.5))
+> ## End(Don't show)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("SSbiexp")
+> ### * SSbiexp
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: SSbiexp
+> ### Title: Self-Starting Nls Biexponential model
+> ### Aliases: SSbiexp
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> Indo.1 <- Indometh[Indometh$Subject == 1, ]
+> SSbiexp( Indo.1$time, 3, 1, 0.6, -1.3 )  # response only
+ [1] 2.08098572 1.29421044 0.87967145 0.65483364 0.52711347 0.36094621
+ [7] 0.26575722 0.20176113 0.15359129 0.11694936 0.06780767
+> A1 <- 3; lrc1 <- 1; A2 <- 0.6; lrc2 <- -1.3
+> SSbiexp( Indo.1$time, A1, lrc1, A2, lrc2 ) # response and gradient
+ [1] 2.08098572 1.29421044 0.87967145 0.65483364 0.52711347 0.36094621
+ [7] 0.26575722 0.20176113 0.15359129 0.11694936 0.06780767
+attr(,"gradient")
+                A1          lrc1        A2        lrc2
+ [1,] 5.068347e-01 -1.033290e+00 0.9341363 -0.03818728
+ [2,] 2.568814e-01 -1.047414e+00 0.8726106 -0.07134424
+ [3,] 1.301964e-01 -7.962985e-01 0.8151372 -0.09996786
+ [4,] 6.598804e-02 -5.381222e-01 0.7614492 -0.12451147
+ [5,] 3.344502e-02 -3.409237e-01 0.7112973 -0.14538835
+ [6,] 4.354421e-03 -7.101926e-02 0.5798049 -0.18961833
+ [7,] 2.873397e-04 -7.029632e-03 0.4414920 -0.21657709
+ [8,] 1.896098e-05 -6.184955e-04 0.3361737 -0.21988328
+ [9,] 1.251198e-06 -5.101663e-05 0.2559792 -0.20928744
+[10,] 8.256409e-08 -4.039784e-06 0.1949152 -0.19123411
+[11,] 3.595188e-10 -2.345456e-08 0.1130128 -0.14783797
+> print(getInitial(conc ~ SSbiexp(time, A1, lrc1, A2, lrc2), data = Indo.1),
++       digits = 5)
+      A1     lrc1       A2     lrc2 
+ 2.02928  0.57939  0.19155 -1.78778 
+> ## Initial values are in fact the converged values
+> fm1 <- nls(conc ~ SSbiexp(time, A1, lrc1, A2, lrc2), data = Indo.1)
+> summary(fm1)
+
+Formula: conc ~ SSbiexp(time, A1, lrc1, A2, lrc2)
+
+Parameters:
+     Estimate Std. Error t value Pr(>|t|)    
+A1     2.0293     0.1099  18.464 3.39e-07 ***
+lrc1   0.5794     0.1247   4.648  0.00235 ** 
+A2     0.1915     0.1106   1.731  0.12698    
+lrc2  -1.7878     0.7871  -2.271  0.05737 .  
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Residual standard error: 0.04103 on 7 degrees of freedom
+
+> 
+> ## Show the model components visually
+>   require(graphics)
+> 
+>   xx <- seq(0, 5, len = 101)
+>   y1 <- 3.5 * exp(-4*xx)
+>   y2 <- 1.5 * exp(-xx)
+>   plot(xx, y1 + y2, type = "l", lwd=2, ylim = c(-0.2,6), xlim = c(0, 5),
++        main = "Components of the SSbiexp model")
+>   lines(xx, y1, lty = 2, col="tomato"); abline(v=0, h=0, col="gray40")
+>   lines(xx, y2, lty = 3, col="blue2" )
+>   legend("topright", c("y1+y2", "y1 = 3.5 * exp(-4*x)", "y2 = 1.5 * exp(-x)"),
++          lty=1:3, col=c("black","tomato","blue2"), bty="n")
+>   axis(2, pos=0, at = c(3.5, 1.5), labels = c("A1","A2"), las=2)
+> 
+> ## and how you could have got their sum via SSbiexp():
+>   ySS <- SSbiexp(xx, 3.5, log(4), 1.5, log(1))
+>   ##                      ---          ---
+>   stopifnot(all.equal(y1+y2, ySS, tolerance = 1e-15))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("SSfol")
+> ### * SSfol
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: SSfol
+> ### Title: Self-Starting Nls First-order Compartment Model
+> ### Aliases: SSfol
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> Theoph.1 <- Theoph[ Theoph$Subject == 1, ]
+> SSfol(Theoph.1$Dose, Theoph.1$Time, -2.5, 0.5, -3) # response only
+ [1] 0.000000 2.214486 3.930988 5.261945 5.659813 5.084852 4.587699 3.916808
+ [9] 3.318395 2.579204 0.943593
+> lKe <- -2.5; lKa <- 0.5; lCl <- -3
+> SSfol(Theoph.1$Dose, Theoph.1$Time, lKe, lKa, lCl) # response and gradient
+ [1] 0.000000 2.214486 3.930988 5.261945 5.659813 5.084852 4.587699 3.916808
+ [9] 3.318395 2.579204 0.943593
+attr(,"gradient")
+            lKe         lKa       lCl
+ [1,]  0.000000  0.00000000  0.000000
+ [2,]  2.190284  1.78781716 -2.214486
+ [3,]  3.825518  2.35519507 -3.930988
+ [4,]  4.952713  1.75648252 -5.261945
+ [5,]  4.976520  0.53458070 -5.659813
+ [6,]  3.752822 -0.18560297 -5.084852
+ [7,]  2.906859 -0.22729852 -4.587699
+ [8,]  1.861771 -0.20447579 -3.916808
+ [9,]  1.027129 -0.17383515 -3.318395
+[10,]  0.148370 -0.13513891 -2.579204
+[11,] -0.894541 -0.04944021 -0.943593
+> getInitial(conc ~ SSfol(Dose, Time, lKe, lKa, lCl), data = Theoph.1)
+$lKe
+[1] -2.994845
+
+$lKa
+[1] 0.609169
+
+$lCl
+[1] -3.971003
+
+> ## Initial values are in fact the converged values
+> fm1 <- nls(conc ~ SSfol(Dose, Time, lKe, lKa, lCl), data = Theoph.1)
+> summary(fm1)
+
+Formula: conc ~ SSfol(Dose, Time, lKe, lKa, lCl)
+
+Parameters:
+    Estimate Std. Error t value Pr(>|t|)    
+lKe  -2.9196     0.1709 -17.085 1.40e-07 ***
+lKa   0.5752     0.1728   3.328   0.0104 *  
+lCl  -3.9159     0.1273 -30.768 1.35e-09 ***
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Residual standard error: 0.732 on 8 degrees of freedom
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("SSfpl")
+> ### * SSfpl
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: SSfpl
+> ### Title: Self-Starting Nls Four-Parameter Logistic Model
+> ### Aliases: SSfpl
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> Chick.1 <- ChickWeight[ChickWeight$Chick == 1, ]
+> SSfpl(Chick.1$Time, 13, 368, 14, 6)  # response only
+ [1]  44.38189  55.31704  69.39853  87.05603 108.47420 133.43149 161.18758
+ [8] 190.50000 219.81242 247.56851 272.52580 283.70240
+> A <- 13; B <- 368; xmid <- 14; scal <- 6
+> SSfpl(Chick.1$Time, A, B, xmid, scal) # response and gradient
+ [1]  44.38189  55.31704  69.39853  87.05603 108.47420 133.43149 161.18758
+ [8] 190.50000 219.81242 247.56851 272.52580 283.70240
+attr(,"gradient")
+              A          B       xmid       scal
+ [1,] 0.9116003 0.08839968  -4.767956  11.125231
+ [2,] 0.8807971 0.11920292  -6.212120  12.424241
+ [3,] 0.8411309 0.15886910  -7.906425  13.177374
+ [4,] 0.7913915 0.20860853  -9.767885  13.023846
+ [5,] 0.7310586 0.26894142 -11.632873  11.632873
+ [6,] 0.6607564 0.33924363 -13.262646   8.841764
+ [7,] 0.5825702 0.41742979 -14.388278   4.796093
+ [8,] 0.5000000 0.50000000 -14.791667   0.000000
+ [9,] 0.4174298 0.58257021 -14.388278  -4.796093
+[10,] 0.3392436 0.66075637 -13.262646  -8.841764
+[11,] 0.2689414 0.73105858 -11.632873 -11.632873
+[12,] 0.2374580 0.76254197 -10.713410 -12.498978
+> print(getInitial(weight ~ SSfpl(Time, A, B, xmid, scal), data = Chick.1),
++       digits = 5)
+       A        B     xmid     scal 
+ 27.4532 348.9712  19.3905   6.6726 
+> ## Initial values are in fact the converged values
+> fm1 <- nls(weight ~ SSfpl(Time, A, B, xmid, scal), data = Chick.1)
+> summary(fm1)
+
+Formula: weight ~ SSfpl(Time, A, B, xmid, scal)
+
+Parameters:
+     Estimate Std. Error t value Pr(>|t|)    
+A      27.453      6.601   4.159 0.003169 ** 
+B     348.971     57.899   6.027 0.000314 ***
+xmid   19.391      2.194   8.836 2.12e-05 ***
+scal    6.673      1.002   6.662 0.000159 ***
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Residual standard error: 2.351 on 8 degrees of freedom
+
+> ## Don't show: 
+> require(graphics)
+> 
+>   xx <- seq(-0.5, 5, len = 101)
+>   yy <- 1 + 4 / ( 1 + exp((2-xx)))
+>   par(mar = c(0, 0, 3.5, 0))
+>   plot(xx, yy, type = "l", axes = FALSE, ylim = c(0,6), xlim = c(-1, 5),
++        xlab = "", ylab = "", lwd = 2,
++        main = "Parameters in the SSfpl model")
+>   usr <- par("usr")
+>   arrows(usr[1], 0, usr[2], 0, length = 0.1, angle = 25)
+>   arrows(0, usr[3], 0, usr[4], length = 0.1, angle = 25)
+>   text(usr[2] - 0.2, 0.1, "x", adj = c(1, 0))
+>   text(-0.1, usr[4], "y", adj = c(1, 1))
+>   abline(h = 5, lty = 2, lwd = 0)
+>   arrows(-0.8, 2.1, -0.8, 0, length = 0.1, angle = 25)
+>   arrows(-0.8, 2.9, -0.8, 5, length = 0.1, angle = 25)
+>   text(-0.8, 2.5, expression(phi[1]), adj = c(0.5, 0.5))
+>   abline(h = 1, lty = 2, lwd = 0)
+>   arrows(-0.3, 0.25, -0.3, 0, length = 0.07, angle = 25)
+>   arrows(-0.3, 0.75, -0.3, 1, length = 0.07, angle = 25)
+>   text(-0.3, 0.5, expression(phi[2]), adj = c(0.5, 0.5))
+>   segments(2, 0, 2, 3.3, lty = 2, lwd = 0.75)
+>   text(2, 3.3, expression(phi[3]), adj = c(0.5, 0))
+>   segments(3, 1+4/(1+exp(-1)) - 0.025, 3, 2.5, lty = 2, lwd = 0.75)
+>   arrows(2.3, 2.7, 2.0, 2.7, length = 0.08, angle = 25)
+>   arrows(2.7, 2.7, 3.0, 2.7, length = 0.08, angle = 25)
+>   text(2.5, 2.7, expression(phi[4]), adj = c(0.5, 0.5))
+> ## End(Don't show)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("SSgompertz")
+> ### * SSgompertz
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: SSgompertz
+> ### Title: Self-Starting Nls Gompertz Growth Model
+> ### Aliases: SSgompertz
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> DNase.1 <- subset(DNase, Run == 1)
+> SSgompertz(log(DNase.1$conc), 4.5, 2.3, 0.7)   # response only
+ [1] 0.00525729 0.00525729 0.07323255 0.07323255 0.18049064 0.18049064
+ [7] 0.36508763 0.36508763 0.63288772 0.63288772 0.97257180 0.97257180
+[13] 1.36033340 1.36033340 1.76786902 1.76786902
+> Asym <- 4.5; b2 <- 2.3; b3 <- 0.7
+> SSgompertz(log(DNase.1$conc), Asym, b2, b3) # response and gradient
+ [1] 0.00525729 0.00525729 0.07323255 0.07323255 0.18049064 0.18049064
+ [7] 0.36508763 0.36508763 0.63288772 0.63288772 0.97257180 0.97257180
+[13] 1.36033340 1.36033340 1.76786902 1.76786902
+attr(,"gradient")
+             Asym          b2         b3
+ [1,] 0.001168287 -0.01543407  0.1531221
+ [2,] 0.001168287 -0.01543407  0.1531221
+ [3,] 0.016273900 -0.13112424  0.7036230
+ [4,] 0.016273900 -0.13112424  0.7036230
+ [5,] 0.040109031 -0.25238507  0.7795153
+ [6,] 0.040109031 -0.25238507  0.7795153
+ [7,] 0.081130585 -0.39869082  0.3233828
+ [8,] 0.081130585 -0.39869082  0.3233828
+ [9,] 0.140641716 -0.53975407 -0.7914802
+[10,] 0.140641716 -0.53975407 -0.7914802
+[11,] 0.216127067 -0.64777036 -2.4251586
+[12,] 0.216127067 -0.64777036 -2.4251586
+[13,] 0.302296311 -0.70757894 -4.2605728
+[14,] 0.302296311 -0.70757894 -4.2605728
+[15,] 0.392859783 -0.71814108 -5.9597255
+[16,] 0.392859783 -0.71814108 -5.9597255
+> print(getInitial(density ~ SSgompertz(log(conc), Asym, b2, b3),
++                  data = DNase.1), digits = 5)
+   Asym      b2      b3 
+4.60333 2.27134 0.71647 
+> ## Initial values are in fact the converged values
+> fm1 <- nls(density ~ SSgompertz(log(conc), Asym, b2, b3),
++            data = DNase.1)
+> summary(fm1)
+
+Formula: density ~ SSgompertz(log(conc), Asym, b2, b3)
+
+Parameters:
+     Estimate Std. Error t value Pr(>|t|)    
+Asym  4.60333    0.65321   7.047 8.71e-06 ***
+b2    2.27134    0.14373  15.803 7.24e-10 ***
+b3    0.71647    0.02206  32.475 7.85e-14 ***
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Residual standard error: 0.02684 on 13 degrees of freedom
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("SSlogis")
+> ### * SSlogis
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: SSlogis
+> ### Title: Self-Starting Nls Logistic Model
+> ### Aliases: SSlogis
+> ### Keywords: models
+> 
+> ### ** Examples
+> ## Don't show: 
+> require(graphics)
+> 
+>   xx <- seq(-0.5, 5, len = 101)
+>   yy <- 5 / ( 1 + exp((2-xx)))
+>   par(mar = c(0, 0, 3.5, 0))
+>   plot(xx, yy, type = "l", axes = FALSE, ylim = c(0,6), xlim = c(-1, 5),
++        xlab = "", ylab = "", lwd = 2,
++        main = "Parameters in the SSlogis model")
+>   usr <- par("usr")
+>   arrows(usr[1], 0, usr[2], 0, length = 0.1, angle = 25)
+>   arrows(0, usr[3], 0, usr[4], length = 0.1, angle = 25)
+>   text(usr[2] - 0.2, 0.1, "x", adj = c(1, 0))
+>   text(-0.1, usr[4], "y", adj = c(1, 1))
+>   abline(h = 5, lty = 2, lwd = 0)
+>   arrows(-0.8, 2.1, -0.8, 0, length = 0.1, angle = 25)
+>   arrows(-0.8, 2.9, -0.8, 5, length = 0.1, angle = 25)
+>   text(-0.8, 2.5, expression(phi[1]), adj = c(0.5, 0.5))
+>   segments(2, 0, 2, 4.0, lty = 2, lwd = 0.75)
+>   text(2, 4.0, expression(phi[2]), adj = c(0.5, 0))
+>   segments(3, 5/(1+exp(-1)) + 0.025, 3, 4.0, lty = 2, lwd = 0.75)
+>   arrows(2.3, 3.8, 2.0, 3.8, length = 0.08, angle = 25)
+>   arrows(2.7, 3.8, 3.0, 3.8, length = 0.08, angle = 25)
+>   text(2.5, 3.8, expression(phi[3]), adj = c(0.5, 0.5))
+> ## End(Don't show)
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("SSmicmen")
+> ### * SSmicmen
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: SSmicmen
+> ### Title: Self-Starting Nls Michaelis-Menten Model
+> ### Aliases: SSmicmen
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> PurTrt <- Puromycin[ Puromycin$state == "treated", ]
+> SSmicmen(PurTrt$conc, 200, 0.05)  # response only
+ [1]  57.14286  57.14286 109.09091 109.09091 137.50000 137.50000 162.96296
+ [8] 162.96296 183.60656 183.60656 191.30435 191.30435
+> Vm <- 200; K <- 0.05
+> SSmicmen(PurTrt$conc, Vm, K)      # response and gradient
+ [1]  57.14286  57.14286 109.09091 109.09091 137.50000 137.50000 162.96296
+ [8] 162.96296 183.60656 183.60656 191.30435 191.30435
+attr(,"gradient")
+             Vm         K
+ [1,] 0.2857143 -816.3265
+ [2,] 0.2857143 -816.3265
+ [3,] 0.5454545 -991.7355
+ [4,] 0.5454545 -991.7355
+ [5,] 0.6875000 -859.3750
+ [6,] 0.6875000 -859.3750
+ [7,] 0.8148148 -603.5665
+ [8,] 0.8148148 -603.5665
+ [9,] 0.9180328 -300.9944
+[10,] 0.9180328 -300.9944
+[11,] 0.9565217 -166.3516
+[12,] 0.9565217 -166.3516
+> print(getInitial(rate ~ SSmicmen(conc, Vm, K), data = PurTrt), digits = 3)
+      Vm        K 
+212.6837   0.0641 
+> ## Initial values are in fact the converged values
+> fm1 <- nls(rate ~ SSmicmen(conc, Vm, K), data = PurTrt)
+> summary(fm1)
+
+Formula: rate ~ SSmicmen(conc, Vm, K)
+
+Parameters:
+    Estimate Std. Error t value Pr(>|t|)    
+Vm 2.127e+02  6.947e+00  30.615 3.24e-11 ***
+K  6.412e-02  8.281e-03   7.743 1.57e-05 ***
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Residual standard error: 10.93 on 10 degrees of freedom
+
+> ## Alternative call using the subset argument
+> fm2 <- nls(rate ~ SSmicmen(conc, Vm, K), data = Puromycin,
++            subset = state == "treated")
+> summary(fm2)
+
+Formula: rate ~ SSmicmen(conc, Vm, K)
+
+Parameters:
+    Estimate Std. Error t value Pr(>|t|)    
+Vm 2.127e+02  6.947e+00  30.615 3.24e-11 ***
+K  6.412e-02  8.281e-03   7.743 1.57e-05 ***
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Residual standard error: 10.93 on 10 degrees of freedom
+
+> ## Don't show: 
+> require(graphics)
+> 
+>   xx <- seq(0, 5, len = 101)
+>   yy <- 5 * xx/(1+xx)
+>   par(mar = c(0, 0, 3.5, 0))
+>   plot(xx, yy, type = "l", axes = FALSE, ylim = c(0,6), xlim = c(-1, 5),
++        xlab = "", ylab = "", lwd = 2,
++        main = "Parameters in the SSmicmen model")
+>   usr <- par("usr")
+>   arrows(usr[1], 0, usr[2], 0, length = 0.1, angle = 25)
+>   arrows(0, usr[3], 0, usr[4], length = 0.1, angle = 25)
+>   text(usr[2] - 0.2, 0.1, "x", adj = c(1, 0))
+>   text(-0.1, usr[4], "y", adj = c(1, 1))
+>   abline(h = 5, lty = 2, lwd = 0)
+>   arrows(-0.8, 2.1, -0.8, 0, length = 0.1, angle = 25)
+>   arrows(-0.8, 2.9, -0.8, 5, length = 0.1, angle = 25)
+>   text(-0.8, 2.5, expression(phi[1]), adj = c(0.5, 0.5))
+>   segments(1, 0, 1, 2.7, lty = 2, lwd = 0.75)
+>   text(1, 2.7, expression(phi[2]), adj = c(0.5, 0))
+> ## End(Don't show)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("SSweibull")
+> ### * SSweibull
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: SSweibull
+> ### Title: Self-Starting Nls Weibull Growth Curve Model
+> ### Aliases: SSweibull
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> Chick.6 <- subset(ChickWeight, (Chick == 6) & (Time > 0))
+> SSweibull(Chick.6$Time, 160, 115, -5.5, 2.5)   # response only
+ [1]  47.62811  59.09743  79.79756 105.12008 128.41818 145.02585 154.25783
+ [8] 158.24919 159.58222 159.92314 159.97023
+> Asym <- 160; Drop <- 115; lrc <- -5.5; pwr <- 2.5
+> SSweibull(Chick.6$Time, Asym, Drop, lrc, pwr)  # response and gradient
+ [1]  47.62811  59.09743  79.79756 105.12008 128.41818 145.02585 154.25783
+ [8] 158.24919 159.58222 159.92314 159.97023
+attr(,"gradient")
+      Asym          Drop        lrc        pwr
+ [1,]    1 -0.9771469094  2.5978438  1.8006881
+ [2,]    1 -0.8774136912 13.1957043 18.2931305
+ [3,]    1 -0.6974125358 28.9032091 51.7875987
+ [4,]    1 -0.4772166721 40.5993205 84.4239136
+ [5,]    1 -0.2746244909 40.8147795 93.9795029
+ [6,]    1 -0.1302099955 30.5264027 75.8552610
+ [7,]    1 -0.0499319343 17.2098335 45.4177374
+ [8,]    1 -0.0152244293  7.3268815 20.3144290
+ [9,]    1 -0.0036328431  2.3469622  6.7835933
+[10,]    1 -0.0006683898  0.5619310  1.6833949
+[11,]    1 -0.0002589123  0.2459116  0.7486834
+> getInitial(weight ~ SSweibull(Time, Asym, Drop, lrc, pwr), data = Chick.6)
+      Asym       Drop        lrc        pwr 
+158.501204 110.997081  -5.993421   2.646141 
+> ## Initial values are in fact the converged values
+> fm1 <- nls(weight ~ SSweibull(Time, Asym, Drop, lrc, pwr), data = Chick.6)
+> summary(fm1)
+
+Formula: weight ~ SSweibull(Time, Asym, Drop, lrc, pwr)
+
+Parameters:
+     Estimate Std. Error t value Pr(>|t|)    
+Asym 158.5012     1.1769  134.67 3.28e-13 ***
+Drop 110.9971     2.6330   42.16 1.10e-09 ***
+lrc   -5.9934     0.3733  -16.05 8.83e-07 ***
+pwr    2.6461     0.1613   16.41 7.62e-07 ***
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Residual standard error: 2.061 on 7 degrees of freedom
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("SignRank")
+> ### * SignRank
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: SignRank
+> ### Title: Distribution of the Wilcoxon Signed Rank Statistic
+> ### Aliases: SignRank dsignrank psignrank qsignrank rsignrank
+> ### Keywords: distribution
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> par(mfrow = c(2,2))
+> for(n in c(4:5,10,40)) {
++   x <- seq(0, n*(n+1)/2, length = 501)
++   plot(x, dsignrank(x, n = n), type = "l",
++        main = paste0("dsignrank(x, n = ", n, ")"))
++ }
+> ## Don't show: 
+> p <- c(1, 1, 1, 2, 2:6, 8, 10, 11, 13, 15, 17, 20, 22, 24,
++        27, 29, 31, 33, 35, 36, 38, 39, 39, 40)
+> stopifnot(round(dsignrank(0:56, n = 10)* 2^10) == c(p, rev(p), 0),
++           qsignrank((1:16)/ 16, n = 4) == c(0:2, rep(3:7, each = 2), 8:10))
+> ## End(Don't show)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("StructTS")
+> ### * StructTS
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: StructTS
+> ### Title: Fit Structural Time Series
+> ### Aliases: StructTS print.StructTS predict.StructTS
+> ### Keywords: ts
+> 
+> ### ** Examples
+> 
+> ## see also JohnsonJohnson, Nile and AirPassengers
+> require(graphics)
+> 
+> trees <- window(treering, start = 0)
+> (fit <- StructTS(trees, type = "level"))
+
+Call:
+StructTS(x = trees, type = "level")
+
+Variances:
+  level  epsilon  
+0.00037  0.07199  
+> plot(trees)
+> lines(fitted(fit), col = "green")
+> tsdiag(fit)
+> 
+> (fit <- StructTS(log10(UKgas), type = "BSM"))
+
+Call:
+StructTS(x = log10(UKgas), type = "BSM")
+
+Variances:
+    level      slope       seas    epsilon  
+0.000e+00  1.733e-05  7.137e-04  3.678e-04  
+> par(mfrow = c(4, 1)) # to give appropriate aspect ratio for next plot.
+> plot(log10(UKgas))
+> plot(cbind(fitted(fit), resids=resid(fit)), main = "UK gas consumption")
+> 
+> ## keep some parameters fixed; trace optimizer:
+> StructTS(log10(UKgas), type = "BSM", fixed = c(0.1,0.001,NA,NA),
++          optim.control = list(trace = TRUE))
+iter   10 value -0.936176
+final  value -0.936176 
+converged
+
+Call:
+StructTS(x = log10(UKgas), type = "BSM", fixed = c(0.1, 0.001, NA, NA), optim.control = list(trace = TRUE))
+
+Variances:
+    level      slope       seas    epsilon  
+0.1000000  0.0010000  0.0003012  0.0000000  
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("TDist")
+> ### * TDist
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: TDist
+> ### Title: The Student t Distribution
+> ### Aliases: TDist dt pt qt rt
+> ### Keywords: distribution
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> 1 - pt(1:5, df = 1)
+[1] 0.25000000 0.14758362 0.10241638 0.07797913 0.06283296
+> qt(.975, df = c(1:10,20,50,100,1000))
+ [1] 12.706205  4.302653  3.182446  2.776445  2.570582  2.446912  2.364624
+ [8]  2.306004  2.262157  2.228139  2.085963  2.008559  1.983972  1.962339
+> 
+> tt <- seq(0, 10, len = 21)
+> ncp <- seq(0, 6, len = 31)
+> ptn <- outer(tt, ncp, function(t, d) pt(t, df = 3, ncp = d))
+> t.tit <- "Non-central t - Probabilities"
+> image(tt, ncp, ptn, zlim = c(0,1), main = t.tit)
+> persp(tt, ncp, ptn, zlim = 0:1, r = 2, phi = 20, theta = 200, main = t.tit,
++       xlab = "t", ylab = "non-centrality parameter",
++       zlab = "Pr(T <= t)")
+> 
+> plot(function(x) dt(x, df = 3, ncp = 2), -3, 11, ylim = c(0, 0.32),
++      main = "Non-central t - Density", yaxs = "i")
+> 
+> 
+> 
+> cleanEx()
+> nameEx("Tukey")
+> ### * Tukey
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: Tukey
+> ### Title: The Studentized Range Distribution
+> ### Aliases: Tukey ptukey qtukey
+> ### Keywords: distribution
+> 
+> ### ** Examples
+> 
+> if(interactive())
++   curve(ptukey(x, nm = 6, df = 5), from = -1, to = 8, n = 101)
+> (ptt <- ptukey(0:10, 2, df =  5))
+ [1] 0.0000000 0.4889159 0.7835628 0.9126407 0.9632574 0.9833586 0.9918510
+ [8] 0.9957141 0.9976011 0.9985838 0.9991249
+> (qtt <- qtukey(.95, 2, df =  2:11))
+ [1] 6.079637 4.500659 3.926503 3.635351 3.460456 3.344084 3.261182 3.199173
+ [9] 3.151064 3.112663
+> ## The precision may be not much more than about 8 digits:
+> 
+> 
+> 
+> cleanEx()
+> nameEx("TukeyHSD")
+> ### * TukeyHSD
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: TukeyHSD
+> ### Title: Compute Tukey Honest Significant Differences
+> ### Aliases: TukeyHSD
+> ### Keywords: models design
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> summary(fm1 <- aov(breaks ~ wool + tension, data = warpbreaks))
+            Df Sum Sq Mean Sq F value  Pr(>F)   
+wool         1    451   450.7   3.339 0.07361 . 
+tension      2   2034  1017.1   7.537 0.00138 **
+Residuals   50   6748   135.0                   
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> TukeyHSD(fm1, "tension", ordered = TRUE)
+  Tukey multiple comparisons of means
+    95% family-wise confidence level
+    factor levels have been ordered
+
+Fit: aov(formula = breaks ~ wool + tension, data = warpbreaks)
+
+$tension
+         diff        lwr      upr     p adj
+M-H  4.722222 -4.6311985 14.07564 0.4474210
+L-H 14.722222  5.3688015 24.07564 0.0011218
+L-M 10.000000  0.6465793 19.35342 0.0336262
+
+> plot(TukeyHSD(fm1, "tension"))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("Uniform")
+> ### * Uniform
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: Uniform
+> ### Title: The Uniform Distribution
+> ### Aliases: Uniform dunif punif qunif runif
+> ### Keywords: distribution
+> 
+> ### ** Examples
+> 
+> u <- runif(20)
+> 
+> ## The following relations always hold :
+> punif(u) == u
+ [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
+[16] TRUE TRUE TRUE TRUE TRUE
+> dunif(u) == 1
+ [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
+[16] TRUE TRUE TRUE TRUE TRUE
+> 
+> var(runif(10000))  #- ~ = 1/12 = .08333
+[1] 0.08475621
+> 
+> 
+> 
+> cleanEx()
+> nameEx("Weibull")
+> ### * Weibull
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: Weibull
+> ### Title: The Weibull Distribution
+> ### Aliases: Weibull dweibull pweibull qweibull rweibull
+> ### Keywords: distribution
+> 
+> ### ** Examples
+> 
+> x <- c(0, rlnorm(50))
+> all.equal(dweibull(x, shape = 1), dexp(x))
+[1] TRUE
+> all.equal(pweibull(x, shape = 1, scale = pi), pexp(x, rate = 1/pi))
+[1] TRUE
+> ## Cumulative hazard H():
+> all.equal(pweibull(x, 2.5, pi, lower.tail = FALSE, log.p = TRUE),
++           -(x/pi)^2.5, tolerance = 1e-15)
+[1] TRUE
+> all.equal(qweibull(x/11, shape = 1, scale = pi), qexp(x/11, rate = 1/pi))
+[1] TRUE
+> 
+> 
+> 
+> cleanEx()
+> nameEx("Wilcoxon")
+> ### * Wilcoxon
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: Wilcoxon
+> ### Title: Distribution of the Wilcoxon Rank Sum Statistic
+> ### Aliases: Wilcoxon dwilcox pwilcox qwilcox rwilcox
+> ### Keywords: distribution
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> x <- -1:(4*6 + 1)
+> fx <- dwilcox(x, 4, 6)
+> Fx <- pwilcox(x, 4, 6)
+> 
+> layout(rbind(1,2), widths = 1, heights = c(3,2))
+> plot(x, fx, type = "h", col = "violet",
++      main =  "Probabilities (density) of Wilcoxon-Statist.(n=6, m=4)")
+> plot(x, Fx, type = "s", col = "blue",
++      main =  "Distribution of Wilcoxon-Statist.(n=6, m=4)")
+> abline(h = 0:1, col = "gray20", lty = 2)
+> layout(1) # set back
+> 
+> N <- 200
+> hist(U <- rwilcox(N, m = 4,n = 6), breaks = 0:25 - 1/2,
++      border = "red", col = "pink", sub = paste("N =",N))
+> mtext("N * f(x),  f() = true \"density\"", side = 3, col = "blue")
+>  lines(x, N*fx, type = "h", col = "blue", lwd = 2)
+> points(x, N*fx, cex = 2)
+> 
+> ## Better is a Quantile-Quantile Plot
+> qqplot(U, qw <- qwilcox((1:N - 1/2)/N, m = 4, n = 6),
++        main = paste("Q-Q-Plot of empirical and theoretical quantiles",
++                      "Wilcoxon Statistic,  (m=4, n=6)", sep = "\n"))
+> n <- as.numeric(names(print(tU <- table(U))))
+U
+ 0  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 
+ 1  1  4  6  7 10  8 12 14 22 13 16 13 23 16 11  7  4  4  3  3  1  1 
+> text(n+.2, n+.5, labels = tU, col = "red")
+> 
+> 
+> 
+> cleanEx()
+> nameEx("acf")
+> ### * acf
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: acf
+> ### Title: Auto- and Cross- Covariance and -Correlation Function Estimation
+> ### Aliases: acf ccf pacf pacf.default [.acf
+> ### Keywords: ts
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> ## Examples from Venables & Ripley
+> acf(lh)
+> acf(lh, type = "covariance")
+> pacf(lh)
+> 
+> acf(ldeaths)
+> acf(ldeaths, ci.type = "ma")
+> acf(ts.union(mdeaths, fdeaths))
+> ccf(mdeaths, fdeaths, ylab = "cross-correlation")
+> # (just the cross-correlations)
+> 
+> presidents # contains missing values
+     Qtr1 Qtr2 Qtr3 Qtr4
+1945   NA   87   82   75
+1946   63   50   43   32
+1947   35   60   54   55
+1948   36   39   NA   NA
+1949   69   57   57   51
+1950   45   37   46   39
+1951   36   24   32   23
+1952   25   32   NA   32
+1953   59   74   75   60
+1954   71   61   71   57
+1955   71   68   79   73
+1956   76   71   67   75
+1957   79   62   63   57
+1958   60   49   48   52
+1959   57   62   61   66
+1960   71   62   61   57
+1961   72   83   71   78
+1962   79   71   62   74
+1963   76   64   62   57
+1964   80   73   69   69
+1965   71   64   69   62
+1966   63   46   56   44
+1967   44   52   38   46
+1968   36   49   35   44
+1969   59   65   65   56
+1970   66   53   61   52
+1971   51   48   54   49
+1972   49   61   NA   NA
+1973   68   44   40   27
+1974   28   25   24   24
+> acf(presidents, na.action = na.pass)
+> pacf(presidents, na.action = na.pass)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("acf2AR")
+> ### * acf2AR
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: acf2AR
+> ### Title: Compute an AR Process Exactly Fitting an ACF
+> ### Aliases: acf2AR
+> ### Keywords: ts
+> 
+> ### ** Examples
+> 
+> (Acf <- ARMAacf(c(0.6, 0.3, -0.2)))
+        0         1         2         3 
+1.0000000 0.6923077 0.5769231 0.3538462 
+> acf2AR(Acf)
+              1      2    3
+ar(1) 0.6923077 0.0000  0.0
+ar(2) 0.5625000 0.1875  0.0
+ar(3) 0.6000000 0.3000 -0.2
+> 
+> 
+> 
+> cleanEx()
+> nameEx("add1")
+> ### * add1
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: add1
+> ### Title: Add or Drop All Possible Single Terms to a Model
+> ### Aliases: add1 add1.default add1.lm add1.glm drop1 drop1.default
+> ###   drop1.lm drop1.glm
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> ## Don't show: 
+> od <- options(digits = 5)
+> ## End(Don't show)
+> require(graphics); require(utils)
+> ## following example(swiss)
+> lm1 <- lm(Fertility ~ ., data = swiss)
+> add1(lm1, ~ I(Education^2) + .^2)
+Single term additions
+
+Model:
+Fertility ~ Agriculture + Examination + Education + Catholic + 
+    Infant.Mortality
+                             Df Sum of Sq  RSS AIC
+<none>                                    2105 191
+I(Education^2)                1      11.8 2093 192
+Agriculture:Examination       1      10.7 2094 192
+Agriculture:Education         1       1.8 2103 193
+Agriculture:Catholic          1      75.0 2030 191
+Agriculture:Infant.Mortality  1       4.4 2101 193
+Examination:Education         1      48.7 2056 192
+Examination:Catholic          1      40.8 2064 192
+Examination:Infant.Mortality  1      65.9 2039 191
+Education:Catholic            1     278.2 1827 186
+Education:Infant.Mortality    1      93.0 2012 191
+Catholic:Infant.Mortality     1       2.4 2103 193
+> drop1(lm1, test = "F")  # So called 'type II' anova
+Single term deletions
+
+Model:
+Fertility ~ Agriculture + Examination + Education + Catholic + 
+    Infant.Mortality
+                 Df Sum of Sq  RSS AIC F value  Pr(>F)    
+<none>                        2105 191                    
+Agriculture       1       308 2413 195    5.99  0.0187 *  
+Examination       1        53 2158 190    1.03  0.3155    
+Education         1      1163 3268 209   22.64 2.4e-05 ***
+Catholic          1       448 2553 198    8.72  0.0052 ** 
+Infant.Mortality  1       409 2514 197    7.96  0.0073 ** 
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> 
+> ## following example(glm)
+> ## Don't show: 
+> example(glm, echo = FALSE)
+  treatment outcome counts
+1         1       1     18
+2         1       2     17
+3         1       3     15
+4         2       1     20
+5         2       2     10
+6         2       3     20
+7         3       1     25
+8         3       2     13
+9         3       3     12
+> ## End(Don't show)
+> drop1(glm.D93, test = "Chisq")
+Single term deletions
+
+Model:
+counts ~ outcome + treatment
+          Df Deviance  AIC  LRT Pr(>Chi)  
+<none>           5.13 56.8                
+outcome    2    10.58 58.2 5.45    0.065 .
+treatment  2     5.13 52.8 0.00    1.000  
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> drop1(glm.D93, test = "F")
+Warning in drop1.glm(glm.D93, test = "F") :
+  F test assumes 'quasipoisson' family
+Single term deletions
+
+Model:
+counts ~ outcome + treatment
+          Df Deviance  AIC F value Pr(>F)
+<none>           5.13 56.8               
+outcome    2    10.58 58.2    2.13   0.23
+treatment  2     5.13 52.8    0.00   1.00
+> add1(glm.D93, scope = ~outcome*treatment, test = "Rao") ## Pearson Chi-square
+Single term additions
+
+Model:
+counts ~ outcome + treatment
+                  Df Deviance  AIC Rao score Pr(>Chi)
+<none>                   5.13 56.8                   
+outcome:treatment  4     0.00 59.6      5.17     0.27
+> ## Don't show: 
+> options(od)
+> ## End(Don't show)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("addmargins")
+> ### * addmargins
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: addmargins
+> ### Title: Puts Arbitrary Margins on Multidimensional Tables or Arrays
+> ### Aliases: addmargins
+> ### Keywords: manip array
+> 
+> ### ** Examples
+> 
+> Aye <- sample(c("Yes", "Si", "Oui"), 177, replace = TRUE)
+> Bee <- sample(c("Hum", "Buzz"), 177, replace = TRUE)
+> Sea <- sample(c("White", "Black", "Red", "Dead"), 177, replace = TRUE)
+> (A <- table(Aye, Bee, Sea))
+, , Sea = Black
+
+     Bee
+Aye   Buzz Hum
+  Oui    2  11
+  Si     8  13
+  Yes    7   6
+
+, , Sea = Dead
+
+     Bee
+Aye   Buzz Hum
+  Oui    5  10
+  Si    10  10
+  Yes    7   6
+
+, , Sea = Red
+
+     Bee
+Aye   Buzz Hum
+  Oui    5   6
+  Si    11   5
+  Yes    7   7
+
+, , Sea = White
+
+     Bee
+Aye   Buzz Hum
+  Oui    7   9
+  Si     4  12
+  Yes    3   6
+
+> addmargins(A)
+, , Sea = Black
+
+     Bee
+Aye   Buzz Hum Sum
+  Oui    2  11  13
+  Si     8  13  21
+  Yes    7   6  13
+  Sum   17  30  47
+
+, , Sea = Dead
+
+     Bee
+Aye   Buzz Hum Sum
+  Oui    5  10  15
+  Si    10  10  20
+  Yes    7   6  13
+  Sum   22  26  48
+
+, , Sea = Red
+
+     Bee
+Aye   Buzz Hum Sum
+  Oui    5   6  11
+  Si    11   5  16
+  Yes    7   7  14
+  Sum   23  18  41
+
+, , Sea = White
+
+     Bee
+Aye   Buzz Hum Sum
+  Oui    7   9  16
+  Si     4  12  16
+  Yes    3   6   9
+  Sum   14  27  41
+
+, , Sea = Sum
+
+     Bee
+Aye   Buzz Hum Sum
+  Oui   19  36  55
+  Si    33  40  73
+  Yes   24  25  49
+  Sum   76 101 177
+
+> ## Don't show: 
+> stopifnot(is.table(addmargins(A)))
+> ## End(Don't show)
+> ftable(A)
+         Sea Black Dead Red White
+Aye Bee                          
+Oui Buzz         2    5   5     7
+    Hum         11   10   6     9
+Si  Buzz         8   10  11     4
+    Hum         13   10   5    12
+Yes Buzz         7    7   7     3
+    Hum          6    6   7     6
+> ftable(addmargins(A))
+         Sea Black Dead Red White Sum
+Aye Bee                              
+Oui Buzz         2    5   5     7  19
+    Hum         11   10   6     9  36
+    Sum         13   15  11    16  55
+Si  Buzz         8   10  11     4  33
+    Hum         13   10   5    12  40
+    Sum         21   20  16    16  73
+Yes Buzz         7    7   7     3  24
+    Hum          6    6   7     6  25
+    Sum         13   13  14     9  49
+Sum Buzz        17   22  23    14  76
+    Hum         30   26  18    27 101
+    Sum         47   48  41    41 177
+> 
+> # Non-commutative functions - note differences between resulting tables:
+> ftable(addmargins(A, c(1, 3),
++        FUN = list(Sum = sum, list(Min = min, Max = max))))
+Margins computed over dimensions
+in the following order:
+1: Aye
+2: Sea
+         Sea Black Dead Red White Min Max
+Aye Bee                                  
+Oui Buzz         2    5   5     7   2   7
+    Hum         11   10   6     9   6  11
+Si  Buzz         8   10  11     4   4  11
+    Hum         13   10   5    12   5  13
+Yes Buzz         7    7   7     3   3   7
+    Hum          6    6   7     6   6   7
+Sum Buzz        17   22  23    14  14  23
+    Hum         30   26  18    27  18  30
+> ftable(addmargins(A, c(3, 1),
++        FUN = list(list(Min = min, Max = max), Sum = sum)))
+Margins computed over dimensions
+in the following order:
+1: Sea
+2: Aye
+         Sea Black Dead Red White Min Max
+Aye Bee                                  
+Oui Buzz         2    5   5     7   2   7
+    Hum         11   10   6     9   6  11
+Si  Buzz         8   10  11     4   4  11
+    Hum         13   10   5    12   5  13
+Yes Buzz         7    7   7     3   3   7
+    Hum          6    6   7     6   6   7
+Sum Buzz        17   22  23    14   9  25
+    Hum         30   26  18    27  17  31
+> 
+> # Weird function needed to return the N when computing percentages
+> sqsm <- function(x) sum(x)^2/100
+> B <- table(Sea, Bee)
+> round(sweep(addmargins(B, 1, list(list(All = sum, N = sqsm))), 2,
++             apply(B, 2, sum)/100, "/"), 1)
+       Bee
+Sea      Buzz   Hum
+  Black  22.4  29.7
+  Dead   28.9  25.7
+  Red    30.3  17.8
+  White  18.4  26.7
+  All   100.0 100.0
+  N      76.0 101.0
+> round(sweep(addmargins(B, 2, list(list(All = sum, N = sqsm))), 1,
++             apply(B, 1, sum)/100, "/"), 1)
+       Bee
+Sea      Buzz   Hum   All     N
+  Black  36.2  63.8 100.0  47.0
+  Dead   45.8  54.2 100.0  48.0
+  Red    56.1  43.9 100.0  41.0
+  White  34.1  65.9 100.0  41.0
+> 
+> # A total over Bee requires formation of the Bee-margin first:
+> mB <-  addmargins(B, 2, FUN = list(list(Total = sum)))
+> round(ftable(sweep(addmargins(mB, 1, list(list(All = sum, N = sqsm))), 2,
++                    apply(mB, 2, sum)/100, "/")), 1)
+      Bee  Buzz   Hum Total
+Sea                        
+Black      22.4  29.7  26.6
+Dead       28.9  25.7  27.1
+Red        30.3  17.8  23.2
+White      18.4  26.7  23.2
+All       100.0 100.0 100.0
+N          76.0 101.0 177.0
+> 
+> ## Zero.Printing table+margins:
+> set.seed(1)
+> x <- sample( 1:7, 20, replace = TRUE)
+> y <- sample( 1:7, 20, replace = TRUE)
+> tx <- addmargins( table(x, y) )
+> print(tx, zero.print = ".")
+     y
+x      1  2  3  4  5  6  7 Sum
+  1    .  .  1  .  .  .  .   1
+  2    .  1  .  1  1  .  1   4
+  3    .  2  .  .  .  1  .   3
+  4    .  .  .  .  1  .  .   1
+  5    .  .  1  1  1  .  1   4
+  6    .  .  1  .  .  2  .   3
+  7    3  .  1  .  .  .  .   4
+  Sum  3  3  4  2  3  3  2  20
+> 
+> 
+> 
+> cleanEx()
+> nameEx("aggregate")
+> ### * aggregate
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: aggregate
+> ### Title: Compute Summary Statistics of Data Subsets
+> ### Aliases: aggregate aggregate.default aggregate.data.frame
+> ###   aggregate.formula aggregate.ts
+> ### Keywords: category array
+> 
+> ### ** Examples
+> 
+> ## Compute the averages for the variables in 'state.x77', grouped
+> ## according to the region (Northeast, South, North Central, West) that
+> ## each state belongs to.
+> aggregate(state.x77, list(Region = state.region), mean)
+         Region Population   Income Illiteracy Life Exp    Murder  HS Grad
+1     Northeast   5495.111 4570.222   1.000000 71.26444  4.722222 53.96667
+2         South   4208.125 4011.938   1.737500 69.70625 10.581250 44.34375
+3 North Central   4803.000 4611.083   0.700000 71.76667  5.275000 54.51667
+4          West   2915.308 4702.615   1.023077 71.23462  7.215385 62.00000
+     Frost      Area
+1 132.7778  18141.00
+2  64.6250  54605.12
+3 138.8333  62652.00
+4 102.1538 134463.00
+> 
+> ## Compute the averages according to region and the occurrence of more
+> ## than 130 days of frost.
+> aggregate(state.x77,
++           list(Region = state.region,
++                Cold = state.x77[,"Frost"] > 130),
++           mean)
+         Region  Cold Population   Income Illiteracy Life Exp    Murder
+1     Northeast FALSE  8802.8000 4780.400  1.1800000 71.12800  5.580000
+2         South FALSE  4208.1250 4011.938  1.7375000 69.70625 10.581250
+3 North Central FALSE  7233.8333 4633.333  0.7833333 70.95667  8.283333
+4          West FALSE  4582.5714 4550.143  1.2571429 71.70000  6.828571
+5     Northeast  TRUE  1360.5000 4307.500  0.7750000 71.43500  3.650000
+6 North Central  TRUE  2372.1667 4588.833  0.6166667 72.57667  2.266667
+7          West  TRUE   970.1667 4880.500  0.7500000 70.69167  7.666667
+   HS Grad    Frost      Area
+1 52.06000 110.6000  21838.60
+2 44.34375  64.6250  54605.12
+3 53.36667 120.0000  56736.50
+4 60.11429  51.0000  91863.71
+5 56.35000 160.5000  13519.00
+6 55.66667 157.6667  68567.50
+7 64.20000 161.8333 184162.17
+> ## (Note that no state in 'South' is THAT cold.)
+> 
+> 
+> ## example with character variables and NAs
+> testDF <- data.frame(v1 = c(1,3,5,7,8,3,5,NA,4,5,7,9),
++                      v2 = c(11,33,55,77,88,33,55,NA,44,55,77,99) )
+> by1 <- c("red", "blue", 1, 2, NA, "big", 1, 2, "red", 1, NA, 12)
+> by2 <- c("wet", "dry", 99, 95, NA, "damp", 95, 99, "red", 99, NA, NA)
+> aggregate(x = testDF, by = list(by1, by2), FUN = "mean")
+  Group.1 Group.2 v1 v2
+1       1      95  5 55
+2       2      95  7 77
+3       1      99  5 55
+4       2      99 NA NA
+5     big    damp  3 33
+6    blue     dry  3 33
+7     red     red  4 44
+8     red     wet  1 11
+> 
+> # and if you want to treat NAs as a group
+> fby1 <- factor(by1, exclude = "")
+> fby2 <- factor(by2, exclude = "")
+> aggregate(x = testDF, by = list(fby1, fby2), FUN = "mean")
+   Group.1 Group.2  v1   v2
+1        1      95 5.0 55.0
+2        2      95 7.0 77.0
+3        1      99 5.0 55.0
+4        2      99  NA   NA
+5      big    damp 3.0 33.0
+6     blue     dry 3.0 33.0
+7      red     red 4.0 44.0
+8      red     wet 1.0 11.0
+9       12    <NA> 9.0 99.0
+10    <NA>    <NA> 7.5 82.5
+> 
+> 
+> ## Formulas, one ~ one, one ~ many, many ~ one, and many ~ many:
+> aggregate(weight ~ feed, data = chickwts, mean)
+       feed   weight
+1    casein 323.5833
+2 horsebean 160.2000
+3   linseed 218.7500
+4  meatmeal 276.9091
+5   soybean 246.4286
+6 sunflower 328.9167
+> aggregate(breaks ~ wool + tension, data = warpbreaks, mean)
+  wool tension   breaks
+1    A       L 44.55556
+2    B       L 28.22222
+3    A       M 24.00000
+4    B       M 28.77778
+5    A       H 24.55556
+6    B       H 18.77778
+> aggregate(cbind(Ozone, Temp) ~ Month, data = airquality, mean)
+  Month    Ozone     Temp
+1     5 23.61538 66.73077
+2     6 29.44444 78.22222
+3     7 59.11538 83.88462
+4     8 59.96154 83.96154
+5     9 31.44828 76.89655
+> aggregate(cbind(ncases, ncontrols) ~ alcgp + tobgp, data = esoph, sum)
+       alcgp    tobgp ncases ncontrols
+1  0-39g/day 0-9g/day      9       261
+2      40-79 0-9g/day     34       179
+3     80-119 0-9g/day     19        61
+4       120+ 0-9g/day     16        24
+5  0-39g/day    10-19     10        84
+6      40-79    10-19     17        85
+7     80-119    10-19     19        49
+8       120+    10-19     12        18
+9  0-39g/day    20-29      5        42
+10     40-79    20-29     15        62
+11    80-119    20-29      6        16
+12      120+    20-29      7        12
+13 0-39g/day      30+      5        28
+14     40-79      30+      9        29
+15    80-119      30+      7        12
+16      120+      30+     10        13
+> 
+> ## Dot notation:
+> aggregate(. ~ Species, data = iris, mean)
+     Species Sepal.Length Sepal.Width Petal.Length Petal.Width
+1     setosa        5.006       3.428        1.462       0.246
+2 versicolor        5.936       2.770        4.260       1.326
+3  virginica        6.588       2.974        5.552       2.026
+> aggregate(len ~ ., data = ToothGrowth, mean)
+  supp dose   len
+1   OJ  0.5 13.23
+2   VC  0.5  7.98
+3   OJ  1.0 22.70
+4   VC  1.0 16.77
+5   OJ  2.0 26.06
+6   VC  2.0 26.14
+> 
+> ## Often followed by xtabs():
+> ag <- aggregate(len ~ ., data = ToothGrowth, mean)
+> xtabs(len ~ ., data = ag)
+    dose
+supp   0.5     1     2
+  OJ 13.23 22.70 26.06
+  VC  7.98 16.77 26.14
+> 
+> 
+> ## Compute the average annual approval ratings for American presidents.
+> aggregate(presidents, nfrequency = 1, FUN = mean)
+Time Series:
+Start = 1945 
+End = 1974 
+Frequency = 1 
+ [1]    NA 47.00 51.00    NA 58.50 41.75 28.75    NA 67.00 65.00 72.75 72.25
+[13] 65.25 52.25 61.50 62.75 76.00 71.50 64.75 72.75 66.50 52.25 45.00 41.00
+[25] 61.25 58.00 50.50    NA 44.75 25.25
+> ## Give the summer less weight.
+> aggregate(presidents, nfrequency = 1,
++           FUN = weighted.mean, w = c(1, 1, 0.5, 1))
+Time Series:
+Start = 1945 
+End = 1974 
+Frequency = 1 
+ [1]       NA 47.57143 50.57143       NA 58.71429 41.14286 28.28571       NA
+ [9] 65.85714 64.14286 71.85714 73.00000 65.57143 52.85714 61.57143 63.00000
+[17] 76.71429 72.85714 65.14286 73.28571 66.14286 51.71429 46.00000 41.85714
+[25] 60.71429 57.57143 50.00000       NA 45.42857 25.42857
+> 
+> 
+> 
+> cleanEx()
+> nameEx("alias")
+> ### * alias
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: alias
+> ### Title: Find Aliases (Dependencies) in a Model
+> ### Aliases: alias alias.formula alias.lm
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> 
+> cleanEx()
+> nameEx("anova.glm")
+> ### * anova.glm
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: anova.glm
+> ### Title: Analysis of Deviance for Generalized Linear Model Fits
+> ### Aliases: anova.glm
+> ### Keywords: models regression
+> 
+> ### ** Examples
+> 
+> ## --- Continuing the Example from  '?glm':
+> ## Don't show: 
+> require(utils)
+> example("glm", echo = FALSE)
+  treatment outcome counts
+1         1       1     18
+2         1       2     17
+3         1       3     15
+4         2       1     20
+5         2       2     10
+6         2       3     20
+7         3       1     25
+8         3       2     13
+9         3       3     12
+> ## End(Don't show)
+> anova(glm.D93)
+Analysis of Deviance Table
+
+Model: poisson, link: log
+
+Response: counts
+
+Terms added sequentially (first to last)
+
+
+          Df Deviance Resid. Df Resid. Dev
+NULL                          8    10.5814
+outcome    2   5.4523         6     5.1291
+treatment  2   0.0000         4     5.1291
+> anova(glm.D93, test = "Cp")
+Analysis of Deviance Table
+
+Model: poisson, link: log
+
+Response: counts
+
+Terms added sequentially (first to last)
+
+
+          Df Deviance Resid. Df Resid. Dev     Cp
+NULL                          8    10.5814 12.581
+outcome    2   5.4523         6     5.1291 11.129
+treatment  2   0.0000         4     5.1291 15.129
+> anova(glm.D93, test = "Chisq")
+Analysis of Deviance Table
+
+Model: poisson, link: log
+
+Response: counts
+
+Terms added sequentially (first to last)
+
+
+          Df Deviance Resid. Df Resid. Dev Pr(>Chi)  
+NULL                          8    10.5814           
+outcome    2   5.4523         6     5.1291  0.06547 .
+treatment  2   0.0000         4     5.1291  1.00000  
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> glm.D93a <-
++    update(glm.D93, ~treatment*outcome) # equivalent to Pearson Chi-square
+> anova(glm.D93, glm.D93a, test = "Rao")
+Analysis of Deviance Table
+
+Model 1: counts ~ outcome + treatment
+Model 2: counts ~ treatment + outcome + treatment:outcome
+  Resid. Df Resid. Dev Df Deviance    Rao Pr(>Chi)
+1         4     5.1291                            
+2         0     0.0000  4   5.1291 5.1732     0.27
+> 
+> 
+> 
+> cleanEx()
+> nameEx("anova.lm")
+> ### * anova.lm
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: anova.lm
+> ### Title: ANOVA for Linear Model Fits
+> ### Aliases: anova.lm anova.lmlist
+> ### Keywords: regression models
+> 
+> ### ** Examples
+> 
+> ## sequential table
+> fit <- lm(sr ~ ., data = LifeCycleSavings)
+> anova(fit)
+Analysis of Variance Table
+
+Response: sr
+          Df Sum Sq Mean Sq F value    Pr(>F)    
+pop15      1 204.12 204.118 14.1157 0.0004922 ***
+pop75      1  53.34  53.343  3.6889 0.0611255 .  
+dpi        1  12.40  12.401  0.8576 0.3593551    
+ddpi       1  63.05  63.054  4.3605 0.0424711 *  
+Residuals 45 650.71  14.460                      
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> 
+> ## same effect via separate models
+> fit0 <- lm(sr ~ 1, data = LifeCycleSavings)
+> fit1 <- update(fit0, . ~ . + pop15)
+> fit2 <- update(fit1, . ~ . + pop75)
+> fit3 <- update(fit2, . ~ . + dpi)
+> fit4 <- update(fit3, . ~ . + ddpi)
+> anova(fit0, fit1, fit2, fit3, fit4, test = "F")
+Analysis of Variance Table
+
+Model 1: sr ~ 1
+Model 2: sr ~ pop15
+Model 3: sr ~ pop15 + pop75
+Model 4: sr ~ pop15 + pop75 + dpi
+Model 5: sr ~ pop15 + pop75 + dpi + ddpi
+  Res.Df    RSS Df Sum of Sq       F    Pr(>F)    
+1     49 983.63                                   
+2     48 779.51  1   204.118 14.1157 0.0004922 ***
+3     47 726.17  1    53.343  3.6889 0.0611255 .  
+4     46 713.77  1    12.401  0.8576 0.3593551    
+5     45 650.71  1    63.054  4.3605 0.0424711 *  
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> 
+> anova(fit4, fit2, fit0, test = "F") # unconventional order
+Analysis of Variance Table
+
+Model 1: sr ~ pop15 + pop75 + dpi + ddpi
+Model 2: sr ~ pop15 + pop75
+Model 3: sr ~ 1
+  Res.Df    RSS Df Sum of Sq      F    Pr(>F)    
+1     45 650.71                                  
+2     47 726.17 -2   -75.455 2.6090 0.0847088 .  
+3     49 983.63 -2  -257.460 8.9023 0.0005527 ***
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> 
+> 
+> 
+> cleanEx()
+> nameEx("anova.mlm")
+> ### * anova.mlm
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: anova.mlm
+> ### Title: Comparisons between Multivariate Linear Models
+> ### Aliases: anova.mlm
+> ### Keywords: regression models multivariate
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> utils::example(SSD) # Brings in the mlmfit and reacttime objects
+
+SSD> # Lifted from Baron+Li:
+SSD> # "Notes on the use of R for psychology experiments and questionnaires"
+SSD> # Maxwell and Delaney, p. 497
+SSD> reacttime <- matrix(c(
+SSD+ 420, 420, 480, 480, 600, 780,
+SSD+ 420, 480, 480, 360, 480, 600,
+SSD+ 480, 480, 540, 660, 780, 780,
+SSD+ 420, 540, 540, 480, 780, 900,
+SSD+ 540, 660, 540, 480, 660, 720,
+SSD+ 360, 420, 360, 360, 480, 540,
+SSD+ 480, 480, 600, 540, 720, 840,
+SSD+ 480, 600, 660, 540, 720, 900,
+SSD+ 540, 600, 540, 480, 720, 780,
+SSD+ 480, 420, 540, 540, 660, 780),
+SSD+ ncol = 6, byrow = TRUE,
+SSD+ dimnames = list(subj = 1:10,
+SSD+               cond = c("deg0NA", "deg4NA", "deg8NA",
+SSD+                        "deg0NP", "deg4NP", "deg8NP")))
+
+SSD> mlmfit <- lm(reacttime ~ 1)
+
+SSD> SSD(mlmfit)
+$SSD
+        cond
+cond     deg0NA deg4NA deg8NA deg0NP deg4NP deg8NP
+  deg0NA  29160  30600  26640  23760  32400  25560
+  deg4NA  30600  66600  32400   7200  36000  30600
+  deg8NA  26640  32400  56160  41040  57600  69840
+  deg0NP  23760   7200  41040  70560  72000  63360
+  deg4NP  32400  36000  57600  72000 108000 100800
+  deg8NP  25560  30600  69840  63360 100800 122760
+
+$call
+lm(formula = reacttime ~ 1)
+
+$df
+[1] 9
+
+attr(,"class")
+[1] "SSD"
+
+SSD> estVar(mlmfit)
+        cond
+cond     deg0NA deg4NA deg8NA deg0NP deg4NP deg8NP
+  deg0NA   3240   3400   2960   2640   3600   2840
+  deg4NA   3400   7400   3600    800   4000   3400
+  deg8NA   2960   3600   6240   4560   6400   7760
+  deg0NP   2640    800   4560   7840   8000   7040
+  deg4NP   3600   4000   6400   8000  12000  11200
+  deg8NP   2840   3400   7760   7040  11200  13640
+> 
+> mlmfit0 <- update(mlmfit, ~0)
+> 
+> ### Traditional tests of intrasubj. contrasts
+> ## Using MANOVA techniques on contrasts:
+> anova(mlmfit, mlmfit0, X = ~1)
+Analysis of Variance Table
+
+Model 1: reacttime ~ 1
+Model 2: reacttime ~ 1 - 1
+
+Contrasts orthogonal to
+~1
+
+  Res.Df Df Gen.var. Pillai approx F num Df den Df   Pr(>F)   
+1      9      1249.6                                          
+2     10  1   2013.2 0.9456   17.381      5      5 0.003534 **
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> 
+> ## Assuming sphericity
+> anova(mlmfit, mlmfit0, X = ~1, test = "Spherical")
+Analysis of Variance Table
+
+Model 1: reacttime ~ 1
+Model 2: reacttime ~ 1 - 1
+
+Contrasts orthogonal to
+~1
+
+Greenhouse-Geisser epsilon: 0.4855
+Huynh-Feldt epsilon:        0.6778
+
+  Res.Df Df Gen.var.      F num Df den Df     Pr(>F)    G-G Pr    H-F Pr
+1      9      1249.6                                                    
+2     10  1   2013.2 38.028      5     45 4.4711e-15 2.532e-08 7.393e-11
+> 
+> 
+> ### tests using intra-subject 3x2 design
+> idata <- data.frame(deg = gl(3, 1, 6, labels = c(0, 4, 8)),
++                     noise = gl(2, 3, 6, labels = c("A", "P")))
+> 
+> anova(mlmfit, mlmfit0, X = ~ deg + noise,
++       idata = idata, test = "Spherical")
+Analysis of Variance Table
+
+Model 1: reacttime ~ 1
+Model 2: reacttime ~ 1 - 1
+
+Contrasts orthogonal to
+~deg + noise
+
+Greenhouse-Geisser epsilon: 0.904
+Huynh-Feldt epsilon:        1.118
+
+  Res.Df Df Gen.var.     F num Df den Df     Pr(>F)     G-G Pr     H-F Pr
+1      9      316.58                                                     
+2     10  1   996.34 45.31      2     18 9.4241e-08 3.4539e-07 9.4241e-08
+> anova(mlmfit, mlmfit0, M = ~ deg + noise, X = ~ noise,
++       idata = idata, test = "Spherical" )
+Analysis of Variance Table
+
+Model 1: reacttime ~ 1
+Model 2: reacttime ~ 1 - 1
+
+Contrasts orthogonal to
+~noise
+
+
+Contrasts spanned by
+~deg + noise
+
+Greenhouse-Geisser epsilon: 0.9616
+Huynh-Feldt epsilon:        1.2176
+
+  Res.Df Df Gen.var.      F num Df den Df     Pr(>F)     G-G Pr     H-F Pr
+1      9      1007.0                                                      
+2     10  1   2703.2 40.719      2     18 2.0868e-07 3.4017e-07 2.0868e-07
+> anova(mlmfit, mlmfit0, M = ~ deg + noise, X = ~ deg,
++       idata = idata, test = "Spherical" )
+Analysis of Variance Table
+
+Model 1: reacttime ~ 1
+Model 2: reacttime ~ 1 - 1
+
+Contrasts orthogonal to
+~deg
+
+
+Contrasts spanned by
+~deg + noise
+
+Greenhouse-Geisser epsilon: 1
+Huynh-Feldt epsilon:        1
+
+  Res.Df Df Gen.var.      F num Df den Df     Pr(>F)     G-G Pr     H-F Pr
+1      9        1410                                                      
+2     10  1     6030 33.766      1      9 0.00025597 0.00025597 0.00025597
+> 
+> f <- factor(rep(1:2, 5)) # bogus, just for illustration
+> mlmfit2 <- update(mlmfit, ~f)
+> anova(mlmfit2, mlmfit, mlmfit0, X = ~1, test = "Spherical")
+Analysis of Variance Table
+
+Model 1: reacttime ~ f
+Model 2: reacttime ~ 1
+Model 3: reacttime ~ 1 - 1
+
+Contrasts orthogonal to
+~1
+
+Greenhouse-Geisser epsilon: 0.4691
+Huynh-Feldt epsilon:        0.6758
+
+  Res.Df Df Gen.var.       F num Df den Df  Pr(>F)  G-G Pr  H-F Pr
+1      8      1337.3                                              
+2      9  1   1249.6  0.2743      5     40 0.92452 0.79608 0.86456
+3     10  1   2013.2 34.9615      5     40 0.00000 0.00000 0.00000
+> anova(mlmfit2, X = ~1, test = "Spherical")
+Analysis of Variance Table
+
+
+Contrasts orthogonal to
+~1
+
+Greenhouse-Geisser epsilon: 0.4691
+Huynh-Feldt epsilon:        0.6758
+
+            Df       F num Df den Df  Pr(>F)  G-G Pr  H-F Pr
+(Intercept)  1 34.9615      5     40 0.00000 0.00000 0.00000
+f            1  0.2743      5     40 0.92452 0.79608 0.86456
+Residuals    8                                              
+> # one-model form, eqiv. to previous
+> 
+> ### There seems to be a strong interaction in these data
+> plot(colMeans(reacttime))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("ansari.test")
+> ### * ansari.test
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: ansari.test
+> ### Title: Ansari-Bradley Test
+> ### Aliases: ansari.test ansari.test.default ansari.test.formula
+> ### Keywords: htest
+> 
+> ### ** Examples
+> 
+> ## Hollander & Wolfe (1973, p. 86f):
+> ## Serum iron determination using Hyland control sera
+> ramsay <- c(111, 107, 100, 99, 102, 106, 109, 108, 104, 99,
++             101, 96, 97, 102, 107, 113, 116, 113, 110, 98)
+> jung.parekh <- c(107, 108, 106, 98, 105, 103, 110, 105, 104,
++             100, 96, 108, 103, 104, 114, 114, 113, 108, 106, 99)
+> ansari.test(ramsay, jung.parekh)
+Warning in ansari.test.default(ramsay, jung.parekh) :
+  cannot compute exact p-value with ties
+
+	Ansari-Bradley test
+
+data:  ramsay and jung.parekh
+AB = 185.5, p-value = 0.1815
+alternative hypothesis: true ratio of scales is not equal to 1
+
+> 
+> ansari.test(rnorm(10), rnorm(10, 0, 2), conf.int = TRUE)
+
+	Ansari-Bradley test
+
+data:  rnorm(10) and rnorm(10, 0, 2)
+AB = 69, p-value = 0.03831
+alternative hypothesis: true ratio of scales is not equal to 1
+95 percent confidence interval:
+ 0.1852324 0.9712857
+sample estimates:
+ratio of scales 
+      0.4007458 
+
+> 
+> ## try more points - failed in 2.4.1
+> ansari.test(rnorm(100), rnorm(100, 0, 2), conf.int = TRUE)
+
+	Ansari-Bradley test
+
+data:  rnorm(100) and rnorm(100, 0, 2)
+AB = 6180, p-value = 3.347e-08
+alternative hypothesis: true ratio of scales is not equal to 1
+95 percent confidence interval:
+ 0.3330596 0.5693532
+sample estimates:
+ratio of scales 
+      0.4346784 
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("aov")
+> ### * aov
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: aov
+> ### Title: Fit an Analysis of Variance Model
+> ### Aliases: aov print.aov print.aovlist Error
+> ### Keywords: models regression
+> 
+> ### ** Examples
+> 
+> ## From Venables and Ripley (2002) p.165.
+> 
+> ## Set orthogonal contrasts.
+> op <- options(contrasts = c("contr.helmert", "contr.poly"))
+> ( npk.aov <- aov(yield ~ block + N*P*K, npk) )
+Call:
+   aov(formula = yield ~ block + N * P * K, data = npk)
+
+Terms:
+                   block        N        P        K      N:P      N:K      P:K
+Sum of Squares  343.2950 189.2817   8.4017  95.2017  21.2817  33.1350   0.4817
+Deg. of Freedom        5        1        1        1        1        1        1
+                Residuals
+Sum of Squares   185.2867
+Deg. of Freedom        12
+
+Residual standard error: 3.929447
+1 out of 13 effects not estimable
+Estimated effects are balanced
+> coefficients(npk.aov)
+(Intercept)      block1      block2      block3      block4      block5 
+ 54.8750000   1.7125000   1.6791667  -1.8229167  -1.0137500   0.2950000 
+         N1          P1          K1       N1:P1       N1:K1       P1:K1 
+  2.8083333  -0.5916667  -1.9916667  -0.9416667  -1.1750000   0.1416667 
+> 
+> ## to show the effects of re-ordering terms contrast the two fits
+> aov(yield ~ block + N * P + K, npk)
+Call:
+   aov(formula = yield ~ block + N * P + K, data = npk)
+
+Terms:
+                   block        N        P        K      N:P Residuals
+Sum of Squares  343.2950 189.2817   8.4017  95.2017  21.2817  218.9033
+Deg. of Freedom        5        1        1        1        1        14
+
+Residual standard error: 3.954232
+Estimated effects are balanced
+> aov(terms(yield ~ block + N * P + K, keep.order = TRUE), npk)
+Call:
+   aov(formula = terms(yield ~ block + N * P + K, keep.order = TRUE), 
+    data = npk)
+
+Terms:
+                   block        N        P      N:P        K Residuals
+Sum of Squares  343.2950 189.2817   8.4017  21.2817  95.2017  218.9033
+Deg. of Freedom        5        1        1        1        1        14
+
+Residual standard error: 3.954232
+Estimated effects are balanced
+> 
+> 
+> ## as a test, not particularly sensible statistically
+> npk.aovE <- aov(yield ~  N*P*K + Error(block), npk)
+> npk.aovE
+
+Call:
+aov(formula = yield ~ N * P * K + Error(block), data = npk)
+
+Grand Mean: 54.875
+
+Stratum 1: block
+
+Terms:
+                    N:P:K Residuals
+Sum of Squares   37.00167 306.29333
+Deg. of Freedom         1         4
+
+Residual standard error: 8.750619
+Estimated effects are balanced
+
+Stratum 2: Within
+
+Terms:
+                        N         P         K       N:P       N:K       P:K
+Sum of Squares  189.28167   8.40167  95.20167  21.28167  33.13500   0.48167
+Deg. of Freedom         1         1         1         1         1         1
+                Residuals
+Sum of Squares  185.28667
+Deg. of Freedom        12
+
+Residual standard error: 3.929447
+Estimated effects are balanced
+> summary(npk.aovE)
+
+Error: block
+          Df Sum Sq Mean Sq F value Pr(>F)
+N:P:K      1   37.0   37.00   0.483  0.525
+Residuals  4  306.3   76.57               
+
+Error: Within
+          Df Sum Sq Mean Sq F value  Pr(>F)   
+N          1 189.28  189.28  12.259 0.00437 **
+P          1   8.40    8.40   0.544 0.47490   
+K          1  95.20   95.20   6.166 0.02880 * 
+N:P        1  21.28   21.28   1.378 0.26317   
+N:K        1  33.14   33.14   2.146 0.16865   
+P:K        1   0.48    0.48   0.031 0.86275   
+Residuals 12 185.29   15.44                   
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> options(op)  # reset to previous
+> 
+> 
+> 
+> base::options(contrasts = c(unordered = "contr.treatment",ordered = "contr.poly"))
+> cleanEx()
+> nameEx("approxfun")
+> ### * approxfun
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: approxfun
+> ### Title: Interpolation Functions
+> ### Aliases: approx approxfun
+> ### Keywords: arith dplot
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> x <- 1:10
+> y <- rnorm(10)
+> par(mfrow = c(2,1))
+> plot(x, y, main = "approx(.) and approxfun(.)")
+> points(approx(x, y), col = 2, pch = "*")
+> points(approx(x, y, method = "constant"), col = 4, pch = "*")
+> 
+> f <- approxfun(x, y)
+> curve(f(x), 0, 11, col = "green2")
+> points(x, y)
+> is.function(fc <- approxfun(x, y, method = "const")) # TRUE
+[1] TRUE
+> curve(fc(x), 0, 10, col = "darkblue", add = TRUE)
+> ## different extrapolation on left and right side :
+> plot(approxfun(x, y, rule = 2:1), 0, 11,
++      col = "tomato", add = TRUE, lty = 3, lwd = 2)
+> 
+> ## Show treatment of 'ties' :
+> 
+> x <- c(2,2:4,4,4,5,5,7,7,7)
+> y <- c(1:6, 5:4, 3:1)
+> approx(x, y, xout = x)$y # warning
+ [1] 1.5 1.5 3.0 5.0 5.0 5.0 4.5 4.5 2.0 2.0 2.0
+> (ay <- approx(x, y, xout = x, ties = "ordered")$y)
+ [1] 2 2 3 6 6 6 4 4 1 1 1
+> stopifnot(ay == c(2,2,3,6,6,6,4,4,1,1,1))
+> approx(x, y, xout = x, ties = min)$y
+ [1] 1 1 3 4 4 4 4 4 1 1 1
+> approx(x, y, xout = x, ties = max)$y
+ [1] 2 2 3 6 6 6 5 5 3 3 3
+> 
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("ar")
+> ### * ar
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: ar
+> ### Title: Fit Autoregressive Models to Time Series
+> ### Aliases: ar ar.burg ar.burg.default ar.burg.mts ar.yw ar.yw.default
+> ###   ar.yw.mts ar.mle print.ar predict.ar
+> ### Keywords: ts
+> 
+> ### ** Examples
+> 
+> ar(lh)
+
+Call:
+ar(x = lh)
+
+Coefficients:
+      1        2        3  
+ 0.6534  -0.0636  -0.2269  
+
+Order selected 3  sigma^2 estimated as  0.1959
+> ar(lh, method = "burg")
+
+Call:
+ar(x = lh, method = "burg")
+
+Coefficients:
+      1        2        3  
+ 0.6588  -0.0608  -0.2234  
+
+Order selected 3  sigma^2 estimated as  0.1786
+> ar(lh, method = "ols")
+
+Call:
+ar(x = lh, method = "ols")
+
+Coefficients:
+    1  
+0.586  
+
+Intercept: 0.006234 (0.06551) 
+
+Order selected 1  sigma^2 estimated as  0.2016
+> ar(lh, FALSE, 4) # fit ar(4)
+
+Call:
+ar(x = lh, aic = FALSE, order.max = 4)
+
+Coefficients:
+      1        2        3        4  
+ 0.6767  -0.0571  -0.2941   0.1028  
+
+Order selected 4  sigma^2 estimated as  0.1983
+> 
+> (sunspot.ar <- ar(sunspot.year))
+
+Call:
+ar(x = sunspot.year)
+
+Coefficients:
+      1        2        3        4        5        6        7        8  
+ 1.1305  -0.3524  -0.1745   0.1403  -0.1358   0.0963  -0.0556   0.0076  
+      9  
+ 0.1941  
+
+Order selected 9  sigma^2 estimated as  267.5
+> predict(sunspot.ar, n.ahead = 25)
+$pred
+Time Series:
+Start = 1989 
+End = 2013 
+Frequency = 1 
+ [1] 135.25933 148.09051 133.98476 106.61344  71.21921  40.84057  18.70100
+ [8]  11.52416  27.24208  56.99888  87.86705 107.62926 111.05437  98.05484
+[15]  74.84085  48.80128  27.65441  18.15075  23.15355  40.04723  61.95906
+[22]  80.79092  90.11420  87.44131  74.42284
+
+$se
+Time Series:
+Start = 1989 
+End = 2013 
+Frequency = 1 
+ [1] 16.35519 24.68467 28.95653 29.97401 30.07714 30.15629 30.35971 30.58793
+ [9] 30.71100 30.74276 31.42565 32.96467 34.48910 35.33601 35.51890 35.52034
+[17] 35.65505 35.90628 36.07084 36.08139 36.16818 36.56324 37.16527 37.64820
+[25] 37.83954
+
+> ## try the other methods too
+> 
+> ar(ts.union(BJsales, BJsales.lead))
+
+Call:
+ar(x = ts.union(BJsales, BJsales.lead))
+
+$ar
+, , 1
+
+             BJsales BJsales.lead
+BJsales       0.9499       0.8222
+BJsales.lead  0.0276       0.4970
+
+, , 2
+
+              BJsales BJsales.lead
+BJsales       0.02041       -1.133
+BJsales.lead -0.02193        0.294
+
+, , 3
+
+               BJsales BJsales.lead
+BJsales      -0.186490       3.9415
+BJsales.lead -0.002946       0.1264
+
+
+$var.pred
+             BJsales BJsales.lead
+BJsales      13.9431       0.7733
+BJsales.lead  0.7733       0.1231
+
+> ## Burg is quite different here, as is OLS (see ar.ols)
+> ar(ts.union(BJsales, BJsales.lead), method = "burg")
+
+Call:
+ar(x = ts.union(BJsales, BJsales.lead), method = "burg")
+
+$ar
+, , 1
+
+             BJsales BJsales.lead
+BJsales      1.21197      0.07312
+BJsales.lead 0.07411      0.45684
+
+, , 2
+
+              BJsales BJsales.lead
+BJsales      -0.26022      -0.1120
+BJsales.lead -0.06904       0.3111
+
+, , 3
+
+              BJsales BJsales.lead
+BJsales      -0.01754      3.93591
+BJsales.lead  0.01792      0.09632
+
+, , 4
+
+              BJsales BJsales.lead
+BJsales      -0.07746     -1.33836
+BJsales.lead -0.01158     -0.09118
+
+
+$var.pred
+             BJsales BJsales.lead
+BJsales      0.38426      0.01315
+BJsales.lead 0.01315      0.07657
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("ar.ols")
+> ### * ar.ols
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: ar.ols
+> ### Title: Fit Autoregressive Models to Time Series by OLS
+> ### Aliases: ar.ols
+> ### Keywords: ts
+> 
+> ### ** Examples
+> 
+> ar(lh, method = "burg")
+
+Call:
+ar(x = lh, method = "burg")
+
+Coefficients:
+      1        2        3  
+ 0.6588  -0.0608  -0.2234  
+
+Order selected 3  sigma^2 estimated as  0.1786
+> ar.ols(lh)
+
+Call:
+ar.ols(x = lh)
+
+Coefficients:
+    1  
+0.586  
+
+Intercept: 0.006234 (0.06551) 
+
+Order selected 1  sigma^2 estimated as  0.2016
+> ar.ols(lh, FALSE, 4) # fit ar(4)
+
+Call:
+ar.ols(x = lh, aic = FALSE, order.max = 4)
+
+Coefficients:
+      1        2        3        4  
+ 0.6761  -0.0571  -0.3001   0.0967  
+
+Intercept: 0.0004346 (0.06642) 
+
+Order selected 4  sigma^2 estimated as  0.1924
+> 
+> ar.ols(ts.union(BJsales, BJsales.lead))
+
+Call:
+ar.ols(x = ts.union(BJsales, BJsales.lead))
+
+$ar
+, , 1
+
+             BJsales BJsales.lead
+BJsales      0.40408     -0.05144
+BJsales.lead 0.07348      0.54524
+
+, , 2
+
+             BJsales BJsales.lead
+BJsales       0.2367      0.05899
+BJsales.lead -0.1224      0.28690
+
+, , 3
+
+             BJsales BJsales.lead
+BJsales      0.09673       4.7413
+BJsales.lead 0.10469       0.0701
+
+, , 4
+
+              BJsales BJsales.lead
+BJsales      0.048758       1.5671
+BJsales.lead 0.003482      -0.1838
+
+, , 5
+
+              BJsales BJsales.lead
+BJsales       0.23307      -0.1574
+BJsales.lead -0.02707       0.2623
+
+, , 6
+
+              BJsales BJsales.lead
+BJsales       0.07494      -0.4313
+BJsales.lead -0.08729      -0.2166
+
+, , 7
+
+              BJsales BJsales.lead
+BJsales      -0.09946      -0.6233
+BJsales.lead  0.27123      -0.2584
+
+, , 8
+
+              BJsales BJsales.lead
+BJsales       0.06725     -1.36469
+BJsales.lead -0.21501      0.06115
+
+, , 9
+
+              BJsales BJsales.lead
+BJsales      -0.11531       -1.464
+BJsales.lead  0.03536        0.270
+
+, , 10
+
+               BJsales BJsales.lead
+BJsales      -0.002037      -0.6472
+BJsales.lead  0.001284      -1.0667
+
+, , 11
+
+              BJsales BJsales.lead
+BJsales      0.004065      -0.7009
+BJsales.lead 0.002098       0.4890
+
+
+$x.intercept
+     BJsales BJsales.lead 
+     0.19630     -0.07022 
+
+$var.pred
+                BJsales BJsales.lead
+BJsales       0.0400996   -0.0009311
+BJsales.lead -0.0009311    0.0682137
+
+> 
+> x <- diff(log(EuStockMarkets))
+> ar.ols(x, order.max = 6, demean = FALSE, intercept = TRUE)
+
+Call:
+ar.ols(x = x, order.max = 6, demean = FALSE, intercept = TRUE)
+
+$ar
+, , 1
+
+           DAX       SMI       CAC    FTSE
+DAX   0.004560 -0.095781  0.039975 0.04856
+SMI  -0.009204 -0.007142  0.037758 0.06826
+CAC  -0.026624 -0.113688  0.063807 0.09154
+FTSE -0.010299 -0.089246 -0.003195 0.16409
+
+
+$x.intercept
+      DAX       SMI       CAC      FTSE 
+0.0006941 0.0007813 0.0004866 0.0004388 
+
+$var.pred
+           DAX       SMI       CAC      FTSE
+DAX  1.056e-04 6.683e-05 8.274e-05 5.192e-05
+SMI  6.683e-05 8.496e-05 6.252e-05 4.254e-05
+CAC  8.274e-05 6.252e-05 1.207e-04 5.615e-05
+FTSE 5.192e-05 4.254e-05 5.615e-05 6.224e-05
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("arima")
+> ### * arima
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: arima
+> ### Title: ARIMA Modelling of Time Series
+> ### Aliases: arima
+> ### Keywords: ts
+> 
+> ### ** Examples
+> 
+> arima(lh, order = c(1,0,0))
+
+Call:
+arima(x = lh, order = c(1, 0, 0))
+
+Coefficients:
+         ar1  intercept
+      0.5739     2.4133
+s.e.  0.1161     0.1466
+
+sigma^2 estimated as 0.1975:  log likelihood = -29.38,  aic = 64.76
+> arima(lh, order = c(3,0,0))
+
+Call:
+arima(x = lh, order = c(3, 0, 0))
+
+Coefficients:
+         ar1      ar2      ar3  intercept
+      0.6448  -0.0634  -0.2198     2.3931
+s.e.  0.1394   0.1668   0.1421     0.0963
+
+sigma^2 estimated as 0.1787:  log likelihood = -27.09,  aic = 64.18
+> arima(lh, order = c(1,0,1))
+
+Call:
+arima(x = lh, order = c(1, 0, 1))
+
+Coefficients:
+         ar1     ma1  intercept
+      0.4522  0.1982     2.4101
+s.e.  0.1769  0.1705     0.1358
+
+sigma^2 estimated as 0.1923:  log likelihood = -28.76,  aic = 65.52
+> 
+> arima(lh, order = c(3,0,0), method = "CSS")
+
+Call:
+arima(x = lh, order = c(3, 0, 0), method = "CSS")
+
+Coefficients:
+         ar1      ar2      ar3  intercept
+      0.6578  -0.0658  -0.2348     2.3918
+s.e.  0.1414   0.1702   0.1473     0.0983
+
+sigma^2 estimated as 0.1905:  part log likelihood = -28.31
+> 
+> arima(USAccDeaths, order = c(0,1,1), seasonal = list(order = c(0,1,1)))
+
+Call:
+arima(x = USAccDeaths, order = c(0, 1, 1), seasonal = list(order = c(0, 1, 1)))
+
+Coefficients:
+          ma1     sma1
+      -0.4303  -0.5528
+s.e.   0.1228   0.1784
+
+sigma^2 estimated as 99347:  log likelihood = -425.44,  aic = 856.88
+> arima(USAccDeaths, order = c(0,1,1), seasonal = list(order = c(0,1,1)),
++       method = "CSS") # drops first 13 observations.
+
+Call:
+arima(x = USAccDeaths, order = c(0, 1, 1), seasonal = list(order = c(0, 1, 1)), 
+    method = "CSS")
+
+Coefficients:
+          ma1     sma1
+      -0.3732  -0.4549
+s.e.   0.1366   0.1436
+
+sigma^2 estimated as 110330:  part log likelihood = -426.25
+> # for a model with as few years as this, we want full ML
+> 
+> arima(LakeHuron, order = c(2,0,0), xreg = time(LakeHuron) - 1920)
+
+Call:
+arima(x = LakeHuron, order = c(2, 0, 0), xreg = time(LakeHuron) - 1920)
+
+Coefficients:
+         ar1      ar2  intercept  time(LakeHuron) - 1920
+      1.0048  -0.2913   579.0993                 -0.0216
+s.e.  0.0976   0.1004     0.2370                  0.0081
+
+sigma^2 estimated as 0.4566:  log likelihood = -101.2,  aic = 212.4
+> 
+> ## presidents contains NAs
+> ## graphs in example(acf) suggest order 1 or 3
+> require(graphics)
+> (fit1 <- arima(presidents, c(1, 0, 0)))
+
+Call:
+arima(x = presidents, order = c(1, 0, 0))
+
+Coefficients:
+         ar1  intercept
+      0.8242    56.1505
+s.e.  0.0555     4.6434
+
+sigma^2 estimated as 85.47:  log likelihood = -416.89,  aic = 839.78
+> nobs(fit1)
+[1] 114
+> tsdiag(fit1)
+> (fit3 <- arima(presidents, c(3, 0, 0)))  # smaller AIC
+
+Call:
+arima(x = presidents, order = c(3, 0, 0))
+
+Coefficients:
+         ar1     ar2      ar3  intercept
+      0.7496  0.2523  -0.1890    56.2223
+s.e.  0.0936  0.1140   0.0946     4.2845
+
+sigma^2 estimated as 81.12:  log likelihood = -414.08,  aic = 838.16
+> tsdiag(fit3)
+> BIC(fit1, fit3)
+     df      BIC
+fit1  3 847.9931
+fit3  5 851.8449
+> ## compare a whole set of models; BIC() would choose the smallest
+> AIC(fit1, arima(presidents, c(2,0,0)),
++           arima(presidents, c(2,0,1)), # <- chosen (barely) by AIC
++     fit3, arima(presidents, c(3,0,1)))
+                              df      AIC
+fit1                           3 839.7845
+arima(presidents, c(2, 0, 0))  4 840.0458
+arima(presidents, c(2, 0, 1))  5 838.1272
+fit3                           5 838.1639
+arima(presidents, c(3, 0, 1))  6 838.8124
+> 
+> ## An example of ARIMA forecasting:
+> predict(fit3, 3)
+$pred
+         Qtr1     Qtr2     Qtr3
+1975 29.84194 34.41014 39.30815
+
+$se
+         Qtr1     Qtr2     Qtr3
+1975  9.00655 11.25606 13.43389
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("arima.sim")
+> ### * arima.sim
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: arima.sim
+> ### Title: Simulate from an ARIMA Model
+> ### Aliases: arima.sim
+> ### Keywords: ts
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> arima.sim(n = 63, list(ar = c(0.8897, -0.4858), ma = c(-0.2279, 0.2488)),
++           sd = sqrt(0.1796))
+Time Series:
+Start = 1 
+End = 63 
+Frequency = 1 
+ [1]  0.55638574  0.24800500 -0.81744783 -0.38508849 -0.23890454 -0.02072714
+ [7] -0.51654590 -0.52651638 -0.14927781  0.60798558  0.48272646  0.45160066
+[13]  0.09619832 -0.67131480 -0.69254708 -0.56224691 -0.19460368  0.53033791
+[19]  0.77731125  0.40648873 -0.02697856  0.08101569  0.22706682 -0.10950180
+[25] -0.38234797 -0.13676254  0.27995530  0.23211869  0.53580489  0.43571147
+[31] -0.07756004 -0.03502285 -0.56957457  0.26261214  1.09213953  0.64829971
+[37] -0.15198589 -0.14659775 -0.27894630  0.91394089  0.68582187  0.71550492
+[43]  0.24452551 -0.37501019 -0.29768875 -0.94420587  0.11988146  0.29844068
+[49]  1.26774646  0.99077203  0.14790214  0.02779843 -0.57682386 -0.90337297
+[55] -0.37740926 -0.24511724  0.03927715  0.13868087 -0.15259447 -0.37935616
+[61] -0.32790595  0.34491331 -0.30754547
+> # mildly long-tailed
+> arima.sim(n = 63, list(ar = c(0.8897, -0.4858), ma = c(-0.2279, 0.2488)),
++           rand.gen = function(n, ...) sqrt(0.1796) * rt(n, df = 5))
+Time Series:
+Start = 1 
+End = 63 
+Frequency = 1 
+ [1] -0.08101433 -0.37596592 -1.05656365 -0.99217317 -0.15199924 -0.06140144
+ [7] -0.55852200 -0.54700937 -0.72098523 -0.98045523 -0.80880380 -0.61217798
+[13] -0.66268921 -0.29302949 -0.83022714 -0.08803618 -0.37932440  0.10532621
+[19]  0.08033289 -0.29269083 -0.69193397  0.81677306 -0.25402288 -0.08812258
+[25] -0.34117754  0.29026870 -0.54848673 -0.44974248 -0.34110521 -0.17826307
+[31] -0.35396760  0.98465366  0.21136827  0.05042017 -0.02400316 -0.42642295
+[37] -0.61906692  1.92955621 -0.36050863 -0.68488280  0.10141464  0.64328982
+[43]  0.31906603  0.17275054 -0.13570368 -0.13451166 -0.11717037  0.02330814
+[49]  0.29918521  0.05938999 -0.20355761 -0.02439309 -1.14548572 -0.94045141
+[55]  0.44845239  1.76898773  1.78579981  1.16734413  0.33858833 -0.41153063
+[61] -0.31037109 -0.31929663  0.17496536
+> 
+> # An ARIMA simulation
+> ts.sim <- arima.sim(list(order = c(1,1,0), ar = 0.7), n = 200)
+> ts.plot(ts.sim)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("arima0")
+> ### * arima0
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: arima0
+> ### Title: ARIMA Modelling of Time Series - Preliminary Version
+> ### Aliases: arima0 print.arima0 predict.arima0
+> ### Keywords: ts
+> 
+> ### ** Examples
+> 
+> ## Not run: arima0(lh, order = c(1,0,0))
+> arima0(lh, order = c(3,0,0))
+
+Call:
+arima0(x = lh, order = c(3, 0, 0))
+
+Coefficients:
+         ar1      ar2      ar3  intercept
+      0.6448  -0.0634  -0.2198     2.3931
+s.e.  0.1394   0.1668   0.1421     0.0963
+
+sigma^2 estimated as 0.1787:  log likelihood = -27.09,  aic = 64.18
+> arima0(lh, order = c(1,0,1))
+
+Call:
+arima0(x = lh, order = c(1, 0, 1))
+
+Coefficients:
+         ar1     ma1  intercept
+      0.4521  0.1983     2.4101
+s.e.  0.1357  0.1777     0.1357
+
+sigma^2 estimated as 0.1923:  log likelihood = -28.76,  aic = 65.52
+> predict(arima0(lh, order = c(3,0,0)), n.ahead = 12)
+$pred
+Time Series:
+Start = 49 
+End = 60 
+Frequency = 1 
+ [1] 2.460173 2.270829 2.198597 2.260696 2.346933 2.414479 2.438918 2.431440
+ [9] 2.410223 2.391645 2.382653 2.382697
+
+$se
+Time Series:
+Start = 49 
+End = 60 
+Frequency = 1 
+ [1] 0.4226823 0.5029332 0.5245256 0.5247161 0.5305499 0.5369159 0.5388045
+ [8] 0.5388448 0.5391043 0.5395174 0.5396991 0.5397140
+
+> 
+> arima0(lh, order = c(3,0,0), method = "CSS")
+
+Call:
+arima0(x = lh, order = c(3, 0, 0), method = "CSS")
+
+Coefficients:
+         ar1      ar2      ar3  intercept
+      0.6580  -0.0660  -0.2339     2.3999
+s.e.  0.1414   0.1702   0.1469     0.0981
+
+sigma^2 estimated as 0.1905:  part log likelihood = -28.31
+> 
+> # for a model with as few years as this, we want full ML
+> (fit <- arima0(USAccDeaths, order = c(0,1,1),
++                seasonal = list(order=c(0,1,1)), delta = -1))
+
+Call:
+arima0(x = USAccDeaths, order = c(0, 1, 1), seasonal = list(order = c(0, 1, 
+    1)), delta = -1)
+
+Coefficients:
+          ma1     sma1
+      -0.4304  -0.5526
+s.e.   0.1228   0.1785
+
+sigma^2 estimated as 99355:  log likelihood = -425.44,  aic = 856.88
+> predict(fit, n.ahead = 6)
+$pred
+          Jan      Feb      Mar      Apr      May      Jun
+1979 8336.028 7531.760 8314.593 8616.864 9488.916 9859.727
+
+$se
+          Jan      Feb      Mar      Apr      May      Jun
+1979 315.4607 362.9949 404.9878 443.0180 478.0322 510.6511
+
+> 
+> arima0(LakeHuron, order = c(2,0,0), xreg = time(LakeHuron)-1920)
+
+Call:
+arima0(x = LakeHuron, order = c(2, 0, 0), xreg = time(LakeHuron) - 1920)
+
+Coefficients:
+         ar1      ar2  intercept     xreg
+      1.0048  -0.2913   579.0985  -0.0216
+s.e.  0.0976   0.1004     0.2370   0.0081
+
+sigma^2 estimated as 0.4566:  log likelihood = -101.2,  aic = 212.4
+> ## Not run: 
+> ##D ## presidents contains NAs
+> ##D ## graphs in example(acf) suggest order 1 or 3
+> ##D (fit1 <- arima0(presidents, c(1, 0, 0), delta = -1))  # avoid warning
+> ##D tsdiag(fit1)
+> ##D (fit3 <- arima0(presidents, c(3, 0, 0), delta = -1))  # smaller AIC
+> ##D tsdiag(fit3)
+> ## End(Not run)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("as.hclust")
+> ### * as.hclust
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: as.hclust
+> ### Title: Convert Objects to Class hclust
+> ### Aliases: as.hclust as.hclust.default as.hclust.twins
+> ### Keywords: multivariate cluster
+> 
+> ### ** Examples
+> 
+> x <- matrix(rnorm(30), ncol = 3)
+> hc <- hclust(dist(x), method = "complete")
+> 
+> 
+> 
+> 
+> cleanEx()
+> nameEx("asOneSidedFormula")
+> ### * asOneSidedFormula
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: asOneSidedFormula
+> ### Title: Convert to One-Sided Formula
+> ### Aliases: asOneSidedFormula
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> asOneSidedFormula("age")
+~age
+<environment: 0x3fcf138>
+> asOneSidedFormula(~ age)
+~age
+> 
+> 
+> 
+> cleanEx()
+> nameEx("ave")
+> ### * ave
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: ave
+> ### Title: Group Averages Over Level Combinations of Factors
+> ### Aliases: ave
+> ### Keywords: univar
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> ave(1:3)  # no grouping -> grand mean
+[1] 2 2 2
+> 
+> attach(warpbreaks)
+> ave(breaks, wool)
+ [1] 31.03704 31.03704 31.03704 31.03704 31.03704 31.03704 31.03704 31.03704
+ [9] 31.03704 31.03704 31.03704 31.03704 31.03704 31.03704 31.03704 31.03704
+[17] 31.03704 31.03704 31.03704 31.03704 31.03704 31.03704 31.03704 31.03704
+[25] 31.03704 31.03704 31.03704 25.25926 25.25926 25.25926 25.25926 25.25926
+[33] 25.25926 25.25926 25.25926 25.25926 25.25926 25.25926 25.25926 25.25926
+[41] 25.25926 25.25926 25.25926 25.25926 25.25926 25.25926 25.25926 25.25926
+[49] 25.25926 25.25926 25.25926 25.25926 25.25926 25.25926
+> ave(breaks, tension)
+ [1] 36.38889 36.38889 36.38889 36.38889 36.38889 36.38889 36.38889 36.38889
+ [9] 36.38889 26.38889 26.38889 26.38889 26.38889 26.38889 26.38889 26.38889
+[17] 26.38889 26.38889 21.66667 21.66667 21.66667 21.66667 21.66667 21.66667
+[25] 21.66667 21.66667 21.66667 36.38889 36.38889 36.38889 36.38889 36.38889
+[33] 36.38889 36.38889 36.38889 36.38889 26.38889 26.38889 26.38889 26.38889
+[41] 26.38889 26.38889 26.38889 26.38889 26.38889 21.66667 21.66667 21.66667
+[49] 21.66667 21.66667 21.66667 21.66667 21.66667 21.66667
+> ave(breaks, tension, FUN = function(x) mean(x, trim = 0.1))
+ [1] 35.6875 35.6875 35.6875 35.6875 35.6875 35.6875 35.6875 35.6875 35.6875
+[10] 26.3125 26.3125 26.3125 26.3125 26.3125 26.3125 26.3125 26.3125 26.3125
+[19] 21.0625 21.0625 21.0625 21.0625 21.0625 21.0625 21.0625 21.0625 21.0625
+[28] 35.6875 35.6875 35.6875 35.6875 35.6875 35.6875 35.6875 35.6875 35.6875
+[37] 26.3125 26.3125 26.3125 26.3125 26.3125 26.3125 26.3125 26.3125 26.3125
+[46] 21.0625 21.0625 21.0625 21.0625 21.0625 21.0625 21.0625 21.0625 21.0625
+> plot(breaks, main =
++      "ave( Warpbreaks )  for   wool  x  tension  combinations")
+> lines(ave(breaks, wool, tension              ), type = "s", col = "blue")
+> lines(ave(breaks, wool, tension, FUN = median), type = "s", col = "green")
+> legend(40, 70, c("mean", "median"), lty = 1,
++       col = c("blue","green"), bg = "gray90")
+> detach()
+> 
+> 
+> 
+> cleanEx()
+> nameEx("bandwidth")
+> ### * bandwidth
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: bandwidth
+> ### Title: Bandwidth Selectors for Kernel Density Estimation
+> ### Aliases: bw.nrd0 bw.nrd bw.ucv bw.bcv bw.SJ
+> ### Keywords: distribution smooth
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> plot(density(precip, n = 1000))
+> rug(precip)
+> lines(density(precip, bw = "nrd"), col = 2)
+> lines(density(precip, bw = "ucv"), col = 3)
+> lines(density(precip, bw = "bcv"), col = 4)
+Warning in bw.bcv(x) : minimum occurred at one end of the range
+> lines(density(precip, bw = "SJ-ste"), col = 5)
+> lines(density(precip, bw = "SJ-dpi"), col = 6)
+> legend(55, 0.035,
++        legend = c("nrd0", "nrd", "ucv", "bcv", "SJ-ste", "SJ-dpi"),
++        col = 1:6, lty = 1)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("bartlett.test")
+> ### * bartlett.test
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: bartlett.test
+> ### Title: Bartlett Test of Homogeneity of Variances
+> ### Aliases: bartlett.test bartlett.test.default bartlett.test.formula
+> ### Keywords: htest
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> plot(count ~ spray, data = InsectSprays)
+> bartlett.test(InsectSprays$count, InsectSprays$spray)
+
+	Bartlett test of homogeneity of variances
+
+data:  InsectSprays$count and InsectSprays$spray
+Bartlett's K-squared = 25.96, df = 5, p-value = 9.085e-05
+
+> bartlett.test(count ~ spray, data = InsectSprays)
+
+	Bartlett test of homogeneity of variances
+
+data:  count by spray
+Bartlett's K-squared = 25.96, df = 5, p-value = 9.085e-05
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("binom.test")
+> ### * binom.test
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: binom.test
+> ### Title: Exact Binomial Test
+> ### Aliases: binom.test
+> ### Keywords: htest
+> 
+> ### ** Examples
+> 
+> ## Conover (1971), p. 97f.
+> ## Under (the assumption of) simple Mendelian inheritance, a cross
+> ##  between plants of two particular genotypes produces progeny 1/4 of
+> ##  which are "dwarf" and 3/4 of which are "giant", respectively.
+> ##  In an experiment to determine if this assumption is reasonable, a
+> ##  cross results in progeny having 243 dwarf and 682 giant plants.
+> ##  If "giant" is taken as success, the null hypothesis is that p =
+> ##  3/4 and the alternative that p != 3/4.
+> binom.test(c(682, 243), p = 3/4)
+
+	Exact binomial test
+
+data:  c(682, 243)
+number of successes = 682, number of trials = 925, p-value = 0.3825
+alternative hypothesis: true probability of success is not equal to 0.75
+95 percent confidence interval:
+ 0.7076683 0.7654066
+sample estimates:
+probability of success 
+             0.7372973 
+
+> binom.test(682, 682 + 243, p = 3/4)   # The same.
+
+	Exact binomial test
+
+data:  682 and 682 + 243
+number of successes = 682, number of trials = 925, p-value = 0.3825
+alternative hypothesis: true probability of success is not equal to 0.75
+95 percent confidence interval:
+ 0.7076683 0.7654066
+sample estimates:
+probability of success 
+             0.7372973 
+
+> ## => Data are in agreement with the null hypothesis.
+> 
+> 
+> 
+> cleanEx()
+> nameEx("biplot.princomp")
+> ### * biplot.princomp
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: biplot.princomp
+> ### Title: Biplot for Principal Components
+> ### Aliases: biplot.princomp biplot.prcomp
+> ### Keywords: multivariate hplot
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> biplot(princomp(USArrests))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("birthday")
+> ### * birthday
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: birthday
+> ### Title: Probability of coincidences
+> ### Aliases: qbirthday pbirthday
+> ### Keywords: distribution
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> ## the standard version
+> qbirthday() # 23
+[1] 23
+> ## probability of > 2 people with the same birthday
+> pbirthday(23, coincident = 3)
+[1] 0.01441541
+> 
+> ## examples from Diaconis & Mosteller p. 858.
+> ## 'coincidence' is that husband, wife, daughter all born on the 16th
+> qbirthday(classes = 30, coincident = 3) # approximately 18
+[1] 18
+> qbirthday(coincident = 4)  # exact value 187
+[1] 187
+> qbirthday(coincident = 10) # exact value 1181
+[1] 1179
+> 
+> ## same 4-digit PIN number
+> qbirthday(classes = 10^4)
+[1] 119
+> 
+> ## 0.9 probability of three or more coincident birthdays
+> qbirthday(coincident = 3, prob = 0.9)
+[1] 135
+> 
+> ## Chance of 4 or more coincident birthdays in 150 people
+> pbirthday(150, coincident = 4)
+[1] 0.2690146
+> 
+> ## 100 or more coincident birthdays in 1000 people: very rare
+> pbirthday(1000, coincident = 100)
+[1] 1.531434e-113
+> 
+> 
+> 
+> cleanEx()
+> nameEx("box.test")
+> ### * box.test
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: Box.test
+> ### Title: Box-Pierce and Ljung-Box Tests
+> ### Aliases: Box.test
+> ### Keywords: ts
+> 
+> ### ** Examples
+> 
+> x <- rnorm (100)
+> Box.test (x, lag = 1)
+
+	Box-Pierce test
+
+data:  x
+X-squared = 0.0013332, df = 1, p-value = 0.9709
+
+> Box.test (x, lag = 1, type = "Ljung")
+
+	Box-Ljung test
+
+data:  x
+X-squared = 0.0013736, df = 1, p-value = 0.9704
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("cancor")
+> ### * cancor
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: cancor
+> ### Title: Canonical Correlations
+> ### Aliases: cancor
+> ### Keywords: multivariate
+> 
+> ### ** Examples
+> 
+> 
+> cleanEx()
+> nameEx("case.names")
+> ### * case.names
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: case+variable.names
+> ### Title: Case and Variable Names of Fitted Models
+> ### Aliases: case.names case.names.lm variable.names variable.names.lm
+> ### Keywords: regression models
+> 
+> ### ** Examples
+> 
+> x <- 1:20
+> y <-  setNames(x + (x/4 - 2)^3 + rnorm(20, sd = 3),
++                paste("O", x, sep = "."))
+> ww <- rep(1, 20); ww[13] <- 0
+> summary(lmxy <- lm(y ~ x + I(x^2)+I(x^3) + I((x-10)^2), weights = ww),
++         cor = TRUE)
+
+Call:
+lm(formula = y ~ x + I(x^2) + I(x^3) + I((x - 10)^2), weights = ww)
+
+Weighted Residuals:
+    Min      1Q  Median      3Q     Max 
+-6.7160 -0.7047  0.0728  1.0174  3.9947 
+
+Coefficients: (1 not defined because of singularities)
+                Estimate Std. Error t value Pr(>|t|)    
+(Intercept)   -10.967768   3.104498  -3.533 0.003013 ** 
+x               5.524412   1.255354   4.401 0.000516 ***
+I(x^2)         -0.542292   0.138460  -3.917 0.001374 ** 
+I(x^3)          0.020905   0.004372   4.782 0.000242 ***
+I((x - 10)^2)         NA         NA      NA       NA    
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Residual standard error: 2.838 on 15 degrees of freedom
+Multiple R-squared:  0.9702,	Adjusted R-squared:  0.9643 
+F-statistic:   163 on 3 and 15 DF,  p-value: 1.14e-11
+
+Correlation of Coefficients:
+       (Intercept) x     I(x^2)
+x      -0.90                   
+I(x^2)  0.80       -0.97       
+I(x^3) -0.73        0.93 -0.99 
+
+> variable.names(lmxy)
+[1] "(Intercept)" "x"           "I(x^2)"      "I(x^3)"     
+> variable.names(lmxy, full = TRUE)  # includes the last
+[1] "(Intercept)"   "x"             "I(x^2)"        "I(x^3)"       
+[5] "I((x - 10)^2)"
+> case.names(lmxy)
+ [1] "O.1"  "O.2"  "O.3"  "O.4"  "O.5"  "O.6"  "O.7"  "O.8"  "O.9"  "O.10"
+[11] "O.11" "O.12" "O.14" "O.15" "O.16" "O.17" "O.18" "O.19" "O.20"
+> case.names(lmxy, full = TRUE)      # includes the 0-weight case
+ [1] "O.1"  "O.2"  "O.3"  "O.4"  "O.5"  "O.6"  "O.7"  "O.8"  "O.9"  "O.10"
+[11] "O.11" "O.12" "O.13" "O.14" "O.15" "O.16" "O.17" "O.18" "O.19" "O.20"
+> 
+> 
+> 
+> cleanEx()
+> nameEx("chisq.test")
+> ### * chisq.test
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: chisq.test
+> ### Title: Pearson's Chi-squared Test for Count Data
+> ### Aliases: chisq.test
+> ### Keywords: htest distribution
+> 
+> ### ** Examples
+> 
+> 
+> ## From Agresti(2007) p.39
+> M <- as.table(rbind(c(762, 327, 468), c(484, 239, 477)))
+> dimnames(M) <- list(gender = c("F", "M"),
++                     party = c("Democrat","Independent", "Republican"))
+> (Xsq <- chisq.test(M))  # Prints test summary
+
+	Pearson's Chi-squared test
+
+data:  M
+X-squared = 30.07, df = 2, p-value = 2.954e-07
+
+> Xsq$observed   # observed counts (same as M)
+      party
+gender Democrat Independent Republican
+     F      762         327        468
+     M      484         239        477
+> Xsq$expected   # expected counts under the null
+      party
+gender Democrat Independent Republican
+     F 703.6714    319.6453   533.6834
+     M 542.3286    246.3547   411.3166
+> Xsq$residuals  # Pearson residuals
+      party
+gender   Democrat Independent Republican
+     F  2.1988558   0.4113702 -2.8432397
+     M -2.5046695  -0.4685829  3.2386734
+> Xsq$stdres     # standardized residuals
+      party
+gender   Democrat Independent Republican
+     F  4.5020535   0.6994517 -5.3159455
+     M -4.5020535  -0.6994517  5.3159455
+> 
+> 
+> ## Effect of simulating p-values
+> x <- matrix(c(12, 5, 7, 7), ncol = 2)
+> chisq.test(x)$p.value           # 0.4233
+[1] 0.4233054
+> chisq.test(x, simulate.p.value = TRUE, B = 10000)$p.value
+[1] 0.2935706
+>                                 # around 0.29!
+> 
+> ## Testing for population probabilities
+> ## Case A. Tabulated data
+> x <- c(A = 20, B = 15, C = 25)
+> chisq.test(x)
+
+	Chi-squared test for given probabilities
+
+data:  x
+X-squared = 2.5, df = 2, p-value = 0.2865
+
+> chisq.test(as.table(x))             # the same
+
+	Chi-squared test for given probabilities
+
+data:  as.table(x)
+X-squared = 2.5, df = 2, p-value = 0.2865
+
+> x <- c(89,37,30,28,2)
+> p <- c(40,20,20,15,5)
+> try(
++ chisq.test(x, p = p)                # gives an error
++ )
+Error in chisq.test(x, p = p) : probabilities must sum to 1.
+> chisq.test(x, p = p, rescale.p = TRUE)
+
+	Chi-squared test for given probabilities
+
+data:  x
+X-squared = 9.9901, df = 4, p-value = 0.04059
+
+>                                 # works
+> p <- c(0.40,0.20,0.20,0.19,0.01)
+>                                 # Expected count in category 5
+>                                 # is 1.86 < 5 ==> chi square approx.
+> chisq.test(x, p = p)            #               maybe doubtful, but is ok!
+Warning in chisq.test(x, p = p) :
+  Chi-squared approximation may be incorrect
+
+	Chi-squared test for given probabilities
+
+data:  x
+X-squared = 5.7947, df = 4, p-value = 0.215
+
+> chisq.test(x, p = p, simulate.p.value = TRUE)
+
+	Chi-squared test for given probabilities with simulated p-value (based
+	on 2000 replicates)
+
+data:  x
+X-squared = 5.7947, df = NA, p-value = 0.2029
+
+> 
+> ## Case B. Raw data
+> x <- trunc(5 * runif(100))
+> chisq.test(table(x))            # NOT 'chisq.test(x)'!
+
+	Chi-squared test for given probabilities
+
+data:  table(x)
+X-squared = 4.3, df = 4, p-value = 0.3669
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("cmdscale")
+> ### * cmdscale
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: cmdscale
+> ### Title: Classical (Metric) Multidimensional Scaling
+> ### Aliases: cmdscale
+> ### Keywords: multivariate
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> loc <- cmdscale(eurodist)
+> x <- loc[, 1]
+> y <- -loc[, 2] # reflect so North is at the top
+> ## note asp = 1, to ensure Euclidean distances are represented correctly
+> plot(x, y, type = "n", xlab = "", ylab = "", asp = 1, axes = FALSE,
++      main = "cmdscale(eurodist)")
+> text(x, y, rownames(loc), cex = 0.6)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("coef")
+> ### * coef
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: coef
+> ### Title: Extract Model Coefficients
+> ### Aliases: coef coefficients
+> ### Keywords: regression models
+> 
+> ### ** Examples
+> 
+> x <- 1:5; coef(lm(c(1:3, 7, 6) ~ x))
+(Intercept)           x 
+       -0.7         1.5 
+> 
+> 
+> 
+> cleanEx()
+> nameEx("complete.cases")
+> ### * complete.cases
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: complete.cases
+> ### Title: Find Complete Cases
+> ### Aliases: complete.cases
+> ### Keywords: NA logic
+> 
+> ### ** Examples
+> 
+> x <- airquality[, -1] # x is a regression design matrix
+> y <- airquality[,  1] # y is the corresponding response
+> 
+> stopifnot(complete.cases(y) != is.na(y))
+> ok <- complete.cases(x, y)
+> sum(!ok) # how many are not "ok" ?
+[1] 42
+> x <- x[ok,]
+> y <- y[ok]
+> 
+> 
+> 
+> cleanEx()
+> nameEx("confint")
+> ### * confint
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: confint
+> ### Title: Confidence Intervals for Model Parameters
+> ### Aliases: confint confint.default confint.lm
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> fit <- lm(100/mpg ~ disp + hp + wt + am, data = mtcars)
+> confint(fit)
+                   2.5 %      97.5 %
+(Intercept) -0.774822875 2.256118188
+disp        -0.002867999 0.008273849
+hp          -0.001400580 0.011949674
+wt           0.380088737 1.622517536
+am          -0.614677730 0.926307310
+> confint(fit, "wt")
+       2.5 %   97.5 %
+wt 0.3800887 1.622518
+> 
+> 
+> 
+> 
+> cleanEx()
+> nameEx("constrOptim")
+> ### * constrOptim
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: constrOptim
+> ### Title: Linearly Constrained Optimization
+> ### Aliases: constrOptim
+> ### Keywords: optimize
+> 
+> ### ** Examples
+> 
+> 
+> cleanEx()
+> nameEx("contrast")
+> ### * contrast
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: contrast
+> ### Title: (Possibly Sparse) Contrast Matrices
+> ### Aliases: contr.helmert contr.poly contr.sum contr.treatment contr.SAS
+> ### Keywords: design regression array
+> 
+> ### ** Examples
+> 
+> (cH <- contr.helmert(4))
+  [,1] [,2] [,3]
+1   -1   -1   -1
+2    1   -1   -1
+3    0    2   -1
+4    0    0    3
+> apply(cH, 2, sum) # column sums are 0
+[1] 0 0 0
+> crossprod(cH) # diagonal -- columns are orthogonal
+     [,1] [,2] [,3]
+[1,]    2    0    0
+[2,]    0    6    0
+[3,]    0    0   12
+> contr.helmert(4, contrasts = FALSE) # just the 4 x 4 identity matrix
+  1 2 3 4
+1 1 0 0 0
+2 0 1 0 0
+3 0 0 1 0
+4 0 0 0 1
+> 
+> (cT <- contr.treatment(5))
+  2 3 4 5
+1 0 0 0 0
+2 1 0 0 0
+3 0 1 0 0
+4 0 0 1 0
+5 0 0 0 1
+> all(crossprod(cT) == diag(4)) # TRUE: even orthonormal
+[1] TRUE
+> 
+> (cT. <- contr.SAS(5))
+  1 2 3 4
+1 1 0 0 0
+2 0 1 0 0
+3 0 0 1 0
+4 0 0 0 1
+5 0 0 0 0
+> all(crossprod(cT.) == diag(4)) # TRUE
+[1] TRUE
+> 
+> zapsmall(cP <- contr.poly(3)) # Linear and Quadratic
+             .L         .Q
+[1,] -0.7071068  0.4082483
+[2,]  0.0000000 -0.8164966
+[3,]  0.7071068  0.4082483
+> zapsmall(crossprod(cP), digits = 15) # orthonormal up to fuzz
+   .L .Q
+.L  1  0
+.Q  0  1
+> 
+> 
+> 
+> cleanEx()
+> nameEx("contrasts")
+> ### * contrasts
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: contrasts
+> ### Title: Get and Set Contrast Matrices
+> ### Aliases: contrasts contrasts<-
+> ### Keywords: design regression
+> 
+> ### ** Examples
+> 
+> utils::example(factor)
+
+factor> (ff <- factor(substring("statistics", 1:10, 1:10), levels = letters))
+ [1] s t a t i s t i c s
+Levels: a b c d e f g h i j k l m n o p q r s t u v w x y z
+
+factor> as.integer(ff)      # the internal codes
+ [1] 19 20  1 20  9 19 20  9  3 19
+
+factor> (f. <- factor(ff))  # drops the levels that do not occur
+ [1] s t a t i s t i c s
+Levels: a c i s t
+
+factor> ff[, drop = TRUE]   # the same, more transparently
+ [1] s t a t i s t i c s
+Levels: a c i s t
+
+factor> factor(letters[1:20], labels = "letter")
+ [1] letter1  letter2  letter3  letter4  letter5  letter6  letter7  letter8 
+ [9] letter9  letter10 letter11 letter12 letter13 letter14 letter15 letter16
+[17] letter17 letter18 letter19 letter20
+20 Levels: letter1 letter2 letter3 letter4 letter5 letter6 letter7 ... letter20
+
+factor> class(ordered(4:1)) # "ordered", inheriting from "factor"
+[1] "ordered" "factor" 
+
+factor> z <- factor(LETTERS[3:1], ordered = TRUE)
+
+factor> ## and "relational" methods work:
+factor> stopifnot(sort(z)[c(1,3)] == range(z), min(z) < max(z))
+
+factor> ## Don't show: 
+factor> of <- ordered(ff)
+
+factor> stopifnot(identical(range(of, rev(of)), of[3:2]),
+factor+ 	  identical(max(of), of[2]))
+
+factor> ## End(Don't show)
+factor> 
+factor> ## suppose you want "NA" as a level, and to allow missing values.
+factor> (x <- factor(c(1, 2, NA), exclude = NULL))
+[1] 1    2    <NA>
+Levels: 1 2 <NA>
+
+factor> is.na(x)[2] <- TRUE
+
+factor> x  # [1] 1    <NA> <NA>
+[1] 1    <NA> <NA>
+Levels: 1 2 <NA>
+
+factor> is.na(x)
+[1] FALSE  TRUE FALSE
+
+factor> # [1] FALSE  TRUE FALSE
+factor> 
+factor> ## Using addNA()
+factor> Month <- airquality$Month
+
+factor> table(addNA(Month))
+
+   5    6    7    8    9 <NA> 
+  31   30   31   31   30    0 
+
+factor> table(addNA(Month, ifany = TRUE))
+
+ 5  6  7  8  9 
+31 30 31 31 30 
+> fff <- ff[, drop = TRUE]  # reduce to 5 levels.
+> contrasts(fff) # treatment contrasts by default
+  c i s t
+a 0 0 0 0
+c 1 0 0 0
+i 0 1 0 0
+s 0 0 1 0
+t 0 0 0 1
+> contrasts(C(fff, sum))
+  [,1] [,2] [,3] [,4]
+a    1    0    0    0
+c    0    1    0    0
+i    0    0    1    0
+s    0    0    0    1
+t   -1   -1   -1   -1
+> contrasts(fff, contrasts = FALSE) # the 5x5 identity matrix
+  a c i s t
+a 1 0 0 0 0
+c 0 1 0 0 0
+i 0 0 1 0 0
+s 0 0 0 1 0
+t 0 0 0 0 1
+> 
+> contrasts(fff) <- contr.sum(5); contrasts(fff)  # set sum contrasts
+  [,1] [,2] [,3] [,4]
+a    1    0    0    0
+c    0    1    0    0
+i    0    0    1    0
+s    0    0    0    1
+t   -1   -1   -1   -1
+> contrasts(fff, 2) <- contr.sum(5); contrasts(fff)  # set 2 contrasts
+  [,1] [,2]
+a    1    0
+c    0    1
+i    0    0
+s    0    0
+t   -1   -1
+> # supply 2 contrasts, compute 2 more to make full set of 4.
+> contrasts(fff) <- contr.sum(5)[, 1:2]; contrasts(fff)
+  [,1] [,2]       [,3]       [,4]
+a    1    0 -0.2471257  0.2688164
+c    0    1 -0.2471257  0.2688164
+i    0    0 -0.1498721 -0.8817814
+s    0    0  0.8912491  0.0753323
+t   -1   -1 -0.2471257  0.2688164
+> 
+> 
+> 
+> cleanEx()
+> nameEx("convolve")
+> ### * convolve
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: convolve
+> ### Title: Convolution of Sequences via FFT
+> ### Aliases: convolve
+> ### Keywords: math dplot
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> x <- c(0,0,0,100,0,0,0)
+> y <- c(0,0,1, 2 ,1,0,0)/4
+> zapsmall(convolve(x, y))         #  *NOT* what you first thought.
+[1] 50 25  0  0  0  0 25
+> zapsmall(convolve(x, y[3:5], type = "f")) # rather
+[1]  0 25 50 25  0
+> x <- rnorm(50)
+> y <- rnorm(50)
+> # Circular convolution *has* this symmetry:
+> all.equal(convolve(x, y, conj = FALSE), rev(convolve(rev(y),x)))
+[1] TRUE
+> 
+> n <- length(x <- -20:24)
+> y <- (x-10)^2/1000 + rnorm(x)/8
+> 
+> Han <- function(y) # Hanning
++        convolve(y, c(1,2,1)/4, type = "filter")
+> 
+> plot(x, y, main = "Using  convolve(.) for Hanning filters")
+> lines(x[-c(1  , n)      ], Han(y), col = "red")
+> lines(x[-c(1:2, (n-1):n)], Han(Han(y)), lwd = 2, col = "dark blue")
+> 
+> 
+> 
+> cleanEx()
+> nameEx("cophenetic")
+> ### * cophenetic
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: cophenetic
+> ### Title: Cophenetic Distances for a Hierarchical Clustering
+> ### Aliases: cophenetic cophenetic.default cophenetic.dendrogram
+> ### Keywords: cluster multivariate
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> d1 <- dist(USArrests)
+> hc <- hclust(d1, "ave")
+> d2 <- cophenetic(hc)
+> cor(d1, d2) # 0.7659
+[1] 0.7658983
+> 
+> ## Example from Sneath & Sokal, Fig. 5-29, p.279
+> d0 <- c(1,3.8,4.4,5.1, 4,4.2,5, 2.6,5.3, 5.4)
+> attributes(d0) <- list(Size = 5, diag = TRUE)
+> class(d0) <- "dist"
+> names(d0) <- letters[1:5]
+> d0
+    1   2   3   4
+2 1.0            
+3 3.8 4.0        
+4 4.4 4.2 2.6    
+5 5.1 5.0 5.3 5.4
+> utils::str(upgma <- hclust(d0, method = "average"))
+List of 7
+ $ merge      : int [1:4, 1:2] -1 -3 1 -5 -2 -4 2 3
+ $ height     : num [1:4] 1 2.6 4.1 5.2
+ $ order      : int [1:5] 5 1 2 3 4
+ $ labels     : NULL
+ $ method     : chr "average"
+ $ call       : language hclust(d = d0, method = "average")
+ $ dist.method: NULL
+ - attr(*, "class")= chr "hclust"
+> plot(upgma, hang = -1)
+> #
+> (d.coph <- cophenetic(upgma))
+    1   2   3   4
+2 1.0            
+3 4.1 4.1        
+4 4.1 4.1 2.6    
+5 5.2 5.2 5.2 5.2
+> cor(d0, d.coph) # 0.9911
+[1] 0.9911351
+> 
+> 
+> 
+> cleanEx()
+> nameEx("cor")
+> ### * cor
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: cor
+> ### Title: Correlation, Variance and Covariance (Matrices)
+> ### Aliases: var cov cor cov2cor
+> ### Keywords: univar multivariate array
+> 
+> ### ** Examples
+> 
+> var(1:10)  # 9.166667
+[1] 9.166667
+> 
+> var(1:5, 1:5) # 2.5
+[1] 2.5
+> 
+> ## Two simple vectors
+> cor(1:10, 2:11) # == 1
+[1] 1
+> 
+> ## Correlation Matrix of Multivariate sample:
+> (Cl <- cor(longley))
+             GNP.deflator       GNP Unemployed Armed.Forces Population
+GNP.deflator    1.0000000 0.9915892  0.6206334    0.4647442  0.9791634
+GNP             0.9915892 1.0000000  0.6042609    0.4464368  0.9910901
+Unemployed      0.6206334 0.6042609  1.0000000   -0.1774206  0.6865515
+Armed.Forces    0.4647442 0.4464368 -0.1774206    1.0000000  0.3644163
+Population      0.9791634 0.9910901  0.6865515    0.3644163  1.0000000
+Year            0.9911492 0.9952735  0.6682566    0.4172451  0.9939528
+Employed        0.9708985 0.9835516  0.5024981    0.4573074  0.9603906
+                  Year  Employed
+GNP.deflator 0.9911492 0.9708985
+GNP          0.9952735 0.9835516
+Unemployed   0.6682566 0.5024981
+Armed.Forces 0.4172451 0.4573074
+Population   0.9939528 0.9603906
+Year         1.0000000 0.9713295
+Employed     0.9713295 1.0000000
+> ## Graphical Correlation Matrix:
+> symnum(Cl) # highly correlated
+             GNP. GNP U A P Y E
+GNP.deflator 1                 
+GNP          B    1            
+Unemployed   ,    ,   1        
+Armed.Forces .    .     1      
+Population   B    B   , . 1    
+Year         B    B   , . B 1  
+Employed     B    B   . . B B 1
+attr(,"legend")
+[1] 0 ‘ ’ 0.3 ‘.’ 0.6 ‘,’ 0.8 ‘+’ 0.9 ‘*’ 0.95 ‘B’ 1
+> 
+> ## Spearman's rho  and  Kendall's tau
+> symnum(clS <- cor(longley, method = "spearman"))
+             GNP. GNP U A P Y E
+GNP.deflator 1                 
+GNP          B    1            
+Unemployed   ,    ,   1        
+Armed.Forces          . 1      
+Population   B    B   ,   1    
+Year         B    B   ,   1 1  
+Employed     B    B   .   B B 1
+attr(,"legend")
+[1] 0 ‘ ’ 0.3 ‘.’ 0.6 ‘,’ 0.8 ‘+’ 0.9 ‘*’ 0.95 ‘B’ 1
+> symnum(clK <- cor(longley, method = "kendall"))
+             GNP. GNP U A P Y E
+GNP.deflator 1                 
+GNP          B    1            
+Unemployed   .    .   1        
+Armed.Forces            1      
+Population   B    B   .   1    
+Year         B    B   .   1 1  
+Employed     *    *   .   + + 1
+attr(,"legend")
+[1] 0 ‘ ’ 0.3 ‘.’ 0.6 ‘,’ 0.8 ‘+’ 0.9 ‘*’ 0.95 ‘B’ 1
+> ## How much do they differ?
+> i <- lower.tri(Cl)
+> cor(cbind(P = Cl[i], S = clS[i], K = clK[i]))
+          P         S         K
+P 1.0000000 0.9802390 0.9572562
+S 0.9802390 1.0000000 0.9742171
+K 0.9572562 0.9742171 1.0000000
+> 
+> 
+> ## cov2cor() scales a covariance matrix by its diagonal
+> ##           to become the correlation matrix.
+> cov2cor # see the function definition {and learn ..}
+function (V) 
+{
+    p <- (d <- dim(V))[1L]
+    if (!is.numeric(V) || length(d) != 2L || p != d[2L]) 
+        stop("'V' is not a square numeric matrix")
+    Is <- sqrt(1/diag(V))
+    if (any(!is.finite(Is))) 
+        warning("diag(.) had 0 or NA entries; non-finite result is doubtful")
+    r <- V
+    r[] <- Is * V * rep(Is, each = p)
+    r[cbind(1L:p, 1L:p)] <- 1
+    r
+}
+<bytecode: 0x5197148>
+<environment: namespace:stats>
+> stopifnot(all.equal(Cl, cov2cor(cov(longley))),
++           all.equal(cor(longley, method = "kendall"),
++             cov2cor(cov(longley, method = "kendall"))))
+> 
+> ##--- Missing value treatment:
+> C1 <- cov(swiss)
+> range(eigen(C1, only.values = TRUE)$values) # 6.19        1921
+[1]    6.191249 1921.562488
+> 
+> ## swM := "swiss" with  3 "missing"s :
+> swM <- swiss
+> colnames(swM) <- abbreviate(colnames(swiss), min=6)
+> swM[1,2] <- swM[7,3] <- swM[25,5] <- NA # create 3 "missing"
+> 
+> ## Consider all 5 "use" cases :
+> (C. <- cov(swM)) # use="everything"  quite a few NA's in cov.matrix
+          Frtlty Agrclt Exmntn     Eductn Cathlc    Infn.M
+Frtlty 156.04250     NA     NA -79.729510     NA 15.156193
+Agrclt        NA     NA     NA         NA     NA        NA
+Exmntn        NA     NA     NA         NA     NA        NA
+Eductn -79.72951     NA     NA  92.456059     NA -2.781684
+Cathlc        NA     NA     NA         NA     NA        NA
+Infn.M  15.15619     NA     NA  -2.781684     NA  8.483802
+> try(cov(swM, use = "all")) # Error: missing obs...
+Error in cov(swM, use = "all") : missing observations in cov/cor
+> C2 <- cov(swM, use = "complete")
+> stopifnot(identical(C2, cov(swM, use = "na.or.complete")))
+> range(eigen(C2, only.values = TRUE)$values) # 6.46   1930
+[1]    6.462385 1930.505982
+> C3 <- cov(swM, use = "pairwise")
+> range(eigen(C3, only.values = TRUE)$values) # 6.19   1938
+[1]    6.194469 1938.033663
+> 
+> ## Kendall's tau doesn't change much:
+> symnum(Rc <- cor(swM, method = "kendall", use = "complete"))
+       F A Ex Ed C I
+Frtlty 1            
+Agrclt   1          
+Exmntn . . 1        
+Eductn . . .  1     
+Cathlc     .     1  
+Infn.M             1
+attr(,"legend")
+[1] 0 ‘ ’ 0.3 ‘.’ 0.6 ‘,’ 0.8 ‘+’ 0.9 ‘*’ 0.95 ‘B’ 1
+> symnum(Rp <- cor(swM, method = "kendall", use = "pairwise"))
+       F A Ex Ed C I
+Frtlty 1            
+Agrclt   1          
+Exmntn . . 1        
+Eductn . . .  1     
+Cathlc     .     1  
+Infn.M .           1
+attr(,"legend")
+[1] 0 ‘ ’ 0.3 ‘.’ 0.6 ‘,’ 0.8 ‘+’ 0.9 ‘*’ 0.95 ‘B’ 1
+> symnum(R. <- cor(swiss, method = "kendall"))
+                 F A Ex Ed C I
+Fertility        1            
+Agriculture        1          
+Examination      . . 1        
+Education        . . .  1     
+Catholic             .     1  
+Infant.Mortality .           1
+attr(,"legend")
+[1] 0 ‘ ’ 0.3 ‘.’ 0.6 ‘,’ 0.8 ‘+’ 0.9 ‘*’ 0.95 ‘B’ 1
+> 
+> ## "pairwise" is closer componentwise,
+> summary(abs(c(1 - Rp/R.)))
+   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
+0.00000 0.00000 0.04481 0.09573 0.15210 0.53940 
+> summary(abs(c(1 - Rc/R.)))
+   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
+0.00000 0.02020 0.08482 0.50670 0.16190 7.08500 
+> 
+> ## but "complete" is closer in Eigen space:
+> EV <- function(m) eigen(m, only.values=TRUE)$values
+> summary(abs(1 - EV(Rp)/EV(R.)) / abs(1 - EV(Rc)/EV(R.)))
+   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
+ 0.8942  1.1460  1.2450  1.3730  1.3720  2.3270 
+> 
+> 
+> 
+> cleanEx()
+> nameEx("cor.test")
+> ### * cor.test
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: cor.test
+> ### Title: Test for Association/Correlation Between Paired Samples
+> ### Aliases: cor.test cor.test.default cor.test.formula
+> ### Keywords: htest
+> 
+> ### ** Examples
+> 
+> ## Hollander & Wolfe (1973), p. 187f.
+> ## Assessment of tuna quality.  We compare the Hunter L measure of
+> ##  lightness to the averages of consumer panel scores (recoded as
+> ##  integer values from 1 to 6 and averaged over 80 such values) in
+> ##  9 lots of canned tuna.
+> 
+> x <- c(44.4, 45.9, 41.9, 53.3, 44.7, 44.1, 50.7, 45.2, 60.1)
+> y <- c( 2.6,  3.1,  2.5,  5.0,  3.6,  4.0,  5.2,  2.8,  3.8)
+> 
+> ##  The alternative hypothesis of interest is that the
+> ##  Hunter L value is positively associated with the panel score.
+> 
+> cor.test(x, y, method = "kendall", alternative = "greater")
+
+	Kendall's rank correlation tau
+
+data:  x and y
+T = 26, p-value = 0.05972
+alternative hypothesis: true tau is greater than 0
+sample estimates:
+      tau 
+0.4444444 
+
+> ## => p=0.05972
+> 
+> cor.test(x, y, method = "kendall", alternative = "greater",
++          exact = FALSE) # using large sample approximation
+
+	Kendall's rank correlation tau
+
+data:  x and y
+z = 1.6681, p-value = 0.04765
+alternative hypothesis: true tau is greater than 0
+sample estimates:
+      tau 
+0.4444444 
+
+> ## => p=0.04765
+> 
+> ## Compare this to
+> cor.test(x, y, method = "spearm", alternative = "g")
+
+	Spearman's rank correlation rho
+
+data:  x and y
+S = 48, p-value = 0.0484
+alternative hypothesis: true rho is greater than 0
+sample estimates:
+rho 
+0.6 
+
+> cor.test(x, y,                    alternative = "g")
+
+	Pearson's product-moment correlation
+
+data:  x and y
+t = 1.8411, df = 7, p-value = 0.05409
+alternative hypothesis: true correlation is greater than 0
+95 percent confidence interval:
+ -0.02223023  1.00000000
+sample estimates:
+      cor 
+0.5711816 
+
+> 
+> ## Formula interface.
+> require(graphics)
+> pairs(USJudgeRatings)
+> cor.test(~ CONT + INTG, data = USJudgeRatings)
+
+	Pearson's product-moment correlation
+
+data:  CONT and INTG
+t = -0.8605, df = 41, p-value = 0.3945
+alternative hypothesis: true correlation is not equal to 0
+95 percent confidence interval:
+ -0.4168591  0.1741182
+sample estimates:
+       cor 
+-0.1331909 
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("cov.wt")
+> ### * cov.wt
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: cov.wt
+> ### Title: Weighted Covariance Matrices
+> ### Aliases: cov.wt
+> ### Keywords: multivariate
+> 
+> ### ** Examples
+> 
+>  (xy <- cbind(x = 1:10, y = c(1:3, 8:5, 8:10)))
+       x  y
+ [1,]  1  1
+ [2,]  2  2
+ [3,]  3  3
+ [4,]  4  8
+ [5,]  5  7
+ [6,]  6  6
+ [7,]  7  5
+ [8,]  8  8
+ [9,]  9  9
+[10,] 10 10
+>  w1 <- c(0,0,0,1,1,1,1,1,0,0)
+>  cov.wt(xy, wt = w1) # i.e. method = "unbiased"
+$cov
+     x    y
+x  2.5 -0.5
+y -0.5  1.7
+
+$center
+  x   y 
+6.0 6.8 
+
+$n.obs
+[1] 10
+
+$wt
+ [1] 0.0 0.0 0.0 0.2 0.2 0.2 0.2 0.2 0.0 0.0
+
+>  cov.wt(xy, wt = w1, method = "ML", cor = TRUE)
+$cov
+     x     y
+x  2.0 -0.40
+y -0.4  1.36
+
+$center
+  x   y 
+6.0 6.8 
+
+$n.obs
+[1] 10
+
+$wt
+ [1] 0.0 0.0 0.0 0.2 0.2 0.2 0.2 0.2 0.0 0.0
+
+$cor
+           x          y
+x  1.0000000 -0.2425356
+y -0.2425356  1.0000000
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("cpgram")
+> ### * cpgram
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: cpgram
+> ### Title: Plot Cumulative Periodogram
+> ### Aliases: cpgram
+> ### Keywords: ts hplot
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> par(pty = "s", mfrow = c(1,2))
+> cpgram(lh)
+> lh.ar <- ar(lh, order.max = 9)
+> cpgram(lh.ar$resid, main = "AR(3) fit to lh")
+> 
+> cpgram(ldeaths)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("cutree")
+> ### * cutree
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: cutree
+> ### Title: Cut a Tree into Groups of Data
+> ### Aliases: cutree
+> ### Keywords: multivariate cluster
+> 
+> ### ** Examples
+> 
+> hc <- hclust(dist(USArrests))
+> 
+> cutree(hc, k = 1:5) #k = 1 is trivial
+               1 2 3 4 5
+Alabama        1 1 1 1 1
+Alaska         1 1 1 1 1
+Arizona        1 1 1 1 1
+Arkansas       1 2 2 2 2
+California     1 1 1 1 1
+Colorado       1 2 2 2 2
+Connecticut    1 2 3 3 3
+Delaware       1 1 1 1 1
+Florida        1 1 1 4 4
+Georgia        1 2 2 2 2
+Hawaii         1 2 3 3 5
+Idaho          1 2 3 3 3
+Illinois       1 1 1 1 1
+Indiana        1 2 3 3 3
+Iowa           1 2 3 3 5
+Kansas         1 2 3 3 3
+Kentucky       1 2 3 3 3
+Louisiana      1 1 1 1 1
+Maine          1 2 3 3 5
+Maryland       1 1 1 1 1
+Massachusetts  1 2 2 2 2
+Michigan       1 1 1 1 1
+Minnesota      1 2 3 3 5
+Mississippi    1 1 1 1 1
+Missouri       1 2 2 2 2
+Montana        1 2 3 3 3
+Nebraska       1 2 3 3 3
+Nevada         1 1 1 1 1
+New Hampshire  1 2 3 3 5
+New Jersey     1 2 2 2 2
+New Mexico     1 1 1 1 1
+New York       1 1 1 1 1
+North Carolina 1 1 1 4 4
+North Dakota   1 2 3 3 5
+Ohio           1 2 3 3 3
+Oklahoma       1 2 2 2 2
+Oregon         1 2 2 2 2
+Pennsylvania   1 2 3 3 3
+Rhode Island   1 2 2 2 2
+South Carolina 1 1 1 1 1
+South Dakota   1 2 3 3 5
+Tennessee      1 2 2 2 2
+Texas          1 2 2 2 2
+Utah           1 2 3 3 3
+Vermont        1 2 3 3 5
+Virginia       1 2 2 2 2
+Washington     1 2 2 2 2
+West Virginia  1 2 3 3 5
+Wisconsin      1 2 3 3 5
+Wyoming        1 2 2 2 2
+> cutree(hc, h = 250)
+       Alabama         Alaska        Arizona       Arkansas     California 
+             1              1              1              2              1 
+      Colorado    Connecticut       Delaware        Florida        Georgia 
+             2              2              1              1              2 
+        Hawaii          Idaho       Illinois        Indiana           Iowa 
+             2              2              1              2              2 
+        Kansas       Kentucky      Louisiana          Maine       Maryland 
+             2              2              1              2              1 
+ Massachusetts       Michigan      Minnesota    Mississippi       Missouri 
+             2              1              2              1              2 
+       Montana       Nebraska         Nevada  New Hampshire     New Jersey 
+             2              2              1              2              2 
+    New Mexico       New York North Carolina   North Dakota           Ohio 
+             1              1              1              2              2 
+      Oklahoma         Oregon   Pennsylvania   Rhode Island South Carolina 
+             2              2              2              2              1 
+  South Dakota      Tennessee          Texas           Utah        Vermont 
+             2              2              2              2              2 
+      Virginia     Washington  West Virginia      Wisconsin        Wyoming 
+             2              2              2              2              2 
+> 
+> ## Compare the 2 and 4 grouping:
+> g24 <- cutree(hc, k = c(2,4))
+> table(grp2 = g24[,"2"], grp4 = g24[,"4"])
+    grp4
+grp2  1  2  3  4
+   1 14  0  0  2
+   2  0 14 20  0
+> 
+> 
+> 
+> cleanEx()
+> nameEx("decompose")
+> ### * decompose
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: decompose
+> ### Title: Classical Seasonal Decomposition by Moving Averages
+> ### Aliases: decompose plot.decomposed.ts
+> ### Keywords: ts
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> m <- decompose(co2)
+> m$figure
+ [1] -0.05359649  0.61055921  1.37564693  2.51682018  3.00028509  2.32921053
+ [7]  0.81293860 -1.25052632 -3.05458333 -3.25194079 -2.06969298 -0.96512061
+> plot(m)
+> 
+> ## example taken from Kendall/Stuart
+> x <- c(-50, 175, 149, 214, 247, 237, 225, 329, 729, 809,
++        530, 489, 540, 457, 195, 176, 337, 239, 128, 102, 232, 429, 3,
++        98, 43, -141, -77, -13, 125, 361, -45, 184)
+> x <- ts(x, start = c(1951, 1), end = c(1958, 4), frequency = 4)
+> m <- decompose(x)
+> ## seasonal figure: 6.25, 8.62, -8.84, -6.03
+> round(decompose(x)$figure / 10, 2)
+[1]  6.25  8.62 -8.84 -6.03
+> 
+> 
+> 
+> cleanEx()
+> nameEx("delete.response")
+> ### * delete.response
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: delete.response
+> ### Title: Modify Terms Objects
+> ### Aliases: reformulate drop.terms delete.response [.terms
+> ### Keywords: programming
+> 
+> ### ** Examples
+> 
+> ff <- y ~ z + x + w
+> tt <- terms(ff)
+> tt
+y ~ z + x + w
+attr(,"variables")
+list(y, z, x, w)
+attr(,"factors")
+  z x w
+y 0 0 0
+z 1 0 0
+x 0 1 0
+w 0 0 1
+attr(,"term.labels")
+[1] "z" "x" "w"
+attr(,"order")
+[1] 1 1 1
+attr(,"intercept")
+[1] 1
+attr(,"response")
+[1] 1
+attr(,".Environment")
+<environment: R_GlobalEnv>
+> delete.response(tt)
+~z + x + w
+attr(,"variables")
+list(z, x, w)
+attr(,"factors")
+  z x w
+z 1 0 0
+x 0 1 0
+w 0 0 1
+attr(,"term.labels")
+[1] "z" "x" "w"
+attr(,"order")
+[1] 1 1 1
+attr(,"intercept")
+[1] 1
+attr(,"response")
+[1] 0
+attr(,".Environment")
+<environment: R_GlobalEnv>
+> drop.terms(tt, 2:3, keep.response = TRUE)
+y ~ z
+attr(,"variables")
+list(y, z)
+attr(,"factors")
+  z
+y 0
+z 1
+attr(,"term.labels")
+[1] "z"
+attr(,"order")
+[1] 1
+attr(,"intercept")
+[1] 1
+attr(,"response")
+[1] 1
+attr(,".Environment")
+<environment: R_GlobalEnv>
+> tt[-1]
+y ~ x + w
+attr(,"variables")
+list(y, x, w)
+attr(,"factors")
+  x w
+y 0 0
+x 1 0
+w 0 1
+attr(,"term.labels")
+[1] "x" "w"
+attr(,"order")
+[1] 1 1
+attr(,"intercept")
+[1] 1
+attr(,"response")
+[1] 1
+attr(,".Environment")
+<environment: R_GlobalEnv>
+> tt[2:3]
+y ~ x + w
+attr(,"variables")
+list(y, x, w)
+attr(,"factors")
+  x w
+y 0 0
+x 1 0
+w 0 1
+attr(,"term.labels")
+[1] "x" "w"
+attr(,"order")
+[1] 1 1
+attr(,"intercept")
+[1] 1
+attr(,"response")
+[1] 1
+attr(,".Environment")
+<environment: R_GlobalEnv>
+> reformulate(attr(tt, "term.labels"))
+~z + x + w
+> 
+> ## keep LHS :
+> reformulate("x*w", ff[[2]])
+y ~ x * w
+> fS <- surv(ft, case) ~ a + b
+> reformulate(c("a", "b*f"), fS[[2]])
+surv(ft, case) ~ a + b * f
+> 
+> ## using non-syntactic names:
+> reformulate(c("`P/E`", "`% Growth`"), response = as.name("+-"))
+`+-` ~ `P/E` + `% Growth`
+> 
+> stopifnot(identical(      ~ var, reformulate("var")),
++           identical(~ a + b + c, reformulate(letters[1:3])),
++           identical(  y ~ a + b, reformulate(letters[1:2], "y"))
++          )
+> 
+> 
+> 
+> cleanEx()
+> nameEx("dendrapply")
+> ### * dendrapply
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: dendrapply
+> ### Title: Apply a Function to All Nodes of a Dendrogram
+> ### Aliases: dendrapply
+> ### Keywords: iteration
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> ## a smallish simple dendrogram
+> dhc <- as.dendrogram(hc <- hclust(dist(USArrests), "ave"))
+> (dhc21 <- dhc[[2]][[1]])
+'dendrogram' with 2 branches and 14 members total, at height 44.83793 
+> 
+> ## too simple:
+> dendrapply(dhc21, function(n) utils::str(attributes(n)))
+List of 4
+ $ members : int 14
+ $ midpoint: num 6.8
+ $ height  : num 44.8
+ $ class   : chr "dendrogram"
+List of 4
+ $ members : int 8
+ $ midpoint: num 3.34
+ $ height  : num 26.7
+ $ class   : chr "dendrogram"
+List of 4
+ $ members : int 5
+ $ midpoint: num 0.938
+ $ height  : num 16.4
+ $ class   : chr "dendrogram"
+List of 5
+ $ members: int 1
+ $ height : num 0
+ $ label  : chr "Washington"
+ $ leaf   : logi TRUE
+ $ class  : chr "dendrogram"
+List of 4
+ $ members : int 4
+ $ midpoint: num 0.875
+ $ height  : num 12.9
+ $ class   : chr "dendrogram"
+List of 5
+ $ members: int 1
+ $ height : num 0
+ $ label  : chr "Oregon"
+ $ leaf   : logi TRUE
+ $ class  : chr "dendrogram"
+List of 4
+ $ members : int 3
+ $ midpoint: num 0.75
+ $ height  : num 10.7
+ $ class   : chr "dendrogram"
+List of 5
+ $ members: int 1
+ $ height : num 0
+ $ label  : chr "Wyoming"
+ $ leaf   : logi TRUE
+ $ class  : chr "dendrogram"
+List of 4
+ $ members : int 2
+ $ midpoint: num 0.5
+ $ height  : num 7.36
+ $ class   : chr "dendrogram"
+List of 5
+ $ label  : chr "Oklahoma"
+ $ members: int 1
+ $ height : num 0
+ $ leaf   : logi TRUE
+ $ class  : chr "dendrogram"
+List of 5
+ $ label  : chr "Virginia"
+ $ members: int 1
+ $ height : num 0
+ $ leaf   : logi TRUE
+ $ class  : chr "dendrogram"
+List of 4
+ $ members : int 3
+ $ midpoint: num 0.75
+ $ height  : num 22.6
+ $ class   : chr "dendrogram"
+List of 5
+ $ members: int 1
+ $ height : num 0
+ $ label  : chr "Rhode Island"
+ $ leaf   : logi TRUE
+ $ class  : chr "dendrogram"
+List of 4
+ $ members : int 2
+ $ midpoint: num 0.5
+ $ height  : num 11.5
+ $ class   : chr "dendrogram"
+List of 5
+ $ label  : chr "Massachusetts"
+ $ members: int 1
+ $ height : num 0
+ $ leaf   : logi TRUE
+ $ class  : chr "dendrogram"
+List of 5
+ $ label  : chr "New Jersey"
+ $ members: int 1
+ $ height : num 0
+ $ leaf   : logi TRUE
+ $ class  : chr "dendrogram"
+List of 4
+ $ members : int 6
+ $ midpoint: num 2.25
+ $ height  : num 29.1
+ $ class   : chr "dendrogram"
+List of 4
+ $ members : int 3
+ $ midpoint: num 0.75
+ $ height  : num 20.2
+ $ class   : chr "dendrogram"
+List of 5
+ $ members: int 1
+ $ height : num 0
+ $ label  : chr "Missouri"
+ $ leaf   : logi TRUE
+ $ class  : chr "dendrogram"
+List of 4
+ $ members : int 2
+ $ midpoint: num 0.5
+ $ height  : num 12.6
+ $ class   : chr "dendrogram"
+List of 5
+ $ label  : chr "Arkansas"
+ $ members: int 1
+ $ height : num 0
+ $ leaf   : logi TRUE
+ $ class  : chr "dendrogram"
+List of 5
+ $ label  : chr "Tennessee"
+ $ members: int 1
+ $ height : num 0
+ $ leaf   : logi TRUE
+ $ class  : chr "dendrogram"
+List of 4
+ $ members : int 3
+ $ midpoint: num 0.75
+ $ height  : num 24
+ $ class   : chr "dendrogram"
+List of 5
+ $ members: int 1
+ $ height : num 0
+ $ label  : chr "Georgia"
+ $ leaf   : logi TRUE
+ $ class  : chr "dendrogram"
+List of 4
+ $ members : int 2
+ $ midpoint: num 0.5
+ $ height  : num 14.5
+ $ class   : chr "dendrogram"
+List of 5
+ $ label  : chr "Colorado"
+ $ members: int 1
+ $ height : num 0
+ $ leaf   : logi TRUE
+ $ class  : chr "dendrogram"
+List of 5
+ $ label  : chr "Texas"
+ $ members: int 1
+ $ height : num 0
+ $ leaf   : logi TRUE
+ $ class  : chr "dendrogram"
+[[1]]
+[[1]][[1]]
+[[1]][[1]][[1]]
+NULL
+
+[[1]][[1]][[2]]
+[[1]][[1]][[2]][[1]]
+NULL
+
+[[1]][[1]][[2]][[2]]
+[[1]][[1]][[2]][[2]][[1]]
+NULL
+
+[[1]][[1]][[2]][[2]][[2]]
+[[1]][[1]][[2]][[2]][[2]][[1]]
+NULL
+
+[[1]][[1]][[2]][[2]][[2]][[2]]
+NULL
+
+
+
+
+
+[[1]][[2]]
+[[1]][[2]][[1]]
+NULL
+
+[[1]][[2]][[2]]
+[[1]][[2]][[2]][[1]]
+NULL
+
+[[1]][[2]][[2]][[2]]
+NULL
+
+
+
+
+[[2]]
+[[2]][[1]]
+[[2]][[1]][[1]]
+NULL
+
+[[2]][[1]][[2]]
+[[2]][[1]][[2]][[1]]
+NULL
+
+[[2]][[1]][[2]][[2]]
+NULL
+
+
+
+[[2]][[2]]
+[[2]][[2]][[1]]
+NULL
+
+[[2]][[2]][[2]]
+[[2]][[2]][[2]][[1]]
+NULL
+
+[[2]][[2]][[2]][[2]]
+NULL
+
+
+
+
+> 
+> ## toy example to set colored leaf labels :
+> local({
++   colLab <<- function(n) {
++       if(is.leaf(n)) {
++         a <- attributes(n)
++         i <<- i+1
++         attr(n, "nodePar") <-
++             c(a$nodePar, list(lab.col = mycols[i], lab.font = i%%3))
++       }
++       n
++   }
++   mycols <- grDevices::rainbow(attr(dhc21,"members"))
++   i <- 0
++  })
+> dL <- dendrapply(dhc21, colLab)
+> op <- par(mfrow = 2:1)
+>  plot(dhc21)
+>  plot(dL) ## --> colored labels!
+> par(op)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("dendrogram")
+> ### * dendrogram
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: dendrogram
+> ### Title: General Tree Structures
+> ### Aliases: dendrogram as.dendrogram as.dendrogram.dendrogram
+> ###   as.dendrogram.hclust as.hclust.dendrogram cut.dendrogram
+> ###   [[.dendrogram merge.dendrogram nobs.dendrogram plot.dendrogram
+> ###   print.dendrogram rev.dendrogram str.dendrogram is.leaf
+> ### Keywords: multivariate tree hplot
+> 
+> ### ** Examples
+> 
+> require(graphics); require(utils)
+> 
+> hc <- hclust(dist(USArrests), "ave")
+> (dend1 <- as.dendrogram(hc)) # "print()" method
+'dendrogram' with 2 branches and 50 members total, at height 152.314 
+> str(dend1)          # "str()" method
+--[dendrogram w/ 2 branches and 50 members at h = 152]
+  |--[dendrogram w/ 2 branches and 16 members at h = 77.6]
+  |  |--[dendrogram w/ 2 branches and 2 members at h = 38.5]
+  |  |  |--leaf "Florida" 
+  |  |  `--leaf "North Carolina" 
+  |  `--[dendrogram w/ 2 branches and 14 members at h = 44.3]
+  |     |--[dendrogram w/ 2 branches and 4 members at h = 28]
+  |     |  |--leaf "California" 
+  |     |  `--[dendrogram w/ 2 branches and 3 members at h = 15.5]
+  |     |     |--leaf "Maryland" 
+  |     |     `--[dendrogram w/ 2 branches and 2 members at h = 13.9]
+  |     |        |--leaf "Arizona" 
+  |     |        `--leaf "New Mexico" 
+  |     `--[dendrogram w/ 2 branches and 10 members at h = 39.4]
+  |        |--[dendrogram w/ 2 branches and 7 members at h = 26.4]
+  |        |  |--[dendrogram w/ 2 branches and 3 members at h = 16.9]
+  |        |  |  |--leaf "Delaware" 
+  |        |  |  `--[dendrogram w/ 2 branches and 2 members at h = 15.5]
+  |        |  |     |--leaf "Alabama" 
+  |        |  |     `--leaf "Louisiana" 
+  |        |  `--[dendrogram w/ 2 branches and 4 members at h = 18.4]
+  |        |     |--[dendrogram w/ 2 branches and 2 members at h = 6.24]
+  |        |     |  |--leaf "Illinois" 
+  |        |     |  `--leaf "New York" 
+  |        |     `--[dendrogram w/ 2 branches and 2 members at h = 13.3]
+  |        |        |--leaf "Michigan" 
+  |        |        `--leaf "Nevada" 
+  |        `--[dendrogram w/ 2 branches and 3 members at h = 28.1]
+  |           |--leaf "Alaska" 
+  |           `--[dendrogram w/ 2 branches and 2 members at h = 21.2]
+  |              |--leaf "Mississippi" 
+  |              `--leaf "South Carolina" 
+  `--[dendrogram w/ 2 branches and 34 members at h = 89.2]
+     |--[dendrogram w/ 2 branches and 14 members at h = 44.8]
+     |  |--[dendrogram w/ 2 branches and 8 members at h = 26.7]
+     |  |  |--[dendrogram w/ 2 branches and 5 members at h = 16.4]
+     |  |  |  |--leaf "Washington" 
+     |  |  |  `--[dendrogram w/ 2 branches and 4 members at h = 12.9]
+     |  |  |     |--leaf "Oregon" 
+     |  |  |     `--[dendrogram w/ 2 branches and 3 members at h = 10.7]
+     |  |  |        |--leaf "Wyoming" 
+     |  |  |        `--[dendrogram w/ 2 branches and 2 members at h = 7.36]
+     |  |  |           |--leaf "Oklahoma" 
+     |  |  |           `--leaf "Virginia" 
+     |  |  `--[dendrogram w/ 2 branches and 3 members at h = 22.6]
+     |  |     |--leaf "Rhode Island" 
+     |  |     `--[dendrogram w/ 2 branches and 2 members at h = 11.5]
+     |  |        |--leaf "Massachusetts" 
+     |  |        `--leaf "New Jersey" 
+     |  `--[dendrogram w/ 2 branches and 6 members at h = 29.1]
+     |     |--[dendrogram w/ 2 branches and 3 members at h = 20.2]
+     |     |  |--leaf "Missouri" 
+     |     |  `--[dendrogram w/ 2 branches and 2 members at h = 12.6]
+     |     |     |--leaf "Arkansas" 
+     |     |     `--leaf "Tennessee" 
+     |     `--[dendrogram w/ 2 branches and 3 members at h = 24]
+     |        |--leaf "Georgia" 
+     |        `--[dendrogram w/ 2 branches and 2 members at h = 14.5]
+     |           |--leaf "Colorado" 
+     |           `--leaf "Texas" 
+     `--[dendrogram w/ 2 branches and 20 members at h = 54.7]
+        |--[dendrogram w/ 2 branches and 10 members at h = 20.6]
+        |  |--[dendrogram w/ 2 branches and 4 members at h = 15]
+        |  |  |--leaf "Idaho" 
+        |  |  `--[dendrogram w/ 2 branches and 3 members at h = 12.4]
+        |  |     |--leaf "Nebraska" 
+        |  |     `--[dendrogram w/ 2 branches and 2 members at h = 3.83]
+        |  |        |--leaf "Kentucky" 
+        |  |        `--leaf "Montana" 
+        |  `--[dendrogram w/ 2 branches and 6 members at h = 15.1]
+        |     |--[dendrogram w/ 2 branches and 2 members at h = 6.64]
+        |     |  |--leaf "Ohio" 
+        |     |  `--leaf "Utah" 
+        |     `--[dendrogram w/ 2 branches and 4 members at h = 13.4]
+        |        |--[dendrogram w/ 2 branches and 2 members at h = 3.93]
+        |        |  |--leaf "Indiana" 
+        |        |  `--leaf "Kansas" 
+        |        `--[dendrogram w/ 2 branches and 2 members at h = 8.03]
+        |           |--leaf "Connecticut" 
+        |           `--leaf "Pennsylvania" 
+        `--[dendrogram w/ 2 branches and 10 members at h = 41.1]
+           |--leaf "Hawaii" 
+           `--[dendrogram w/ 2 branches and 9 members at h = 33.1]
+              |--[dendrogram w/ 2 branches and 3 members at h = 10.8]
+              |  |--leaf "West Virginia" 
+              |  `--[dendrogram w/ 2 branches and 2 members at h = 8.54]
+              |     |--leaf "Maine" 
+              |     `--leaf "South Dakota" 
+              `--[dendrogram w/ 2 branches and 6 members at h = 27.8]
+                 |--[dendrogram w/ 2 branches and 2 members at h = 13]
+                 |  |--leaf "North Dakota" 
+                 |  `--leaf "Vermont" 
+                 `--[dendrogram w/ 2 branches and 4 members at h = 19]
+                    |--leaf "Minnesota" 
+                    `--[dendrogram w/ 2 branches and 3 members at h = 10.2]
+                       |--leaf "Wisconsin" 
+                       `--[dendrogram w/ 2 branches and 2 members at h = 2.29]
+                          |--leaf "Iowa" 
+                          `--leaf "New Hampshire" 
+> str(dend1, max = 2, last.str =  "'") # only the first two sub-levels
+--[dendrogram w/ 2 branches and 50 members at h = 152]
+  |--[dendrogram w/ 2 branches and 16 members at h = 77.6]
+  |  |--[dendrogram w/ 2 branches and 2 members at h = 38.5] ..
+  |  '--[dendrogram w/ 2 branches and 14 members at h = 44.3] ..
+  '--[dendrogram w/ 2 branches and 34 members at h = 89.2]
+     |--[dendrogram w/ 2 branches and 14 members at h = 44.8] ..
+     '--[dendrogram w/ 2 branches and 20 members at h = 54.7] ..
+> oo <- options(str.dendrogram.last = "\\") # yet another possibility
+> str(dend1, max = 2) # only the first two sub-levels
+--[dendrogram w/ 2 branches and 50 members at h = 152]
+  |--[dendrogram w/ 2 branches and 16 members at h = 77.6]
+  |  |--[dendrogram w/ 2 branches and 2 members at h = 38.5] ..
+  |  --[dendrogram w/ 2 branches and 14 members at h = 44.3] ..
+  --[dendrogram w/ 2 branches and 34 members at h = 89.2]
+     |--[dendrogram w/ 2 branches and 14 members at h = 44.8] ..
+     --[dendrogram w/ 2 branches and 20 members at h = 54.7] ..
+> options(oo)  # .. resetting them
+> 
+> op <- par(mfrow =  c(2,2), mar = c(5,2,1,4))
+> plot(dend1)
+> ## "triangle" type and show inner nodes:
+> plot(dend1, nodePar = list(pch = c(1,NA), cex = 0.8, lab.cex = 0.8),
++       type = "t", center = TRUE)
+> plot(dend1, edgePar = list(col = 1:2, lty = 2:3),
++      dLeaf = 1, edge.root = TRUE)
+> plot(dend1, nodePar = list(pch = 2:1, cex = .4*2:1, col = 2:3),
++      horiz = TRUE)
+> 
+> ## simple test for as.hclust() as the inverse of as.dendrogram():
+> stopifnot(identical(as.hclust(dend1)[1:4], hc[1:4]))
+> 
+> dend2 <- cut(dend1, h = 70)
+> plot(dend2$upper)
+> ## leaves are wrong horizontally:
+> plot(dend2$upper, nodePar = list(pch = c(1,7), col = 2:1))
+> ##  dend2$lower is *NOT* a dendrogram, but a list of .. :
+> plot(dend2$lower[[3]], nodePar = list(col = 4), horiz = TRUE, type = "tr")
+> ## "inner" and "leaf" edges in different type & color :
+> plot(dend2$lower[[2]], nodePar = list(col = 1),   # non empty list
++      edgePar = list(lty = 1:2, col = 2:1), edge.root = TRUE)
+> par(op)
+> d3 <- dend2$lower[[2]][[2]][[1]]
+> stopifnot(identical(d3, dend2$lower[[2]][[c(2,1)]]))
+> str(d3, last.str = "'")
+--[dendrogram w/ 2 branches and 7 members at h = 26.4]
+  |--[dendrogram w/ 2 branches and 3 members at h = 16.9]
+  |  |--leaf "Delaware" 
+  |  '--[dendrogram w/ 2 branches and 2 members at h = 15.5]
+  |     |--leaf "Alabama" 
+  |     '--leaf "Louisiana" 
+  '--[dendrogram w/ 2 branches and 4 members at h = 18.4]
+     |--[dendrogram w/ 2 branches and 2 members at h = 6.24]
+     |  |--leaf "Illinois" 
+     |  '--leaf "New York" 
+     '--[dendrogram w/ 2 branches and 2 members at h = 13.3]
+        |--leaf "Michigan" 
+        '--leaf "Nevada" 
+> 
+> ## to peek at the inner structure "if you must", use '[..]' indexing :
+> str(d3[2][[1]]) ## or the full
+List of 2
+ $ :List of 2
+  ..$ : atomic [1:1] 13
+  .. ..- attr(*, "label")= chr "Illinois"
+  .. ..- attr(*, "members")= int 1
+  .. ..- attr(*, "height")= num 0
+  .. ..- attr(*, "leaf")= logi TRUE
+  ..$ : atomic [1:1] 32
+  .. ..- attr(*, "label")= chr "New York"
+  .. ..- attr(*, "members")= int 1
+  .. ..- attr(*, "height")= num 0
+  .. ..- attr(*, "leaf")= logi TRUE
+  ..- attr(*, "members")= int 2
+  ..- attr(*, "midpoint")= num 0.5
+  ..- attr(*, "height")= num 6.24
+ $ :List of 2
+  ..$ : atomic [1:1] 22
+  .. ..- attr(*, "label")= chr "Michigan"
+  .. ..- attr(*, "members")= int 1
+  .. ..- attr(*, "height")= num 0
+  .. ..- attr(*, "leaf")= logi TRUE
+  ..$ : atomic [1:1] 28
+  .. ..- attr(*, "label")= chr "Nevada"
+  .. ..- attr(*, "members")= int 1
+  .. ..- attr(*, "height")= num 0
+  .. ..- attr(*, "leaf")= logi TRUE
+  ..- attr(*, "members")= int 2
+  ..- attr(*, "midpoint")= num 0.5
+  ..- attr(*, "height")= num 13.3
+ - attr(*, "members")= int 4
+ - attr(*, "midpoint")= num 1.5
+ - attr(*, "height")= num 18.4
+> str(d3[])
+List of 2
+ $ :List of 2
+  ..$ : atomic [1:1] 8
+  .. ..- attr(*, "members")= int 1
+  .. ..- attr(*, "height")= num 0
+  .. ..- attr(*, "label")= chr "Delaware"
+  .. ..- attr(*, "leaf")= logi TRUE
+  ..$ :List of 2
+  .. ..$ : atomic [1:1] 1
+  .. .. ..- attr(*, "label")= chr "Alabama"
+  .. .. ..- attr(*, "members")= int 1
+  .. .. ..- attr(*, "height")= num 0
+  .. .. ..- attr(*, "leaf")= logi TRUE
+  .. ..$ : atomic [1:1] 18
+  .. .. ..- attr(*, "label")= chr "Louisiana"
+  .. .. ..- attr(*, "members")= int 1
+  .. .. ..- attr(*, "height")= num 0
+  .. .. ..- attr(*, "leaf")= logi TRUE
+  .. ..- attr(*, "members")= int 2
+  .. ..- attr(*, "midpoint")= num 0.5
+  .. ..- attr(*, "height")= num 15.5
+  ..- attr(*, "members")= int 3
+  ..- attr(*, "midpoint")= num 0.75
+  ..- attr(*, "height")= num 16.9
+ $ :List of 2
+  ..$ :List of 2
+  .. ..$ : atomic [1:1] 13
+  .. .. ..- attr(*, "label")= chr "Illinois"
+  .. .. ..- attr(*, "members")= int 1
+  .. .. ..- attr(*, "height")= num 0
+  .. .. ..- attr(*, "leaf")= logi TRUE
+  .. ..$ : atomic [1:1] 32
+  .. .. ..- attr(*, "label")= chr "New York"
+  .. .. ..- attr(*, "members")= int 1
+  .. .. ..- attr(*, "height")= num 0
+  .. .. ..- attr(*, "leaf")= logi TRUE
+  .. ..- attr(*, "members")= int 2
+  .. ..- attr(*, "midpoint")= num 0.5
+  .. ..- attr(*, "height")= num 6.24
+  ..$ :List of 2
+  .. ..$ : atomic [1:1] 22
+  .. .. ..- attr(*, "label")= chr "Michigan"
+  .. .. ..- attr(*, "members")= int 1
+  .. .. ..- attr(*, "height")= num 0
+  .. .. ..- attr(*, "leaf")= logi TRUE
+  .. ..$ : atomic [1:1] 28
+  .. .. ..- attr(*, "label")= chr "Nevada"
+  .. .. ..- attr(*, "members")= int 1
+  .. .. ..- attr(*, "height")= num 0
+  .. .. ..- attr(*, "leaf")= logi TRUE
+  .. ..- attr(*, "members")= int 2
+  .. ..- attr(*, "midpoint")= num 0.5
+  .. ..- attr(*, "height")= num 13.3
+  ..- attr(*, "members")= int 4
+  ..- attr(*, "midpoint")= num 1.5
+  ..- attr(*, "height")= num 18.4
+ - attr(*, "members")= int 7
+ - attr(*, "midpoint")= num 2.62
+ - attr(*, "height")= num 26.4
+> 
+> ## merge() to join dendrograms:
+> (d13 <- merge(dend2$lower[[1]], dend2$lower[[3]]))
+'dendrogram' with 2 branches and 16 members total, at height 49.32173 
+> ## merge() all parts back (using default 'height' instead of original one):
+> den.1 <- Reduce(merge, dend2$lower)
+> ## or merge() all four parts at same height --> 4 branches (!)
+> d. <- merge(dend2$lower[[1]], dend2$lower[[2]], dend2$lower[[3]],
++             dend2$lower[[4]])
+> ## (with a warning) or the same using  do.call :
+> stopifnot(identical(d., do.call(merge, dend2$lower)))
+> plot(d., main = "merge(d1, d2, d3, d4)  |->  dendrogram with a 4-split")
+> 
+> ## "Zoom" in to the first dendrogram :
+> plot(dend1, xlim = c(1,20), ylim = c(1,50))
+> 
+> nP <- list(col = 3:2, cex = c(2.0, 0.75), pch =  21:22,
++            bg =  c("light blue", "pink"),
++            lab.cex = 0.75, lab.col = "tomato")
+> plot(d3, nodePar= nP, edgePar = list(col = "gray", lwd = 2), horiz = TRUE)
+> addE <- function(n) {
++       if(!is.leaf(n)) {
++         attr(n, "edgePar") <- list(p.col = "plum")
++         attr(n, "edgetext") <- paste(attr(n,"members"),"members")
++       }
++       n
++ }
+> d3e <- dendrapply(d3, addE)
+> plot(d3e, nodePar =  nP)
+> plot(d3e, nodePar =  nP, leaflab = "textlike")
+> 
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("density")
+> ### * density
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: density
+> ### Title: Kernel Density Estimation
+> ### Aliases: density density.default
+> ### Keywords: distribution smooth
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> plot(density(c(-20, rep(0,98), 20)), xlim = c(-4, 4))  # IQR = 0
+> 
+> # The Old Faithful geyser data
+> d <- density(faithful$eruptions, bw = "sj")
+> d
+
+Call:
+	density.default(x = faithful$eruptions, bw = "sj")
+
+Data: faithful$eruptions (272 obs.);	Bandwidth 'bw' = 0.14
+
+       x               y            
+ Min.   :1.180   Min.   :0.0001834  
+ 1st Qu.:2.265   1st Qu.:0.0422638  
+ Median :3.350   Median :0.1709243  
+ Mean   :3.350   Mean   :0.2301726  
+ 3rd Qu.:4.435   3rd Qu.:0.4134348  
+ Max.   :5.520   Max.   :0.5945634  
+> plot(d)
+> 
+> plot(d, type = "n")
+> polygon(d, col = "wheat")
+> 
+> ## Missing values:
+> x <- xx <- faithful$eruptions
+> x[i.out <- sample(length(x), 10)] <- NA
+> doR <- density(x, bw = 0.15, na.rm = TRUE)
+> lines(doR, col = "blue")
+> points(xx[i.out], rep(0.01, 10))
+> 
+> ## Weighted observations:
+> fe <- sort(faithful$eruptions) # has quite a few non-unique values
+> ## use 'counts / n' as weights:
+> dw <- density(unique(fe), weights = table(fe)/length(fe), bw = d$bw)
+> utils::str(dw) ## smaller n: only 126, but identical estimate:
+List of 7
+ $ x        : num [1:512] 1.18 1.19 1.2 1.21 1.21 ...
+ $ y        : num [1:512] 0.000183 0.000223 0.00027 0.000328 0.000397 ...
+ $ bw       : num 0.14
+ $ n        : int 126
+ $ call     : language density.default(x = unique(fe), bw = d$bw, weights = table(fe)/length(fe))
+ $ data.name: chr "unique(fe)"
+ $ has.na   : logi FALSE
+ - attr(*, "class")= chr "density"
+> stopifnot(all.equal(d[1:3], dw[1:3]))
+> 
+> ## simulation from a density() fit:
+> # a kernel density fit is an equally-weighted mixture.
+> fit <- density(xx)
+> N <- 1e6
+> x.new <- rnorm(N, sample(xx, size = N, replace = TRUE), fit$bw)
+> plot(fit)
+> lines(density(x.new), col = "blue")
+> 
+> 
+> (kernels <- eval(formals(density.default)$kernel))
+[1] "gaussian"     "epanechnikov" "rectangular"  "triangular"   "biweight"    
+[6] "cosine"       "optcosine"   
+> 
+> ## show the kernels in the R parametrization
+> plot (density(0, bw = 1), xlab = "",
++       main = "R's density() kernels with bw = 1")
+> for(i in 2:length(kernels))
++    lines(density(0, bw = 1, kernel =  kernels[i]), col = i)
+> legend(1.5,.4, legend = kernels, col = seq(kernels),
++        lty = 1, cex = .8, y.intersp = 1)
+> 
+> ## show the kernels in the S parametrization
+> plot(density(0, from = -1.2, to = 1.2, width = 2, kernel = "gaussian"),
++      type = "l", ylim = c(0, 1), xlab = "",
++      main = "R's density() kernels with width = 1")
+> for(i in 2:length(kernels))
++    lines(density(0, width = 2, kernel =  kernels[i]), col = i)
+> legend(0.6, 1.0, legend = kernels, col = seq(kernels), lty = 1)
+> 
+> ##-------- Semi-advanced theoretic from here on -------------
+> 
+> (RKs <- cbind(sapply(kernels,
++                      function(k) density(kernel = k, give.Rkern = TRUE))))
+                  [,1]
+gaussian     0.2820948
+epanechnikov 0.2683282
+rectangular  0.2886751
+triangular   0.2721655
+biweight     0.2699746
+cosine       0.2711340
+optcosine    0.2684756
+> 100*round(RKs["epanechnikov",]/RKs, 4) ## Efficiencies
+               [,1]
+gaussian      95.12
+epanechnikov 100.00
+rectangular   92.95
+triangular    98.59
+biweight      99.39
+cosine        98.97
+optcosine     99.95
+> 
+> bw <- bw.SJ(precip) ## sensible automatic choice
+> plot(density(precip, bw = bw),
++      main = "same sd bandwidths, 7 different kernels")
+> for(i in 2:length(kernels))
++    lines(density(precip, bw = bw, kernel = kernels[i]), col = i)
+> 
+> ## Bandwidth Adjustment for "Exactly Equivalent Kernels"
+> h.f <- sapply(kernels, function(k)density(kernel = k, give.Rkern = TRUE))
+> (h.f <- (h.f["gaussian"] / h.f)^ .2)
+    gaussian epanechnikov  rectangular   triangular     biweight       cosine 
+   1.0000000    1.0100567    0.9953989    1.0071923    1.0088217    1.0079575 
+   optcosine 
+   1.0099458 
+> ## -> 1, 1.01, .995, 1.007,... close to 1 => adjustment barely visible..
+> 
+> plot(density(precip, bw = bw),
++      main = "equivalent bandwidths, 7 different kernels")
+> for(i in 2:length(kernels))
++    lines(density(precip, bw = bw, adjust = h.f[i], kernel = kernels[i]),
++          col = i)
+> legend(55, 0.035, legend = kernels, col = seq(kernels), lty = 1)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("deriv")
+> ### * deriv
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: deriv
+> ### Title: Symbolic and Algorithmic Derivatives of Simple Expressions
+> ### Aliases: D deriv deriv.default deriv.formula deriv3 deriv3.default
+> ###   deriv3.formula
+> ### Keywords: math nonlinear
+> 
+> ### ** Examples
+> 
+> ## formula argument :
+> dx2x <- deriv(~ x^2, "x") ; dx2x
+expression({
+    .value <- x^2
+    .grad <- array(0, c(length(.value), 1L), list(NULL, c("x")))
+    .grad[, "x"] <- 2 * x
+    attr(.value, "gradient") <- .grad
+    .value
+})
+> ## Not run: 
+> ##D expression({
+> ##D          .value <- x^2
+> ##D          .grad <- array(0, c(length(.value), 1), list(NULL, c("x")))
+> ##D          .grad[, "x"] <- 2 * x
+> ##D          attr(.value, "gradient") <- .grad
+> ##D          .value
+> ##D })
+> ## End(Not run)
+> mode(dx2x)
+[1] "expression"
+> x <- -1:2
+> eval(dx2x)
+[1] 1 0 1 4
+attr(,"gradient")
+      x
+[1,] -2
+[2,]  0
+[3,]  2
+[4,]  4
+> 
+> ## Something 'tougher':
+> trig.exp <- expression(sin(cos(x + y^2)))
+> ( D.sc <- D(trig.exp, "x") )
+-(cos(cos(x + y^2)) * sin(x + y^2))
+> all.equal(D(trig.exp[[1]], "x"), D.sc)
+[1] TRUE
+> 
+> ( dxy <- deriv(trig.exp, c("x", "y")) )
+expression({
+    .expr2 <- x + y^2
+    .expr3 <- cos(.expr2)
+    .expr5 <- cos(.expr3)
+    .expr6 <- sin(.expr2)
+    .value <- sin(.expr3)
+    .grad <- array(0, c(length(.value), 2L), list(NULL, c("x", 
+        "y")))
+    .grad[, "x"] <- -(.expr5 * .expr6)
+    .grad[, "y"] <- -(.expr5 * (.expr6 * (2 * y)))
+    attr(.value, "gradient") <- .grad
+    .value
+})
+> y <- 1
+> eval(dxy)
+[1]  0.8414710  0.5143953 -0.4042392 -0.8360219
+attr(,"gradient")
+              x         y
+[1,]  0.0000000  0.000000
+[2,] -0.7216061 -1.443212
+[3,] -0.8316919 -1.663384
+[4,] -0.0774320 -0.154864
+> eval(D.sc)
+[1]  0.0000000 -0.7216061 -0.8316919 -0.0774320
+> 
+> ## function returned:
+> deriv((y ~ sin(cos(x) * y)), c("x","y"), func = TRUE)
+function (x, y) 
+{
+    .expr1 <- cos(x)
+    .expr2 <- .expr1 * y
+    .expr4 <- cos(.expr2)
+    .value <- sin(.expr2)
+    .grad <- array(0, c(length(.value), 2L), list(NULL, c("x", 
+        "y")))
+    .grad[, "x"] <- -(.expr4 * (sin(x) * y))
+    .grad[, "y"] <- .expr4 * .expr1
+    attr(.value, "gradient") <- .grad
+    .value
+}
+> 
+> ## function with defaulted arguments:
+> (fx <- deriv(y ~ b0 + b1 * 2^(-x/th), c("b0", "b1", "th"),
++              function(b0, b1, th, x = 1:7){} ) )
+function (b0, b1, th, x = 1:7) 
+{
+    .expr3 <- 2^(-x/th)
+    .value <- b0 + b1 * .expr3
+    .grad <- array(0, c(length(.value), 3L), list(NULL, c("b0", 
+        "b1", "th")))
+    .grad[, "b0"] <- 1
+    .grad[, "b1"] <- .expr3
+    .grad[, "th"] <- b1 * (.expr3 * (log(2) * (x/th^2)))
+    attr(.value, "gradient") <- .grad
+    .value
+}
+> fx(2, 3, 4)
+[1] 4.522689 4.121320 3.783811 3.500000 3.261345 3.060660 2.891905
+attr(,"gradient")
+     b0        b1        th
+[1,]  1 0.8408964 0.1092872
+[2,]  1 0.7071068 0.1837984
+[3,]  1 0.5946036 0.2318331
+[4,]  1 0.5000000 0.2599302
+[5,]  1 0.4204482 0.2732180
+[6,]  1 0.3535534 0.2756976
+[7,]  1 0.2973018 0.2704720
+> 
+> ## First derivative
+> 
+> D(expression(x^2), "x")
+2 * x
+> stopifnot(D(as.name("x"), "x") == 1)
+> 
+> ## Higher derivatives
+> deriv3(y ~ b0 + b1 * 2^(-x/th), c("b0", "b1", "th"),
++      c("b0", "b1", "th", "x") )
+function (b0, b1, th, x) 
+{
+    .expr3 <- 2^(-x/th)
+    .expr6 <- log(2)
+    .expr7 <- th^2
+    .expr9 <- .expr6 * (x/.expr7)
+    .expr10 <- .expr3 * .expr9
+    .value <- b0 + b1 * .expr3
+    .grad <- array(0, c(length(.value), 3L), list(NULL, c("b0", 
+        "b1", "th")))
+    .hessian <- array(0, c(length(.value), 3L, 3L), list(NULL, 
+        c("b0", "b1", "th"), c("b0", "b1", "th")))
+    .grad[, "b0"] <- 1
+    .grad[, "b1"] <- .expr3
+    .hessian[, "b1", "b1"] <- 0
+    .hessian[, "b1", "th"] <- .hessian[, "th", "b1"] <- .expr10
+    .grad[, "th"] <- b1 * .expr10
+    .hessian[, "th", "th"] <- b1 * (.expr10 * .expr9 - .expr3 * 
+        (.expr6 * (x * (2 * th)/.expr7^2)))
+    attr(.value, "gradient") <- .grad
+    attr(.value, "hessian") <- .hessian
+    .value
+}
+> 
+> ## Higher derivatives:
+> DD <- function(expr, name, order = 1) {
++    if(order < 1) stop("'order' must be >= 1")
++    if(order == 1) D(expr, name)
++    else DD(D(expr, name), name, order - 1)
++ }
+> DD(expression(sin(x^2)), "x", 3)
+-(sin(x^2) * (2 * x) * 2 + ((cos(x^2) * (2 * x) * (2 * x) + sin(x^2) * 
+    2) * (2 * x) + sin(x^2) * (2 * x) * 2))
+> ## showing the limits of the internal "simplify()" :
+> ## Not run: 
+> ##D -sin(x^2) * (2 * x) * 2 + ((cos(x^2) * (2 * x) * (2 * x) + sin(x^2) *
+> ##D     2) * (2 * x) + sin(x^2) * (2 * x) * 2)
+> ## End(Not run)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("diffinv")
+> ### * diffinv
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: diffinv
+> ### Title: Discrete Integration: Inverse of Differencing
+> ### Aliases: diffinv diffinv.default diffinv.ts
+> ### Keywords: ts
+> 
+> ### ** Examples
+> 
+> s <- 1:10
+> d <- diff(s)
+> diffinv(d, xi = 1)
+ [1]  1  2  3  4  5  6  7  8  9 10
+> 
+> 
+> 
+> cleanEx()
+> nameEx("dist")
+> ### * dist
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: dist
+> ### Title: Distance Matrix Computation
+> ### Aliases: dist print.dist format.dist labels.dist as.matrix.dist as.dist
+> ###   as.dist.default
+> ### Keywords: multivariate cluster
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> x <- matrix(rnorm(100), nrow = 5)
+> dist(x)
+         1        2        3        4
+2 5.701817                           
+3 6.013119 5.032069                  
+4 7.276905 5.325473 5.811861         
+5 6.619295 5.306750 4.945987 6.612081
+> dist(x, diag = TRUE)
+         1        2        3        4        5
+1 0.000000                                    
+2 5.701817 0.000000                           
+3 6.013119 5.032069 0.000000                  
+4 7.276905 5.325473 5.811861 0.000000         
+5 6.619295 5.306750 4.945987 6.612081 0.000000
+> dist(x, upper = TRUE)
+         1        2        3        4        5
+1          5.701817 6.013119 7.276905 6.619295
+2 5.701817          5.032069 5.325473 5.306750
+3 6.013119 5.032069          5.811861 4.945987
+4 7.276905 5.325473 5.811861          6.612081
+5 6.619295 5.306750 4.945987 6.612081         
+> m <- as.matrix(dist(x))
+> d <- as.dist(m)
+> stopifnot(d == dist(x))
+> 
+> ## Use correlations between variables "as distance"
+> dd <- as.dist((1 - cor(USJudgeRatings))/2)
+> round(1000 * dd) # (prints more nicely)
+     CONT INTG DMNR DILG CFMG DECI PREP FAMI ORAL WRIT PHYS
+INTG  567                                                  
+DMNR  577   18                                             
+DILG  494   64   82                                        
+CFMG  432   93   93   21                                   
+DECI  457   99   98   22    9                              
+PREP  494   61   72   11   21   21                         
+FAMI  513   66   79   21   32   29    5                    
+ORAL  506   44   47   23   25   26    8    9               
+WRIT  522   46   53   20   29   27    7    5    3          
+PHYS  473  129  106   94   60   64   76   78   54   72     
+RTEN  517   31   28   35   36   38   25   29    9   16   47
+> plot(hclust(dd)) # to see a dendrogram of clustered variables
+> 
+> ## example of binary and canberra distances.
+> x <- c(0, 0, 1, 1, 1, 1)
+> y <- c(1, 0, 1, 1, 0, 1)
+> dist(rbind(x, y), method = "binary")
+    x
+y 0.4
+> ## answer 0.4 = 2/5
+> dist(rbind(x, y), method = "canberra")
+    x
+y 2.4
+> ## answer 2 * (6/5)
+> 
+> ## To find the names
+> labels(eurodist)
+ [1] "Athens"          "Barcelona"       "Brussels"        "Calais"         
+ [5] "Cherbourg"       "Cologne"         "Copenhagen"      "Geneva"         
+ [9] "Gibraltar"       "Hamburg"         "Hook of Holland" "Lisbon"         
+[13] "Lyons"           "Madrid"          "Marseilles"      "Milan"          
+[17] "Munich"          "Paris"           "Rome"            "Stockholm"      
+[21] "Vienna"         
+> 
+> ## Examples involving "Inf" :
+> ## 1)
+> x[6] <- Inf
+> (m2 <- rbind(x, y))
+  [,1] [,2] [,3] [,4] [,5] [,6]
+x    0    0    1    1    1  Inf
+y    1    0    1    1    0    1
+> dist(m2, method = "binary")   # warning, answer 0.5 = 2/4
+Warning in dist(m2, method = "binary") :
+  treating non-finite values as NA
+    x
+y 0.5
+> ## These all give "Inf":
+> stopifnot(Inf == dist(m2, method =  "euclidean"),
++           Inf == dist(m2, method =  "maximum"),
++           Inf == dist(m2, method =  "manhattan"))
+> ##  "Inf" is same as very large number:
+> x1 <- x; x1[6] <- 1e100
+> stopifnot(dist(cbind(x, y), method = "canberra") ==
++     print(dist(cbind(x1, y), method = "canberra")))
+  1 2 3 4 5
+2 2        
+3 1 2      
+4 1 2 0    
+5 2 2 1 1  
+6 1 2 1 1 2
+> 
+> ## 2)
+> y[6] <- Inf #-> 6-th pair is excluded
+> dist(rbind(x, y), method = "binary"  )   # warning; 0.5
+Warning in dist(rbind(x, y), method = "binary") :
+  treating non-finite values as NA
+    x
+y 0.5
+> dist(rbind(x, y), method = "canberra"  ) # 3
+  x
+y 3
+> dist(rbind(x, y), method = "maximum")    # 1
+  x
+y 1
+> dist(rbind(x, y), method = "manhattan")  # 2.4
+    x
+y 2.4
+> 
+> 
+> 
+> cleanEx()
+> nameEx("dummy.coef")
+> ### * dummy.coef
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: dummy.coef
+> ### Title: Extract Coefficients in Original Coding
+> ### Aliases: dummy.coef dummy.coef.lm dummy.coef.aovlist
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> options(contrasts = c("contr.helmert", "contr.poly"))
+> ## From Venables and Ripley (2002) p.165.
+> npk.aov <- aov(yield ~ block + N*P*K, npk)
+> dummy.coef(npk.aov)
+Full coefficients are 
+                                                                               
+(Intercept):        54.875                                                     
+block:                   1          2          3          4      5      6      
+                    -0.850      2.575      5.900     -4.750 -4.350  1.475      
+N:                       0          1                                          
+                 -2.808333   2.808333                                          
+P:                       0          1                                          
+                 0.5916667 -0.5916667                                          
+K:                       0          1                                          
+                  1.991667  -1.991667                                          
+N:P:                   0:0        1:0        0:1        1:1                    
+                -0.9416667  0.9416667  0.9416667 -0.9416667                    
+N:K:                   0:0        1:0        0:1        1:1                    
+                    -1.175      1.175      1.175     -1.175                    
+P:K:                   0:0        1:0        0:1        1:1                    
+                 0.1416667 -0.1416667 -0.1416667  0.1416667                    
+N:P:K:               0:0:0      1:0:0      0:1:0      1:1:0  0:0:1  1:0:1 0:1:1
+                         0          0          0          0      0      0     0
+                     
+(Intercept):         
+block:               
+                     
+N:                   
+                     
+P:                   
+                     
+K:                   
+                     
+N:P:                 
+                     
+N:K:                 
+                     
+P:K:                 
+                     
+N:P:K:          1:1:1
+                    0
+> 
+> npk.aovE <- aov(yield ~  N*P*K + Error(block), npk)
+> dummy.coef(npk.aovE)
+
+     Error: (Intercept) 
+                      
+(Intercept):    54.875
+
+     Error: block 
+                                                                               
+N:P:K:        0:0:0     1:0:0     0:1:0     1:1:0     0:0:1     1:0:1     0:1:1
+          -1.241667  1.241667  1.241667 -1.241667  1.241667 -1.241667 -1.241667
+                   
+N:P:K:        1:1:1
+           1.241667
+
+     Error: Within 
+                                                   
+N:               0          1                      
+         -2.808333   2.808333                      
+P:               0          1                      
+         0.5916667 -0.5916667                      
+K:               0          1                      
+          1.991667  -1.991667                      
+N:P:           0:0        1:0        0:1        1:1
+        -0.9416667  0.9416667  0.9416667 -0.9416667
+N:K:           0:0        1:0        0:1        1:1
+            -1.175      1.175      1.175     -1.175
+P:K:           0:0        1:0        0:1        1:1
+         0.1416667 -0.1416667 -0.1416667  0.1416667
+> 
+> 
+> 
+> base::options(contrasts = c(unordered = "contr.treatment",ordered = "contr.poly"))
+> cleanEx()
+> nameEx("ecdf")
+> ### * ecdf
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: ecdf
+> ### Title: Empirical Cumulative Distribution Function
+> ### Aliases: ecdf plot.ecdf print.ecdf summary.ecdf quantile.ecdf
+> ### Keywords: dplot hplot
+> 
+> ### ** Examples
+> 
+> ##-- Simple didactical  ecdf  example :
+> x <- rnorm(12)
+> Fn <- ecdf(x)
+> Fn     # a *function*
+Empirical CDF 
+Call: ecdf(x)
+ x[1:12] = -0.83563, -0.82047, -0.62645,  ..., 1.5118, 1.5953
+> Fn(x)  # returns the percentiles for x
+ [1] 0.25000000 0.41666667 0.08333333 1.00000000 0.50000000 0.16666667
+ [7] 0.66666667 0.83333333 0.75000000 0.33333333 0.91666667 0.58333333
+> tt <- seq(-2, 2, by = 0.1)
+> 12 * Fn(tt) # Fn is a 'simple' function {with values k/12}
+ [1]  0  0  0  0  0  0  0  0  0  0  0  0  2  2  3  3  3  4  4  4  4  4  5  5  7
+[26]  8  9  9 10 10 10 10 10 10 10 10 12 12 12 12 12
+> summary(Fn)
+Empirical CDF:	  12 unique values with summary
+   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
+-0.8356 -0.3857  0.3597  0.2686  0.6164  1.5950 
+> ##--> see below for graphics
+> knots(Fn)  # the unique data values {12 of them if there were no ties}
+ [1] -0.8356286 -0.8204684 -0.6264538 -0.3053884  0.1836433  0.3295078
+ [7]  0.3898432  0.4874291  0.5757814  0.7383247  1.5117812  1.5952808
+> 
+> y <- round(rnorm(12), 1); y[3] <- y[1]
+> Fn12 <- ecdf(y)
+> Fn12
+Empirical CDF 
+Call: ecdf(y)
+ x[1:8] =   -2.2,     -2,   -0.6,  ...,    0.8,    0.9
+> knots(Fn12) # unique values (always less than 12!)
+[1] -2.2 -2.0 -0.6  0.0  0.1  0.6  0.8  0.9
+> summary(Fn12)
+Empirical CDF:	  8 unique values with summary
+   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
+  -2.20   -0.95    0.05   -0.30    0.65    0.90 
+> summary.stepfun(Fn12)
+Step function with continuity 'f'= 0 ,  8 knots with summary
+   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
+  -2.20   -0.95    0.05   -0.30    0.65    0.90 
+
+and	9 plateau levels (y) with summary
+   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
+ 0.0000  0.1667  0.5000  0.4630  0.6667  1.0000 
+> 
+> ## Advanced: What's inside the function closure?
+> ls(environment(Fn12))
+[1] "f"      "method" "nobs"   "x"      "y"      "yleft"  "yright"
+> ##[1] "f"  "method"  "n"  "x"  "y"  "yleft"  "yright"
+> utils::ls.str(environment(Fn12))
+f :  num 0
+method :  int 2
+nobs :  int 12
+x :  num [1:8] -2.2 -2 -0.6 0 0.1 0.6 0.8 0.9
+y :  num [1:8] 0.0833 0.1667 0.3333 0.5 0.5833 ...
+yleft :  num 0
+yright :  num 1
+> stopifnot(all.equal(quantile(Fn12), quantile(y)))
+> 
+> ###----------------- Plotting --------------------------
+> require(graphics)
+> 
+> op <- par(mfrow = c(3, 1), mgp = c(1.5, 0.8, 0), mar =  .1+c(3,3,2,1))
+> 
+> F10 <- ecdf(rnorm(10))
+> summary(F10)
+Empirical CDF:	  10 unique values with summary
+    Min.  1st Qu.   Median     Mean  3rd Qu.     Max. 
+-1.47100 -0.14250 -0.05497  0.04667  0.41040  1.35900 
+> 
+> plot(F10)
+> plot(F10, verticals = TRUE, do.points = FALSE)
+> 
+> plot(Fn12 , lwd = 2) ; mtext("lwd = 2", adj = 1)
+> xx <- unique(sort(c(seq(-3, 2, length = 201), knots(Fn12))))
+> lines(xx, Fn12(xx), col = "blue")
+> abline(v = knots(Fn12), lty = 2, col = "gray70")
+> 
+> plot(xx, Fn12(xx), type = "o", cex = .1)  #- plot.default {ugly}
+> plot(Fn12, col.hor = "red", add =  TRUE)  #- plot method
+> abline(v = knots(Fn12), lty = 2, col = "gray70")
+> ## luxury plot
+> plot(Fn12, verticals = TRUE, col.points = "blue",
++      col.hor = "red", col.vert = "bisque")
+> 
+> ##-- this works too (automatic call to  ecdf(.)):
+> plot.ecdf(rnorm(24))
+> title("via  simple  plot.ecdf(x)", adj = 1)
+> 
+> par(op)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("eff.aovlist")
+> ### * eff.aovlist
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: eff.aovlist
+> ### Title: Compute Efficiencies of Multistratum Analysis of Variance
+> ### Aliases: eff.aovlist
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> ## An example from Yates (1932),
+> ## a 2^3 design in 2 blocks replicated 4 times
+> 
+> Block <- gl(8, 4)
+> A <- factor(c(0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,
++               0,1,0,1,0,1,0,1,0,1,0,1))
+> B <- factor(c(0,0,1,1,0,0,1,1,0,1,0,1,1,0,1,0,0,0,1,1,
++               0,0,1,1,0,0,1,1,0,0,1,1))
+> C <- factor(c(0,1,1,0,1,0,0,1,0,0,1,1,0,0,1,1,0,1,0,1,
++               1,0,1,0,0,0,1,1,1,1,0,0))
+> Yield <- c(101, 373, 398, 291, 312, 106, 265, 450, 106, 306, 324, 449,
++            272, 89, 407, 338, 87, 324, 279, 471, 323, 128, 423, 334,
++            131, 103, 445, 437, 324, 361, 302, 272)
+> aovdat <- data.frame(Block, A, B, C, Yield)
+> 
+> old <- getOption("contrasts")
+> options(contrasts = c("contr.helmert", "contr.poly"))
+> (fit <- aov(Yield ~ A*B*C + Error(Block), data = aovdat))
+
+Call:
+aov(formula = Yield ~ A * B * C + Error(Block), data = aovdat)
+
+Grand Mean: 291.5938
+
+Stratum 1: Block
+
+Terms:
+                      A:B       A:C       B:C     A:B:C Residuals
+Sum of Squares   780.1250  276.1250 2556.1250  112.5000  774.0938
+Deg. of Freedom         1         1         1         1         3
+
+Residual standard error: 16.06335
+Estimated effects are balanced
+
+Stratum 2: Within
+
+Terms:
+                        A         B         C       A:B       A:C       B:C
+Sum of Squares    3465.28 161170.03 278817.78     28.17   1802.67  11528.17
+Deg. of Freedom         1         1         1         1         1         1
+                    A:B:C Residuals
+Sum of Squares      45.37   5423.28
+Deg. of Freedom         1        17
+
+Residual standard error: 17.86103
+Estimated effects are balanced
+> eff.aovlist(fit)
+       A B C  A:B  A:C  B:C A:B:C
+Block  0 0 0 0.25 0.25 0.25  0.25
+Within 1 1 1 0.75 0.75 0.75  0.75
+> options(contrasts = old)
+> 
+> 
+> 
+> base::options(contrasts = c(unordered = "contr.treatment",ordered = "contr.poly"))
+> cleanEx()
+> nameEx("effects")
+> ### * effects
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: effects
+> ### Title: Effects from Fitted Model
+> ### Aliases: effects effects.lm effects.glm
+> ### Keywords: models regression
+> 
+> ### ** Examples
+> 
+> y <- c(1:3, 7, 5)
+> x <- c(1:3, 6:7)
+> ( ee <- effects(lm(y ~ x)) )
+(Intercept)           x                                     
+ -8.0498447   4.3655709   0.1483334   1.6144112  -1.2302295 
+attr(,"assign")
+[1] 0 1
+attr(,"class")
+[1] "coef"
+> c( round(ee - effects(lm(y+10 ~ I(x-3.8))), 3) )
+(Intercept)           x                                     
+     22.361       0.000       0.000       0.000       0.000 
+> # just the first is different
+> 
+> 
+> 
+> cleanEx()
+> nameEx("embed")
+> ### * embed
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: embed
+> ### Title: Embedding a Time Series
+> ### Aliases: embed
+> ### Keywords: ts
+> 
+> ### ** Examples
+> 
+> x <- 1:10
+> embed (x, 3)
+     [,1] [,2] [,3]
+[1,]    3    2    1
+[2,]    4    3    2
+[3,]    5    4    3
+[4,]    6    5    4
+[5,]    7    6    5
+[6,]    8    7    6
+[7,]    9    8    7
+[8,]   10    9    8
+> 
+> 
+> 
+> cleanEx()
+> nameEx("expand.model.frame")
+> ### * expand.model.frame
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: expand.model.frame
+> ### Title: Add new variables to a model frame
+> ### Aliases: expand.model.frame
+> ### Keywords: manip regression
+> 
+> ### ** Examples
+> 
+> model <- lm(log(Volume) ~ log(Girth) + log(Height), data = trees)
+> expand.model.frame(model, ~ Girth) # prints data.frame like
+   log(Volume) log(Girth) log(Height) Girth
+1     2.332144   2.116256    4.248495   8.3
+2     2.332144   2.151762    4.174387   8.6
+3     2.322388   2.174752    4.143135   8.8
+4     2.797281   2.351375    4.276666  10.5
+5     2.933857   2.370244    4.394449  10.7
+6     2.980619   2.379546    4.418841  10.8
+7     2.747271   2.397895    4.189655  11.0
+8     2.901422   2.397895    4.317488  11.0
+9     3.117950   2.406945    4.382027  11.1
+10    2.990720   2.415914    4.317488  11.2
+11    3.186353   2.424803    4.369448  11.3
+12    3.044522   2.433613    4.330733  11.4
+13    3.063391   2.433613    4.330733  11.4
+14    3.058707   2.459589    4.234107  11.7
+15    2.949688   2.484907    4.317488  12.0
+16    3.100092   2.557227    4.304065  12.9
+17    3.520461   2.557227    4.442651  12.9
+18    3.310543   2.587764    4.454347  13.3
+19    3.246491   2.617396    4.262680  13.7
+20    3.214868   2.624669    4.158883  13.8
+21    3.540959   2.639057    4.356709  14.0
+22    3.456317   2.653242    4.382027  14.2
+23    3.591818   2.674149    4.304065  14.5
+24    3.645450   2.772589    4.276666  16.0
+25    3.751854   2.791165    4.343805  16.3
+26    4.014580   2.850707    4.394449  17.3
+27    4.019980   2.862201    4.406719  17.5
+28    4.065602   2.884801    4.382027  17.9
+29    3.941582   2.890372    4.382027  18.0
+30    3.931826   2.890372    4.382027  18.0
+31    4.343805   3.025291    4.465908  20.6
+> 
+> dd <- data.frame(x = 1:5, y = rnorm(5), z = c(1,2,NA,4,5))
+> model <- glm(y ~ x, data = dd, subset = 1:4, na.action = na.omit)
+> expand.model.frame(model, "z", na.expand = FALSE) # = default
+           y x z
+1 -0.6264538 1 1
+2  0.1836433 2 2
+4  1.5952808 4 4
+> expand.model.frame(model, "z", na.expand = TRUE)
+           y x  z
+1 -0.6264538 1  1
+2  0.1836433 2  2
+3 -0.8356286 3 NA
+4  1.5952808 4  4
+> 
+> 
+> 
+> cleanEx()
+> nameEx("extractAIC")
+> ### * extractAIC
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: extractAIC
+> ### Title: Extract AIC from a Fitted Model
+> ### Aliases: extractAIC
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> 
+> cleanEx()
+> nameEx("factanal")
+> ### * factanal
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: factanal
+> ### Title: Factor Analysis
+> ### Aliases: factanal
+> ### Keywords: multivariate
+> 
+> ### ** Examples
+> 
+> # A little demonstration, v2 is just v1 with noise,
+> # and same for v4 vs. v3 and v6 vs. v5
+> # Last four cases are there to add noise
+> # and introduce a positive manifold (g factor)
+> v1 <- c(1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,4,5,6)
+> v2 <- c(1,2,1,1,1,1,2,1,2,1,3,4,3,3,3,4,6,5)
+> v3 <- c(3,3,3,3,3,1,1,1,1,1,1,1,1,1,1,5,4,6)
+> v4 <- c(3,3,4,3,3,1,1,2,1,1,1,1,2,1,1,5,6,4)
+> v5 <- c(1,1,1,1,1,3,3,3,3,3,1,1,1,1,1,6,4,5)
+> v6 <- c(1,1,1,2,1,3,3,3,4,3,1,1,1,2,1,6,5,4)
+> m1 <- cbind(v1,v2,v3,v4,v5,v6)
+> cor(m1)
+          v1        v2        v3        v4        v5        v6
+v1 1.0000000 0.9393083 0.5128866 0.4320310 0.4664948 0.4086076
+v2 0.9393083 1.0000000 0.4124441 0.4084281 0.4363925 0.4326113
+v3 0.5128866 0.4124441 1.0000000 0.8770750 0.5128866 0.4320310
+v4 0.4320310 0.4084281 0.8770750 1.0000000 0.4320310 0.4323259
+v5 0.4664948 0.4363925 0.5128866 0.4320310 1.0000000 0.9473451
+v6 0.4086076 0.4326113 0.4320310 0.4323259 0.9473451 1.0000000
+> factanal(m1, factors = 3) # varimax is the default
+
+Call:
+factanal(x = m1, factors = 3)
+
+Uniquenesses:
+   v1    v2    v3    v4    v5    v6 
+0.005 0.101 0.005 0.224 0.084 0.005 
+
+Loadings:
+   Factor1 Factor2 Factor3
+v1 0.944   0.182   0.267  
+v2 0.905   0.235   0.159  
+v3 0.236   0.210   0.946  
+v4 0.180   0.242   0.828  
+v5 0.242   0.881   0.286  
+v6 0.193   0.959   0.196  
+
+               Factor1 Factor2 Factor3
+SS loadings      1.893   1.886   1.797
+Proportion Var   0.316   0.314   0.300
+Cumulative Var   0.316   0.630   0.929
+
+The degrees of freedom for the model is 0 and the fit was 0.4755 
+> # The following shows the g factor as PC1
+> 
+> ## formula interface
+> factanal(~v1+v2+v3+v4+v5+v6, factors = 3,
++          scores = "Bartlett")$scores
+      Factor1    Factor2    Factor3
+1  -0.9039949 -0.9308984  0.9475392
+2  -0.8685952 -0.9328721  0.9352330
+3  -0.9082818 -0.9320093  0.9616422
+4  -1.0021975 -0.2529689  0.8178552
+5  -0.9039949 -0.9308984  0.9475392
+6  -0.7452711  0.7273960 -0.7884733
+7  -0.7098714  0.7254223 -0.8007795
+8  -0.7495580  0.7262851 -0.7743704
+9  -0.8080740  1.4033517 -0.9304636
+10 -0.7452711  0.7273960 -0.7884733
+11  0.9272282 -0.9307506 -0.8371538
+12  0.9626279 -0.9327243 -0.8494600
+13  0.9229413 -0.9318615 -0.8230509
+14  0.8290256 -0.2528211 -0.9668378
+15  0.9272282 -0.9307506 -0.8371538
+16  0.4224366  2.0453079  1.2864761
+17  1.4713902  1.2947716  0.5451562
+18  1.8822320  0.3086244  1.9547752
+> 
+> 
+> 
+> cleanEx()
+> nameEx("factor.scope")
+> ### * factor.scope
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: factor.scope
+> ### Title: Compute Allowed Changes in Adding to or Dropping from a Formula
+> ### Aliases: add.scope drop.scope factor.scope
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> add.scope( ~ a + b + c + a:b,  ~ (a + b + c)^3)
+[1] "a:c" "b:c"
+> # [1] "a:c" "b:c"
+> drop.scope( ~ a + b + c + a:b)
+[1] "c"   "a:b"
+> # [1] "c"   "a:b"
+> 
+> 
+> 
+> cleanEx()
+> nameEx("family")
+> ### * family
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: family
+> ### Title: Family Objects for Models
+> ### Aliases: family binomial gaussian Gamma inverse.gaussian poisson quasi
+> ###   quasibinomial quasipoisson
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> require(utils) # for str
+> 
+> nf <- gaussian()  # Normal family
+> nf
+
+Family: gaussian 
+Link function: identity 
+
+> str(nf)
+List of 11
+ $ family    : chr "gaussian"
+ $ link      : chr "identity"
+ $ linkfun   :function (mu)  
+ $ linkinv   :function (eta)  
+ $ variance  :function (mu)  
+ $ dev.resids:function (y, mu, wt)  
+ $ aic       :function (y, n, mu, wt, dev)  
+ $ mu.eta    :function (eta)  
+ $ initialize:  expression({     n <- rep.int(1, nobs)     if (is.null(etastart) && is.null(start) && is.null(mustart) && ((family$link ==          "inverse" && any(y == 0)) || (family$link == "log" && any(y <=          0))))          stop("cannot find valid starting values: please specify some")     mustart <- y })
+ $ validmu   :function (mu)  
+ $ valideta  :function (eta)  
+ - attr(*, "class")= chr "family"
+> 
+> gf <- Gamma()
+> gf
+
+Family: Gamma 
+Link function: inverse 
+
+> str(gf)
+List of 12
+ $ family    : chr "Gamma"
+ $ link      : chr "inverse"
+ $ linkfun   :function (mu)  
+ $ linkinv   :function (eta)  
+ $ variance  :function (mu)  
+ $ dev.resids:function (y, mu, wt)  
+ $ aic       :function (y, n, mu, wt, dev)  
+ $ mu.eta    :function (eta)  
+ $ initialize:  expression({     if (any(y <= 0))          stop("non-positive values not allowed for the 'gamma' family")     n <- rep.int(1, nobs)     mustart <- y })
+ $ validmu   :function (mu)  
+ $ valideta  :function (eta)  
+ $ simulate  :function (object, nsim)  
+ - attr(*, "class")= chr "family"
+> gf$linkinv
+function (eta) 
+1/eta
+<environment: namespace:stats>
+> gf$variance(-3:4) #- == (.)^2
+[1]  9  4  1  0  1  4  9 16
+> 
+> 
+> ## quasipoisson. compare with example(glm)
+> counts <- c(18,17,15,20,10,20,25,13,12)
+> outcome <- gl(3,1,9)
+> treatment <- gl(3,3)
+> d.AD <- data.frame(treatment, outcome, counts)
+> glm.qD93 <- glm(counts ~ outcome + treatment, family = quasipoisson())
+> 
+> ## Example of user-specified link, a logit model for p^days
+> ## See Shaffer, T.  2004. Auk 121(2): 526-540.
+> logexp <- function(days = 1)
++ {
++     linkfun <- function(mu) qlogis(mu^(1/days))
++     linkinv <- function(eta) plogis(eta)^days
++     mu.eta <- function(eta) days * plogis(eta)^(days-1) * binomial()$mu_eta
++     valideta <- function(eta) TRUE
++     link <- paste0("logexp(", days, ")")
++     structure(list(linkfun = linkfun, linkinv = linkinv,
++                    mu.eta = mu.eta, valideta = valideta, name = link),
++               class = "link-glm")
++ }
+> binomial(logexp(3))
+
+Family: binomial 
+Link function: logexp(3) 
+
+> ## in practice this would be used with a vector of 'days', in
+> ## which case use an offset of 0 in the corresponding formula
+> ## to get the null deviance right.
+> 
+> ## Binomial with identity link: often not a good idea.
+> ## Not run: binomial(link = make.link("identity"))
+> 
+> ## tests of quasi
+> x <- rnorm(100)
+> y <- rpois(100, exp(1+x))
+> glm(y ~ x, family = quasi(variance = "mu", link = "log"))
+
+Call:  glm(formula = y ~ x, family = quasi(variance = "mu", link = "log"))
+
+Coefficients:
+(Intercept)            x  
+     0.8596       1.0875  
+
+Degrees of Freedom: 99 Total (i.e. Null);  98 Residual
+Null Deviance:	    481.9 
+Residual Deviance: 101.7 	AIC: NA
+> # which is the same as
+> glm(y ~ x, family = poisson)
+
+Call:  glm(formula = y ~ x, family = poisson)
+
+Coefficients:
+(Intercept)            x  
+     0.8596       1.0875  
+
+Degrees of Freedom: 99 Total (i.e. Null);  98 Residual
+Null Deviance:	    481.9 
+Residual Deviance: 101.7 	AIC: 364
+> glm(y ~ x, family = quasi(variance = "mu^2", link = "log"))
+
+Call:  glm(formula = y ~ x, family = quasi(variance = "mu^2", link = "log"))
+
+Coefficients:
+(Intercept)            x  
+     0.6902       1.4546  
+
+Degrees of Freedom: 99 Total (i.e. Null);  98 Residual
+Null Deviance:	    83.85 
+Residual Deviance: 32.45 	AIC: NA
+> ## Not run: glm(y ~ x, family = quasi(variance = "mu^3", link = "log")) # fails
+> y <- rbinom(100, 1, plogis(x))
+> # needs to set a starting value for the next fit
+> glm(y ~ x, family = quasi(variance = "mu(1-mu)", link = "logit"), start = c(0,1))
+
+Call:  glm(formula = y ~ x, family = quasi(variance = "mu(1-mu)", link = "logit"), 
+    start = c(0, 1))
+
+Coefficients:
+(Intercept)            x  
+   -0.08334      0.38518  
+
+Degrees of Freedom: 99 Total (i.e. Null);  98 Residual
+Null Deviance:	    138.6 
+Residual Deviance: 135.8 	AIC: NA
+> 
+> 
+> 
+> cleanEx()
+> nameEx("fft")
+> ### * fft
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: fft
+> ### Title: Fast Discrete Fourier Transform (FFT)
+> ### Aliases: fft mvfft
+> ### Keywords: math dplot
+> 
+> ### ** Examples
+> 
+> x <- 1:4
+> fft(x)
+[1] 10+0i -2+2i -2+0i -2-2i
+> fft(fft(x), inverse = TRUE)/length(x)
+[1] 1+0i 2+0i 3+0i 4+0i
+> 
+> ## Slow Discrete Fourier Transform (DFT) - e.g., for checking the formula
+> fft0 <- function(z, inverse=FALSE) {
++   n <- length(z)
++   if(n == 0) return(z)
++   k <- 0:(n-1)
++   ff <- (if(inverse) 1 else -1) * 2*pi * 1i * k/n
++   vapply(1:n, function(h) sum(z * exp(ff*(h-1))), complex(1))
++ }
+> 
+> relD <- function(x,y) 2* abs(x - y) / abs(x + y)
+> n <- 2^8
+> z <- complex(n, rnorm(n), rnorm(n))
+> 
+> 
+> cleanEx()
+> nameEx("filter")
+> ### * filter
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: filter
+> ### Title: Linear Filtering on a Time Series
+> ### Aliases: filter
+> ### Keywords: ts
+> 
+> ### ** Examples
+> 
+> x <- 1:100
+> filter(x, rep(1, 3))
+Time Series:
+Start = 1 
+End = 100 
+Frequency = 1 
+  [1]  NA   6   9  12  15  18  21  24  27  30  33  36  39  42  45  48  51  54
+ [19]  57  60  63  66  69  72  75  78  81  84  87  90  93  96  99 102 105 108
+ [37] 111 114 117 120 123 126 129 132 135 138 141 144 147 150 153 156 159 162
+ [55] 165 168 171 174 177 180 183 186 189 192 195 198 201 204 207 210 213 216
+ [73] 219 222 225 228 231 234 237 240 243 246 249 252 255 258 261 264 267 270
+ [91] 273 276 279 282 285 288 291 294 297  NA
+> filter(x, rep(1, 3), sides = 1)
+Time Series:
+Start = 1 
+End = 100 
+Frequency = 1 
+  [1]  NA  NA   6   9  12  15  18  21  24  27  30  33  36  39  42  45  48  51
+ [19]  54  57  60  63  66  69  72  75  78  81  84  87  90  93  96  99 102 105
+ [37] 108 111 114 117 120 123 126 129 132 135 138 141 144 147 150 153 156 159
+ [55] 162 165 168 171 174 177 180 183 186 189 192 195 198 201 204 207 210 213
+ [73] 216 219 222 225 228 231 234 237 240 243 246 249 252 255 258 261 264 267
+ [91] 270 273 276 279 282 285 288 291 294 297
+> filter(x, rep(1, 3), sides = 1, circular = TRUE)
+Time Series:
+Start = 1 
+End = 100 
+Frequency = 1 
+  [1] 200 103   6   9  12  15  18  21  24  27  30  33  36  39  42  45  48  51
+ [19]  54  57  60  63  66  69  72  75  78  81  84  87  90  93  96  99 102 105
+ [37] 108 111 114 117 120 123 126 129 132 135 138 141 144 147 150 153 156 159
+ [55] 162 165 168 171 174 177 180 183 186 189 192 195 198 201 204 207 210 213
+ [73] 216 219 222 225 228 231 234 237 240 243 246 249 252 255 258 261 264 267
+ [91] 270 273 276 279 282 285 288 291 294 297
+> 
+> filter(presidents, rep(1, 3))
+     Qtr1 Qtr2 Qtr3 Qtr4
+1945   NA   NA  244  220
+1946  188  156  125  110
+1947  127  149  169  145
+1948  130   NA   NA   NA
+1949   NA  183  165  153
+1950  133  128  122  121
+1951   99   92   79   80
+1952   80   NA   NA   NA
+1953  165  208  209  206
+1954  192  203  189  199
+1955  196  218  220  228
+1956  220  214  213  221
+1957  216  204  182  180
+1958  166  157  149  157
+1959  171  180  189  198
+1960  199  194  180  190
+1961  212  226  232  228
+1962  228  212  207  212
+1963  214  202  183  199
+1964  210  222  211  209
+1965  204  204  195  194
+1966  171  165  146  144
+1967  140  134  136  120
+1968  131  120  128  138
+1969  168  189  186  187
+1970  175  180  166  164
+1971  151  153  151  152
+1972  159   NA   NA   NA
+1973   NA  152  111   95
+1974   80   77   73   NA
+> 
+> 
+> 
+> cleanEx()
+> nameEx("fisher.test")
+> ### * fisher.test
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: fisher.test
+> ### Title: Fisher's Exact Test for Count Data
+> ### Aliases: fisher.test
+> ### Keywords: htest
+> 
+> ### ** Examples
+> 
+> ## Agresti (1990, p. 61f; 2002, p. 91) Fisher's Tea Drinker
+> ## A British woman claimed to be able to distinguish whether milk or
+> ##  tea was added to the cup first.  To test, she was given 8 cups of
+> ##  tea, in four of which milk was added first.  The null hypothesis
+> ##  is that there is no association between the true order of pouring
+> ##  and the woman's guess, the alternative that there is a positive
+> ##  association (that the odds ratio is greater than 1).
+> TeaTasting <-
++ matrix(c(3, 1, 1, 3),
++        nrow = 2,
++        dimnames = list(Guess = c("Milk", "Tea"),
++                        Truth = c("Milk", "Tea")))
+> fisher.test(TeaTasting, alternative = "greater")
+
+	Fisher's Exact Test for Count Data
+
+data:  TeaTasting
+p-value = 0.2429
+alternative hypothesis: true odds ratio is greater than 1
+95 percent confidence interval:
+ 0.3135693       Inf
+sample estimates:
+odds ratio 
+  6.408309 
+
+> ## => p = 0.2429, association could not be established
+> 
+> ## Fisher (1962, 1970), Criminal convictions of like-sex twins
+> Convictions <-
++ matrix(c(2, 10, 15, 3),
++        nrow = 2,
++        dimnames =
++        list(c("Dizygotic", "Monozygotic"),
++             c("Convicted", "Not convicted")))
+> Convictions
+            Convicted Not convicted
+Dizygotic           2            15
+Monozygotic        10             3
+> fisher.test(Convictions, alternative = "less")
+
+	Fisher's Exact Test for Count Data
+
+data:  Convictions
+p-value = 0.0004652
+alternative hypothesis: true odds ratio is less than 1
+95 percent confidence interval:
+ 0.0000000 0.2849601
+sample estimates:
+odds ratio 
+0.04693661 
+
+> fisher.test(Convictions, conf.int = FALSE)
+
+	Fisher's Exact Test for Count Data
+
+data:  Convictions
+p-value = 0.0005367
+alternative hypothesis: true odds ratio is not equal to 1
+sample estimates:
+odds ratio 
+0.04693661 
+
+> fisher.test(Convictions, conf.level = 0.95)$conf.int
+[1] 0.003325764 0.363182271
+attr(,"conf.level")
+[1] 0.95
+> fisher.test(Convictions, conf.level = 0.99)$conf.int
+[1] 0.001386333 0.578851645
+attr(,"conf.level")
+[1] 0.99
+> 
+> ## A r x c table  Agresti (2002, p. 57) Job Satisfaction
+> Job <- matrix(c(1,2,1,0, 3,3,6,1, 10,10,14,9, 6,7,12,11), 4, 4,
++ dimnames = list(income = c("< 15k", "15-25k", "25-40k", "> 40k"),
++                 satisfaction = c("VeryD", "LittleD", "ModerateS", "VeryS")))
+> fisher.test(Job)
+
+	Fisher's Exact Test for Count Data
+
+data:  Job
+p-value = 0.7827
+alternative hypothesis: two.sided
+
+> fisher.test(Job, simulate.p.value = TRUE, B = 1e5)
+
+	Fisher's Exact Test for Count Data with simulated p-value (based on
+	1e+05 replicates)
+
+data:  Job
+p-value = 0.7842
+alternative hypothesis: two.sided
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("fivenum")
+> ### * fivenum
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: fivenum
+> ### Title: Tukey Five-Number Summaries
+> ### Aliases: fivenum
+> ### Keywords: univar robust distribution
+> 
+> ### ** Examples
+> 
+> fivenum(c(rnorm(100), -1:1/0))
+[1]       -Inf -0.5425200  0.1139092  0.6969634        Inf
+> 
+> 
+> 
+> cleanEx()
+> nameEx("fligner.test")
+> ### * fligner.test
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: fligner.test
+> ### Title: Fligner-Killeen Test of Homogeneity of Variances
+> ### Aliases: fligner.test fligner.test.default fligner.test.formula
+> ### Keywords: htest
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> plot(count ~ spray, data = InsectSprays)
+> fligner.test(InsectSprays$count, InsectSprays$spray)
+
+	Fligner-Killeen test of homogeneity of variances
+
+data:  InsectSprays$count and InsectSprays$spray
+Fligner-Killeen:med chi-squared = 14.483, df = 5, p-value = 0.01282
+
+> fligner.test(count ~ spray, data = InsectSprays)
+
+	Fligner-Killeen test of homogeneity of variances
+
+data:  count by spray
+Fligner-Killeen:med chi-squared = 14.483, df = 5, p-value = 0.01282
+
+> ## Compare this to bartlett.test()
+> 
+> 
+> 
+> cleanEx()
+> nameEx("formula")
+> ### * formula
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: formula
+> ### Title: Model Formulae
+> ### Aliases: formula formula.default formula.formula formula.terms
+> ###   formula.data.frame as.formula print.formula [.formula
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> class(fo <- y ~ x1*x2) # "formula"
+[1] "formula"
+> fo
+y ~ x1 * x2
+> typeof(fo)  # R internal : "language"
+[1] "language"
+> terms(fo)
+y ~ x1 * x2
+attr(,"variables")
+list(y, x1, x2)
+attr(,"factors")
+   x1 x2 x1:x2
+y   0  0     0
+x1  1  0     1
+x2  0  1     1
+attr(,"term.labels")
+[1] "x1"    "x2"    "x1:x2"
+attr(,"order")
+[1] 1 1 2
+attr(,"intercept")
+[1] 1
+attr(,"response")
+[1] 1
+attr(,".Environment")
+<environment: R_GlobalEnv>
+> 
+> environment(fo)
+<environment: R_GlobalEnv>
+> environment(as.formula("y ~ x"))
+<environment: R_GlobalEnv>
+> environment(as.formula("y ~ x", env = new.env()))
+<environment: 0x401c9e0>
+> 
+> 
+> ## Create a formula for a model with a large number of variables:
+> xnam <- paste0("x", 1:25)
+> (fmla <- as.formula(paste("y ~ ", paste(xnam, collapse= "+"))))
+y ~ x1 + x2 + x3 + x4 + x5 + x6 + x7 + x8 + x9 + x10 + x11 + 
+    x12 + x13 + x14 + x15 + x16 + x17 + x18 + x19 + x20 + x21 + 
+    x22 + x23 + x24 + x25
+> 
+> 
+> 
+> cleanEx()
+> nameEx("formula.nls")
+> ### * formula.nls
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: formula.nls
+> ### Title: Extract Model Formula from nls Object
+> ### Aliases: formula.nls
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> fm1 <- nls(circumference ~ A/(1+exp((B-age)/C)), Orange,
++            start = list(A = 160, B = 700, C = 350))
+> formula(fm1)
+circumference ~ A/(1 + exp((B - age)/C))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("friedman.test")
+> ### * friedman.test
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: friedman.test
+> ### Title: Friedman Rank Sum Test
+> ### Aliases: friedman.test friedman.test.default friedman.test.formula
+> ### Keywords: htest
+> 
+> ### ** Examples
+> 
+> ## Hollander & Wolfe (1973), p. 140ff.
+> ## Comparison of three methods ("round out", "narrow angle", and
+> ##  "wide angle") for rounding first base.  For each of 18 players
+> ##  and the three method, the average time of two runs from a point on
+> ##  the first base line 35ft from home plate to a point 15ft short of
+> ##  second base is recorded.
+> RoundingTimes <-
++ matrix(c(5.40, 5.50, 5.55,
++          5.85, 5.70, 5.75,
++          5.20, 5.60, 5.50,
++          5.55, 5.50, 5.40,
++          5.90, 5.85, 5.70,
++          5.45, 5.55, 5.60,
++          5.40, 5.40, 5.35,
++          5.45, 5.50, 5.35,
++          5.25, 5.15, 5.00,
++          5.85, 5.80, 5.70,
++          5.25, 5.20, 5.10,
++          5.65, 5.55, 5.45,
++          5.60, 5.35, 5.45,
++          5.05, 5.00, 4.95,
++          5.50, 5.50, 5.40,
++          5.45, 5.55, 5.50,
++          5.55, 5.55, 5.35,
++          5.45, 5.50, 5.55,
++          5.50, 5.45, 5.25,
++          5.65, 5.60, 5.40,
++          5.70, 5.65, 5.55,
++          6.30, 6.30, 6.25),
++        nrow = 22,
++        byrow = TRUE,
++        dimnames = list(1 : 22,
++                        c("Round Out", "Narrow Angle", "Wide Angle")))
+> friedman.test(RoundingTimes)
+
+	Friedman rank sum test
+
+data:  RoundingTimes
+Friedman chi-squared = 11.143, df = 2, p-value = 0.003805
+
+> ## => strong evidence against the null that the methods are equivalent
+> ##    with respect to speed
+> 
+> wb <- aggregate(warpbreaks$breaks,
++                 by = list(w = warpbreaks$wool,
++                           t = warpbreaks$tension),
++                 FUN = mean)
+> wb
+  w t        x
+1 A L 44.55556
+2 B L 28.22222
+3 A M 24.00000
+4 B M 28.77778
+5 A H 24.55556
+6 B H 18.77778
+> friedman.test(wb$x, wb$w, wb$t)
+
+	Friedman rank sum test
+
+data:  wb$x, wb$w and wb$t
+Friedman chi-squared = 0.33333, df = 1, p-value = 0.5637
+
+> friedman.test(x ~ w | t, data = wb)
+
+	Friedman rank sum test
+
+data:  x and w and t
+Friedman chi-squared = 0.33333, df = 1, p-value = 0.5637
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("ftable")
+> ### * ftable
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: ftable
+> ### Title: Flat Contingency Tables
+> ### Aliases: ftable ftable.default
+> ### Keywords: category
+> 
+> ### ** Examples
+> 
+> ## Start with a contingency table.
+> ftable(Titanic, row.vars = 1:3)
+                   Survived  No Yes
+Class Sex    Age                   
+1st   Male   Child            0   5
+             Adult          118  57
+      Female Child            0   1
+             Adult            4 140
+2nd   Male   Child            0  11
+             Adult          154  14
+      Female Child            0  13
+             Adult           13  80
+3rd   Male   Child           35  13
+             Adult          387  75
+      Female Child           17  14
+             Adult           89  76
+Crew  Male   Child            0   0
+             Adult          670 192
+      Female Child            0   0
+             Adult            3  20
+> ftable(Titanic, row.vars = 1:2, col.vars = "Survived")
+             Survived  No Yes
+Class Sex                    
+1st   Male            118  62
+      Female            4 141
+2nd   Male            154  25
+      Female           13  93
+3rd   Male            422  88
+      Female          106  90
+Crew  Male            670 192
+      Female            3  20
+> ftable(Titanic, row.vars = 2:1, col.vars = "Survived")
+             Survived  No Yes
+Sex    Class                 
+Male   1st            118  62
+       2nd            154  25
+       3rd            422  88
+       Crew           670 192
+Female 1st              4 141
+       2nd             13  93
+       3rd            106  90
+       Crew             3  20
+> ## Don't show: 
+> . <- integer()
+> (f04 <- ftable(Titanic, col.vars= .))
+Class Sex    Age   Survived     
+1st   Male   Child No          0
+                   Yes         5
+             Adult No        118
+                   Yes        57
+      Female Child No          0
+                   Yes         1
+             Adult No          4
+                   Yes       140
+2nd   Male   Child No          0
+                   Yes        11
+             Adult No        154
+                   Yes        14
+      Female Child No          0
+                   Yes        13
+             Adult No         13
+                   Yes        80
+3rd   Male   Child No         35
+                   Yes        13
+             Adult No        387
+                   Yes        75
+      Female Child No         17
+                   Yes        14
+             Adult No         89
+                   Yes        76
+Crew  Male   Child No          0
+                   Yes         0
+             Adult No        670
+                   Yes       192
+      Female Child No          0
+                   Yes         0
+             Adult No          3
+                   Yes        20
+> (f10 <- ftable(Titanic, col.vars= 1, row.vars= .))
+Class 1st 2nd 3rd Crew
+                      
+      325 285 706  885
+> (f01 <- ftable(Titanic, col.vars= ., row.vars= 1))
+Class     
+1st    325
+2nd    285
+3rd    706
+Crew   885
+> (f00 <- ftable(Titanic, col.vars= ., row.vars= .))
+     
+ 2201
+> stopifnot(
++   dim(f04) == c(32,1),
++   dim(f10) == c(1,4),
++   dim(f01) == c(4,1),
++   dim(f00) == c(1,1))
+> ## End(Don't show)
+> ## Start with a data frame.
+> x <- ftable(mtcars[c("cyl", "vs", "am", "gear")])
+> x
+          gear  3  4  5
+cyl vs am              
+4   0  0        0  0  0
+       1        0  0  1
+    1  0        1  2  0
+       1        0  6  1
+6   0  0        0  0  0
+       1        0  2  1
+    1  0        2  2  0
+       1        0  0  0
+8   0  0       12  0  0
+       1        0  0  2
+    1  0        0  0  0
+       1        0  0  0
+> ftable(x, row.vars = c(2, 4))
+        cyl  4     6     8   
+        am   0  1  0  1  0  1
+vs gear                      
+0  3         0  0  0  0 12  0
+   4         0  0  0  2  0  0
+   5         0  1  0  1  0  2
+1  3         1  0  2  0  0  0
+   4         2  6  2  0  0  0
+   5         0  1  0  0  0  0
+> 
+> ## Start with expressions, use table()'s "dnn" to change labels
+> ftable(mtcars$cyl, mtcars$vs, mtcars$am, mtcars$gear, row.vars = c(2, 4),
++        dnn = c("Cylinders", "V/S", "Transmission", "Gears"))
+          Cylinders     4     6     8   
+          Transmission  0  1  0  1  0  1
+V/S Gears                               
+0   3                   0  0  0  0 12  0
+    4                   0  0  0  2  0  0
+    5                   0  1  0  1  0  2
+1   3                   1  0  2  0  0  0
+    4                   2  6  2  0  0  0
+    5                   0  1  0  0  0  0
+> 
+> 
+> 
+> cleanEx()
+> nameEx("ftable.formula")
+> ### * ftable.formula
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: ftable.formula
+> ### Title: Formula Notation for Flat Contingency Tables
+> ### Aliases: ftable.formula
+> ### Keywords: category
+> 
+> ### ** Examples
+> 
+> Titanic
+, , Age = Child, Survived = No
+
+      Sex
+Class  Male Female
+  1st     0      0
+  2nd     0      0
+  3rd    35     17
+  Crew    0      0
+
+, , Age = Adult, Survived = No
+
+      Sex
+Class  Male Female
+  1st   118      4
+  2nd   154     13
+  3rd   387     89
+  Crew  670      3
+
+, , Age = Child, Survived = Yes
+
+      Sex
+Class  Male Female
+  1st     5      1
+  2nd    11     13
+  3rd    13     14
+  Crew    0      0
+
+, , Age = Adult, Survived = Yes
+
+      Sex
+Class  Male Female
+  1st    57    140
+  2nd    14     80
+  3rd    75     76
+  Crew  192     20
+
+> x <- ftable(Survived ~ ., data = Titanic)
+> x
+                   Survived  No Yes
+Class Sex    Age                   
+1st   Male   Child            0   5
+             Adult          118  57
+      Female Child            0   1
+             Adult            4 140
+2nd   Male   Child            0  11
+             Adult          154  14
+      Female Child            0  13
+             Adult           13  80
+3rd   Male   Child           35  13
+             Adult          387  75
+      Female Child           17  14
+             Adult           89  76
+Crew  Male   Child            0   0
+             Adult          670 192
+      Female Child            0   0
+             Adult            3  20
+> ftable(Sex ~ Class + Age, data = x)
+            Sex Male Female
+Class Age                  
+1st   Child        5      1
+      Adult      175    144
+2nd   Child       11     13
+      Adult      168     93
+3rd   Child       48     31
+      Adult      462    165
+Crew  Child        0      0
+      Adult      862     23
+> 
+> 
+> 
+> cleanEx()
+> nameEx("getInitial")
+> ### * getInitial
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: getInitial
+> ### Title: Get Initial Parameter Estimates
+> ### Aliases: getInitial getInitial.default getInitial.formula
+> ###   getInitial.selfStart
+> ### Keywords: models nonlinear manip
+> 
+> ### ** Examples
+> 
+> PurTrt <- Puromycin[ Puromycin$state == "treated", ]
+> print(getInitial( rate ~ SSmicmen( conc, Vm, K ), PurTrt ), digits = 3)
+      Vm        K 
+212.6837   0.0641 
+> 
+> 
+> 
+> cleanEx()
+> nameEx("glm")
+> ### * glm
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: glm
+> ### Title: Fitting Generalized Linear Models
+> ### Aliases: glm glm.fit weights.glm
+> ### Keywords: models regression
+> 
+> ### ** Examples
+> 
+> ## Dobson (1990) Page 93: Randomized Controlled Trial :
+> counts <- c(18,17,15,20,10,20,25,13,12)
+> outcome <- gl(3,1,9)
+> treatment <- gl(3,3)
+> print(d.AD <- data.frame(treatment, outcome, counts))
+  treatment outcome counts
+1         1       1     18
+2         1       2     17
+3         1       3     15
+4         2       1     20
+5         2       2     10
+6         2       3     20
+7         3       1     25
+8         3       2     13
+9         3       3     12
+> glm.D93 <- glm(counts ~ outcome + treatment, family = poisson())
+> anova(glm.D93)
+Analysis of Deviance Table
+
+Model: poisson, link: log
+
+Response: counts
+
+Terms added sequentially (first to last)
+
+
+          Df Deviance Resid. Df Resid. Dev
+NULL                          8    10.5814
+outcome    2   5.4523         6     5.1291
+treatment  2   0.0000         4     5.1291
+> 
+> 
+> # A Gamma example, from McCullagh & Nelder (1989, pp. 300-2)
+> clotting <- data.frame(
++     u = c(5,10,15,20,30,40,60,80,100),
++     lot1 = c(118,58,42,35,27,25,21,19,18),
++     lot2 = c(69,35,26,21,18,16,13,12,12))
+> summary(glm(lot1 ~ log(u), data = clotting, family = Gamma))
+
+Call:
+glm(formula = lot1 ~ log(u), family = Gamma, data = clotting)
+
+Deviance Residuals: 
+     Min        1Q    Median        3Q       Max  
+-0.04008  -0.03756  -0.02637   0.02905   0.08641  
+
+Coefficients:
+              Estimate Std. Error t value Pr(>|t|)    
+(Intercept) -0.0165544  0.0009275  -17.85 4.28e-07 ***
+log(u)       0.0153431  0.0004150   36.98 2.75e-09 ***
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+(Dispersion parameter for Gamma family taken to be 0.002446059)
+
+    Null deviance: 3.51283  on 8  degrees of freedom
+Residual deviance: 0.01673  on 7  degrees of freedom
+AIC: 37.99
+
+Number of Fisher Scoring iterations: 3
+
+> summary(glm(lot2 ~ log(u), data = clotting, family = Gamma))
+
+Call:
+glm(formula = lot2 ~ log(u), family = Gamma, data = clotting)
+
+Deviance Residuals: 
+     Min        1Q    Median        3Q       Max  
+-0.05574  -0.02925   0.01030   0.01714   0.06371  
+
+Coefficients:
+              Estimate Std. Error t value Pr(>|t|)    
+(Intercept) -0.0239085  0.0013265  -18.02 4.00e-07 ***
+log(u)       0.0235992  0.0005768   40.91 1.36e-09 ***
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+(Dispersion parameter for Gamma family taken to be 0.001813354)
+
+    Null deviance: 3.118557  on 8  degrees of freedom
+Residual deviance: 0.012672  on 7  degrees of freedom
+AIC: 27.032
+
+Number of Fisher Scoring iterations: 3
+
+> 
+> ## Not run: 
+> ##D ## for an example of the use of a terms object as a formula
+> ##D demo(glm.vr)
+> ## End(Not run)
+> 
+> 
+> cleanEx()
+> nameEx("glm.control")
+> ### * glm.control
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: glm.control
+> ### Title: Auxiliary for Controlling GLM Fitting
+> ### Aliases: glm.control
+> ### Keywords: optimize models
+> 
+> ### ** Examples
+> 
+> 
+> cleanEx()
+> nameEx("hclust")
+> ### * hclust
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: hclust
+> ### Title: Hierarchical Clustering
+> ### Aliases: hclust plot.hclust print.hclust
+> ### Keywords: multivariate cluster
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> ### Example 1: Violent crime rates by US state
+> 
+> hc <- hclust(dist(USArrests), "ave")
+> plot(hc)
+> plot(hc, hang = -1)
+> 
+> ## Do the same with centroid clustering and *squared* Euclidean distance,
+> ## cut the tree into ten clusters and reconstruct the upper part of the
+> ## tree from the cluster centers.
+> hc <- hclust(dist(USArrests)^2, "cen")
+> memb <- cutree(hc, k = 10)
+> cent <- NULL
+> for(k in 1:10){
++   cent <- rbind(cent, colMeans(USArrests[memb == k, , drop = FALSE]))
++ }
+> hc1 <- hclust(dist(cent)^2, method = "cen", members = table(memb))
+> opar <- par(mfrow = c(1, 2))
+> plot(hc,  labels = FALSE, hang = -1, main = "Original Tree")
+> plot(hc1, labels = FALSE, hang = -1, main = "Re-start from 10 clusters")
+> par(opar)
+> 
+> ### Example 2: Straight-line distances among 10 US cities
+> ##  Compare the results of algorithms "ward.D" and "ward.D2"
+> 
+> data(UScitiesD)
+> 
+> mds2 <- -cmdscale(UScitiesD)
+> plot(mds2, type="n", axes=FALSE, ann=FALSE)
+> text(mds2, labels=rownames(mds2), xpd = NA)
+> 
+> hcity.D  <- hclust(UScitiesD, "ward.D") # "wrong"
+> hcity.D2 <- hclust(UScitiesD, "ward.D2")
+> opar <- par(mfrow = c(1, 2))
+> plot(hcity.D,  hang=-1)
+> plot(hcity.D2, hang=-1)
+> par(opar)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("heatmap")
+> ### * heatmap
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: heatmap
+> ### Title: Draw a Heat Map
+> ### Aliases: heatmap
+> ### Keywords: hplot
+> 
+> ### ** Examples
+> 
+> require(graphics); require(grDevices)
+> x  <- as.matrix(mtcars)
+> rc <- rainbow(nrow(x), start = 0, end = .3)
+> cc <- rainbow(ncol(x), start = 0, end = .3)
+> hv <- heatmap(x, col = cm.colors(256), scale = "column",
++               RowSideColors = rc, ColSideColors = cc, margins = c(5,10),
++               xlab = "specification variables", ylab =  "Car Models",
++               main = "heatmap(<Mtcars data>, ..., scale = \"column\")")
+> utils::str(hv) # the two re-ordering index vectors
+List of 4
+ $ rowInd: int [1:32] 31 17 16 15 5 25 29 24 7 6 ...
+ $ colInd: int [1:11] 2 9 8 11 6 5 10 7 1 4 ...
+ $ Rowv  : NULL
+ $ Colv  : NULL
+> 
+> ## no column dendrogram (nor reordering) at all:
+> heatmap(x, Colv = NA, col = cm.colors(256), scale = "column",
++         RowSideColors = rc, margins = c(5,10),
++         xlab = "specification variables", ylab =  "Car Models",
++         main = "heatmap(<Mtcars data>, ..., scale = \"column\")")
+> ## Don't show: 
+> ## no row dendrogram (nor reordering) at all:
+> heatmap(x, Rowv = NA, col = cm.colors(256), scale = "column",
++         ColSideColors = cc, margins = c(5,10),
++         xlab = "xlab", ylab =  "ylab")  # no main
+> ## End(Don't show)
+> ## "no nothing"
+> heatmap(x, Rowv = NA, Colv = NA, scale = "column",
++         main = "heatmap(*, NA, NA) ~= image(t(x))")
+> 
+> round(Ca <- cor(attitude), 2)
+           rating complaints privileges learning raises critical advance
+rating       1.00       0.83       0.43     0.62   0.59     0.16    0.16
+complaints   0.83       1.00       0.56     0.60   0.67     0.19    0.22
+privileges   0.43       0.56       1.00     0.49   0.45     0.15    0.34
+learning     0.62       0.60       0.49     1.00   0.64     0.12    0.53
+raises       0.59       0.67       0.45     0.64   1.00     0.38    0.57
+critical     0.16       0.19       0.15     0.12   0.38     1.00    0.28
+advance      0.16       0.22       0.34     0.53   0.57     0.28    1.00
+> symnum(Ca) # simple graphic
+           rt cm p l rs cr a
+rating     1                
+complaints +  1             
+privileges .  .  1          
+learning   ,  .  . 1        
+raises     .  ,  . , 1      
+critical             .  1   
+advance          . . .     1
+attr(,"legend")
+[1] 0 ‘ ’ 0.3 ‘.’ 0.6 ‘,’ 0.8 ‘+’ 0.9 ‘*’ 0.95 ‘B’ 1
+> heatmap(Ca,               symm = TRUE, margins = c(6,6)) # with reorder()
+> heatmap(Ca, Rowv = FALSE, symm = TRUE, margins = c(6,6)) # _NO_ reorder()
+> ## slightly artificial with color bar, without and with ordering:
+> cc <- rainbow(nrow(Ca))
+> heatmap(Ca, Rowv = FALSE, symm = TRUE, RowSideColors = cc, ColSideColors = cc,
++ 	margins = c(6,6))
+> heatmap(Ca,		symm = TRUE, RowSideColors = cc, ColSideColors = cc,
++ 	margins = c(6,6))
+> 
+> ## For variable clustering, rather use distance based on cor():
+> symnum( cU <- cor(USJudgeRatings) )
+     CO I DM DI CF DE PR F O W PH R
+CONT 1                             
+INTG    1                          
+DMNR    B 1                        
+DILG    + +  1                     
+CFMG    + +  B  1                  
+DECI    + +  B  B  1               
+PREP    + +  B  B  B  1            
+FAMI    + +  B  *  *  B  1         
+ORAL    * *  B  B  *  B  B 1       
+WRIT    * +  B  *  *  B  B B 1     
+PHYS    , ,  +  +  +  +  + + + 1   
+RTEN    * *  *  *  *  B  * B B *  1
+attr(,"legend")
+[1] 0 ‘ ’ 0.3 ‘.’ 0.6 ‘,’ 0.8 ‘+’ 0.9 ‘*’ 0.95 ‘B’ 1
+> 
+> hU <- heatmap(cU, Rowv = FALSE, symm = TRUE, col = topo.colors(16),
++              distfun = function(c) as.dist(1 - c), keep.dendro = TRUE)
+> ## The Correlation matrix with same reordering:
+> round(100 * cU[hU[[1]], hU[[2]]])
+     CONT INTG DMNR PHYS DILG CFMG DECI RTEN ORAL WRIT PREP FAMI
+CONT  100  -13  -15    5    1   14    9   -3   -1   -4    1   -3
+INTG  -13  100   96   74   87   81   80   94   91   91   88   87
+DMNR  -15   96  100   79   84   81   80   94   91   89   86   84
+PHYS    5   74   79  100   81   88   87   91   89   86   85   84
+DILG    1   87   84   81  100   96   96   93   95   96   98   96
+CFMG   14   81   81   88   96  100   98   93   95   94   96   94
+DECI    9   80   80   87   96   98  100   92   95   95   96   94
+RTEN   -3   94   94   91   93   93   92  100   98   97   95   94
+ORAL   -1   91   91   89   95   95   95   98  100   99   98   98
+WRIT   -4   91   89   86   96   94   95   97   99  100   99   99
+PREP    1   88   86   85   98   96   96   95   98   99  100   99
+FAMI   -3   87   84   84   96   94   94   94   98   99   99  100
+> ## The column dendrogram:
+> utils::str(hU$Colv)
+--[dendrogram w/ 2 branches and 12 members at h = 1.15]
+  |--leaf "CONT" 
+  `--[dendrogram w/ 2 branches and 11 members at h = 0.258]
+     |--[dendrogram w/ 2 branches and 2 members at h = 0.0354]
+     |  |--leaf "INTG" 
+     |  `--leaf "DMNR" 
+     `--[dendrogram w/ 2 branches and 9 members at h = 0.187]
+        |--leaf "PHYS" 
+        `--[dendrogram w/ 2 branches and 8 members at h = 0.075]
+           |--[dendrogram w/ 2 branches and 3 members at h = 0.0438]
+           |  |--leaf "DILG" 
+           |  `--[dendrogram w/ 2 branches and 2 members at h = 0.0189]
+           |     |--leaf "CFMG" 
+           |     `--leaf "DECI" 
+           `--[dendrogram w/ 2 branches and 5 members at h = 0.0584]
+              |--leaf "RTEN" 
+              `--[dendrogram w/ 2 branches and 4 members at h = 0.0187]
+                 |--[dendrogram w/ 2 branches and 2 members at h = 0.00657]
+                 |  |--leaf "ORAL" 
+                 |  `--leaf "WRIT" 
+                 `--[dendrogram w/ 2 branches and 2 members at h = 0.0101]
+                    |--leaf "PREP" 
+                    `--leaf "FAMI" 
+> 
+> 
+> 
+> cleanEx()
+> nameEx("identify.hclust")
+> ### * identify.hclust
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: identify.hclust
+> ### Title: Identify Clusters in a Dendrogram
+> ### Aliases: identify.hclust
+> ### Keywords: cluster iplot
+> 
+> ### ** Examples
+> ## Not run: 
+> ##D require(graphics)
+> ##D 
+> ##D hca <- hclust(dist(USArrests))
+> ##D plot(hca)
+> ##D (x <- identify(hca)) ##  Terminate with 2nd mouse button !!
+> ##D 
+> ##D hci <- hclust(dist(iris[,1:4]))
+> ##D plot(hci)
+> ##D identify(hci, function(k) print(table(iris[k,5])))
+> ##D 
+> ##D # open a new device (one for dendrogram, one for bars):
+> ##D dev.new() # << make that narrow (& small)
+> ##D           # and *beside* 1st one
+> ##D nD <- dev.cur()            # to be for the barplot
+> ##D dev.set(dev.prev())  # old one for dendrogram
+> ##D plot(hci)
+> ##D ## select subtrees in dendrogram and "see" the species distribution:
+> ##D identify(hci, function(k) barplot(table(iris[k,5]), col = 2:4), DEV.FUN = nD)
+> ## End(Not run)
+> 
+> 
+> cleanEx()
+> nameEx("influence.measures")
+> ### * influence.measures
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: influence.measures
+> ### Title: Regression Deletion Diagnostics
+> ### Aliases: influence.measures hat hatvalues hatvalues.lm rstandard
+> ###   rstandard.lm rstandard.glm rstudent rstudent.lm rstudent.glm dfbeta
+> ###   dfbeta.lm dfbetas dfbetas.lm dffits covratio cooks.distance
+> ###   cooks.distance.lm cooks.distance.glm
+> ### Keywords: regression
+> 
+> ### ** Examples
+> 
+> 
+> cleanEx()
+> nameEx("integrate")
+> ### * integrate
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: integrate
+> ### Title: Integration of One-Dimensional Functions
+> ### Aliases: integrate print.integrate
+> ### Keywords: math utilities
+> 
+> ### ** Examples
+> 
+> integrate(dnorm, -1.96, 1.96)
+0.9500042 with absolute error < 1e-11
+> integrate(dnorm, -Inf, Inf)
+1 with absolute error < 9.4e-05
+> 
+> ## a slowly-convergent integral
+> integrand <- function(x) {1/((x+1)*sqrt(x))}
+> integrate(integrand, lower = 0, upper = Inf)
+3.141593 with absolute error < 2.7e-05
+> 
+> ## don't do this if you really want the integral from 0 to Inf
+> integrate(integrand, lower = 0, upper = 10)
+2.529038 with absolute error < 3e-04
+> integrate(integrand, lower = 0, upper = 100000)
+3.135268 with absolute error < 4.2e-07
+> integrate(integrand, lower = 0, upper = 1000000, stop.on.error = FALSE)
+failed with message ‘the integral is probably divergent’
+> 
+> ## some functions do not handle vector input properly
+> f <- function(x) 2.0
+> try(integrate(f, 0, 1))
+Error in integrate(f, 0, 1) : 
+  evaluation of function gave a result of wrong length
+> integrate(Vectorize(f), 0, 1)  ## correct
+2 with absolute error < 2.2e-14
+> integrate(function(x) rep(2.0, length(x)), 0, 1)  ## correct
+2 with absolute error < 2.2e-14
+> 
+> ## integrate can fail if misused
+> integrate(dnorm, 0, 2)
+0.4772499 with absolute error < 5.3e-15
+> integrate(dnorm, 0, 20)
+0.5 with absolute error < 3.7e-05
+> integrate(dnorm, 0, 200)
+0.5 with absolute error < 1.6e-07
+> integrate(dnorm, 0, 2000)
+0.5 with absolute error < 4.4e-06
+> integrate(dnorm, 0, 20000) ## fails on many systems
+0 with absolute error < 0
+> integrate(dnorm, 0, Inf)   ## works
+0.5 with absolute error < 4.7e-05
+> 
+> 
+> 
+> cleanEx()
+> nameEx("interaction.plot")
+> ### * interaction.plot
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: interaction.plot
+> ### Title: Two-way Interaction Plot
+> ### Aliases: interaction.plot
+> ### Keywords: hplot
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> with(ToothGrowth, {
++ interaction.plot(dose, supp, len, fixed = TRUE)
++ dose <- ordered(dose)
++ interaction.plot(dose, supp, len, fixed = TRUE, col = 2:3, leg.bty = "o")
++ interaction.plot(dose, supp, len, fixed = TRUE, col = 2:3, type = "p")
++ })
+> 
+> with(OrchardSprays, {
++   interaction.plot(treatment, rowpos, decrease)
++   interaction.plot(rowpos, treatment, decrease, cex.axis = 0.8)
++   ## order the rows by their mean effect
++   rowpos <- factor(rowpos,
++                    levels = sort.list(tapply(decrease, rowpos, mean)))
++   interaction.plot(rowpos, treatment, decrease, col = 2:9, lty = 1)
++ })
+> 
+> with(esoph, {
++   interaction.plot(agegp, alcgp, ncases/ncontrols, main = "'esoph' Data")
++   interaction.plot(agegp, tobgp, ncases/ncontrols, trace.label = "tobacco",
++                    fixed = TRUE, xaxt = "n")
++ })
+> ## deal with NAs:
+> esoph[66,] # second to last age group: 65-74
+   agegp     alcgp tobgp ncases ncontrols
+66 65-74 0-39g/day   30+      0         2
+> esophNA <- esoph; esophNA$ncases[66] <- NA
+> with(esophNA, {
++   interaction.plot(agegp, alcgp, ncases/ncontrols, col = 2:5)
++                                 # doesn't show *last* group either
++   interaction.plot(agegp, alcgp, ncases/ncontrols, col = 2:5, type = "b")
++   ## alternative take non-NA's  {"cheating"}
++   interaction.plot(agegp, alcgp, ncases/ncontrols, col = 2:5,
++                    fun = function(x) mean(x, na.rm = TRUE),
++                    sub = "function(x) mean(x, na.rm=TRUE)")
++ })
+> rm(esophNA) # to clear up
+> 
+> 
+> 
+> cleanEx()
+> nameEx("is.empty")
+> ### * is.empty
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: is.empty.model
+> ### Title: Test if a Model's Formula is Empty
+> ### Aliases: is.empty.model
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> y <- rnorm(20)
+> is.empty.model(y ~ 0)
+[1] TRUE
+> is.empty.model(y ~ -1)
+[1] TRUE
+> is.empty.model(lm(y ~ 0))
+[1] TRUE
+> 
+> 
+> 
+> cleanEx()
+> nameEx("isoreg")
+> ### * isoreg
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: isoreg
+> ### Title: Isotonic / Monotone Regression
+> ### Aliases: isoreg
+> ### Keywords: regression smooth
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> (ir <- isoreg(c(1,0,4,3,3,5,4,2,0)))
+Isotonic regression from isoreg(x = c(1, 0, 4, 3, 3, 5, 4, 2, 0)),
+  with 2 knots / breaks at obs.nr. 2 9 ;
+  initially ordered 'x'
+  and further components List of 4
+ $ x : num [1:9] 1 2 3 4 5 6 7 8 9
+ $ y : num [1:9] 1 0 4 3 3 5 4 2 0
+ $ yf: num [1:9] 0.5 0.5 3 3 3 3 3 3 3
+ $ yc: num [1:10] 0 1 1 5 8 11 16 20 22 22
+> plot(ir, plot.type = "row")
+> 
+> (ir3 <- isoreg(y3 <- c(1,0,4,3,3,5,4,2, 3))) # last "3", not "0"
+Isotonic regression from isoreg(x = y3 <- c(1, 0, 4, 3, 3, 5, 4, 2, 3)),
+  with 3 knots / breaks at obs.nr. 2 5 9 ;
+  initially ordered 'x'
+  and further components List of 4
+ $ x : num [1:9] 1 2 3 4 5 6 7 8 9
+ $ y : num [1:9] 1 0 4 3 3 5 4 2 3
+ $ yf: num [1:9] 0.5 0.5 3.33 3.33 3.33 ...
+ $ yc: num [1:10] 0 1 1 5 8 11 16 20 22 25
+> (fi3 <- as.stepfun(ir3))
+Step function
+Call: isoreg(x = y3 <- c(1, 0, 4, 3, 3, 5, 4, 2, 3))
+ x[1:3] =      2,      5,      9
+4 plateau levels =    0.5,    0.5, 3.3333,    3.5
+> (ir4 <- isoreg(1:10, y4 <- c(5, 9, 1:2, 5:8, 3, 8)))
+Isotonic regression from isoreg(x = 1:10, y = y4 <- c(5, 9, 1:2, 5:8, 3, 8)),
+  with 5 knots / breaks at obs.nr. 4 5 6 9 10 ;
+  initially ordered 'x'
+  and further components List of 4
+ $ x : num [1:10] 1 2 3 4 5 6 7 8 9 10
+ $ y : num [1:10] 5 9 1 2 5 6 7 8 3 8
+ $ yf: num [1:10] 4.25 4.25 4.25 4.25 5 6 6 6 6 8
+ $ yc: num [1:11] 0 5 14 15 17 22 28 35 43 46 ...
+> cat(sprintf("R^2 = %.2f\n",
++             1 - sum(residuals(ir4)^2) / ((10-1)*var(y4))))
+R^2 = 0.21
+> 
+> ## If you are interested in the knots alone :
+> with(ir4, cbind(iKnots, yf[iKnots]))
+     iKnots     
+[1,]      4 4.25
+[2,]      5 5.00
+[3,]      6 6.00
+[4,]      9 6.00
+[5,]     10 8.00
+> 
+> ## Example of unordered x[] with ties:
+> x <- sample((0:30)/8)
+> y <- exp(x)
+> x. <- round(x) # ties!
+> plot(m <- isoreg(x., y))
+> stopifnot(all.equal(with(m, yf[iKnots]),
++                     as.vector(tapply(y, x., mean))))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("kernapply")
+> ### * kernapply
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: kernapply
+> ### Title: Apply Smoothing Kernel
+> ### Aliases: kernapply kernapply.default kernapply.ts kernapply.tskernel
+> ###   kernapply.vector
+> ### Keywords: ts
+> 
+> ### ** Examples
+> 
+> ## see 'kernel' for examples
+> 
+> 
+> 
+> cleanEx()
+> nameEx("kernel")
+> ### * kernel
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: kernel
+> ### Title: Smoothing Kernel Objects
+> ### Aliases: kernel bandwidth.kernel df.kernel is.tskernel plot.tskernel
+> ### Keywords: ts
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> ## Demonstrate a simple trading strategy for the
+> ## financial time series German stock index DAX.
+> x <- EuStockMarkets[,1]
+> k1 <- kernel("daniell", 50)  # a long moving average
+> k2 <- kernel("daniell", 10)  # and a short one
+> plot(k1)
+> plot(k2)
+> x1 <- kernapply(x, k1)
+> x2 <- kernapply(x, k2)
+> plot(x)
+> lines(x1, col = "red")    # go long if the short crosses the long upwards
+> lines(x2, col = "green")  # and go short otherwise
+> 
+> ## More interesting kernels
+> kd <- kernel("daniell", c(3, 3))
+> kd # note the unusual indexing
+Daniell(3,3) 
+coef[-6] = 0.02041
+coef[-5] = 0.04082
+coef[-4] = 0.06122
+coef[-3] = 0.08163
+coef[-2] = 0.10204
+coef[-1] = 0.12245
+coef[ 0] = 0.14286
+coef[ 1] = 0.12245
+coef[ 2] = 0.10204
+coef[ 3] = 0.08163
+coef[ 4] = 0.06122
+coef[ 5] = 0.04082
+coef[ 6] = 0.02041
+> kd[-2:2]
+[1] 0.1020408 0.1224490 0.1428571 0.1224490 0.1020408
+> plot(kernel("fejer", 100, r = 6))
+> plot(kernel("modified.daniell", c(7,5,3)))
+> 
+> # Reproduce example 10.4.3 from Brockwell and Davis (1991)
+> spectrum(sunspot.year, kernel = kernel("daniell", c(11,7,3)), log = "no")
+> 
+> 
+> 
+> cleanEx()
+> nameEx("kmeans")
+> ### * kmeans
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: kmeans
+> ### Title: K-Means Clustering
+> ### Aliases: kmeans print.kmeans fitted.kmeans
+> ### Keywords: multivariate cluster
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> # a 2-dimensional example
+> x <- rbind(matrix(rnorm(100, sd = 0.3), ncol = 2),
++            matrix(rnorm(100, mean = 1, sd = 0.3), ncol = 2))
+> colnames(x) <- c("x", "y")
+> (cl <- kmeans(x, 2))
+K-means clustering with 2 clusters of sizes 51, 49
+
+Cluster means:
+           x          y
+1 0.94443633 1.01712793
+2 0.02149367 0.02121248
+
+Clustering vector:
+  [1] 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
+ [38] 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
+ [75] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
+
+Within cluster sum of squares by cluster:
+[1] 8.392416 6.525480
+ (between_SS / total_SS =  75.5 %)
+
+Available components:
+
+[1] "cluster"      "centers"      "totss"        "withinss"     "tot.withinss"
+[6] "betweenss"    "size"         "iter"         "ifault"      
+> plot(x, col = cl$cluster)
+> points(cl$centers, col = 1:2, pch = 8, cex = 2)
+> 
+> # sum of squares
+> ss <- function(x) sum(scale(x, scale = FALSE)^2)
+> 
+> ## cluster centers "fitted" to each obs.:
+> fitted.x <- fitted(cl);  head(fitted.x)
+           x          y
+2 0.02149367 0.02121248
+2 0.02149367 0.02121248
+2 0.02149367 0.02121248
+2 0.02149367 0.02121248
+2 0.02149367 0.02121248
+2 0.02149367 0.02121248
+> resid.x <- x - fitted(cl)
+> 
+> ## Equalities : ----------------------------------
+> cbind(cl[c("betweenss", "tot.withinss", "totss")], # the same two columns
++          c(ss(fitted.x), ss(resid.x),    ss(x)))
+             [,1]     [,2]    
+betweenss    46.07333 46.07333
+tot.withinss 14.9179  14.9179 
+totss        60.99123 60.99123
+> stopifnot(all.equal(cl$ totss,        ss(x)),
++ 	  all.equal(cl$ tot.withinss, ss(resid.x)),
++ 	  ## these three are the same:
++ 	  all.equal(cl$ betweenss,    ss(fitted.x)),
++ 	  all.equal(cl$ betweenss, cl$totss - cl$tot.withinss),
++ 	  ## and hence also
++ 	  all.equal(ss(x), ss(fitted.x) + ss(resid.x))
++ 	  )
+> 
+> kmeans(x,1)$withinss # trivial one-cluster, (its W.SS == ss(x))
+[1] 60.99123
+> 
+> ## random starts do help here with too many clusters
+> ## (and are often recommended anyway!):
+> (cl <- kmeans(x, 5, nstart = 25))
+K-means clustering with 5 clusters of sizes 24, 15, 24, 25, 12
+
+Cluster means:
+           x          y
+1  0.1581362 -0.1761590
+2  0.8609139  1.3145869
+3  0.8043520  0.7805033
+4 -0.1096832  0.2106891
+5  1.3290081  1.1185534
+
+Clustering vector:
+  [1] 4 1 4 1 4 4 1 1 4 4 3 1 4 4 1 4 1 4 1 4 1 1 4 4 1 4 1 4 4 1 1 1 4 1 4 4 4
+ [38] 1 1 1 1 4 4 4 4 4 1 1 1 1 2 3 3 3 3 5 5 5 3 5 2 3 5 2 3 2 3 3 5 2 2 5 2 3
+ [75] 3 5 2 2 2 2 3 2 5 3 5 3 2 3 3 3 3 5 3 2 3 3 5 3 2 3
+
+Within cluster sum of squares by cluster:
+[1] 1.2816507 0.7104553 1.5056575 2.5330710 1.0314888
+ (between_SS / total_SS =  88.4 %)
+
+Available components:
+
+[1] "cluster"      "centers"      "totss"        "withinss"     "tot.withinss"
+[6] "betweenss"    "size"         "iter"         "ifault"      
+> plot(x, col = cl$cluster)
+> points(cl$centers, col = 1:5, pch = 8)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("kruskal.test")
+> ### * kruskal.test
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: kruskal.test
+> ### Title: Kruskal-Wallis Rank Sum Test
+> ### Aliases: kruskal.test kruskal.test.default kruskal.test.formula
+> ### Keywords: htest
+> 
+> ### ** Examples
+> 
+> ## Hollander & Wolfe (1973), 116.
+> ## Mucociliary efficiency from the rate of removal of dust in normal
+> ##  subjects, subjects with obstructive airway disease, and subjects
+> ##  with asbestosis.
+> x <- c(2.9, 3.0, 2.5, 2.6, 3.2) # normal subjects
+> y <- c(3.8, 2.7, 4.0, 2.4)      # with obstructive airway disease
+> z <- c(2.8, 3.4, 3.7, 2.2, 2.0) # with asbestosis
+> kruskal.test(list(x, y, z))
+
+	Kruskal-Wallis rank sum test
+
+data:  list(x, y, z)
+Kruskal-Wallis chi-squared = 0.77143, df = 2, p-value = 0.68
+
+> ## Equivalently,
+> x <- c(x, y, z)
+> g <- factor(rep(1:3, c(5, 4, 5)),
++             labels = c("Normal subjects",
++                        "Subjects with obstructive airway disease",
++                        "Subjects with asbestosis"))
+> kruskal.test(x, g)
+
+	Kruskal-Wallis rank sum test
+
+data:  x and g
+Kruskal-Wallis chi-squared = 0.77143, df = 2, p-value = 0.68
+
+> 
+> ## Formula interface.
+> require(graphics)
+> boxplot(Ozone ~ Month, data = airquality)
+> kruskal.test(Ozone ~ Month, data = airquality)
+
+	Kruskal-Wallis rank sum test
+
+data:  Ozone by Month
+Kruskal-Wallis chi-squared = 29.267, df = 4, p-value = 6.901e-06
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("ks.test")
+> ### * ks.test
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: ks.test
+> ### Title: Kolmogorov-Smirnov Tests
+> ### Aliases: ks.test
+> ### Keywords: htest
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> x <- rnorm(50)
+> y <- runif(30)
+> # Do x and y come from the same distribution?
+> ks.test(x, y)
+
+	Two-sample Kolmogorov-Smirnov test
+
+data:  x and y
+D = 0.48, p-value = 0.0002033
+alternative hypothesis: two-sided
+
+> # Does x come from a shifted gamma distribution with shape 3 and rate 2?
+> ks.test(x+2, "pgamma", 3, 2) # two-sided, exact
+
+	One-sample Kolmogorov-Smirnov test
+
+data:  x + 2
+D = 0.40962, p-value = 4.227e-08
+alternative hypothesis: two-sided
+
+> ks.test(x+2, "pgamma", 3, 2, exact = FALSE)
+
+	One-sample Kolmogorov-Smirnov test
+
+data:  x + 2
+D = 0.40962, p-value = 1.033e-07
+alternative hypothesis: two-sided
+
+> ks.test(x+2, "pgamma", 3, 2, alternative = "gr")
+
+	One-sample Kolmogorov-Smirnov test
+
+data:  x + 2
+D^+ = 0.039998, p-value = 0.8302
+alternative hypothesis: the CDF of x lies above the null hypothesis
+
+> 
+> # test if x is stochastically larger than x2
+> x2 <- rnorm(50, -1)
+> plot(ecdf(x), xlim = range(c(x, x2)))
+> plot(ecdf(x2), add = TRUE, lty = "dashed")
+> t.test(x, x2, alternative = "g")
+
+	Welch Two Sample t-test
+
+data:  x and x2
+t = 5.6742, df = 96.85, p-value = 7.242e-08
+alternative hypothesis: true difference in means is greater than 0
+95 percent confidence interval:
+ 0.7069751       Inf
+sample estimates:
+ mean of x  mean of y 
+ 0.1004483 -0.8990693 
+
+> wilcox.test(x, x2, alternative = "g")
+
+	Wilcoxon rank sum test with continuity correction
+
+data:  x and x2
+W = 1983, p-value = 2.212e-07
+alternative hypothesis: true location shift is greater than 0
+
+> ks.test(x, x2, alternative = "l")
+
+	Two-sample Kolmogorov-Smirnov test
+
+data:  x and x2
+D^- = 0.5, p-value = 3.727e-06
+alternative hypothesis: the CDF of x lies below that of y
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("ksmooth")
+> ### * ksmooth
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: ksmooth
+> ### Title: Kernel Regression Smoother
+> ### Aliases: ksmooth
+> ### Keywords: smooth
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> with(cars, {
++     plot(speed, dist)
++     lines(ksmooth(speed, dist, "normal", bandwidth = 2), col = 2)
++     lines(ksmooth(speed, dist, "normal", bandwidth = 5), col = 3)
++ })
+> 
+> 
+> 
+> cleanEx()
+> nameEx("lag")
+> ### * lag
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: lag
+> ### Title: Lag a Time Series
+> ### Aliases: lag lag.default
+> ### Keywords: ts
+> 
+> ### ** Examples
+> 
+> lag(ldeaths, 12) # starts one year earlier
+      Jan  Feb  Mar  Apr  May  Jun  Jul  Aug  Sep  Oct  Nov  Dec
+1973 3035 2552 2704 2554 2014 1655 1721 1524 1596 2074 2199 2512
+1974 2933 2889 2938 2497 1870 1726 1607 1545 1396 1787 2076 2837
+1975 2787 3891 3179 2011 1636 1580 1489 1300 1356 1653 2013 2823
+1976 3102 2294 2385 2444 1748 1554 1498 1361 1346 1564 1640 2293
+1977 2815 3137 2679 1969 1870 1633 1529 1366 1357 1570 1535 2491
+1978 3084 2605 2573 2143 1693 1504 1461 1354 1333 1492 1781 1915
+> 
+> 
+> 
+> cleanEx()
+> nameEx("lag.plot")
+> ### * lag.plot
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: lag.plot
+> ### Title: Time Series Lag Plots
+> ### Aliases: lag.plot
+> ### Keywords: hplot ts
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> lag.plot(nhtemp, 8, diag.col = "forest green")
+> lag.plot(nhtemp, 5, main = "Average Temperatures in New Haven")
+> ## ask defaults to TRUE when we have more than one page:
+> lag.plot(nhtemp, 6, layout = c(2,1), asp = NA,
++          main = "New Haven Temperatures", col.main = "blue")
+> 
+> ## Multivariate (but non-stationary! ...)
+> lag.plot(freeny.x, lags = 3)
+> 
+> ## no lines for long series :
+> lag.plot(sqrt(sunspots), set = c(1:4, 9:12), pch = ".", col = "gold")
+> 
+> 
+> 
+> cleanEx()
+> nameEx("line")
+> ### * line
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: line
+> ### Title: Robust Line Fitting
+> ### Aliases: line residuals.tukeyline
+> ### Keywords: robust regression
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> plot(cars)
+> (z <- line(cars))
+
+Call:
+line(cars)
+
+Coefficients:
+[1]  -26.053    4.421
+
+> abline(coef(z))
+> ## Tukey-Anscombe Plot :
+> plot(residuals(z) ~ fitted(z), main = deparse(z$call))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("lm")
+> ### * lm
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: lm
+> ### Title: Fitting Linear Models
+> ### Aliases: lm
+> ### Keywords: regression
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> ## Annette Dobson (1990) "An Introduction to Generalized Linear Models".
+> ## Page 9: Plant Weight Data.
+> ctl <- c(4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14)
+> trt <- c(4.81,4.17,4.41,3.59,5.87,3.83,6.03,4.89,4.32,4.69)
+> group <- gl(2, 10, 20, labels = c("Ctl","Trt"))
+> weight <- c(ctl, trt)
+> lm.D9 <- lm(weight ~ group)
+> lm.D90 <- lm(weight ~ group - 1) # omitting intercept
+> opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
+> plot(lm.D9, las = 1)      # Residuals, Fitted, ...
+> par(opar)
+> ## Don't show: 
+> ## model frame :
+> stopifnot(identical(lm(weight ~ group, method = "model.frame"),
++                     model.frame(lm.D9)))
+> ## End(Don't show)
+> ### less simple examples in "See Also" above
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("lm.influence")
+> ### * lm.influence
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: lm.influence
+> ### Title: Regression Diagnostics
+> ### Aliases: lm.influence influence influence.lm influence.glm
+> ### Keywords: regression
+> 
+> ### ** Examples
+> 
+> ## Analysis of the life-cycle savings data
+> ## given in Belsley, Kuh and Welsch.
+> summary(lm.SR <- lm(sr ~ pop15 + pop75 + dpi + ddpi,
++                     data = LifeCycleSavings),
++         corr = TRUE)
+
+Call:
+lm(formula = sr ~ pop15 + pop75 + dpi + ddpi, data = LifeCycleSavings)
+
+Residuals:
+    Min      1Q  Median      3Q     Max 
+-8.2422 -2.6857 -0.2488  2.4280  9.7509 
+
+Coefficients:
+              Estimate Std. Error t value Pr(>|t|)    
+(Intercept) 28.5660865  7.3545161   3.884 0.000334 ***
+pop15       -0.4611931  0.1446422  -3.189 0.002603 ** 
+pop75       -1.6914977  1.0835989  -1.561 0.125530    
+dpi         -0.0003369  0.0009311  -0.362 0.719173    
+ddpi         0.4096949  0.1961971   2.088 0.042471 *  
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Residual standard error: 3.803 on 45 degrees of freedom
+Multiple R-squared:  0.3385,	Adjusted R-squared:  0.2797 
+F-statistic: 5.756 on 4 and 45 DF,  p-value: 0.0007904
+
+Correlation of Coefficients:
+      (Intercept) pop15 pop75 dpi  
+pop15 -0.98                        
+pop75 -0.81        0.77            
+dpi   -0.17        0.18 -0.37      
+ddpi  -0.19        0.10 -0.05  0.26
+
+> utils::str(lmI <- lm.influence(lm.SR))
+List of 4
+ $ hat         : Named num [1:50] 0.0677 0.1204 0.0875 0.0895 0.0696 ...
+  ..- attr(*, "names")= chr [1:50] "Australia" "Austria" "Belgium" "Bolivia" ...
+ $ coefficients: num [1:50, 1:5] 0.0916 -0.0747 -0.4752 0.0429 0.6604 ...
+  ..- attr(*, "dimnames")=List of 2
+  .. ..$ : chr [1:50] "Australia" "Austria" "Belgium" "Bolivia" ...
+  .. ..$ : chr [1:5] "(Intercept)" "pop15" "pop75" "dpi" ...
+ $ sigma       : Named num [1:50] 3.84 3.84 3.83 3.84 3.81 ...
+  ..- attr(*, "names")= chr [1:50] "Australia" "Austria" "Belgium" "Bolivia" ...
+ $ wt.res      : Named num [1:50] 0.864 0.616 2.219 -0.698 3.553 ...
+  ..- attr(*, "names")= chr [1:50] "Australia" "Austria" "Belgium" "Bolivia" ...
+> 
+> ## For more "user level" examples, use example(influence.measures)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("lm.summaries")
+> ### * lm.summaries
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: lm.summaries
+> ### Title: Accessing Linear Model Fits
+> ### Aliases: family.lm formula.lm residuals.lm labels.lm
+> ### Keywords: regression models
+> 
+> ### ** Examples
+> 
+> ## Don't show: 
+> utils::example("lm", echo = FALSE)
+> ## End(Don't show)
+> ##-- Continuing the  lm(.) example:
+> coef(lm.D90) # the bare coefficients
+groupCtl groupTrt 
+   5.032    4.661 
+> 
+> ## The 2 basic regression diagnostic plots [plot.lm(.) is preferred]
+> plot(resid(lm.D90), fitted(lm.D90)) # Tukey-Anscombe's
+> abline(h = 0, lty = 2, col = "gray")
+> 
+> qqnorm(residuals(lm.D90))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("lmfit")
+> ### * lmfit
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: lm.fit
+> ### Title: Fitter Functions for Linear Models
+> ### Aliases: lm.fit lm.wfit .lm.fit
+> ### Keywords: regression array
+> 
+> ### ** Examples
+> 
+> require(utils)
+> set.seed(129)
+> 
+> n <- 7 ; p <- 2
+> X <- matrix(rnorm(n * p), n, p) # no intercept!
+> y <- rnorm(n)
+> w <- rnorm(n)^2
+> 
+> str(lmw <- lm.wfit(x = X, y = y, w = w))
+List of 9
+ $ coefficients : Named num [1:2] -0.0432 -0.5612
+  ..- attr(*, "names")= chr [1:2] "x1" "x2"
+ $ residuals    : num [1:7] -0.132 -1.308 -0.256 1.468 0.439 ...
+ $ fitted.values: num [1:7] 0.05 -0.5232 0.6151 -0.5766 0.0512 ...
+ $ effects      : Named num [1:7] 0.804 1.722 -0.072 2.047 0.392 ...
+  ..- attr(*, "names")= chr [1:7] "x1" "x2" "" "" ...
+ $ weights      : num [1:7] 0.3195 0.0123 0.0569 1.8154 0.8359 ...
+ $ rank         : int 2
+ $ assign       : NULL
+ $ qr           :List of 5
+  ..$ qr   : num [1:7, 1:2] 3.0953 0.0355 0.106 0.5901 -0.5898 ...
+  ..$ qraux: num [1:2] 1.2 1.02
+  ..$ pivot: int [1:2] 1 2
+  ..$ tol  : num 1e-07
+  ..$ rank : int 2
+  ..- attr(*, "class")= chr "qr"
+ $ df.residual  : int 5
+> 
+> str(lm. <- lm.fit (x = X, y = y))
+List of 8
+ $ coefficients : Named num [1:2] 0.132 -0.553
+  ..- attr(*, "names")= chr [1:2] "x1" "x2"
+ $ residuals    : num [1:7] 0.06433 -1.14333 -0.00708 1.69606 0.09095 ...
+ $ effects      : Named num [1:7] 0.791 1.476 -0.415 1.983 0.133 ...
+  ..- attr(*, "names")= chr [1:7] "x1" "x2" "" "" ...
+ $ rank         : int 2
+ $ fitted.values: num [1:7] -0.146 -0.688 0.366 -0.804 0.399 ...
+ $ assign       : NULL
+ $ qr           :List of 5
+  ..$ qr   : num [1:7, 1:2] 3.321 0.298 0.414 0.408 -0.601 ...
+  ..$ qraux: num [1:2] 1.34 1.32
+  ..$ pivot: int [1:2] 1 2
+  ..$ tol  : num 1e-07
+  ..$ rank : int 2
+  ..- attr(*, "class")= chr "qr"
+ $ df.residual  : int 5
+> ## Don't show: 
+>   ## These are the same calculations at C level, but a parallel BLAS
+>   ## might not do them the same way twice, and if seems serial MKL does not.
+>   lm.. <- .lm.fit(X,y)
+>   lm.w <- .lm.fit(X*sqrt(w), y*sqrt(w))
+>   id <- function(x, y) all.equal(x, y, tolerance = 1e-15, scale = 1)
+>   stopifnot(id(unname(lm.$coef), lm..$coef),
++ 	    id(unname(lmw$coef), lm.w$coef))
+> ## End(Don't show)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("loess")
+> ### * loess
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: loess
+> ### Title: Local Polynomial Regression Fitting
+> ### Aliases: loess
+> ### Keywords: smooth loess
+> 
+> ### ** Examples
+> 
+> cars.lo <- loess(dist ~ speed, cars)
+> predict(cars.lo, data.frame(speed = seq(5, 30, 1)), se = TRUE)
+$fit
+        1         2         3         4         5         6         7         8 
+ 7.797353 10.002308 12.499786 15.281082 18.446568 21.865315 25.517015 29.350386 
+        9        10        11        12        13        14        15        16 
+33.230660 37.167935 41.205226 45.055736 48.355889 49.824812 51.986702 56.461318 
+       17        18        19        20        21        22        23        24 
+61.959729 68.569313 76.316068 85.212121 95.324047        NA        NA        NA 
+       25        26 
+       NA        NA 
+
+$se.fit
+       1        2        3        4        5        6        7        8 
+7.568120 5.945831 4.990827 4.545284 4.308639 4.115049 3.789542 3.716231 
+       9       10       11       12       13       14       15       16 
+3.776947 4.091747 4.709568 4.245427 4.035929 3.753410 4.004705 4.043190 
+      17       18       19       20       21       22       23       24 
+4.026105 4.074664 4.570818 5.954217 8.302014       NA       NA       NA 
+      25       26 
+      NA       NA 
+
+$residual.scale
+[1] 15.29496
+
+$df
+[1] 44.6179
+
+> # to allow extrapolation
+> cars.lo2 <- loess(dist ~ speed, cars,
++   control = loess.control(surface = "direct"))
+> predict(cars.lo2, data.frame(speed = seq(5, 30, 1)), se = TRUE)
+$fit
+         1          2          3          4          5          6          7 
+  7.741006   9.926596  12.442424  15.281082  18.425712  21.865315  25.713413 
+         8          9         10         11         12         13         14 
+ 29.350386  33.230660  37.167935  41.205226  45.781544  48.355889  50.067148 
+        15         16         17         18         19         20         21 
+ 51.986702  56.445263  62.025404  68.569313  76.193111  85.053364  95.300523 
+        22         23         24         25         26 
+106.974661 120.092581 134.665851 150.698545 168.190283 
+
+$se.fit
+        1         2         3         4         5         6         7         8 
+ 7.565991  5.959097  5.012013  4.550013  4.321596  4.119331  3.939804  3.720098 
+        9        10        11        12        13        14        15        16 
+ 3.780877  4.096004  4.714469  4.398936  4.040129  4.184257  4.008873  4.061865 
+       17        18        19        20        21        22        23        24 
+ 4.033998  4.078904  4.584606  5.952480  8.306901 11.601911 15.792480 20.864660 
+       25        26 
+26.823827 33.683999 
+
+$residual.scale
+[1] 15.31087
+
+$df
+[1] 44.55085
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("logLik")
+> ### * logLik
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: logLik
+> ### Title: Extract Log-Likelihood
+> ### Aliases: logLik logLik.lm
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> x <- 1:5
+> lmx <- lm(x ~ 1)
+> logLik(lmx) # using print.logLik() method
+'log Lik.' -8.827561 (df=2)
+> utils::str(logLik(lmx))
+Class 'logLik' : -8.828 (df=2)
+> 
+> ## lm method
+> (fm1 <- lm(rating ~ ., data = attitude))
+
+Call:
+lm(formula = rating ~ ., data = attitude)
+
+Coefficients:
+(Intercept)   complaints   privileges     learning       raises     critical  
+   10.78708      0.61319     -0.07305      0.32033      0.08173      0.03838  
+    advance  
+   -0.21706  
+
+> logLik(fm1)
+'log Lik.' -97.24991 (df=8)
+> logLik(fm1, REML = TRUE)
+'log Lik.' -102.6851 (df=8)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("loglin")
+> ### * loglin
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: loglin
+> ### Title: Fitting Log-Linear Models
+> ### Aliases: loglin
+> ### Keywords: category models
+> 
+> ### ** Examples
+> 
+> ## Model of joint independence of sex from hair and eye color.
+> fm <- loglin(HairEyeColor, list(c(1, 2), c(1, 3), c(2, 3)))
+5 iterations: deviation 0.04093795 
+> fm
+$lrt
+[1] 6.761258
+
+$pearson
+[1] 6.868292
+
+$df
+[1] 9
+
+$margin
+$margin[[1]]
+[1] "Hair" "Eye" 
+
+$margin[[2]]
+[1] "Hair" "Sex" 
+
+$margin[[3]]
+[1] "Eye" "Sex"
+
+
+> 1 - pchisq(fm$lrt, fm$df)
+[1] 0.66196
+> ## Model with no three-factor interactions fits well.
+> 
+> 
+> 
+> cleanEx()
+> nameEx("lowess")
+> ### * lowess
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: lowess
+> ### Title: Scatter Plot Smoothing
+> ### Aliases: lowess
+> ### Keywords: smooth
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> plot(cars, main = "lowess(cars)")
+> lines(lowess(cars), col = 2)
+> lines(lowess(cars, f = .2), col = 3)
+> legend(5, 120, c(paste("f = ", c("2/3", ".2"))), lty = 1, col = 2:3)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("ls.diag")
+> ### * ls.diag
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: ls.diag
+> ### Title: Compute Diagnostics for 'lsfit' Regression Results
+> ### Aliases: ls.diag
+> ### Keywords: regression
+> 
+> ### ** Examples
+> 
+> 
+> cleanEx()
+> nameEx("lsfit")
+> ### * lsfit
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: lsfit
+> ### Title: Find the Least Squares Fit
+> ### Aliases: lsfit
+> ### Keywords: regression
+> 
+> ### ** Examples
+> 
+> ## Don't show: 
+> utils::example("lm", echo = FALSE)
+> ## End(Don't show)
+> ##-- Using the same data as the lm(.) example:
+> lsD9 <- lsfit(x = unclass(gl(2, 10)), y = weight)
+> ls.print(lsD9)
+Residual Standard Error=0.6964
+R-Square=0.0731
+F-statistic (df=1, 18)=1.4191
+p-value=0.249
+
+          Estimate Std.Err t-value Pr(>|t|)
+Intercept    5.403  0.4924 10.9723    0.000
+X           -0.371  0.3114 -1.1913    0.249
+
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("mad")
+> ### * mad
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: mad
+> ### Title: Median Absolute Deviation
+> ### Aliases: mad
+> ### Keywords: univar robust
+> 
+> ### ** Examples
+> 
+> mad(c(1:9))
+[1] 2.9652
+> print(mad(c(1:9),     constant = 1)) ==
++       mad(c(1:8, 100), constant = 1)       # = 2 ; TRUE
+[1] 2
+[1] TRUE
+> x <- c(1,2,3,5,7,8)
+> sort(abs(x - median(x)))
+[1] 1 1 2 3 3 4
+> c(mad(x, constant = 1),
++   mad(x, constant = 1, low = TRUE),
++   mad(x, constant = 1, high = TRUE))
+[1] 2.5 2.0 3.0
+> 
+> 
+> 
+> cleanEx()
+> nameEx("mahalanobis")
+> ### * mahalanobis
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: mahalanobis
+> ### Title: Mahalanobis Distance
+> ### Aliases: mahalanobis
+> ### Keywords: multivariate
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> ma <- cbind(1:6, 1:3)
+> (S <-  var(ma))
+     [,1] [,2]
+[1,]  3.5  0.8
+[2,]  0.8  0.8
+> mahalanobis(c(0, 0), 1:2, S)
+[1] 5.37037
+> 
+> x <- matrix(rnorm(100*3), ncol = 3)
+> stopifnot(mahalanobis(x, 0, diag(ncol(x))) == rowSums(x*x))
+>         ##- Here, D^2 = usual squared Euclidean distances
+> 
+> Sx <- cov(x)
+> D2 <- mahalanobis(x, colMeans(x), Sx)
+> plot(density(D2, bw = 0.5),
++      main="Squared Mahalanobis distances, n=100, p=3") ; rug(D2)
+> qqplot(qchisq(ppoints(100), df = 3), D2,
++        main = expression("Q-Q plot of Mahalanobis" * ~D^2 *
++                          " vs. quantiles of" * ~ chi[3]^2))
+> abline(0, 1, col = 'gray')
+> 
+> 
+> 
+> cleanEx()
+> nameEx("make.link")
+> ### * make.link
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: make.link
+> ### Title: Create a Link for GLM Families
+> ### Aliases: make.link
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> utils::str(make.link("logit"))
+List of 5
+ $ linkfun :function (mu)  
+ $ linkinv :function (eta)  
+ $ mu.eta  :function (eta)  
+ $ valideta:function (eta)  
+ $ name    : chr "logit"
+ - attr(*, "class")= chr "link-glm"
+> 
+> 
+> 
+> cleanEx()
+> nameEx("makepredictcall")
+> ### * makepredictcall
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: makepredictcall
+> ### Title: Utility Function for Safe Prediction
+> ### Aliases: makepredictcall makepredictcall.default SafePrediction
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> ## using poly: this did not work in R < 1.5.0
+> fm <- lm(weight ~ poly(height, 2), data = women)
+> plot(women, xlab = "Height (in)", ylab = "Weight (lb)")
+> ht <- seq(57, 73, len = 200)
+> lines(ht, predict(fm, data.frame(height = ht)))
+> 
+> ## see also example(cars)
+> 
+> ## see bs and ns for spline examples.
+> 
+> 
+> 
+> cleanEx()
+> nameEx("manova")
+> ### * manova
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: manova
+> ### Title: Multivariate Analysis of Variance
+> ### Aliases: manova
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> ## Set orthogonal contrasts.
+> op <- options(contrasts = c("contr.helmert", "contr.poly"))
+> 
+> ## Fake a 2nd response variable
+> npk2 <- within(npk, foo <- rnorm(24))
+> ( npk2.aov <- manova(cbind(yield, foo) ~ block + N*P*K, npk2) )
+Call:
+   manova(cbind(yield, foo) ~ block + N * P * K, npk2)
+
+Terms:
+                   block        N        P        K      N:P      N:K      P:K
+resp 1          343.2950 189.2817   8.4017  95.2017  21.2817  33.1350   0.4817
+resp 2            2.9548   0.0223   1.3807   0.0097   2.7585   0.9724   5.5258
+Deg. of Freedom        5        1        1        1        1        1        1
+                Residuals
+resp 1           185.2867
+resp 2             7.8286
+Deg. of Freedom        12
+
+Residual standard errors: 3.929447 0.8077039
+1 out of 13 effects not estimable
+Estimated effects are balanced
+> summary(npk2.aov)
+          Df  Pillai approx F num Df den Df  Pr(>F)  
+block      5 0.89478   1.9430     10     24 0.08861 .
+N          1 0.50586   5.6304      2     11 0.02071 *
+P          1 0.17088   1.1336      2     11 0.35677  
+K          1 0.34430   2.8879      2     11 0.09815 .
+N:P        1 0.30158   2.3750      2     11 0.13888  
+N:K        1 0.21654   1.5201      2     11 0.26127  
+P:K        1 0.41992   3.9814      2     11 0.05003 .
+Residuals 12                                         
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> 
+> ( npk2.aovE <- manova(cbind(yield, foo) ~  N*P*K + Error(block), npk2) )
+
+Call:
+manova(cbind(yield, foo) ~ N * P * K + Error(block), npk2)
+
+Grand Means:
+     yield        foo 
+54.8750000  0.1498669 
+
+Stratum 1: block
+
+Terms:
+                    N:P:K Residuals
+resp 1           37.00167 306.29333
+resp 2            0.06988   2.88496
+Deg. of Freedom         1         4
+
+Residual standard errors: 8.750619 0.8492579
+Estimated effects are balanced
+
+Stratum 2: Within
+
+Terms:
+                        N         P         K       N:P       N:K       P:K
+resp 1          189.28167   8.40167  95.20167  21.28167  33.13500   0.48167
+resp 2            0.02235   1.38066   0.00966   2.75852   0.97240   5.52584
+Deg. of Freedom         1         1         1         1         1         1
+                Residuals
+resp 1          185.28667
+resp 2            7.82863
+Deg. of Freedom        12
+
+Residual standard errors: 3.929447 0.8077039
+Estimated effects are balanced
+> summary(npk2.aovE)
+
+Error: block
+          Df  Pillai approx F num Df den Df Pr(>F)
+N:P:K      1 0.20004   0.3751      2      3 0.7155
+Residuals  4                                      
+
+Error: Within
+          Df  Pillai approx F num Df den Df  Pr(>F)  
+N          1 0.50586   5.6304      2     11 0.02071 *
+P          1 0.17088   1.1336      2     11 0.35677  
+K          1 0.34430   2.8879      2     11 0.09815 .
+N:P        1 0.30158   2.3750      2     11 0.13888  
+N:K        1 0.21654   1.5201      2     11 0.26127  
+P:K        1 0.41992   3.9814      2     11 0.05003 .
+Residuals 12                                         
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> 
+> 
+> 
+> base::options(contrasts = c(unordered = "contr.treatment",ordered = "contr.poly"))
+> cleanEx()
+> nameEx("mantelhaen.test")
+> ### * mantelhaen.test
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: mantelhaen.test
+> ### Title: Cochran-Mantel-Haenszel Chi-Squared Test for Count Data
+> ### Aliases: mantelhaen.test
+> ### Keywords: htest
+> 
+> ### ** Examples
+> 
+> ## Agresti (1990), pages 231--237, Penicillin and Rabbits
+> ## Investigation of the effectiveness of immediately injected or 1.5
+> ##  hours delayed penicillin in protecting rabbits against a lethal
+> ##  injection with beta-hemolytic streptococci.
+> Rabbits <-
++ array(c(0, 0, 6, 5,
++         3, 0, 3, 6,
++         6, 2, 0, 4,
++         5, 6, 1, 0,
++         2, 5, 0, 0),
++       dim = c(2, 2, 5),
++       dimnames = list(
++           Delay = c("None", "1.5h"),
++           Response = c("Cured", "Died"),
++           Penicillin.Level = c("1/8", "1/4", "1/2", "1", "4")))
+> Rabbits
+, , Penicillin.Level = 1/8
+
+      Response
+Delay  Cured Died
+  None     0    6
+  1.5h     0    5
+
+, , Penicillin.Level = 1/4
+
+      Response
+Delay  Cured Died
+  None     3    3
+  1.5h     0    6
+
+, , Penicillin.Level = 1/2
+
+      Response
+Delay  Cured Died
+  None     6    0
+  1.5h     2    4
+
+, , Penicillin.Level = 1
+
+      Response
+Delay  Cured Died
+  None     5    1
+  1.5h     6    0
+
+, , Penicillin.Level = 4
+
+      Response
+Delay  Cured Died
+  None     2    0
+  1.5h     5    0
+
+> ## Classical Mantel-Haenszel test
+> mantelhaen.test(Rabbits)
+
+	Mantel-Haenszel chi-squared test with continuity correction
+
+data:  Rabbits
+Mantel-Haenszel X-squared = 3.9286, df = 1, p-value = 0.04747
+alternative hypothesis: true common odds ratio is not equal to 1
+95 percent confidence interval:
+  1.026713 47.725133
+sample estimates:
+common odds ratio 
+                7 
+
+> ## => p = 0.047, some evidence for higher cure rate of immediate
+> ##               injection
+> ## Exact conditional test
+> mantelhaen.test(Rabbits, exact = TRUE)
+
+	Exact conditional test of independence in 2 x 2 x k tables
+
+data:  Rabbits
+S = 16, p-value = 0.03994
+alternative hypothesis: true common odds ratio is not equal to 1
+95 percent confidence interval:
+   1.077401 529.837399
+sample estimates:
+common odds ratio 
+         10.36102 
+
+> ## => p - 0.040
+> ## Exact conditional test for one-sided alternative of a higher
+> ## cure rate for immediate injection
+> mantelhaen.test(Rabbits, exact = TRUE, alternative = "greater")
+
+	Exact conditional test of independence in 2 x 2 x k tables
+
+data:  Rabbits
+S = 16, p-value = 0.01997
+alternative hypothesis: true common odds ratio is greater than 1
+95 percent confidence interval:
+ 1.384239      Inf
+sample estimates:
+common odds ratio 
+         10.36102 
+
+> ## => p = 0.020
+> 
+> ## UC Berkeley Student Admissions
+> mantelhaen.test(UCBAdmissions)
+
+	Mantel-Haenszel chi-squared test with continuity correction
+
+data:  UCBAdmissions
+Mantel-Haenszel X-squared = 1.4269, df = 1, p-value = 0.2323
+alternative hypothesis: true common odds ratio is not equal to 1
+95 percent confidence interval:
+ 0.7719074 1.0603298
+sample estimates:
+common odds ratio 
+        0.9046968 
+
+> ## No evidence for association between admission and gender
+> ## when adjusted for department.  However,
+> apply(UCBAdmissions, 3, function(x) (x[1,1]*x[2,2])/(x[1,2]*x[2,1]))
+        A         B         C         D         E         F 
+0.3492120 0.8025007 1.1330596 0.9212838 1.2216312 0.8278727 
+> ## This suggests that the assumption of homogeneous (conditional)
+> ## odds ratios may be violated.  The traditional approach would be
+> ## using the Woolf test for interaction:
+> woolf <- function(x) {
++   x <- x + 1 / 2
++   k <- dim(x)[3]
++   or <- apply(x, 3, function(x) (x[1,1]*x[2,2])/(x[1,2]*x[2,1]))
++   w <-  apply(x, 3, function(x) 1 / sum(1 / x))
++   1 - pchisq(sum(w * (log(or) - weighted.mean(log(or), w)) ^ 2), k - 1)
++ }
+> woolf(UCBAdmissions)
+[1] 0.0034272
+> ## => p = 0.003, indicating that there is significant heterogeneity.
+> ## (And hence the Mantel-Haenszel test cannot be used.)
+> 
+> ## Agresti (2002), p. 287f and p. 297.
+> ## Job Satisfaction example.
+> Satisfaction <-
++     as.table(array(c(1, 2, 0, 0, 3, 3, 1, 2,
++                      11, 17, 8, 4, 2, 3, 5, 2,
++                      1, 0, 0, 0, 1, 3, 0, 1,
++                      2, 5, 7, 9, 1, 1, 3, 6),
++                    dim = c(4, 4, 2),
++                    dimnames =
++                    list(Income =
++                         c("<5000", "5000-15000",
++                           "15000-25000", ">25000"),
++                         "Job Satisfaction" =
++                         c("V_D", "L_S", "M_S", "V_S"),
++                         Gender = c("Female", "Male"))))
+> ## (Satisfaction categories abbreviated for convenience.)
+> ftable(. ~ Gender + Income, Satisfaction)
+                   Job Satisfaction V_D L_S M_S V_S
+Gender Income                                      
+Female <5000                          1   3  11   2
+       5000-15000                     2   3  17   3
+       15000-25000                    0   1   8   5
+       >25000                         0   2   4   2
+Male   <5000                          1   1   2   1
+       5000-15000                     0   3   5   1
+       15000-25000                    0   0   7   3
+       >25000                         0   1   9   6
+> ## Table 7.8 in Agresti (2002), p. 288.
+> mantelhaen.test(Satisfaction)
+
+	Cochran-Mantel-Haenszel test
+
+data:  Satisfaction
+Cochran-Mantel-Haenszel M^2 = 10.2, df = 9, p-value = 0.3345
+
+> ## See Table 7.12 in Agresti (2002), p. 297.
+> 
+> 
+> 
+> cleanEx()
+> nameEx("mauchly.test")
+> ### * mauchly.test
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: mauchly.test
+> ### Title: Mauchly's Test of Sphericity
+> ### Aliases: mauchly.test mauchly.test.SSD mauchly.test.mlm
+> ### Keywords: htest models multivariate
+> 
+> ### ** Examples
+> 
+> utils::example(SSD) # Brings in the mlmfit and reacttime objects
+
+SSD> # Lifted from Baron+Li:
+SSD> # "Notes on the use of R for psychology experiments and questionnaires"
+SSD> # Maxwell and Delaney, p. 497
+SSD> reacttime <- matrix(c(
+SSD+ 420, 420, 480, 480, 600, 780,
+SSD+ 420, 480, 480, 360, 480, 600,
+SSD+ 480, 480, 540, 660, 780, 780,
+SSD+ 420, 540, 540, 480, 780, 900,
+SSD+ 540, 660, 540, 480, 660, 720,
+SSD+ 360, 420, 360, 360, 480, 540,
+SSD+ 480, 480, 600, 540, 720, 840,
+SSD+ 480, 600, 660, 540, 720, 900,
+SSD+ 540, 600, 540, 480, 720, 780,
+SSD+ 480, 420, 540, 540, 660, 780),
+SSD+ ncol = 6, byrow = TRUE,
+SSD+ dimnames = list(subj = 1:10,
+SSD+               cond = c("deg0NA", "deg4NA", "deg8NA",
+SSD+                        "deg0NP", "deg4NP", "deg8NP")))
+
+SSD> mlmfit <- lm(reacttime ~ 1)
+
+SSD> SSD(mlmfit)
+$SSD
+        cond
+cond     deg0NA deg4NA deg8NA deg0NP deg4NP deg8NP
+  deg0NA  29160  30600  26640  23760  32400  25560
+  deg4NA  30600  66600  32400   7200  36000  30600
+  deg8NA  26640  32400  56160  41040  57600  69840
+  deg0NP  23760   7200  41040  70560  72000  63360
+  deg4NP  32400  36000  57600  72000 108000 100800
+  deg8NP  25560  30600  69840  63360 100800 122760
+
+$call
+lm(formula = reacttime ~ 1)
+
+$df
+[1] 9
+
+attr(,"class")
+[1] "SSD"
+
+SSD> estVar(mlmfit)
+        cond
+cond     deg0NA deg4NA deg8NA deg0NP deg4NP deg8NP
+  deg0NA   3240   3400   2960   2640   3600   2840
+  deg4NA   3400   7400   3600    800   4000   3400
+  deg8NA   2960   3600   6240   4560   6400   7760
+  deg0NP   2640    800   4560   7840   8000   7040
+  deg4NP   3600   4000   6400   8000  12000  11200
+  deg8NP   2840   3400   7760   7040  11200  13640
+> 
+> ### traditional test of intrasubj. contrasts
+> mauchly.test(mlmfit, X = ~1)
+
+	Mauchly's test of sphericity
+	Contrasts orthogonal to
+	~1
+
+
+data:  SSD matrix from lm(formula = reacttime ~ 1)
+W = 0.031084, p-value = 0.04765
+
+> 
+> ### tests using intra-subject 3x2 design
+> idata <- data.frame(deg = gl(3, 1, 6, labels = c(0,4,8)),
++                     noise = gl(2, 3, 6, labels = c("A","P")))
+> mauchly.test(mlmfit, X = ~ deg + noise, idata = idata)
+
+	Mauchly's test of sphericity
+	Contrasts orthogonal to
+	~deg + noise
+
+
+data:  SSD matrix from lm(formula = reacttime ~ 1)
+W = 0.89378, p-value = 0.6381
+
+> mauchly.test(mlmfit, M = ~ deg + noise, X = ~ noise, idata = idata)
+
+	Mauchly's test of sphericity
+	Contrasts orthogonal to
+	~noise
+
+	Contrasts spanned by
+	~deg + noise
+
+
+data:  SSD matrix from lm(formula = reacttime ~ 1)
+W = 0.96011, p-value = 0.8497
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("mcnemar.test")
+> ### * mcnemar.test
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: mcnemar.test
+> ### Title: McNemar's Chi-squared Test for Count Data
+> ### Aliases: mcnemar.test
+> ### Keywords: htest
+> 
+> ### ** Examples
+> 
+> ## Agresti (1990), p. 350.
+> ## Presidential Approval Ratings.
+> ##  Approval of the President's performance in office in two surveys,
+> ##  one month apart, for a random sample of 1600 voting-age Americans.
+> Performance <-
++ matrix(c(794, 86, 150, 570),
++        nrow = 2,
++        dimnames = list("1st Survey" = c("Approve", "Disapprove"),
++                        "2nd Survey" = c("Approve", "Disapprove")))
+> Performance
+            2nd Survey
+1st Survey   Approve Disapprove
+  Approve        794        150
+  Disapprove      86        570
+> mcnemar.test(Performance)
+
+	McNemar's Chi-squared test with continuity correction
+
+data:  Performance
+McNemar's chi-squared = 16.818, df = 1, p-value = 4.115e-05
+
+> ## => significant change (in fact, drop) in approval ratings
+> 
+> 
+> 
+> cleanEx()
+> nameEx("median")
+> ### * median
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: median
+> ### Title: Median Value
+> ### Aliases: median median.default
+> ### Keywords: univar robust
+> 
+> ### ** Examples
+> 
+> median(1:4)                # = 2.5 [even number]
+[1] 2.5
+> median(c(1:3, 100, 1000))  # = 3 [odd, robust]
+[1] 3
+> 
+> 
+> 
+> cleanEx()
+> nameEx("medpolish")
+> ### * medpolish
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: medpolish
+> ### Title: Median Polish (Robust Twoway Decomposition) of a Matrix
+> ### Aliases: medpolish
+> ### Keywords: robust
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> ## Deaths from sport parachuting;  from ABC of EDA, p.224:
+> deaths <-
++     rbind(c(14,15,14),
++           c( 7, 4, 7),
++           c( 8, 2,10),
++           c(15, 9,10),
++           c( 0, 2, 0))
+> dimnames(deaths) <- list(c("1-24", "25-74", "75-199", "200++", "NA"),
++                          paste(1973:1975))
+> deaths
+       1973 1974 1975
+1-24     14   15   14
+25-74     7    4    7
+75-199    8    2   10
+200++    15    9   10
+NA        0    2    0
+> (med.d <- medpolish(deaths))
+1: 19
+Final: 19
+
+Median Polish Results (Dataset: "deaths")
+
+Overall: 8
+
+Row Effects:
+  1-24  25-74 75-199  200++     NA 
+     6     -1      0      2     -8 
+
+Column Effects:
+1973 1974 1975 
+   0   -1    0 
+
+Residuals:
+       1973 1974 1975
+1-24      0    2    0
+25-74     0   -2    0
+75-199    0   -5    2
+200++     5    0    0
+NA        0    3    0
+
+> plot(med.d)
+> ## Check decomposition:
+> all(deaths ==
++     med.d$overall + outer(med.d$row,med.d$col, "+") + med.d$residuals)
+[1] TRUE
+> 
+> 
+> 
+> cleanEx()
+> nameEx("model.extract")
+> ### * model.extract
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: model.extract
+> ### Title: Extract Components from a Model Frame
+> ### Aliases: model.extract model.offset model.response model.weights
+> ### Keywords: manip programming models
+> 
+> ### ** Examples
+> 
+> a <- model.frame(cbind(ncases,ncontrols) ~ agegp + tobgp + alcgp, data = esoph)
+> model.extract(a, "response")
+   ncases ncontrols
+1       0        40
+2       0        10
+3       0         6
+4       0         5
+5       0        27
+6       0         7
+7       0         4
+8       0         7
+9       0         2
+10      0         1
+11      0         2
+12      0         1
+13      1         1
+14      0         1
+15      0         2
+16      0        60
+17      1        14
+18      0         7
+19      0         8
+20      0        35
+21      3        23
+22      1        14
+23      0         8
+24      0        11
+25      0         6
+26      0         2
+27      0         1
+28      2         3
+29      0         3
+30      2         4
+31      1        46
+32      0        18
+33      0        10
+34      0         4
+35      6        38
+36      4        21
+37      5        15
+38      5         7
+39      3        16
+40      6        14
+41      1         5
+42      2         4
+43      4         4
+44      3         4
+45      2         3
+46      4         4
+47      2        49
+48      3        22
+49      3        12
+50      4         6
+51      9        40
+52      6        21
+53      4        17
+54      3         6
+55      9        18
+56      8        15
+57      3         6
+58      4         4
+59      5        10
+60      6         7
+61      2         3
+62      5         6
+63      5        48
+64      4        14
+65      2         7
+66      0         2
+67     17        34
+68      3        10
+69      5         9
+70      6        13
+71      4        12
+72      2         3
+73      1         1
+74      3         4
+75      1         2
+76      1         1
+77      1         1
+78      1        18
+79      2         6
+80      1         3
+81      2         5
+82      1         3
+83      0         3
+84      1         1
+85      1         1
+86      1         1
+87      2         2
+88      1         1
+> stopifnot(model.extract(a, "response") == model.response(a))
+> 
+> a <- model.frame(ncases/(ncases+ncontrols) ~ agegp + tobgp + alcgp,
++                  data = esoph, weights = ncases+ncontrols)
+> model.response(a)
+         1          2          3          4          5          6          7 
+0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 
+         8          9         10         11         12         13         14 
+0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.50000000 0.00000000 
+        15         16         17         18         19         20         21 
+0.00000000 0.00000000 0.06666667 0.00000000 0.00000000 0.00000000 0.11538462 
+        22         23         24         25         26         27         28 
+0.06666667 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.40000000 
+        29         30         31         32         33         34         35 
+0.00000000 0.33333333 0.02127660 0.00000000 0.00000000 0.00000000 0.13636364 
+        36         37         38         39         40         41         42 
+0.16000000 0.25000000 0.41666667 0.15789474 0.30000000 0.16666667 0.33333333 
+        43         44         45         46         47         48         49 
+0.50000000 0.42857143 0.40000000 0.50000000 0.03921569 0.12000000 0.20000000 
+        50         51         52         53         54         55         56 
+0.40000000 0.18367347 0.22222222 0.19047619 0.33333333 0.33333333 0.34782609 
+        57         58         59         60         61         62         63 
+0.33333333 0.50000000 0.33333333 0.46153846 0.40000000 0.45454545 0.09433962 
+        64         65         66         67         68         69         70 
+0.22222222 0.22222222 0.00000000 0.33333333 0.23076923 0.35714286 0.31578947 
+        71         72         73         74         75         76         77 
+0.25000000 0.40000000 0.50000000 0.42857143 0.33333333 0.50000000 0.50000000 
+        78         79         80         81         82         83         84 
+0.05263158 0.25000000 0.25000000 0.28571429 0.25000000 0.00000000 0.50000000 
+        85         86         87         88 
+0.50000000 0.50000000 0.50000000 0.50000000 
+> model.extract(a, "weights")
+ 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 
+40 10  6  5 27  7  4  7  2  1  2  1  2  1  2 60 15  7  8 35 26 15  8 11  6  2 
+27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 
+ 1  5  3  6 47 18 10  4 44 25 20 12 19 20  6  6  8  7  5  8 51 25 15 10 49 27 
+53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 
+21  9 27 23  9  8 15 13  5 11 53 18  9  2 51 13 14 19 16  5  2  7  3  2  2 19 
+79 80 81 82 83 84 85 86 87 88 
+ 8  4  7  4  3  2  2  2  4  2 
+> 
+> a <- model.frame(cbind(ncases,ncontrols) ~ agegp,
++                  something = tobgp, data = esoph)
+> names(a)
+[1] "cbind(ncases, ncontrols)" "agegp"                   
+[3] "(something)"             
+> stopifnot(model.extract(a, "something") == esoph$tobgp)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("model.frame")
+> ### * model.frame
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: model.frame
+> ### Title: Extracting the Model Frame from a Formula or Fit
+> ### Aliases: model.frame model.frame.default model.frame.lm model.frame.glm
+> ###   model.frame.aovlist get_all_vars
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> data.class(model.frame(dist ~ speed, data = cars))
+[1] "data.frame"
+> 
+> 
+> 
+> cleanEx()
+> nameEx("model.matrix")
+> ### * model.matrix
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: model.matrix
+> ### Title: Construct Design Matrices
+> ### Aliases: model.matrix model.matrix.default model.matrix.lm
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> ff <- log(Volume) ~ log(Height) + log(Girth)
+> utils::str(m <- model.frame(ff, trees))
+'data.frame':	31 obs. of  3 variables:
+ $ log(Volume): num  2.33 2.33 2.32 2.8 2.93 ...
+ $ log(Height): num  4.25 4.17 4.14 4.28 4.39 ...
+ $ log(Girth) : num  2.12 2.15 2.17 2.35 2.37 ...
+ - attr(*, "terms")=Classes 'terms', 'formula'  language log(Volume) ~ log(Height) + log(Girth)
+  .. ..- attr(*, "variables")= language list(log(Volume), log(Height), log(Girth))
+  .. ..- attr(*, "factors")= int [1:3, 1:2] 0 1 0 0 0 1
+  .. .. ..- attr(*, "dimnames")=List of 2
+  .. .. .. ..$ : chr [1:3] "log(Volume)" "log(Height)" "log(Girth)"
+  .. .. .. ..$ : chr [1:2] "log(Height)" "log(Girth)"
+  .. ..- attr(*, "term.labels")= chr [1:2] "log(Height)" "log(Girth)"
+  .. ..- attr(*, "order")= int [1:2] 1 1
+  .. ..- attr(*, "intercept")= int 1
+  .. ..- attr(*, "response")= int 1
+  .. ..- attr(*, ".Environment")=<environment: R_GlobalEnv> 
+  .. ..- attr(*, "predvars")= language list(log(Volume), log(Height), log(Girth))
+  .. ..- attr(*, "dataClasses")= Named chr [1:3] "numeric" "numeric" "numeric"
+  .. .. ..- attr(*, "names")= chr [1:3] "log(Volume)" "log(Height)" "log(Girth)"
+> mat <- model.matrix(ff, m)
+> 
+> dd <- data.frame(a = gl(3,4), b = gl(4,1,12)) # balanced 2-way
+> options("contrasts")
+$contrasts
+        unordered           ordered 
+"contr.treatment"      "contr.poly" 
+
+> model.matrix(~ a + b, dd)
+   (Intercept) a2 a3 b2 b3 b4
+1            1  0  0  0  0  0
+2            1  0  0  1  0  0
+3            1  0  0  0  1  0
+4            1  0  0  0  0  1
+5            1  1  0  0  0  0
+6            1  1  0  1  0  0
+7            1  1  0  0  1  0
+8            1  1  0  0  0  1
+9            1  0  1  0  0  0
+10           1  0  1  1  0  0
+11           1  0  1  0  1  0
+12           1  0  1  0  0  1
+attr(,"assign")
+[1] 0 1 1 2 2 2
+attr(,"contrasts")
+attr(,"contrasts")$a
+[1] "contr.treatment"
+
+attr(,"contrasts")$b
+[1] "contr.treatment"
+
+> model.matrix(~ a + b, dd, contrasts = list(a = "contr.sum"))
+   (Intercept) a1 a2 b2 b3 b4
+1            1  1  0  0  0  0
+2            1  1  0  1  0  0
+3            1  1  0  0  1  0
+4            1  1  0  0  0  1
+5            1  0  1  0  0  0
+6            1  0  1  1  0  0
+7            1  0  1  0  1  0
+8            1  0  1  0  0  1
+9            1 -1 -1  0  0  0
+10           1 -1 -1  1  0  0
+11           1 -1 -1  0  1  0
+12           1 -1 -1  0  0  1
+attr(,"assign")
+[1] 0 1 1 2 2 2
+attr(,"contrasts")
+attr(,"contrasts")$a
+[1] "contr.sum"
+
+attr(,"contrasts")$b
+[1] "contr.treatment"
+
+> model.matrix(~ a + b, dd, contrasts = list(a = "contr.sum", b = "contr.poly"))
+   (Intercept) a1 a2        b.L  b.Q        b.C
+1            1  1  0 -0.6708204  0.5 -0.2236068
+2            1  1  0 -0.2236068 -0.5  0.6708204
+3            1  1  0  0.2236068 -0.5 -0.6708204
+4            1  1  0  0.6708204  0.5  0.2236068
+5            1  0  1 -0.6708204  0.5 -0.2236068
+6            1  0  1 -0.2236068 -0.5  0.6708204
+7            1  0  1  0.2236068 -0.5 -0.6708204
+8            1  0  1  0.6708204  0.5  0.2236068
+9            1 -1 -1 -0.6708204  0.5 -0.2236068
+10           1 -1 -1 -0.2236068 -0.5  0.6708204
+11           1 -1 -1  0.2236068 -0.5 -0.6708204
+12           1 -1 -1  0.6708204  0.5  0.2236068
+attr(,"assign")
+[1] 0 1 1 2 2 2
+attr(,"contrasts")
+attr(,"contrasts")$a
+[1] "contr.sum"
+
+attr(,"contrasts")$b
+[1] "contr.poly"
+
+> m.orth <- model.matrix(~a+b, dd, contrasts = list(a = "contr.helmert"))
+> crossprod(m.orth) # m.orth is  ALMOST  orthogonal
+            (Intercept) a1 a2 b2 b3 b4
+(Intercept)          12  0  0  3  3  3
+a1                    0  8  0  0  0  0
+a2                    0  0 24  0  0  0
+b2                    3  0  0  3  0  0
+b3                    3  0  0  0  3  0
+b4                    3  0  0  0  0  3
+> 
+> 
+> 
+> cleanEx()
+> nameEx("model.tables")
+> ### * model.tables
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: model.tables
+> ### Title: Compute Tables of Results from an Aov Model Fit
+> ### Aliases: model.tables model.tables.aov model.tables.aovlist
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> 
+> cleanEx()
+> nameEx("monthplot")
+> ### * monthplot
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: monthplot
+> ### Title: Plot a Seasonal or other Subseries from a Time Series
+> ### Aliases: monthplot monthplot.default monthplot.ts monthplot.stl
+> ###   monthplot.StructTS
+> ### Keywords: hplot ts
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> ## The CO2 data
+> fit <- stl(log(co2), s.window = 20, t.window = 20)
+> plot(fit)
+> op <- par(mfrow = c(2,2))
+> monthplot(co2, ylab = "data", cex.axis = 0.8)
+> monthplot(fit, choice = "seasonal", cex.axis = 0.8)
+> monthplot(fit, choice = "trend", cex.axis = 0.8)
+> monthplot(fit, choice = "remainder", type = "h", cex.axis = 0.8)
+> par(op)
+> 
+> ## The CO2 data, grouped quarterly
+> quarter <- (cycle(co2) - 1) %/% 3
+> monthplot(co2, phase = quarter)
+> 
+> ## see also JohnsonJohnson
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("mood.test")
+> ### * mood.test
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: mood.test
+> ### Title: Mood Two-Sample Test of Scale
+> ### Aliases: mood.test mood.test.default mood.test.formula
+> ### Keywords: htest
+> 
+> ### ** Examples
+> 
+> ## Same data as for the Ansari-Bradley test:
+> ## Serum iron determination using Hyland control sera
+> ramsay <- c(111, 107, 100, 99, 102, 106, 109, 108, 104, 99,
++             101, 96, 97, 102, 107, 113, 116, 113, 110, 98)
+> jung.parekh <- c(107, 108, 106, 98, 105, 103, 110, 105, 104,
++             100, 96, 108, 103, 104, 114, 114, 113, 108, 106, 99)
+> mood.test(ramsay, jung.parekh)
+
+	Mood two-sample test of scale
+
+data:  ramsay and jung.parekh
+Z = 1.0371, p-value = 0.2997
+alternative hypothesis: two.sided
+
+> ## Compare this to ansari.test(ramsay, jung.parekh)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("na.action")
+> ### * na.action
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: na.action
+> ### Title: NA Action
+> ### Aliases: na.action na.action.default
+> ### Keywords: NA methods
+> 
+> ### ** Examples
+> 
+> na.action(na.omit(c(1, NA)))
+[1] 2
+attr(,"class")
+[1] "omit"
+> 
+> 
+> 
+> cleanEx()
+> nameEx("na.contiguous")
+> ### * na.contiguous
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: na.contiguous
+> ### Title: Find Longest Contiguous Stretch of non-NAs
+> ### Aliases: na.contiguous na.contiguous.default
+> ### Keywords: ts
+> 
+> ### ** Examples
+> 
+> na.contiguous(presidents)
+     Qtr1 Qtr2 Qtr3 Qtr4
+1952                  32
+1953   59   74   75   60
+1954   71   61   71   57
+1955   71   68   79   73
+1956   76   71   67   75
+1957   79   62   63   57
+1958   60   49   48   52
+1959   57   62   61   66
+1960   71   62   61   57
+1961   72   83   71   78
+1962   79   71   62   74
+1963   76   64   62   57
+1964   80   73   69   69
+1965   71   64   69   62
+1966   63   46   56   44
+1967   44   52   38   46
+1968   36   49   35   44
+1969   59   65   65   56
+1970   66   53   61   52
+1971   51   48   54   49
+1972   49   61          
+> 
+> 
+> 
+> cleanEx()
+> nameEx("na.fail")
+> ### * na.fail
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: na.fail
+> ### Title: Handle Missing Values in Objects
+> ### Aliases: na.fail na.fail.default na.omit na.omit.data.frame
+> ###   na.omit.default na.exclude na.exclude.data.frame na.exclude.default
+> ###   na.pass
+> ### Keywords: NA
+> 
+> ### ** Examples
+> 
+> DF <- data.frame(x = c(1, 2, 3), y = c(0, 10, NA))
+> na.omit(DF)
+  x  y
+1 1  0
+2 2 10
+> m <- as.matrix(DF)
+> na.omit(m)
+     x  y
+[1,] 1  0
+[2,] 2 10
+attr(,"na.action")
+[1] 3
+attr(,"class")
+[1] "omit"
+> stopifnot(all(na.omit(1:3) == 1:3))  # does not affect objects with no NA's
+> try(na.fail(DF))   #> Error: missing values in ...
+Error in na.fail.default(DF) : missing values in object
+> 
+> options("na.action")
+$na.action
+[1] "na.omit"
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("nextn")
+> ### * nextn
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: nextn
+> ### Title: Highly Composite Numbers
+> ### Aliases: nextn
+> ### Keywords: math
+> 
+> ### ** Examples
+> 
+> nextn(1001) # 1024
+[1] 1024
+> table(sapply(599:630, nextn))
+
+600 625 640 
+  2  25   5 
+> 
+> 
+> 
+> cleanEx()
+> nameEx("nlm")
+> ### * nlm
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: nlm
+> ### Title: Non-Linear Minimization
+> ### Aliases: nlm
+> ### Keywords: nonlinear optimize
+> 
+> ### ** Examples
+> 
+> f <- function(x) sum((x-1:length(x))^2)
+> nlm(f, c(10,10))
+$minimum
+[1] 4.303458e-26
+
+$estimate
+[1] 1 2
+
+$gradient
+[1]  2.757794e-13 -3.099743e-13
+
+$code
+[1] 1
+
+$iterations
+[1] 2
+
+> nlm(f, c(10,10), print.level = 2)
+iteration = 0
+Step:
+[1] 0 0
+Parameter:
+[1] 10 10
+Function Value
+[1] 145
+Gradient:
+[1] 18.00001 16.00001
+
+iteration = 1
+Step:
+[1] -9 -8
+Parameter:
+[1] 1 2
+Function Value
+[1] 1.721748e-13
+Gradient:
+[1] 1.551336e-06 1.379735e-06
+
+iteration = 2
+Parameter:
+[1] 1 2
+Function Value
+[1] 4.303458e-26
+Gradient:
+[1]  2.757794e-13 -3.099743e-13
+
+Relative gradient close to zero.
+Current iterate is probably solution.
+
+$minimum
+[1] 4.303458e-26
+
+$estimate
+[1] 1 2
+
+$gradient
+[1]  2.757794e-13 -3.099743e-13
+
+$code
+[1] 1
+
+$iterations
+[1] 2
+
+> utils::str(nlm(f, c(5), hessian = TRUE))
+List of 6
+ $ minimum   : num 2.44e-24
+ $ estimate  : num 1
+ $ gradient  : num 1e-06
+ $ hessian   : num [1, 1] 2
+ $ code      : int 1
+ $ iterations: int 1
+> 
+> f <- function(x, a) sum((x-a)^2)
+> nlm(f, c(10,10), a = c(3,5))
+$minimum
+[1] 3.371781e-25
+
+$estimate
+[1] 3 5
+
+$gradient
+[1]  6.750156e-13 -9.450218e-13
+
+$code
+[1] 1
+
+$iterations
+[1] 2
+
+> f <- function(x, a)
++ {
++     res <- sum((x-a)^2)
++     attr(res, "gradient") <- 2*(x-a)
++     res
++ }
+> nlm(f, c(10,10), a = c(3,5))
+$minimum
+[1] 0
+
+$estimate
+[1] 3 5
+
+$gradient
+[1] 0 0
+
+$code
+[1] 1
+
+$iterations
+[1] 1
+
+> 
+> ## more examples, including the use of derivatives.
+> ## Not run: demo(nlm)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("nlminb")
+> ### * nlminb
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: nlminb
+> ### Title: Optimization using PORT routines
+> ### Aliases: nlminb
+> ### Keywords: optimize
+> 
+> ### ** Examples
+> 
+> 
+> cleanEx()
+> nameEx("nls")
+> ### * nls
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: nls
+> ### Title: Nonlinear Least Squares
+> ### Aliases: nls
+> ### Keywords: nonlinear regression models
+> 
+> ### ** Examples
+> 
+> ## Don't show: 
+> od <- options(digits=5)
+> ## End(Don't show)
+> require(graphics)
+> 
+> DNase1 <- subset(DNase, Run == 1)
+> 
+> ## using a selfStart model
+> fm1DNase1 <- nls(density ~ SSlogis(log(conc), Asym, xmid, scal), DNase1)
+> summary(fm1DNase1)
+
+Formula: density ~ SSlogis(log(conc), Asym, xmid, scal)
+
+Parameters:
+     Estimate Std. Error t value Pr(>|t|)    
+Asym   2.3452     0.0782    30.0  2.2e-13 ***
+xmid   1.4831     0.0814    18.2  1.2e-10 ***
+scal   1.0415     0.0323    32.3  8.5e-14 ***
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Residual standard error: 0.0192 on 13 degrees of freedom
+
+> ## the coefficients only:
+> coef(fm1DNase1)
+  Asym   xmid   scal 
+2.3452 1.4831 1.0415 
+> ## including their SE, etc:
+> coef(summary(fm1DNase1))
+     Estimate Std. Error t value   Pr(>|t|)
+Asym   2.3452   0.078154  30.007 2.1655e-13
+xmid   1.4831   0.081353  18.230 1.2185e-10
+scal   1.0415   0.032271  32.272 8.5069e-14
+> 
+> ## using conditional linearity
+> fm2DNase1 <- nls(density ~ 1/(1 + exp((xmid - log(conc))/scal)),
++                  data = DNase1,
++                  start = list(xmid = 0, scal = 1),
++                  algorithm = "plinear")
+> summary(fm2DNase1)
+
+Formula: density ~ 1/(1 + exp((xmid - log(conc))/scal))
+
+Parameters:
+     Estimate Std. Error t value Pr(>|t|)    
+xmid   1.4831     0.0814    18.2  1.2e-10 ***
+scal   1.0415     0.0323    32.3  8.5e-14 ***
+.lin   2.3452     0.0782    30.0  2.2e-13 ***
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Residual standard error: 0.0192 on 13 degrees of freedom
+
+> 
+> ## without conditional linearity
+> fm3DNase1 <- nls(density ~ Asym/(1 + exp((xmid - log(conc))/scal)),
++                  data = DNase1,
++                  start = list(Asym = 3, xmid = 0, scal = 1))
+> summary(fm3DNase1)
+
+Formula: density ~ Asym/(1 + exp((xmid - log(conc))/scal))
+
+Parameters:
+     Estimate Std. Error t value Pr(>|t|)    
+Asym   2.3452     0.0782    30.0  2.2e-13 ***
+xmid   1.4831     0.0814    18.2  1.2e-10 ***
+scal   1.0415     0.0323    32.3  8.5e-14 ***
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Residual standard error: 0.0192 on 13 degrees of freedom
+
+> 
+> ## using Port's nl2sol algorithm
+> fm4DNase1 <- nls(density ~ Asym/(1 + exp((xmid - log(conc))/scal)),
++                  data = DNase1,
++                  start = list(Asym = 3, xmid = 0, scal = 1),
++                  algorithm = "port")
+> summary(fm4DNase1)
+
+Formula: density ~ Asym/(1 + exp((xmid - log(conc))/scal))
+
+Parameters:
+     Estimate Std. Error t value Pr(>|t|)    
+Asym   2.3452     0.0782    30.0  2.2e-13 ***
+xmid   1.4831     0.0814    18.2  1.2e-10 ***
+scal   1.0415     0.0323    32.3  8.5e-14 ***
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Residual standard error: 0.0192 on 13 degrees of freedom
+
+Algorithm "port", convergence message: relative convergence (4)
+
+> 
+> ## weighted nonlinear regression
+> Treated <- Puromycin[Puromycin$state == "treated", ]
+> weighted.MM <- function(resp, conc, Vm, K)
++ {
++     ## Purpose: exactly as white book p. 451 -- RHS for nls()
++     ##  Weighted version of Michaelis-Menten model
++     ## ----------------------------------------------------------
++     ## Arguments: 'y', 'x' and the two parameters (see book)
++     ## ----------------------------------------------------------
++     ## Author: Martin Maechler, Date: 23 Mar 2001
++ 
++     pred <- (Vm * conc)/(K + conc)
++     (resp - pred) / sqrt(pred)
++ }
+> 
+> Pur.wt <- nls( ~ weighted.MM(rate, conc, Vm, K), data = Treated,
++               start = list(Vm = 200, K = 0.1))
+> summary(Pur.wt)
+
+Formula: 0 ~ weighted.MM(rate, conc, Vm, K)
+
+Parameters:
+   Estimate Std. Error t value Pr(>|t|)    
+Vm 2.07e+02   9.22e+00   22.42  7.0e-10 ***
+K  5.46e-02   7.98e-03    6.84  4.5e-05 ***
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Residual standard error: 1.21 on 10 degrees of freedom
+
+> 
+> ## Passing arguments using a list that can not be coerced to a data.frame
+> lisTreat <- with(Treated,
++                  list(conc1 = conc[1], conc.1 = conc[-1], rate = rate))
+> 
+> weighted.MM1 <- function(resp, conc1, conc.1, Vm, K)
++ {
++      conc <- c(conc1, conc.1)
++      pred <- (Vm * conc)/(K + conc)
++     (resp - pred) / sqrt(pred)
++ }
+> Pur.wt1 <- nls( ~ weighted.MM1(rate, conc1, conc.1, Vm, K),
++                data = lisTreat, start = list(Vm = 200, K = 0.1))
+> stopifnot(all.equal(coef(Pur.wt), coef(Pur.wt1)))
+> 
+> ## Chambers and Hastie (1992) Statistical Models in S  (p. 537):
+> ## If the value of the right side [of formula] has an attribute called
+> ## 'gradient' this should be a matrix with the number of rows equal
+> ## to the length of the response and one column for each parameter.
+> 
+> weighted.MM.grad <- function(resp, conc1, conc.1, Vm, K)
++ {
++   conc <- c(conc1, conc.1)
++ 
++   K.conc <- K+conc
++   dy.dV <- conc/K.conc
++   dy.dK <- -Vm*dy.dV/K.conc
++   pred <- Vm*dy.dV
++   pred.5 <- sqrt(pred)
++   dev <- (resp - pred) / pred.5
++   Ddev <- -0.5*(resp+pred)/(pred.5*pred)
++   attr(dev, "gradient") <- Ddev * cbind(Vm = dy.dV, K = dy.dK)
++   dev
++ }
+> 
+> Pur.wt.grad <- nls( ~ weighted.MM.grad(rate, conc1, conc.1, Vm, K),
++                    data = lisTreat, start = list(Vm = 200, K = 0.1))
+> 
+> rbind(coef(Pur.wt), coef(Pur.wt1), coef(Pur.wt.grad))
+         Vm        K
+[1,] 206.83 0.054611
+[2,] 206.83 0.054611
+[3,] 206.83 0.054611
+> 
+> ## In this example, there seems no advantage to providing the gradient.
+> ## In other cases, there might be.
+> 
+> 
+> ## The two examples below show that you can fit a model to
+> ## artificial data with noise but not to artificial data
+> ## without noise.
+> x <- 1:10
+> y <- 2*x + 3                            # perfect fit
+> yeps <- y + rnorm(length(y), sd = 0.01) # added noise
+> nls(yeps ~ a + b*x, start = list(a = 0.12345, b = 0.54321))
+Nonlinear regression model
+  model: yeps ~ a + b * x
+   data: parent.frame()
+a b 
+3 2 
+ residual sum-of-squares: 0.000524
+> ## terminates in an error, because convergence cannot be confirmed:
+> try(nls(y ~ a + b*x, start = list(a = 0.12345, b = 0.54321)))
+Error in nls(y ~ a + b * x, start = list(a = 0.12345, b = 0.54321)) : 
+  number of iterations exceeded maximum of 50
+> 
+> ## the nls() internal cheap guess for starting values can be sufficient:
+> 
+> x <- -(1:100)/10
+> y <- 100 + 10 * exp(x / 2) + rnorm(x)/10
+> nlmod <- nls(y ~  Const + A * exp(B * x))
+Warning in nls(y ~ Const + A * exp(B * x)) :
+  No starting values specified for some parameters.
+Initializing ‘Const’, ‘A’, ‘B’ to '1.'.
+Consider specifying 'start' or using a selfStart model
+> 
+> plot(x,y, main = "nls(*), data, true function and fit, n=100")
+> curve(100 + 10 * exp(x / 2), col = 4, add = TRUE)
+> lines(x, predict(nlmod), col = 2)
+> 
+> 
+> ## Don't show: 
+> options(od)
+> ## End(Don't show)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("nls.control")
+> ### * nls.control
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: nls.control
+> ### Title: Control the Iterations in nls
+> ### Aliases: nls.control
+> ### Keywords: nonlinear regression models
+> 
+> ### ** Examples
+> 
+> nls.control(minFactor = 1/2048)
+$maxiter
+[1] 50
+
+$tol
+[1] 1e-05
+
+$minFactor
+[1] 0.0004882812
+
+$printEval
+[1] FALSE
+
+$warnOnly
+[1] FALSE
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("numericDeriv")
+> ### * numericDeriv
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: numericDeriv
+> ### Title: Evaluate Derivatives Numerically
+> ### Aliases: numericDeriv
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> ## Don't show: 
+> od <- options(digits = 4)
+> ## End(Don't show)
+> myenv <- new.env()
+> assign("mean", 0., envir = myenv)
+> assign("sd", 1., envir = myenv)
+> assign("x", seq(-3., 3., len = 31), envir = myenv)
+> numericDeriv(quote(pnorm(x, mean, sd)), c("mean", "sd"), myenv)
+ [1] 0.001350 0.002555 0.004661 0.008198 0.013903 0.022750 0.035930 0.054799
+ [9] 0.080757 0.115070 0.158655 0.211855 0.274253 0.344578 0.420740 0.500000
+[17] 0.579260 0.655422 0.725747 0.788145 0.841345 0.884930 0.919243 0.945201
+[25] 0.964070 0.977250 0.986097 0.991802 0.995339 0.997445 0.998650
+attr(,"gradient")
+           [,1]     [,2]
+ [1,] -0.004432  0.01330
+ [2,] -0.007915  0.02216
+ [3,] -0.013583  0.03532
+ [4,] -0.022395  0.05375
+ [5,] -0.035475  0.07804
+ [6,] -0.053991  0.10798
+ [7,] -0.078950  0.14211
+ [8,] -0.110921  0.17747
+ [9,] -0.149727  0.20962
+[10,] -0.194186  0.23302
+[11,] -0.241971  0.24197
+[12,] -0.289692  0.23175
+[13,] -0.333225  0.19993
+[14,] -0.368270  0.14731
+[15,] -0.391043  0.07821
+[16,] -0.398942  0.00000
+[17,] -0.391043 -0.07821
+[18,] -0.368270 -0.14731
+[19,] -0.333225 -0.19993
+[20,] -0.289692 -0.23175
+[21,] -0.241971 -0.24197
+[22,] -0.194186 -0.23302
+[23,] -0.149727 -0.20962
+[24,] -0.110921 -0.17747
+[25,] -0.078950 -0.14211
+[26,] -0.053991 -0.10798
+[27,] -0.035475 -0.07804
+[28,] -0.022395 -0.05375
+[29,] -0.013583 -0.03532
+[30,] -0.007915 -0.02216
+[31,] -0.004432 -0.01330
+> ## Don't show: 
+> options(od)
+> ## End(Don't show)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("oneway.test")
+> ### * oneway.test
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: oneway.test
+> ### Title: Test for Equal Means in a One-Way Layout
+> ### Aliases: oneway.test
+> ### Keywords: htest
+> 
+> ### ** Examples
+> 
+> ## Not assuming equal variances
+> oneway.test(extra ~ group, data = sleep)
+
+	One-way analysis of means (not assuming equal variances)
+
+data:  extra and group
+F = 3.4626, num df = 1.000, denom df = 17.776, p-value = 0.07939
+
+> ## Assuming equal variances
+> oneway.test(extra ~ group, data = sleep, var.equal = TRUE)
+
+	One-way analysis of means
+
+data:  extra and group
+F = 3.4626, num df = 1, denom df = 18, p-value = 0.07919
+
+> ## which gives the same result as
+> anova(lm(extra ~ group, data = sleep))
+Analysis of Variance Table
+
+Response: extra
+          Df Sum Sq Mean Sq F value  Pr(>F)  
+group      1 12.482 12.4820  3.4626 0.07919 .
+Residuals 18 64.886  3.6048                  
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> 
+> 
+> 
+> cleanEx()
+> nameEx("optim")
+> ### * optim
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: optim
+> ### Title: General-purpose Optimization
+> ### Aliases: optim optimHess
+> ### Keywords: nonlinear optimize
+> 
+> ### ** Examples
+> 
+> 
+> cleanEx()
+> nameEx("optimize")
+> ### * optimize
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: optimize
+> ### Title: One Dimensional Optimization
+> ### Aliases: optimize optimise
+> ### Keywords: optimize
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> f <- function (x, a) (x - a)^2
+> xmin <- optimize(f, c(0, 1), tol = 0.0001, a = 1/3)
+> xmin
+$minimum
+[1] 0.3333333
+
+$objective
+[1] 0
+
+> 
+> ## See where the function is evaluated:
+> optimize(function(x) x^2*(print(x)-1), lower = 0, upper = 10)
+[1] 3.81966
+[1] 6.18034
+[1] 2.36068
+[1] 2.077939
+[1] 1.505823
+[1] 0.9306496
+[1] 0.9196752
+[1] 0.772905
+[1] 0.4776816
+[1] 0.6491436
+[1] 0.656315
+[1] 0.6653777
+[1] 0.6667786
+[1] 0.6666728
+[1] 0.6666321
+[1] 0.6667135
+[1] 0.6666728
+$minimum
+[1] 0.6666728
+
+$objective
+[1] -0.1481481
+
+> 
+> ## "wrong" solution with unlucky interval and piecewise constant f():
+> f  <- function(x) ifelse(x > -1, ifelse(x < 4, exp(-1/abs(x - 1)), 10), 10)
+> fp <- function(x) { print(x); f(x) }
+> 
+> plot(f, -2,5, ylim = 0:1, col = 2)
+> optimize(fp, c(-4, 20))   # doesn't see the minimum
+[1] 5.167184
+[1] 10.83282
+[1] 14.33437
+[1] 16.49845
+[1] 17.83592
+[1] 18.66253
+[1] 19.1734
+[1] 19.48913
+[1] 19.68427
+[1] 19.80487
+[1] 19.8794
+[1] 19.92547
+[1] 19.95393
+[1] 19.97153
+[1] 19.9824
+[1] 19.98913
+[1] 19.99328
+[1] 19.99585
+[1] 19.99743
+[1] 19.99841
+[1] 19.99902
+[1] 19.99939
+[1] 19.99963
+[1] 19.99977
+[1] 19.99986
+[1] 19.99991
+[1] 19.99995
+[1] 19.99995
+$minimum
+[1] 19.99995
+
+$objective
+[1] 10
+
+> optimize(fp, c(-7, 20))   # ok
+[1] 3.313082
+[1] 9.686918
+[1] -0.6261646
+[1] 1.244956
+[1] 1.250965
+[1] 0.771827
+[1] 0.2378417
+[1] 1.000451
+[1] 0.9906964
+[1] 0.9955736
+[1] 0.9980122
+[1] 0.9992315
+[1] 0.9998411
+[1] 0.9996083
+[1] 0.9994644
+[1] 0.9993754
+[1] 0.9993204
+[1] 0.9992797
+[1] 0.9992797
+$minimum
+[1] 0.9992797
+
+$objective
+[1] 0
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("order.dendrogram")
+> ### * order.dendrogram
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: order.dendrogram
+> ### Title: Ordering or Labels of the Leaves in a Dendrogram
+> ### Aliases: order.dendrogram labels.dendrogram
+> ### Keywords: manip
+> 
+> ### ** Examples
+> 
+> set.seed(123)
+> x <- rnorm(10)
+> hc <- hclust(dist(x))
+> hc$order
+ [1]  3  6  7  2  4  5  8  9  1 10
+> dd <- as.dendrogram(hc)
+> order.dendrogram(dd) ## the same :
+ [1]  3  6  7  2  4  5  8  9  1 10
+> stopifnot(hc$order == order.dendrogram(dd))
+> 
+> d2 <- as.dendrogram(hclust(dist(USArrests)))
+> labels(d2) ## in this case the same as
+ [1] "Florida"        "North Carolina" "Delaware"       "Alabama"       
+ [5] "Louisiana"      "Alaska"         "Mississippi"    "South Carolina"
+ [9] "Maryland"       "Arizona"        "New Mexico"     "California"    
+[13] "Illinois"       "New York"       "Michigan"       "Nevada"        
+[17] "Missouri"       "Arkansas"       "Tennessee"      "Georgia"       
+[21] "Colorado"       "Texas"          "Rhode Island"   "Wyoming"       
+[25] "Oregon"         "Oklahoma"       "Virginia"       "Washington"    
+[29] "Massachusetts"  "New Jersey"     "Ohio"           "Utah"          
+[33] "Connecticut"    "Pennsylvania"   "Nebraska"       "Kentucky"      
+[37] "Montana"        "Idaho"          "Indiana"        "Kansas"        
+[41] "Hawaii"         "Minnesota"      "Wisconsin"      "Iowa"          
+[45] "New Hampshire"  "West Virginia"  "Maine"          "South Dakota"  
+[49] "North Dakota"   "Vermont"       
+> stopifnot(identical(labels(d2),
++    rownames(USArrests)[order.dendrogram(d2)]))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("p.adjust")
+> ### * p.adjust
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: p.adjust
+> ### Title: Adjust P-values for Multiple Comparisons
+> ### Aliases: p.adjust p.adjust.methods
+> ### Keywords: htest
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> set.seed(123)
+> x <- rnorm(50, mean = c(rep(0, 25), rep(3, 25)))
+> p <- 2*pnorm(sort(-abs(x)))
+> 
+> round(p, 3)
+ [1] 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.001 0.002
+[13] 0.003 0.004 0.005 0.007 0.007 0.009 0.009 0.011 0.021 0.049 0.061 0.063
+[25] 0.074 0.083 0.086 0.119 0.189 0.206 0.221 0.286 0.305 0.466 0.483 0.492
+[37] 0.532 0.575 0.578 0.619 0.636 0.645 0.656 0.689 0.719 0.818 0.827 0.897
+[49] 0.912 0.944
+> round(p.adjust(p), 3)
+ [1] 0.000 0.001 0.001 0.005 0.005 0.006 0.006 0.007 0.009 0.016 0.024 0.063
+[13] 0.125 0.131 0.189 0.239 0.240 0.291 0.301 0.350 0.635 1.000 1.000 1.000
+[25] 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000
+[37] 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000
+[49] 1.000 1.000
+> round(p.adjust(p, "BH"), 3)
+ [1] 0.000 0.000 0.000 0.001 0.001 0.001 0.001 0.001 0.001 0.002 0.003 0.007
+[13] 0.013 0.013 0.017 0.021 0.021 0.024 0.025 0.028 0.050 0.112 0.130 0.130
+[25] 0.148 0.159 0.160 0.213 0.326 0.343 0.356 0.446 0.462 0.684 0.684 0.684
+[37] 0.719 0.741 0.741 0.763 0.763 0.763 0.763 0.782 0.799 0.880 0.880 0.930
+[49] 0.930 0.944
+> 
+> ## or all of them at once (dropping the "fdr" alias):
+> p.adjust.M <- p.adjust.methods[p.adjust.methods != "fdr"]
+> p.adj    <- sapply(p.adjust.M, function(meth) p.adjust(p, meth))
+> p.adj.60 <- sapply(p.adjust.M, function(meth) p.adjust(p, meth, n = 60))
+> stopifnot(identical(p.adj[,"none"], p), p.adj <= p.adj.60)
+> round(p.adj, 3)
+       holm hochberg hommel bonferroni    BH    BY  none
+ [1,] 0.000    0.000  0.000      0.000 0.000 0.000 0.000
+ [2,] 0.001    0.001  0.001      0.001 0.000 0.002 0.000
+ [3,] 0.001    0.001  0.001      0.001 0.000 0.002 0.000
+ [4,] 0.005    0.005  0.004      0.005 0.001 0.004 0.000
+ [5,] 0.005    0.005  0.005      0.005 0.001 0.004 0.000
+ [6,] 0.006    0.006  0.005      0.006 0.001 0.004 0.000
+ [7,] 0.006    0.006  0.006      0.007 0.001 0.004 0.000
+ [8,] 0.007    0.007  0.007      0.008 0.001 0.004 0.000
+ [9,] 0.009    0.009  0.009      0.011 0.001 0.006 0.000
+[10,] 0.016    0.016  0.015      0.019 0.002 0.009 0.000
+[11,] 0.024    0.024  0.024      0.031 0.003 0.013 0.001
+[12,] 0.063    0.063  0.058      0.081 0.007 0.030 0.002
+[13,] 0.125    0.125  0.109      0.165 0.013 0.057 0.003
+[14,] 0.131    0.131  0.117      0.177 0.013 0.057 0.004
+[15,] 0.189    0.189  0.168      0.262 0.017 0.079 0.005
+[16,] 0.239    0.239  0.212      0.342 0.021 0.093 0.007
+[17,] 0.240    0.240  0.219      0.353 0.021 0.093 0.007
+[18,] 0.291    0.291  0.273      0.440 0.024 0.110 0.009
+[19,] 0.301    0.301  0.291      0.470 0.025 0.111 0.009
+[20,] 0.350    0.350  0.339      0.565 0.028 0.127 0.011
+[21,] 0.635    0.635  0.571      1.000 0.050 0.227 0.021
+[22,] 1.000    0.944  0.944      1.000 0.112 0.503 0.049
+[23,] 1.000    0.944  0.944      1.000 0.130 0.587 0.061
+[24,] 1.000    0.944  0.944      1.000 0.130 0.587 0.063
+[25,] 1.000    0.944  0.944      1.000 0.148 0.665 0.074
+[26,] 1.000    0.944  0.944      1.000 0.159 0.717 0.083
+[27,] 1.000    0.944  0.944      1.000 0.160 0.719 0.086
+[28,] 1.000    0.944  0.944      1.000 0.213 0.957 0.119
+[29,] 1.000    0.944  0.944      1.000 0.326 1.000 0.189
+[30,] 1.000    0.944  0.944      1.000 0.343 1.000 0.206
+[31,] 1.000    0.944  0.944      1.000 0.356 1.000 0.221
+[32,] 1.000    0.944  0.944      1.000 0.446 1.000 0.286
+[33,] 1.000    0.944  0.944      1.000 0.462 1.000 0.305
+[34,] 1.000    0.944  0.944      1.000 0.684 1.000 0.466
+[35,] 1.000    0.944  0.944      1.000 0.684 1.000 0.483
+[36,] 1.000    0.944  0.944      1.000 0.684 1.000 0.492
+[37,] 1.000    0.944  0.944      1.000 0.719 1.000 0.532
+[38,] 1.000    0.944  0.944      1.000 0.741 1.000 0.575
+[39,] 1.000    0.944  0.944      1.000 0.741 1.000 0.578
+[40,] 1.000    0.944  0.944      1.000 0.763 1.000 0.619
+[41,] 1.000    0.944  0.944      1.000 0.763 1.000 0.636
+[42,] 1.000    0.944  0.944      1.000 0.763 1.000 0.645
+[43,] 1.000    0.944  0.944      1.000 0.763 1.000 0.656
+[44,] 1.000    0.944  0.944      1.000 0.782 1.000 0.689
+[45,] 1.000    0.944  0.944      1.000 0.799 1.000 0.719
+[46,] 1.000    0.944  0.944      1.000 0.880 1.000 0.818
+[47,] 1.000    0.944  0.944      1.000 0.880 1.000 0.827
+[48,] 1.000    0.944  0.944      1.000 0.930 1.000 0.897
+[49,] 1.000    0.944  0.944      1.000 0.930 1.000 0.912
+[50,] 1.000    0.944  0.944      1.000 0.944 1.000 0.944
+> ## or a bit nicer:
+> noquote(apply(p.adj, 2, format.pval, digits = 3))
+      holm     hochberg hommel   bonferroni BH       BY      none    
+ [1,] 1.18e-05 1.18e-05 1.18e-05 1.18e-05   1.18e-05 5.3e-05 2.35e-07
+ [2,] 0.00103  0.00103  0.00101  0.00105    0.000429 0.00193 2.10e-05
+ [3,] 0.00124  0.00124  0.00124  0.00129    0.000429 0.00193 2.58e-05
+ [4,] 0.00461  0.00461  0.00422  0.00491    0.000947 0.00426 9.81e-05
+ [5,] 0.00484  0.00484  0.00453  0.00526    0.000947 0.00426 0.000105
+ [6,] 0.00559  0.00559  0.00521  0.00621    0.000947 0.00426 0.000124
+ [7,] 0.00583  0.00583  0.00557  0.00663    0.000947 0.00426 0.000133
+ [8,] 0.00674  0.00674  0.00659  0.00784    0.000980 0.00441 0.000157
+ [9,] 0.00947  0.00947  0.00924  0.01127    0.001253 0.00564 0.000225
+[10,] 0.01556  0.01556  0.01518  0.01898    0.001898 0.00854 0.000380
+[11,] 0.02446  0.02446  0.02446  0.03057    0.002780 0.01251 0.000611
+[12,] 0.06294  0.06294  0.05810  0.08070    0.006725 0.03026 0.001614
+[13,] 0.12549  0.12549  0.10898  0.16512    0.012637 0.05686 0.003302
+[14,] 0.13092  0.13092  0.11677  0.17692    0.012637 0.05686 0.003538
+[15,] 0.18853  0.18853  0.16758  0.26185    0.017457 0.07854 0.005237
+[16,] 0.23912  0.23912  0.21179  0.34160    0.020762 0.09341 0.006832
+[17,] 0.24001  0.24001  0.21884  0.35296    0.020762 0.09341 0.007059
+[18,] 0.29057  0.29057  0.27296  0.44026    0.024459 0.11004 0.008805
+[19,] 0.30083  0.30083  0.29143  0.47005    0.024740 0.11131 0.009401
+[20,] 0.35024  0.35024  0.33894  0.56490    0.028245 0.12708 0.011298
+[21,] 0.63451  0.63451  0.57105  1.00000    0.050358 0.22657 0.021150
+[22,] 1.00000  0.94379  0.94379  1.00000    0.111880 0.50337 0.049227
+[23,] 1.00000  0.94379  0.94379  1.00000    0.130463 0.58698 0.060533
+[24,] 1.00000  0.94379  0.94379  1.00000    0.130463 0.58698 0.062622
+[25,] 1.00000  0.94379  0.94379  1.00000    0.147903 0.66545 0.073952
+[26,] 1.00000  0.94379  0.94379  1.00000    0.159252 0.71651 0.082811
+[27,] 1.00000  0.94379  0.94379  1.00000    0.159877 0.71932 0.086333
+[28,] 1.00000  0.94379  0.94379  1.00000    0.212617 0.95661 0.119065
+[29,] 1.00000  0.94379  0.94379  1.00000    0.325999 1.00000 0.189080
+[30,] 1.00000  0.94379  0.94379  1.00000    0.343082 1.00000 0.205849
+[31,] 1.00000  0.94379  0.94379  1.00000    0.356325 1.00000 0.220921
+[32,] 1.00000  0.94379  0.94379  1.00000    0.446250 1.00000 0.285600
+[33,] 1.00000  0.94379  0.94379  1.00000    0.461954 1.00000 0.304889
+[34,] 1.00000  0.94379  0.94379  1.00000    0.683577 1.00000 0.466068
+[35,] 1.00000  0.94379  0.94379  1.00000    0.683577 1.00000 0.483081
+[36,] 1.00000  0.94379  0.94379  1.00000    0.683577 1.00000 0.492175
+[37,] 1.00000  0.94379  0.94379  1.00000    0.718845 1.00000 0.531945
+[38,] 1.00000  0.94379  0.94379  1.00000    0.741435 1.00000 0.575155
+[39,] 1.00000  0.94379  0.94379  1.00000    0.741435 1.00000 0.578319
+[40,] 1.00000  0.94379  0.94379  1.00000    0.762606 1.00000 0.618589
+[41,] 1.00000  0.94379  0.94379  1.00000    0.762606 1.00000 0.636362
+[42,] 1.00000  0.94379  0.94379  1.00000    0.762606 1.00000 0.644859
+[43,] 1.00000  0.94379  0.94379  1.00000    0.762606 1.00000 0.655841
+[44,] 1.00000  0.94379  0.94379  1.00000    0.782487 1.00000 0.688588
+[45,] 1.00000  0.94379  0.94379  1.00000    0.798874 1.00000 0.718986
+[46,] 1.00000  0.94379  0.94379  1.00000    0.880265 1.00000 0.817954
+[47,] 1.00000  0.94379  0.94379  1.00000    0.880265 1.00000 0.827449
+[48,] 1.00000  0.94379  0.94379  1.00000    0.930478 1.00000 0.897130
+[49,] 1.00000  0.94379  0.94379  1.00000    0.930478 1.00000 0.911868
+[50,] 1.00000  0.94379  0.94379  1.00000    0.943789 1.00000 0.943789
+> 
+> 
+> ## and a graphic:
+> matplot(p, p.adj, ylab="p.adjust(p, meth)", type = "l", asp = 1, lty = 1:6,
++         main = "P-value adjustments")
+> legend(0.7, 0.6, p.adjust.M, col = 1:6, lty = 1:6)
+> 
+> ## Can work with NA's:
+> pN <- p; iN <- c(46, 47); pN[iN] <- NA
+> pN.a <- sapply(p.adjust.M, function(meth) p.adjust(pN, meth))
+> ## The smallest 20 P-values all affected by the NA's :
+> round((pN.a / p.adj)[1:20, ] , 4)
+        holm hochberg hommel bonferroni   BH     BY none
+ [1,] 0.9600   0.9600 0.9600       0.96 0.96 0.9514    1
+ [2,] 0.9592   0.9592 0.9583       0.96 0.96 0.9514    1
+ [3,] 0.9583   0.9583 0.9583       0.96 0.96 0.9514    1
+ [4,] 0.9574   0.9574 0.9535       0.96 0.96 0.9514    1
+ [5,] 0.9565   0.9565 0.9535       0.96 0.96 0.9514    1
+ [6,] 0.9556   0.9556 0.9524       0.96 0.96 0.9514    1
+ [7,] 0.9545   0.9545 0.9524       0.96 0.96 0.9514    1
+ [8,] 0.9535   0.9535 0.9524       0.96 0.96 0.9514    1
+ [9,] 0.9524   0.9524 0.9512       0.96 0.96 0.9514    1
+[10,] 0.9512   0.9512 0.9500       0.96 0.96 0.9514    1
+[11,] 0.9500   0.9500 0.9500       0.96 0.96 0.9514    1
+[12,] 0.9487   0.9487 0.9444       0.96 0.96 0.9514    1
+[13,] 0.9474   0.9474 0.9394       0.96 0.96 0.9514    1
+[14,] 0.9459   0.9459 0.9394       0.96 0.96 0.9514    1
+[15,] 0.9444   0.9444 0.9375       0.96 0.96 0.9514    1
+[16,] 0.9429   0.9429 0.9355       0.96 0.96 0.9514    1
+[17,] 0.9412   0.9412 0.9355       0.96 0.96 0.9514    1
+[18,] 0.9394   0.9394 0.9355       0.96 0.96 0.9514    1
+[19,] 0.9375   0.9375 0.9355       0.96 0.96 0.9514    1
+[20,] 0.9355   0.9355 0.9333       0.96 0.96 0.9514    1
+> 
+> 
+> 
+> cleanEx()
+> nameEx("pairwise.prop.test")
+> ### * pairwise.prop.test
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: pairwise.prop.test
+> ### Title: Pairwise comparisons for proportions
+> ### Aliases: pairwise.prop.test
+> ### Keywords: htest
+> 
+> ### ** Examples
+> 
+> smokers  <- c( 83, 90, 129, 70 )
+> patients <- c( 86, 93, 136, 82 )
+> pairwise.prop.test(smokers, patients)
+Warning in prop.test(x[c(i, j)], n[c(i, j)], ...) :
+  Chi-squared approximation may be incorrect
+Warning in prop.test(x[c(i, j)], n[c(i, j)], ...) :
+  Chi-squared approximation may be incorrect
+Warning in prop.test(x[c(i, j)], n[c(i, j)], ...) :
+  Chi-squared approximation may be incorrect
+
+	Pairwise comparisons using Pairwise comparison of proportions 
+
+data:  smokers out of patients 
+
+  1     2     3    
+2 1.000 -     -    
+3 1.000 1.000 -    
+4 0.119 0.093 0.124
+
+P value adjustment method: holm 
+> 
+> 
+> 
+> cleanEx()
+> nameEx("pairwise.t.test")
+> ### * pairwise.t.test
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: pairwise.t.test
+> ### Title: Pairwise t tests
+> ### Aliases: pairwise.t.test
+> ### Keywords: htest
+> 
+> ### ** Examples
+> 
+> attach(airquality)
+> Month <- factor(Month, labels = month.abb[5:9])
+> pairwise.t.test(Ozone, Month)
+
+	Pairwise comparisons using t tests with pooled SD 
+
+data:  Ozone and Month 
+
+    May     Jun     Jul     Aug    
+Jun 1.00000 -       -       -      
+Jul 0.00026 0.05113 -       -      
+Aug 0.00019 0.04987 1.00000 -      
+Sep 1.00000 1.00000 0.00488 0.00388
+
+P value adjustment method: holm 
+> pairwise.t.test(Ozone, Month, p.adj = "bonf")
+
+	Pairwise comparisons using t tests with pooled SD 
+
+data:  Ozone and Month 
+
+    May     Jun     Jul     Aug    
+Jun 1.00000 -       -       -      
+Jul 0.00029 0.10225 -       -      
+Aug 0.00019 0.08312 1.00000 -      
+Sep 1.00000 1.00000 0.00697 0.00485
+
+P value adjustment method: bonferroni 
+> pairwise.t.test(Ozone, Month, pool.sd = FALSE)
+
+	Pairwise comparisons using t tests with non-pooled SD 
+
+data:  Ozone and Month 
+
+    May     Jun     Jul     Aug    
+Jun 1.00000 -       -       -      
+Jul 0.00026 0.01527 -       -      
+Aug 0.00195 0.02135 1.00000 -      
+Sep 0.86321 1.00000 0.00589 0.01721
+
+P value adjustment method: holm 
+> detach()
+> 
+> 
+> 
+> cleanEx()
+> nameEx("pairwise.wilcox.test")
+> ### * pairwise.wilcox.test
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: pairwise.wilcox.test
+> ### Title: Pairwise Wilcoxon Rank Sum Tests
+> ### Aliases: pairwise.wilcox.test
+> ### Keywords: htest
+> 
+> ### ** Examples
+> 
+> attach(airquality)
+> Month <- factor(Month, labels = month.abb[5:9])
+> ## These give warnings because of ties :
+> pairwise.wilcox.test(Ozone, Month)
+Warning in wilcox.test.default(xi, xj, paired = paired, ...) :
+  cannot compute exact p-value with ties
+Warning in wilcox.test.default(xi, xj, paired = paired, ...) :
+  cannot compute exact p-value with ties
+Warning in wilcox.test.default(xi, xj, paired = paired, ...) :
+  cannot compute exact p-value with ties
+Warning in wilcox.test.default(xi, xj, paired = paired, ...) :
+  cannot compute exact p-value with ties
+Warning in wilcox.test.default(xi, xj, paired = paired, ...) :
+  cannot compute exact p-value with ties
+Warning in wilcox.test.default(xi, xj, paired = paired, ...) :
+  cannot compute exact p-value with ties
+Warning in wilcox.test.default(xi, xj, paired = paired, ...) :
+  cannot compute exact p-value with ties
+Warning in wilcox.test.default(xi, xj, paired = paired, ...) :
+  cannot compute exact p-value with ties
+Warning in wilcox.test.default(xi, xj, paired = paired, ...) :
+  cannot compute exact p-value with ties
+Warning in wilcox.test.default(xi, xj, paired = paired, ...) :
+  cannot compute exact p-value with ties
+
+	Pairwise comparisons using Wilcoxon rank sum test 
+
+data:  Ozone and Month 
+
+    May    Jun    Jul    Aug   
+Jun 0.5775 -      -      -     
+Jul 0.0003 0.0848 -      -     
+Aug 0.0011 0.1295 1.0000 -     
+Sep 0.4744 1.0000 0.0060 0.0227
+
+P value adjustment method: holm 
+> pairwise.wilcox.test(Ozone, Month, p.adj = "bonf")
+Warning in wilcox.test.default(xi, xj, paired = paired, ...) :
+  cannot compute exact p-value with ties
+Warning in wilcox.test.default(xi, xj, paired = paired, ...) :
+  cannot compute exact p-value with ties
+Warning in wilcox.test.default(xi, xj, paired = paired, ...) :
+  cannot compute exact p-value with ties
+Warning in wilcox.test.default(xi, xj, paired = paired, ...) :
+  cannot compute exact p-value with ties
+Warning in wilcox.test.default(xi, xj, paired = paired, ...) :
+  cannot compute exact p-value with ties
+Warning in wilcox.test.default(xi, xj, paired = paired, ...) :
+  cannot compute exact p-value with ties
+Warning in wilcox.test.default(xi, xj, paired = paired, ...) :
+  cannot compute exact p-value with ties
+Warning in wilcox.test.default(xi, xj, paired = paired, ...) :
+  cannot compute exact p-value with ties
+Warning in wilcox.test.default(xi, xj, paired = paired, ...) :
+  cannot compute exact p-value with ties
+Warning in wilcox.test.default(xi, xj, paired = paired, ...) :
+  cannot compute exact p-value with ties
+
+	Pairwise comparisons using Wilcoxon rank sum test 
+
+data:  Ozone and Month 
+
+    May    Jun    Jul    Aug   
+Jun 1.0000 -      -      -     
+Jul 0.0003 0.1414 -      -     
+Aug 0.0012 0.2591 1.0000 -     
+Sep 1.0000 1.0000 0.0074 0.0325
+
+P value adjustment method: bonferroni 
+> detach()
+> 
+> 
+> 
+> cleanEx()
+> nameEx("plot.acf")
+> ### * plot.acf
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: plot.acf
+> ### Title: Plot Autocovariance and Autocorrelation Functions
+> ### Aliases: plot.acf
+> ### Keywords: hplot ts
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> z4  <- ts(matrix(rnorm(400), 100, 4), start = c(1961, 1), frequency = 12)
+> z7  <- ts(matrix(rnorm(700), 100, 7), start = c(1961, 1), frequency = 12)
+> acf(z4)
+> acf(z7, max.mfrow = 7)   # squeeze onto 1 page
+> acf(z7) # multi-page
+> 
+> 
+> 
+> cleanEx()
+> nameEx("plot.isoreg")
+> ### * plot.isoreg
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: plot.isoreg
+> ### Title: Plot Method for isoreg Objects
+> ### Aliases: plot.isoreg lines.isoreg
+> ### Keywords: hplot print
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> utils::example(isoreg) # for the examples there
+
+isoreg> require(graphics)
+
+isoreg> (ir <- isoreg(c(1,0,4,3,3,5,4,2,0)))
+Isotonic regression from isoreg(x = c(1, 0, 4, 3, 3, 5, 4, 2, 0)),
+  with 2 knots / breaks at obs.nr. 2 9 ;
+  initially ordered 'x'
+  and further components List of 4
+ $ x : num [1:9] 1 2 3 4 5 6 7 8 9
+ $ y : num [1:9] 1 0 4 3 3 5 4 2 0
+ $ yf: num [1:9] 0.5 0.5 3 3 3 3 3 3 3
+ $ yc: num [1:10] 0 1 1 5 8 11 16 20 22 22
+
+isoreg> plot(ir, plot.type = "row")
+
+isoreg> (ir3 <- isoreg(y3 <- c(1,0,4,3,3,5,4,2, 3))) # last "3", not "0"
+Isotonic regression from isoreg(x = y3 <- c(1, 0, 4, 3, 3, 5, 4, 2, 3)),
+  with 3 knots / breaks at obs.nr. 2 5 9 ;
+  initially ordered 'x'
+  and further components List of 4
+ $ x : num [1:9] 1 2 3 4 5 6 7 8 9
+ $ y : num [1:9] 1 0 4 3 3 5 4 2 3
+ $ yf: num [1:9] 0.5 0.5 3.33 3.33 3.33 ...
+ $ yc: num [1:10] 0 1 1 5 8 11 16 20 22 25
+
+isoreg> (fi3 <- as.stepfun(ir3))
+Step function
+Call: isoreg(x = y3 <- c(1, 0, 4, 3, 3, 5, 4, 2, 3))
+ x[1:3] =      2,      5,      9
+4 plateau levels =    0.5,    0.5, 3.3333,    3.5
+
+isoreg> (ir4 <- isoreg(1:10, y4 <- c(5, 9, 1:2, 5:8, 3, 8)))
+Isotonic regression from isoreg(x = 1:10, y = y4 <- c(5, 9, 1:2, 5:8, 3, 8)),
+  with 5 knots / breaks at obs.nr. 4 5 6 9 10 ;
+  initially ordered 'x'
+  and further components List of 4
+ $ x : num [1:10] 1 2 3 4 5 6 7 8 9 10
+ $ y : num [1:10] 5 9 1 2 5 6 7 8 3 8
+ $ yf: num [1:10] 4.25 4.25 4.25 4.25 5 6 6 6 6 8
+ $ yc: num [1:11] 0 5 14 15 17 22 28 35 43 46 ...
+
+isoreg> cat(sprintf("R^2 = %.2f\n",
+isoreg+             1 - sum(residuals(ir4)^2) / ((10-1)*var(y4))))
+R^2 = 0.21
+
+isoreg> ## If you are interested in the knots alone :
+isoreg> with(ir4, cbind(iKnots, yf[iKnots]))
+     iKnots     
+[1,]      4 4.25
+[2,]      5 5.00
+[3,]      6 6.00
+[4,]      9 6.00
+[5,]     10 8.00
+
+isoreg> ## Example of unordered x[] with ties:
+isoreg> x <- sample((0:30)/8)
+
+isoreg> y <- exp(x)
+
+isoreg> x. <- round(x) # ties!
+
+isoreg> plot(m <- isoreg(x., y))
+
+isoreg> stopifnot(all.equal(with(m, yf[iKnots]),
+isoreg+                     as.vector(tapply(y, x., mean))))
+> 
+> plot(y3, main = "simple plot(.)  +  lines(<isoreg>)")
+> lines(ir3)
+> 
+> ## 'same' plot as above, "proving" that only ranks of 'x' are important
+> plot(isoreg(2^(1:9), c(1,0,4,3,3,5,4,2,0)), plot.type = "row", log = "x")
+Warning in xy.coords(x, y, xlabel, ylabel, log) :
+  1 x value <= 0 omitted from logarithmic plot
+Warning in xy.coords(x, y, xlabel, ylabel, log) :
+  1 x value <= 0 omitted from logarithmic plot
+> 
+> plot(ir3, plot.type = "row", ylab = "y3")
+> plot(isoreg(y3 - 4), plot.t="r", ylab = "y3 - 4")
+> plot(ir4, plot.type = "ro",  ylab = "y4", xlab = "x = 1:n")
+> 
+> ## experiment a bit with these (C-c C-j):
+> plot(isoreg(sample(9),  y3), plot.type = "row")
+> plot(isoreg(sample(9),  y3), plot.type = "col.wise")
+> 
+> plot(ir <- isoreg(sample(10), sample(10, replace = TRUE)),
++                   plot.type = "r")
+> 
+> 
+> 
+> cleanEx()
+> nameEx("plot.lm")
+> ### * plot.lm
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: plot.lm
+> ### Title: Plot Diagnostics for an lm Object
+> ### Aliases: plot.lm
+> ### Keywords: hplot regression
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> ## Analysis of the life-cycle savings data
+> ## given in Belsley, Kuh and Welsch.
+> lm.SR <- lm(sr ~ pop15 + pop75 + dpi + ddpi, data = LifeCycleSavings)
+> plot(lm.SR)
+> 
+> ## 4 plots on 1 page;
+> ## allow room for printing model formula in outer margin:
+> par(mfrow = c(2, 2), oma = c(0, 0, 2, 0))
+> plot(lm.SR)
+> plot(lm.SR, id.n = NULL)                 # no id's
+> plot(lm.SR, id.n = 5, labels.id = NULL)  # 5 id numbers
+> 
+> ## Was default in R <= 2.1.x:
+> ## Cook's distances instead of Residual-Leverage plot
+> plot(lm.SR, which = 1:4)
+> 
+> ## Fit a smooth curve, where applicable:
+> plot(lm.SR, panel = panel.smooth)
+> ## Gives a smoother curve
+> plot(lm.SR, panel = function(x, y) panel.smooth(x, y, span = 1))
+> 
+> par(mfrow = c(2,1))  # same oma as above
+> plot(lm.SR, which = 1:2, sub.caption = "Saving Rates, n=50, p=5")
+> 
+> ## Don't show: 
+> ## An example with *long* formula that needs abbreviation:
+> for(i in 1:5) assign(paste("long.var.name", i, sep = "."), runif(10))
+> plot(lm(long.var.name.1 ~
++         long.var.name.2 + long.var.name.3 + long.var.name.4 + long.var.name.5))
+> ## End(Don't show)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("plot.ppr")
+> ### * plot.ppr
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: plot.ppr
+> ### Title: Plot Ridge Functions for Projection Pursuit Regression Fit
+> ### Aliases: plot.ppr
+> ### Keywords: hplot
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> with(rock, {
++ area1 <- area/10000; peri1 <- peri/10000
++ par(mfrow = c(3,2)) # maybe: , pty = "s")
++ rock.ppr <- ppr(log(perm) ~ area1 + peri1 + shape,
++                 data = rock, nterms = 2, max.terms = 5)
++ plot(rock.ppr, main = "ppr(log(perm)~ ., nterms=2, max.terms=5)")
++ plot(update(rock.ppr, bass = 5), main = "update(..., bass = 5)")
++ plot(update(rock.ppr, sm.method = "gcv", gcvpen = 2),
++      main = "update(..., sm.method=\"gcv\", gcvpen=2)")
++ })
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("plot.profile.nls")
+> ### * plot.profile.nls
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: plot.profile.nls
+> ### Title: Plot a profile.nls Object
+> ### Aliases: plot.profile.nls
+> ### Keywords: nonlinear regression models
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> # obtain the fitted object
+> fm1 <- nls(demand ~ SSasympOrig(Time, A, lrc), data = BOD)
+> # get the profile for the fitted model
+> pr1 <- profile(fm1, alpha = 0.05)
+> opar <- par(mfrow = c(2,2), oma = c(1.1, 0, 1.1, 0), las = 1)
+> plot(pr1, conf = c(95, 90, 80, 50)/100)
+> plot(pr1, conf = c(95, 90, 80, 50)/100, absVal = FALSE)
+> mtext("Confidence intervals based on the profile sum of squares",
++       side = 3, outer = TRUE)
+> mtext("BOD data - confidence levels of 50%, 80%, 90% and 95%",
++       side = 1, outer = TRUE)
+> par(opar)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("plot.stepfun")
+> ### * plot.stepfun
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: plot.stepfun
+> ### Title: Plot Step Functions
+> ### Aliases: plot.stepfun lines.stepfun
+> ### Keywords: hplot
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> y0 <- c(1,2,4,3)
+> sfun0  <- stepfun(1:3, y0, f = 0)
+> sfun.2 <- stepfun(1:3, y0, f = .2)
+> sfun1  <- stepfun(1:3, y0, right = TRUE)
+> 
+> tt <- seq(0, 3, by = 0.1)
+> op <- par(mfrow = c(2,2))
+> plot(sfun0); plot(sfun0, xval = tt, add = TRUE, col.hor = "bisque")
+> plot(sfun.2);plot(sfun.2, xval = tt, add = TRUE, col = "orange") # all colors
+> plot(sfun1);lines(sfun1, xval = tt, col.hor = "coral")
+> ##-- This is  revealing :
+> plot(sfun0, verticals = FALSE,
++      main = "stepfun(x, y0, f=f)  for f = 0, .2, 1")
+> for(i in 1:3)
++   lines(list(sfun0, sfun.2, stepfun(1:3, y0, f = 1))[[i]], col = i)
+> legend(2.5, 1.9, paste("f =", c(0, 0.2, 1)), col = 1:3, lty = 1, y.intersp = 1)
+> par(op)
+> 
+> # Extend and/or restrict 'viewport':
+> plot(sfun0, xlim = c(0,5), ylim = c(0, 3.5),
++      main = "plot(stepfun(*), xlim= . , ylim = .)")
+> 
+> ##-- this works too (automatic call to  ecdf(.)):
+> plot.stepfun(rt(50, df = 3), col.vert = "gray20")
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("plot.ts")
+> ### * plot.ts
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: plot.ts
+> ### Title: Plotting Time-Series Objects
+> ### Aliases: plot.ts lines.ts
+> ### Keywords: hplot ts
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> ## Multivariate
+> z <- ts(matrix(rt(200 * 8, df = 3), 200, 8),
++         start = c(1961, 1), frequency = 12)
+> plot(z, yax.flip = TRUE)
+> plot(z, axes = FALSE, ann = FALSE, frame.plot = TRUE,
++      mar.multi = c(0,0,0,0), oma.multi = c(1,1,5,1))
+> title("plot(ts(..), axes=FALSE, ann=FALSE, frame.plot=TRUE, mar..., oma...)")
+> 
+> z <- window(z[,1:3], end = c(1969,12))
+> plot(z, type = "b")    # multiple
+> plot(z, plot.type = "single", lty = 1:3, col = 4:2)
+> 
+> ## A phase plot:
+> plot(nhtemp, lag(nhtemp, 1), cex = .8, col = "blue",
++      main = "Lag plot of New Haven temperatures")
+> 
+> ## xy.lines and xy.labels are FALSE for large series:
+> plot(lag(sunspots, 1), sunspots, pch = ".")
+> 
+> SMI <- EuStockMarkets[, "SMI"]
+> plot(lag(SMI,  1), SMI, pch = ".")
+> plot(lag(SMI, 20), SMI, pch = ".", log = "xy",
++      main = "4 weeks lagged SMI stocks -- log scale", xy.lines =  TRUE)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("poisson.test")
+> ### * poisson.test
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: poisson.test
+> ### Title: Exact Poisson tests
+> ### Aliases: poisson.test
+> ### Keywords: htest
+> 
+> ### ** Examples
+> 
+> ### These are paraphrased from data sets in the ISwR package
+> 
+> ## SMR, Welsh Nickel workers
+> poisson.test(137, 24.19893)
+
+	Exact Poisson test
+
+data:  137 time base: 24.19893
+number of events = 137, time base = 24.199, p-value < 2.2e-16
+alternative hypothesis: true event rate is not equal to 1
+95 percent confidence interval:
+ 4.753125 6.692709
+sample estimates:
+event rate 
+  5.661407 
+
+> 
+> ## eba1977, compare Fredericia to other three cities for ages 55-59
+> poisson.test(c(11, 6+8+7), c(800, 1083+1050+878))
+
+	Comparison of Poisson rates
+
+data:  c(11, 6 + 8 + 7) time base: c(800, 1083 + 1050 + 878)
+count1 = 11, expected count1 = 6.7174, p-value = 0.07967
+alternative hypothesis: true rate ratio is not equal to 1
+95 percent confidence interval:
+ 0.8584264 4.2772659
+sample estimates:
+rate ratio 
+  1.971488 
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("poly")
+> ### * poly
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: poly
+> ### Title: Compute Orthogonal Polynomials
+> ### Aliases: poly polym predict.poly makepredictcall.poly
+> ### Keywords: math
+> 
+> ### ** Examples
+> 
+> od <- options(digits = 3) # avoid too much visual clutter
+> (z <- poly(1:10, 3))
+           1      2      3
+ [1,] -0.495  0.522 -0.453
+ [2,] -0.385  0.174  0.151
+ [3,] -0.275 -0.087  0.378
+ [4,] -0.165 -0.261  0.335
+ [5,] -0.055 -0.348  0.130
+ [6,]  0.055 -0.348 -0.130
+ [7,]  0.165 -0.261 -0.335
+ [8,]  0.275 -0.087 -0.378
+ [9,]  0.385  0.174 -0.151
+[10,]  0.495  0.522  0.453
+attr(,"coefs")
+attr(,"coefs")$alpha
+[1] 5.5 5.5 5.5
+
+attr(,"coefs")$norm2
+[1]    1.0   10.0   82.5  528.0 3088.8
+
+attr(,"degree")
+[1] 1 2 3
+attr(,"class")
+[1] "poly"   "matrix"
+> predict(z, seq(2, 4, 0.5))
+          1       2     3
+[1,] -0.385  0.1741 0.151
+[2,] -0.330  0.0326 0.305
+[3,] -0.275 -0.0870 0.378
+[4,] -0.220 -0.1850 0.383
+[5,] -0.165 -0.2611 0.335
+> zapsmall(poly(seq(4, 6, 0.5), 3, coefs = attr(z, "coefs")))
+          1      2      3
+[1,] -0.165 -0.261  0.335
+[2,] -0.110 -0.316  0.246
+[3,] -0.055 -0.348  0.130
+[4,]  0.000 -0.359  0.000
+[5,]  0.055 -0.348 -0.130
+attr(,"coefs")
+attr(,"coefs")$alpha
+[1] 5.5 5.5 5.5
+
+attr(,"coefs")$norm2
+[1]    1.0   10.0   82.5  528.0 3088.8
+
+attr(,"degree")
+[1] 1 2 3
+attr(,"class")
+[1] "poly"   "matrix"
+> 
+>  zm <- zapsmall(polym (    1:4, c(1, 4:6),  degree = 3)) # or just poly():
+> (z1 <- zapsmall(poly(cbind(1:4, c(1, 4:6)), degree = 3)))
+        1.0  2.0    3.0    0.1   1.1    2.1    0.2    1.2    0.3
+[1,] -0.671  0.5 -0.224 -0.802 0.538 -0.401  0.323 -0.217 -0.053
+[2,] -0.224 -0.5  0.671  0.000 0.000  0.000 -0.688  0.154  0.526
+[3,]  0.224 -0.5 -0.671  0.267 0.060 -0.134 -0.239 -0.053 -0.788
+[4,]  0.671  0.5  0.224  0.535 0.359  0.267  0.604  0.405  0.315
+attr(,"degree")
+[1] 1 2 3 1 2 3 2 3 3
+attr(,"coefs")
+attr(,"coefs")[[1]]
+attr(,"coefs")[[1]]$alpha
+[1] 2.5 2.5 2.5
+
+attr(,"coefs")[[1]]$norm2
+[1] 1.0 4.0 5.0 4.0 1.8
+
+
+attr(,"coefs")[[2]]
+attr(,"coefs")[[2]]$alpha
+[1] 4.00 2.71 4.47
+
+attr(,"coefs")[[2]]$norm2
+[1]  1.00  4.00 14.00 25.86  9.94
+
+
+attr(,"class")
+[1] "poly"   "matrix"
+> ## they are the same :
+> stopifnot(all.equal(zm, z1, tol = 1e-15))
+> options(od)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("power")
+> ### * power
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: power
+> ### Title: Create a Power Link Object
+> ### Aliases: power
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> power()
+$linkfun
+function (mu) 
+mu
+<environment: namespace:stats>
+
+$linkinv
+function (eta) 
+eta
+<environment: namespace:stats>
+
+$mu.eta
+function (eta) 
+rep.int(1, length(eta))
+<environment: namespace:stats>
+
+$valideta
+function (eta) 
+TRUE
+<environment: namespace:stats>
+
+$name
+[1] "identity"
+
+attr(,"class")
+[1] "link-glm"
+> quasi(link = power(1/3))[c("linkfun", "linkinv")]
+$linkfun
+function (mu) 
+mu^lambda
+<bytecode: 0x798f7d0>
+<environment: 0x79a9258>
+
+$linkinv
+function (eta) 
+pmax(eta^(1/lambda), .Machine$double.eps)
+<bytecode: 0x798f6b8>
+<environment: 0x79a9258>
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("power.anova.test")
+> ### * power.anova.test
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: power.anova.test
+> ### Title: Power Calculations for Balanced One-Way Analysis of Variance
+> ###   Tests
+> ### Aliases: power.anova.test
+> ### Keywords: htest
+> 
+> ### ** Examples
+> 
+> power.anova.test(groups = 4, n = 5, between.var = 1, within.var = 3)
+
+     Balanced one-way analysis of variance power calculation 
+
+         groups = 4
+              n = 5
+    between.var = 1
+     within.var = 3
+      sig.level = 0.05
+          power = 0.3535594
+
+NOTE: n is number in each group
+
+> # Power = 0.3535594
+> 
+> power.anova.test(groups = 4, between.var = 1, within.var = 3,
++                  power = .80)
+
+     Balanced one-way analysis of variance power calculation 
+
+         groups = 4
+              n = 11.92613
+    between.var = 1
+     within.var = 3
+      sig.level = 0.05
+          power = 0.8
+
+NOTE: n is number in each group
+
+> # n = 11.92613
+> 
+> ## Assume we have prior knowledge of the group means:
+> groupmeans <- c(120, 130, 140, 150)
+> power.anova.test(groups = length(groupmeans),
++                  between.var = var(groupmeans),
++                  within.var = 500, power = .90) # n = 15.18834
+
+     Balanced one-way analysis of variance power calculation 
+
+         groups = 4
+              n = 15.18834
+    between.var = 166.6667
+     within.var = 500
+      sig.level = 0.05
+          power = 0.9
+
+NOTE: n is number in each group
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("power.prop.test")
+> ### * power.prop.test
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: power.prop.test
+> ### Title: Power Calculations for Two-Sample Test for Proportions
+> ### Aliases: power.prop.test
+> ### Keywords: htest
+> 
+> ### ** Examples
+> 
+> power.prop.test(n = 50, p1 = .50, p2 = .75)      ## => power = 0.740
+
+     Two-sample comparison of proportions power calculation 
+
+              n = 50
+             p1 = 0.5
+             p2 = 0.75
+      sig.level = 0.05
+          power = 0.7401659
+    alternative = two.sided
+
+NOTE: n is number in *each* group
+
+> power.prop.test(p1 = .50, p2 = .75, power = .90) ## =>     n = 76.7
+
+     Two-sample comparison of proportions power calculation 
+
+              n = 76.70693
+             p1 = 0.5
+             p2 = 0.75
+      sig.level = 0.05
+          power = 0.9
+    alternative = two.sided
+
+NOTE: n is number in *each* group
+
+> power.prop.test(n = 50, p1 = .5, power = .90)    ## =>    p2 = 0.8026
+
+     Two-sample comparison of proportions power calculation 
+
+              n = 50
+             p1 = 0.5
+             p2 = 0.8026141
+      sig.level = 0.05
+          power = 0.9
+    alternative = two.sided
+
+NOTE: n is number in *each* group
+
+> power.prop.test(n = 50, p1 = .5, p2 = 0.9, power = .90, sig.level=NULL)
+
+     Two-sample comparison of proportions power calculation 
+
+              n = 50
+             p1 = 0.5
+             p2 = 0.9
+      sig.level = 0.001318068
+          power = 0.9
+    alternative = two.sided
+
+NOTE: n is number in *each* group
+
+>                                                  ## => sig.l = 0.00131
+> power.prop.test(p1 = .5, p2 = 0.501, sig.level=.001, power=0.90)
+
+     Two-sample comparison of proportions power calculation 
+
+              n = 10451937
+             p1 = 0.5
+             p2 = 0.501
+      sig.level = 0.001
+          power = 0.9
+    alternative = two.sided
+
+NOTE: n is number in *each* group
+
+>                                                  ## => n = 10451937
+> 
+> 
+> 
+> cleanEx()
+> nameEx("power.t.test")
+> ### * power.t.test
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: power.t.test
+> ### Title: Power calculations for one and two sample t tests
+> ### Aliases: power.t.test
+> ### Keywords: htest
+> 
+> ### ** Examples
+> 
+>  power.t.test(n = 20, delta = 1)
+
+     Two-sample t test power calculation 
+
+              n = 20
+          delta = 1
+             sd = 1
+      sig.level = 0.05
+          power = 0.8689528
+    alternative = two.sided
+
+NOTE: n is number in *each* group
+
+>  power.t.test(power = .90, delta = 1)
+
+     Two-sample t test power calculation 
+
+              n = 22.0211
+          delta = 1
+             sd = 1
+      sig.level = 0.05
+          power = 0.9
+    alternative = two.sided
+
+NOTE: n is number in *each* group
+
+>  power.t.test(power = .90, delta = 1, alternative = "one.sided")
+
+     Two-sample t test power calculation 
+
+              n = 17.84713
+          delta = 1
+             sd = 1
+      sig.level = 0.05
+          power = 0.9
+    alternative = one.sided
+
+NOTE: n is number in *each* group
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("pp.test")
+> ### * pp.test
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: PP.test
+> ### Title: Phillips-Perron Test for Unit Roots
+> ### Aliases: PP.test
+> ### Keywords: ts
+> 
+> ### ** Examples
+> 
+> x <- rnorm(1000)
+> PP.test(x)
+
+	Phillips-Perron Unit Root Test
+
+data:  x
+Dickey-Fuller = -33.057, Truncation lag parameter = 7, p-value = 0.01
+
+> y <- cumsum(x) # has unit root
+> PP.test(y)
+
+	Phillips-Perron Unit Root Test
+
+data:  y
+Dickey-Fuller = -2.6899, Truncation lag parameter = 7, p-value = 0.2863
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("ppoints")
+> ### * ppoints
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: ppoints
+> ### Title: Ordinates for Probability Plotting
+> ### Aliases: ppoints
+> ### Keywords: dplot arith distribution
+> 
+> ### ** Examples
+> 
+> ppoints(4) # the same as  ppoints(1:4)
+[1] 0.1470588 0.3823529 0.6176471 0.8529412
+> ppoints(10)
+ [1] 0.06097561 0.15853659 0.25609756 0.35365854 0.45121951 0.54878049
+ [7] 0.64634146 0.74390244 0.84146341 0.93902439
+> ppoints(10, a = 1/2)
+ [1] 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95
+> 
+> ## Visualize including the fractions :
+> require(graphics)## Don't show: 
+> lNs <- loadedNamespaces()
+> ## End(Don't show)
+> p.ppoints <- function(n, ..., add = FALSE, col = par("col")) {
++   pn <- ppoints(n, ...)
++   if(add)
++       points(pn, pn, col=col)
++   else {
++       tit <- match.call(); tit[[1]] <- quote(ppoints)
++       plot(pn,pn, main = deparse(tit), col=col,
++            xlim=0:1, ylim=0:1, xaxs="i", yaxs="i")
++       abline(0,1, col = adjustcolor(1, 1/4), lty = 3)
++   }
++   if(requireNamespace("MASS", quietly=TRUE))
++     text(pn, pn, as.character(MASS::fractions(pn)),
++          adj = c(0,0)-1/4, cex = 3/4, xpd = NA, col=col)
++   abline(h=pn, v=pn, col = adjustcolor(col, 1/2), lty = 2, lwd = 1/2)
++ }
+> 
+> p.ppoints(4)
+> p.ppoints(10)
+> p.ppoints(10, a = 1/2)
+> p.ppoints(21)
+> p.ppoints(8) ; p.ppoints(8, a = 1/2, add=TRUE, col="tomato")
+> ## Don't show: 
+> if(!any("MASS" == lNs)) unloadNamespace("MASS")
+> ## End(Don't show)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("ppr")
+> ### * ppr
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: ppr
+> ### Title: Projection Pursuit Regression
+> ### Aliases: ppr ppr.default ppr.formula
+> ### Keywords: regression
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> # Note: your numerical values may differ
+> attach(rock)
+> area1 <- area/10000; peri1 <- peri/10000
+> rock.ppr <- ppr(log(perm) ~ area1 + peri1 + shape,
++                 data = rock, nterms = 2, max.terms = 5)
+> rock.ppr
+Call:
+ppr(formula = log(perm) ~ area1 + peri1 + shape, data = rock, 
+    nterms = 2, max.terms = 5)
+
+Goodness of fit:
+ 2 terms  3 terms  4 terms  5 terms 
+8.737806 5.289517 4.745799 4.490378 
+> # Call:
+> # ppr.formula(formula = log(perm) ~ area1 + peri1 + shape, data = rock,
+> #     nterms = 2, max.terms = 5)
+> #
+> # Goodness of fit:
+> #  2 terms  3 terms  4 terms  5 terms
+> # 8.737806 5.289517 4.745799 4.490378
+> 
+> summary(rock.ppr)
+Call:
+ppr(formula = log(perm) ~ area1 + peri1 + shape, data = rock, 
+    nterms = 2, max.terms = 5)
+
+Goodness of fit:
+ 2 terms  3 terms  4 terms  5 terms 
+8.737806 5.289517 4.745799 4.490378 
+
+Projection direction vectors:
+      term 1      term 2     
+area1  0.34357179  0.37071027
+peri1 -0.93781471 -0.61923542
+shape  0.04961846  0.69218595
+
+Coefficients of ridge terms:
+   term 1    term 2 
+1.6079271 0.5460971 
+> # .....  (same as above)
+> # .....
+> #
+> # Projection direction vectors:
+> #       term 1      term 2
+> # area1  0.34357179  0.37071027
+> # peri1 -0.93781471 -0.61923542
+> # shape  0.04961846  0.69218595
+> #
+> # Coefficients of ridge terms:
+> #    term 1    term 2
+> # 1.6079271 0.5460971
+> 
+> par(mfrow = c(3,2))   # maybe: , pty = "s")
+> plot(rock.ppr, main = "ppr(log(perm)~ ., nterms=2, max.terms=5)")
+> plot(update(rock.ppr, bass = 5), main = "update(..., bass = 5)")
+> plot(update(rock.ppr, sm.method = "gcv", gcvpen = 2),
++      main = "update(..., sm.method=\"gcv\", gcvpen=2)")
+> cbind(perm = rock$perm, prediction = round(exp(predict(rock.ppr)), 1))
+     perm prediction
+1     6.3        5.9
+2     6.3        6.5
+3     6.3       12.1
+4     6.3        7.4
+5    17.1       16.3
+6    17.1       13.2
+7    17.1       41.2
+8    17.1       10.6
+9   119.0      101.9
+10  119.0       73.0
+11  119.0       46.8
+12  119.0      121.7
+13   82.4      107.8
+14   82.4       79.7
+15   82.4       98.3
+16   82.4      128.8
+17   58.6       66.8
+18   58.6       33.2
+19   58.6       58.7
+20   58.6      111.6
+21  142.0      118.9
+22  142.0      128.4
+23  142.0       91.9
+24  142.0      188.5
+25  740.0      341.7
+26  740.0      577.9
+27  740.0      895.7
+28  740.0     1041.0
+29  890.0      560.8
+30  890.0      721.8
+31  890.0      937.9
+32  890.0      848.5
+33  950.0      806.4
+34  950.0     1085.4
+35  950.0      945.6
+36  950.0      848.5
+37  100.0      154.1
+38  100.0      178.0
+39  100.0      321.5
+40  100.0      232.7
+41 1300.0     1067.0
+42 1300.0      697.8
+43 1300.0     1236.6
+44 1300.0     1301.8
+45  580.0      485.1
+46  580.0      285.1
+47  580.0      644.3
+48  580.0      571.5
+> detach()
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("prcomp")
+> ### * prcomp
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: prcomp
+> ### Title: Principal Components Analysis
+> ### Aliases: prcomp prcomp.formula prcomp.default plot.prcomp
+> ###   predict.prcomp print.prcomp summary.prcomp print.summary.prcomp
+> ### Keywords: multivariate
+> 
+> ### ** Examples
+> 
+> 
+> cleanEx()
+> nameEx("predict.HoltWinters")
+> ### * predict.HoltWinters
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: predict.HoltWinters
+> ### Title: Prediction Function for Fitted Holt-Winters Models
+> ### Aliases: predict.HoltWinters
+> ### Keywords: ts
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> m <- HoltWinters(co2)
+> p <- predict(m, 50, prediction.interval = TRUE)
+> plot(m, p)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("predict")
+> ### * predict
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: predict
+> ### Title: Model Predictions
+> ### Aliases: predict
+> ### Keywords: methods
+> 
+> ### ** Examples
+> 
+> ## Don't show: 
+> old <- Sys.setlocale("LC_COLLATE", "C")
+> ## End(Don't show)
+> require(utils)
+> 
+> ## All the "predict" methods found
+> ## NB most of the methods in the standard packages are hidden.
+> for(fn in methods("predict"))
++    try({
++        f <- eval(substitute(getAnywhere(fn)$objs[[1]], list(fn = fn)))
++        cat(fn, ":\n\t", deparse(args(f)), "\n")
++        }, silent = TRUE)
+predict.Arima :
+	 function (object, n.ahead = 1L, newxreg = NULL, se.fit = TRUE,      ...)  NULL 
+predict.HoltWinters :
+	 function (object, n.ahead = 1L, prediction.interval = FALSE,      level = 0.95, ...)  NULL 
+predict.StructTS :
+	 function (object, n.ahead = 1L, se.fit = TRUE, ...)  NULL 
+predict.ar :
+	 function (object, newdata, n.ahead = 1L, se.fit = TRUE, ...)  NULL 
+predict.arima0 :
+	 function (object, n.ahead = 1L, newxreg = NULL, se.fit = TRUE,      ...)  NULL 
+predict.bSpline :
+	 function (object, x, nseg = 50, deriv = 0, ...)  NULL 
+predict.bs :
+	 function (object, newx, ...)  NULL 
+predict.glm :
+	 function (object, newdata = NULL, type = c("link", "response",      "terms"), se.fit = FALSE, dispersion = NULL, terms = NULL,      na.action = na.pass, ...)  NULL 
+Warning: namespace ‘MASS’ is not available and has been replaced
+by .GlobalEnv when processing object ‘’
+predict.glmmPQL :
+	 function (object, newdata = NULL, type = c("link", "response"),      level = Q, na.action = na.pass, ...)  NULL 
+Warning: namespace ‘MASS’ is not available and has been replaced
+by .GlobalEnv when processing object ‘’
+predict.lda :
+	 function (object, newdata, prior = object$prior, dimen, method = c("plug-in",      "predictive", "debiased"), ...)  NULL 
+predict.lm :
+	 function (object, newdata, se.fit = FALSE, scale = NULL, df = Inf,      interval = c("none", "confidence", "prediction"), level = 0.95,      type = c("response", "terms"), terms = NULL, na.action = na.pass,      pred.var = res.var/weights, weights = 1, ...)  NULL 
+predict.loess :
+	 function (object, newdata = NULL, se = FALSE, na.action = na.pass,      ...)  NULL 
+Warning: namespace ‘MASS’ is not available and has been replaced
+by .GlobalEnv when processing object ‘’
+predict.lqs :
+	 function (object, newdata, na.action = na.pass, ...)  NULL 
+Warning: namespace ‘MASS’ is not available and has been replaced
+by .GlobalEnv when processing object ‘’
+predict.mca :
+	 function (object, newdata, type = c("row", "factor"), ...)  NULL 
+predict.mlm :
+	 function (object, newdata, se.fit = FALSE, na.action = na.pass,      ...)  NULL 
+predict.nbSpline :
+	 function (object, x, nseg = 50, deriv = 0, ...)  NULL 
+predict.nls :
+	 function (object, newdata, se.fit = FALSE, scale = NULL, df = Inf,      interval = c("none", "confidence", "prediction"), level = 0.95,      ...)  NULL 
+predict.npolySpline :
+	 function (object, x, nseg = 50, deriv = 0, ...)  NULL 
+predict.ns :
+	 function (object, newx, ...)  NULL 
+predict.pbSpline :
+	 function (object, x, nseg = 50, deriv = 0, ...)  NULL 
+Warning: namespace ‘MASS’ is not available and has been replaced
+by .GlobalEnv when processing object ‘’
+predict.polr :
+	 function (object, newdata, type = c("class", "probs"), ...)  NULL 
+predict.poly :
+	 function (object, newdata, ...)  NULL 
+predict.polySpline :
+	 function (object, x, nseg = 50, deriv = 0, ...)  NULL 
+predict.ppolySpline :
+	 function (object, x, nseg = 50, deriv = 0, ...)  NULL 
+predict.ppr :
+	 function (object, newdata, ...)  NULL 
+predict.prcomp :
+	 function (object, newdata, ...)  NULL 
+predict.princomp :
+	 function (object, newdata, ...)  NULL 
+Warning: namespace ‘MASS’ is not available and has been replaced
+by .GlobalEnv when processing object ‘’
+predict.qda :
+	 function (object, newdata, prior = object$prior, method = c("plug-in",      "predictive", "debiased", "looCV"), ...)  NULL 
+Warning: namespace ‘MASS’ is not available and has been replaced
+by .GlobalEnv when processing object ‘’
+predict.rlm :
+	 function (object, newdata = NULL, scale = NULL, ...)  NULL 
+predict.smooth.spline :
+	 function (object, x, deriv = 0, ...)  NULL 
+predict.smooth.spline.fit :
+	 function (object, x, deriv = 0, ...)  NULL 
+> ## Don't show: 
+> old <- Sys.setlocale("LC_COLLATE", old)
+> ## End(Don't show)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("predict.arima")
+> ### * predict.arima
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: predict.Arima
+> ### Title: Forecast from ARIMA fits
+> ### Aliases: predict.Arima
+> ### Keywords: ts
+> 
+> ### ** Examples
+> 
+> od <- options(digits = 5) # avoid too much spurious accuracy
+> predict(arima(lh, order = c(3,0,0)), n.ahead = 12)
+$pred
+Time Series:
+Start = 49 
+End = 60 
+Frequency = 1 
+ [1] 2.4602 2.2708 2.1986 2.2607 2.3470 2.4145 2.4389 2.4315 2.4102 2.3917
+[11] 2.3827 2.3827
+
+$se
+Time Series:
+Start = 49 
+End = 60 
+Frequency = 1 
+ [1] 0.42268 0.50293 0.52452 0.52472 0.53055 0.53692 0.53880 0.53884 0.53910
+[10] 0.53952 0.53970 0.53971
+
+> 
+> (fit <- arima(USAccDeaths, order = c(0,1,1),
++               seasonal = list(order = c(0,1,1))))
+
+Call:
+arima(x = USAccDeaths, order = c(0, 1, 1), seasonal = list(order = c(0, 1, 1)))
+
+Coefficients:
+         ma1    sma1
+      -0.430  -0.553
+s.e.   0.123   0.178
+
+sigma^2 estimated as 99347:  log likelihood = -425.44,  aic = 856.88
+> predict(fit, n.ahead = 6)
+$pred
+        Jan    Feb    Mar    Apr    May    Jun
+1979 8336.1 7531.8 8314.6 8616.9 9488.9 9859.8
+
+$se
+        Jan    Feb    Mar    Apr    May    Jun
+1979 315.45 363.01 405.02 443.06 478.09 510.72
+
+> options(od)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("predict.glm")
+> ### * predict.glm
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: predict.glm
+> ### Title: Predict Method for GLM Fits
+> ### Aliases: predict.glm
+> ### Keywords: models regression
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> ## example from Venables and Ripley (2002, pp. 190-2.)
+> ldose <- rep(0:5, 2)
+> numdead <- c(1, 4, 9, 13, 18, 20, 0, 2, 6, 10, 12, 16)
+> sex <- factor(rep(c("M", "F"), c(6, 6)))
+> SF <- cbind(numdead, numalive = 20-numdead)
+> budworm.lg <- glm(SF ~ sex*ldose, family = binomial)
+> summary(budworm.lg)
+
+Call:
+glm(formula = SF ~ sex * ldose, family = binomial)
+
+Deviance Residuals: 
+     Min        1Q    Median        3Q       Max  
+-1.39849  -0.32094  -0.07592   0.38220   1.10375  
+
+Coefficients:
+            Estimate Std. Error z value Pr(>|z|)    
+(Intercept)  -2.9935     0.5527  -5.416 6.09e-08 ***
+sexM          0.1750     0.7783   0.225    0.822    
+ldose         0.9060     0.1671   5.422 5.89e-08 ***
+sexM:ldose    0.3529     0.2700   1.307    0.191    
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+(Dispersion parameter for binomial family taken to be 1)
+
+    Null deviance: 124.8756  on 11  degrees of freedom
+Residual deviance:   4.9937  on  8  degrees of freedom
+AIC: 43.104
+
+Number of Fisher Scoring iterations: 4
+
+> 
+> plot(c(1,32), c(0,1), type = "n", xlab = "dose",
++      ylab = "prob", log = "x")
+> text(2^ldose, numdead/20, as.character(sex))
+> ld <- seq(0, 5, 0.1)
+> lines(2^ld, predict(budworm.lg, data.frame(ldose = ld,
++    sex = factor(rep("M", length(ld)), levels = levels(sex))),
++    type = "response"))
+> lines(2^ld, predict(budworm.lg, data.frame(ldose = ld,
++    sex = factor(rep("F", length(ld)), levels = levels(sex))),
++    type = "response"))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("predict.lm")
+> ### * predict.lm
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: predict.lm
+> ### Title: Predict method for Linear Model Fits
+> ### Aliases: predict.lm
+> ### Keywords: regression
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> ## Predictions
+> x <- rnorm(15)
+> y <- x + rnorm(15)
+> predict(lm(y ~ x))
+         1          2          3          4          5          6          7 
+-0.6270917  0.2550840 -0.8548779  1.7923222  0.4139268 -0.8383687  0.5858991 
+         8          9         10         11         12         13         14 
+ 0.8591183  0.6821126 -0.2774594  1.7013932  0.4796306 -0.6214146 -2.3566523 
+        15 
+ 1.2801229 
+> new <- data.frame(x = seq(-3, 3, 0.5))
+> predict(lm(y ~ x), new, se.fit = TRUE)
+$fit
+          1           2           3           4           5           6 
+-3.21182462 -2.66733702 -2.12284942 -1.57836182 -1.03387422 -0.48938662 
+          7           8           9          10          11          12 
+ 0.05510098  0.59958858  1.14407618  1.68856379  2.23305139  2.77753899 
+         13 
+ 3.32202659 
+
+$se.fit
+        1         2         3         4         5         6         7         8 
+0.7545246 0.6449274 0.5380108 0.4357521 0.3423511 0.2672616 0.2292452 0.2461261 
+        9        10        11        12        13 
+0.3090353 0.3966456 0.4960370 0.6013965 0.7100725 
+
+$df
+[1] 13
+
+$residual.scale
+[1] 0.8832292
+
+> pred.w.plim <- predict(lm(y ~ x), new, interval = "prediction")
+> pred.w.clim <- predict(lm(y ~ x), new, interval = "confidence")
+> matplot(new$x, cbind(pred.w.clim, pred.w.plim[,-1]),
++         lty = c(1,2,2,3,3), type = "l", ylab = "predicted y")
+> 
+> ## Prediction intervals, special cases
+> ##  The first three of these throw warnings
+> w <- 1 + x^2
+> fit <- lm(y ~ x)
+> wfit <- lm(y ~ x, weights = w)
+> predict(fit, interval = "prediction")
+Warning in predict.lm(fit, interval = "prediction") :
+  predictions on current data refer to _future_ responses
+
+          fit        lwr         upr
+1  -0.6270917 -2.6311852  1.37700188
+2   0.2550840 -1.7160306  2.22619860
+3  -0.8548779 -2.8806560  1.17090027
+4   1.7923222 -0.3158417  3.90048609
+5   0.4139268 -1.5600794  2.38793297
+6  -0.8383687 -2.8624006  1.18566313
+7   0.5858991 -1.3942769  2.56607519
+8   0.8591183 -1.1372816  2.85551813
+9   0.6821126 -1.3028836  2.66710884
+10 -0.2774594 -2.2586227  1.70370390
+11  1.7013932 -0.3922734  3.79505973
+12  0.4796306 -1.4963611  2.45562227
+13 -0.6214146 -2.6250348  1.38220556
+14 -2.3566523 -4.6435457 -0.06975883
+15  1.2801229 -0.7562734  3.31651909
+> predict(wfit, interval = "prediction")
+Warning in predict.lm(wfit, interval = "prediction") :
+  predictions on current data refer to _future_ responses
+
+Warning in predict.lm(wfit, interval = "prediction") :
+  assuming prediction variance inversely proportional to weights used for fitting
+
+          fit        lwr        upr
+1  -0.6795401 -2.7152943  1.3562142
+2   0.2726114 -2.0676598  2.6128825
+3  -0.9253947 -2.7873163  0.9365269
+4   1.9317861  0.5179227  3.3456495
+5   0.4440538 -1.8206181  2.7087257
+6  -0.9075760 -2.7817747  0.9666227
+7   0.6296673 -1.5219043  2.7812390
+8   0.9245587 -1.0206112  2.8697287
+9   0.7335126 -1.3468740  2.8138992
+10 -0.3021743 -2.5805044  1.9761557
+11  1.8336444  0.3867018  3.2805870
+12  0.5149694 -1.7094216  2.7393604
+13 -0.6734127 -2.7135353  1.3667099
+14 -2.5462925 -3.8073357 -1.2852494
+15  1.3789581 -0.2749888  3.0329051
+> predict(wfit, new, interval = "prediction")
+Warning in predict.lm(wfit, new, interval = "prediction") :
+  Assuming constant prediction variance even though model fit is weighted
+
+           fit         lwr        upr
+1  -3.46929871 -6.02669183 -0.9119056
+2  -2.88162137 -5.38456191 -0.3786808
+3  -2.29394403 -4.75159401  0.1637059
+4  -1.70626669 -4.12830217  0.7157688
+5  -1.11858935 -3.51511782  1.2779391
+6  -0.53091201 -2.91236575  1.8505417
+7   0.05676532 -2.32024444  2.4337751
+8   0.64444266 -1.73881338  3.0276987
+9   1.23212000 -1.16798909  3.6322291
+10  1.81979734 -0.60755066  4.2471453
+11  2.40747468 -0.05715376  4.8721031
+12  2.99515202  0.48364874  5.5066553
+13  3.58282936  1.01538228  6.1502764
+> predict(wfit, new, interval = "prediction", weights = (new$x)^2)
+           fit        lwr         upr
+1  -3.46929871 -4.7661745 -2.17242292
+2  -2.88162137 -4.1752786 -1.58796414
+3  -2.29394403 -3.6870669 -0.90082115
+4  -1.70626669 -3.3884596 -0.02407382
+5  -1.11858935 -3.5151178  1.27793911
+6  -0.53091201 -5.2286061  4.16678211
+7   0.05676532       -Inf         Inf
+8   0.64444266 -4.0541654  5.34305071
+9   1.23212000 -1.1679891  3.63222909
+10  1.81979734  0.1299644  3.50963027
+11  2.40747468  1.0020775  3.81287188
+12  2.99515202  1.6850045  4.30529950
+13  3.58282936  2.2662384  4.89942029
+> predict(wfit, new, interval = "prediction", weights = ~x^2)
+           fit        lwr         upr
+1  -3.46929871 -4.7661745 -2.17242292
+2  -2.88162137 -4.1752786 -1.58796414
+3  -2.29394403 -3.6870669 -0.90082115
+4  -1.70626669 -3.3884596 -0.02407382
+5  -1.11858935 -3.5151178  1.27793911
+6  -0.53091201 -5.2286061  4.16678211
+7   0.05676532       -Inf         Inf
+8   0.64444266 -4.0541654  5.34305071
+9   1.23212000 -1.1679891  3.63222909
+10  1.81979734  0.1299644  3.50963027
+11  2.40747468  1.0020775  3.81287188
+12  2.99515202  1.6850045  4.30529950
+13  3.58282936  2.2662384  4.89942029
+> 
+> ##-- From  aov(.) example ---- predict(.. terms)
+> npk.aov <- aov(yield ~ block + N*P*K, npk)
+> (termL <- attr(terms(npk.aov), "term.labels"))
+[1] "block" "N"     "P"     "K"     "N:P"   "N:K"   "P:K"   "N:P:K"
+> (pt <- predict(npk.aov, type = "terms"))
+    block      N          P          K        N:P    N:K        P:K N:P:K
+1  -0.850 -4.925  0.2083333 -0.9583333  0.9416667  1.175  0.4250000     0
+2  -0.850  4.925  0.2083333  0.9583333 -2.8250000  1.175 -0.1416667     0
+3  -0.850 -4.925 -0.2083333  0.9583333  0.9416667  1.175 -0.1416667     0
+4  -0.850  4.925 -0.2083333 -0.9583333  0.9416667 -3.525 -0.1416667     0
+5   2.575  4.925 -0.2083333  0.9583333  0.9416667  1.175 -0.1416667     0
+6   2.575  4.925  0.2083333 -0.9583333 -2.8250000 -3.525  0.4250000     0
+7   2.575 -4.925 -0.2083333 -0.9583333  0.9416667  1.175 -0.1416667     0
+8   2.575 -4.925  0.2083333  0.9583333  0.9416667  1.175 -0.1416667     0
+9   5.900 -4.925  0.2083333  0.9583333  0.9416667  1.175 -0.1416667     0
+10  5.900  4.925  0.2083333 -0.9583333 -2.8250000 -3.525  0.4250000     0
+11  5.900  4.925 -0.2083333  0.9583333  0.9416667  1.175 -0.1416667     0
+12  5.900 -4.925 -0.2083333 -0.9583333  0.9416667  1.175 -0.1416667     0
+13 -4.750  4.925 -0.2083333  0.9583333  0.9416667  1.175 -0.1416667     0
+14 -4.750  4.925  0.2083333 -0.9583333 -2.8250000 -3.525  0.4250000     0
+15 -4.750 -4.925 -0.2083333 -0.9583333  0.9416667  1.175 -0.1416667     0
+16 -4.750 -4.925  0.2083333  0.9583333  0.9416667  1.175 -0.1416667     0
+17 -4.350  4.925  0.2083333  0.9583333 -2.8250000  1.175 -0.1416667     0
+18 -4.350 -4.925 -0.2083333  0.9583333  0.9416667  1.175 -0.1416667     0
+19 -4.350  4.925 -0.2083333 -0.9583333  0.9416667 -3.525 -0.1416667     0
+20 -4.350 -4.925  0.2083333 -0.9583333  0.9416667  1.175  0.4250000     0
+21  1.475  4.925 -0.2083333 -0.9583333  0.9416667 -3.525 -0.1416667     0
+22  1.475  4.925  0.2083333  0.9583333 -2.8250000  1.175 -0.1416667     0
+23  1.475 -4.925  0.2083333 -0.9583333  0.9416667  1.175  0.4250000     0
+24  1.475 -4.925 -0.2083333  0.9583333  0.9416667  1.175 -0.1416667     0
+attr(,"constant")
+[1] 54.875
+> pt. <- predict(npk.aov, type = "terms", terms = termL[1:4])
+> stopifnot(all.equal(pt[,1:4], pt.,
++                     tolerance = 1e-12, check.attributes = FALSE))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("predict.loess")
+> ### * predict.loess
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: predict.loess
+> ### Title: Predict Loess Curve or Surface
+> ### Aliases: predict.loess
+> ### Keywords: smooth
+> 
+> ### ** Examples
+> 
+> cars.lo <- loess(dist ~ speed, cars)
+> predict(cars.lo, data.frame(speed = seq(5, 30, 1)), se = TRUE)
+$fit
+        1         2         3         4         5         6         7         8 
+ 7.797353 10.002308 12.499786 15.281082 18.446568 21.865315 25.517015 29.350386 
+        9        10        11        12        13        14        15        16 
+33.230660 37.167935 41.205226 45.055736 48.355889 49.824812 51.986702 56.461318 
+       17        18        19        20        21        22        23        24 
+61.959729 68.569313 76.316068 85.212121 95.324047        NA        NA        NA 
+       25        26 
+       NA        NA 
+
+$se.fit
+       1        2        3        4        5        6        7        8 
+7.568120 5.945831 4.990827 4.545284 4.308639 4.115049 3.789542 3.716231 
+       9       10       11       12       13       14       15       16 
+3.776947 4.091747 4.709568 4.245427 4.035929 3.753410 4.004705 4.043190 
+      17       18       19       20       21       22       23       24 
+4.026105 4.074664 4.570818 5.954217 8.302014       NA       NA       NA 
+      25       26 
+      NA       NA 
+
+$residual.scale
+[1] 15.29496
+
+$df
+[1] 44.6179
+
+> # to get extrapolation
+> cars.lo2 <- loess(dist ~ speed, cars,
++   control = loess.control(surface = "direct"))
+> predict(cars.lo2, data.frame(speed = seq(5, 30, 1)), se = TRUE)
+$fit
+         1          2          3          4          5          6          7 
+  7.741006   9.926596  12.442424  15.281082  18.425712  21.865315  25.713413 
+         8          9         10         11         12         13         14 
+ 29.350386  33.230660  37.167935  41.205226  45.781544  48.355889  50.067148 
+        15         16         17         18         19         20         21 
+ 51.986702  56.445263  62.025404  68.569313  76.193111  85.053364  95.300523 
+        22         23         24         25         26 
+106.974661 120.092581 134.665851 150.698545 168.190283 
+
+$se.fit
+        1         2         3         4         5         6         7         8 
+ 7.565991  5.959097  5.012013  4.550013  4.321596  4.119331  3.939804  3.720098 
+        9        10        11        12        13        14        15        16 
+ 3.780877  4.096004  4.714469  4.398936  4.040129  4.184257  4.008873  4.061865 
+       17        18        19        20        21        22        23        24 
+ 4.033998  4.078904  4.584606  5.952480  8.306901 11.601911 15.792480 20.864660 
+       25        26 
+26.823827 33.683999 
+
+$residual.scale
+[1] 15.31087
+
+$df
+[1] 44.55085
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("predict.nls")
+> ### * predict.nls
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: predict.nls
+> ### Title: Predicting from Nonlinear Least Squares Fits
+> ### Aliases: predict.nls
+> ### Keywords: nonlinear regression models
+> 
+> ### ** Examples
+> 
+> ## Don't show: 
+> od <- options(digits = 5)
+> ## End(Don't show)
+> require(graphics)
+> 
+> fm <- nls(demand ~ SSasympOrig(Time, A, lrc), data = BOD)
+> predict(fm)              # fitted values at observed times
+[1]  7.8874 12.5250 15.2517 16.8549 17.7975 18.6776
+> ## Form data plot and smooth line for the predictions
+> opar <- par(las = 1)
+> plot(demand ~ Time, data = BOD, col = 4,
++      main = "BOD data and fitted first-order curve",
++      xlim = c(0,7), ylim = c(0, 20) )
+> tt <- seq(0, 8, length = 101)
+> lines(tt, predict(fm, list(Time = tt)))
+> par(opar)
+> ## Don't show: 
+> options(od)
+> ## End(Don't show)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("predict.smooth.spline")
+> ### * predict.smooth.spline
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: predict.smooth.spline
+> ### Title: Predict from Smoothing Spline Fit
+> ### Aliases: predict.smooth.spline
+> ### Keywords: smooth
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> attach(cars)
+> cars.spl <- smooth.spline(speed, dist, df = 6.4)
+> ## Don't show: 
+> print.default(cars.spl)
+$x
+ [1]  4  7  8  9 10 11 12 13 14 15 16 17 18 19 20 22 23 24 25
+
+$y
+ [1]  5.833836 12.575603 15.037250 17.795007 20.935898 24.228479 28.488199
+ [8] 33.969567 38.578804 40.986090 43.494687 47.156344 50.862366 52.692043
+[15] 54.754531 66.036824 75.010419 85.290273 95.014670
+
+$w
+ [1] 2 2 1 1 3 2 4 4 4 3 2 3 4 3 5 1 1 4 1
+
+$yin
+ [1]  6.00000 13.00000 16.00000 10.00000 26.00000 22.50000 21.50000 35.00000
+ [9] 50.50000 33.33333 36.00000 40.66667 64.50000 50.00000 50.40000 66.00000
+[17] 54.00000 93.75000 85.00000
+
+$data
+$data$x
+ [1]  4  4  7  7  8  9 10 10 10 11 11 12 12 12 12 13 13 13 13 14 14 14 14 15 15
+[26] 15 16 16 17 17 17 18 18 18 18 19 19 19 20 20 20 20 20 22 23 24 24 24 24 25
+
+$data$y
+ [1]   2  10   4  22  16  10  18  26  34  17  28  14  20  24  28  26  34  34  46
+[20]  26  36  60  80  20  26  54  32  40  32  40  50  42  56  76  84  36  46  68
+[39]  32  48  52  56  64  66  54  70  92  93 120  85
+
+$data$w
+ [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
+[39] 1 1 1 1 1 1 1 1 1 1 1 1
+
+
+$lev
+ [1] 0.8934338 0.4379689 0.1842314 0.1529048 0.3641292 0.2022506 0.3399561
+ [8] 0.3123173 0.3248036 0.2745481 0.1965797 0.2777060 0.3368286 0.2546068
+[15] 0.5210306 0.1743541 0.1531692 0.6249904 0.3750748
+
+$cv.crit
+[1] 257.2678
+
+$pen.crit
+[1] 3015.936
+
+$crit
+[1] 3
+
+$df
+[1] 6.400884
+
+$spar
+[1] 0.4873957
+
+$lambda
+[1] 0.0008526606
+
+$iparms
+icrit ispar  iter 
+    3     0    13 
+
+$fit
+$knot
+ [1] 0.0000000 0.0000000 0.0000000 0.0000000 0.1428571 0.1904762 0.2380952
+ [8] 0.2857143 0.3333333 0.3809524 0.4285714 0.4761905 0.5238095 0.5714286
+[15] 0.6190476 0.6666667 0.7142857 0.7619048 0.8571429 0.9047619 0.9523810
+[22] 1.0000000 1.0000000 1.0000000 1.0000000
+
+$nk
+[1] 21
+
+$min
+[1] 4
+
+$range
+[1] 21
+
+$coef
+ [1]  5.833836  8.018090 10.929996 14.991332 17.703639 20.964154 24.055137
+ [8] 28.186176 34.129352 39.113818 40.888197 43.249931 47.080201 51.367328
+[15] 52.624683 54.840036 62.675393 74.718525 85.502238 91.843521 95.014670
+
+attr(,"class")
+[1] "smooth.spline.fit"
+
+$call
+smooth.spline(x = speed, y = dist, df = 6.4)
+
+attr(,"class")
+[1] "smooth.spline"
+> ## End(Don't show)
+> 
+> ## "Proof" that the derivatives are okay, by comparing with approximation
+> diff.quot <- function(x, y) {
++   ## Difference quotient (central differences where available)
++   n <- length(x); i1 <- 1:2; i2 <- (n-1):n
++   c(diff(y[i1]) / diff(x[i1]), (y[-i1] - y[-i2]) / (x[-i1] - x[-i2]),
++     diff(y[i2]) / diff(x[i2]))
++ }
+> 
+> xx <- unique(sort(c(seq(0, 30, by = .2), kn <- unique(speed))))
+> i.kn <- match(kn, xx)   # indices of knots within xx
+> op <- par(mfrow = c(2,2))
+> plot(speed, dist, xlim = range(xx), main = "Smooth.spline & derivatives")
+> lines(pp <- predict(cars.spl, xx), col = "red")
+> points(kn, pp$y[i.kn], pch = 3, col = "dark red")
+> mtext("s(x)", col = "red")
+> for(d in 1:3){
++   n <- length(pp$x)
++   plot(pp$x, diff.quot(pp$x,pp$y), type = "l", xlab = "x", ylab = "",
++        col = "blue", col.main = "red",
++        main = paste0("s" ,paste(rep("'", d), collapse = ""), "(x)"))
++   mtext("Difference quotient approx.(last)", col = "blue")
++   lines(pp <- predict(cars.spl, xx, deriv = d), col = "red")
++ ## Don't show: 
++   print(pp)
++ ## End(Don't show)
++   points(kn, pp$y[i.kn], pch = 3, col = "dark red")
++   abline(h = 0, lty = 3, col = "gray")
++ }
+$x
+  [1]  0.0  0.2  0.4  0.6  0.8  1.0  1.2  1.4  1.6  1.8  2.0  2.2  2.4  2.6  2.8
+ [16]  3.0  3.2  3.4  3.6  3.8  4.0  4.2  4.4  4.6  4.8  5.0  5.2  5.4  5.6  5.8
+ [31]  6.0  6.2  6.4  6.6  6.8  7.0  7.2  7.4  7.6  7.8  8.0  8.2  8.4  8.6  8.8
+ [46]  9.0  9.2  9.4  9.6  9.8 10.0 10.2 10.4 10.6 10.8 11.0 11.2 11.4 11.6 11.8
+ [61] 12.0 12.2 12.4 12.6 12.8 13.0 13.2 13.4 13.6 13.8 14.0 14.2 14.4 14.6 14.8
+ [76] 15.0 15.2 15.4 15.6 15.8 16.0 16.2 16.4 16.6 16.8 17.0 17.2 17.4 17.6 17.8
+ [91] 18.0 18.2 18.4 18.6 18.8 19.0 19.2 19.4 19.6 19.8 20.0 20.2 20.4 20.6 20.8
+[106] 21.0 21.2 21.4 21.6 21.8 22.0 22.2 22.4 22.6 22.8 23.0 23.2 23.4 23.6 23.8
+[121] 24.0 24.2 24.4 24.6 24.8 25.0 25.2 25.4 25.6 25.8 26.0 26.2 26.4 26.6 26.8
+[136] 27.0 27.2 27.4 27.6 27.8 28.0 28.2 28.4 28.6 28.8 29.0 29.2 29.4 29.6 29.8
+[151] 30.0
+
+$y
+  [1]  2.184254  2.184254  2.184254  2.184254  2.184254  2.184254  2.184254
+  [8]  2.184254  2.184254  2.184254  2.184254  2.184254  2.184254  2.184254
+ [15]  2.184254  2.184254  2.184254  2.184254  2.184254  2.184254  2.184254
+ [22]  2.185055  2.187545  2.191723  2.197591  2.205146  2.214391  2.225324
+ [29]  2.237946  2.252257  2.268256  2.285944  2.305321  2.326387  2.349141
+ [36]  2.373584  2.401852  2.436084  2.476278  2.522435  2.574554  2.635109
+ [43]  2.706573  2.788944  2.882223  2.986411  3.081697  3.148275  3.186142
+ [50]  3.195300  3.175749  3.166034  3.204703  3.291756  3.427192  3.611011
+ [57]  3.834464  4.088800  4.374019  4.690122  5.037108  5.344118  5.540295
+ [64]  5.625638  5.600147  5.463821  5.227052  4.900227  4.483347  3.976412
+ [71]  3.379422  2.813354  2.399183  2.136910  2.026534  2.068056  2.203151
+ [78]  2.373493  2.579082  2.819918  3.096002  3.369475  3.602482  3.795021
+ [85]  3.947094  4.058699  4.080338  3.962512  3.705220  3.308463  2.772241
+ [92]  2.234965  1.835047  1.572485  1.447281  1.459435  1.588383  1.813566
+ [99]  2.134982  2.552632  3.066516  3.621455  4.162272  4.688967  5.201539
+[106]  5.699989  6.184317  6.654523  7.110606  7.552567  7.980405  8.394132
+[113]  8.793758  9.179284  9.550708  9.908031 10.197841 10.366724 10.414682
+[120] 10.341713 10.147818  9.918957  9.741090  9.614215  9.538335  9.513448
+[127]  9.513448  9.513448  9.513448  9.513448  9.513448  9.513448  9.513448
+[134]  9.513448  9.513448  9.513448  9.513448  9.513448  9.513448  9.513448
+[141]  9.513448  9.513448  9.513448  9.513448  9.513448  9.513448  9.513448
+[148]  9.513448  9.513448  9.513448  9.513448
+
+$x
+  [1]  0.0  0.2  0.4  0.6  0.8  1.0  1.2  1.4  1.6  1.8  2.0  2.2  2.4  2.6  2.8
+ [16]  3.0  3.2  3.4  3.6  3.8  4.0  4.2  4.4  4.6  4.8  5.0  5.2  5.4  5.6  5.8
+ [31]  6.0  6.2  6.4  6.6  6.8  7.0  7.2  7.4  7.6  7.8  8.0  8.2  8.4  8.6  8.8
+ [46]  9.0  9.2  9.4  9.6  9.8 10.0 10.2 10.4 10.6 10.8 11.0 11.2 11.4 11.6 11.8
+ [61] 12.0 12.2 12.4 12.6 12.8 13.0 13.2 13.4 13.6 13.8 14.0 14.2 14.4 14.6 14.8
+ [76] 15.0 15.2 15.4 15.6 15.8 16.0 16.2 16.4 16.6 16.8 17.0 17.2 17.4 17.6 17.8
+ [91] 18.0 18.2 18.4 18.6 18.8 19.0 19.2 19.4 19.6 19.8 20.0 20.2 20.4 20.6 20.8
+[106] 21.0 21.2 21.4 21.6 21.8 22.0 22.2 22.4 22.6 22.8 23.0 23.2 23.4 23.6 23.8
+[121] 24.0 24.2 24.4 24.6 24.8 25.0 25.2 25.4 25.6 25.8 26.0 26.2 26.4 26.6 26.8
+[136] 27.0 27.2 27.4 27.6 27.8 28.0 28.2 28.4 28.6 28.8 29.0 29.2 29.4 29.6 29.8
+[151] 30.0
+
+$y
+  [1]  0.0000000000  0.0000000000  0.0000000000  0.0000000000  0.0000000000
+  [6]  0.0000000000  0.0000000000  0.0000000000  0.0000000000  0.0000000000
+ [11]  0.0000000000  0.0000000000  0.0000000000  0.0000000000  0.0000000000
+ [16]  0.0000000000  0.0000000000  0.0000000000  0.0000000000  0.0000000000
+ [21] -0.0002165147  0.0082269950  0.0166705047  0.0251140144  0.0335575241
+ [26]  0.0420010338  0.0504445435  0.0588880532  0.0673315629  0.0757750726
+ [31]  0.0842185822  0.0926620919  0.1011056016  0.1095491113  0.1179926210
+ [36]  0.1264361307  0.1562499762  0.1860638217  0.2158776671  0.2456915126
+ [41]  0.2755053581  0.3300457726  0.3845861870  0.4391266015  0.4936670160
+ [46]  0.5482074305  0.4046596591  0.2611118877  0.1175641163 -0.0259836551
+ [51] -0.1695314264  0.0723860374  0.3143035013  0.5562209652  0.7981384291
+ [56]  1.0400558930  1.1944722898  1.3488886866  1.5033050835  1.6577214803
+ [61]  1.8121378771  1.2579681380  0.7037983989  0.1496286598 -0.4045410793
+ [66] -0.9587108185 -1.4089861032 -1.8592613879 -2.3095366727 -2.7598119574
+ [71] -3.2100872422 -2.4505987906 -1.6911103389 -0.9316218873 -0.1721334357
+ [76]  0.5873550159  0.7635912416  0.9398274674  1.1160636931  1.2922999189
+ [81]  1.4685361447  1.2662005031  1.0638648615  0.8615292198  0.6591935782
+ [86]  0.4568579366 -0.2404682740 -0.9377944846 -1.6351206952 -2.3324469058
+ [91] -3.0297731165 -2.3429865119 -1.6561999074 -0.9694133029 -0.2826266984
+ [96]  0.4041599061  0.8853283585  1.3664968109  1.8476652633  2.3288337157
+[101]  2.8100021681  2.7393907024  2.6687792367  2.5981677710  2.5275563053
+[106]  2.4569448396  2.3863333739  2.3157219082  2.2451104425  2.1744989768
+[111]  2.1038875112  2.0333827893  1.9628780674  1.8923733455  1.8218686237
+[116]  1.7513639018  1.1467332516  0.5421026014 -0.0625280487 -0.6671586989
+[121] -1.2717893491 -1.0168219086 -0.7618544680 -0.5068870274 -0.2519195869
+[126]  0.0030478537  0.0000000000  0.0000000000  0.0000000000  0.0000000000
+[131]  0.0000000000  0.0000000000  0.0000000000  0.0000000000  0.0000000000
+[136]  0.0000000000  0.0000000000  0.0000000000  0.0000000000  0.0000000000
+[141]  0.0000000000  0.0000000000  0.0000000000  0.0000000000  0.0000000000
+[146]  0.0000000000  0.0000000000  0.0000000000  0.0000000000  0.0000000000
+[151]  0.0000000000
+
+$x
+  [1]  0.0  0.2  0.4  0.6  0.8  1.0  1.2  1.4  1.6  1.8  2.0  2.2  2.4  2.6  2.8
+ [16]  3.0  3.2  3.4  3.6  3.8  4.0  4.2  4.4  4.6  4.8  5.0  5.2  5.4  5.6  5.8
+ [31]  6.0  6.2  6.4  6.6  6.8  7.0  7.2  7.4  7.6  7.8  8.0  8.2  8.4  8.6  8.8
+ [46]  9.0  9.2  9.4  9.6  9.8 10.0 10.2 10.4 10.6 10.8 11.0 11.2 11.4 11.6 11.8
+ [61] 12.0 12.2 12.4 12.6 12.8 13.0 13.2 13.4 13.6 13.8 14.0 14.2 14.4 14.6 14.8
+ [76] 15.0 15.2 15.4 15.6 15.8 16.0 16.2 16.4 16.6 16.8 17.0 17.2 17.4 17.6 17.8
+ [91] 18.0 18.2 18.4 18.6 18.8 19.0 19.2 19.4 19.6 19.8 20.0 20.2 20.4 20.6 20.8
+[106] 21.0 21.2 21.4 21.6 21.8 22.0 22.2 22.4 22.6 22.8 23.0 23.2 23.4 23.6 23.8
+[121] 24.0 24.2 24.4 24.6 24.8 25.0 25.2 25.4 25.6 25.8 26.0 26.2 26.4 26.6 26.8
+[136] 27.0 27.2 27.4 27.6 27.8 28.0 28.2 28.4 28.6 28.8 29.0 29.2 29.4 29.6 29.8
+[151] 30.0
+
+$y
+  [1]  0.00000000  0.00000000  0.00000000  0.00000000  0.00000000  0.00000000
+  [7]  0.00000000  0.00000000  0.00000000  0.00000000  0.00000000  0.00000000
+ [13]  0.00000000  0.00000000  0.00000000  0.00000000  0.00000000  0.00000000
+ [19]  0.00000000  0.00000000  0.04221755  0.04221755  0.04221755  0.04221755
+ [25]  0.04221755  0.04221755  0.04221755  0.04221755  0.04221755  0.04221755
+ [31]  0.04221755  0.04221755  0.04221755  0.04221755  0.04221755  0.14906923
+ [37]  0.14906923  0.14906923  0.14906923  0.14906923  0.27270207  0.27270207
+ [43]  0.27270207  0.27270207  0.27270207 -0.71773886 -0.71773886 -0.71773886
+ [49] -0.71773886 -0.71773886  1.20958732  1.20958732  1.20958732  1.20958732
+ [55]  1.20958732  0.77208198  0.77208198  0.77208198  0.77208198  0.77208198
+ [61] -2.77084870 -2.77084870 -2.77084870 -2.77084870 -2.77084870 -2.25137642
+ [67] -2.25137642 -2.25137642 -2.25137642 -2.25137642  3.79744226  3.79744226
+ [73]  3.79744226  3.79744226  3.79744226  0.88118113  0.88118113  0.88118113
+ [79]  0.88118113  0.88118113 -1.01167821 -1.01167821 -1.01167821 -1.01167821
+ [85] -1.01167821 -3.48663105 -3.48663105 -3.48663105 -3.48663105 -3.48663105
+ [91]  3.43393302  3.43393302  3.43393302  3.43393302  3.43393302  2.40584226
+ [97]  2.40584226  2.40584226  2.40584226  2.40584226 -0.35305733 -0.35305733
+[103] -0.35305733 -0.35305733 -0.35305733 -0.35305733 -0.35305733 -0.35305733
+[109] -0.35305733 -0.35305733 -0.35252361 -0.35252361 -0.35252361 -0.35252361
+[115] -0.35252361 -3.02315325 -3.02315325 -3.02315325 -3.02315325 -3.02315325
+[121]  1.27483720  1.27483720  1.27483720  1.27483720  1.27483720  1.27483720
+[127]  0.00000000  0.00000000  0.00000000  0.00000000  0.00000000  0.00000000
+[133]  0.00000000  0.00000000  0.00000000  0.00000000  0.00000000  0.00000000
+[139]  0.00000000  0.00000000  0.00000000  0.00000000  0.00000000  0.00000000
+[145]  0.00000000  0.00000000  0.00000000  0.00000000  0.00000000  0.00000000
+[151]  0.00000000
+
+> detach(); par(op)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("princomp")
+> ### * princomp
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: princomp
+> ### Title: Principal Components Analysis
+> ### Aliases: princomp princomp.formula princomp.default plot.princomp
+> ###   print.princomp predict.princomp
+> ### Keywords: multivariate
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> ## The variances of the variables in the
+> ## USArrests data vary by orders of magnitude, so scaling is appropriate
+> (pc.cr <- princomp(USArrests))  # inappropriate
+Call:
+princomp(x = USArrests)
+
+Standard deviations:
+   Comp.1    Comp.2    Comp.3    Comp.4 
+82.890847 14.069560  6.424204  2.457837 
+
+ 4  variables and  50 observations.
+> princomp(USArrests, cor = TRUE) # =^= prcomp(USArrests, scale=TRUE)
+Call:
+princomp(x = USArrests, cor = TRUE)
+
+Standard deviations:
+   Comp.1    Comp.2    Comp.3    Comp.4 
+1.5748783 0.9948694 0.5971291 0.4164494 
+
+ 4  variables and  50 observations.
+> ## Similar, but different:
+> ## The standard deviations differ by a factor of sqrt(49/50)
+> 
+> summary(pc.cr <- princomp(USArrests, cor = TRUE))
+Importance of components:
+                          Comp.1    Comp.2    Comp.3     Comp.4
+Standard deviation     1.5748783 0.9948694 0.5971291 0.41644938
+Proportion of Variance 0.6200604 0.2474413 0.0891408 0.04335752
+Cumulative Proportion  0.6200604 0.8675017 0.9566425 1.00000000
+> loadings(pc.cr)  # note that blank entries are small but not zero
+
+Loadings:
+         Comp.1 Comp.2 Comp.3 Comp.4
+Murder   -0.536  0.418 -0.341  0.649
+Assault  -0.583  0.188 -0.268 -0.743
+UrbanPop -0.278 -0.873 -0.378  0.134
+Rape     -0.543 -0.167  0.818       
+
+               Comp.1 Comp.2 Comp.3 Comp.4
+SS loadings      1.00   1.00   1.00   1.00
+Proportion Var   0.25   0.25   0.25   0.25
+Cumulative Var   0.25   0.50   0.75   1.00
+> ## The signs of the columns are arbitrary
+> plot(pc.cr) # shows a screeplot.
+> biplot(pc.cr)
+> 
+> ## Formula interface
+> princomp(~ ., data = USArrests, cor = TRUE)
+Call:
+princomp(formula = ~., data = USArrests, cor = TRUE)
+
+Standard deviations:
+   Comp.1    Comp.2    Comp.3    Comp.4 
+1.5748783 0.9948694 0.5971291 0.4164494 
+
+ 4  variables and  50 observations.
+> 
+> ## NA-handling
+> USArrests[1, 2] <- NA
+> pc.cr <- princomp(~ Murder + Assault + UrbanPop,
++                   data = USArrests, na.action = na.exclude, cor = TRUE)
+> 
+> ## (Simple) Robust PCA:
+> ## Classical:
+> (pc.cl  <- princomp(stackloss))
+Call:
+princomp(x = stackloss)
+
+Standard deviations:
+   Comp.1    Comp.2    Comp.3    Comp.4 
+13.596589  4.676077  2.617533  1.366320 
+
+ 4  variables and  21 observations.
+> 
+> 
+> cleanEx()
+> nameEx("print.power.htest")
+> ### * print.power.htest
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: print.power.htest
+> ### Title: Print Methods for Hypothesis Tests and Power Calculation Objects
+> ### Aliases: print.htest print.power.htest
+> ### Keywords: htest
+> 
+> ### ** Examples
+> 
+> (ptt <- power.t.test(n = 20, delta = 1))
+
+     Two-sample t test power calculation 
+
+              n = 20
+          delta = 1
+             sd = 1
+      sig.level = 0.05
+          power = 0.8689528
+    alternative = two.sided
+
+NOTE: n is number in *each* group
+
+> print(ptt, digits =  4) # using less digits than default
+
+     Two-sample t test power calculation 
+
+              n = 20
+          delta = 1
+             sd = 1
+      sig.level = 0.05
+          power = 0.869
+    alternative = two.sided
+
+NOTE: n is number in *each* group
+
+> print(ptt, digits = 12) # using more  "       "     "
+
+     Two-sample t test power calculation 
+
+              n = 20
+          delta = 1
+             sd = 1
+      sig.level = 0.05
+          power = 0.868952801692
+    alternative = two.sided
+
+NOTE: n is number in *each* group
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("print.ts")
+> ### * print.ts
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: print.ts
+> ### Title: Printing and Formatting of Time-Series Objects
+> ### Aliases: .preformat.ts print.ts
+> ### Keywords: ts
+> 
+> ### ** Examples
+> 
+> print(ts(1:10, frequency = 7, start = c(12, 2)), calendar = TRUE)
+   p1 p2 p3 p4 p5 p6 p7
+12     1  2  3  4  5  6
+13  7  8  9 10         
+> 
+> print(sunsp.1 <- window(sunspot.month, end=c(1756, 12)))
+       Jan   Feb   Mar   Apr   May   Jun   Jul   Aug   Sep   Oct   Nov   Dec
+1749  58.0  62.6  70.0  55.7  85.0  83.5  94.8  66.3  75.9  75.5 158.6  85.2
+1750  73.3  75.9  89.2  88.3  90.0 100.0  85.4 103.0  91.2  65.7  63.3  75.4
+1751  70.0  43.5  45.3  56.4  60.7  50.7  66.3  59.8  23.5  23.2  28.5  44.0
+1752  35.0  50.0  71.0  59.3  59.7  39.6  78.4  29.3  27.1  46.6  37.6  40.0
+1753  44.0  32.0  45.7  38.0  36.0  31.7  22.0  39.0  28.0  25.0  20.0   6.7
+1754   0.0   3.0   1.7  13.7  20.7  26.7  18.8  12.3   8.2  24.1  13.2   4.2
+1755  10.2  11.2   6.8   6.5   0.0   0.0   8.6   3.2  17.8  23.7   6.8  20.0
+1756  12.5   7.1   5.4   9.4  12.5  12.9   3.6   6.4  11.8  14.3  17.0   9.4
+> m <- .preformat.ts(sunsp.1) # a character matrix
+> 
+> 
+> 
+> cleanEx()
+> nameEx("printCoefmat")
+> ### * printCoefmat
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: printCoefmat
+> ### Title: Print Coefficient Matrices
+> ### Aliases: printCoefmat
+> ### Keywords: print
+> 
+> ### ** Examples
+> 
+> cmat <- cbind(rnorm(3, 10), sqrt(rchisq(3, 12)))
+> cmat <- cbind(cmat, cmat[, 1]/cmat[, 2])
+> cmat <- cbind(cmat, 2*pnorm(-cmat[, 3]))
+> colnames(cmat) <- c("Estimate", "Std.Err", "Z value", "Pr(>z)")
+> printCoefmat(cmat[, 1:3])
+     Estimate Std.Err Z value
+[1,]   9.3735  4.4447  2.1089
+[2,]  10.1836  3.5496  2.8689
+[3,]   9.1644  2.7365  3.3490
+> printCoefmat(cmat)
+     Estimate Std.Err Z value    Pr(>z)    
+[1,]   9.3735  4.4447  2.1089 0.0349492 *  
+[2,]  10.1836  3.5496  2.8689 0.0041185 ** 
+[3,]   9.1644  2.7365  3.3490 0.0008111 ***
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> op <- options(show.coef.Pvalues = FALSE)
+> printCoefmat(cmat, digits = 2)
+     Estimate Std.Err Z value
+[1,]      9.4     4.4     2.1
+[2,]     10.2     3.5     2.9
+[3,]      9.2     2.7     3.3
+> printCoefmat(cmat, digits = 2, P.values = TRUE)
+     Estimate Std.Err Z value Pr(>z)    
+[1,]      9.4     4.4     2.1  0.035 *  
+[2,]     10.2     3.5     2.9  0.004 ** 
+[3,]      9.2     2.7     3.3  8e-04 ***
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> options(op) # restore
+> 
+> 
+> 
+> cleanEx()
+> nameEx("profile.nls")
+> ### * profile.nls
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: profile.nls
+> ### Title: Method for Profiling nls Objects
+> ### Aliases: profile.nls
+> ### Keywords: nonlinear regression models
+> 
+> ### ** Examples
+> 
+> ## Don't show: 
+> od <- options(digits = 4)
+> ## End(Don't show)
+> # obtain the fitted object
+> fm1 <- nls(demand ~ SSasympOrig(Time, A, lrc), data = BOD)
+> # get the profile for the fitted model: default level is too extreme
+> pr1 <- profile(fm1, alpha = 0.05)
+> # profiled values for the two parameters
+> pr1$A
+       tau par.vals.A par.vals.lrc
+1  -3.0873   13.59751      0.14033
+2  -2.4957   14.46884      0.01607
+3  -1.8906   15.41836     -0.11787
+4  -1.2634   16.49088     -0.26877
+5  -0.6080   17.75662     -0.44553
+6   0.0000   19.14258     -0.63282
+7   0.4998   20.52853     -0.80750
+8   0.9465   22.06851     -0.98233
+9   1.3780   23.98253     -1.17103
+10  1.7908   26.44552     -1.37431
+11  2.1841   29.75928     -1.59599
+12  2.5559   34.43804     -1.84209
+13  2.9028   41.42542     -2.12176
+> pr1$lrc
+       tau par.vals.A par.vals.lrc
+1  -2.9550  42.395076    -2.184153
+2  -2.5201  33.446683    -1.836926
+3  -2.0570  28.124205    -1.547326
+4  -1.5710  24.656989    -1.293871
+5  -1.0653  22.245847    -1.063030
+6  -0.5412  20.482887    -0.845157
+7   0.0000  19.142578    -0.632822
+8   0.5539  18.095015    -0.420487
+9   1.1022  17.273414    -0.207623
+10  1.6298  16.621533     0.007939
+11  2.1335  16.086803     0.234850
+12  2.6052  15.638807     0.485009
+13  3.0276  15.265409     0.779458
+> # see also example(plot.profile.nls)
+> ## Don't show: 
+> options(od)
+> ## End(Don't show)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("proj")
+> ### * proj
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: proj
+> ### Title: Projections of Models
+> ### Aliases: proj proj.default proj.lm proj.aov proj.aovlist
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> N <- c(0,1,0,1,1,1,0,0,0,1,1,0,1,1,0,0,1,0,1,0,1,1,0,0)
+> P <- c(1,1,0,0,0,1,0,1,1,1,0,0,0,1,0,1,1,0,0,1,0,1,1,0)
+> K <- c(1,0,0,1,0,1,1,0,0,1,0,1,0,1,1,0,0,0,1,1,1,0,1,0)
+> yield <- c(49.5,62.8,46.8,57.0,59.8,58.5,55.5,56.0,62.8,55.8,69.5,
++ 55.0, 62.0,48.8,45.5,44.2,52.0,51.5,49.8,48.8,57.2,59.0,53.2,56.0)
+> 
+> npk <- data.frame(block = gl(6,4), N = factor(N), P = factor(P),
++                   K = factor(K), yield = yield)
+> npk.aov <- aov(yield ~ block + N*P*K, npk)
+> proj(npk.aov)
+   (Intercept)  block         N          P         K        N:P    N:K
+1       54.875 -0.850 -2.808333 -0.5916667 -1.991667  0.9416667  1.175
+2       54.875 -0.850  2.808333 -0.5916667  1.991667 -0.9416667  1.175
+3       54.875 -0.850 -2.808333  0.5916667  1.991667 -0.9416667 -1.175
+4       54.875 -0.850  2.808333  0.5916667 -1.991667  0.9416667 -1.175
+5       54.875  2.575  2.808333  0.5916667  1.991667  0.9416667  1.175
+6       54.875  2.575  2.808333 -0.5916667 -1.991667 -0.9416667 -1.175
+7       54.875  2.575 -2.808333  0.5916667 -1.991667 -0.9416667  1.175
+8       54.875  2.575 -2.808333 -0.5916667  1.991667  0.9416667 -1.175
+9       54.875  5.900 -2.808333 -0.5916667  1.991667  0.9416667 -1.175
+10      54.875  5.900  2.808333 -0.5916667 -1.991667 -0.9416667 -1.175
+11      54.875  5.900  2.808333  0.5916667  1.991667  0.9416667  1.175
+12      54.875  5.900 -2.808333  0.5916667 -1.991667 -0.9416667  1.175
+13      54.875 -4.750  2.808333  0.5916667  1.991667  0.9416667  1.175
+14      54.875 -4.750  2.808333 -0.5916667 -1.991667 -0.9416667 -1.175
+15      54.875 -4.750 -2.808333  0.5916667 -1.991667 -0.9416667  1.175
+16      54.875 -4.750 -2.808333 -0.5916667  1.991667  0.9416667 -1.175
+17      54.875 -4.350  2.808333 -0.5916667  1.991667 -0.9416667  1.175
+18      54.875 -4.350 -2.808333  0.5916667  1.991667 -0.9416667 -1.175
+19      54.875 -4.350  2.808333  0.5916667 -1.991667  0.9416667 -1.175
+20      54.875 -4.350 -2.808333 -0.5916667 -1.991667  0.9416667  1.175
+21      54.875  1.475  2.808333  0.5916667 -1.991667  0.9416667 -1.175
+22      54.875  1.475  2.808333 -0.5916667  1.991667 -0.9416667  1.175
+23      54.875  1.475 -2.808333 -0.5916667 -1.991667  0.9416667  1.175
+24      54.875  1.475 -2.808333  0.5916667  1.991667 -0.9416667 -1.175
+          P:K   Residuals
+1   0.1416667 -1.39166667
+2  -0.1416667  4.47500000
+3   0.1416667 -5.02500000
+4  -0.1416667  1.94166667
+5   0.1416667 -5.30000000
+6   0.1416667  2.80000000
+7  -0.1416667  2.16666667
+8  -0.1416667  0.33333333
+9  -0.1416667  3.80833333
+10  0.1416667 -3.22500000
+11  0.1416667  1.07500000
+12 -0.1416667 -1.65833333
+13  0.1416667  4.22500000
+14  0.1416667  0.42500000
+15 -0.1416667 -0.50833333
+16 -0.1416667 -4.14166667
+17 -0.1416667 -2.82500000
+18  0.1416667  3.17500000
+19 -0.1416667 -1.75833333
+20  0.1416667  1.40833333
+21 -0.1416667 -0.18333333
+22 -0.1416667 -1.65000000
+23  0.1416667 -0.01666667
+24  0.1416667  1.85000000
+attr(,"df")
+(Intercept)       block           N           P           K         N:P 
+          1           5           1           1           1           1 
+        N:K         P:K   Residuals 
+          1           1          12 
+attr(,"formula")
+yield ~ block + N * P * K
+attr(,"onedf")
+[1] FALSE
+attr(,"factors")
+attr(,"factors")$`(Intercept)`
+[1] "(Intercept)"
+
+attr(,"factors")$block
+[1] "block"
+
+attr(,"factors")$N
+[1] "N"
+
+attr(,"factors")$P
+[1] "P"
+
+attr(,"factors")$K
+[1] "K"
+
+attr(,"factors")$`N:P`
+[1] "N" "P"
+
+attr(,"factors")$`N:K`
+[1] "N" "K"
+
+attr(,"factors")$`P:K`
+[1] "P" "K"
+
+attr(,"factors")$Residuals
+[1] "block"  "N"      "P"      "K"      "Within"
+
+attr(,"call")
+aov(formula = yield ~ block + N * P * K, data = npk)
+attr(,"t.factor")
+      block N P K N:P N:K P:K N:P:K
+yield     0 0 0 0   0   0   0     0
+block     1 0 0 0   0   0   0     0
+N         0 1 0 0   1   1   0     1
+P         0 0 1 0   1   0   1     1
+K         0 0 0 1   0   1   1     1
+attr(,"class")
+[1] "aovproj"
+> 
+> ## as a test, not particularly sensible
+> options(contrasts = c("contr.helmert", "contr.treatment"))
+> npk.aovE <- aov(yield ~  N*P*K + Error(block), npk)
+> proj(npk.aovE)
+(Intercept) :
+   (Intercept)
+1       54.875
+2       54.875
+3       54.875
+4       54.875
+5       54.875
+6       54.875
+7       54.875
+8       54.875
+9       54.875
+10      54.875
+11      54.875
+12      54.875
+13      54.875
+14      54.875
+15      54.875
+16      54.875
+17      54.875
+18      54.875
+19      54.875
+20      54.875
+21      54.875
+22      54.875
+23      54.875
+24      54.875
+attr(,"df")
+attr(,"df")$df
+(Intercept) 
+          1 
+
+attr(,"onedf")
+attr(,"onedf")$onedf
+[1] FALSE
+
+attr(,"factors")
+attr(,"factors")$`(Intercept)`
+[1] "(Intercept)"
+
+
+block :
+       N:P:K  Residuals
+1  -1.241667  0.3916667
+2  -1.241667  0.3916667
+3  -1.241667  0.3916667
+4  -1.241667  0.3916667
+5   1.241667  1.3333333
+6   1.241667  1.3333333
+7   1.241667  1.3333333
+8   1.241667  1.3333333
+9   1.241667  4.6583333
+10  1.241667  4.6583333
+11  1.241667  4.6583333
+12  1.241667  4.6583333
+13  1.241667 -5.9916667
+14  1.241667 -5.9916667
+15  1.241667 -5.9916667
+16  1.241667 -5.9916667
+17 -1.241667 -3.1083333
+18 -1.241667 -3.1083333
+19 -1.241667 -3.1083333
+20 -1.241667 -3.1083333
+21 -1.241667  2.7166667
+22 -1.241667  2.7166667
+23 -1.241667  2.7166667
+24 -1.241667  2.7166667
+attr(,"df")
+attr(,"df")$df
+    N:P:K Residuals 
+        1         4 
+
+attr(,"onedf")
+attr(,"onedf")$onedf
+[1] FALSE
+
+attr(,"factors")
+attr(,"factors")$`N:P:K`
+[1] "N" "P" "K"
+
+attr(,"factors")$Residuals
+[1] "block"
+
+
+Within :
+           N          P         K        N:P    N:K        P:K   Residuals
+1  -2.808333 -0.5916667 -1.991667  0.9416667  1.175  0.1416667 -1.39166667
+2   2.808333 -0.5916667  1.991667 -0.9416667  1.175 -0.1416667  4.47500000
+3  -2.808333  0.5916667  1.991667 -0.9416667 -1.175  0.1416667 -5.02500000
+4   2.808333  0.5916667 -1.991667  0.9416667 -1.175 -0.1416667  1.94166667
+5   2.808333  0.5916667  1.991667  0.9416667  1.175  0.1416667 -5.30000000
+6   2.808333 -0.5916667 -1.991667 -0.9416667 -1.175  0.1416667  2.80000000
+7  -2.808333  0.5916667 -1.991667 -0.9416667  1.175 -0.1416667  2.16666667
+8  -2.808333 -0.5916667  1.991667  0.9416667 -1.175 -0.1416667  0.33333333
+9  -2.808333 -0.5916667  1.991667  0.9416667 -1.175 -0.1416667  3.80833333
+10  2.808333 -0.5916667 -1.991667 -0.9416667 -1.175  0.1416667 -3.22500000
+11  2.808333  0.5916667  1.991667  0.9416667  1.175  0.1416667  1.07500000
+12 -2.808333  0.5916667 -1.991667 -0.9416667  1.175 -0.1416667 -1.65833333
+13  2.808333  0.5916667  1.991667  0.9416667  1.175  0.1416667  4.22500000
+14  2.808333 -0.5916667 -1.991667 -0.9416667 -1.175  0.1416667  0.42500000
+15 -2.808333  0.5916667 -1.991667 -0.9416667  1.175 -0.1416667 -0.50833333
+16 -2.808333 -0.5916667  1.991667  0.9416667 -1.175 -0.1416667 -4.14166667
+17  2.808333 -0.5916667  1.991667 -0.9416667  1.175 -0.1416667 -2.82500000
+18 -2.808333  0.5916667  1.991667 -0.9416667 -1.175  0.1416667  3.17500000
+19  2.808333  0.5916667 -1.991667  0.9416667 -1.175 -0.1416667 -1.75833333
+20 -2.808333 -0.5916667 -1.991667  0.9416667  1.175  0.1416667  1.40833333
+21  2.808333  0.5916667 -1.991667  0.9416667 -1.175 -0.1416667 -0.18333333
+22  2.808333 -0.5916667  1.991667 -0.9416667  1.175 -0.1416667 -1.65000000
+23 -2.808333 -0.5916667 -1.991667  0.9416667  1.175  0.1416667 -0.01666667
+24 -2.808333  0.5916667  1.991667 -0.9416667 -1.175  0.1416667  1.85000000
+attr(,"df")
+attr(,"df")$df
+        N         P         K       N:P       N:K       P:K Residuals 
+        1         1         1         1         1         1        12 
+
+attr(,"onedf")
+attr(,"onedf")$onedf
+[1] FALSE
+
+attr(,"factors")
+attr(,"factors")$N
+[1] "N"
+
+attr(,"factors")$P
+[1] "P"
+
+attr(,"factors")$K
+[1] "K"
+
+attr(,"factors")$`N:P`
+[1] "N" "P"
+
+attr(,"factors")$`N:K`
+[1] "N" "K"
+
+attr(,"factors")$`P:K`
+[1] "P" "K"
+
+attr(,"factors")$Residuals
+[1] "block"  "Within"
+
+
+> 
+> 
+> 
+> base::options(contrasts = c(unordered = "contr.treatment",ordered = "contr.poly"))
+> cleanEx()
+> nameEx("prop.test")
+> ### * prop.test
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: prop.test
+> ### Title: Test of Equal or Given Proportions
+> ### Aliases: prop.test
+> ### Keywords: htest
+> 
+> ### ** Examples
+> 
+> heads <- rbinom(1, size = 100, prob = .5)
+> prop.test(heads, 100)          # continuity correction TRUE by default
+
+	1-sample proportions test with continuity correction
+
+data:  heads out of 100, null probability 0.5
+X-squared = 0.09, df = 1, p-value = 0.7642
+alternative hypothesis: true p is not equal to 0.5
+95 percent confidence interval:
+ 0.4183183 0.6201278
+sample estimates:
+   p 
+0.52 
+
+> prop.test(heads, 100, correct = FALSE)
+
+	1-sample proportions test without continuity correction
+
+data:  heads out of 100, null probability 0.5
+X-squared = 0.16, df = 1, p-value = 0.6892
+alternative hypothesis: true p is not equal to 0.5
+95 percent confidence interval:
+ 0.4231658 0.6153545
+sample estimates:
+   p 
+0.52 
+
+> 
+> ## Data from Fleiss (1981), p. 139.
+> ## H0: The null hypothesis is that the four populations from which
+> ##     the patients were drawn have the same true proportion of smokers.
+> ## A:  The alternative is that this proportion is different in at
+> ##     least one of the populations.
+> 
+> smokers  <- c( 83, 90, 129, 70 )
+> patients <- c( 86, 93, 136, 82 )
+> prop.test(smokers, patients)
+
+	4-sample test for equality of proportions without continuity
+	correction
+
+data:  smokers out of patients
+X-squared = 12.6, df = 3, p-value = 0.005585
+alternative hypothesis: two.sided
+sample estimates:
+   prop 1    prop 2    prop 3    prop 4 
+0.9651163 0.9677419 0.9485294 0.8536585 
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("prop.trend.test")
+> ### * prop.trend.test
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: prop.trend.test
+> ### Title: Test for trend in proportions
+> ### Aliases: prop.trend.test
+> ### Keywords: htest
+> 
+> ### ** Examples
+> 
+> smokers  <- c( 83, 90, 129, 70 )
+> patients <- c( 86, 93, 136, 82 )
+> prop.test(smokers, patients)
+
+	4-sample test for equality of proportions without continuity
+	correction
+
+data:  smokers out of patients
+X-squared = 12.6, df = 3, p-value = 0.005585
+alternative hypothesis: two.sided
+sample estimates:
+   prop 1    prop 2    prop 3    prop 4 
+0.9651163 0.9677419 0.9485294 0.8536585 
+
+> prop.trend.test(smokers, patients)
+
+	Chi-squared Test for Trend in Proportions
+
+data:  smokers out of patients ,
+ using scores: 1 2 3 4
+X-squared = 8.2249, df = 1, p-value = 0.004132
+
+> prop.trend.test(smokers, patients, c(0,0,0,1))
+
+	Chi-squared Test for Trend in Proportions
+
+data:  smokers out of patients ,
+ using scores: 0 0 0 1
+X-squared = 12.173, df = 1, p-value = 0.0004848
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("qqnorm")
+> ### * qqnorm
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: qqnorm
+> ### Title: Quantile-Quantile Plots
+> ### Aliases: qqnorm qqnorm.default qqplot qqline
+> ### Keywords: hplot distribution
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> y <- rt(200, df = 5)
+> qqnorm(y); qqline(y, col = 2)
+> qqplot(y, rt(300, df = 5))
+> 
+> qqnorm(precip, ylab = "Precipitation [in/yr] for 70 US cities")
+> 
+> ## "QQ-Chisquare" : --------------------------
+> y <- rchisq(500, df = 3)
+> ## Q-Q plot for Chi^2 data against true theoretical distribution:
+> qqplot(qchisq(ppoints(500), df = 3), y,
++        main = expression("Q-Q plot for" ~~ {chi^2}[nu == 3]))
+> qqline(y, distribution = function(p) qchisq(p, df = 3),
++        prob = c(0.1, 0.6), col = 2)
+> mtext("qqline(*, dist = qchisq(., df=3), prob = c(0.1, 0.6))")
+> 
+> 
+> 
+> cleanEx()
+> nameEx("quade.test")
+> ### * quade.test
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: quade.test
+> ### Title: Quade Test
+> ### Aliases: quade.test quade.test.default quade.test.formula
+> ### Keywords: htest
+> 
+> ### ** Examples
+> 
+> ## Conover (1999, p. 375f):
+> ## Numbers of five brands of a new hand lotion sold in seven stores
+> ## during one week.
+> y <- matrix(c( 5,  4,  7, 10, 12,
++                1,  3,  1,  0,  2,
++               16, 12, 22, 22, 35,
++                5,  4,  3,  5,  4,
++               10,  9,  7, 13, 10,
++               19, 18, 28, 37, 58,
++               10,  7,  6,  8,  7),
++             nrow = 7, byrow = TRUE,
++             dimnames =
++             list(Store = as.character(1:7),
++                  Brand = LETTERS[1:5]))
+> y
+     Brand
+Store  A  B  C  D  E
+    1  5  4  7 10 12
+    2  1  3  1  0  2
+    3 16 12 22 22 35
+    4  5  4  3  5  4
+    5 10  9  7 13 10
+    6 19 18 28 37 58
+    7 10  7  6  8  7
+> quade.test(y)
+
+	Quade test
+
+data:  y
+Quade F = 3.8293, num df = 4, denom df = 24, p-value = 0.01519
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("quantile")
+> ### * quantile
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: quantile
+> ### Title: Sample Quantiles
+> ### Aliases: quantile quantile.default
+> ### Keywords: univar
+> 
+> ### ** Examples
+> 
+> quantile(x <- rnorm(1001)) # Extremes & Quartiles by default
+         0%         25%         50%         75%        100% 
+-3.00804860 -0.69731820 -0.03472603  0.68924373  3.81027668 
+> quantile(x,  probs = c(0.1, 0.5, 1, 2, 5, 10, 50, NA)/100)
+       0.1%        0.5%          1%          2%          5%         10% 
+-2.99694930 -2.59232767 -2.42431731 -2.24515257 -1.72663060 -1.33880074 
+        50%             
+-0.03472603          NA 
+> 
+> ### Compare different types
+> p <- c(0.1, 0.5, 1, 2, 5, 10, 50)/100
+> res <- matrix(as.numeric(NA), 9, 7)
+> for(type in 1:9) res[type, ] <- y <- quantile(x,  p, type = type)
+> dimnames(res) <- list(1:9, names(y))
+> round(res, 3)
+    0.1%   0.5%     1%     2%     5%    10%    50%
+1 -2.997 -2.592 -2.424 -2.245 -1.727 -1.339 -0.035
+2 -2.997 -2.592 -2.424 -2.245 -1.727 -1.339 -0.035
+3 -3.008 -2.596 -2.433 -2.265 -1.733 -1.344 -0.036
+4 -3.008 -2.596 -2.433 -2.264 -1.733 -1.344 -0.035
+5 -3.002 -2.594 -2.428 -2.255 -1.730 -1.341 -0.035
+6 -3.008 -2.596 -2.432 -2.264 -1.733 -1.343 -0.035
+7 -2.997 -2.592 -2.424 -2.245 -1.727 -1.339 -0.035
+8 -3.004 -2.595 -2.430 -2.258 -1.731 -1.342 -0.035
+9 -3.004 -2.595 -2.429 -2.257 -1.730 -1.341 -0.035
+> 
+> 
+> 
+> cleanEx()
+> nameEx("r2dtable")
+> ### * r2dtable
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: r2dtable
+> ### Title: Random 2-way Tables with Given Marginals
+> ### Aliases: r2dtable
+> ### Keywords: distribution
+> 
+> ### ** Examples
+> 
+> ## Fisher's Tea Drinker data.
+> TeaTasting <-
++ matrix(c(3, 1, 1, 3),
++        nrow = 2,
++        dimnames = list(Guess = c("Milk", "Tea"),
++                        Truth = c("Milk", "Tea")))
+> ## Simulate permutation test for independence based on the maximum
+> ## Pearson residuals (rather than their sum).
+> rowTotals <- rowSums(TeaTasting)
+> colTotals <- colSums(TeaTasting)
+> nOfCases <- sum(rowTotals)
+> expected <- outer(rowTotals, colTotals, "*") / nOfCases
+> maxSqResid <- function(x) max((x - expected) ^ 2 / expected)
+> simMaxSqResid <-
++     sapply(r2dtable(1000, rowTotals, colTotals), maxSqResid)
+> sum(simMaxSqResid >= maxSqResid(TeaTasting)) / 1000
+[1] 0.465
+> ## Fisher's exact test gives p = 0.4857 ...
+> 
+> 
+> 
+> cleanEx()
+> nameEx("rWishart")
+> ### * rWishart
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: rWishart
+> ### Title: Random Wishart Distributed Matrices
+> ### Aliases: rWishart
+> ### Keywords: multivariate
+> 
+> ### ** Examples
+> 
+> ## Artificial
+> S <- toeplitz((10:1)/10)
+> set.seed(11)
+> R <- rWishart(1000, 20, S)
+> dim(R)  #  10 10  1000
+[1]   10   10 1000
+> mR <- apply(R, 1:2, mean)  # ~= E[ Wish(S, 20) ] = 20 * S
+> stopifnot(all.equal(mR, 20*S, tolerance = .009))
+> 
+> ## See Details, the variance is
+> Va <- 20*(S^2 + tcrossprod(diag(S)))
+> vR <- apply(R, 1:2, var)
+> stopifnot(all.equal(vR, Va, tolerance = 1/16))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("read.ftable")
+> ### * read.ftable
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: read.ftable
+> ### Title: Manipulate Flat Contingency Tables
+> ### Aliases: read.ftable write.ftable format.ftable print.ftable
+> ### Keywords: category
+> 
+> ### ** Examples
+> 
+> ## Agresti (1990), page 157, Table 5.8.
+> ## Not in ftable standard format, but o.k.
+> file <- tempfile()
+> cat("             Intercourse\n",
++     "Race  Gender     Yes  No\n",
++     "White Male        43 134\n",
++     "      Female      26 149\n",
++     "Black Male        29  23\n",
++     "      Female      22  36\n",
++     file = file)
+> ft1 <- read.ftable(file)
+> ft1
+             Intercourse Yes  No
+Race  Gender                    
+White Male                43 134
+      Female              26 149
+Black Male                29  23
+      Female              22  36
+> unlink(file)
+> 
+> ## Agresti (1990), page 297, Table 8.16.
+> ## Almost o.k., but misses the name of the row variable.
+> file <- tempfile()
+> cat("                      \"Tonsil Size\"\n",
++     "            \"Not Enl.\" \"Enl.\" \"Greatly Enl.\"\n",
++     "Noncarriers       497     560           269\n",
++     "Carriers           19      29            24\n",
++     file = file)
+> ft <- read.ftable(file, skip = 2,
++                   row.var.names = "Status",
++                   col.vars = list("Tonsil Size" =
++                       c("Not Enl.", "Enl.", "Greatly Enl.")))
+> ft
+            Tonsil Size Not Enl. Enl. Greatly Enl.
+Status                                            
+Noncarriers                  497  560          269
+Carriers                      19   29           24
+> unlink(file)
+> 
+> ft22 <- ftable(Titanic, row.vars = 2:1, col.vars = 4:3)
+> write.ftable(ft22, quote = FALSE)
+             Survived    No         Yes      
+             Age      Child Adult Child Adult
+Sex    Class                                 
+Male   1st                0   118     5    57
+       2nd                0   154    11    14
+       3rd               35   387    13    75
+       Crew               0   670     0   192
+Female 1st                0     4     1   140
+       2nd                0    13    13    80
+       3rd               17    89    14    76
+       Crew               0     3     0    20
+> write.ftable(ft22, quote = FALSE, method="row.compact")
+             Survived    No         Yes      
+Sex    Class Age      Child Adult Child Adult
+Male   1st                0   118     5    57
+       2nd                0   154    11    14
+       3rd               35   387    13    75
+       Crew               0   670     0   192
+Female 1st                0     4     1   140
+       2nd                0    13    13    80
+       3rd               17    89    14    76
+       Crew               0     3     0    20
+> write.ftable(ft22, quote = FALSE, method="col.compact")
+       Survived    No         Yes      
+       Age      Child Adult Child Adult
+Sex    Class                           
+Male   1st          0   118     5    57
+       2nd          0   154    11    14
+       3rd         35   387    13    75
+       Crew         0   670     0   192
+Female 1st          0     4     1   140
+       2nd          0    13    13    80
+       3rd         17    89    14    76
+       Crew         0     3     0    20
+> write.ftable(ft22, quote = FALSE, method="compact")
+       Survived       No         Yes      
+Sex    Class | Age Child Adult Child Adult
+Male   1st             0   118     5    57
+       2nd             0   154    11    14
+       3rd            35   387    13    75
+       Crew            0   670     0   192
+Female 1st             0     4     1   140
+       2nd             0    13    13    80
+       3rd            17    89    14    76
+       Crew            0     3     0    20
+> ## Don't show: 
+>  op <- options(warn = 2) # no warnings allowed
+>  stopifnot(dim(format(ft)) == 4:5,
++ 	   dim(format(ftable(UCBAdmissions))) == c(6,9))
+>  meths <- c("non.compact", "row.compact", "col.compact", "compact")
+>  dimform <-
++     function(ft) sapply(meths, function(M) dim(format(ft, method = M)))
+>  m.eq    <- function(M,m) all.equal(unname(M), m, tolerance = 0)
+>  ## All format(..) w/o warnings:
+>  stopifnot(m.eq(print(dimform(ft22)),
++ 		rbind(11:10, rep(7:6, each = 2))),
++ 	   m.eq(print(dimform(ftable(Titanic, row.vars = integer()))),
++ 		rbind(rep(6:5,2), 33)))
+     non.compact row.compact col.compact compact
+[1,]          11          10          11      10
+[2,]           7           7           6       6
+     non.compact row.compact col.compact compact
+[1,]           6           5           6       5
+[2,]          33          33          33      33
+>  options(op)
+> ## End(Don't show)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("rect.hclust")
+> ### * rect.hclust
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: rect.hclust
+> ### Title: Draw Rectangles Around Hierarchical Clusters
+> ### Aliases: rect.hclust
+> ### Keywords: aplot cluster
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> hca <- hclust(dist(USArrests))
+> plot(hca)
+> rect.hclust(hca, k = 3, border = "red")
+> x <- rect.hclust(hca, h = 50, which = c(2,7), border = 3:4)
+> x
+[[1]]
+       Alabama         Alaska       Delaware      Louisiana    Mississippi 
+             1              2              8             18             24 
+South Carolina 
+            40 
+
+[[2]]
+ Connecticut        Idaho      Indiana       Kansas     Kentucky      Montana 
+           7           12           14           16           17           26 
+    Nebraska         Ohio Pennsylvania         Utah 
+          27           35           38           44 
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("relevel")
+> ### * relevel
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: relevel
+> ### Title: Reorder Levels of Factor
+> ### Aliases: relevel relevel.default relevel.factor relevel.ordered
+> ### Keywords: utilities models
+> 
+> ### ** Examples
+> 
+> warpbreaks$tension <- relevel(warpbreaks$tension, ref = "M")
+> summary(lm(breaks ~ wool + tension, data = warpbreaks))
+
+Call:
+lm(formula = breaks ~ wool + tension, data = warpbreaks)
+
+Residuals:
+    Min      1Q  Median      3Q     Max 
+-19.500  -8.083  -2.139   6.472  30.722 
+
+Coefficients:
+            Estimate Std. Error t value Pr(>|t|)    
+(Intercept)   29.278      3.162   9.260    2e-12 ***
+woolB         -5.778      3.162  -1.827   0.0736 .  
+tensionL      10.000      3.872   2.582   0.0128 *  
+tensionH      -4.722      3.872  -1.219   0.2284    
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Residual standard error: 11.62 on 50 degrees of freedom
+Multiple R-squared:  0.2691,	Adjusted R-squared:  0.2253 
+F-statistic: 6.138 on 3 and 50 DF,  p-value: 0.00123
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("reorder.dendrogram")
+> ### * reorder.dendrogram
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: reorder.dendrogram
+> ### Title: Reorder a Dendrogram
+> ### Aliases: reorder.dendrogram
+> ### Keywords: manip
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> set.seed(123)
+> x <- rnorm(10)
+> hc <- hclust(dist(x))
+> dd <- as.dendrogram(hc)
+> dd.reorder <- reorder(dd, 10:1)
+> plot(dd, main = "random dendrogram 'dd'")
+> 
+> op <- par(mfcol = 1:2)
+> plot(dd.reorder, main = "reorder(dd, 10:1)")
+> plot(reorder(dd, 10:1, agglo.FUN = mean), main = "reorder(dd, 10:1, mean)")
+> par(op)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("reorder.factor")
+> ### * reorder.factor
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: reorder.default
+> ### Title: Reorder Levels of a Factor
+> ### Aliases: reorder reorder.default
+> ### Keywords: utilities
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> bymedian <- with(InsectSprays, reorder(spray, count, median))
+> boxplot(count ~ bymedian, data = InsectSprays,
++         xlab = "Type of spray", ylab = "Insect count",
++         main = "InsectSprays data", varwidth = TRUE,
++         col = "lightgray")
+> 
+> 
+> 
+> cleanEx()
+> nameEx("replications")
+> ### * replications
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: replications
+> ### Title: Number of Replications of Terms
+> ### Aliases: replications
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> ## From Venables and Ripley (2002) p.165.
+> N <- c(0,1,0,1,1,1,0,0,0,1,1,0,1,1,0,0,1,0,1,0,1,1,0,0)
+> P <- c(1,1,0,0,0,1,0,1,1,1,0,0,0,1,0,1,1,0,0,1,0,1,1,0)
+> K <- c(1,0,0,1,0,1,1,0,0,1,0,1,0,1,1,0,0,0,1,1,1,0,1,0)
+> yield <- c(49.5,62.8,46.8,57.0,59.8,58.5,55.5,56.0,62.8,55.8,69.5,
++ 55.0, 62.0,48.8,45.5,44.2,52.0,51.5,49.8,48.8,57.2,59.0,53.2,56.0)
+> 
+> npk <- data.frame(block = gl(6,4), N = factor(N), P = factor(P),
++                   K = factor(K), yield = yield)
+> replications(~ . - yield, npk)
+block     N     P     K 
+    4    12    12    12 
+> 
+> 
+> 
+> cleanEx()
+> nameEx("reshape")
+> ### * reshape
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: reshape
+> ### Title: Reshape Grouped Data
+> ### Aliases: reshape
+> ### Keywords: manip
+> 
+> ### ** Examples
+> 
+> summary(Indometh)
+ Subject      time            conc       
+ 1:11    Min.   :0.250   Min.   :0.0500  
+ 4:11    1st Qu.:0.750   1st Qu.:0.1100  
+ 2:11    Median :2.000   Median :0.3400  
+ 5:11    Mean   :2.886   Mean   :0.5918  
+ 6:11    3rd Qu.:5.000   3rd Qu.:0.8325  
+ 3:11    Max.   :8.000   Max.   :2.7200  
+> wide <- reshape(Indometh, v.names = "conc", idvar = "Subject",
++                 timevar = "time", direction = "wide")
+> wide
+   Subject conc.0.25 conc.0.5 conc.0.75 conc.1 conc.1.25 conc.2 conc.3 conc.4
+1        1      1.50     0.94      0.78   0.48      0.37   0.19   0.12   0.11
+12       2      2.03     1.63      0.71   0.70      0.64   0.36   0.32   0.20
+23       3      2.72     1.49      1.16   0.80      0.80   0.39   0.22   0.12
+34       4      1.85     1.39      1.02   0.89      0.59   0.40   0.16   0.11
+45       5      2.05     1.04      0.81   0.39      0.30   0.23   0.13   0.11
+56       6      2.31     1.44      1.03   0.84      0.64   0.42   0.24   0.17
+   conc.5 conc.6 conc.8
+1    0.08   0.07   0.05
+12   0.25   0.12   0.08
+23   0.11   0.08   0.08
+34   0.10   0.07   0.07
+45   0.08   0.10   0.06
+56   0.13   0.10   0.09
+> 
+> reshape(wide, direction = "long")
+       Subject time conc
+1.0.25       1 0.25 1.50
+2.0.25       2 0.25 2.03
+3.0.25       3 0.25 2.72
+4.0.25       4 0.25 1.85
+5.0.25       5 0.25 2.05
+6.0.25       6 0.25 2.31
+1.0.5        1 0.50 0.94
+2.0.5        2 0.50 1.63
+3.0.5        3 0.50 1.49
+4.0.5        4 0.50 1.39
+5.0.5        5 0.50 1.04
+6.0.5        6 0.50 1.44
+1.0.75       1 0.75 0.78
+2.0.75       2 0.75 0.71
+3.0.75       3 0.75 1.16
+4.0.75       4 0.75 1.02
+5.0.75       5 0.75 0.81
+6.0.75       6 0.75 1.03
+1.1          1 1.00 0.48
+2.1          2 1.00 0.70
+3.1          3 1.00 0.80
+4.1          4 1.00 0.89
+5.1          5 1.00 0.39
+6.1          6 1.00 0.84
+1.1.25       1 1.25 0.37
+2.1.25       2 1.25 0.64
+3.1.25       3 1.25 0.80
+4.1.25       4 1.25 0.59
+5.1.25       5 1.25 0.30
+6.1.25       6 1.25 0.64
+1.2          1 2.00 0.19
+2.2          2 2.00 0.36
+3.2          3 2.00 0.39
+4.2          4 2.00 0.40
+5.2          5 2.00 0.23
+6.2          6 2.00 0.42
+1.3          1 3.00 0.12
+2.3          2 3.00 0.32
+3.3          3 3.00 0.22
+4.3          4 3.00 0.16
+5.3          5 3.00 0.13
+6.3          6 3.00 0.24
+1.4          1 4.00 0.11
+2.4          2 4.00 0.20
+3.4          3 4.00 0.12
+4.4          4 4.00 0.11
+5.4          5 4.00 0.11
+6.4          6 4.00 0.17
+1.5          1 5.00 0.08
+2.5          2 5.00 0.25
+3.5          3 5.00 0.11
+4.5          4 5.00 0.10
+5.5          5 5.00 0.08
+6.5          6 5.00 0.13
+1.6          1 6.00 0.07
+2.6          2 6.00 0.12
+3.6          3 6.00 0.08
+4.6          4 6.00 0.07
+5.6          5 6.00 0.10
+6.6          6 6.00 0.10
+1.8          1 8.00 0.05
+2.8          2 8.00 0.08
+3.8          3 8.00 0.08
+4.8          4 8.00 0.07
+5.8          5 8.00 0.06
+6.8          6 8.00 0.09
+> reshape(wide, idvar = "Subject", varying = list(2:12),
++         v.names = "conc", direction = "long")
+     Subject time conc
+1.1        1    1 1.50
+2.1        2    1 2.03
+3.1        3    1 2.72
+4.1        4    1 1.85
+5.1        5    1 2.05
+6.1        6    1 2.31
+1.2        1    2 0.94
+2.2        2    2 1.63
+3.2        3    2 1.49
+4.2        4    2 1.39
+5.2        5    2 1.04
+6.2        6    2 1.44
+1.3        1    3 0.78
+2.3        2    3 0.71
+3.3        3    3 1.16
+4.3        4    3 1.02
+5.3        5    3 0.81
+6.3        6    3 1.03
+1.4        1    4 0.48
+2.4        2    4 0.70
+3.4        3    4 0.80
+4.4        4    4 0.89
+5.4        5    4 0.39
+6.4        6    4 0.84
+1.5        1    5 0.37
+2.5        2    5 0.64
+3.5        3    5 0.80
+4.5        4    5 0.59
+5.5        5    5 0.30
+6.5        6    5 0.64
+1.6        1    6 0.19
+2.6        2    6 0.36
+3.6        3    6 0.39
+4.6        4    6 0.40
+5.6        5    6 0.23
+6.6        6    6 0.42
+1.7        1    7 0.12
+2.7        2    7 0.32
+3.7        3    7 0.22
+4.7        4    7 0.16
+5.7        5    7 0.13
+6.7        6    7 0.24
+1.8        1    8 0.11
+2.8        2    8 0.20
+3.8        3    8 0.12
+4.8        4    8 0.11
+5.8        5    8 0.11
+6.8        6    8 0.17
+1.9        1    9 0.08
+2.9        2    9 0.25
+3.9        3    9 0.11
+4.9        4    9 0.10
+5.9        5    9 0.08
+6.9        6    9 0.13
+1.10       1   10 0.07
+2.10       2   10 0.12
+3.10       3   10 0.08
+4.10       4   10 0.07
+5.10       5   10 0.10
+6.10       6   10 0.10
+1.11       1   11 0.05
+2.11       2   11 0.08
+3.11       3   11 0.08
+4.11       4   11 0.07
+5.11       5   11 0.06
+6.11       6   11 0.09
+> 
+> ## times need not be numeric
+> df <- data.frame(id = rep(1:4, rep(2,4)),
++                  visit = I(rep(c("Before","After"), 4)),
++                  x = rnorm(4), y = runif(4))
+> df
+  id  visit          x          y
+1  1 Before -0.6264538 0.62911404
+2  1  After  0.1836433 0.06178627
+3  2 Before -0.8356286 0.20597457
+4  2  After  1.5952808 0.17655675
+5  3 Before -0.6264538 0.62911404
+6  3  After  0.1836433 0.06178627
+7  4 Before -0.8356286 0.20597457
+8  4  After  1.5952808 0.17655675
+> reshape(df, timevar = "visit", idvar = "id", direction = "wide")
+  id   x.Before  y.Before   x.After    y.After
+1  1 -0.6264538 0.6291140 0.1836433 0.06178627
+3  2 -0.8356286 0.2059746 1.5952808 0.17655675
+5  3 -0.6264538 0.6291140 0.1836433 0.06178627
+7  4 -0.8356286 0.2059746 1.5952808 0.17655675
+> ## warns that y is really varying
+> reshape(df, timevar = "visit", idvar = "id", direction = "wide", v.names = "x")
+Warning in reshapeWide(data, idvar = idvar, timevar = timevar, varying = varying,  :
+  some constant variables (y) are really varying
+  id         y   x.Before   x.After
+1  1 0.6291140 -0.6264538 0.1836433
+3  2 0.2059746 -0.8356286 1.5952808
+5  3 0.6291140 -0.6264538 0.1836433
+7  4 0.2059746 -0.8356286 1.5952808
+> 
+> 
+> ##  unbalanced 'long' data leads to NA fill in 'wide' form
+> df2 <- df[1:7, ]
+> df2
+  id  visit          x          y
+1  1 Before -0.6264538 0.62911404
+2  1  After  0.1836433 0.06178627
+3  2 Before -0.8356286 0.20597457
+4  2  After  1.5952808 0.17655675
+5  3 Before -0.6264538 0.62911404
+6  3  After  0.1836433 0.06178627
+7  4 Before -0.8356286 0.20597457
+> reshape(df2, timevar = "visit", idvar = "id", direction = "wide")
+  id   x.Before  y.Before   x.After    y.After
+1  1 -0.6264538 0.6291140 0.1836433 0.06178627
+3  2 -0.8356286 0.2059746 1.5952808 0.17655675
+5  3 -0.6264538 0.6291140 0.1836433 0.06178627
+7  4 -0.8356286 0.2059746        NA         NA
+> 
+> ## Alternative regular expressions for guessing names
+> df3 <- data.frame(id = 1:4, age = c(40,50,60,50), dose1 = c(1,2,1,2),
++                   dose2 = c(2,1,2,1), dose4 = c(3,3,3,3))
+> reshape(df3, direction = "long", varying = 3:5, sep = "")
+    id age time dose
+1.1  1  40    1    1
+2.1  2  50    1    2
+3.1  3  60    1    1
+4.1  4  50    1    2
+1.2  1  40    2    2
+2.2  2  50    2    1
+3.2  3  60    2    2
+4.2  4  50    2    1
+1.4  1  40    4    3
+2.4  2  50    4    3
+3.4  3  60    4    3
+4.4  4  50    4    3
+> 
+> 
+> ## an example that isn't longitudinal data
+> state.x77 <- as.data.frame(state.x77)
+> long <- reshape(state.x77, idvar = "state", ids = row.names(state.x77),
++                 times = names(state.x77), timevar = "Characteristic",
++                 varying = list(names(state.x77)), direction = "long")
+> 
+> reshape(long, direction = "wide")
+                                   state Population Income Illiteracy Life Exp
+Alabama.Population               Alabama       3615   3624        2.1    69.05
+Alaska.Population                 Alaska        365   6315        1.5    69.31
+Arizona.Population               Arizona       2212   4530        1.8    70.55
+Arkansas.Population             Arkansas       2110   3378        1.9    70.66
+California.Population         California      21198   5114        1.1    71.71
+Colorado.Population             Colorado       2541   4884        0.7    72.06
+Connecticut.Population       Connecticut       3100   5348        1.1    72.48
+Delaware.Population             Delaware        579   4809        0.9    70.06
+Florida.Population               Florida       8277   4815        1.3    70.66
+Georgia.Population               Georgia       4931   4091        2.0    68.54
+Hawaii.Population                 Hawaii        868   4963        1.9    73.60
+Idaho.Population                   Idaho        813   4119        0.6    71.87
+Illinois.Population             Illinois      11197   5107        0.9    70.14
+Indiana.Population               Indiana       5313   4458        0.7    70.88
+Iowa.Population                     Iowa       2861   4628        0.5    72.56
+Kansas.Population                 Kansas       2280   4669        0.6    72.58
+Kentucky.Population             Kentucky       3387   3712        1.6    70.10
+Louisiana.Population           Louisiana       3806   3545        2.8    68.76
+Maine.Population                   Maine       1058   3694        0.7    70.39
+Maryland.Population             Maryland       4122   5299        0.9    70.22
+Massachusetts.Population   Massachusetts       5814   4755        1.1    71.83
+Michigan.Population             Michigan       9111   4751        0.9    70.63
+Minnesota.Population           Minnesota       3921   4675        0.6    72.96
+Mississippi.Population       Mississippi       2341   3098        2.4    68.09
+Missouri.Population             Missouri       4767   4254        0.8    70.69
+Montana.Population               Montana        746   4347        0.6    70.56
+Nebraska.Population             Nebraska       1544   4508        0.6    72.60
+Nevada.Population                 Nevada        590   5149        0.5    69.03
+New Hampshire.Population   New Hampshire        812   4281        0.7    71.23
+New Jersey.Population         New Jersey       7333   5237        1.1    70.93
+New Mexico.Population         New Mexico       1144   3601        2.2    70.32
+New York.Population             New York      18076   4903        1.4    70.55
+North Carolina.Population North Carolina       5441   3875        1.8    69.21
+North Dakota.Population     North Dakota        637   5087        0.8    72.78
+Ohio.Population                     Ohio      10735   4561        0.8    70.82
+Oklahoma.Population             Oklahoma       2715   3983        1.1    71.42
+Oregon.Population                 Oregon       2284   4660        0.6    72.13
+Pennsylvania.Population     Pennsylvania      11860   4449        1.0    70.43
+Rhode Island.Population     Rhode Island        931   4558        1.3    71.90
+South Carolina.Population South Carolina       2816   3635        2.3    67.96
+South Dakota.Population     South Dakota        681   4167        0.5    72.08
+Tennessee.Population           Tennessee       4173   3821        1.7    70.11
+Texas.Population                   Texas      12237   4188        2.2    70.90
+Utah.Population                     Utah       1203   4022        0.6    72.90
+Vermont.Population               Vermont        472   3907        0.6    71.64
+Virginia.Population             Virginia       4981   4701        1.4    70.08
+Washington.Population         Washington       3559   4864        0.6    71.72
+West Virginia.Population   West Virginia       1799   3617        1.4    69.48
+Wisconsin.Population           Wisconsin       4589   4468        0.7    72.48
+Wyoming.Population               Wyoming        376   4566        0.6    70.29
+                          Murder HS Grad Frost   Area
+Alabama.Population          15.1    41.3    20  50708
+Alaska.Population           11.3    66.7   152 566432
+Arizona.Population           7.8    58.1    15 113417
+Arkansas.Population         10.1    39.9    65  51945
+California.Population       10.3    62.6    20 156361
+Colorado.Population          6.8    63.9   166 103766
+Connecticut.Population       3.1    56.0   139   4862
+Delaware.Population          6.2    54.6   103   1982
+Florida.Population          10.7    52.6    11  54090
+Georgia.Population          13.9    40.6    60  58073
+Hawaii.Population            6.2    61.9     0   6425
+Idaho.Population             5.3    59.5   126  82677
+Illinois.Population         10.3    52.6   127  55748
+Indiana.Population           7.1    52.9   122  36097
+Iowa.Population              2.3    59.0   140  55941
+Kansas.Population            4.5    59.9   114  81787
+Kentucky.Population         10.6    38.5    95  39650
+Louisiana.Population        13.2    42.2    12  44930
+Maine.Population             2.7    54.7   161  30920
+Maryland.Population          8.5    52.3   101   9891
+Massachusetts.Population     3.3    58.5   103   7826
+Michigan.Population         11.1    52.8   125  56817
+Minnesota.Population         2.3    57.6   160  79289
+Mississippi.Population      12.5    41.0    50  47296
+Missouri.Population          9.3    48.8   108  68995
+Montana.Population           5.0    59.2   155 145587
+Nebraska.Population          2.9    59.3   139  76483
+Nevada.Population           11.5    65.2   188 109889
+New Hampshire.Population     3.3    57.6   174   9027
+New Jersey.Population        5.2    52.5   115   7521
+New Mexico.Population        9.7    55.2   120 121412
+New York.Population         10.9    52.7    82  47831
+North Carolina.Population   11.1    38.5    80  48798
+North Dakota.Population      1.4    50.3   186  69273
+Ohio.Population              7.4    53.2   124  40975
+Oklahoma.Population          6.4    51.6    82  68782
+Oregon.Population            4.2    60.0    44  96184
+Pennsylvania.Population      6.1    50.2   126  44966
+Rhode Island.Population      2.4    46.4   127   1049
+South Carolina.Population   11.6    37.8    65  30225
+South Dakota.Population      1.7    53.3   172  75955
+Tennessee.Population        11.0    41.8    70  41328
+Texas.Population            12.2    47.4    35 262134
+Utah.Population              4.5    67.3   137  82096
+Vermont.Population           5.5    57.1   168   9267
+Virginia.Population          9.5    47.8    85  39780
+Washington.Population        4.3    63.5    32  66570
+West Virginia.Population     6.7    41.6   100  24070
+Wisconsin.Population         3.0    54.5   149  54464
+Wyoming.Population           6.9    62.9   173  97203
+> 
+> reshape(long, direction = "wide", new.row.names = unique(long$state))
+                        state Population Income Illiteracy Life Exp Murder
+Alabama               Alabama       3615   3624        2.1    69.05   15.1
+Alaska                 Alaska        365   6315        1.5    69.31   11.3
+Arizona               Arizona       2212   4530        1.8    70.55    7.8
+Arkansas             Arkansas       2110   3378        1.9    70.66   10.1
+California         California      21198   5114        1.1    71.71   10.3
+Colorado             Colorado       2541   4884        0.7    72.06    6.8
+Connecticut       Connecticut       3100   5348        1.1    72.48    3.1
+Delaware             Delaware        579   4809        0.9    70.06    6.2
+Florida               Florida       8277   4815        1.3    70.66   10.7
+Georgia               Georgia       4931   4091        2.0    68.54   13.9
+Hawaii                 Hawaii        868   4963        1.9    73.60    6.2
+Idaho                   Idaho        813   4119        0.6    71.87    5.3
+Illinois             Illinois      11197   5107        0.9    70.14   10.3
+Indiana               Indiana       5313   4458        0.7    70.88    7.1
+Iowa                     Iowa       2861   4628        0.5    72.56    2.3
+Kansas                 Kansas       2280   4669        0.6    72.58    4.5
+Kentucky             Kentucky       3387   3712        1.6    70.10   10.6
+Louisiana           Louisiana       3806   3545        2.8    68.76   13.2
+Maine                   Maine       1058   3694        0.7    70.39    2.7
+Maryland             Maryland       4122   5299        0.9    70.22    8.5
+Massachusetts   Massachusetts       5814   4755        1.1    71.83    3.3
+Michigan             Michigan       9111   4751        0.9    70.63   11.1
+Minnesota           Minnesota       3921   4675        0.6    72.96    2.3
+Mississippi       Mississippi       2341   3098        2.4    68.09   12.5
+Missouri             Missouri       4767   4254        0.8    70.69    9.3
+Montana               Montana        746   4347        0.6    70.56    5.0
+Nebraska             Nebraska       1544   4508        0.6    72.60    2.9
+Nevada                 Nevada        590   5149        0.5    69.03   11.5
+New Hampshire   New Hampshire        812   4281        0.7    71.23    3.3
+New Jersey         New Jersey       7333   5237        1.1    70.93    5.2
+New Mexico         New Mexico       1144   3601        2.2    70.32    9.7
+New York             New York      18076   4903        1.4    70.55   10.9
+North Carolina North Carolina       5441   3875        1.8    69.21   11.1
+North Dakota     North Dakota        637   5087        0.8    72.78    1.4
+Ohio                     Ohio      10735   4561        0.8    70.82    7.4
+Oklahoma             Oklahoma       2715   3983        1.1    71.42    6.4
+Oregon                 Oregon       2284   4660        0.6    72.13    4.2
+Pennsylvania     Pennsylvania      11860   4449        1.0    70.43    6.1
+Rhode Island     Rhode Island        931   4558        1.3    71.90    2.4
+South Carolina South Carolina       2816   3635        2.3    67.96   11.6
+South Dakota     South Dakota        681   4167        0.5    72.08    1.7
+Tennessee           Tennessee       4173   3821        1.7    70.11   11.0
+Texas                   Texas      12237   4188        2.2    70.90   12.2
+Utah                     Utah       1203   4022        0.6    72.90    4.5
+Vermont               Vermont        472   3907        0.6    71.64    5.5
+Virginia             Virginia       4981   4701        1.4    70.08    9.5
+Washington         Washington       3559   4864        0.6    71.72    4.3
+West Virginia   West Virginia       1799   3617        1.4    69.48    6.7
+Wisconsin           Wisconsin       4589   4468        0.7    72.48    3.0
+Wyoming               Wyoming        376   4566        0.6    70.29    6.9
+               HS Grad Frost   Area
+Alabama           41.3    20  50708
+Alaska            66.7   152 566432
+Arizona           58.1    15 113417
+Arkansas          39.9    65  51945
+California        62.6    20 156361
+Colorado          63.9   166 103766
+Connecticut       56.0   139   4862
+Delaware          54.6   103   1982
+Florida           52.6    11  54090
+Georgia           40.6    60  58073
+Hawaii            61.9     0   6425
+Idaho             59.5   126  82677
+Illinois          52.6   127  55748
+Indiana           52.9   122  36097
+Iowa              59.0   140  55941
+Kansas            59.9   114  81787
+Kentucky          38.5    95  39650
+Louisiana         42.2    12  44930
+Maine             54.7   161  30920
+Maryland          52.3   101   9891
+Massachusetts     58.5   103   7826
+Michigan          52.8   125  56817
+Minnesota         57.6   160  79289
+Mississippi       41.0    50  47296
+Missouri          48.8   108  68995
+Montana           59.2   155 145587
+Nebraska          59.3   139  76483
+Nevada            65.2   188 109889
+New Hampshire     57.6   174   9027
+New Jersey        52.5   115   7521
+New Mexico        55.2   120 121412
+New York          52.7    82  47831
+North Carolina    38.5    80  48798
+North Dakota      50.3   186  69273
+Ohio              53.2   124  40975
+Oklahoma          51.6    82  68782
+Oregon            60.0    44  96184
+Pennsylvania      50.2   126  44966
+Rhode Island      46.4   127   1049
+South Carolina    37.8    65  30225
+South Dakota      53.3   172  75955
+Tennessee         41.8    70  41328
+Texas             47.4    35 262134
+Utah              67.3   137  82096
+Vermont           57.1   168   9267
+Virginia          47.8    85  39780
+Washington        63.5    32  66570
+West Virginia     41.6   100  24070
+Wisconsin         54.5   149  54464
+Wyoming           62.9   173  97203
+> 
+> ## multiple id variables
+> df3 <- data.frame(school = rep(1:3, each = 4), class = rep(9:10, 6),
++                   time = rep(c(1,1,2,2), 3), score = rnorm(12))
+> wide <- reshape(df3, idvar = c("school","class"), direction = "wide")
+> wide
+   school class     score.1     score.2
+1       1     9  0.48742905  0.57578135
+2       1    10  0.73832471 -0.30538839
+5       2     9  1.51178117 -0.62124058
+6       2    10  0.38984324 -2.21469989
+9       3     9  1.12493092 -0.01619026
+10      3    10 -0.04493361  0.94383621
+> ## transform back
+> reshape(wide)
+       school class time     score.1
+1.9.1       1     9    1  0.48742905
+1.10.1      1    10    1  0.73832471
+2.9.1       2     9    1  1.51178117
+2.10.1      2    10    1  0.38984324
+3.9.1       3     9    1  1.12493092
+3.10.1      3    10    1 -0.04493361
+1.9.2       1     9    2  0.57578135
+1.10.2      1    10    2 -0.30538839
+2.9.2       2     9    2 -0.62124058
+2.10.2      2    10    2 -2.21469989
+3.9.2       3     9    2 -0.01619026
+3.10.2      3    10    2  0.94383621
+> 
+> 
+> 
+> 
+> cleanEx()
+> nameEx("runmed")
+> ### * runmed
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: runmed
+> ### Title: Running Medians - Robust Scatter Plot Smoothing
+> ### Aliases: runmed
+> ### Keywords: smooth robust
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> utils::example(nhtemp)
+
+nhtemp> require(stats); require(graphics)
+
+nhtemp> plot(nhtemp, main = "nhtemp data",
+nhtemp+   ylab = "Mean annual temperature in New Haven, CT (deg. F)")
+> myNHT <- as.vector(nhtemp)
+> myNHT[20] <- 2 * nhtemp[20]
+> plot(myNHT, type = "b", ylim = c(48, 60), main = "Running Medians Example")
+> lines(runmed(myNHT, 7), col = "red")
+> 
+> ## special: multiple y values for one x
+> plot(cars, main = "'cars' data and runmed(dist, 3)")
+> lines(cars, col = "light gray", type = "c")
+> with(cars, lines(speed, runmed(dist, k = 3), col = 2))
+> 
+> ## nice quadratic with a few outliers
+> y <- ys <- (-20:20)^2
+> y [c(1,10,21,41)] <- c(150, 30, 400, 450)
+> all(y == runmed(y, 1)) # 1-neighbourhood <==> interpolation
+[1] TRUE
+> plot(y) ## lines(y, lwd = .1, col = "light gray")
+> lines(lowess(seq(y), y, f = 0.3), col = "brown")
+> lines(runmed(y, 7), lwd = 2, col = "blue")
+> lines(runmed(y, 11), lwd = 2, col = "red")
+> 
+> ## Lowess is not robust
+> y <- ys ; y[21] <- 6666 ; x <- seq(y)
+> col <- c("black", "brown","blue")
+> plot(y, col = col[1])
+> lines(lowess(x, y, f = 0.3), col = col[2])
+> lines(runmed(y, 7),      lwd = 2, col = col[3])
+> legend(length(y),max(y), c("data", "lowess(y, f = 0.3)", "runmed(y, 7)"),
++        xjust = 1, col = col, lty = c(0, 1, 1), pch = c(1,NA,NA))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("scatter.smooth")
+> ### * scatter.smooth
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: scatter.smooth
+> ### Title: Scatter Plot with Smooth Curve Fitted by Loess
+> ### Aliases: scatter.smooth loess.smooth
+> ### Keywords: smooth
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> with(cars, scatter.smooth(speed, dist))
+> ## or with dotted thick smoothed line results :
+> with(cars, scatter.smooth(speed, dist, lpars =
++                     list(col = "red", lwd = 3, lty = 3)))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("screeplot")
+> ### * screeplot
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: screeplot
+> ### Title: Screeplots
+> ### Aliases: screeplot screeplot.default
+> ### Keywords: multivariate
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> ## The variances of the variables in the
+> ## USArrests data vary by orders of magnitude, so scaling is appropriate
+> (pc.cr <- princomp(USArrests, cor = TRUE))  # inappropriate
+Call:
+princomp(x = USArrests, cor = TRUE)
+
+Standard deviations:
+   Comp.1    Comp.2    Comp.3    Comp.4 
+1.5748783 0.9948694 0.5971291 0.4164494 
+
+ 4  variables and  50 observations.
+> screeplot(pc.cr)
+> 
+> fit <- princomp(covmat = Harman74.cor)
+> screeplot(fit)
+> screeplot(fit, npcs = 24, type = "lines")
+> 
+> 
+> 
+> cleanEx()
+> nameEx("sd")
+> ### * sd
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: sd
+> ### Title: Standard Deviation
+> ### Aliases: sd
+> ### Keywords: univar
+> 
+> ### ** Examples
+> 
+> sd(1:2) ^ 2
+[1] 0.5
+> 
+> 
+> 
+> cleanEx()
+> nameEx("se.contrast")
+> ### * se.contrast
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: se.contrast
+> ### Title: Standard Errors for Contrasts in Model Terms
+> ### Aliases: se.contrast se.contrast.aov se.contrast.aovlist
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> ## From Venables and Ripley (2002) p.165.
+> N <- c(0,1,0,1,1,1,0,0,0,1,1,0,1,1,0,0,1,0,1,0,1,1,0,0)
+> P <- c(1,1,0,0,0,1,0,1,1,1,0,0,0,1,0,1,1,0,0,1,0,1,1,0)
+> K <- c(1,0,0,1,0,1,1,0,0,1,0,1,0,1,1,0,0,0,1,1,1,0,1,0)
+> yield <- c(49.5,62.8,46.8,57.0,59.8,58.5,55.5,56.0,62.8,55.8,69.5,
++ 55.0, 62.0,48.8,45.5,44.2,52.0,51.5,49.8,48.8,57.2,59.0,53.2,56.0)
+> 
+> npk <- data.frame(block = gl(6,4), N = factor(N), P = factor(P),
++                   K = factor(K), yield = yield)
+> ## Set suitable contrasts.
+> options(contrasts = c("contr.helmert", "contr.poly"))
+> npk.aov1 <- aov(yield ~ block + N + K, data = npk)
+> se.contrast(npk.aov1, list(N == "0", N == "1"), data = npk)
+[1] 1.609175
+> # or via a matrix
+> cont <- matrix(c(-1,1), 2, 1, dimnames = list(NULL, "N"))
+> se.contrast(npk.aov1, cont[N, , drop = FALSE]/12, data = npk)
+       N 
+1.609175 
+> 
+> ## test a multi-stratum model
+> npk.aov2 <- aov(yield ~ N + K + Error(block/(N + K)), data = npk)
+> se.contrast(npk.aov2, list(N == "0", N == "1"))
+[1] 1.812166
+> 
+> 
+> ## an example looking at an interaction contrast
+> ## Dataset from R.E. Kirk (1995)
+> ## 'Experimental Design: procedures for the behavioral sciences'
+> score <- c(12, 8,10, 6, 8, 4,10,12, 8, 6,10,14, 9, 7, 9, 5,11,12,
++             7,13, 9, 9, 5,11, 8, 7, 3, 8,12,10,13,14,19, 9,16,14)
+> A <- gl(2, 18, labels = c("a1", "a2"))
+> B <- rep(gl(3, 6, labels = c("b1", "b2", "b3")), 2)
+> fit <- aov(score ~ A*B)
+> cont <- c(1, -1)[A] * c(1, -1, 0)[B]
+> sum(cont)       # 0
+[1] 0
+> sum(cont*score) # value of the contrast
+[1] -18
+> se.contrast(fit, as.matrix(cont))
+Contrast 1 
+  14.24547 
+> (t.stat <- sum(cont*score)/se.contrast(fit, as.matrix(cont)))
+Contrast 1 
+  -1.26356 
+> summary(fit, split = list(B = 1:2), expand.split = TRUE)
+            Df Sum Sq Mean Sq F value  Pr(>F)   
+A            1  18.78   18.78   2.221 0.14661   
+B            2  62.00   31.00   3.666 0.03763 * 
+  B: C1      1   1.50    1.50   0.177 0.67662   
+  B: C2      1  60.50   60.50   7.155 0.01199 * 
+A:B          2  81.56   40.78   4.823 0.01527 * 
+  A:B: C1    1  13.50   13.50   1.597 0.21612   
+  A:B: C2    1  68.06   68.06   8.049 0.00809 **
+Residuals   30 253.67    8.46                   
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> ## t.stat^2 is the F value on the A:B: C1 line (with Helmert contrasts)
+> ## Now look at all three interaction contrasts
+> cont <- c(1, -1)[A] * cbind(c(1, -1, 0), c(1, 0, -1), c(0, 1, -1))[B,]
+> se.contrast(fit, cont)  # same, due to balance.
+Contrast 1 Contrast 2 Contrast 3 
+  14.24547   14.24547   14.24547 
+> rm(A, B, score)
+> 
+> 
+> ## multi-stratum example where efficiencies play a role
+> utils::example(eff.aovlist)
+
+eff.vl> ## An example from Yates (1932),
+eff.vl> ## a 2^3 design in 2 blocks replicated 4 times
+eff.vl> 
+eff.vl> Block <- gl(8, 4)
+
+eff.vl> A <- factor(c(0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,
+eff.vl+               0,1,0,1,0,1,0,1,0,1,0,1))
+
+eff.vl> B <- factor(c(0,0,1,1,0,0,1,1,0,1,0,1,1,0,1,0,0,0,1,1,
+eff.vl+               0,0,1,1,0,0,1,1,0,0,1,1))
+
+eff.vl> C <- factor(c(0,1,1,0,1,0,0,1,0,0,1,1,0,0,1,1,0,1,0,1,
+eff.vl+               1,0,1,0,0,0,1,1,1,1,0,0))
+
+eff.vl> Yield <- c(101, 373, 398, 291, 312, 106, 265, 450, 106, 306, 324, 449,
+eff.vl+            272, 89, 407, 338, 87, 324, 279, 471, 323, 128, 423, 334,
+eff.vl+            131, 103, 445, 437, 324, 361, 302, 272)
+
+eff.vl> aovdat <- data.frame(Block, A, B, C, Yield)
+
+eff.vl> old <- getOption("contrasts")
+
+eff.vl> options(contrasts = c("contr.helmert", "contr.poly"))
+
+eff.vl> (fit <- aov(Yield ~ A*B*C + Error(Block), data = aovdat))
+
+Call:
+aov(formula = Yield ~ A * B * C + Error(Block), data = aovdat)
+
+Grand Mean: 291.5938
+
+Stratum 1: Block
+
+Terms:
+                      A:B       A:C       B:C     A:B:C Residuals
+Sum of Squares   780.1250  276.1250 2556.1250  112.5000  774.0938
+Deg. of Freedom         1         1         1         1         3
+
+Residual standard error: 16.06335
+Estimated effects are balanced
+
+Stratum 2: Within
+
+Terms:
+                        A         B         C       A:B       A:C       B:C
+Sum of Squares    3465.28 161170.03 278817.78     28.17   1802.67  11528.17
+Deg. of Freedom         1         1         1         1         1         1
+                    A:B:C Residuals
+Sum of Squares      45.37   5423.28
+Deg. of Freedom         1        17
+
+Residual standard error: 17.86103
+Estimated effects are balanced
+
+eff.vl> eff.aovlist(fit)
+       A B C  A:B  A:C  B:C A:B:C
+Block  0 0 0 0.25 0.25 0.25  0.25
+Within 1 1 1 0.75 0.75 0.75  0.75
+
+eff.vl> options(contrasts = old)
+> fit <- aov(Yield ~ A + B * C + Error(Block), data = aovdat)
+> cont1 <- c(-1, 1)[A]/32  # Helmert contrasts
+> cont2 <- c(-1, 1)[B] * c(-1, 1)[C]/32
+> cont <- cbind(A = cont1, BC = cont2)
+> colSums(cont*Yield) # values of the contrasts
+        A        BC 
+ 10.40625 -20.90625 
+> se.contrast(fit, as.matrix(cont))
+       A       BC 
+3.377196 3.899650 
+> 
+> 
+> base::options(contrasts = c(unordered = "contr.treatment",ordered = "contr.poly"))
+> cleanEx()
+> nameEx("selfStart")
+> ### * selfStart
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: selfStart
+> ### Title: Construct Self-starting Nonlinear Models
+> ### Aliases: selfStart selfStart.default selfStart.formula
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> ## self-starting logistic model
+> 
+> SSlogis <- selfStart(~ Asym/(1 + exp((xmid - x)/scal)),
++   function(mCall, data, LHS)
++   {
++     xy <- sortedXyData(mCall[["x"]], LHS, data)
++     if(nrow(xy) < 4) {
++       stop("Too few distinct x values to fit a logistic")
++     }
++     z <- xy[["y"]]
++     if (min(z) <= 0) { z <- z + 0.05 * max(z) } # avoid zeroes
++     z <- z/(1.05 * max(z))              # scale to within unit height
++     xy[["z"]] <- log(z/(1 - z))         # logit transformation
++     aux <- coef(lm(x ~ z, xy))
++     parameters(xy) <- list(xmid = aux[1], scal = aux[2])
++     pars <- as.vector(coef(nls(y ~ 1/(1 + exp((xmid - x)/scal)),
++                              data = xy, algorithm = "plinear")))
++     setNames(c(pars[3], pars[1], pars[2]),
++              mCall[c("Asym", "xmid", "scal")])
++   }, c("Asym", "xmid", "scal"))
+> 
+> # 'first.order.log.model' is a function object defining a first order
+> # compartment model
+> # 'first.order.log.initial' is a function object which calculates initial
+> # values for the parameters in 'first.order.log.model'
+> 
+> # self-starting first order compartment model
+> ## Not run: 
+> ##D SSfol <- selfStart(first.order.log.model, first.order.log.initial)
+> ## End(Not run)
+> 
+> ## Explore the self-starting models already available in R's  "stats":
+> pos.st <- which("package:stats" == search())
+> mSS <- apropos("^SS..", where = TRUE, ignore.case = FALSE)
+> (mSS <- unname(mSS[names(mSS) == pos.st]))
+ [1] "SSasymp"     "SSasympOff"  "SSasympOrig" "SSbiexp"     "SSfol"      
+ [6] "SSfpl"       "SSgompertz"  "SSlogis"     "SSmicmen"    "SSweibull"  
+> fSS <- sapply(mSS, get, pos = pos.st, mode = "function")
+> all(sapply(fSS, inherits, "selfStart"))  # -> TRUE
+[1] TRUE
+> 
+> ## Show the argument list of each self-starting function:
+> str(fSS, give.attr = FALSE)
+List of 10
+ $ SSasymp    :function (input, Asym, R0, lrc)  
+ $ SSasympOff :function (input, Asym, lrc, c0)  
+ $ SSasympOrig:function (input, Asym, lrc)  
+ $ SSbiexp    :function (input, A1, lrc1, A2, lrc2)  
+ $ SSfol      :function (Dose, input, lKe, lKa, lCl)  
+ $ SSfpl      :function (input, A, B, xmid, scal)  
+ $ SSgompertz :function (x, Asym, b2, b3)  
+ $ SSlogis    :function (input, Asym, xmid, scal)  
+ $ SSmicmen   :function (input, Vm, K)  
+ $ SSweibull  :function (x, Asym, Drop, lrc, pwr)  
+> 
+> 
+> 
+> cleanEx()
+> nameEx("setNames")
+> ### * setNames
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: setNames
+> ### Title: Set the Names in an Object
+> ### Aliases: setNames
+> ### Keywords: list
+> 
+> ### ** Examples
+> 
+> setNames( 1:3, c("foo", "bar", "baz") )
+foo bar baz 
+  1   2   3 
+> # this is just a short form of
+> tmp <- 1:3
+> names(tmp) <-  c("foo", "bar", "baz")
+> tmp
+foo bar baz 
+  1   2   3 
+> 
+> ## special case of character vector, using default
+> setNames(nm = c("First", "2nd"))
+  First     2nd 
+"First"   "2nd" 
+> 
+> 
+> 
+> cleanEx()
+> nameEx("shapiro.test")
+> ### * shapiro.test
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: shapiro.test
+> ### Title: Shapiro-Wilk Normality Test
+> ### Aliases: shapiro.test
+> ### Keywords: htest
+> 
+> ### ** Examples
+> 
+> shapiro.test(rnorm(100, mean = 5, sd = 3))
+
+	Shapiro-Wilk normality test
+
+data:  rnorm(100, mean = 5, sd = 3)
+W = 0.9956, p-value = 0.9876
+
+> shapiro.test(runif(100, min = 2, max = 4))
+
+	Shapiro-Wilk normality test
+
+data:  runif(100, min = 2, max = 4)
+W = 0.93092, p-value = 5.616e-05
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("sigma")
+> ### * sigma
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: sigma
+> ### Title: Extract Residual Standard Deviation 'Sigma'
+> ### Aliases: sigma sigma.default sigma.mlm
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> ## -- lm() ------------------------------
+> lm1 <- lm(Fertility ~ . , data = swiss)
+> sigma(lm1) # ~= 7.165  = "Residual standard error"  printed from summary(lm1)
+[1] 7.165369
+> stopifnot(all.equal(sigma(lm1), summary(lm1)$sigma, tol=1e-15))
+> 
+> ## -- nls() -----------------------------
+> DNase1 <- subset(DNase, Run == 1)
+> fm.DN1 <- nls(density ~ SSlogis(log(conc), Asym, xmid, scal), DNase1)
+> sigma(fm.DN1) # ~= 0.01919  as from summary(..)
+[1] 0.01919449
+> stopifnot(all.equal(sigma(fm.DN1), summary(fm.DN1)$sigma, tol=1e-15))
+> 
+> ## -- glm() -----------------------------
+> ## -- a) Binomial -- Example from MASS
+> ldose <- rep(0:5, 2)
+> numdead <- c(1, 4, 9, 13, 18, 20, 0, 2, 6, 10, 12, 16)
+> sex <- factor(rep(c("M", "F"), c(6, 6)))
+> SF <- cbind(numdead, numalive = 20-numdead)
+> sigma(budworm.lg <- glm(SF ~ sex*ldose, family = binomial))
+[1] 0.7900734
+> 
+> ## -- b) Poisson -- from ?glm :
+> ## Dobson (1990) Page 93: Randomized Controlled Trial :
+> counts <- c(18,17,15,20,10,20,25,13,12)
+> outcome <- gl(3,1,9)
+> treatment <- gl(3,3)
+> sigma(glm.D93 <- glm(counts ~ outcome + treatment, family = poisson()))
+[1] 1.13238
+> ## (currently) *differs* from
+> summary(glm.D93)$dispersion # == 1
+[1] 1
+> ## and the *Quasi*poisson's dispersion
+> sigma(glm.qD93 <- update(glm.D93, family = quasipoisson()))
+[1] 1.13238
+> sigma (glm.qD93)^2 # 1.282285 is close, but not the same
+[1] 1.282285
+> summary(glm.qD93)$dispersion # == 1.2933
+[1] 1.2933
+> 
+> ## -- Multivariate lm() "mlm" -----------
+> utils::example("SSD", echo=FALSE)
+> sigma(mlmfit) # is the same as {but more efficient than}
+   deg0NA    deg4NA    deg8NA    deg0NP    deg4NP    deg8NP 
+ 56.92100  86.02325  78.99367  88.54377 109.54451 116.79041 
+> sqrt(diag(estVar(mlmfit)))
+   deg0NA    deg4NA    deg8NA    deg0NP    deg4NP    deg8NP 
+ 56.92100  86.02325  78.99367  88.54377 109.54451 116.79041 
+> ## Don't show: 
+> stopifnot(all.equal(sigma(mlmfit), sqrt(diag(estVar(mlmfit)))))
+> ## End(Don't show)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("simulate")
+> ### * simulate
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: simulate
+> ### Title: Simulate Responses
+> ### Aliases: simulate
+> ### Keywords: models datagen
+> 
+> ### ** Examples
+> 
+> x <- 1:5
+> mod1 <- lm(c(1:3, 7, 6) ~ x)
+> S1 <- simulate(mod1, nsim = 4)
+> ## repeat the simulation:
+> .Random.seed <- attr(S1, "seed")
+> identical(S1, simulate(mod1, nsim = 4))
+[1] TRUE
+> 
+> S2 <- simulate(mod1, nsim = 200, seed = 101)
+> rowMeans(S2) # should be about the same as
+        1         2         3         4         5 
+0.6885691 2.2329771 3.7790352 5.2775859 6.8131451 
+> fitted(mod1)
+  1   2   3   4   5 
+0.8 2.3 3.8 5.3 6.8 
+> 
+> ## repeat identically:
+> (sseed <- attr(S2, "seed")) # seed; RNGkind as attribute
+[1] 101
+attr(,"kind")
+attr(,"kind")[[1]]
+[1] "Mersenne-Twister"
+
+attr(,"kind")[[2]]
+[1] "Inversion"
+
+> stopifnot(identical(S2, simulate(mod1, nsim = 200, seed = sseed)))
+> 
+> ## To be sure about the proper RNGkind, e.g., after
+> RNGversion("2.7.0")
+> ## first set the RNG kind, then simulate
+> do.call(RNGkind, attr(sseed, "kind"))
+> identical(S2, simulate(mod1, nsim = 200, seed = sseed))
+[1] TRUE
+> 
+> ## Binomial GLM examples
+> yb1 <- matrix(c(4, 4, 5, 7, 8, 6, 6, 5, 3, 2), ncol = 2)
+> modb1 <- glm(yb1 ~ x, family = binomial)
+> S3 <- simulate(modb1, nsim = 4)
+> # each column of S3 is a two-column matrix.
+> 
+> x2 <- sort(runif(100))
+> yb2 <- rbinom(100, prob = plogis(2*(x2-1)), size = 1)
+> yb2 <- factor(1 + yb2, labels = c("failure", "success"))
+> modb2 <- glm(yb2 ~ x2, family = binomial)
+> S4 <- simulate(modb2, nsim = 4)
+> # each column of S4 is a factor
+> 
+> 
+> 
+> cleanEx()
+> nameEx("smooth")
+> ### * smooth
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: smooth
+> ### Title: Tukey's (Running Median) Smoothing
+> ### Aliases: smooth
+> ### Keywords: robust smooth
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> ## see also   demo(smooth) !
+> 
+> x1 <- c(4, 1, 3, 6, 6, 4, 1, 6, 2, 4, 2) # very artificial
+> (x3R <- smooth(x1, "3R")) # 2 iterations of "3"
+3R Tukey smoother resulting from  smooth(x = x1, kind = "3R") 
+ used 2 iterations
+ [1] 3 3 3 6 6 4 4 4 2 2 2
+> smooth(x3R, kind = "S")
+S Tukey smoother resulting from  smooth(x = x3R, kind = "S") 
+ changed
+ [1] 3 3 3 3 4 4 4 4 2 2 2
+> 
+> sm.3RS <- function(x, ...)
++    smooth(smooth(x, "3R", ...), "S", ...)
+> 
+> y <- c(1, 1, 19:1)
+> plot(y, main = "misbehaviour of \"3RSR\"", col.main = 3)
+> lines(sm.3RS(y))
+> lines(smooth(y))
+> lines(smooth(y, "3RSR"), col = 3, lwd = 2)  # the horror
+> 
+> x <- c(8:10, 10, 0, 0, 9, 9)
+> plot(x, main = "breakdown of  3R  and  S  and hence  3RSS")
+> matlines(cbind(smooth(x, "3R"), smooth(x, "S"), smooth(x, "3RSS"), smooth(x)))
+> 
+> presidents[is.na(presidents)] <- 0 # silly
+> summary(sm3 <- smooth(presidents, "3R"))
+3R Tukey smoother resulting from
+ smooth(x = presidents, kind = "3R") ;  n = 120 
+ used 4 iterations
+   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
+    0.0    44.0    57.0    54.2    71.0    82.0 
+> summary(sm2 <- smooth(presidents,"3RSS"))
+3RSS Tukey smoother resulting from
+ smooth(x = presidents, kind = "3RSS") ;  n = 120 
+ used 5 iterations
+   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
+   0.00   44.00   57.00   55.45   69.00   82.00 
+> summary(sm  <- smooth(presidents))
+3RS3R Tukey smoother resulting from
+ smooth(x = presidents) ;  n = 120 
+ used 7 iterations
+   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
+  24.00   44.00   57.00   55.88   69.00   82.00 
+> 
+> all.equal(c(sm2), c(smooth(smooth(sm3, "S"), "S")))  # 3RSS  === 3R S S
+[1] TRUE
+> all.equal(c(sm),  c(smooth(smooth(sm3, "S"), "3R"))) # 3RS3R === 3R S 3R
+[1] TRUE
+> 
+> plot(presidents, main = "smooth(presidents0, *) :  3R and default 3RS3R")
+> lines(sm3, col = 3, lwd = 1.5)
+> lines(sm, col = 2, lwd = 1.25)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("smooth.spline")
+> ### * smooth.spline
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: smooth.spline
+> ### Title: Fit a Smoothing Spline
+> ### Aliases: smooth.spline .nknots.smspl
+> ### Keywords: smooth
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> attach(cars)
+> plot(speed, dist, main = "data(cars)  &  smoothing splines")
+> cars.spl <- smooth.spline(speed, dist)
+> (cars.spl)
+Call:
+smooth.spline(x = speed, y = dist)
+
+Smoothing Parameter  spar= 0.7801305  lambda= 0.1112206 (11 iterations)
+Equivalent Degrees of Freedom (Df): 2.635278
+Penalized Criterion: 4187.776
+GCV: 244.1044
+> ## This example has duplicate points, so avoid cv = TRUE
+> ## Don't show: 
+>   stopifnot(cars.spl $ w == table(speed)) # weights = multiplicities
+>   utils::str(cars.spl, digits = 5, vec.len = 6)
+List of 15
+ $ x       : num [1:19] 4 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ...
+ $ y       : num [1:19] 1.6578 11.6829 15.0644 18.4823 21.9471 25.4656 29.0505 32.7076 ...
+ $ w       : num [1:19] 2 2 1 1 3 2 4 4 4 3 2 3 4 3 5 ...
+ $ yin     : num [1:19] 6 13 16 10 26 22.5 21.5 35 ...
+ $ data    :List of 3
+  ..$ x: num [1:50] 4 4 7 7 8 9 10 10 10 11 11 12 12 12 12 ...
+  ..$ y: num [1:50] 2 10 4 22 16 10 18 26 34 17 28 14 20 24 28 ...
+  ..$ w: num [1:50] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
+ $ lev     : num [1:19] 0.399342 0.179105 0.069771 0.055561 0.136721 0.077539 0.137252 0.126354 ...
+ $ cv.crit : num 244.1
+ $ pen.crit: num 4187.8
+ $ crit    : num 244.1
+ $ df      : num 2.6353
+ $ spar    : num 0.78013
+ $ lambda  : num 0.11122
+ $ iparms  : Named int [1:3] 1 0 11
+  ..- attr(*, "names")= chr [1:3] "icrit" "ispar" "iter"
+ $ fit     :List of 5
+  ..$ knot : num [1:25] 0 0 0 0 0.14286 0.19048 0.2381 0.28571 ...
+  ..$ nk   : int 21
+  ..$ min  : num 4
+  ..$ range: num 21
+  ..$ coef : num [1:21] 1.6578 4.9869 9.4256 15.0584 18.4743 21.9384 25.4544 29.0377 ...
+  ..- attr(*, "class")= chr "smooth.spline.fit"
+ $ call    : language smooth.spline(x = speed, y = dist)
+ - attr(*, "class")= chr "smooth.spline"
+>   cars.spl$fit
+$knot
+ [1] 0.0000000 0.0000000 0.0000000 0.0000000 0.1428571 0.1904762 0.2380952
+ [8] 0.2857143 0.3333333 0.3809524 0.4285714 0.4761905 0.5238095 0.5714286
+[15] 0.6190476 0.6666667 0.7142857 0.7619048 0.8571429 0.9047619 0.9523810
+[22] 1.0000000 1.0000000 1.0000000 1.0000000
+
+$nk
+[1] 21
+
+$min
+[1] 4
+
+$range
+[1] 21
+
+$coef
+ [1]  1.657809  4.986889  9.425578 15.058364 18.474307 21.938439 25.454405
+ [8] 29.037679 32.697985 36.415692 40.180057 44.035086 48.004725 52.097325
+[15] 56.299736 62.096055 68.215320 74.524063 79.313459 82.506943 84.103688
+
+attr(,"class")
+[1] "smooth.spline.fit"
+> ## End(Don't show)
+> lines(cars.spl, col = "blue")
+> lines(smooth.spline(speed, dist, df = 10), lty = 2, col = "red")
+> legend(5,120,c(paste("default [C.V.] => df =",round(cars.spl$df,1)),
++                "s( * , df = 10)"), col = c("blue","red"), lty = 1:2,
++        bg = 'bisque')
+> detach()
+> 
+> 
+> ## Residual (Tukey Anscombe) plot:
+> plot(residuals(cars.spl) ~ fitted(cars.spl))
+> abline(h = 0, col = "gray")
+> 
+> ## consistency check:
+> stopifnot(all.equal(cars$dist,
++                     fitted(cars.spl) + residuals(cars.spl)))
+> 
+> ## Visualize the behavior of  .nknots.smspl()
+> nKnots <- Vectorize(.nknots.smspl) ; c.. <- adjustcolor("gray20",.5)
+> curve(nKnots, 1, 250, n=250)
+> abline(0,1, lty=2, col=c..); text(90,90,"y = x", col=c.., adj=-.25)
+> abline(h=100,lty=2); abline(v=200, lty=2)
+> 
+> n <- c(1:799, seq(800, 3490, by=10), seq(3500, 10000, by = 50))
+> plot(n, nKnots(n), type="l", main = "Vectorize(.nknots.smspl) (n)")
+> abline(0,1, lty=2, col=c..); text(180,180,"y = x", col=c..)
+> n0 <- c(50, 200, 800, 3200); c0 <- adjustcolor("blue3", .5)
+> lines(n0, nKnots(n0), type="h", col=c0)
+> axis(1, at=n0, line=-2, col.ticks=c0, col=NA, col.axis=c0)
+> axis(4, at=.nknots.smspl(10000), line=-.5, col=c..,col.axis=c.., las=1)
+> 
+> ##-- artificial example
+> y18 <- c(1:3, 5, 4, 7:3, 2*(2:5), rep(10, 4))
+> xx  <- seq(1, length(y18), len = 201)
+> (s2  <- smooth.spline(y18)) # GCV
+Call:
+smooth.spline(x = y18)
+
+Smoothing Parameter  spar= 0.3928105  lambda= 9.672776e-05 (13 iterations)
+Equivalent Degrees of Freedom (Df): 8.494168
+Penalized Criterion: 3.59204
+GCV: 0.7155391
+> (s02  <- smooth.spline(y18, spar = 0.2))
+Call:
+smooth.spline(x = y18, spar = 0.2)
+
+Smoothing Parameter  spar= 0.2  lambda= 3.911187e-06
+Equivalent Degrees of Freedom (Df): 15.259
+Penalized Criterion: 0.4973656
+GCV: 1.191602
+> (s02. <- smooth.spline(y18, spar = 0.2, cv = NA))
+Call:
+smooth.spline(x = y18, spar = 0.2, cv = NA)
+
+Smoothing Parameter  spar= 0.2  lambda= 3.911187e-06
+Equivalent Degrees of Freedom (Df): NA
+Penalized Criterion: 0.4973656
+> plot(y18, main = deparse(s2$call), col.main = 2)
+> lines(s2, col = "gray"); lines(predict(s2, xx), col = 2)
+> lines(predict(s02, xx), col = 3); mtext(deparse(s02$call), col = 3)
+> 
+> ## Don't show: 
+> stopifnot(all.equal(predict(s02 , xx),
++ 		    predict(s02., xx), tolerance = 1e-15))
+> ## End(Don't show)
+> 
+> 
+> cleanEx()
+> nameEx("smoothEnds")
+> ### * smoothEnds
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: smoothEnds
+> ### Title: End Points Smoothing (for Running Medians)
+> ### Aliases: smoothEnds
+> ### Keywords: smooth robust
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> y <- ys <- (-20:20)^2
+> y [c(1,10,21,41)] <-  c(100, 30, 400, 470)
+> s7k <- runmed(y, 7, endrule = "keep")
+> s7. <- runmed(y, 7, endrule = "const")
+> s7m <- runmed(y, 7)
+> col3 <- c("midnightblue","blue","steelblue")
+> plot(y, main = "Running Medians -- runmed(*, k=7, end.rule = X)")
+> lines(ys, col = "light gray")
+> matlines(cbind(s7k, s7.,s7m), lwd = 1.5, lty = 1, col = col3)
+> legend(1, 470, paste("endrule", c("keep","constant","median"), sep = " = "),
++        col = col3, lwd = 1.5, lty = 1)
+> 
+> stopifnot(identical(s7m, smoothEnds(s7k, 7)))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("sortedXyData")
+> ### * sortedXyData
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: sortedXyData
+> ### Title: Create a 'sortedXyData' Object
+> ### Aliases: sortedXyData sortedXyData.default
+> ### Keywords: manip
+> 
+> ### ** Examples
+> 
+> DNase.2 <- DNase[ DNase$Run == "2", ]
+> sortedXyData( expression(log(conc)), expression(density), DNase.2 )
+           x      y
+1 -3.0194489 0.0475
+2 -1.6331544 0.1300
+3 -0.9400073 0.2160
+4 -0.2468601 0.3920
+5  0.4462871 0.6765
+6  1.1394343 1.0970
+7  1.8325815 1.5400
+8  2.5257286 1.9230
+> 
+> 
+> 
+> cleanEx()
+> nameEx("spec.ar")
+> ### * spec.ar
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: spec.ar
+> ### Title: Estimate Spectral Density of a Time Series from AR Fit
+> ### Aliases: spec.ar
+> ### Keywords: ts
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> spec.ar(lh)
+> 
+> spec.ar(ldeaths)
+> spec.ar(ldeaths, method = "burg")
+> 
+> spec.ar(log(lynx))
+> spec.ar(log(lynx), method = "burg", add = TRUE, col = "purple")
+> spec.ar(log(lynx), method = "mle", add = TRUE, col = "forest green")
+> spec.ar(log(lynx), method = "ols", add = TRUE, col = "blue")
+> 
+> 
+> 
+> cleanEx()
+> nameEx("spec.pgram")
+> ### * spec.pgram
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: spec.pgram
+> ### Title: Estimate Spectral Density of a Time Series by a Smoothed
+> ###   Periodogram
+> ### Aliases: spec.pgram
+> ### Keywords: ts
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> ## Examples from Venables & Ripley
+> spectrum(ldeaths)
+> spectrum(ldeaths, spans = c(3,5))
+> spectrum(ldeaths, spans = c(5,7))
+> spectrum(mdeaths, spans = c(3,3))
+> spectrum(fdeaths, spans = c(3,3))
+> 
+> ## bivariate example
+> mfdeaths.spc <- spec.pgram(ts.union(mdeaths, fdeaths), spans = c(3,3))
+> # plots marginal spectra: now plot coherency and phase
+> plot(mfdeaths.spc, plot.type = "coherency")
+> plot(mfdeaths.spc, plot.type = "phase")
+> 
+> ## now impose a lack of alignment
+> mfdeaths.spc <- spec.pgram(ts.intersect(mdeaths, lag(fdeaths, 4)),
++    spans = c(3,3), plot = FALSE)
+> plot(mfdeaths.spc, plot.type = "coherency")
+> plot(mfdeaths.spc, plot.type = "phase")
+> 
+> stocks.spc <- spectrum(EuStockMarkets, kernel("daniell", c(30,50)),
++                        plot = FALSE)
+> plot(stocks.spc, plot.type = "marginal") # the default type
+> plot(stocks.spc, plot.type = "coherency")
+> plot(stocks.spc, plot.type = "phase")
+> 
+> sales.spc <- spectrum(ts.union(BJsales, BJsales.lead),
++                       kernel("modified.daniell", c(5,7)))
+> plot(sales.spc, plot.type = "coherency")
+> plot(sales.spc, plot.type = "phase")
+> 
+> 
+> 
+> cleanEx()
+> nameEx("spectrum")
+> ### * spectrum
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: spectrum
+> ### Title: Spectral Density Estimation
+> ### Aliases: spectrum spec
+> ### Keywords: ts
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> ## Examples from Venables & Ripley
+> ## spec.pgram
+> par(mfrow = c(2,2))
+> spectrum(lh)
+> spectrum(lh, spans = 3)
+> spectrum(lh, spans = c(3,3))
+> spectrum(lh, spans = c(3,5))
+> 
+> spectrum(ldeaths)
+> spectrum(ldeaths, spans = c(3,3))
+> spectrum(ldeaths, spans = c(3,5))
+> spectrum(ldeaths, spans = c(5,7))
+> spectrum(ldeaths, spans = c(5,7), log = "dB", ci = 0.8)
+> 
+> # for multivariate examples see the help for spec.pgram
+> 
+> ## spec.ar
+> spectrum(lh, method = "ar")
+> spectrum(ldeaths, method = "ar")
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("splinefun")
+> ### * splinefun
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: splinefun
+> ### Title: Interpolating Splines
+> ### Aliases: spline splinefun splinefunH
+> ### Keywords: math dplot
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> op <- par(mfrow = c(2,1), mgp = c(2,.8,0), mar = 0.1+c(3,3,3,1))
+> n <- 9
+> x <- 1:n
+> y <- rnorm(n)
+> plot(x, y, main = paste("spline[fun](.) through", n, "points"))
+> lines(spline(x, y))
+> lines(spline(x, y, n = 201), col = 2)
+> 
+> y <- (x-6)^2
+> plot(x, y, main = "spline(.) -- 3 methods")
+> lines(spline(x, y, n = 201), col = 2)
+> lines(spline(x, y, n = 201, method = "natural"), col = 3)
+> lines(spline(x, y, n = 201, method = "periodic"), col = 4)
+Warning in spline(x, y, n = 201, method = "periodic") :
+  spline: first and last y values differ - using y[1] for both
+> legend(6, 25, c("fmm","natural","periodic"), col = 2:4, lty = 1)
+> 
+> y <- sin((x-0.5)*pi)
+> f <- splinefun(x, y)
+> ls(envir = environment(f))
+[1] "z"
+> splinecoef <- get("z", envir = environment(f))
+> curve(f(x), 1, 10, col = "green", lwd = 1.5)
+> points(splinecoef, col = "purple", cex = 2)
+> curve(f(x, deriv = 1), 1, 10, col = 2, lwd = 1.5)
+> curve(f(x, deriv = 2), 1, 10, col = 2, lwd = 1.5, n = 401)
+> curve(f(x, deriv = 3), 1, 10, col = 2, lwd = 1.5, n = 401)
+> par(op)
+> 
+> ## Manual spline evaluation --- demo the coefficients :
+> .x <- splinecoef$x
+> u <- seq(3, 6, by = 0.25)
+> (ii <- findInterval(u, .x))
+ [1] 3 3 3 3 4 4 4 4 5 5 5 5 6
+> dx <- u - .x[ii]
+> f.u <- with(splinecoef,
++             y[ii] + dx*(b[ii] + dx*(c[ii] + dx* d[ii])))
+> stopifnot(all.equal(f(u), f.u))
+> 
+> ## An example with ties (non-unique  x values):
+> set.seed(1); x <- round(rnorm(30), 1); y <- sin(pi * x) + rnorm(30)/10
+> plot(x, y, main = "spline(x,y)  when x has ties")
+> lines(spline(x, y, n = 201), col = 2)
+> ## visualizes the non-unique ones:
+> tx <- table(x); mx <- as.numeric(names(tx[tx > 1]))
+> ry <- matrix(unlist(tapply(y, match(x, mx), range, simplify = FALSE)),
++              ncol = 2, byrow = TRUE)
+> segments(mx, ry[, 1], mx, ry[, 2], col = "blue", lwd = 2)
+> 
+> ## An example of monotone interpolation
+> n <- 20
+> set.seed(11)
+> x. <- sort(runif(n)) ; y. <- cumsum(abs(rnorm(n)))
+> plot(x., y.)
+> curve(splinefun(x., y.)(x), add = TRUE, col = 2, n = 1001)
+> curve(splinefun(x., y., method = "monoH.FC")(x), add = TRUE, col = 3, n = 1001)
+> curve(splinefun(x., y., method = "hyman")   (x), add = TRUE, col = 4, n = 1001)
+> legend("topleft",
++        paste0("splinefun( \"", c("fmm", "monoH.FC", "hyman"), "\" )"),
++        col = 2:4, lty = 1, bty = "n")
+> 
+> ## and one from Fritsch and Carlson (1980), Dougherty et al (1989)
+> x. <- c(7.09, 8.09, 8.19, 8.7, 9.2, 10, 12, 15, 20)
+> f <- c(0, 2.76429e-5, 4.37498e-2, 0.169183, 0.469428, 0.943740,
++        0.998636, 0.999919, 0.999994)
+> s0 <- splinefun(x., f)
+> s1 <- splinefun(x., f, method = "monoH.FC")
+> s2 <- splinefun(x., f, method = "hyman")
+> plot(x., f, ylim = c(-0.2, 1.2))
+> curve(s0(x), add = TRUE, col = 2, n = 1001) -> m0
+> curve(s1(x), add = TRUE, col = 3, n = 1001)
+> curve(s2(x), add = TRUE, col = 4, n = 1001)
+> legend("right",
++        paste0("splinefun( \"", c("fmm", "monoH.FC", "hyman"), "\" )"),
++        col = 2:4, lty = 1, bty = "n")
+> 
+> ## they seem identical, but are not quite:
+> xx <- m0$x
+> plot(xx, s1(xx) - s2(xx), type = "l",  col = 2, lwd = 2,
++      main = "Difference   monoH.FC - hyman"); abline(h = 0, lty = 3)
+> 
+> x <- xx[xx < 10.2] ## full range: x <- xx .. does not show enough
+> ccol <- adjustcolor(2:4, 0.8)
+> matplot(x, cbind(s0(x, deriv = 2), s1(x, deriv = 2), s2(x, deriv = 2))^2,
++         lwd = 2, col = ccol, type = "l", ylab = quote({{f*second}(x)}^2),
++         main = expression({{f*second}(x)}^2 ~" for the three 'splines'"))
+> legend("topright",
++        paste0("splinefun( \"", c("fmm", "monoH.FC", "hyman"), "\" )"),
++        lwd = 2, col  =  ccol, lty = 1:3, bty = "n")
+> ## --> "hyman" has slightly smaller  Integral f''(x)^2 dx  than "FC",
+> ## here, and both are 'much worse' than the regular fmm spline.
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("stat.anova")
+> ### * stat.anova
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: stat.anova
+> ### Title: GLM Anova Statistics
+> ### Aliases: stat.anova
+> ### Keywords: regression models
+> 
+> ### ** Examples
+> 
+> ##-- Continued from '?glm':
+> ## Don't show: 
+> utils::example("glm", echo = FALSE)
+  treatment outcome counts
+1         1       1     18
+2         1       2     17
+3         1       3     15
+4         2       1     20
+5         2       2     10
+6         2       3     20
+7         3       1     25
+8         3       2     13
+9         3       3     12
+> ## End(Don't show)
+> print(ag <- anova(glm.D93))
+Analysis of Deviance Table
+
+Model: poisson, link: log
+
+Response: counts
+
+Terms added sequentially (first to last)
+
+
+          Df Deviance Resid. Df Resid. Dev
+NULL                          8    10.5814
+outcome    2   5.4523         6     5.1291
+treatment  2   0.0000         4     5.1291
+> stat.anova(ag$table, test = "Cp",
++            scale = sum(resid(glm.D93, "pearson")^2)/4,
++            df.scale = 4, n = 9)
+     table Cp
+> 
+> 
+> 
+> cleanEx()
+> nameEx("step")
+> ### * step
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: step
+> ### Title: Choose a model by AIC in a Stepwise Algorithm
+> ### Aliases: step
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> 
+> cleanEx()
+> nameEx("stepfun")
+> ### * stepfun
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: stepfun
+> ### Title: Step Functions - Creation and Class
+> ### Aliases: stepfun is.stepfun as.stepfun print.stepfun summary.stepfun
+> ###   knots
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> y0 <- c(1., 2., 4., 3.)
+> sfun0  <- stepfun(1:3, y0, f = 0)
+> sfun.2 <- stepfun(1:3, y0, f = 0.2)
+> sfun1  <- stepfun(1:3, y0, f = 1)
+> sfun1c <- stepfun(1:3, y0, right = TRUE) # hence f=1
+> sfun0
+Step function
+Call: stepfun(1:3, y0, f = 0)
+ x[1:3] =      1,      2,      3
+4 plateau levels =      1,      2,      4,      3
+> summary(sfun0)
+Step function with continuity 'f'= 0 ,  3 knots at
+[1] 1 2 3
+  and	4 plateau levels (y) at
+[1] 1 2 4 3
+> summary(sfun.2)
+Step function with continuity 'f'= 0.2 ,  3 knots at
+[1] 1 2 3
+  and	4 plateau levels (y) at
+[1] 1 2 4 3
+> 
+> ## look at the internal structure:
+> unclass(sfun0)
+function (v) 
+.approxfun(x, y, v, method, yleft, yright, f)
+<bytecode: 0x3b158f8>
+<environment: 0x4bbc468>
+attr(,"call")
+stepfun(1:3, y0, f = 0)
+> ls(envir = environment(sfun0))
+[1] "f"      "method" "x"      "y"      "yleft"  "yright"
+> 
+> x0 <- seq(0.5, 3.5, by = 0.25)
+> rbind(x = x0, f.f0 = sfun0(x0), f.f02 = sfun.2(x0),
++       f.f1 = sfun1(x0), f.f1c = sfun1c(x0))
+      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13]
+x      0.5 0.75    1 1.25  1.5 1.75    2 2.25  2.5  2.75     3  3.25   3.5
+f.f0   1.0 1.00    2 2.00  2.0 2.00    4 4.00  4.0  4.00     3  3.00   3.0
+f.f02  1.0 1.00    2 2.40  2.4 2.40    4 3.80  3.8  3.80     3  3.00   3.0
+f.f1   1.0 1.00    2 4.00  4.0 4.00    4 3.00  3.0  3.00     3  3.00   3.0
+f.f1c  1.0 1.00    1 2.00  2.0 2.00    2 4.00  4.0  4.00     4  3.00   3.0
+> ## Identities :
+> stopifnot(identical(y0[-1], sfun0 (1:3)), # right = FALSE
++           identical(y0[-4], sfun1c(1:3))) # right = TRUE
+> 
+> 
+> 
+> cleanEx()
+> nameEx("stl")
+> ### * stl
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: stl
+> ### Title: Seasonal Decomposition of Time Series by Loess
+> ### Aliases: stl
+> ### Keywords: ts
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> plot(stl(nottem, "per"))
+> plot(stl(nottem, s.window = 7, t.window = 50, t.jump = 1))
+> 
+> plot(stllc <- stl(log(co2), s.window = 21))
+> summary(stllc)
+ Call:
+ stl(x = log(co2), s.window = 21)
+
+ Time.series components:
+    seasonal                trend            remainder            
+ Min.   :-0.009939103   Min.   :5.753541   Min.   :-0.0022554051  
+ 1st Qu.:-0.004536535   1st Qu.:5.778556   1st Qu.:-0.0004586796  
+ Median : 0.000877761   Median :5.815125   Median :-0.0000088674  
+ Mean   :-0.000001304   Mean   :5.819267   Mean   :-0.0000019655  
+ 3rd Qu.: 0.004997747   3rd Qu.:5.859806   3rd Qu.: 0.0004023465  
+ Max.   : 0.009114691   Max.   :5.898750   Max.   : 0.0019396260  
+ IQR:
+     STL.seasonal STL.trend STL.remainder data    
+     0.009534     0.081250  0.000861      0.079370
+   %  12.0        102.4       1.1         100.0   
+
+ Weights: all == 1
+
+ Other components: List of 5
+ $ win  : Named num [1:3] 21 21 13
+ $ deg  : Named int [1:3] 0 1 1
+ $ jump : Named num [1:3] 3 3 2
+ $ inner: int 2
+ $ outer: int 0
+> ## linear trend, strict period.
+> plot(stl(log(co2), s.window = "per", t.window = 1000))
+> 
+> ## Two STL plotted side by side :
+>         stmd <- stl(mdeaths, s.window = "per") # non-robust
+> summary(stmR <- stl(mdeaths, s.window = "per", robust = TRUE))
+ Call:
+ stl(x = mdeaths, s.window = "per", robust = TRUE)
+
+ Time.series components:
+    seasonal             trend            remainder        
+ Min.   :-446.8302   Min.   :1318.650   Min.   :-314.5835  
+ 1st Qu.:-301.5726   1st Qu.:1432.208   1st Qu.: -32.5392  
+ Median : -79.0561   Median :1448.891   Median :   5.7943  
+ Mean   :   0.0000   Mean   :1472.880   Mean   :  23.0646  
+ 3rd Qu.: 304.5673   3rd Qu.:1548.974   3rd Qu.:  47.5134  
+ Max.   : 544.7904   Max.   :1615.535   Max.   : 872.1992  
+ IQR:
+     STL.seasonal STL.trend STL.remainder data  
+     606.14       116.77     80.05        707.75
+   %  85.6         16.5      11.3         100.0 
+
+ Weights:
+     Min.   1st Qu.    Median      Mean   3rd Qu.      Max. 
+0.0000000 0.5594126 0.9451991 0.7312186 0.9853375 1.0000000 
+
+ Other components: List of 5
+ $ win  : Named num [1:3] 721 19 13
+ $ deg  : Named int [1:3] 0 1 1
+ $ jump : Named num [1:3] 73 2 2
+ $ inner: int 1
+ $ outer: int 15
+> op <- par(mar = c(0, 4, 0, 3), oma = c(5, 0, 4, 0), mfcol = c(4, 2))
+> plot(stmd, set.pars = NULL, labels  =  NULL,
++      main = "stl(mdeaths, s.w = \"per\",  robust = FALSE / TRUE )")
+> plot(stmR, set.pars = NULL)
+> # mark the 'outliers' :
+> (iO <- which(stmR $ weights  < 1e-8)) # 10 were considered outliers
+ [1] 24 26 27 28 36 37 50 52 59 61
+> sts <- stmR$time.series
+> points(time(sts)[iO], 0.8* sts[,"remainder"][iO], pch = 4, col = "red")
+> par(op)   # reset
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("summary.aov")
+> ### * summary.aov
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: summary.aov
+> ### Title: Summarize an Analysis of Variance Model
+> ### Aliases: summary.aov summary.aovlist print.summary.aov
+> ###   print.summary.aovlist
+> ### Keywords: models regression
+> 
+> ### ** Examples
+> 
+> ## For a simple example see example(aov)
+> 
+> # Cochran and Cox (1957, p.164)
+> # 3x3 factorial with ordered factors, each is average of 12.
+> CC <- data.frame(
++     y = c(449, 413, 326, 409, 358, 291, 341, 278, 312)/12,
++     P = ordered(gl(3, 3)), N = ordered(gl(3, 1, 9))
++ )
+> CC.aov <- aov(y ~ N * P, data = CC , weights = rep(12, 9))
+> summary(CC.aov)
+            Df Sum Sq Mean Sq
+N            2 1016.7   508.3
+P            2  917.4   458.7
+N:P          4  399.3    99.8
+> 
+> # Split both main effects into linear and quadratic parts.
+> summary(CC.aov, split = list(N = list(L = 1, Q = 2),
++                              P = list(L = 1, Q = 2)))
+            Df Sum Sq Mean Sq
+N            2 1016.7   508.3
+  N: L       1 1012.5  1012.5
+  N: Q       1    4.2     4.2
+P            2  917.4   458.7
+  P: L       1  917.3   917.3
+  P: Q       1    0.0     0.0
+N:P          4  399.3    99.8
+  N:P: L.L   1  184.1   184.1
+  N:P: Q.L   1  152.1   152.1
+  N:P: L.Q   1   49.0    49.0
+  N:P: Q.Q   1   14.1    14.1
+> 
+> # Split only the interaction
+> summary(CC.aov, split = list("N:P" = list(L.L = 1, Q = 2:4)))
+            Df Sum Sq Mean Sq
+N            2 1016.7   508.3
+P            2  917.4   458.7
+N:P          4  399.3    99.8
+  N:P: L.L   1  184.1   184.1
+  N:P: Q     3  215.2    71.7
+> 
+> # split on just one var
+> summary(CC.aov, split = list(P = list(lin = 1, quad = 2)))
+            Df Sum Sq Mean Sq
+N            2 1016.7   508.3
+P            2  917.4   458.7
+  P: lin     1  917.3   917.3
+  P: quad    1    0.0     0.0
+N:P          4  399.3    99.8
+  N:P: lin   2  336.2   168.1
+  N:P: quad  2   63.1    31.5
+> summary(CC.aov, split = list(P = list(lin = 1, quad = 2)),
++         expand.split = FALSE)
+            Df Sum Sq Mean Sq
+N            2 1016.7   508.3
+P            2  917.4   458.7
+  P: lin     1  917.3   917.3
+  P: quad    1    0.0     0.0
+N:P          4  399.3    99.8
+> 
+> 
+> cleanEx()
+> nameEx("summary.glm")
+> ### * summary.glm
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: summary.glm
+> ### Title: Summarizing Generalized Linear Model Fits
+> ### Aliases: summary.glm print.summary.glm
+> ### Keywords: models regression
+> 
+> ### ** Examples
+> 
+> ## For examples see example(glm)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("summary.lm")
+> ### * summary.lm
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: summary.lm
+> ### Title: Summarizing Linear Model Fits
+> ### Aliases: summary.lm summary.mlm print.summary.lm
+> ### Keywords: regression models
+> 
+> ### ** Examples
+> 
+> ## Don't show: 
+> utils::example("lm", echo = FALSE)
+> ## End(Don't show)
+> ##-- Continuing the  lm(.) example:
+> coef(lm.D90)  # the bare coefficients
+groupCtl groupTrt 
+   5.032    4.661 
+> sld90 <- summary(lm.D90 <- lm(weight ~ group -1))  # omitting intercept
+> sld90
+
+Call:
+lm(formula = weight ~ group - 1)
+
+Residuals:
+    Min      1Q  Median      3Q     Max 
+-1.0710 -0.4938  0.0685  0.2462  1.3690 
+
+Coefficients:
+         Estimate Std. Error t value Pr(>|t|)    
+groupCtl   5.0320     0.2202   22.85 9.55e-15 ***
+groupTrt   4.6610     0.2202   21.16 3.62e-14 ***
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Residual standard error: 0.6964 on 18 degrees of freedom
+Multiple R-squared:  0.9818,	Adjusted R-squared:  0.9798 
+F-statistic: 485.1 on 2 and 18 DF,  p-value: < 2.2e-16
+
+> coef(sld90)  # much more
+         Estimate Std. Error  t value     Pr(>|t|)
+groupCtl    5.032  0.2202177 22.85012 9.547128e-15
+groupTrt    4.661  0.2202177 21.16542 3.615345e-14
+> 
+> ## model with *aliased* coefficient:
+> lm.D9. <- lm(weight ~ group + I(group != "Ctl"))
+> Sm.D9. <- summary(lm.D9.)
+> Sm.D9. #  shows the NA NA NA NA  line
+
+Call:
+lm(formula = weight ~ group + I(group != "Ctl"))
+
+Residuals:
+    Min      1Q  Median      3Q     Max 
+-1.0710 -0.4938  0.0685  0.2462  1.3690 
+
+Coefficients: (1 not defined because of singularities)
+                      Estimate Std. Error t value Pr(>|t|)    
+(Intercept)             5.0320     0.2202  22.850 9.55e-15 ***
+groupTrt               -0.3710     0.3114  -1.191    0.249    
+I(group != "Ctl")TRUE       NA         NA      NA       NA    
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Residual standard error: 0.6964 on 18 degrees of freedom
+Multiple R-squared:  0.07308,	Adjusted R-squared:  0.02158 
+F-statistic: 1.419 on 1 and 18 DF,  p-value: 0.249
+
+> stopifnot(length(cc <- coef(lm.D9.)) == 3, is.na(cc[3]),
++           dim(coef(Sm.D9.)) == c(2,4), Sm.D9.$df == c(2, 18, 3))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("summary.manova")
+> ### * summary.manova
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: summary.manova
+> ### Title: Summary Method for Multivariate Analysis of Variance
+> ### Aliases: summary.manova print.summary.manova
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> 
+> cleanEx()
+> nameEx("summary.princomp")
+> ### * summary.princomp
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: summary.princomp
+> ### Title: Summary method for Principal Components Analysis
+> ### Aliases: summary.princomp print.summary.princomp
+> ### Keywords: multivariate
+> 
+> ### ** Examples
+> 
+> summary(pc.cr <- princomp(USArrests, cor = TRUE))
+Importance of components:
+                          Comp.1    Comp.2    Comp.3     Comp.4
+Standard deviation     1.5748783 0.9948694 0.5971291 0.41644938
+Proportion of Variance 0.6200604 0.2474413 0.0891408 0.04335752
+Cumulative Proportion  0.6200604 0.8675017 0.9566425 1.00000000
+> ## The signs of the loading columns are arbitrary
+> print(summary(princomp(USArrests, cor = TRUE),
++               loadings = TRUE, cutoff = 0.2), digits = 2)
+Importance of components:
+                          Comp.1    Comp.2    Comp.3     Comp.4
+Standard deviation     1.5748783 0.9948694 0.5971291 0.41644938
+Proportion of Variance 0.6200604 0.2474413 0.0891408 0.04335752
+Cumulative Proportion  0.6200604 0.8675017 0.9566425 1.00000000
+
+Loadings:
+         Comp.1 Comp.2 Comp.3 Comp.4
+Murder   -0.54   0.42  -0.34   0.65 
+Assault  -0.58         -0.27  -0.74 
+UrbanPop -0.28  -0.87  -0.38        
+Rape     -0.54          0.82        
+> 
+> 
+> 
+> cleanEx()
+> nameEx("supsmu")
+> ### * supsmu
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: supsmu
+> ### Title: Friedman's SuperSmoother
+> ### Aliases: supsmu
+> ### Keywords: smooth
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> with(cars, {
++     plot(speed, dist)
++     lines(supsmu(speed, dist))
++     lines(supsmu(speed, dist, bass = 7), lty = 2)
++     })
+> 
+> 
+> 
+> cleanEx()
+> nameEx("symnum")
+> ### * symnum
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: symnum
+> ### Title: Symbolic Number Coding
+> ### Aliases: symnum
+> ### Keywords: utilities character
+> 
+> ### ** Examples
+> 
+> ii <- setNames(0:8, 0:8)
+> symnum(ii, cut =  2*(0:4), sym = c(".", "-", "+", "$"))
+0 1 2 3 4 5 6 7 8 
+. . . - - + + $ $ 
+attr(,"legend")
+[1] 0 ‘.’ 2 ‘-’ 4 ‘+’ 6 ‘$’ 8
+> symnum(ii, cut =  2*(0:4), sym = c(".", "-", "+", "$"), show.max = TRUE)
+0 1 2 3 4 5 6 7 8 
+. . . - - + + $ 8 
+attr(,"legend")
+[1] 0 ‘.’ 2 ‘-’ 4 ‘+’ 6 ‘$’ 8
+> 
+> symnum(1:12 %% 3 == 0)  # --> "|" = TRUE, "." = FALSE  for logical
+ [1] . . | . . | . . | . . |
+> 
+> ## Pascal's Triangle modulo 2 -- odd and even numbers:
+> N <- 38
+> pascal <- t(sapply(0:N, function(n) round(choose(n, 0:N - (N-n)%/%2))))
+> rownames(pascal) <- rep("", 1+N) # <-- to improve "graphic"
+> symnum(pascal %% 2, symbols = c(" ", "A"), numeric = FALSE)
+                                                                              
+                                       A                                      
+                                     A A                                      
+                                     A   A                                    
+                                   A A A A                                    
+                                   A       A                                  
+                                 A A     A A                                  
+                                 A   A   A   A                                
+                               A A A A A A A A                                
+                               A               A                              
+                             A A             A A                              
+                             A   A           A   A                            
+                           A A A A         A A A A                            
+                           A       A       A       A                          
+                         A A     A A     A A     A A                          
+                         A   A   A   A   A   A   A   A                        
+                       A A A A A A A A A A A A A A A A                        
+                       A                               A                      
+                     A A                             A A                      
+                     A   A                           A   A                    
+                   A A A A                         A A A A                    
+                   A       A                       A       A                  
+                 A A     A A                     A A     A A                  
+                 A   A   A   A                   A   A   A   A                
+               A A A A A A A A                 A A A A A A A A                
+               A               A               A               A              
+             A A             A A             A A             A A              
+             A   A           A   A           A   A           A   A            
+           A A A A         A A A A         A A A A         A A A A            
+           A       A       A       A       A       A       A       A          
+         A A     A A     A A     A A     A A     A A     A A     A A          
+         A   A   A   A   A   A   A   A   A   A   A   A   A   A   A   A        
+       A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A        
+       A                                                               A      
+     A A                                                             A A      
+     A   A                                                           A   A    
+   A A A A                                                         A A A A    
+   A       A                                                       A       A  
+ A A     A A                                                     A A     A A  
+ A   A   A   A                                                   A   A   A   A
+> 
+> ##-- Symbolic correlation matrices:
+> symnum(cor(attitude), diag = FALSE)
+           rt cm p l rs cr a
+rating                      
+complaints +                
+privileges .  .             
+learning   ,  .  .          
+raises     .  ,  . ,        
+critical             .      
+advance          . . .      
+attr(,"legend")
+[1] 0 ‘ ’ 0.3 ‘.’ 0.6 ‘,’ 0.8 ‘+’ 0.9 ‘*’ 0.95 ‘B’ 1
+> symnum(cor(attitude), abbr. = NULL)
+                        
+rating     1            
+complaints + 1          
+privileges . . 1        
+learning   , . . 1      
+raises     . , . , 1    
+critical           . 1  
+advance        . . .   1
+attr(,"legend")
+[1] 0 ‘ ’ 0.3 ‘.’ 0.6 ‘,’ 0.8 ‘+’ 0.9 ‘*’ 0.95 ‘B’ 1
+> symnum(cor(attitude), abbr. = FALSE)
+           rating complaints privileges learning raises critical advance
+rating     1                                                            
+complaints +      1                                                     
+privileges .      .          1                                          
+learning   ,      .          .          1                               
+raises     .      ,          .          ,        1                      
+critical                                         .      1               
+advance                      .          .        .               1      
+attr(,"legend")
+[1] 0 ‘ ’ 0.3 ‘.’ 0.6 ‘,’ 0.8 ‘+’ 0.9 ‘*’ 0.95 ‘B’ 1
+> symnum(cor(attitude), abbr. = 2)
+           rt cm pr lr rs cr ad
+rating     1                   
+complaints +  1                
+privileges .  .  1             
+learning   ,  .  .  1          
+raises     .  ,  .  ,  1       
+critical               .  1    
+advance          .  .  .     1 
+attr(,"legend")
+[1] 0 ‘ ’ 0.3 ‘.’ 0.6 ‘,’ 0.8 ‘+’ 0.9 ‘*’ 0.95 ‘B’ 1
+> 
+> symnum(cor(rbind(1, rnorm(25), rnorm(25)^2)))
+                                                       
+ [1,] 1                                                
+ [2,] + 1                                              
+ [3,] .   1                                            
+ [4,] .   B 1                                          
+ [5,] + B     1                                        
+ [6,] .   B B   1                                      
+ [7,] , * . . *   1                                    
+ [8,] . + . , + . B 1                                  
+ [9,] . + . , * . B B 1                                
+[10,] .   B B   B . . . 1                              
+[11,]     B B . * . , , B 1                            
+[12,] , B   . B   B + *   . 1                          
+[13,] 1 + . . + . , . . .   , 1                        
+[14,] , . * +   B       * +   , 1                      
+[15,]   . * B . + , + , * B .   , 1                    
+[16,] * B     B   + , ,     * * .   1                  
+[17,] * B     B   + , ,     * * .   B 1                
+[18,]   , , + , , * B * , + ,   . * . . 1              
+[19,] . + , , + . B B B , + + . . + , , B 1            
+[20,] + B     B   B + *   . B +   . B B , + 1          
+[21,]   , , + , , * B B , + +   . * . . B B , 1        
+[22,] . , , , + . B B B , + + . . + , , B B + B 1      
+[23,] B , , . , , .   . , . , B +   + +     ,     1    
+[24,] * , , . , , .     , . . * * . , ,     .     B 1  
+[25,] B + . . + . , . . .   , B ,   * *   . +   . B B 1
+attr(,"legend")
+[1] 0 ‘ ’ 0.3 ‘.’ 0.6 ‘,’ 0.8 ‘+’ 0.9 ‘*’ 0.95 ‘B’ 1
+> symnum(cor(matrix(rexp(30, 1), 5, 18))) # <<-- PATTERN ! --
+                                         
+ [1,] 1                                  
+ [2,] . 1                                
+ [3,]     1                              
+ [4,] . .   1                            
+ [5,]   , .   1                          
+ [6,]   ,     , 1                        
+ [7,] 1 .   .     1                      
+ [8,] . 1   . , , . 1                    
+ [9,]     1   .       1                  
+[10,] . .   1     . .   1                
+[11,]   , .   1 ,   , .   1              
+[12,]   ,     , 1   ,     , 1            
+[13,] 1 .   .     1 .   .     1          
+[14,] . 1   . , , . 1   . , , . 1        
+[15,]     1   .       1   .       1      
+[16,] . .   1     . .   1     . .   1    
+[17,]   , .   1 ,   , .   1 ,   , .   1  
+[18,]   ,     , 1   ,     , 1   ,     , 1
+attr(,"legend")
+[1] 0 ‘ ’ 0.3 ‘.’ 0.6 ‘,’ 0.8 ‘+’ 0.9 ‘*’ 0.95 ‘B’ 1
+> symnum(cm1 <- cor(matrix(rnorm(90) ,  5, 18))) # < White Noise SMALL n
+                                         
+ [1,] 1                                  
+ [2,] . 1                                
+ [3,] . . 1                              
+ [4,] , ,   1                            
+ [5,]   . ,   1                          
+ [6,]   . *   * 1                        
+ [7,] , .   . .   1                      
+ [8,] , .   .       1                    
+ [9,]   .   . . . . . 1                  
+[10,] , .   .     . B . 1                
+[11,] ,   + . + + ,   .   1              
+[12,]   , +   + *   .   . , 1            
+[13,] . +   +     ,   +   .   1          
+[14,]       .   .   . + ,     , 1        
+[15,]   .   .     .   . .     . + 1      
+[16,] .   , .   .   . . . .         1    
+[17,]   , +   , +       . . * .     . 1  
+[18,]   . .   * , . . .   , ,     .   . 1
+attr(,"legend")
+[1] 0 ‘ ’ 0.3 ‘.’ 0.6 ‘,’ 0.8 ‘+’ 0.9 ‘*’ 0.95 ‘B’ 1
+> symnum(cm1, diag = FALSE)
+                                        
+ [1,]                                   
+ [2,] .                                 
+ [3,] . .                               
+ [4,] , ,                               
+ [5,]   . ,                             
+ [6,]   . *   *                         
+ [7,] , .   . .                         
+ [8,] , .   .                           
+ [9,]   .   . . . . .                   
+[10,] , .   .     . B .                 
+[11,] ,   + . + + ,   .                 
+[12,]   , +   + *   .   . ,             
+[13,] . +   +     ,   +   .             
+[14,]       .   .   . + ,     ,         
+[15,]   .   .     .   . .     . +       
+[16,] .   , .   .   . . . .             
+[17,]   , +   , +       . . * .     .   
+[18,]   . .   * , . . .   , ,     .   . 
+attr(,"legend")
+[1] 0 ‘ ’ 0.3 ‘.’ 0.6 ‘,’ 0.8 ‘+’ 0.9 ‘*’ 0.95 ‘B’ 1
+> symnum(cm2 <- cor(matrix(rnorm(900), 50, 18))) # < White Noise "BIG" n
+                                         
+ [1,] 1                                  
+ [2,]   1                                
+ [3,]     1                              
+ [4,]       1                            
+ [5,]         1                          
+ [6,]           1                        
+ [7,]             1                      
+ [8,]               1                    
+ [9,]                 1                  
+[10,]                   1                
+[11,]                     1              
+[12,]                       1            
+[13,]               .     .   1          
+[14,]                           1        
+[15,]                             1      
+[16,]                               1    
+[17,]                                 1  
+[18,]                                   1
+attr(,"legend")
+[1] 0 ‘ ’ 0.3 ‘.’ 0.6 ‘,’ 0.8 ‘+’ 0.9 ‘*’ 0.95 ‘B’ 1
+> symnum(cm2, lower = FALSE)
+                                         
+ [1,] 1                                  
+ [2,]   1                                
+ [3,]     1                              
+ [4,]       1                            
+ [5,]         1                          
+ [6,]           1                        
+ [7,]             1                      
+ [8,]               1         .          
+ [9,]                 1                  
+[10,]                   1                
+[11,]                     1   .          
+[12,]                       1            
+[13,]               .     .   1          
+[14,]                           1        
+[15,]                             1      
+[16,]                               1    
+[17,]                                 1  
+[18,]                                   1
+attr(,"legend")
+[1] 0 ‘ ’ 0.3 ‘.’ 0.6 ‘,’ 0.8 ‘+’ 0.9 ‘*’ 0.95 ‘B’ 1
+> 
+> ## NA's:
+> Cm <- cor(matrix(rnorm(60),  10, 6)); Cm[c(3,6), 2] <- NA
+> symnum(Cm, show.max = NULL)
+               
+[1,]           
+[2,]           
+[3,] . ?       
+[4,] .   ,     
+[5,]     .     
+[6,] , ?       
+attr(,"legend")
+[1] 0 ‘ ’ 0.3 ‘.’ 0.6 ‘,’ 0.8 ‘+’ 0.9 ‘*’ 0.95 ‘B’ 1 \t    ## NA: ‘?’
+> 
+> ## Graphical P-values (aka "significance stars"):
+> pval <- rev(sort(c(outer(1:6, 10^-(1:3)))))
+> symp <- symnum(pval, corr = FALSE,
++                cutpoints = c(0,  .001,.01,.05, .1, 1),
++                symbols = c("***","**","*","."," "))
+> noquote(cbind(P.val = format(pval), Signif = symp))
+      P.val Signif
+ [1,] 0.600       
+ [2,] 0.500       
+ [3,] 0.400       
+ [4,] 0.300       
+ [5,] 0.200       
+ [6,] 0.100 .     
+ [7,] 0.060 .     
+ [8,] 0.050 *     
+ [9,] 0.040 *     
+[10,] 0.030 *     
+[11,] 0.020 *     
+[12,] 0.010 **    
+[13,] 0.006 **    
+[14,] 0.005 **    
+[15,] 0.004 **    
+[16,] 0.003 **    
+[17,] 0.002 **    
+[18,] 0.001 ***   
+> 
+> 
+> 
+> cleanEx()
+> nameEx("t.test")
+> ### * t.test
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: t.test
+> ### Title: Student's t-Test
+> ### Aliases: t.test t.test.default t.test.formula
+> ### Keywords: htest
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> t.test(1:10, y = c(7:20))      # P = .00001855
+
+	Welch Two Sample t-test
+
+data:  1:10 and c(7:20)
+t = -5.4349, df = 21.982, p-value = 1.855e-05
+alternative hypothesis: true difference in means is not equal to 0
+95 percent confidence interval:
+ -11.052802  -4.947198
+sample estimates:
+mean of x mean of y 
+      5.5      13.5 
+
+> t.test(1:10, y = c(7:20, 200)) # P = .1245    -- NOT significant anymore
+
+	Welch Two Sample t-test
+
+data:  1:10 and c(7:20, 200)
+t = -1.6329, df = 14.165, p-value = 0.1245
+alternative hypothesis: true difference in means is not equal to 0
+95 percent confidence interval:
+ -47.242900   6.376233
+sample estimates:
+mean of x mean of y 
+  5.50000  25.93333 
+
+> 
+> ## Classical example: Student's sleep data
+> plot(extra ~ group, data = sleep)
+> ## Traditional interface
+> with(sleep, t.test(extra[group == 1], extra[group == 2]))
+
+	Welch Two Sample t-test
+
+data:  extra[group == 1] and extra[group == 2]
+t = -1.8608, df = 17.776, p-value = 0.07939
+alternative hypothesis: true difference in means is not equal to 0
+95 percent confidence interval:
+ -3.3654832  0.2054832
+sample estimates:
+mean of x mean of y 
+     0.75      2.33 
+
+> ## Formula interface
+> t.test(extra ~ group, data = sleep)
+
+	Welch Two Sample t-test
+
+data:  extra by group
+t = -1.8608, df = 17.776, p-value = 0.07939
+alternative hypothesis: true difference in means is not equal to 0
+95 percent confidence interval:
+ -3.3654832  0.2054832
+sample estimates:
+mean in group 1 mean in group 2 
+           0.75            2.33 
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("termplot")
+> ### * termplot
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: termplot
+> ### Title: Plot Regression Terms
+> ### Aliases: termplot
+> ### Keywords: hplot regression
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> had.splines <- "package:splines" %in% search()
+> if(!had.splines) rs <- require(splines)
+Loading required package: splines
+> x <- 1:100
+> z <- factor(rep(LETTERS[1:4], 25))
+> y <- rnorm(100, sin(x/10)+as.numeric(z))
+> model <- glm(y ~ ns(x, 6) + z)
+> 
+> par(mfrow = c(2,2)) ## 2 x 2 plots for same model :
+> termplot(model, main = paste("termplot( ", deparse(model$call)," ...)"))
+> termplot(model, rug = TRUE)
+> termplot(model, partial.resid = TRUE, se = TRUE, main = TRUE)
+> termplot(model, partial.resid = TRUE, smooth = panel.smooth, span.smth = 1/4)
+> if(!had.splines && rs) detach("package:splines")
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("terms.object")
+> ### * terms.object
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: terms.object
+> ### Title: Description of Terms Objects
+> ### Aliases: terms.object
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> ## use of specials (as used for gam() in packages mgcv and gam)
+> (tf <- terms(y ~ x + x:z + s(x), specials = "s"))
+y ~ x + x:z + s(x)
+attr(,"variables")
+list(y, x, z, s(x))
+attr(,"factors")
+     x s(x) x:z
+y    0    0   0
+x    1    0   2
+z    0    0   1
+s(x) 0    1   0
+attr(,"term.labels")
+[1] "x"    "s(x)" "x:z" 
+attr(,"specials")
+attr(,"specials")$s
+[1] 4
+
+attr(,"order")
+[1] 1 1 2
+attr(,"intercept")
+[1] 1
+attr(,"response")
+[1] 1
+attr(,".Environment")
+<environment: R_GlobalEnv>
+> ## Note that the "factors" attribute has variables as row names
+> ## and term labels as column names, both as character vectors.
+> attr(tf, "specials")    # index 's' variable(s)
+$s
+[1] 4
+
+> rownames(attr(tf, "factors"))[attr(tf, "specials")$s]
+[1] "s(x)"
+> 
+> ## we can keep the order by
+> terms(y ~ x + x:z + s(x), specials = "s", keep.order = TRUE)
+y ~ x + x:z + s(x)
+attr(,"variables")
+list(y, x, z, s(x))
+attr(,"factors")
+     x x:z s(x)
+y    0   0    0
+x    1   2    0
+z    0   1    0
+s(x) 0   0    1
+attr(,"term.labels")
+[1] "x"    "x:z"  "s(x)"
+attr(,"specials")
+attr(,"specials")$s
+[1] 4
+
+attr(,"order")
+[1] 1 2 1
+attr(,"intercept")
+[1] 1
+attr(,"response")
+[1] 1
+attr(,".Environment")
+<environment: R_GlobalEnv>
+> 
+> 
+> 
+> cleanEx()
+> nameEx("time")
+> ### * time
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: time
+> ### Title: Sampling Times of Time Series
+> ### Aliases: time cycle frequency deltat time.default
+> ### Keywords: ts
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> cycle(presidents)
+     Qtr1 Qtr2 Qtr3 Qtr4
+1945    1    2    3    4
+1946    1    2    3    4
+1947    1    2    3    4
+1948    1    2    3    4
+1949    1    2    3    4
+1950    1    2    3    4
+1951    1    2    3    4
+1952    1    2    3    4
+1953    1    2    3    4
+1954    1    2    3    4
+1955    1    2    3    4
+1956    1    2    3    4
+1957    1    2    3    4
+1958    1    2    3    4
+1959    1    2    3    4
+1960    1    2    3    4
+1961    1    2    3    4
+1962    1    2    3    4
+1963    1    2    3    4
+1964    1    2    3    4
+1965    1    2    3    4
+1966    1    2    3    4
+1967    1    2    3    4
+1968    1    2    3    4
+1969    1    2    3    4
+1970    1    2    3    4
+1971    1    2    3    4
+1972    1    2    3    4
+1973    1    2    3    4
+1974    1    2    3    4
+> # a simple series plot
+> plot(as.vector(time(presidents)), as.vector(presidents), type = "l")
+> 
+> 
+> 
+> cleanEx()
+> nameEx("toeplitz")
+> ### * toeplitz
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: toeplitz
+> ### Title: Form Symmetric Toeplitz Matrix
+> ### Aliases: toeplitz
+> ### Keywords: ts
+> 
+> ### ** Examples
+> 
+> x <- 1:5
+> toeplitz (x)
+     [,1] [,2] [,3] [,4] [,5]
+[1,]    1    2    3    4    5
+[2,]    2    1    2    3    4
+[3,]    3    2    1    2    3
+[4,]    4    3    2    1    2
+[5,]    5    4    3    2    1
+> 
+> 
+> 
+> cleanEx()
+> nameEx("ts")
+> ### * ts
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: ts
+> ### Title: Time-Series Objects
+> ### Aliases: ts as.ts as.ts.default is.ts Ops.ts cbind.ts is.mts [.ts t.ts
+> ### Keywords: ts
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> ts(1:10, frequency = 4, start = c(1959, 2)) # 2nd Quarter of 1959
+     Qtr1 Qtr2 Qtr3 Qtr4
+1959         1    2    3
+1960    4    5    6    7
+1961    8    9   10     
+> print( ts(1:10, frequency = 7, start = c(12, 2)), calendar = TRUE)
+   p1 p2 p3 p4 p5 p6 p7
+12     1  2  3  4  5  6
+13  7  8  9 10         
+> # print.ts(.)
+> ## Using July 1954 as start date:
+> gnp <- ts(cumsum(1 + round(rnorm(100), 2)),
++           start = c(1954, 7), frequency = 12)
+> plot(gnp) # using 'plot.ts' for time-series plot
+> 
+> ## Multivariate
+> z <- ts(matrix(rnorm(300), 100, 3), start = c(1961, 1), frequency = 12)
+> class(z)
+[1] "mts"    "ts"     "matrix"
+> head(z) # as "matrix"
+        Series 1   Series 2   Series 3
+[1,] -0.62036668  0.4094018  0.8936737
+[2,]  0.04211587  1.6888733 -1.0472981
+[3,] -0.91092165  1.5865884  1.9713374
+[4,]  0.15802877 -0.3309078 -0.3836321
+[5,] -0.65458464 -2.2852355  1.6541453
+[6,]  1.76728727  2.4976616  1.5122127
+> plot(z)
+> plot(z, plot.type = "single", lty = 1:3)
+> 
+> ## A phase plot:
+> plot(nhtemp, lag(nhtemp, 1), cex = .8, col = "blue",
++      main = "Lag plot of New Haven temperatures")
+> 
+> 
+> 
+> cleanEx()
+> nameEx("ts.plot")
+> ### * ts.plot
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: ts.plot
+> ### Title: Plot Multiple Time Series
+> ### Aliases: ts.plot
+> ### Keywords: ts
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> ts.plot(ldeaths, mdeaths, fdeaths,
++         gpars=list(xlab="year", ylab="deaths", lty=c(1:3)))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("ts.union")
+> ### * ts.union
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: ts.union
+> ### Title: Bind Two or More Time Series
+> ### Aliases: ts.union ts.intersect
+> ### Keywords: ts
+> 
+> ### ** Examples
+> 
+> ts.union(mdeaths, fdeaths)
+         mdeaths fdeaths
+Jan 1974    2134     901
+Feb 1974    1863     689
+Mar 1974    1877     827
+Apr 1974    1877     677
+May 1974    1492     522
+Jun 1974    1249     406
+Jul 1974    1280     441
+Aug 1974    1131     393
+Sep 1974    1209     387
+Oct 1974    1492     582
+Nov 1974    1621     578
+Dec 1974    1846     666
+Jan 1975    2103     830
+Feb 1975    2137     752
+Mar 1975    2153     785
+Apr 1975    1833     664
+May 1975    1403     467
+Jun 1975    1288     438
+Jul 1975    1186     421
+Aug 1975    1133     412
+Sep 1975    1053     343
+Oct 1975    1347     440
+Nov 1975    1545     531
+Dec 1975    2066     771
+Jan 1976    2020     767
+Feb 1976    2750    1141
+Mar 1976    2283     896
+Apr 1976    1479     532
+May 1976    1189     447
+Jun 1976    1160     420
+Jul 1976    1113     376
+Aug 1976     970     330
+Sep 1976     999     357
+Oct 1976    1208     445
+Nov 1976    1467     546
+Dec 1976    2059     764
+Jan 1977    2240     862
+Feb 1977    1634     660
+Mar 1977    1722     663
+Apr 1977    1801     643
+May 1977    1246     502
+Jun 1977    1162     392
+Jul 1977    1087     411
+Aug 1977    1013     348
+Sep 1977     959     387
+Oct 1977    1179     385
+Nov 1977    1229     411
+Dec 1977    1655     638
+Jan 1978    2019     796
+Feb 1978    2284     853
+Mar 1978    1942     737
+Apr 1978    1423     546
+May 1978    1340     530
+Jun 1978    1187     446
+Jul 1978    1098     431
+Aug 1978    1004     362
+Sep 1978     970     387
+Oct 1978    1140     430
+Nov 1978    1110     425
+Dec 1978    1812     679
+Jan 1979    2263     821
+Feb 1979    1820     785
+Mar 1979    1846     727
+Apr 1979    1531     612
+May 1979    1215     478
+Jun 1979    1075     429
+Jul 1979    1056     405
+Aug 1979     975     379
+Sep 1979     940     393
+Oct 1979    1081     411
+Nov 1979    1294     487
+Dec 1979    1341     574
+> cbind(mdeaths, fdeaths) # same as the previous line
+         mdeaths fdeaths
+Jan 1974    2134     901
+Feb 1974    1863     689
+Mar 1974    1877     827
+Apr 1974    1877     677
+May 1974    1492     522
+Jun 1974    1249     406
+Jul 1974    1280     441
+Aug 1974    1131     393
+Sep 1974    1209     387
+Oct 1974    1492     582
+Nov 1974    1621     578
+Dec 1974    1846     666
+Jan 1975    2103     830
+Feb 1975    2137     752
+Mar 1975    2153     785
+Apr 1975    1833     664
+May 1975    1403     467
+Jun 1975    1288     438
+Jul 1975    1186     421
+Aug 1975    1133     412
+Sep 1975    1053     343
+Oct 1975    1347     440
+Nov 1975    1545     531
+Dec 1975    2066     771
+Jan 1976    2020     767
+Feb 1976    2750    1141
+Mar 1976    2283     896
+Apr 1976    1479     532
+May 1976    1189     447
+Jun 1976    1160     420
+Jul 1976    1113     376
+Aug 1976     970     330
+Sep 1976     999     357
+Oct 1976    1208     445
+Nov 1976    1467     546
+Dec 1976    2059     764
+Jan 1977    2240     862
+Feb 1977    1634     660
+Mar 1977    1722     663
+Apr 1977    1801     643
+May 1977    1246     502
+Jun 1977    1162     392
+Jul 1977    1087     411
+Aug 1977    1013     348
+Sep 1977     959     387
+Oct 1977    1179     385
+Nov 1977    1229     411
+Dec 1977    1655     638
+Jan 1978    2019     796
+Feb 1978    2284     853
+Mar 1978    1942     737
+Apr 1978    1423     546
+May 1978    1340     530
+Jun 1978    1187     446
+Jul 1978    1098     431
+Aug 1978    1004     362
+Sep 1978     970     387
+Oct 1978    1140     430
+Nov 1978    1110     425
+Dec 1978    1812     679
+Jan 1979    2263     821
+Feb 1979    1820     785
+Mar 1979    1846     727
+Apr 1979    1531     612
+May 1979    1215     478
+Jun 1979    1075     429
+Jul 1979    1056     405
+Aug 1979     975     379
+Sep 1979     940     393
+Oct 1979    1081     411
+Nov 1979    1294     487
+Dec 1979    1341     574
+> ts.intersect(window(mdeaths, 1976), window(fdeaths, 1974, 1978))
+         window(mdeaths, 1976) window(fdeaths, 1974, 1978)
+Jan 1976                  2020                         767
+Feb 1976                  2750                        1141
+Mar 1976                  2283                         896
+Apr 1976                  1479                         532
+May 1976                  1189                         447
+Jun 1976                  1160                         420
+Jul 1976                  1113                         376
+Aug 1976                   970                         330
+Sep 1976                   999                         357
+Oct 1976                  1208                         445
+Nov 1976                  1467                         546
+Dec 1976                  2059                         764
+Jan 1977                  2240                         862
+Feb 1977                  1634                         660
+Mar 1977                  1722                         663
+Apr 1977                  1801                         643
+May 1977                  1246                         502
+Jun 1977                  1162                         392
+Jul 1977                  1087                         411
+Aug 1977                  1013                         348
+Sep 1977                   959                         387
+Oct 1977                  1179                         385
+Nov 1977                  1229                         411
+Dec 1977                  1655                         638
+Jan 1978                  2019                         796
+> 
+> sales1 <- ts.union(BJsales, lead = BJsales.lead)
+> ts.intersect(sales1, lead3 = lag(BJsales.lead, -3))
+Time Series:
+Start = 4 
+End = 150 
+Frequency = 1 
+    sales1.BJsales sales1.lead lead3
+  4          198.9        9.75 10.01
+  5          199.0       10.33 10.07
+  6          200.2       10.13 10.32
+  7          198.6       10.36  9.75
+  8          200.0       10.32 10.33
+  9          200.3       10.13 10.13
+ 10          201.2       10.16 10.36
+ 11          201.6       10.58 10.32
+ 12          201.5       10.62 10.13
+ 13          201.5       10.86 10.16
+ 14          203.5       11.20 10.58
+ 15          204.9       10.74 10.62
+ 16          207.1       10.56 10.86
+ 17          210.5       10.48 11.20
+ 18          210.5       10.77 10.74
+ 19          209.8       11.33 10.56
+ 20          208.8       10.96 10.48
+ 21          209.5       11.16 10.77
+ 22          213.2       11.70 11.33
+ 23          213.7       11.39 10.96
+ 24          215.1       11.42 11.16
+ 25          218.7       11.94 11.70
+ 26          219.8       11.24 11.39
+ 27          220.5       11.59 11.42
+ 28          223.8       10.96 11.94
+ 29          222.8       11.40 11.24
+ 30          223.8       11.02 11.59
+ 31          221.7       11.01 10.96
+ 32          222.3       11.23 11.40
+ 33          220.8       11.33 11.02
+ 34          219.4       10.83 11.01
+ 35          220.1       10.84 11.23
+ 36          220.6       11.14 11.33
+ 37          218.9       10.38 10.83
+ 38          217.8       10.90 10.84
+ 39          217.7       11.05 11.14
+ 40          215.0       11.11 10.38
+ 41          215.3       11.01 10.90
+ 42          215.9       11.22 11.05
+ 43          216.7       11.21 11.11
+ 44          216.7       11.91 11.01
+ 45          217.7       11.69 11.22
+ 46          218.7       10.93 11.21
+ 47          222.9       10.99 11.91
+ 48          224.9       11.01 11.69
+ 49          222.2       10.84 10.93
+ 50          220.7       10.76 10.99
+ 51          220.0       10.77 11.01
+ 52          218.7       10.88 10.84
+ 53          217.0       10.49 10.76
+ 54          215.9       10.50 10.77
+ 55          215.8       11.00 10.88
+ 56          214.1       10.98 10.49
+ 57          212.3       10.61 10.50
+ 58          213.9       10.48 11.00
+ 59          214.6       10.53 10.98
+ 60          213.6       11.07 10.61
+ 61          212.1       10.61 10.48
+ 62          211.4       10.86 10.53
+ 63          213.1       10.34 11.07
+ 64          212.9       10.78 10.61
+ 65          213.3       10.80 10.86
+ 66          211.5       10.33 10.34
+ 67          212.3       10.44 10.78
+ 68          213.0       10.50 10.80
+ 69          211.0       10.75 10.33
+ 70          210.7       10.40 10.44
+ 71          210.1       10.40 10.50
+ 72          211.4       10.34 10.75
+ 73          210.0       10.55 10.40
+ 74          209.7       10.46 10.40
+ 75          208.8       10.82 10.34
+ 76          208.8       10.91 10.55
+ 77          208.8       10.87 10.46
+ 78          210.6       10.67 10.82
+ 79          211.9       11.11 10.91
+ 80          212.8       10.88 10.87
+ 81          212.5       11.28 10.67
+ 82          214.8       11.27 11.11
+ 83          215.3       11.44 10.88
+ 84          217.5       11.52 11.28
+ 85          218.8       12.10 11.27
+ 86          220.7       11.83 11.44
+ 87          222.2       12.62 11.52
+ 88          226.7       12.41 12.10
+ 89          228.4       12.43 11.83
+ 90          233.2       12.73 12.62
+ 91          235.7       13.01 12.41
+ 92          237.1       12.74 12.43
+ 93          240.6       12.73 12.73
+ 94          243.8       12.76 13.01
+ 95          245.3       12.92 12.74
+ 96          246.0       12.64 12.73
+ 97          246.3       12.79 12.76
+ 98          247.7       13.05 12.92
+ 99          247.6       12.69 12.64
+100          247.8       13.01 12.79
+101          249.4       12.90 13.05
+102          249.0       13.12 12.69
+103          249.9       12.47 13.01
+104          250.5       12.47 12.90
+105          251.5       12.94 13.12
+106          249.0       13.10 12.47
+107          247.6       12.91 12.47
+108          248.8       13.39 12.94
+109          250.4       13.13 13.10
+110          250.7       13.34 12.91
+111          253.0       13.34 13.39
+112          253.7       13.14 13.13
+113          255.0       13.49 13.34
+114          256.2       13.87 13.34
+115          256.0       13.39 13.14
+116          257.4       13.59 13.49
+117          260.4       13.27 13.87
+118          260.0       13.70 13.39
+119          261.3       13.20 13.59
+120          260.4       13.32 13.27
+121          261.6       13.15 13.70
+122          260.8       13.30 13.20
+123          259.8       12.94 13.32
+124          259.0       13.29 13.15
+125          258.9       13.26 13.30
+126          257.4       13.08 12.94
+127          257.7       13.24 13.29
+128          257.9       13.31 13.26
+129          257.4       13.52 13.08
+130          257.3       13.02 13.24
+131          257.6       13.25 13.31
+132          258.9       13.12 13.52
+133          257.8       13.26 13.02
+134          257.7       13.11 13.25
+135          257.2       13.30 13.12
+136          257.5       13.06 13.26
+137          256.8       13.32 13.11
+138          257.5       13.10 13.30
+139          257.0       13.27 13.06
+140          257.6       13.64 13.32
+141          257.3       13.58 13.10
+142          257.5       13.87 13.27
+143          259.6       13.53 13.64
+144          261.1       13.41 13.58
+145          262.9       13.25 13.87
+146          263.3       13.50 13.53
+147          262.8       13.58 13.41
+148          261.8       13.51 13.25
+149          262.2       13.77 13.50
+150          262.7       13.40 13.58
+> 
+> 
+> 
+> cleanEx()
+> nameEx("tsdiag")
+> ### * tsdiag
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: tsdiag
+> ### Title: Diagnostic Plots for Time-Series Fits
+> ### Aliases: tsdiag tsdiag.arima0 tsdiag.Arima tsdiag.StructTS
+> ### Keywords: ts
+> 
+> ### ** Examples
+> 
+> 
+> 
+> cleanEx()
+> nameEx("uniroot")
+> ### * uniroot
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: uniroot
+> ### Title: One Dimensional Root (Zero) Finding
+> ### Aliases: uniroot
+> ### Keywords: optimize
+> 
+> ### ** Examples
+> 
+> ##--- uniroot() with new interval extension + checking features: --------------
+> 
+> f1 <- function(x) (121 - x^2)/(x^2+1)
+> f2 <- function(x) exp(-x)*(x - 12)
+> 
+> try(uniroot(f1, c(0,10)))
+Error in uniroot(f1, c(0, 10)) : 
+  f() values at end points not of opposite sign
+> try(uniroot(f2, c(0, 2)))
+Error in uniroot(f2, c(0, 2)) : 
+  f() values at end points not of opposite sign
+> ##--> error: f() .. end points not of opposite sign
+> 
+> ## where as  'extendInt="yes"'  simply first enlarges the search interval:
+> u1 <- uniroot(f1, c(0,10),extendInt="yes", trace=1)
+search in [0,10] ... extended to [-1.5e-05, 11.5] in 4 steps
+> u2 <- uniroot(f2, c(0,2), extendInt="yes", trace=2)
+search in [0,2]
+ .. modified lower,upper: (         -1e-06,           2.02)
+ .. modified lower,upper: (         -3e-06,           2.06)
+ .. modified lower,upper: (         -7e-06,           2.14)
+ .. modified lower,upper: (       -1.5e-05,            2.3)
+ .. modified lower,upper: (       -3.1e-05,           2.62)
+ .. modified lower,upper: (       -6.3e-05,           3.26)
+ .. modified lower,upper: (      -0.000127,           4.54)
+ .. modified lower,upper: (      -0.000255,            7.1)
+ .. modified lower,upper: (      -0.000511,          12.22)
+> stopifnot(all.equal(u1$root, 11, tolerance = 1e-5),
++           all.equal(u2$root, 12, tolerance = 6e-6))
+> 
+> ## The *danger* of interval extension:
+> ## No way to find a zero of a positive function, but
+> ## numerically, f(-|M|) becomes zero :
+> u3 <- uniroot(exp, c(0,2), extendInt="yes", trace=TRUE)
+search in [0,2] ... extended to [-1073.74, 2.14748e+07] in 30 steps
+> 
+> ## Nonsense example (must give an error):
+> tools::assertCondition( uniroot(function(x) 1, 0:1, extendInt="yes"),
++                        "error", verbose=TRUE)
+assertCondition: caught “error”
+> 
+> ## Convergence checking :
+> sinc <- function(x) ifelse(x == 0, 1, sin(x)/x)
+> curve(sinc, -6,18); abline(h=0,v=0, lty=3, col=adjustcolor("gray", 0.8))
+> ## Don't show: 
+> tools::assertWarning(
++ ## End(Don't show)
++ uniroot(sinc, c(0,5), extendInt="yes", maxiter=4) #-> "just" a warning
++ ## Don't show: 
++  , verbose=TRUE)
+Asserted warning: _NOT_ converged in 4 iterations
+> ## End(Don't show)
+> 
+> ## now with  check.conv=TRUE, must signal a convergence error :
+> ## Don't show: 
+> tools::assertError(
++ ## End(Don't show)
++ uniroot(sinc, c(0,5), extendInt="yes", maxiter=4, check.conv=TRUE)
++ ## Don't show: 
++  , verbose=TRUE)
+Asserted error: _NOT_ converged in 4 iterations
+> ## End(Don't show)
+> 
+> ### Weibull cumulative hazard (example origin, Ravi Varadhan):
+> cumhaz <- function(t, a, b) b * (t/b)^a
+> froot <- function(x, u, a, b) cumhaz(x, a, b) - u
+> 
+> n <- 1000
+> u <- -log(runif(n))
+> a <- 1/2
+> b <- 1
+> ## Find failure times
+> ru <- sapply(u, function(x)
++    uniroot(froot, u=x, a=a, b=b, interval= c(1.e-14, 1e04),
++            extendInt="yes")$root)
+> ru2 <- sapply(u, function(x)
++    uniroot(froot, u=x, a=a, b=b, interval= c(0.01,  10),
++            extendInt="yes")$root)
+> stopifnot(all.equal(ru, ru2, tolerance = 6e-6))
+> 
+> r1 <- uniroot(froot, u= 0.99, a=a, b=b, interval= c(0.01, 10),
++              extendInt="up")
+> stopifnot(all.equal(0.99, cumhaz(r1$root, a=a, b=b)))
+> 
+> ## An error if 'extendInt' assumes "wrong zero-crossing direction":
+> ## Don't show: 
+> tools::assertError(
++ ## End(Don't show)
++ uniroot(froot, u= 0.99, a=a, b=b, interval= c(0.1, 10), extendInt="down")
++ ## Don't show: 
++  , verbose=TRUE)
+Asserted error: no sign change found in 1000 iterations
+> ## End(Don't show)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("update")
+> ### * update
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: update
+> ### Title: Update and Re-fit a Model Call
+> ### Aliases: update update.default getCall getCall.default
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> oldcon <- options(contrasts = c("contr.treatment", "contr.poly"))
+> ## Annette Dobson (1990) "An Introduction to Generalized Linear Models".
+> ## Page 9: Plant Weight Data.
+> ctl <- c(4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14)
+> trt <- c(4.81,4.17,4.41,3.59,5.87,3.83,6.03,4.89,4.32,4.69)
+> group <- gl(2, 10, 20, labels = c("Ctl", "Trt"))
+> weight <- c(ctl, trt)
+> lm.D9 <- lm(weight ~ group)
+> lm.D9
+
+Call:
+lm(formula = weight ~ group)
+
+Coefficients:
+(Intercept)     groupTrt  
+      5.032       -0.371  
+
+> summary(lm.D90 <- update(lm.D9, . ~ . - 1))
+
+Call:
+lm(formula = weight ~ group - 1)
+
+Residuals:
+    Min      1Q  Median      3Q     Max 
+-1.0710 -0.4938  0.0685  0.2462  1.3690 
+
+Coefficients:
+         Estimate Std. Error t value Pr(>|t|)    
+groupCtl   5.0320     0.2202   22.85 9.55e-15 ***
+groupTrt   4.6610     0.2202   21.16 3.62e-14 ***
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Residual standard error: 0.6964 on 18 degrees of freedom
+Multiple R-squared:  0.9818,	Adjusted R-squared:  0.9798 
+F-statistic: 485.1 on 2 and 18 DF,  p-value: < 2.2e-16
+
+> options(contrasts = c("contr.helmert", "contr.poly"))
+> update(lm.D9)
+
+Call:
+lm(formula = weight ~ group)
+
+Coefficients:
+(Intercept)       group1  
+     4.8465      -0.1855  
+
+> getCall(lm.D90)  # "through the origin"
+lm(formula = weight ~ group - 1)
+> 
+> options(oldcon)
+> 
+> 
+> 
+> base::options(contrasts = c(unordered = "contr.treatment",ordered = "contr.poly"))
+> cleanEx()
+> nameEx("update.formula")
+> ### * update.formula
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: update.formula
+> ### Title: Model Updating
+> ### Aliases: update.formula
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> update(y ~ x,    ~ . + x2) #> y ~ x + x2
+y ~ x + x2
+> update(y ~ x, log(.) ~ . ) #> log(y) ~ x
+log(y) ~ x
+> update(. ~ u+v, res  ~ . ) #> res ~ u + v
+res ~ u + v
+> 
+> 
+> 
+> cleanEx()
+> nameEx("var.test")
+> ### * var.test
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: var.test
+> ### Title: F Test to Compare Two Variances
+> ### Aliases: var.test var.test.default var.test.formula
+> ### Keywords: htest
+> 
+> ### ** Examples
+> 
+> x <- rnorm(50, mean = 0, sd = 2)
+> y <- rnorm(30, mean = 1, sd = 1)
+> var.test(x, y)                  # Do x and y have the same variance?
+
+	F test to compare two variances
+
+data:  x and y
+F = 2.6522, num df = 49, denom df = 29, p-value = 0.006232
+alternative hypothesis: true ratio of variances is not equal to 1
+95 percent confidence interval:
+ 1.332510 4.989832
+sample estimates:
+ratio of variances 
+          2.652168 
+
+> var.test(lm(x ~ 1), lm(y ~ 1))  # The same.
+
+	F test to compare two variances
+
+data:  lm(x ~ 1) and lm(y ~ 1)
+F = 2.6522, num df = 49, denom df = 29, p-value = 0.006232
+alternative hypothesis: true ratio of variances is not equal to 1
+95 percent confidence interval:
+ 1.332510 4.989832
+sample estimates:
+ratio of variances 
+          2.652168 
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("varimax")
+> ### * varimax
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: varimax
+> ### Title: Rotation Methods for Factor Analysis
+> ### Aliases: promax varimax
+> ### Keywords: multivariate
+> 
+> ### ** Examples
+> 
+> ## varimax with normalize = TRUE is the default
+> fa <- factanal( ~., 2, data = swiss)
+> varimax(loadings(fa), normalize = FALSE)
+$loadings
+
+Loadings:
+                 Factor1 Factor2
+Fertility        -0.650   0.398 
+Agriculture      -0.628   0.337 
+Examination       0.681  -0.515 
+Education         0.997         
+Catholic         -0.117   0.962 
+Infant.Mortality          0.176 
+
+               Factor1 Factor2
+SS loadings      2.297   1.496
+Proportion Var   0.383   0.249
+Cumulative Var   0.383   0.632
+
+$rotmat
+            [,1]         [,2]
+[1,] 0.999973881 -0.007227595
+[2,] 0.007227595  0.999973881
+
+> promax(loadings(fa))
+$loadings
+
+Loadings:
+                 Factor1 Factor2
+Fertility        -0.595   0.227 
+Agriculture      -0.599   0.160 
+Examination       0.577  -0.360 
+Education         1.192   0.363 
+Catholic          0.326   1.147 
+Infant.Mortality          0.180 
+
+               Factor1 Factor2
+SS loadings      2.574   1.686
+Proportion Var   0.429   0.281
+Cumulative Var   0.429   0.710
+
+$rotmat
+          [,1]      [,2]
+[1,] 1.2114045 0.4029296
+[2,] 0.4956199 1.2453063
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("weighted.mean")
+> ### * weighted.mean
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: weighted.mean
+> ### Title: Weighted Arithmetic Mean
+> ### Aliases: weighted.mean weighted.mean.default
+> ### Keywords: univar
+> 
+> ### ** Examples
+> 
+> ## GPA from Siegel 1994
+> wt <- c(5,  5,  4,  1)/15
+> x <- c(3.7,3.3,3.5,2.8)
+> xm <- weighted.mean(x, wt)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("weighted.residuals")
+> ### * weighted.residuals
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: weighted.residuals
+> ### Title: Compute Weighted Residuals
+> ### Aliases: weighted.residuals
+> ### Keywords: regression
+> 
+> ### ** Examples
+> 
+> ## following on from example(lm)
+> ## Don't show: 
+> utils::example("lm", echo = FALSE)
+> ## End(Don't show)
+> all.equal(weighted.residuals(lm.D9),
++           residuals(lm.D9))
+[1] TRUE
+> x <- 1:10
+> w <- 0:9
+> y <- rnorm(x)
+> weighted.residuals(lmxy <- lm(y ~ x, weights = w))
+          2           3           4           5           6           7 
+-0.15744267 -1.63534445  2.24282864  0.09895229 -2.41528559  0.60771924 
+          8           9          10 
+ 1.37406419  1.06675699 -1.45098819 
+> weighted.residuals(lmxy, drop0 = FALSE)
+          1           2           3           4           5           6 
+ 0.00000000 -0.15744267 -1.63534445  2.24282864  0.09895229 -2.41528559 
+          7           8           9          10 
+ 0.60771924  1.37406419  1.06675699 -1.45098819 
+> 
+> 
+> 
+> cleanEx()
+> nameEx("wilcox.test")
+> ### * wilcox.test
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: wilcox.test
+> ### Title: Wilcoxon Rank Sum and Signed Rank Tests
+> ### Aliases: wilcox.test wilcox.test.default wilcox.test.formula
+> ### Keywords: htest
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> ## One-sample test.
+> ## Hollander & Wolfe (1973), 29f.
+> ## Hamilton depression scale factor measurements in 9 patients with
+> ##  mixed anxiety and depression, taken at the first (x) and second
+> ##  (y) visit after initiation of a therapy (administration of a
+> ##  tranquilizer).
+> x <- c(1.83,  0.50,  1.62,  2.48, 1.68, 1.88, 1.55, 3.06, 1.30)
+> y <- c(0.878, 0.647, 0.598, 2.05, 1.06, 1.29, 1.06, 3.14, 1.29)
+> wilcox.test(x, y, paired = TRUE, alternative = "greater")
+
+	Wilcoxon signed rank test
+
+data:  x and y
+V = 40, p-value = 0.01953
+alternative hypothesis: true location shift is greater than 0
+
+> wilcox.test(y - x, alternative = "less")    # The same.
+
+	Wilcoxon signed rank test
+
+data:  y - x
+V = 5, p-value = 0.01953
+alternative hypothesis: true location is less than 0
+
+> wilcox.test(y - x, alternative = "less",
++             exact = FALSE, correct = FALSE) # H&W large sample
+
+	Wilcoxon signed rank test
+
+data:  y - x
+V = 5, p-value = 0.01908
+alternative hypothesis: true location is less than 0
+
+>                                             # approximation
+> 
+> ## Two-sample test.
+> ## Hollander & Wolfe (1973), 69f.
+> ## Permeability constants of the human chorioamnion (a placental
+> ##  membrane) at term (x) and between 12 to 26 weeks gestational
+> ##  age (y).  The alternative of interest is greater permeability
+> ##  of the human chorioamnion for the term pregnancy.
+> x <- c(0.80, 0.83, 1.89, 1.04, 1.45, 1.38, 1.91, 1.64, 0.73, 1.46)
+> y <- c(1.15, 0.88, 0.90, 0.74, 1.21)
+> wilcox.test(x, y, alternative = "g")        # greater
+
+	Wilcoxon rank sum test
+
+data:  x and y
+W = 35, p-value = 0.1272
+alternative hypothesis: true location shift is greater than 0
+
+> wilcox.test(x, y, alternative = "greater",
++             exact = FALSE, correct = FALSE) # H&W large sample
+
+	Wilcoxon rank sum test
+
+data:  x and y
+W = 35, p-value = 0.1103
+alternative hypothesis: true location shift is greater than 0
+
+>                                             # approximation
+> 
+> wilcox.test(rnorm(10), rnorm(10, 2), conf.int = TRUE)
+
+	Wilcoxon rank sum test
+
+data:  rnorm(10) and rnorm(10, 2)
+W = 7, p-value = 0.0004871
+alternative hypothesis: true location shift is not equal to 0
+95 percent confidence interval:
+ -3.024352 -1.348555
+sample estimates:
+difference in location 
+             -2.262424 
+
+> 
+> ## Formula interface.
+> boxplot(Ozone ~ Month, data = airquality)
+> wilcox.test(Ozone ~ Month, data = airquality,
++             subset = Month %in% c(5, 8))
+Warning in wilcox.test.default(x = c(41L, 36L, 12L, 18L, 28L, 23L, 19L,  :
+  cannot compute exact p-value with ties
+
+	Wilcoxon rank sum test with continuity correction
+
+data:  Ozone by Month
+W = 127.5, p-value = 0.0001208
+alternative hypothesis: true location shift is not equal to 0
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("window")
+> ### * window
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: window
+> ### Title: Time Windows
+> ### Aliases: window window.default window.ts window<- window<-.ts
+> ### Keywords: ts
+> 
+> ### ** Examples
+> 
+> window(presidents, 1960, c(1969,4)) # values in the 1960's
+     Qtr1 Qtr2 Qtr3 Qtr4
+1960   71   62   61   57
+1961   72   83   71   78
+1962   79   71   62   74
+1963   76   64   62   57
+1964   80   73   69   69
+1965   71   64   69   62
+1966   63   46   56   44
+1967   44   52   38   46
+1968   36   49   35   44
+1969   59   65   65   56
+> window(presidents, deltat = 1)  # All Qtr1s
+Time Series:
+Start = 1945 
+End = 1974 
+Frequency = 1 
+ [1] NA 63 35 36 69 45 36 25 59 71 71 76 79 60 57 71 72 79 76 80 71 63 44 36 59
+[26] 66 51 49 68 28
+> window(presidents, start = c(1945,3), deltat = 1)  # All Qtr3s
+Time Series:
+Start = 1945.5 
+End = 1974.5 
+Frequency = 1 
+ [1] 82 43 54 NA 57 46 32 NA 75 71 79 67 63 48 61 61 71 62 62 69 69 56 38 35 65
+[26] 61 54 NA 40 24
+> window(presidents, 1944, c(1979,2), extend = TRUE)
+     Qtr1 Qtr2 Qtr3 Qtr4
+1944   NA   NA   NA   NA
+1945   NA   87   82   75
+1946   63   50   43   32
+1947   35   60   54   55
+1948   36   39   NA   NA
+1949   69   57   57   51
+1950   45   37   46   39
+1951   36   24   32   23
+1952   25   32   NA   32
+1953   59   74   75   60
+1954   71   61   71   57
+1955   71   68   79   73
+1956   76   71   67   75
+1957   79   62   63   57
+1958   60   49   48   52
+1959   57   62   61   66
+1960   71   62   61   57
+1961   72   83   71   78
+1962   79   71   62   74
+1963   76   64   62   57
+1964   80   73   69   69
+1965   71   64   69   62
+1966   63   46   56   44
+1967   44   52   38   46
+1968   36   49   35   44
+1969   59   65   65   56
+1970   66   53   61   52
+1971   51   48   54   49
+1972   49   61   NA   NA
+1973   68   44   40   27
+1974   28   25   24   24
+1975   NA   NA   NA   NA
+1976   NA   NA   NA   NA
+1977   NA   NA   NA   NA
+1978   NA   NA   NA   NA
+1979   NA   NA          
+> 
+> pres <- window(presidents, 1945, c(1949,4)) # values in the 1940's
+> window(pres, 1945.25, 1945.50) <- c(60, 70)
+> window(pres, 1944, 1944.75) <- 0 # will generate a warning
+Warning: extending time series when replacing values
+> window(pres, c(1945,4), c(1949,4), frequency = 1) <- 85:89
+> pres
+     Qtr1 Qtr2 Qtr3 Qtr4
+1944    0    0    0    0
+1945   NA   60   70   85
+1946   63   50   43   86
+1947   35   60   54   87
+1948   36   39   NA   88
+1949   69   57   57   89
+> 
+> 
+> 
+> cleanEx()
+> nameEx("xtabs")
+> ### * xtabs
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: xtabs
+> ### Title: Cross Tabulation
+> ### Aliases: xtabs print.xtabs
+> ### Keywords: category
+> 
+> ### ** Examples
+> 
+> ## 'esoph' has the frequencies of cases and controls for all levels of
+> ## the variables 'agegp', 'alcgp', and 'tobgp'.
+> xtabs(cbind(ncases, ncontrols) ~ ., data = esoph)
+, , tobgp = 0-9g/day,  = ncases
+
+       alcgp
+agegp   0-39g/day 40-79 80-119 120+
+  25-34         0     0      0    0
+  35-44         0     0      0    2
+  45-54         1     6      3    4
+  55-64         2     9      9    5
+  65-74         5    17      6    3
+  75+           1     2      1    2
+
+, , tobgp = 10-19,  = ncases
+
+       alcgp
+agegp   0-39g/day 40-79 80-119 120+
+  25-34         0     0      0    1
+  35-44         1     3      0    0
+  45-54         0     4      6    3
+  55-64         3     6      8    6
+  65-74         4     3      4    1
+  75+           2     1      1    1
+
+, , tobgp = 20-29,  = ncases
+
+       alcgp
+agegp   0-39g/day 40-79 80-119 120+
+  25-34         0     0      0    0
+  35-44         0     1      0    2
+  45-54         0     5      1    2
+  55-64         3     4      3    2
+  65-74         2     5      2    1
+  75+           0     0      0    0
+
+, , tobgp = 30+,  = ncases
+
+       alcgp
+agegp   0-39g/day 40-79 80-119 120+
+  25-34         0     0      0    0
+  35-44         0     0      0    0
+  45-54         0     5      2    4
+  55-64         4     3      4    5
+  65-74         0     0      1    1
+  75+           1     1      0    0
+
+, , tobgp = 0-9g/day,  = ncontrols
+
+       alcgp
+agegp   0-39g/day 40-79 80-119 120+
+  25-34        40    27      2    1
+  35-44        60    35     11    3
+  45-54        46    38     16    4
+  55-64        49    40     18   10
+  65-74        48    34     13    4
+  75+          18     5      1    2
+
+, , tobgp = 10-19,  = ncontrols
+
+       alcgp
+agegp   0-39g/day 40-79 80-119 120+
+  25-34        10     7      1    1
+  35-44        14    23      6    3
+  45-54        18    21     14    4
+  55-64        22    21     15    7
+  65-74        14    10     12    2
+  75+           6     3      1    1
+
+, , tobgp = 20-29,  = ncontrols
+
+       alcgp
+agegp   0-39g/day 40-79 80-119 120+
+  25-34         6     4      0    1
+  35-44         7    14      2    4
+  45-54        10    15      5    3
+  55-64        12    17      6    3
+  65-74         7     9      3    1
+  75+           0     3      0    0
+
+, , tobgp = 30+,  = ncontrols
+
+       alcgp
+agegp   0-39g/day 40-79 80-119 120+
+  25-34         5     7      2    2
+  35-44         8     8      1    0
+  45-54         4     7      4    4
+  55-64         6     6      4    6
+  65-74         2     0      1    1
+  75+           3     1      0    0
+
+> ## Output is not really helpful ... flat tables are better:
+> ftable(xtabs(cbind(ncases, ncontrols) ~ ., data = esoph))
+                          ncases ncontrols
+agegp alcgp     tobgp                     
+25-34 0-39g/day 0-9g/day       0        40
+                10-19          0        10
+                20-29          0         6
+                30+            0         5
+      40-79     0-9g/day       0        27
+                10-19          0         7
+                20-29          0         4
+                30+            0         7
+      80-119    0-9g/day       0         2
+                10-19          0         1
+                20-29          0         0
+                30+            0         2
+      120+      0-9g/day       0         1
+                10-19          1         1
+                20-29          0         1
+                30+            0         2
+35-44 0-39g/day 0-9g/day       0        60
+                10-19          1        14
+                20-29          0         7
+                30+            0         8
+      40-79     0-9g/day       0        35
+                10-19          3        23
+                20-29          1        14
+                30+            0         8
+      80-119    0-9g/day       0        11
+                10-19          0         6
+                20-29          0         2
+                30+            0         1
+      120+      0-9g/day       2         3
+                10-19          0         3
+                20-29          2         4
+                30+            0         0
+45-54 0-39g/day 0-9g/day       1        46
+                10-19          0        18
+                20-29          0        10
+                30+            0         4
+      40-79     0-9g/day       6        38
+                10-19          4        21
+                20-29          5        15
+                30+            5         7
+      80-119    0-9g/day       3        16
+                10-19          6        14
+                20-29          1         5
+                30+            2         4
+      120+      0-9g/day       4         4
+                10-19          3         4
+                20-29          2         3
+                30+            4         4
+55-64 0-39g/day 0-9g/day       2        49
+                10-19          3        22
+                20-29          3        12
+                30+            4         6
+      40-79     0-9g/day       9        40
+                10-19          6        21
+                20-29          4        17
+                30+            3         6
+      80-119    0-9g/day       9        18
+                10-19          8        15
+                20-29          3         6
+                30+            4         4
+      120+      0-9g/day       5        10
+                10-19          6         7
+                20-29          2         3
+                30+            5         6
+65-74 0-39g/day 0-9g/day       5        48
+                10-19          4        14
+                20-29          2         7
+                30+            0         2
+      40-79     0-9g/day      17        34
+                10-19          3        10
+                20-29          5         9
+                30+            0         0
+      80-119    0-9g/day       6        13
+                10-19          4        12
+                20-29          2         3
+                30+            1         1
+      120+      0-9g/day       3         4
+                10-19          1         2
+                20-29          1         1
+                30+            1         1
+75+   0-39g/day 0-9g/day       1        18
+                10-19          2         6
+                20-29          0         0
+                30+            1         3
+      40-79     0-9g/day       2         5
+                10-19          1         3
+                20-29          0         3
+                30+            1         1
+      80-119    0-9g/day       1         1
+                10-19          1         1
+                20-29          0         0
+                30+            0         0
+      120+      0-9g/day       2         2
+                10-19          1         1
+                20-29          0         0
+                30+            0         0
+> ## In particular if we have fewer factors ...
+> ftable(xtabs(cbind(ncases, ncontrols) ~ agegp, data = esoph))
+       ncases ncontrols
+agegp                  
+25-34       1       116
+35-44       9       199
+45-54      46       213
+55-64      76       242
+65-74      55       161
+75+        13        44
+> 
+> ## This is already a contingency table in array form.
+> DF <- as.data.frame(UCBAdmissions)
+> ## Now 'DF' is a data frame with a grid of the factors and the counts
+> ## in variable 'Freq'.
+> DF
+      Admit Gender Dept Freq
+1  Admitted   Male    A  512
+2  Rejected   Male    A  313
+3  Admitted Female    A   89
+4  Rejected Female    A   19
+5  Admitted   Male    B  353
+6  Rejected   Male    B  207
+7  Admitted Female    B   17
+8  Rejected Female    B    8
+9  Admitted   Male    C  120
+10 Rejected   Male    C  205
+11 Admitted Female    C  202
+12 Rejected Female    C  391
+13 Admitted   Male    D  138
+14 Rejected   Male    D  279
+15 Admitted Female    D  131
+16 Rejected Female    D  244
+17 Admitted   Male    E   53
+18 Rejected   Male    E  138
+19 Admitted Female    E   94
+20 Rejected Female    E  299
+21 Admitted   Male    F   22
+22 Rejected   Male    F  351
+23 Admitted Female    F   24
+24 Rejected Female    F  317
+> ## Nice for taking margins ...
+> xtabs(Freq ~ Gender + Admit, DF)
+        Admit
+Gender   Admitted Rejected
+  Male       1198     1493
+  Female      557     1278
+> ## And for testing independence ...
+> summary(xtabs(Freq ~ ., DF))
+Call: xtabs(formula = Freq ~ ., data = DF)
+Number of cases in table: 4526 
+Number of factors: 3 
+Test for independence of all factors:
+	Chisq = 2000.3, df = 16, p-value = 0
+> 
+> ## Create a nice display for the warp break data.
+> warpbreaks$replicate <- rep(1:9, len = 54)
+> ftable(xtabs(breaks ~ wool + tension + replicate, data = warpbreaks))
+             replicate  1  2  3  4  5  6  7  8  9
+wool tension                                     
+A    L                 26 30 54 25 70 52 51 26 67
+     M                 18 21 29 17 12 18 35 30 36
+     H                 36 21 24 18 10 43 28 15 26
+B    L                 27 14 29 19 29 31 41 20 44
+     M                 42 26 19 16 39 28 21 39 29
+     H                 20 21 24 17 13 15 15 16 28
+> 
+> ### ---- Sparse Examples ----
+> 
+> 
+> 
+> 
+> cleanEx()
+> nameEx("zC")
+> ### * zC
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: C
+> ### Title: Sets Contrasts for a Factor
+> ### Aliases: C
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> ## reset contrasts to defaults
+> options(contrasts = c("contr.treatment", "contr.poly"))
+> tens <- with(warpbreaks, C(tension, poly, 1))
+> ## tension SHOULD be an ordered factor, but as it is not we can use
+> aov(breaks ~ wool + tens + tension, data = warpbreaks)
+Call:
+   aov(formula = breaks ~ wool + tens + tension, data = warpbreaks)
+
+Terms:
+                    wool     tens  tension Residuals
+Sum of Squares   450.667 1950.694   83.565  6747.889
+Deg. of Freedom        1        1        1        50
+
+Residual standard error: 11.61713
+1 out of 5 effects not estimable
+Estimated effects may be unbalanced
+> 
+> ## show the use of ...  The default contrast is contr.treatment here
+> summary(lm(breaks ~ wool + C(tension, base = 2), data = warpbreaks))
+
+Call:
+lm(formula = breaks ~ wool + C(tension, base = 2), data = warpbreaks)
+
+Residuals:
+    Min      1Q  Median      3Q     Max 
+-19.500  -8.083  -2.139   6.472  30.722 
+
+Coefficients:
+                      Estimate Std. Error t value Pr(>|t|)    
+(Intercept)             29.278      3.162   9.260    2e-12 ***
+woolB                   -5.778      3.162  -1.827   0.0736 .  
+C(tension, base = 2)1   10.000      3.872   2.582   0.0128 *  
+C(tension, base = 2)3   -4.722      3.872  -1.219   0.2284    
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Residual standard error: 11.62 on 50 degrees of freedom
+Multiple R-squared:  0.2691,	Adjusted R-squared:  0.2253 
+F-statistic: 6.138 on 3 and 50 DF,  p-value: 0.00123
+
+> 
+> 
+> # following on from help(esoph)
+> model3 <- glm(cbind(ncases, ncontrols) ~ agegp + C(tobgp, , 1) +
++      C(alcgp, , 1), data = esoph, family = binomial())
+> summary(model3)
+
+Call:
+glm(formula = cbind(ncases, ncontrols) ~ agegp + C(tobgp, , 1) + 
+    C(alcgp, , 1), family = binomial(), data = esoph)
+
+Deviance Residuals: 
+    Min       1Q   Median       3Q      Max  
+-1.7628  -0.6426  -0.2709   0.3043   2.0421  
+
+Coefficients:
+                Estimate Std. Error z value Pr(>|z|)    
+(Intercept)     -1.72420    0.19582  -8.805  < 2e-16 ***
+agegp.L          2.96113    0.65092   4.549 5.39e-06 ***
+agegp.Q         -1.33735    0.58918  -2.270  0.02322 *  
+agegp.C          0.15292    0.44792   0.341  0.73281    
+agegp^4          0.06668    0.30776   0.217  0.82848    
+agegp^5         -0.20288    0.19523  -1.039  0.29872    
+C(tobgp, , 1).L  0.58501    0.18331   3.191  0.00142 ** 
+C(alcgp, , 1).L  1.46034    0.18899   7.727 1.10e-14 ***
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+(Dispersion parameter for binomial family taken to be 1)
+
+    Null deviance: 227.241  on 87  degrees of freedom
+Residual deviance:  59.277  on 80  degrees of freedom
+AIC: 222.76
+
+Number of Fisher Scoring iterations: 6
+
+> 
+> 
+> 
+> base::options(contrasts = c(unordered = "contr.treatment",ordered = "contr.poly"))
+> ### * <FOOTER>
+> ###
+> options(digits = 7L)
+> base::cat("Time elapsed: ", proc.time() - base::get("ptime", pos = 'CheckExEnv'),"\n")
+Time elapsed:  4.499 0.098 4.597 0 0 
+> grDevices::dev.off()
+null device 
+          1 
+> ###
+> ### Local variables: ***
+> ### mode: outline-minor ***
+> ### outline-regexp: "\\(> \\)?### [*]+" ***
+> ### End: ***
+> quit('no')
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/tests/Examples/graphics-Ex.Rout.save
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/tests/Examples/graphics-Ex.Rout.save	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/tests/Examples/graphics-Ex.Rout.save	(revision 2477)
@@ -0,0 +1,3028 @@
+
+R version 3.3.2 RC (2016-10-26 r71594) -- "Sincere Pumpkin Patch"
+Copyright (C) 2016 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
+
+R is free software and comes with ABSOLUTELY NO WARRANTY.
+You are welcome to redistribute it under certain conditions.
+Type 'license()' or 'licence()' for distribution details.
+
+  Natural language support but running in an English locale
+
+R is a collaborative project with many contributors.
+Type 'contributors()' for more information and
+'citation()' on how to cite R or R packages in publications.
+
+Type 'demo()' for some demos, 'help()' for on-line help, or
+'help.start()' for an HTML browser interface to help.
+Type 'q()' to quit R.
+
+> pkgname <- "graphics"
+> source(file.path(R.home("share"), "R", "examples-header.R"))
+> options(warn = 1)
+> library('graphics')
+> 
+> base::assign(".oldSearch", base::search(), pos = 'CheckExEnv')
+> cleanEx()
+> nameEx("abline")
+> ### * abline
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: abline
+> ### Title: Add Straight Lines to a Plot
+> ### Aliases: abline
+> ### Keywords: aplot
+> 
+> ### ** Examples
+> 
+> ## Setup up coordinate system (with x == y aspect ratio):
+> plot(c(-2,3), c(-1,5), type = "n", xlab = "x", ylab = "y", asp = 1)
+> ## the x- and y-axis, and an integer grid
+> abline(h = 0, v = 0, col = "gray60")
+> text(1,0, "abline( h = 0 )", col = "gray60", adj = c(0, -.1))
+> abline(h = -1:5, v = -2:3, col = "lightgray", lty = 3)
+> abline(a = 1, b = 2, col = 2)
+> text(1,3, "abline( 1, 2 )", col = 2, adj = c(-.1, -.1))
+> 
+> ## Simple Regression Lines:
+> require(stats)
+> sale5 <- c(6, 4, 9, 7, 6, 12, 8, 10, 9, 13)
+> plot(sale5)
+> abline(lsfit(1:10, sale5))
+> abline(lsfit(1:10, sale5, intercept = FALSE), col = 4) # less fitting
+> 
+> z <- lm(dist ~ speed, data = cars)
+> plot(cars)
+> abline(z) # equivalent to abline(reg = z) or
+> abline(coef = coef(z))
+> 
+> ## trivial intercept model
+> abline(mC <- lm(dist ~ 1, data = cars)) ## the same as
+> abline(a = coef(mC), b = 0, col = "blue")
+> 
+> 
+> 
+> cleanEx()
+> nameEx("arrows")
+> ### * arrows
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: arrows
+> ### Title: Add Arrows to a Plot
+> ### Aliases: arrows
+> ### Keywords: aplot
+> 
+> ### ** Examples
+> 
+> x <- stats::runif(12); y <- stats::rnorm(12)
+> i <- order(x, y); x <- x[i]; y <- y[i]
+> plot(x,y, main = "arrows(.) and segments(.)")
+> ## draw arrows from point to point :
+> s <- seq(length(x)-1)  # one shorter than data
+> arrows(x[s], y[s], x[s+1], y[s+1], col = 1:3)
+> s <- s[-length(s)]
+> segments(x[s], y[s], x[s+2], y[s+2], col = "pink")
+> 
+> 
+> 
+> cleanEx()
+> nameEx("assocplot")
+> ### * assocplot
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: assocplot
+> ### Title: Association Plots
+> ### Aliases: assocplot
+> ### Keywords: hplot
+> 
+> ### ** Examples
+> 
+> ## Aggregate over sex:
+> x <- margin.table(HairEyeColor, c(1, 2))
+> x
+       Eye
+Hair    Brown Blue Hazel Green
+  Black    68   20    15     5
+  Brown   119   84    54    29
+  Red      26   17    14    14
+  Blond     7   94    10    16
+> assocplot(x, main = "Relation between hair and eye color")
+> 
+> 
+> 
+> cleanEx()
+> nameEx("axTicks")
+> ### * axTicks
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: axTicks
+> ### Title: Compute Axis Tickmark Locations
+> ### Aliases: axTicks
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+>  plot(1:7, 10*21:27)
+>  axTicks(1)
+[1] 1 2 3 4 5 6 7
+>  axTicks(2)
+[1] 210 220 230 240 250 260 270
+>  stopifnot(identical(axTicks(1), axTicks(3)),
++            identical(axTicks(2), axTicks(4)))
+> 
+> ## Show how axTicks() and axis() correspond :
+> op <- par(mfrow = c(3, 1))
+> for(x in 9999 * c(1, 2, 8)) {
++     plot(x, 9, log = "x")
++     cat(formatC(par("xaxp"), width = 5),";", T <- axTicks(1),"\n")
++     rug(T, col =  adjustcolor("red", 0.5), lwd = 4)
++ }
+ 1000 1e+05     3 ; 200 500 1000 2000 5000 10000 20000 50000 1e+05 2e+05 5e+05 
+ 1000 1e+06     2 ; 500 1000 5000 10000 50000 1e+05 5e+05 1e+06 
+ 1000 1e+07     1 ; 1000 10000 1e+05 1e+06 1e+07 
+> par(op)
+> 
+> x <- 9.9*10^(-3:10)
+> plot(x, 1:14, log = "x")
+> axTicks(1) # now length 5, in R <= 2.13.x gave the following
+[1] 1e-02 1e+01 1e+04 1e+07 1e+10
+> axTicks(1, nintLog = Inf) # rather too many
+ [1] 1e-02 1e-01 1e+00 1e+01 1e+02 1e+03 1e+04 1e+05 1e+06 1e+07 1e+08 1e+09
+[13] 1e+10 1e+11
+> 
+> ## An example using axTicks() without reference to an existing plot
+> ## (copying R's internal procedures for setting axis ranges etc.),
+> ## You do need to supply _all_ of axp, usr, log, nintLog
+> ## standard logarithmic y axis labels
+> ylims <- c(0.2, 88)
+> get_axp <- function(x) 10^c(ceiling(x[1]), floor(x[2]))
+> ## mimic par("yaxs") == "i"
+> usr.i <- log10(ylims)
+> (aT.i <- axTicks(side = 2, usr = usr.i,
++                  axp = c(get_axp(usr.i), n = 3), log = TRUE, nintLog = 5))
+[1]  0.2  0.5  1.0  2.0  5.0 10.0 20.0 50.0
+> ## mimic (default) par("yaxs") == "r"
+> usr.r <- extendrange(r = log10(ylims), f = 0.04)
+> (aT.r <- axTicks(side = 2, usr = usr.r,
++                  axp = c(get_axp(usr.r), 3), log = TRUE, nintLog = 5))
+[1]   0.2   0.5   1.0   2.0   5.0  10.0  20.0  50.0 100.0
+> 
+> ## Prove that we got it right :
+> plot(0:1, ylims, log = "y", yaxs = "i")
+> stopifnot(all.equal(aT.i, axTicks(side = 2)))
+> 
+> plot(0:1, ylims, log = "y", yaxs = "r")
+> stopifnot(all.equal(aT.r, axTicks(side = 2)))
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("axis.POSIXct")
+> ### * axis.POSIXct
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: axis.POSIXct
+> ### Title: Date and Date-time Plotting Functions
+> ### Aliases: axis.POSIXct axis.Date
+> ### Keywords: utilities chron
+> 
+> ### ** Examples
+> 
+> with(beaver1, {
++ time <- strptime(paste(1990, day, time %/% 100, time %% 100),
++                  "%Y %j %H %M")
++ plot(time, temp, type = "l") # axis at 4-hour intervals.
++ # now label every hour on the time axis
++ plot(time, temp, type = "l", xaxt = "n")
++ r <- as.POSIXct(round(range(time), "hours"))
++ axis.POSIXct(1, at = seq(r[1], r[2], by = "hour"), format = "%H")
++ })
+> 
+> plot(.leap.seconds, seq_along(.leap.seconds), type = "n", yaxt = "n",
++      xlab = "leap seconds", ylab = "", bty = "n")
+> rug(.leap.seconds)
+> ## or as dates
+> lps <- as.Date(.leap.seconds)
+> plot(lps, seq_along(.leap.seconds),
++      type = "n", yaxt = "n", xlab = "leap seconds",
++      ylab = "", bty = "n")
+> rug(lps)
+> 
+> ## 100 random dates in a 10-week period
+> random.dates <- as.Date("2001/1/1") + 70*sort(stats::runif(100))
+> plot(random.dates, 1:100)
+> # or for a better axis labelling
+> plot(random.dates, 1:100, xaxt = "n")
+> axis.Date(1, at = seq(as.Date("2001/1/1"), max(random.dates)+6, "weeks"))
+> axis.Date(1, at = seq(as.Date("2001/1/1"), max(random.dates)+6, "days"),
++      labels = FALSE, tcl = -0.2)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("axis")
+> ### * axis
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: axis
+> ### Title: Add an Axis to a Plot
+> ### Aliases: axis
+> ### Keywords: aplot
+> 
+> ### ** Examples
+> 
+> require(stats) # for rnorm
+> plot(1:4, rnorm(4), axes = FALSE)
+> axis(1, 1:4, LETTERS[1:4])
+> axis(2)
+> box() #- to make it look "as usual"
+> 
+> plot(1:7, rnorm(7), main = "axis() examples",
++      type = "s", xaxt = "n", frame = FALSE, col = "red")
+> axis(1, 1:7, LETTERS[1:7], col.axis = "blue")
+> # unusual options:
+> axis(4, col = "violet", col.axis = "dark violet", lwd = 2)
+> axis(3, col = "gold", lty = 2, lwd = 0.5)
+> 
+> # one way to have a custom x axis
+> plot(1:10, xaxt = "n")
+> axis(1, xaxp = c(2, 9, 7))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("barplot")
+> ### * barplot
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: barplot
+> ### Title: Bar Plots
+> ### Aliases: barplot barplot.default
+> ### Keywords: hplot
+> 
+> ### ** Examples
+> 
+> require(grDevices) # for colours
+> tN <- table(Ni <- stats::rpois(100, lambda = 5))
+> r <- barplot(tN, col = rainbow(20))
+> #- type = "h" plotting *is* 'bar'plot
+> lines(r, tN, type = "h", col = "red", lwd = 2)
+> 
+> barplot(tN, space = 1.5, axisnames = FALSE,
++         sub = "barplot(..., space= 1.5, axisnames = FALSE)")
+> 
+> barplot(VADeaths, plot = FALSE)
+[1] 0.7 1.9 3.1 4.3
+> barplot(VADeaths, plot = FALSE, beside = TRUE)
+     [,1] [,2] [,3] [,4]
+[1,]  1.5  7.5 13.5 19.5
+[2,]  2.5  8.5 14.5 20.5
+[3,]  3.5  9.5 15.5 21.5
+[4,]  4.5 10.5 16.5 22.5
+[5,]  5.5 11.5 17.5 23.5
+> 
+> mp <- barplot(VADeaths) # default
+> tot <- colMeans(VADeaths)
+> text(mp, tot + 3, format(tot), xpd = TRUE, col = "blue")
+> barplot(VADeaths, beside = TRUE,
++         col = c("lightblue", "mistyrose", "lightcyan",
++                 "lavender", "cornsilk"),
++         legend = rownames(VADeaths), ylim = c(0, 100))
+> title(main = "Death Rates in Virginia", font.main = 4)
+> 
+> hh <- t(VADeaths)[, 5:1]
+> mybarcol <- "gray20"
+> mp <- barplot(hh, beside = TRUE,
++         col = c("lightblue", "mistyrose",
++                 "lightcyan", "lavender"),
++         legend = colnames(VADeaths), ylim = c(0,100),
++         main = "Death Rates in Virginia", font.main = 4,
++         sub = "Faked upper 2*sigma error bars", col.sub = mybarcol,
++         cex.names = 1.5)
+> segments(mp, hh, mp, hh + 2*sqrt(1000*hh/100), col = mybarcol, lwd = 1.5)
+> stopifnot(dim(mp) == dim(hh))  # corresponding matrices
+> mtext(side = 1, at = colMeans(mp), line = -2,
++       text = paste("Mean", formatC(colMeans(hh))), col = "red")
+> 
+> # Bar shading example
+> barplot(VADeaths, angle = 15+10*1:5, density = 20, col = "black",
++         legend = rownames(VADeaths))
+> title(main = list("Death Rates in Virginia", font = 4))
+> 
+> # border :
+> barplot(VADeaths, border = "dark blue") 
+> 
+> # log scales (not much sense here):
+> barplot(tN, col = heat.colors(12), log = "y")
+> barplot(tN, col = gray.colors(20), log = "xy")
+> 
+> # args.legend
+> barplot(height = cbind(x = c(465, 91) / 465 * 100,
++                        y = c(840, 200) / 840 * 100,
++                        z = c(37, 17) / 37 * 100),
++         beside = FALSE,
++         width = c(465, 840, 37),
++         col = c(1, 2),
++         legend.text = c("A", "B"),
++         args.legend = list(x = "topleft"))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("box")
+> ### * box
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: box
+> ### Title: Draw a Box around a Plot
+> ### Aliases: box
+> ### Keywords: aplot
+> 
+> ### ** Examples
+> 
+> plot(1:7, abs(stats::rnorm(7)), type = "h", axes = FALSE)
+> axis(1, at = 1:7, labels = letters[1:7])
+> box(lty = '1373', col = 'red')
+> 
+> 
+> 
+> cleanEx()
+> nameEx("boxplot")
+> ### * boxplot
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: boxplot
+> ### Title: Box Plots
+> ### Aliases: boxplot boxplot.default boxplot.formula
+> ### Keywords: hplot
+> 
+> ### ** Examples
+> 
+> ## boxplot on a formula:
+> boxplot(count ~ spray, data = InsectSprays, col = "lightgray")
+> # *add* notches (somewhat funny here):
+> boxplot(count ~ spray, data = InsectSprays,
++         notch = TRUE, add = TRUE, col = "blue")
+Warning in bxp(list(stats = c(7, 11, 14, 18.5, 23, 7, 12, 16.5, 18, 21,  :
+  some notches went outside hinges ('box'): maybe set notch=FALSE
+> 
+> boxplot(decrease ~ treatment, data = OrchardSprays,
++         log = "y", col = "bisque")
+> 
+> rb <- boxplot(decrease ~ treatment, data = OrchardSprays, col = "bisque")
+> title("Comparing boxplot()s and non-robust mean +/- SD")
+> 
+> mn.t <- tapply(OrchardSprays$decrease, OrchardSprays$treatment, mean)
+> sd.t <- tapply(OrchardSprays$decrease, OrchardSprays$treatment, sd)
+> xi <- 0.3 + seq(rb$n)
+> points(xi, mn.t, col = "orange", pch = 18)
+> arrows(xi, mn.t - sd.t, xi, mn.t + sd.t,
++        code = 3, col = "pink", angle = 75, length = .1)
+> 
+> ## boxplot on a matrix:
+> mat <- cbind(Uni05 = (1:100)/21, Norm = rnorm(100),
++              `5T` = rt(100, df = 5), Gam2 = rgamma(100, shape = 2))
+> boxplot(as.data.frame(mat),
++         main = "boxplot(as.data.frame(mat), main = ...)")
+> par(las = 1) # all axis labels horizontal
+> boxplot(as.data.frame(mat), main = "boxplot(*, horizontal = TRUE)",
++         horizontal = TRUE)
+> 
+> ## Using 'at = ' and adding boxplots -- example idea by Roger Bivand :
+> 
+> boxplot(len ~ dose, data = ToothGrowth,
++         boxwex = 0.25, at = 1:3 - 0.2,
++         subset = supp == "VC", col = "yellow",
++         main = "Guinea Pigs' Tooth Growth",
++         xlab = "Vitamin C dose mg",
++         ylab = "tooth length",
++         xlim = c(0.5, 3.5), ylim = c(0, 35), yaxs = "i")
+> boxplot(len ~ dose, data = ToothGrowth, add = TRUE,
++         boxwex = 0.25, at = 1:3 + 0.2,
++         subset = supp == "OJ", col = "orange")
+> legend(2, 9, c("Ascorbic acid", "Orange juice"),
++        fill = c("yellow", "orange"))
+> 
+> ## more examples in  help(bxp)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("boxplot.matrix")
+> ### * boxplot.matrix
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: boxplot.matrix
+> ### Title: Draw a Boxplot for each Column (Row) of a Matrix
+> ### Aliases: boxplot.matrix
+> ### Keywords: hplot
+> 
+> ### ** Examples
+> 
+> ## Very similar to the example in ?boxplot
+> mat <- cbind(Uni05 = (1:100)/21, Norm = rnorm(100),
++              T5 = rt(100, df = 5), Gam2 = rgamma(100, shape = 2))
+> boxplot(mat, main = "boxplot.matrix(...., main = ...)",
++         notch = TRUE, col = 1:4)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("bxp")
+> ### * bxp
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: bxp
+> ### Title: Draw Box Plots from Summaries
+> ### Aliases: bxp
+> ### Keywords: aplot
+> 
+> ### ** Examples
+> 
+> require(stats)
+> set.seed(753)
+> (bx.p <- boxplot(split(rt(100, 4), gl(5, 20))))
+$stats
+            [,1]        [,2]        [,3]        [,4]        [,5]
+[1,] -1.66391873 -2.02625162 -2.12785004 -2.76510496 -1.70034047
+[2,] -0.55308292 -0.65897584 -0.86705616 -1.63431484 -0.81848966
+[3,] -0.06763313  0.04887846  0.09674026 -0.06712275 -0.01150075
+[4,]  0.68813940  0.91705734  1.05562526  0.56746581  0.49017934
+[5,]  1.14222667  3.16270157  2.07574986  2.09523462  1.87734641
+
+$n
+[1] 20 20 20 20 20
+
+$conf
+           [,1]       [,2]       [,3]       [,4]       [,5]
+[1,] -0.5061554 -0.5079321 -0.5825407 -0.8450091 -0.4738519
+[2,]  0.3708891  0.6056890  0.7760212  0.7107636  0.4508504
+
+$out
+[1]  4.115274  3.224584  3.920438  4.168341 -4.357819  2.498006
+
+$group
+[1] 1 1 1 4 5 5
+
+$names
+[1] "1" "2" "3" "4" "5"
+
+> op <- par(mfrow =  c(2, 2))
+> bxp(bx.p, xaxt = "n")
+> bxp(bx.p, notch = TRUE, axes = FALSE, pch = 4, boxfill = 1:5)
+Warning in bxp(bx.p, notch = TRUE, axes = FALSE, pch = 4, boxfill = 1:5) :
+  some notches went outside hinges ('box'): maybe set notch=FALSE
+> bxp(bx.p, notch = TRUE, boxfill = "lightblue", frame = FALSE,
++     outl = FALSE, main = "bxp(*, frame= FALSE, outl= FALSE)")
+Warning in bxp(bx.p, notch = TRUE, boxfill = "lightblue", frame = FALSE,  :
+  some notches went outside hinges ('box'): maybe set notch=FALSE
+> bxp(bx.p, notch = TRUE, boxfill = "lightblue", border = 2:6,
++     ylim = c(-4,4), pch = 22, bg = "green", log = "x",
++     main = "... log = 'x', ylim = *")
+Warning in bxp(bx.p, notch = TRUE, boxfill = "lightblue", border = 2:6,  :
+  some notches went outside hinges ('box'): maybe set notch=FALSE
+> par(op)
+> op <- par(mfrow = c(1, 2))
+> 
+> ## single group -- no label
+> boxplot (weight ~ group, data = PlantGrowth, subset = group == "ctrl")
+> ## with label
+> bx <- boxplot(weight ~ group, data = PlantGrowth,
++               subset = group == "ctrl", plot = FALSE)
+> bxp(bx, show.names=TRUE)
+> par(op)
+> 
+> z <- split(rnorm(1000), rpois(1000, 2.2))
+> boxplot(z, whisklty = 3, main = "boxplot(z, whisklty = 3)")
+> 
+> ## Colour support similar to plot.default:
+> op <- par(mfrow = 1:2, bg = "light gray", fg = "midnight blue")
+> boxplot(z,   col.axis = "skyblue3", main = "boxplot(*, col.axis=..,main=..)")
+> plot(z[[1]], col.axis = "skyblue3", main =    "plot(*, col.axis=..,main=..)")
+> mtext("par(bg=\"light gray\", fg=\"midnight blue\")",
++       outer = TRUE, line = -1.2)
+> par(op)
+> 
+> ## Mimic S-Plus:
+> splus <- list(boxwex = 0.4, staplewex = 1, outwex = 1, boxfill = "grey40",
++               medlwd = 3, medcol = "white", whisklty = 3, outlty = 1, outpch = NA)
+> boxplot(z, pars = splus)
+> ## Recycled and "sweeping" parameters
+> op <- par(mfrow = c(1,2))
+>  boxplot(z, border = 1:5, lty = 3, medlty = 1, medlwd = 2.5)
+>  boxplot(z, boxfill = 1:3, pch = 1:5, lwd = 1.5, medcol = "white")
+> par(op)
+> ## too many possibilities
+> boxplot(z, boxfill = "light gray", outpch = 21:25, outlty = 2,
++         bg = "pink", lwd = 2,
++         medcol = "dark blue", medcex = 2, medpch = 20)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("cdplot")
+> ### * cdplot
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: cdplot
+> ### Title: Conditional Density Plots
+> ### Aliases: cdplot cdplot.default cdplot.formula
+> ### Keywords: hplot
+> 
+> ### ** Examples
+> 
+> ## NASA space shuttle o-ring failures
+> fail <- factor(c(2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1,
++                  1, 2, 1, 1, 1, 1, 1),
++                levels = 1:2, labels = c("no", "yes"))
+> temperature <- c(53, 57, 58, 63, 66, 67, 67, 67, 68, 69, 70, 70,
++                  70, 70, 72, 73, 75, 75, 76, 76, 78, 79, 81)
+> 
+> ## CD plot
+> cdplot(fail ~ temperature)
+> cdplot(fail ~ temperature, bw = 2)
+> cdplot(fail ~ temperature, bw = "SJ")
+> 
+> ## compare with spinogram
+> (spineplot(fail ~ temperature, breaks = 3))
+           fail
+temperature no yes
+    [50,60]  0   3
+    (60,70]  8   3
+    (70,80]  7   1
+    (80,90]  1   0
+> 
+> ## highlighting for failures
+> cdplot(fail ~ temperature, ylevels = 2:1)
+> 
+> ## scatter plot with conditional density
+> cdens <- cdplot(fail ~ temperature, plot = FALSE)
+> plot(I(as.numeric(fail) - 1) ~ jitter(temperature, factor = 2),
++      xlab = "Temperature", ylab = "Conditional failure probability")
+> lines(53:81, 1 - cdens[[1]](53:81), col = 2)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("clip")
+> ### * clip
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: clip
+> ### Title: Set Clipping Region
+> ### Aliases: clip
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> x <- rnorm(1000)
+> hist(x, xlim = c(-4,4))
+> usr <- par("usr")
+> clip(usr[1], -2, usr[3], usr[4])
+> hist(x, col = 'red', add = TRUE)
+> clip(2, usr[2], usr[3], usr[4])
+> hist(x, col = 'blue', add = TRUE)
+> do.call("clip", as.list(usr))  # reset to plot region
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("contour")
+> ### * contour
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: contour
+> ### Title: Display Contours
+> ### Aliases: contour contour.default
+> ### Keywords: hplot aplot
+> 
+> ### ** Examples
+> 
+> require(grDevices) # for colours
+> x <- -6:16
+> op <- par(mfrow = c(2, 2))
+> contour(outer(x, x), method = "edge", vfont = c("sans serif", "plain"))
+> z <- outer(x, sqrt(abs(x)), FUN = "/")
+> image(x, x, z)
+> contour(x, x, z, col = "pink", add = TRUE, method = "edge",
++         vfont = c("sans serif", "plain"))
+> contour(x, x, z, ylim = c(1, 6), method = "simple", labcex = 1,
++         xlab = quote(x[1]), ylab = quote(x[2]))
+> contour(x, x, z, ylim = c(-6, 6), nlev = 20, lty = 2, method = "simple",
++         main = "20 levels; \"simple\" labelling method")
+> par(op)
+> 
+> ## Persian Rug Art:
+> x <- y <- seq(-4*pi, 4*pi, len = 27)
+> r <- sqrt(outer(x^2, y^2, "+"))
+> opar <- par(mfrow = c(2, 2), mar = rep(0, 4))
+> for(f in pi^(0:3))
++   contour(cos(r^2)*exp(-r/f),
++           drawlabels = FALSE, axes = FALSE, frame = TRUE)
+> 
+> rx <- range(x <- 10*1:nrow(volcano))
+> ry <- range(y <- 10*1:ncol(volcano))
+> ry <- ry + c(-1, 1) * (diff(rx) - diff(ry))/2
+> tcol <- terrain.colors(12)
+> par(opar); opar <- par(pty = "s", bg = "lightcyan")
+> plot(x = 0, y = 0, type = "n", xlim = rx, ylim = ry, xlab = "", ylab = "")
+> u <- par("usr")
+> rect(u[1], u[3], u[2], u[4], col = tcol[8], border = "red")
+> contour(x, y, volcano, col = tcol[2], lty = "solid", add = TRUE,
++         vfont = c("sans serif", "plain"))
+> title("A Topographic Map of Maunga Whau", font = 4)
+> abline(h = 200*0:4, v = 200*0:4, col = "lightgray", lty = 2, lwd = 0.1)
+> 
+> ## contourLines produces the same contour lines as contour
+> plot(x = 0, y = 0, type = "n", xlim = rx, ylim = ry, xlab = "", ylab = "")
+> u <- par("usr")
+> rect(u[1], u[3], u[2], u[4], col = tcol[8], border = "red")
+> contour(x, y, volcano, col = tcol[1], lty = "solid", add = TRUE,
++         vfont = c("sans serif", "plain"))
+> line.list <- contourLines(x, y, volcano)
+> invisible(lapply(line.list, lines, lwd=3, col=adjustcolor(2, .3)))
+> par(opar)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("convertXY")
+> ### * convertXY
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: convertXY
+> ### Title: Convert between Graphics Coordinate Systems
+> ### Aliases: grconvertX grconvertY
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> op <- par(omd=c(0.1, 0.9, 0.1, 0.9), mfrow = c(1, 2))
+> plot(1:4)
+> for(tp in c("in", "dev", "ndc", "nfc", "npc", "nic"))
++     print(grconvertX(c(1.0, 4.0), "user", tp))
+[1] 1.577778 3.022222
+[1] 113.6 217.6
+[1] 0.2253968 0.4317460
+[1] 0.3134921 0.8293651
+[1] 0.03703704 0.96296296
+[1] 0.1567460 0.4146825
+> par(op)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("coplot")
+> ### * coplot
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: coplot
+> ### Title: Conditioning Plots
+> ### Aliases: coplot co.intervals
+> ### Keywords: hplot aplot
+> 
+> ### ** Examples
+> 
+> ## Tonga Trench Earthquakes
+> coplot(lat ~ long | depth, data = quakes)
+> given.depth <- co.intervals(quakes$depth, number = 4, overlap = .1)
+> coplot(lat ~ long | depth, data = quakes, given.v = given.depth, rows = 1)
+> 
+> ## Conditioning on 2 variables:
+> ll.dm <- lat ~ long | depth * mag
+> coplot(ll.dm, data = quakes)
+> coplot(ll.dm, data = quakes, number = c(4, 7), show.given = c(TRUE, FALSE))
+> coplot(ll.dm, data = quakes, number = c(3, 7),
++        overlap = c(-.5, .1)) # negative overlap DROPS values
+> 
+> ## given two factors
+> Index <- seq(length = nrow(warpbreaks)) # to get nicer default labels
+> coplot(breaks ~ Index | wool * tension, data = warpbreaks,
++        show.given = 0:1)
+> coplot(breaks ~ Index | wool * tension, data = warpbreaks,
++        col = "red", bg = "pink", pch = 21,
++        bar.bg = c(fac = "light blue"))
+> 
+> ## Example with empty panels:
+> with(data.frame(state.x77), {
++ coplot(Life.Exp ~ Income | Illiteracy * state.region, number = 3,
++        panel = function(x, y, ...) panel.smooth(x, y, span = .8, ...))
++ ## y ~ factor -- not really sensible, but 'show off':
++ coplot(Life.Exp ~ state.region | Income * state.division,
++        panel = panel.smooth)
++ })
+> 
+> 
+> 
+> cleanEx()
+> nameEx("curve")
+> ### * curve
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: curve
+> ### Title: Draw Function Plots
+> ### Aliases: curve plot.function
+> ### Keywords: hplot
+> 
+> ### ** Examples
+> 
+> plot(qnorm) # default range c(0, 1) is appropriate here,
+>             # but end values are -/+Inf and so are omitted.
+> plot(qlogis, main = "The Inverse Logit : qlogis()")
+> abline(h = 0, v = 0:2/2, lty = 3, col = "gray")
+> 
+> curve(sin, -2*pi, 2*pi, xname = "t")
+> curve(tan, xname = "t", add = NA,
++       main = "curve(tan)  --> same x-scale as previous plot")
+> 
+> op <- par(mfrow = c(2, 2))
+> curve(x^3 - 3*x, -2, 2)
+> curve(x^2 - 2, add = TRUE, col = "violet")
+> 
+> ## simple and advanced versions, quite similar:
+> plot(cos, -pi,  3*pi)
+> curve(cos, xlim = c(-pi, 3*pi), n = 1001, col = "blue", add = TRUE)
+> 
+> chippy <- function(x) sin(cos(x)*exp(-x/2))
+> curve(chippy, -8, 7, n = 2001)
+> plot (chippy, -8, -5)
+> 
+> for(ll in c("", "x", "y", "xy"))
++    curve(log(1+x), 1, 100, log = ll, sub = paste0("log = '", ll, "'"))
+> par(op)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("dotchart")
+> ### * dotchart
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: dotchart
+> ### Title: Cleveland's Dot Plots
+> ### Aliases: dotchart
+> ### Keywords: hplot
+> 
+> ### ** Examples
+> 
+> dotchart(VADeaths, main = "Death Rates in Virginia - 1940")
+> op <- par(xaxs = "i")  # 0 -- 100%
+> dotchart(t(VADeaths), xlim = c(0,100),
++          main = "Death Rates in Virginia - 1940")
+> par(op)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("filled.contour")
+> ### * filled.contour
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: filled.contour
+> ### Title: Level (Contour) Plots
+> ### Aliases: filled.contour .filled.contour
+> ### Keywords: hplot aplot
+> 
+> ### ** Examples
+> 
+> require(grDevices) # for colours
+> filled.contour(volcano, color = terrain.colors, asp = 1) # simple
+> 
+> x <- 10*1:nrow(volcano)
+> y <- 10*1:ncol(volcano)
+> filled.contour(x, y, volcano, color = terrain.colors,
++     plot.title = title(main = "The Topography of Maunga Whau",
++     xlab = "Meters North", ylab = "Meters West"),
++     plot.axes = { axis(1, seq(100, 800, by = 100))
++                   axis(2, seq(100, 600, by = 100)) },
++     key.title = title(main = "Height\n(meters)"),
++     key.axes = axis(4, seq(90, 190, by = 10)))  # maybe also asp = 1
+> mtext(paste("filled.contour(.) from", R.version.string),
++       side = 1, line = 4, adj = 1, cex = .66)
+> 
+> # Annotating a filled contour plot
+> a <- expand.grid(1:20, 1:20)
+> b <- matrix(a[,1] + a[,2], 20)
+> filled.contour(x = 1:20, y = 1:20, z = b,
++                plot.axes = { axis(1); axis(2); points(10, 10) })
+> 
+> ## Persian Rug Art:
+> x <- y <- seq(-4*pi, 4*pi, len = 27)
+> r <- sqrt(outer(x^2, y^2, "+"))
+> filled.contour(cos(r^2)*exp(-r/(2*pi)), axes = FALSE)
+> ## rather, the key *should* be labeled:
+> filled.contour(cos(r^2)*exp(-r/(2*pi)), frame.plot = FALSE,
++                plot.axes = {})
+> 
+> 
+> 
+> cleanEx()
+> nameEx("fourfoldplot")
+> ### * fourfoldplot
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: fourfoldplot
+> ### Title: Fourfold Plots
+> ### Aliases: fourfoldplot
+> ### Keywords: hplot
+> 
+> ### ** Examples
+> 
+> ## Use the Berkeley admission data as in Friendly (1995).
+> x <- aperm(UCBAdmissions, c(2, 1, 3))
+> dimnames(x)[[2]] <- c("Yes", "No")
+> names(dimnames(x)) <- c("Sex", "Admit?", "Department")
+> stats::ftable(x)
+              Department   A   B   C   D   E   F
+Sex    Admit?                                   
+Male   Yes               512 353 120 138  53  22
+       No                313 207 205 279 138 351
+Female Yes                89  17 202 131  94  24
+       No                 19   8 391 244 299 317
+> 
+> ## Fourfold display of data aggregated over departments, with
+> ## frequencies standardized to equate the margins for admission
+> ## and sex.
+> ## Figure 1 in Friendly (1994).
+> fourfoldplot(margin.table(x, c(1, 2)))
+> 
+> ## Fourfold display of x, with frequencies in each table
+> ## standardized to equate the margins for admission and sex.
+> ## Figure 2 in Friendly (1994).
+> fourfoldplot(x)
+> 
+> ## Fourfold display of x, with frequencies in each table
+> ## standardized to equate the margins for admission. but not
+> ## for sex.
+> ## Figure 3 in Friendly (1994).
+> fourfoldplot(x, margin = 2)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("grid")
+> ### * grid
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: grid
+> ### Title: Add Grid to a Plot
+> ### Aliases: grid
+> ### Keywords: aplot
+> 
+> ### ** Examples
+> 
+> plot(1:3)
+> grid(NA, 5, lwd = 2) # grid only in y-direction
+> 
+> ## maybe change the desired number of tick marks:  par(lab = c(mx, my, 7))
+> op <- par(mfcol = 1:2)
+> with(iris,
++      {
++      plot(Sepal.Length, Sepal.Width, col = as.integer(Species),
++           xlim = c(4, 8), ylim = c(2, 4.5), panel.first = grid(),
++           main = "with(iris,  plot(...., panel.first = grid(), ..) )")
++      plot(Sepal.Length, Sepal.Width, col = as.integer(Species),
++           panel.first = grid(3, lty = 1, lwd = 2),
++           main = "... panel.first = grid(3, lty = 1, lwd = 2), ..")
++      }
++     )
+> par(op)
+> 
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("hist.POSIXt")
+> ### * hist.POSIXt
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: hist.POSIXt
+> ### Title: Histogram of a Date or Date-Time Object
+> ### Aliases: hist.POSIXt hist.Date
+> ### Keywords: chron dplot hplot
+> 
+> ### ** Examples
+> 
+> hist(.leap.seconds, "years", freq = TRUE)
+> hist(.leap.seconds,
++      seq(ISOdate(1970, 1, 1), ISOdate(2020, 1, 1), "5 years"))
+> 
+> ## 100 random dates in a 10-week period
+> random.dates <- as.Date("2001/1/1") + 70*stats::runif(100)
+> hist(random.dates, "weeks", format = "%d %b")
+> 
+> 
+> 
+> cleanEx()
+> nameEx("hist")
+> ### * hist
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: hist
+> ### Title: Histograms
+> ### Aliases: hist hist.default
+> ### Keywords: dplot hplot distribution
+> 
+> ### ** Examples
+> 
+> op <- par(mfrow = c(2, 2))
+> hist(islands)
+> utils::str(hist(islands, col = "gray", labels = TRUE))
+List of 6
+ $ breaks  : num [1:10] 0 2000 4000 6000 8000 10000 12000 14000 16000 18000
+ $ counts  : int [1:9] 41 2 1 1 1 1 0 0 1
+ $ density : num [1:9] 4.27e-04 2.08e-05 1.04e-05 1.04e-05 1.04e-05 ...
+ $ mids    : num [1:9] 1000 3000 5000 7000 9000 11000 13000 15000 17000
+ $ xname   : chr "islands"
+ $ equidist: logi TRUE
+ - attr(*, "class")= chr "histogram"
+> 
+> hist(sqrt(islands), breaks = 12, col = "lightblue", border = "pink")
+> ##-- For non-equidistant breaks, counts should NOT be graphed unscaled:
+> r <- hist(sqrt(islands), breaks = c(4*0:5, 10*3:5, 70, 100, 140),
++           col = "blue1")
+> text(r$mids, r$density, r$counts, adj = c(.5, -.5), col = "blue3")
+> sapply(r[2:3], sum)
+   counts   density 
+48.000000  0.215625 
+> sum(r$density * diff(r$breaks)) # == 1
+[1] 1
+> lines(r, lty = 3, border = "purple") # -> lines.histogram(*)
+> par(op)
+> 
+> require(utils) # for str
+> str(hist(islands, breaks = 12, plot =  FALSE)) #-> 10 (~= 12) breaks
+List of 6
+ $ breaks  : num [1:10] 0 2000 4000 6000 8000 10000 12000 14000 16000 18000
+ $ counts  : int [1:9] 41 2 1 1 1 1 0 0 1
+ $ density : num [1:9] 4.27e-04 2.08e-05 1.04e-05 1.04e-05 1.04e-05 ...
+ $ mids    : num [1:9] 1000 3000 5000 7000 9000 11000 13000 15000 17000
+ $ xname   : chr "islands"
+ $ equidist: logi TRUE
+ - attr(*, "class")= chr "histogram"
+> str(hist(islands, breaks = c(12,20,36,80,200,1000,17000), plot = FALSE))
+List of 6
+ $ breaks  : num [1:7] 12 20 36 80 200 1000 17000
+ $ counts  : int [1:6] 12 11 8 6 4 7
+ $ density : num [1:6] 0.03125 0.014323 0.003788 0.001042 0.000104 ...
+ $ mids    : num [1:6] 16 28 58 140 600 9000
+ $ xname   : chr "islands"
+ $ equidist: logi FALSE
+ - attr(*, "class")= chr "histogram"
+> 
+> hist(islands, breaks = c(12,20,36,80,200,1000,17000), freq = TRUE,
++      main = "WRONG histogram") # and warning
+Warning in plot.histogram(r, freq = freq1, col = col, border = border, angle = angle,  :
+  the AREAS in the plot are wrong -- rather use 'freq = FALSE'
+> 
+> require(stats)
+> set.seed(14)
+> x <- rchisq(100, df = 4)
+> ## Don't show: 
+> op <- par(mfrow = 2:1, mgp = c(1.5, 0.6, 0), mar = .1 + c(3,3:1))
+> ## End(Don't show)
+> ## Comparing data with a model distribution should be done with qqplot()!
+> qqplot(x, qchisq(ppoints(x), df = 4)); abline(0, 1, col = 2, lty = 2)
+> 
+> ## if you really insist on using hist() ... :
+> hist(x, freq = FALSE, ylim = c(0, 0.2))
+> curve(dchisq(x, df = 4), col = 2, lty = 2, lwd = 2, add = TRUE)
+> ## Don't show: 
+> par(op)
+> ## End(Don't show)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("identify")
+> ### * identify
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: identify
+> ### Title: Identify Points in a Scatter Plot
+> ### Aliases: identify identify.default
+> ### Keywords: iplot
+> 
+> ### ** Examples
+> 
+> ## A function to use identify to select points, and overplot the
+> ## points with another symbol as they are selected
+> identifyPch <- function(x, y = NULL, n = length(x), pch = 19, ...)
++ {
++     xy <- xy.coords(x, y); x <- xy$x; y <- xy$y
++     sel <- rep(FALSE, length(x)); res <- integer(0)
++     while(sum(sel) < n) {
++         ans <- identify(x[!sel], y[!sel], n = 1, plot = FALSE, ...)
++         if(!length(ans)) break
++         ans <- which(!sel)[ans]
++         points(x[ans], y[ans], pch = pch)
++         sel[ans] <- TRUE
++         res <- c(res, ans)
++     }
++     res
++ }
+> 
+> 
+> 
+> cleanEx()
+> nameEx("image")
+> ### * image
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: image
+> ### Title: Display a Color Image
+> ### Aliases: image image.default
+> ### Keywords: hplot aplot
+> 
+> ### ** Examples
+> 
+> require(grDevices) # for colours
+> x <- y <- seq(-4*pi, 4*pi, len = 27)
+> r <- sqrt(outer(x^2, y^2, "+"))
+> image(z = z <- cos(r^2)*exp(-r/6), col  = gray((0:32)/32))
+> image(z, axes = FALSE, main = "Math can be beautiful ...",
++       xlab = expression(cos(r^2) * e^{-r/6}))
+> contour(z, add = TRUE, drawlabels = FALSE)
+> 
+> # Volcano data visualized as matrix. Need to transpose and flip
+> # matrix horizontally.
+> image(t(volcano)[ncol(volcano):1,])
+> 
+> # A prettier display of the volcano
+> x <- 10*(1:nrow(volcano))
+> y <- 10*(1:ncol(volcano))
+> image(x, y, volcano, col = terrain.colors(100), axes = FALSE)
+> contour(x, y, volcano, levels = seq(90, 200, by = 5),
++         add = TRUE, col = "peru")
+> axis(1, at = seq(100, 800, by = 100))
+> axis(2, at = seq(100, 600, by = 100))
+> box()
+> title(main = "Maunga Whau Volcano", font.main = 4)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("layout")
+> ### * layout
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: layout
+> ### Title: Specifying Complex Plot Arrangements
+> ### Aliases: layout layout.show lcm
+> ### Keywords: iplot dplot environment
+> 
+> ### ** Examples
+> 
+> def.par <- par(no.readonly = TRUE) # save default, for resetting...
+> 
+> ## divide the device into two rows and two columns
+> ## allocate figure 1 all of row 1
+> ## allocate figure 2 the intersection of column 2 and row 2
+> layout(matrix(c(1,1,0,2), 2, 2, byrow = TRUE))
+> ## show the regions that have been allocated to each plot
+> layout.show(2)
+> 
+> ## divide device into two rows and two columns
+> ## allocate figure 1 and figure 2 as above
+> ## respect relations between widths and heights
+> nf <- layout(matrix(c(1,1,0,2), 2, 2, byrow = TRUE), respect = TRUE)
+> layout.show(nf)
+> 
+> ## create single figure which is 5cm square
+> nf <- layout(matrix(1), widths = lcm(5), heights = lcm(5))
+> layout.show(nf)
+> 
+> 
+> ##-- Create a scatterplot with marginal histograms -----
+> 
+> x <- pmin(3, pmax(-3, stats::rnorm(50)))
+> y <- pmin(3, pmax(-3, stats::rnorm(50)))
+> xhist <- hist(x, breaks = seq(-3,3,0.5), plot = FALSE)
+> yhist <- hist(y, breaks = seq(-3,3,0.5), plot = FALSE)
+> top <- max(c(xhist$counts, yhist$counts))
+> xrange <- c(-3, 3)
+> yrange <- c(-3, 3)
+> nf <- layout(matrix(c(2,0,1,3),2,2,byrow = TRUE), c(3,1), c(1,3), TRUE)
+> layout.show(nf)
+> 
+> par(mar = c(3,3,1,1))
+> plot(x, y, xlim = xrange, ylim = yrange, xlab = "", ylab = "")
+> par(mar = c(0,3,1,1))
+> barplot(xhist$counts, axes = FALSE, ylim = c(0, top), space = 0)
+> par(mar = c(3,0,1,1))
+> barplot(yhist$counts, axes = FALSE, xlim = c(0, top), space = 0, horiz = TRUE)
+> 
+> par(def.par)  #- reset to default
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("legend")
+> ### * legend
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: legend
+> ### Title: Add Legends to Plots
+> ### Aliases: legend
+> ### Keywords: aplot
+> 
+> ### ** Examples
+> 
+> ## Run the example in '?matplot' or the following:
+> leg.txt <- c("Setosa     Petals", "Setosa     Sepals",
++              "Versicolor Petals", "Versicolor Sepals")
+> y.leg <- c(4.5, 3, 2.1, 1.4, .7)
+> cexv  <- c(1.2, 1, 4/5, 2/3, 1/2)
+> matplot(c(1, 8), c(0, 4.5), type = "n", xlab = "Length", ylab = "Width",
++         main = "Petal and Sepal Dimensions in Iris Blossoms")
+> for (i in seq(cexv)) {
++   text  (1, y.leg[i] - 0.1, paste("cex=", formatC(cexv[i])), cex = 0.8, adj = 0)
++   legend(3, y.leg[i], leg.txt, pch = "sSvV", col = c(1, 3), cex = cexv[i])
++ }
+> 
+> ## 'merge = TRUE' for merging lines & points:
+> x <- seq(-pi, pi, len = 65)
+> plot(x, sin(x), type = "l", ylim = c(-1.2, 1.8), col = 3, lty = 2)
+> points(x, cos(x), pch = 3, col = 4)
+> lines(x, tan(x), type = "b", lty = 1, pch = 4, col = 6)
+> title("legend(..., lty = c(2, -1, 1), pch = c(NA, 3, 4), merge = TRUE)",
++       cex.main = 1.1)
+> legend(-1, 1.9, c("sin", "cos", "tan"), col = c(3, 4, 6),
++        text.col = "green4", lty = c(2, -1, 1), pch = c(NA, 3, 4),
++        merge = TRUE, bg = "gray90")
+> 
+> ## right-justifying a set of labels: thanks to Uwe Ligges
+> x <- 1:5; y1 <- 1/x; y2 <- 2/x
+> plot(rep(x, 2), c(y1, y2), type = "n", xlab = "x", ylab = "y")
+> lines(x, y1); lines(x, y2, lty = 2)
+> temp <- legend("topright", legend = c(" ", " "),
++                text.width = strwidth("1,000,000"),
++                lty = 1:2, xjust = 1, yjust = 1,
++                title = "Line Types")
+> text(temp$rect$left + temp$rect$w, temp$text$y,
++      c("1,000", "1,000,000"), pos = 2)
+> 
+> 
+> ##--- log scaled Examples ------------------------------
+> leg.txt <- c("a one", "a two")
+> 
+> par(mfrow = c(2, 2))
+> for(ll in c("","x","y","xy")) {
++   plot(2:10, log = ll, main = paste0("log = '", ll, "'"))
++   abline(1, 1)
++   lines(2:3, 3:4, col = 2)
++   points(2, 2, col = 3)
++   rect(2, 3, 3, 2, col = 4)
++   text(c(3,3), 2:3, c("rect(2,3,3,2, col=4)",
++                       "text(c(3,3),2:3,\"c(rect(...)\")"), adj = c(0, 0.3))
++   legend(list(x = 2,y = 8), legend = leg.txt, col = 2:3, pch = 1:2,
++          lty = 1, merge = TRUE)   #, trace = TRUE)
++ }
+> par(mfrow = c(1,1))
+> 
+> ##-- Math expressions:  ------------------------------
+> x <- seq(-pi, pi, len = 65)
+> plot(x, sin(x), type = "l", col = 2, xlab = expression(phi),
++      ylab = expression(f(phi)))
+> abline(h = -1:1, v = pi/2*(-6:6), col = "gray90")
+> lines(x, cos(x), col = 3, lty = 2)
+> ex.cs1 <- expression(plain(sin) * phi,  paste("cos", phi))  # 2 ways
+> utils::str(legend(-3, .9, ex.cs1, lty = 1:2, plot = FALSE,
++            adj = c(0, 0.6)))  # adj y !
+List of 2
+ $ rect:List of 4
+  ..$ w   : num 1.2
+  ..$ h   : num 0.251
+  ..$ left: num -3
+  ..$ top : num 0.9
+ $ text:List of 2
+  ..$ x: num [1:2] -2.29 -2.29
+  ..$ y: num [1:2] 0.816 0.733
+> legend(-3, 0.9, ex.cs1, lty = 1:2, col = 2:3,  adj = c(0, 0.6))
+> 
+> require(stats)
+> x <- rexp(100, rate = .5)
+> hist(x, main = "Mean and Median of a Skewed Distribution")
+> abline(v = mean(x),   col = 2, lty = 2, lwd = 2)
+> abline(v = median(x), col = 3, lty = 3, lwd = 2)
+> ex12 <- expression(bar(x) == sum(over(x[i], n), i == 1, n),
++                    hat(x) == median(x[i], i == 1, n))
+> utils::str(legend(4.1, 30, ex12, col = 2:3, lty = 2:3, lwd = 2))
+List of 2
+ $ rect:List of 4
+  ..$ w   : num 4.27
+  ..$ h   : num 6.78
+  ..$ left: num 4.1
+  ..$ top : num 30
+ $ text:List of 2
+  ..$ x: num [1:2] 5.22 5.22
+  ..$ y: num [1:2] 27.3 24.6
+> 
+> ## 'Filled' boxes -- for more, see example(plot.factor)
+> op <- par(bg = "white") # to get an opaque box for the legend
+> plot(cut(weight, 3) ~ group, data = PlantGrowth, col = NULL,
++      density = 16*(1:3))
+> par(op)
+> 
+> ## Using 'ncol' :
+> x <- 0:64/64
+> matplot(x, outer(x, 1:7, function(x, k) sin(k * pi * x)),
++         type = "o", col = 1:7, ylim = c(-1, 1.5), pch = "*")
+> op <- par(bg = "antiquewhite1")
+> legend(0, 1.5, paste("sin(", 1:7, "pi * x)"), col = 1:7, lty = 1:7,
++        pch = "*", ncol = 4, cex = 0.8)
+> legend(.8,1.2, paste("sin(", 1:7, "pi * x)"), col = 1:7, lty = 1:7,
++        pch = "*", cex = 0.8)
+> legend(0, -.1, paste("sin(", 1:4, "pi * x)"), col = 1:4, lty = 1:4,
++        ncol = 2, cex = 0.8)
+> legend(0, -.4, paste("sin(", 5:7, "pi * x)"), col = 4:6,  pch = 24,
++        ncol = 2, cex = 1.5, lwd = 2, pt.bg = "pink", pt.cex = 1:3)
+> par(op)
+> 
+> ## point covering line :
+> y <- sin(3*pi*x)
+> plot(x, y, type = "l", col = "blue",
++     main = "points with bg & legend(*, pt.bg)")
+> points(x, y, pch = 21, bg = "white")
+> legend(.4,1, "sin(c x)", pch = 21, pt.bg = "white", lty = 1, col = "blue")
+> 
+> ## legends with titles at different locations
+> plot(x, y, type = "n")
+> legend("bottomright", "(x,y)", pch = 1, title = "bottomright")
+> legend("bottom", "(x,y)", pch = 1, title = "bottom")
+> legend("bottomleft", "(x,y)", pch = 1, title = "bottomleft")
+> legend("left", "(x,y)", pch = 1, title = "left")
+> legend("topleft", "(x,y)", pch = 1, title = "topleft, inset = .05",
++        inset = .05)
+> legend("top", "(x,y)", pch = 1, title = "top")
+> legend("topright", "(x,y)", pch = 1, title = "topright, inset = .02",
++        inset = .02)
+> legend("right", "(x,y)", pch = 1, title = "right")
+> legend("center", "(x,y)", pch = 1, title = "center")
+> 
+> # using text.font (and text.col):
+> op <- par(mfrow = c(2, 2), mar = rep(2.1, 4))
+> c6 <- terrain.colors(10)[1:6]
+> for(i in 1:4) {
++    plot(1, type = "n", axes = FALSE, ann = FALSE); title(paste("text.font =",i))
++    legend("top", legend = LETTERS[1:6], col = c6,
++           ncol = 2, cex = 2, lwd = 3, text.font = i, text.col = c6)
++ }
+> par(op)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("lines")
+> ### * lines
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: lines
+> ### Title: Add Connected Line Segments to a Plot
+> ### Aliases: lines lines.default
+> ### Keywords: aplot
+> 
+> ### ** Examples
+> 
+> # draw a smooth line through a scatter plot
+> plot(cars, main = "Stopping Distance versus Speed")
+> lines(stats::lowess(cars))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("matplot")
+> ### * matplot
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: matplot
+> ### Title: Plot Columns of Matrices
+> ### Aliases: matplot matpoints matlines
+> ### Keywords: hplot aplot array
+> 
+> ### ** Examples
+> 
+> require(grDevices)
+> matplot((-4:5)^2, main = "Quadratic") # almost identical to plot(*)
+> sines <- outer(1:20, 1:4, function(x, y) sin(x / 20 * pi * y))
+> matplot(sines, pch = 1:4, type = "o", col = rainbow(ncol(sines)))
+> matplot(sines, type = "b", pch = 21:23, col = 2:5, bg = 2:5,
++         main = "matplot(...., pch = 21:23, bg = 2:5)")
+> 
+> x <- 0:50/50
+> matplot(x, outer(x, 1:8, function(x, k) sin(k*pi * x)),
++         ylim = c(-2,2), type = "plobcsSh",
++         main= "matplot(,type = \"plobcsSh\" )")
+> ## pch & type =  vector of 1-chars :
+> matplot(x, outer(x, 1:4, function(x, k) sin(k*pi * x)),
++         pch = letters[1:4], type = c("b","p","o"))
+> 
+> lends <- c("round","butt","square")
+> matplot(matrix(1:12, 4), type="c", lty=1, lwd=10, lend=lends)
+> text(cbind(2.5, 2*c(1,3,5)-.4), lends, col= 1:3, cex = 1.5)
+> 
+> table(iris$Species) # is data.frame with 'Species' factor
+
+    setosa versicolor  virginica 
+        50         50         50 
+> iS <- iris$Species == "setosa"
+> iV <- iris$Species == "versicolor"
+> op <- par(bg = "bisque")
+> matplot(c(1, 8), c(0, 4.5), type =  "n", xlab = "Length", ylab = "Width",
++         main = "Petal and Sepal Dimensions in Iris Blossoms")
+> matpoints(iris[iS,c(1,3)], iris[iS,c(2,4)], pch = "sS", col = c(2,4))
+> matpoints(iris[iV,c(1,3)], iris[iV,c(2,4)], pch = "vV", col = c(2,4))
+> legend(1, 4, c("    Setosa Petals", "    Setosa Sepals",
++                "Versicolor Petals", "Versicolor Sepals"),
++        pch = "sSvV", col = rep(c(2,4), 2))
+> 
+> nam.var <- colnames(iris)[-5]
+> nam.spec <- as.character(iris[1+50*0:2, "Species"])
+> iris.S <- array(NA, dim = c(50,4,3),
++                 dimnames = list(NULL, nam.var, nam.spec))
+> for(i in 1:3) iris.S[,,i] <- data.matrix(iris[1:50+50*(i-1), -5])
+> 
+> matplot(iris.S[, "Petal.Length",], iris.S[, "Petal.Width",], pch = "SCV",
++         col = rainbow(3, start = 0.8, end = 0.1),
++         sub = paste(c("S", "C", "V"), dimnames(iris.S)[[3]],
++                     sep = "=", collapse= ",  "),
++         main = "Fisher's Iris Data")
+> par(op)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("mosaicplot")
+> ### * mosaicplot
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: mosaicplot
+> ### Title: Mosaic Plots
+> ### Aliases: mosaicplot mosaicplot.default mosaicplot.formula
+> ### Keywords: hplot
+> 
+> ### ** Examples
+> 
+> require(stats)
+> mosaicplot(Titanic, main = "Survival on the Titanic", color = TRUE)
+> ## Formula interface for tabulated data:
+> mosaicplot(~ Sex + Age + Survived, data = Titanic, color = TRUE)
+> 
+> mosaicplot(HairEyeColor, shade = TRUE)
+> ## Independence model of hair and eye color and sex.  Indicates that
+> ## there are more blue eyed blonde females than expected in the case
+> ## of independence and too few brown eyed blonde females.
+> ## The corresponding model is:
+> fm <- loglin(HairEyeColor, list(1, 2, 3))
+2 iterations: deviation 5.684342e-14 
+> pchisq(fm$pearson, fm$df, lower.tail = FALSE)
+[1] 5.320872e-23
+> 
+> mosaicplot(HairEyeColor, shade = TRUE, margin = list(1:2, 3))
+> ## Model of joint independence of sex from hair and eye color.  Males
+> ## are underrepresented among people with brown hair and eyes, and are
+> ## overrepresented among people with brown hair and blue eyes.
+> ## The corresponding model is:
+> fm <- loglin(HairEyeColor, list(1:2, 3))
+2 iterations: deviation 5.684342e-14 
+> pchisq(fm$pearson, fm$df, lower.tail = FALSE)
+[1] 0.1891745
+> 
+> ## Formula interface for raw data: visualize cross-tabulation of numbers
+> ## of gears and carburettors in Motor Trend car data.
+> mosaicplot(~ gear + carb, data = mtcars, color = TRUE, las = 1)
+> # color recycling
+> mosaicplot(~ gear + carb, data = mtcars, color = 2:3, las = 1)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("mtext")
+> ### * mtext
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: mtext
+> ### Title: Write Text into the Margins of a Plot
+> ### Aliases: mtext
+> ### Keywords: aplot
+> 
+> ### ** Examples
+> 
+> plot(1:10, (-4:5)^2, main = "Parabola Points", xlab = "xlab")
+> mtext("10 of them")
+> for(s in 1:4)
++     mtext(paste("mtext(..., line= -1, {side, col, font} = ", s,
++           ", cex = ", (1+s)/2, ")"), line = -1,
++           side = s, col = s, font = s, cex = (1+s)/2)
+> mtext("mtext(..., line= -2)", line = -2)
+> mtext("mtext(..., line= -2, adj = 0)", line = -2, adj = 0)
+> ##--- log axis :
+> plot(1:10, exp(1:10), log = "y", main = "log =\"y\"", xlab = "xlab")
+> for(s in 1:4) mtext(paste("mtext(...,side=", s ,")"), side = s)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("pairs")
+> ### * pairs
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: pairs
+> ### Title: Scatterplot Matrices
+> ### Aliases: pairs pairs.default pairs.formula
+> ### Keywords: hplot
+> 
+> ### ** Examples
+> 
+> pairs(iris[1:4], main = "Anderson's Iris Data -- 3 species",
++       pch = 21, bg = c("red", "green3", "blue")[unclass(iris$Species)])
+> 
+> ## formula method
+> pairs(~ Fertility + Education + Catholic, data = swiss,
++       subset = Education < 20, main = "Swiss data, Education < 20")
+> 
+> pairs(USJudgeRatings)
+> ## show only lower triangle (and suppress labeling for whatever reason):
+> pairs(USJudgeRatings, text.panel = NULL, upper.panel = NULL)
+> 
+> ## put histograms on the diagonal
+> panel.hist <- function(x, ...)
++ {
++     usr <- par("usr"); on.exit(par(usr))
++     par(usr = c(usr[1:2], 0, 1.5) )
++     h <- hist(x, plot = FALSE)
++     breaks <- h$breaks; nB <- length(breaks)
++     y <- h$counts; y <- y/max(y)
++     rect(breaks[-nB], 0, breaks[-1], y, col = "cyan", ...)
++ }
+> pairs(USJudgeRatings[1:5], panel = panel.smooth,
++       cex = 1.5, pch = 24, bg = "light blue",
++       diag.panel = panel.hist, cex.labels = 2, font.labels = 2)
+> 
+> ## put (absolute) correlations on the upper panels,
+> ## with size proportional to the correlations.
+> panel.cor <- function(x, y, digits = 2, prefix = "", cex.cor, ...)
++ {
++     usr <- par("usr"); on.exit(par(usr))
++     par(usr = c(0, 1, 0, 1))
++     r <- abs(cor(x, y))
++     txt <- format(c(r, 0.123456789), digits = digits)[1]
++     txt <- paste0(prefix, txt)
++     if(missing(cex.cor)) cex.cor <- 0.8/strwidth(txt)
++     text(0.5, 0.5, txt, cex = cex.cor * r)
++ }
+> pairs(USJudgeRatings, lower.panel = panel.smooth, upper.panel = panel.cor)
+> 
+> pairs(iris[-5], log = "xy") # plot all variables on log scale
+> pairs(iris, log = 1:4, # log the first four
++       main = "Lengths and Widths in [log]", line.main=1.5, oma=c(2,2,3,2))
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("panel.smooth")
+> ### * panel.smooth
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: panel.smooth
+> ### Title: Simple Panel Plot
+> ### Aliases: panel.smooth
+> ### Keywords: hplot dplot
+> 
+> ### ** Examples
+> 
+> pairs(swiss, panel = panel.smooth, pch = ".")  # emphasize the smooths
+> pairs(swiss, panel = panel.smooth, lwd = 2, cex = 1.5, col = "blue")  # hmm...
+> 
+> 
+> 
+> cleanEx()
+> nameEx("par")
+> ### * par
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: par
+> ### Title: Set or Query Graphical Parameters
+> ### Aliases: par .Pars 'graphical parameter' 'graphical parameters'
+> ### Keywords: iplot dplot environment
+> 
+> ### ** Examples
+> 
+> op <- par(mfrow = c(2, 2), # 2 x 2 pictures on one plot
++           pty = "s")       # square plotting region,
+>                            # independent of device size
+> 
+> ## At end of plotting, reset to previous settings:
+> par(op)
+> 
+> ## Alternatively,
+> op <- par(no.readonly = TRUE) # the whole list of settable par's.
+> ## do lots of plotting and par(.) calls, then reset:
+> par(op)
+> ## Note this is not in general good practice
+> 
+> par("ylog") # FALSE
+[1] FALSE
+> plot(1 : 12, log = "y")
+> par("ylog") # TRUE
+[1] TRUE
+> 
+> plot(1:2, xaxs = "i") # 'inner axis' w/o extra space
+> par(c("usr", "xaxp"))
+$usr
+[1] 1.00 2.00 0.96 2.04
+
+$xaxp
+[1] 1 2 5
+
+> 
+> ( nr.prof <-
++ c(prof.pilots = 16, lawyers = 11, farmers = 10, salesmen = 9, physicians = 9,
++   mechanics = 6, policemen = 6, managers = 6, engineers = 5, teachers = 4,
++   housewives = 3, students = 3, armed.forces = 1))
+ prof.pilots      lawyers      farmers     salesmen   physicians    mechanics 
+          16           11           10            9            9            6 
+   policemen     managers    engineers     teachers   housewives     students 
+           6            6            5            4            3            3 
+armed.forces 
+           1 
+> par(las = 3)
+> barplot(rbind(nr.prof)) # R 0.63.2: shows alignment problem
+> par(las = 0)  # reset to default
+> 
+> require(grDevices) # for gray
+> ## 'fg' use:
+> plot(1:12, type = "b", main = "'fg' : axes, ticks and box in gray",
++      fg = gray(0.7), bty = "7" , sub = R.version.string)
+> 
+> ex <- function() {
++    old.par <- par(no.readonly = TRUE) # all par settings which
++                                       # could be changed.
++    on.exit(par(old.par))
++    ## ...
++    ## ... do lots of par() settings and plots
++    ## ...
++    invisible() #-- now,  par(old.par)  will be executed
++ }
+> ex()
+> 
+> ## Line types
+> showLty <- function(ltys, xoff = 0, ...) {
++    stopifnot((n <- length(ltys)) >= 1)
++    op <- par(mar = rep(.5,4)); on.exit(par(op))
++    plot(0:1, 0:1, type = "n", axes = FALSE, ann = FALSE)
++    y <- (n:1)/(n+1)
++    clty <- as.character(ltys)
++    mytext <- function(x, y, txt)
++       text(x, y, txt, adj = c(0, -.3), cex = 0.8, ...)
++    abline(h = y, lty = ltys, ...); mytext(xoff, y, clty)
++    y <- y - 1/(3*(n+1))
++    abline(h = y, lty = ltys, lwd = 2, ...)
++    mytext(1/8+xoff, y, paste(clty," lwd = 2"))
++ }
+> showLty(c("solid", "dashed", "dotted", "dotdash", "longdash", "twodash"))
+> par(new = TRUE)  # the same:
+> showLty(c("solid", "44", "13", "1343", "73", "2262"), xoff = .2, col = 2)
+> showLty(c("11", "22", "33", "44",   "12", "13", "14",   "21", "31"))
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("persp")
+> ### * persp
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: persp
+> ### Title: Perspective Plots
+> ### Aliases: persp persp.default
+> ### Keywords: hplot aplot
+> 
+> ### ** Examples
+> 
+> require(grDevices) # for trans3d
+> ## More examples in  demo(persp) !!
+> ##                   -----------
+> 
+> # (1) The Obligatory Mathematical surface.
+> #     Rotated sinc function.
+> 
+> x <- seq(-10, 10, length= 30)
+> y <- x
+> f <- function(x, y) { r <- sqrt(x^2+y^2); 10 * sin(r)/r }
+> z <- outer(x, y, f)
+> z[is.na(z)] <- 1
+> op <- par(bg = "white")
+> persp(x, y, z, theta = 30, phi = 30, expand = 0.5, col = "lightblue")
+> persp(x, y, z, theta = 30, phi = 30, expand = 0.5, col = "lightblue",
++       ltheta = 120, shade = 0.75, ticktype = "detailed",
++       xlab = "X", ylab = "Y", zlab = "Sinc( r )"
++ ) -> res
+> round(res, 3)
+      [,1]   [,2]   [,3]   [,4]
+[1,] 0.087 -0.025  0.043 -0.043
+[2,] 0.050  0.043 -0.075  0.075
+[3,] 0.000  0.074  0.042 -0.042
+[4,] 0.000 -0.273 -2.890  3.890
+> 
+> # (2) Add to existing persp plot - using trans3d() :
+> 
+> xE <- c(-10,10); xy <- expand.grid(xE, xE)
+> points(trans3d(xy[,1], xy[,2], 6, pmat = res), col = 2, pch = 16)
+> lines (trans3d(x, y = 10, z = 6 + sin(x), pmat = res), col = 3)
+> 
+> phi <- seq(0, 2*pi, len = 201)
+> r1 <- 7.725 # radius of 2nd maximum
+> xr <- r1 * cos(phi)
+> yr <- r1 * sin(phi)
+> lines(trans3d(xr,yr, f(xr,yr), res), col = "pink", lwd = 2)
+> ## (no hidden lines)
+> 
+> # (3) Visualizing a simple DEM model
+> 
+> z <- 2 * volcano        # Exaggerate the relief
+> x <- 10 * (1:nrow(z))   # 10 meter spacing (S to N)
+> y <- 10 * (1:ncol(z))   # 10 meter spacing (E to W)
+> ## Don't draw the grid lines :  border = NA
+> par(bg = "slategray")
+> persp(x, y, z, theta = 135, phi = 30, col = "green3", scale = FALSE,
++       ltheta = -120, shade = 0.75, border = NA, box = FALSE)
+> 
+> # (4) Surface colours corresponding to z-values
+> 
+> par(bg = "white")
+> x <- seq(-1.95, 1.95, length = 30)
+> y <- seq(-1.95, 1.95, length = 35)
+> z <- outer(x, y, function(a, b) a*b^2)
+> nrz <- nrow(z)
+> ncz <- ncol(z)
+> # Create a function interpolating colors in the range of specified colors
+> jet.colors <- colorRampPalette( c("blue", "green") )
+> # Generate the desired number of colors from this palette
+> nbcol <- 100
+> color <- jet.colors(nbcol)
+> # Compute the z-value at the facet centres
+> zfacet <- z[-1, -1] + z[-1, -ncz] + z[-nrz, -1] + z[-nrz, -ncz]
+> # Recode facet z-values into color indices
+> facetcol <- cut(zfacet, nbcol)
+> persp(x, y, z, col = color[facetcol], phi = 30, theta = -30)
+> 
+> par(op)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("pie")
+> ### * pie
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: pie
+> ### Title: Pie Charts
+> ### Aliases: pie
+> ### Keywords: hplot
+> 
+> ### ** Examples
+> 
+> require(grDevices)
+> pie(rep(1, 24), col = rainbow(24), radius = 0.9)
+> 
+> pie.sales <- c(0.12, 0.3, 0.26, 0.16, 0.04, 0.12)
+> names(pie.sales) <- c("Blueberry", "Cherry",
++     "Apple", "Boston Cream", "Other", "Vanilla Cream")
+> pie(pie.sales) # default colours
+> pie(pie.sales, col = c("purple", "violetred1", "green3",
++                        "cornsilk", "cyan", "white"))
+> pie(pie.sales, col = gray(seq(0.4, 1.0, length = 6)))
+> pie(pie.sales, density = 10, angle = 15 + 10 * 1:6)
+> pie(pie.sales, clockwise = TRUE, main = "pie(*, clockwise = TRUE)")
+> segments(0, 0, 0, 1, col = "red", lwd = 2)
+> text(0, 1, "init.angle = 90", col = "red")
+> 
+> n <- 200
+> pie(rep(1, n), labels = "", col = rainbow(n), border = NA,
++     main = "pie(*, labels=\"\", col=rainbow(n), border=NA,..")
+> 
+> ## Another case showing pie() is rather fun than science:
+> ## (original by FinalBackwardsGlance on http://imgur.com/gallery/wWrpU4X)
+> pie(c(Sky = 78, "Sunny side of pyramid" = 17, "Shady side of pyramid" = 5),
++     init.angle = 315, col = c("deepskyblue", "yellow", "yellow3"), border = FALSE)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("plot")
+> ### * plot
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: plot
+> ### Title: Generic X-Y Plotting
+> ### Aliases: plot
+> ### Keywords: hplot
+> 
+> ### ** Examples
+> 
+> require(stats) # for lowess, rpois, rnorm
+> plot(cars)
+> lines(lowess(cars))
+> 
+> plot(sin, -pi, 2*pi) # see ?plot.function
+> 
+> ## Discrete Distribution Plot:
+> plot(table(rpois(100, 5)), type = "h", col = "red", lwd = 10,
++      main = "rpois(100, lambda = 5)")
+> 
+> ## Simple quantiles/ECDF, see ecdf() {library(stats)} for a better one:
+> plot(x <- sort(rnorm(47)), type = "s", main = "plot(x, type = \"s\")")
+> points(x, cex = .5, col = "dark red")
+> 
+> 
+> 
+> cleanEx()
+> nameEx("plot.dataframe")
+> ### * plot.dataframe
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: plot.data.frame
+> ### Title: Plot Method for Data Frames
+> ### Aliases: plot.data.frame
+> ### Keywords: hplot methods
+> 
+> ### ** Examples
+> 
+> plot(OrchardSprays[1], method = "jitter")
+> plot(OrchardSprays[c(4,1)])
+> plot(OrchardSprays)
+> 
+> plot(iris)
+> plot(iris[5:4])
+> plot(women)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("plot.default")
+> ### * plot.default
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: plot.default
+> ### Title: The Default Scatterplot Function
+> ### Aliases: plot.default
+> ### Keywords: hplot
+> 
+> ### ** Examples
+> 
+> Speed <- cars$speed
+> Distance <- cars$dist
+> plot(Speed, Distance, panel.first = grid(8, 8),
++      pch = 0, cex = 1.2, col = "blue")
+> plot(Speed, Distance,
++      panel.first = lines(stats::lowess(Speed, Distance), lty = "dashed"),
++      pch = 0, cex = 1.2, col = "blue")
+> 
+> ## Show the different plot types
+> x <- 0:12
+> y <- sin(pi/5 * x)
+> op <- par(mfrow = c(3,3), mar = .1+ c(2,2,3,1))
+> for (tp in c("p","l","b",  "c","o","h",  "s","S","n")) {
++    plot(y ~ x, type = tp, main = paste0("plot(*, type = \"", tp, "\")"))
++    if(tp == "S") {
++       lines(x, y, type = "s", col = "red", lty = 2)
++       mtext("lines(*, type = \"s\", ...)", col = "red", cex = 0.8)
++    }
++ }
+> par(op)
+> 
+> ##--- Log-Log Plot  with  custom axes
+> lx <- seq(1, 5, length = 41)
+> yl <- expression(e^{-frac(1,2) * {log[10](x)}^2})
+> y <- exp(-.5*lx^2)
+> op <- par(mfrow = c(2,1), mar = par("mar")+c(0,1,0,0))
+> plot(10^lx, y, log = "xy", type = "l", col = "purple",
++      main = "Log-Log plot", ylab = yl, xlab = "x")
+> plot(10^lx, y, log = "xy", type = "o", pch = ".", col = "forestgreen",
++      main = "Log-Log plot with custom axes", ylab = yl, xlab = "x",
++      axes = FALSE, frame.plot = TRUE)
+> my.at <- 10^(1:5)
+> axis(1, at = my.at, labels = formatC(my.at, format = "fg"))
+> at.y <- 10^(-5:-1)
+> axis(2, at = at.y, labels = formatC(at.y, format = "fg"), col.axis = "red")
+> par(op)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("plot.design")
+> ### * plot.design
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: plot.design
+> ### Title: Plot Univariate Effects of a Design or Model
+> ### Aliases: plot.design
+> ### Keywords: hplot
+> 
+> ### ** Examples
+> 
+> require(stats)
+> plot.design(warpbreaks)  # automatic for data frame with one numeric var.
+> 
+> Form <- breaks ~ wool + tension
+> summary(fm1 <- aov(Form, data = warpbreaks))
+            Df Sum Sq Mean Sq F value  Pr(>F)   
+wool         1    451   450.7   3.339 0.07361 . 
+tension      2   2034  1017.1   7.537 0.00138 **
+Residuals   50   6748   135.0                   
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> plot.design(       Form, data = warpbreaks, col = 2)  # same as above
+> 
+> ## More than one y :
+> utils::str(esoph)
+'data.frame':	88 obs. of  5 variables:
+ $ agegp    : Ord.factor w/ 6 levels "25-34"<"35-44"<..: 1 1 1 1 1 1 1 1 1 1 ...
+ $ alcgp    : Ord.factor w/ 4 levels "0-39g/day"<"40-79"<..: 1 1 1 1 2 2 2 2 3 3 ...
+ $ tobgp    : Ord.factor w/ 4 levels "0-9g/day"<"10-19"<..: 1 2 3 4 1 2 3 4 1 2 ...
+ $ ncases   : num  0 0 0 0 0 0 0 0 0 0 ...
+ $ ncontrols: num  40 10 6 5 27 7 4 7 2 1 ...
+> plot.design(esoph) ## two plots; if interactive you are "ask"ed
+> 
+> ## or rather, compare mean and median:
+> op <- par(mfcol = 1:2)
+> plot.design(ncases/ncontrols ~ ., data = esoph, ylim = c(0, 0.8))
+> plot.design(ncases/ncontrols ~ ., data = esoph, ylim = c(0, 0.8),
++             fun = median)
+> par(op)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("plot.factor")
+> ### * plot.factor
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: plot.factor
+> ### Title: Plotting Factor Variables
+> ### Aliases: plot.factor
+> ### Keywords: hplot
+> 
+> ### ** Examples
+> 
+> require(grDevices)
+> plot(weight ~ group, data = PlantGrowth)           # numeric vector ~ factor
+> plot(cut(weight, 2) ~ group, data = PlantGrowth)   # factor ~ factor
+> ## passing "..." to spineplot() eventually:
+> plot(cut(weight, 3) ~ group, data = PlantGrowth,
++      col = hcl(c(0, 120, 240), 50, 70))
+> 
+> plot(PlantGrowth$group, axes = FALSE, main = "no axes")  # extremely silly
+> 
+> 
+> 
+> cleanEx()
+> nameEx("plot.formula")
+> ### * plot.formula
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: plot.formula
+> ### Title: Formula Notation for Scatterplots
+> ### Aliases: plot.formula lines.formula points.formula text.formula
+> ### Keywords: hplot aplot
+> 
+> ### ** Examples
+> 
+> op <- par(mfrow = c(2,1))
+> plot(Ozone ~ Wind, data = airquality, pch = as.character(Month))
+> plot(Ozone ~ Wind, data = airquality, pch = as.character(Month),
++      subset = Month != 7)
+> par(op)
+> 
+> ## text.formula() can be very natural:
+> wb <- within(warpbreaks, {
++     time <- seq_along(breaks); W.T <- wool:tension })
+> plot(breaks ~ time, data = wb, type = "b")
+> text(breaks ~ time, data = wb, label = W.T, col = 1+as.integer(wool))
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("plot.raster")
+> ### * plot.raster
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: plot.raster
+> ### Title: Plotting Raster Images
+> ### Aliases: plot.raster
+> ### Keywords: hplot
+> 
+> ### ** Examples
+> 
+> require(grDevices)
+> r <- as.raster(c(0.5, 1, 0.5))
+> plot(r)
+> # additional arguments to rasterImage()
+> plot(r, interpolate=FALSE)
+> # distort
+> plot(r, asp=NA)
+> # fill page
+> op <- par(mar=rep(0, 4))
+> plot(r, asp=NA)
+> par(op)
+> # normal annotations work
+> plot(r, asp=NA)
+> box()
+> title(main="This is my raster")
+> # add to existing plot
+> plot(1)
+> plot(r, add=TRUE)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("plot.table")
+> ### * plot.table
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: plot.table
+> ### Title: Plot Methods for 'table' Objects
+> ### Aliases: plot.table lines.table points.table
+> ### Keywords: hplot category
+> 
+> ### ** Examples
+> 
+> ## 1-d tables
+> (Poiss.tab <- table(N = stats::rpois(200, lambda = 5)))
+N
+ 1  2  3  4  5  6  7  8  9 10 11 
+ 4 14 25 38 40 33 21 16  4  2  3 
+> plot(Poiss.tab, main = "plot(table(rpois(200, lambda = 5)))")
+> 
+> plot(table(state.division))
+> 
+> ## 4-D :
+> plot(Titanic, main ="plot(Titanic, main= *)")
+> 
+> 
+> 
+> 
+> cleanEx()
+> nameEx("plot.window")
+> ### * plot.window
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: plot.window
+> ### Title: Set up World Coordinates for Graphics Window
+> ### Aliases: plot.window xlim ylim asp
+> ### Keywords: aplot
+> 
+> ### ** Examples
+> 
+> ##--- An example for the use of 'asp' :
+> require(stats)  # normally loaded
+> loc <- cmdscale(eurodist)
+> rx <- range(x <- loc[,1])
+> ry <- range(y <- -loc[,2])
+> plot(x, y, type = "n", asp = 1, xlab = "", ylab = "")
+> abline(h = pretty(rx, 10), v = pretty(ry, 10), col = "lightgray")
+> text(x, y, labels(eurodist), cex = 0.8)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("plot.xy")
+> ### * plot.xy
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: plot.xy
+> ### Title: Basic Internal Plot Function
+> ### Aliases: plot.xy
+> ### Keywords: aplot
+> 
+> ### ** Examples
+> 
+> points.default # to see how it calls "plot.xy(xy.coords(x, y), ...)"
+function (x, y = NULL, type = "p", ...) 
+plot.xy(xy.coords(x, y), type = type, ...)
+<bytecode: 0x1aafa88>
+<environment: namespace:graphics>
+> 
+> 
+> 
+> cleanEx()
+> nameEx("plothistogram")
+> ### * plothistogram
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: plot.histogram
+> ### Title: Plot Histograms
+> ### Aliases: plot.histogram lines.histogram
+> ### Keywords: hplot iplot
+> 
+> ### ** Examples
+> 
+> (wwt <- hist(women$weight, nclass = 7, plot = FALSE))
+$breaks
+ [1] 115 120 125 130 135 140 145 150 155 160 165
+
+$counts
+ [1] 3 1 2 2 1 1 2 1 1 1
+
+$density
+ [1] 0.04000000 0.01333333 0.02666667 0.02666667 0.01333333 0.01333333
+ [7] 0.02666667 0.01333333 0.01333333 0.01333333
+
+$mids
+ [1] 117.5 122.5 127.5 132.5 137.5 142.5 147.5 152.5 157.5 162.5
+
+$xname
+[1] "women$weight"
+
+$equidist
+[1] TRUE
+
+attr(,"class")
+[1] "histogram"
+> plot(wwt, labels = TRUE) # default main & xlab using wwt$xname
+> plot(wwt, border = "dark blue", col = "light blue",
++      main = "Histogram of 15 women's weights", xlab = "weight [pounds]")
+> 
+> ## Fake "lines" example, using non-default labels:
+> w2 <- wwt; w2$counts <- w2$counts - 1
+> lines(w2, col = "Midnight Blue", labels = ifelse(w2$counts, "> 1", "1"))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("points")
+> ### * points
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: points
+> ### Title: Add Points to a Plot
+> ### Aliases: points points.default pch
+> ### Keywords: aplot
+> 
+> ### ** Examples
+> 
+> require(stats) # for rnorm
+> plot(-4:4, -4:4, type = "n")  # setting up coord. system
+> points(rnorm(200), rnorm(200), col = "red")
+> points(rnorm(100)/2, rnorm(100)/2, col = "blue", cex = 1.5)
+> 
+> op <- par(bg = "light blue")
+> x <- seq(0, 2*pi, len = 51)
+> ## something "between type='b' and type='o'":
+> plot(x, sin(x), type = "o", pch = 21, bg = par("bg"), col = "blue", cex = .6,
++  main = 'plot(..., type="o", pch=21, bg=par("bg"))')
+> par(op)
+> 
+> ## Not run: 
+> ##D ## The figure was produced by calls like
+> ##D png("pch.png", height = 0.7, width = 7, res = 100, units = "in")
+> ##D par(mar = rep(0,4))
+> ##D plot(c(-1, 26), 0:1, type = "n", axes = FALSE)
+> ##D text(0:25, 0.6, 0:25, cex = 0.5)
+> ##D points(0:25, rep(0.3, 26), pch = 0:25, bg = "grey")
+> ## End(Not run)
+> 
+> ##-------- Showing all the extra & some char graphics symbols ---------
+> pchShow <-
++   function(extras = c("*",".", "o","O","0","+","-","|","%","#"),
++            cex = 3, ## good for both .Device=="postscript" and "x11"
++            col = "red3", bg = "gold", coltext = "brown", cextext = 1.2,
++            main = paste("plot symbols :  points (...  pch = *, cex =",
++                         cex,")"))
++   {
++     nex <- length(extras)
++     np  <- 26 + nex
++     ipch <- 0:(np-1)
++     k <- floor(sqrt(np))
++     dd <- c(-1,1)/2
++     rx <- dd + range(ix <- ipch %/% k)
++     ry <- dd + range(iy <- 3 + (k-1)- ipch %% k)
++     pch <- as.list(ipch) # list with integers & strings
++     if(nex > 0) pch[26+ 1:nex] <- as.list(extras)
++     plot(rx, ry, type = "n", axes  =  FALSE, xlab = "", ylab = "", main = main)
++     abline(v = ix, h = iy, col = "lightgray", lty = "dotted")
++     for(i in 1:np) {
++       pc <- pch[[i]]
++       ## 'col' symbols with a 'bg'-colored interior (where available) :
++       points(ix[i], iy[i], pch = pc, col = col, bg = bg, cex = cex)
++       if(cextext > 0)
++           text(ix[i] - 0.3, iy[i], pc, col = coltext, cex = cextext)
++     }
++   }
+> 
+> pchShow()
+> pchShow(c("o","O","0"), cex = 2.5)
+> pchShow(NULL, cex = 4, cextext = 0, main = NULL)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("polygon")
+> ### * polygon
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: polygon
+> ### Title: Polygon Drawing
+> ### Aliases: polygon
+> ### Keywords: aplot
+> 
+> ### ** Examples
+> 
+> x <- c(1:9, 8:1)
+> y <- c(1, 2*(5:3), 2, -1, 17, 9, 8, 2:9)
+> op <- par(mfcol = c(3, 1))
+> for(xpd in c(FALSE, TRUE, NA)) {
++   plot(1:10, main = paste("xpd =", xpd))
++   box("figure", col = "pink", lwd = 3)
++   polygon(x, y, xpd = xpd, col = "orange", lty = 2, lwd = 2, border = "red")
++ }
+> par(op)
+> 
+> n <- 100
+> xx <- c(0:n, n:0)
+> yy <- c(c(0, cumsum(stats::rnorm(n))), rev(c(0, cumsum(stats::rnorm(n)))))
+> plot   (xx, yy, type = "n", xlab = "Time", ylab = "Distance")
+> polygon(xx, yy, col = "gray", border = "red")
+> title("Distance Between Brownian Motions")
+> 
+> # Multiple polygons from NA values
+> # and recycling of col, border, and lty
+> op <- par(mfrow = c(2, 1))
+> plot(c(1, 9), 1:2, type = "n")
+> polygon(1:9, c(2,1,2,1,1,2,1,2,1),
++         col = c("red", "blue"),
++         border = c("green", "yellow"),
++         lwd = 3, lty = c("dashed", "solid"))
+> plot(c(1, 9), 1:2, type = "n")
+> polygon(1:9, c(2,1,2,1,NA,2,1,2,1),
++         col = c("red", "blue"),
++         border = c("green", "yellow"),
++         lwd = 3, lty = c("dashed", "solid"))
+> par(op)
+> 
+> # Line-shaded polygons
+> plot(c(1, 9), 1:2, type = "n")
+> polygon(1:9, c(2,1,2,1,NA,2,1,2,1),
++         density = c(10, 20), angle = c(-45, 45))
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("polypath")
+> ### * polypath
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: polypath
+> ### Title: Path Drawing
+> ### Aliases: polypath
+> ### Keywords: aplot
+> 
+> ### ** Examples
+> 
+> plotPath <- function(x, y, col = "grey", rule = "winding") {
++     plot.new()
++     plot.window(range(x, na.rm = TRUE), range(y, na.rm = TRUE))
++     polypath(x, y, col = col, rule = rule)
++     if (!is.na(col))
++         mtext(paste("Rule:", rule), side = 1, line = 0)
++ }
+> 
+> plotRules <- function(x, y, title) {
++     plotPath(x, y)
++     plotPath(x, y, rule = "evenodd")
++     mtext(title, side = 3, line = 0)
++     plotPath(x, y, col = NA)
++ }
+> 
+> op <- par(mfrow = c(5, 3), mar = c(2, 1, 1, 1))
+> 
+> plotRules(c(.1, .1, .9, .9, NA, .2, .2, .8, .8),
++           c(.1, .9, .9, .1, NA, .2, .8, .8, .2),
++           "Nested rectangles, both clockwise")
+> plotRules(c(.1, .1, .9, .9, NA, .2, .8, .8, .2),
++           c(.1, .9, .9, .1, NA, .2, .2, .8, .8),
++           "Nested rectangles, outer clockwise, inner anti-clockwise")
+> plotRules(c(.1, .1, .4, .4, NA, .6, .9, .9, .6),
++           c(.1, .4, .4, .1, NA, .6, .6, .9, .9),
++           "Disjoint rectangles")
+> plotRules(c(.1, .1, .6, .6, NA, .4, .4, .9, .9),
++           c(.1, .6, .6, .1, NA, .4, .9, .9, .4),
++           "Overlapping rectangles, both clockwise")
+> plotRules(c(.1, .1, .6, .6, NA, .4, .9, .9, .4),
++           c(.1, .6, .6, .1, NA, .4, .4, .9, .9),
++           "Overlapping rectangles, one clockwise, other anti-clockwise")
+> 
+> par(op)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("rasterImage")
+> ### * rasterImage
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: rasterImage
+> ### Title: Draw One or More Raster Images
+> ### Aliases: rasterImage
+> ### Keywords: aplot
+> 
+> ### ** Examples
+> 
+> require(grDevices)
+> ## set up the plot region:
+> op <- par(bg = "thistle")
+> plot(c(100, 250), c(300, 450), type = "n", xlab = "", ylab = "")
+> image <- as.raster(matrix(0:1, ncol = 5, nrow = 3))
+Warning in matrix(0:1, ncol = 5, nrow = 3) :
+  data length [2] is not a sub-multiple or multiple of the number of rows [3]
+> rasterImage(image, 100, 300, 150, 350, interpolate = FALSE)
+> rasterImage(image, 100, 400, 150, 450)
+> rasterImage(image, 200, 300, 200 + xinch(.5), 300 + yinch(.3),
++             interpolate = FALSE)
+> rasterImage(image, 200, 400, 250, 450, angle = 15, interpolate = FALSE)
+> par(op)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("rect")
+> ### * rect
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: rect
+> ### Title: Draw One or More Rectangles
+> ### Aliases: rect
+> ### Keywords: aplot
+> 
+> ### ** Examples
+> 
+> require(grDevices)
+> ## set up the plot region:
+> op <- par(bg = "thistle")
+> plot(c(100, 250), c(300, 450), type = "n", xlab = "", ylab = "",
++      main = "2 x 11 rectangles; 'rect(100+i,300+i,  150+i,380+i)'")
+> i <- 4*(0:10)
+> ## draw rectangles with bottom left (100, 300)+i
+> ## and top right (150, 380)+i
+> rect(100+i, 300+i, 150+i, 380+i, col = rainbow(11, start = 0.7, end = 0.1))
+> rect(240-i, 320+i, 250-i, 410+i, col = heat.colors(11), lwd = i/5)
+> ## Background alternating  ( transparent / "bg" ) :
+> j <- 10*(0:5)
+> rect(125+j, 360+j,   141+j, 405+j/2, col = c(NA,0),
++      border = "gold", lwd = 2)
+> rect(125+j, 296+j/2, 141+j, 331+j/5, col = c(NA,"midnightblue"))
+> mtext("+  2 x 6 rect(*, col = c(NA,0)) and  col = c(NA,\"m..blue\"))")
+> 
+> ## an example showing colouring and shading
+> plot(c(100, 200), c(300, 450), type= "n", xlab = "", ylab = "")
+> rect(100, 300, 125, 350) # transparent
+> rect(100, 400, 125, 450, col = "green", border = "blue") # coloured
+> rect(115, 375, 150, 425, col = par("bg"), border = "transparent")
+> rect(150, 300, 175, 350, density = 10, border = "red")
+> rect(150, 400, 175, 450, density = 30, col = "blue",
++      angle = -30, border = "transparent")
+> 
+> legend(180, 450, legend = 1:4, fill = c(NA, "green", par("fg"), "blue"),
++        density = c(NA, NA, 10, 30), angle = c(NA, NA, 30, -30))
+> 
+> par(op)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("rug")
+> ### * rug
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: rug
+> ### Title: Add a Rug to a Plot
+> ### Aliases: rug
+> ### Keywords: aplot
+> 
+> ### ** Examples
+> 
+> require(stats)  # both 'density' and its default method
+> with(faithful, {
++     plot(density(eruptions, bw = 0.15))
++     rug(eruptions)
++     rug(jitter(eruptions, amount = 0.01), side = 3, col = "light blue")
++ })
+> 
+> 
+> 
+> cleanEx()
+> nameEx("screen")
+> ### * screen
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: screen
+> ### Title: Creating and Controlling Multiple Screens on a Single Device
+> ### Aliases: screen split.screen erase.screen close.screen
+> ### Keywords: aplot dplot device
+> 
+> ### ** Examples
+> 
+> if (interactive()) {
++ par(bg = "white")           # default is likely to be transparent
++ split.screen(c(2, 1))       # split display into two screens
++ split.screen(c(1, 3), screen = 2) # now split the bottom half into 3
++ screen(1) # prepare screen 1 for output
++ plot(10:1)
++ screen(4) # prepare screen 4 for output
++ plot(10:1)
++ close.screen(all = TRUE)    # exit split-screen mode
++ 
++ split.screen(c(2, 1))       # split display into two screens
++ split.screen(c(1, 2), 2)    # split bottom half in two
++ plot(1:10)                  # screen 3 is active, draw plot
++ erase.screen()              # forgot label, erase and redraw
++ plot(1:10, ylab = "ylab 3")
++ screen(1)                   # prepare screen 1 for output
++ plot(1:10)
++ screen(4)                   # prepare screen 4 for output
++ plot(1:10, ylab = "ylab 4")
++ screen(1, FALSE)            # return to screen 1, but do not clear
++ plot(10:1, axes = FALSE, lty = 2, ylab = "")  # overlay second plot
++ axis(4)                     # add tic marks to right-hand axis
++ title("Plot 1")
++ close.screen(all = TRUE)    # exit split-screen mode
++ }
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("segments")
+> ### * segments
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: segments
+> ### Title: Add Line Segments to a Plot
+> ### Aliases: segments
+> ### Keywords: aplot
+> 
+> ### ** Examples
+> 
+> x <- stats::runif(12); y <- stats::rnorm(12)
+> i <- order(x, y); x <- x[i]; y <- y[i]
+> plot(x, y, main = "arrows(.) and segments(.)")
+> ## draw arrows from point to point :
+> s <- seq(length(x)-1)  # one shorter than data
+> arrows(x[s], y[s], x[s+1], y[s+1], col= 1:3)
+> s <- s[-length(s)]
+> segments(x[s], y[s], x[s+2], y[s+2], col= 'pink')
+> 
+> 
+> 
+> cleanEx()
+> nameEx("smoothScatter")
+> ### * smoothScatter
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: smoothScatter
+> ### Title: Scatterplots with Smoothed Densities Color Representation
+> ### Aliases: smoothScatter
+> ### Keywords: hplot
+> 
+> ### ** Examples
+> 
+> 
+> cleanEx()
+> nameEx("spineplot")
+> ### * spineplot
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: spineplot
+> ### Title: Spine Plots and Spinograms
+> ### Aliases: spineplot spineplot.default spineplot.formula
+> ### Keywords: hplot
+> 
+> ### ** Examples
+> 
+> ## treatment and improvement of patients with rheumatoid arthritis
+> treatment <- factor(rep(c(1, 2), c(43, 41)), levels = c(1, 2),
++                     labels = c("placebo", "treated"))
+> improved <- factor(rep(c(1, 2, 3, 1, 2, 3), c(29, 7, 7, 13, 7, 21)),
++                    levels = c(1, 2, 3),
++                    labels = c("none", "some", "marked"))
+> 
+> ## (dependence on a categorical variable)
+> (spineplot(improved ~ treatment))
+         improved
+treatment none some marked
+  placebo   29    7      7
+  treated   13    7     21
+> 
+> ## applications and admissions by department at UC Berkeley
+> ## (two-way tables)
+> (spineplot(margin.table(UCBAdmissions, c(3, 2)),
++            main = "Applications at UCB"))
+    Gender
+Dept Male Female
+   A  825    108
+   B  560     25
+   C  325    593
+   D  417    375
+   E  191    393
+   F  373    341
+> (spineplot(margin.table(UCBAdmissions, c(3, 1)),
++            main = "Admissions at UCB"))
+    Admit
+Dept Admitted Rejected
+   A      601      332
+   B      370      215
+   C      322      596
+   D      269      523
+   E      147      437
+   F       46      668
+> 
+> ## NASA space shuttle o-ring failures
+> fail <- factor(c(2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1,
++                  1, 1, 1, 2, 1, 1, 1, 1, 1),
++                levels = c(1, 2), labels = c("no", "yes"))
+> temperature <- c(53, 57, 58, 63, 66, 67, 67, 67, 68, 69, 70, 70,
++                  70, 70, 72, 73, 75, 75, 76, 76, 78, 79, 81)
+> 
+> ## (dependence on a numerical variable)
+> (spineplot(fail ~ temperature))
+           fail
+temperature no yes
+    [50,55]  0   1
+    (55,60]  0   2
+    (60,65]  0   1
+    (65,70]  8   2
+    (70,75]  3   1
+    (75,80]  4   0
+    (80,85]  1   0
+> (spineplot(fail ~ temperature, breaks = 3))
+           fail
+temperature no yes
+    [50,60]  0   3
+    (60,70]  8   3
+    (70,80]  7   1
+    (80,90]  1   0
+> (spineplot(fail ~ temperature, breaks = quantile(temperature)))
+           fail
+temperature no yes
+    [53,67]  4   4
+    (67,70]  4   2
+    (70,75]  3   1
+    (75,81]  5   0
+> 
+> ## highlighting for failures
+> spineplot(fail ~ temperature, ylevels = 2:1)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("stars")
+> ### * stars
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: stars
+> ### Title: Star (Spider/Radar) Plots and Segment Diagrams
+> ### Aliases: stars
+> ### Keywords: hplot multivariate
+> 
+> ### ** Examples
+> 
+> require(grDevices)
+> stars(mtcars[, 1:7], key.loc = c(14, 2),
++       main = "Motor Trend Cars : stars(*, full = F)", full = FALSE)
+> stars(mtcars[, 1:7], key.loc = c(14, 1.5),
++       main = "Motor Trend Cars : full stars()", flip.labels = FALSE)
+> 
+> ## 'Spider' or 'Radar' plot:
+> stars(mtcars[, 1:7], locations = c(0, 0), radius = FALSE,
++       key.loc = c(0, 0), main = "Motor Trend Cars", lty = 2)
+> 
+> ## Segment Diagrams:
+> palette(rainbow(12, s = 0.6, v = 0.75))
+> stars(mtcars[, 1:7], len = 0.8, key.loc = c(12, 1.5),
++       main = "Motor Trend Cars", draw.segments = TRUE)
+> stars(mtcars[, 1:7], len = 0.6, key.loc = c(1.5, 0),
++       main = "Motor Trend Cars", draw.segments = TRUE,
++       frame.plot = TRUE, nrow = 4, cex = .7)
+> 
+> ## scale linearly (not affinely) to [0, 1]
+> USJudge <- apply(USJudgeRatings, 2, function(x) x/max(x))
+> Jnam <- row.names(USJudgeRatings)
+> Snam <- abbreviate(substring(Jnam, 1, regexpr("[,.]",Jnam) - 1), 7)
+> stars(USJudge, labels = Jnam, scale = FALSE,
++       key.loc = c(13, 1.5), main = "Judge not ...", len = 0.8)
+> stars(USJudge, labels = Snam, scale = FALSE,
++       key.loc = c(13, 1.5), radius = FALSE)
+> 
+> loc <- stars(USJudge, labels = NULL, scale = FALSE,
++              radius = FALSE, frame.plot = TRUE,
++              key.loc = c(13, 1.5), main = "Judge not ...", len = 1.2)
+> text(loc, Snam, col = "blue", cex = 0.8, xpd = TRUE)
+> 
+> ## 'Segments':
+> stars(USJudge, draw.segments = TRUE, scale = FALSE, key.loc = c(13,1.5))
+> 
+> ## 'Spider':
+> stars(USJudgeRatings, locations = c(0, 0), scale = FALSE, radius  =  FALSE,
++       col.stars = 1:10, key.loc = c(0, 0), main = "US Judges rated")
+> ## Same as above, but with colored lines instead of filled polygons.
+> stars(USJudgeRatings, locations = c(0, 0), scale = FALSE, radius  =  FALSE,
++       col.lines = 1:10, key.loc = c(0, 0), main = "US Judges rated")
+> ## 'Radar-Segments'
+> stars(USJudgeRatings[1:10,], locations = 0:1, scale = FALSE,
++       draw.segments = TRUE, col.segments = 0, col.stars = 1:10, key.loc =  0:1,
++       main = "US Judges 1-10 ")
+> palette("default")
+> stars(cbind(1:16, 10*(16:1)), draw.segments = TRUE,
++       main = "A Joke -- do *not* use symbols on 2D data!")
+> 
+> 
+> 
+> cleanEx()
+> nameEx("stem")
+> ### * stem
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: stem
+> ### Title: Stem-and-Leaf Plots
+> ### Aliases: stem
+> ### Keywords: univar distribution
+> 
+> ### ** Examples
+> 
+> stem(islands)
+
+  The decimal point is 3 digit(s) to the right of the |
+
+   0 | 00000000000000000000000000000111111222338
+   2 | 07
+   4 | 5
+   6 | 8
+   8 | 4
+  10 | 5
+  12 | 
+  14 | 
+  16 | 0
+
+> stem(log10(islands))
+
+  The decimal point is at the |
+
+  1 | 1111112222233444
+  1 | 5555556666667899999
+  2 | 3344
+  2 | 59
+  3 | 
+  3 | 5678
+  4 | 012
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("stripchart")
+> ### * stripchart
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: stripchart
+> ### Title: 1-D Scatter Plots
+> ### Aliases: stripchart stripchart.default stripchart.formula
+> ### Keywords: hplot
+> 
+> ### ** Examples
+> 
+> x <- stats::rnorm(50)
+> xr <- round(x, 1)
+> stripchart(x) ; m <- mean(par("usr")[1:2])
+> text(m, 1.04, "stripchart(x, \"overplot\")")
+> stripchart(xr, method = "stack", add = TRUE, at = 1.2)
+> text(m, 1.35, "stripchart(round(x,1), \"stack\")")
+> stripchart(xr, method = "jitter", add = TRUE, at = 0.7)
+> text(m, 0.85, "stripchart(round(x,1), \"jitter\")")
+> 
+> stripchart(decrease ~ treatment,
++     main = "stripchart(OrchardSprays)",
++     vertical = TRUE, log = "y", data = OrchardSprays)
+> 
+> stripchart(decrease ~ treatment, at = c(1:8)^2,
++     main = "stripchart(OrchardSprays)",
++     vertical = TRUE, log = "y", data = OrchardSprays)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("strwidth")
+> ### * strwidth
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: strwidth
+> ### Title: Plotting Dimensions of Character Strings and Math Expressions
+> ### Aliases: strwidth strheight
+> ### Keywords: dplot character
+> 
+> ### ** Examples
+> 
+> str.ex <- c("W","w","I",".","WwI.")
+> op <- par(pty = "s"); plot(1:100, 1:100, type = "n")
+> sw <- strwidth(str.ex); sw
+[1] 3.2600930 2.4934186 0.9600698 0.9600698 7.6736512
+> all.equal(sum(sw[1:4]), sw[5])
+[1] TRUE
+> #- since the last string contains the others
+> 
+> sw.i <- strwidth(str.ex, "inches"); 25.4 * sw.i  # width in [mm]
+[1] 3.996267 3.056467 1.176867 1.176867 9.406467
+> unique(sw / sw.i)
+[1] 20.72093 20.72093
+> # constant factor: 1 value
+> mean(sw.i / strwidth(str.ex, "fig")) / par('fin')[1]  # = 1: are the same
+[1] 1
+> 
+> ## See how letters fall in classes
+> ##  -- depending on graphics device and font!
+> all.lett <- c(letters, LETTERS)
+> shL <- strheight(all.lett, units = "inches") * 72  # 'big points'
+> table(shL)  # all have same heights ...
+shL
+8.616 
+   52 
+> mean(shL)/par("cin")[2] # around 0.6
+[1] 43.08
+> 
+> (swL <- strwidth(all.lett, units = "inches") * 72)  # 'big points'
+ [1]  6.672  6.672  6.000  6.672  6.672  3.336  6.672  6.672  2.664  2.664
+[11]  6.000  2.664  9.996  6.672  6.672  6.672  6.672  3.996  6.000  3.336
+[21]  6.672  6.000  8.664  6.000  6.000  6.000  8.004  8.004  8.664  8.664
+[31]  8.004  7.332  9.336  8.664  3.336  6.000  8.004  6.672  9.996  8.664
+[41]  9.336  8.004  9.336  8.664  8.004  7.332  8.664  8.004 11.328  8.004
+[51]  8.004  7.332
+> split(all.lett, factor(round(swL, 2)))
+$`2.66`
+[1] "i" "j" "l"
+
+$`3.34`
+[1] "f" "t" "I"
+
+$`4`
+[1] "r"
+
+$`6`
+[1] "c" "k" "s" "v" "x" "y" "z" "J"
+
+$`6.67`
+ [1] "a" "b" "d" "e" "g" "h" "n" "o" "p" "q" "u" "L"
+
+$`7.33`
+[1] "F" "T" "Z"
+
+$`8`
+[1] "A" "B" "E" "K" "P" "S" "V" "X" "Y"
+
+$`8.66`
+[1] "w" "C" "D" "H" "N" "R" "U"
+
+$`9.34`
+[1] "G" "O" "Q"
+
+$`10`
+[1] "m" "M"
+
+$`11.33`
+[1] "W"
+
+> 
+> sumex <- expression(sum(x[i], i=1,n), e^{i * pi} == -1)
+> strwidth(sumex)
+[1]  5.795241 11.484959
+> strheight(sumex)
+[1] 8.057449 3.420738
+> 
+> par(op)  #- reset to previous setting
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("sunflowerplot")
+> ### * sunflowerplot
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: sunflowerplot
+> ### Title: Produce a Sunflower Scatter Plot
+> ### Aliases: sunflowerplot sunflowerplot.default sunflowerplot.formula
+> ### Keywords: hplot smooth nonparametric
+> 
+> ### ** Examples
+> 
+> require(stats) # for rnorm
+> require(grDevices)
+> 
+> ## 'number' is computed automatically:
+> sunflowerplot(iris[, 3:4])
+> ## Imitating Chambers et al, p.109, closely:
+> sunflowerplot(iris[, 3:4], cex = .2, cex.fact = 1, size = .035, seg.lwd = .8)
+> ## or
+> sunflowerplot(Petal.Width ~ Petal.Length, data = iris,
++               cex = .2, cex.fact = 1, size = .035, seg.lwd = .8)
+> 
+> 
+> sunflowerplot(x = sort(2*round(rnorm(100))), y = round(rnorm(100), 0),
++               main = "Sunflower Plot of Rounded N(0,1)")
+> ## Similarly using a "xyTable" argument:
+> xyT <- xyTable(x = sort(2*round(rnorm(100))), y = round(rnorm(100), 0),
++                digits = 3)
+> utils::str(xyT, vec.len = 20)
+List of 3
+ $ x     : num [1:25] -6 -4 -4 -4 -4 -2 -2 -2 -2 -2 0 0 0 0 0 0 2 2 2 2 2 4 4 4 4
+ $ y     : num [1:25] 0 -2 0 1 2 -2 -1 0 1 2 -3 -2 -1 0 1 2 -2 -1 0 1 3 -1 0 1 2
+ $ number: int [1:25] 1 1 1 1 3 1 4 8 4 1 1 3 5 17 12 2 1 8 12 6 1 1 3 2 1
+> sunflowerplot(xyT, main = "2nd Sunflower Plot of Rounded N(0,1)")
+> 
+> ## A 'marked point process' {explicit 'number' argument}:
+> sunflowerplot(rnorm(100), rnorm(100), number = rpois(n = 100, lambda = 2),
++               main = "Sunflower plot (marked point process)",
++               rotate = TRUE, col = "blue4")
+> 
+> 
+> 
+> cleanEx()
+> nameEx("symbols")
+> ### * symbols
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: symbols
+> ### Title: Draw Symbols (Circles, Squares, Stars, Thermometers, Boxplots)
+> ### Aliases: symbols
+> ### Keywords: aplot hplot multivariate
+> 
+> ### ** Examples
+> 
+> require(stats); require(grDevices)
+> x <- 1:10
+> y <- sort(10*runif(10))
+> z <- runif(10)
+> z3 <- cbind(z, 2*runif(10), runif(10))
+> symbols(x, y, thermometers = cbind(.5, 1, z), inches = .5, fg = 1:10)
+> symbols(x, y, thermometers = z3, inches = FALSE)
+> text(x, y, apply(format(round(z3, digits = 2)), 1, paste, collapse = ","),
++      adj = c(-.2,0), cex = .75, col = "purple", xpd = NA)
+> 
+> ## Note that  example(trees)  shows more sensible plots!
+> N <- nrow(trees)
+> with(trees, {
++ ## Girth is diameter in inches
++ symbols(Height, Volume, circles = Girth/24, inches = FALSE,
++         main = "Trees' Girth") # xlab and ylab automatically
++ ## Colours too:
++ op <- palette(rainbow(N, end = 0.9))
++ symbols(Height, Volume, circles = Girth/16, inches = FALSE, bg = 1:N,
++         fg = "gray30", main = "symbols(*, circles = Girth/16, bg = 1:N)")
++ palette(op)
++ })
+> 
+> 
+> 
+> cleanEx()
+> nameEx("title")
+> ### * title
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: title
+> ### Title: Plot Annotation
+> ### Aliases: title
+> ### Keywords: aplot
+> 
+> ### ** Examples
+> 
+> plot(cars, main = "") # here, could use main directly
+> title(main = "Stopping Distance versus Speed")
+> 
+> plot(cars, main = "")
+> title(main = list("Stopping Distance versus Speed", cex = 1.5,
++                   col = "red", font = 3))
+> 
+> ## Specifying "..." :
+> plot(1, col.axis = "sky blue", col.lab = "thistle")
+> title("Main Title", sub = "sub title",
++       cex.main = 2,   font.main= 4, col.main= "blue",
++       cex.sub = 0.75, font.sub = 3, col.sub = "red")
+> 
+> 
+> x <- seq(-4, 4, len = 101)
+> y <- cbind(sin(x), cos(x))
+> matplot(x, y, type = "l", xaxt = "n",
++         main = expression(paste(plain(sin) * phi, "  and  ",
++                                 plain(cos) * phi)),
++         ylab = expression("sin" * phi, "cos" * phi), # only 1st is taken
++         xlab = expression(paste("Phase Angle ", phi)),
++         col.main = "blue")
+> axis(1, at = c(-pi, -pi/2, 0, pi/2, pi),
++      labels = expression(-pi, -pi/2, 0, pi/2, pi))
+> abline(h = 0, v = pi/2 * c(-1,1), lty = 2, lwd = .1, col = "gray70")
+> 
+> 
+> 
+> cleanEx()
+> nameEx("units")
+> ### * units
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: units
+> ### Title: Graphical Units
+> ### Aliases: xinch yinch xyinch
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> all(c(xinch(), yinch()) == xyinch()) # TRUE
+[1] TRUE
+> xyinch()
+[1] 1.5000000 0.4185559
+> xyinch #- to see that is really   delta{"usr"} / "pin"
+function (xy = 1, warn.log = TRUE) 
+{
+    if (warn.log && (par("xlog") || par("ylog"))) 
+        warning("log scale:  xyinch() is nonsense")
+    u <- par("usr")
+    xy * c(u[2L] - u[1L], u[4L] - u[3L])/par("pin")
+}
+<bytecode: 0x2f7cbe8>
+<environment: namespace:graphics>
+> 
+> ## plot labels offset 0.12 inches to the right
+> ## of plotted symbols in a plot
+> with(mtcars, {
++     plot(mpg, disp, pch = 19, main = "Motor Trend Cars")
++     text(mpg + xinch(0.12), disp, row.names(mtcars),
++          adj = 0, cex = .7, col = "blue")
++     })
+> 
+> 
+> 
+> cleanEx()
+> nameEx("xspline")
+> ### * xspline
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: xspline
+> ### Title: Draw an X-spline
+> ### Aliases: xspline
+> ### Keywords: aplot
+> 
+> ### ** Examples
+> 
+> ## based on examples in ?grid.xspline
+> 
+> xsplineTest <- function(s, open = TRUE,
++                         x = c(1,1,3,3)/4,
++                         y = c(1,3,3,1)/4, ...) {
++     plot(c(0,1), c(0,1), type = "n", axes = FALSE, xlab = "", ylab = "")
++     points(x, y, pch = 19)
++     xspline(x, y, s, open, ...)
++     text(x+0.05*c(-1,-1,1,1), y+0.05*c(-1,1,1,-1), s)
++ }
+> op <- par(mfrow = c(3,3), mar = rep(0,4), oma = c(0,0,2,0))
+> xsplineTest(c(0, -1, -1, 0))
+> xsplineTest(c(0, -1,  0, 0))
+> xsplineTest(c(0, -1,  1, 0))
+> xsplineTest(c(0,  0, -1, 0))
+> xsplineTest(c(0,  0,  0, 0))
+> xsplineTest(c(0,  0,  1, 0))
+> xsplineTest(c(0,  1, -1, 0))
+> xsplineTest(c(0,  1,  0, 0))
+> xsplineTest(c(0,  1,  1, 0))
+> title("Open X-splines", outer = TRUE)
+> 
+> par(mfrow = c(3,3), mar = rep(0,4), oma = c(0,0,2,0))
+> xsplineTest(c(0, -1, -1, 0), FALSE, col = "grey80")
+> xsplineTest(c(0, -1,  0, 0), FALSE, col = "grey80")
+> xsplineTest(c(0, -1,  1, 0), FALSE, col = "grey80")
+> xsplineTest(c(0,  0, -1, 0), FALSE, col = "grey80")
+> xsplineTest(c(0,  0,  0, 0), FALSE, col = "grey80")
+> xsplineTest(c(0,  0,  1, 0), FALSE, col = "grey80")
+> xsplineTest(c(0,  1, -1, 0), FALSE, col = "grey80")
+> xsplineTest(c(0,  1,  0, 0), FALSE, col = "grey80")
+> xsplineTest(c(0,  1,  1, 0), FALSE, col = "grey80")
+> title("Closed X-splines", outer = TRUE)
+> 
+> par(op)
+> 
+> x <- sort(stats::rnorm(5))
+> y <- sort(stats::rnorm(5))
+> plot(x, y, pch = 19)
+> res <- xspline(x, y, 1, draw = FALSE)
+> lines(res)
+> ## the end points may be very close together,
+> ## so use last few for direction
+> nr <- length(res$x)
+> arrows(res$x[1], res$y[1], res$x[4], res$y[4], code = 1, length = 0.1)
+> arrows(res$x[nr-3], res$y[nr-3], res$x[nr], res$y[nr], code = 2, length = 0.1)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> ### * <FOOTER>
+> ###
+> options(digits = 7L)
+> base::cat("Time elapsed: ", proc.time() - base::get("ptime", pos = 'CheckExEnv'),"\n")
+Time elapsed:  1.793 0.029 1.823 0 0 
+> grDevices::dev.off()
+null device 
+          1 
+> ###
+> ### Local variables: ***
+> ### mode: outline-minor ***
+> ### outline-regexp: "\\(> \\)?### [*]+" ***
+> ### End: ***
+> quit('no')
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/tests/Examples/tools-Ex.Rout.save
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/tests/Examples/tools-Ex.Rout.save	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/tests/Examples/tools-Ex.Rout.save	(revision 2477)
@@ -0,0 +1,1027 @@
+
+R version 3.3.2 RC (2016-10-26 r71594) -- "Sincere Pumpkin Patch"
+Copyright (C) 2016 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
+
+R is free software and comes with ABSOLUTELY NO WARRANTY.
+You are welcome to redistribute it under certain conditions.
+Type 'license()' or 'licence()' for distribution details.
+
+  Natural language support but running in an English locale
+
+R is a collaborative project with many contributors.
+Type 'contributors()' for more information and
+'citation()' on how to cite R or R packages in publications.
+
+Type 'demo()' for some demos, 'help()' for on-line help, or
+'help.start()' for an HTML browser interface to help.
+Type 'q()' to quit R.
+
+> pkgname <- "tools"
+> source(file.path(R.home("share"), "R", "examples-header.R"))
+> options(warn = 1)
+> library('tools')
+> 
+> base::assign(".oldSearch", base::search(), pos = 'CheckExEnv')
+> cleanEx()
+> nameEx("HTMLheader")
+> ### * HTMLheader
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: HTMLheader
+> ### Title: Generate a standard HTML header for R help
+> ### Aliases: HTMLheader
+> ### Keywords: utilities documentation
+> 
+> ### ** Examples
+> 
+> cat(HTMLheader("This is a sample header"), sep="\n")
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title>R: This is a sample header</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<link rel="stylesheet" type="text/css" href="/doc/html/R.css" />
+</head><body>
+<h1> This is a sample header
+<img class="toplogo" src="/doc/html/Rlogo.svg" alt="[R logo]" />
+</h1>
+<hr/>
+<div style="text-align: center;">
+<a href="/doc/html/index.html"><img class="arrow" src="/doc/html/up.jpg" alt="[Top]" /></a>
+</div>
+> 
+> 
+> 
+> cleanEx()
+> nameEx("Rd2HTML")
+> ### * Rd2HTML
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: Rd2HTML
+> ### Title: Rd Converters
+> ### Aliases: Rd2txt Rd2HTML Rd2ex Rd2latex
+> ### Keywords: documentation
+> 
+> ### ** Examples
+> cleanEx()
+> nameEx("Rd2txt_options")
+> ### * Rd2txt_options
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: Rd2txt_options
+> ### Title: Set formatting options for text help
+> ### Aliases: Rd2txt_options
+> ### Keywords: documentation
+> 
+> ### ** Examples
+> 
+> 
+> 
+> 
+> cleanEx()
+> nameEx("Rdutils")
+> ### * Rdutils
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: Rdutils
+> ### Title: Rd Utilities
+> ### Aliases: Rd_db
+> ### Keywords: utilities documentation
+> 
+> ### ** Examples
+> 
+> 
+> cleanEx()
+> nameEx("assertCondition")
+> ### * assertCondition
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: assertCondition
+> ### Title: Asserting Error Conditions
+> ### Aliases: assertCondition assertWarning assertError
+> ### Keywords: programming error
+> 
+> ### ** Examples
+> 
+>   assertError(sqrt("abc"))
+>   assertWarning(matrix(1:8, 4,3))
+> 
+>   assertCondition( ""-1 ) # ok, any condition would satisfy this
+> 
+> try( assertCondition(sqrt(2), "warning") )
+Error in assertCondition(sqrt(2), "warning") : 
+  Failed to get warning in evaluating sqrt(2)
+> ## .. Failed to get warning in evaluating sqrt(2)
+>      assertCondition(sqrt("abc"), "error")   # ok
+> try( assertCondition(sqrt("abc"), "warning") )# -> error: had no warning
+Error in assertCondition(sqrt("abc"), "warning") : 
+  Got simpleError in evaluating sqrt("abc"); wanted warning
+>      assertCondition(sqrt("abc"), "error")
+>   ## identical to assertError() call above
+> 
+> assertCondition(matrix(1:5, 2,3), "warning")
+> try( assertCondition(matrix(1:8, 4,3), "error") )
+Error in assertCondition(matrix(1:8, 4, 3), "error") : 
+  Got simpleWarning in evaluating matrix(1:8, 4, 3); wanted error
+> ## .. Failed to get expected error ....
+> 
+> ## either warning or worse:
+> assertCondition(matrix(1:8, 4,3), "error","warning") # OK
+> assertCondition(matrix(1:8, 4, 3), "warning") # OK
+> 
+> ## when both are signalled:
+> ff <- function() { warning("my warning"); stop("my error") }
+>     assertCondition(ff(), "warning")
+> ## but assertWarning does not allow an error to follow
+> try(assertWarning(ff()))
+Error in assertWarning(ff()) : 
+  Got warning in evaluating ff(), but also an error
+>     assertCondition(ff(), "error")          # ok
+> assertCondition(ff(), "error", "warning") # ok (quietly, catching warning)
+> 
+> ## assert that assertC..() does not assert [and use *one* argument only]
+> assertCondition( assertCondition(sqrt( 2   ), "warning") )
+> assertCondition( assertCondition(sqrt("abc"), "warning"), "error")
+> assertCondition( assertCondition(matrix(1:8, 4,3), "error"),
++                 "error")
+> 
+> 
+> 
+> cleanEx()
+> nameEx("bibstyle")
+> ### * bibstyle
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: bibstyle
+> ### Title: Select or define a bibliography style.
+> ### Aliases: bibstyle getBibstyle
+> ### Keywords: utilties documentation
+> 
+> ### ** Examples
+> 
+> ## Don't show: 
+> options(useFancyQuotes = FALSE)
+> ## End(Don't show)
+> refs <-
++ c(bibentry(bibtype = "manual",
++     title = "R: A Language and Environment for Statistical Computing",
++     author = person("R Core Team"),
++     organization = "R Foundation for Statistical Computing",
++     address = "Vienna, Austria",
++     year = 2013,
++     url = "https://www.R-project.org"),
++   bibentry(bibtype = "article",
++     author = c(person(c("George", "E.", "P."), "Box"),
++                person(c("David",  "R."),      "Cox")),
++     year = 1964,
++     title = "An Analysis of Transformations",
++     journal = "Journal of the Royal Statistical Society, Series B",
++     volume = 26,
++     pages = "211-252"))
+> 
+> bibstyle("unsorted", sortKeys = function(refs) seq_along(refs),
++     fmtPrefix = function(paper) paste0("[", paper$.index, "]"),
++        .init = TRUE)
+<environment: 0x2fe6fd0>
+> print(refs, .bibstyle = "unsorted")
+[1] R Core Team (2013). _R: A Language and Environment for Statistical
+Computing_. R Foundation for Statistical Computing, Vienna, Austria.
+<URL: https://www.R-project.org>.
+
+[2] Box GEP and Cox DR (1964). "An Analysis of Transformations."
+_Journal of the Royal Statistical Society, Series B_, *26*, pp.
+211-252.
+> 
+> 
+> 
+> cleanEx()
+> nameEx("buildVignettes")
+> ### * buildVignettes
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: buildVignettes
+> ### Title: List and Build Package Vignettes
+> ### Aliases: buildVignettes pkgVignettes
+> ### Keywords: utilities documentation
+> 
+> ### ** Examples
+> 
+> gVigns <- pkgVignettes("grid")
+> 
+> 
+> 
+> cleanEx()
+> nameEx("charsets")
+> ### * charsets
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: charsets
+> ### Title: Conversion Tables between Character Sets
+> ### Aliases: Adobe_glyphs charset_to_Unicode
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> ## find Adobe names for ISOLatin2 chars.
+> latin2 <- charset_to_Unicode[, "ISOLatin2"]
+> aUnicode <- as.numeric(paste0("0x", Adobe_glyphs$unicode))
+> keep <- aUnicode %in% latin2
+> aUnicode <- aUnicode[keep]
+> aAdobe <- Adobe_glyphs[keep, 1]
+> ## first match
+> aLatin2 <- aAdobe[match(latin2, aUnicode)]
+> ## all matches
+> bLatin2 <- lapply(1:256, function(x) aAdobe[aUnicode == latin2[x]])
+> format(bLatin2, justify = "none")
+  [1] ""                          "controlSTX"               
+  [3] "controlSOT"                "controlETX"               
+  [5] "controlEOT"                "controlENQ"               
+  [7] "controlACK"                "controlBEL"               
+  [9] "controlBS"                 "controlHT"                
+ [11] "controlLF"                 "controlVT"                
+ [13] "controlFF"                 "controlCR"                
+ [15] "controlSO"                 "controlSI"                
+ [17] "controlDLE"                "controlDC1"               
+ [19] "controlDC2"                "controlDC3"               
+ [21] "controlDC4"                "controlNAK"               
+ [23] "controlSYN"                "controlETB"               
+ [25] "controlCAN"                "controlEM"                
+ [27] "controlSUB"                "controlESC"               
+ [29] "controlFS"                 "controlGS"                
+ [31] "controlRS"                 "controlUS"                
+ [33] "space, spacehackarabic"    "exclam"                   
+ [35] "quotedbl"                  "numbersign"               
+ [37] "dollar"                    "percent"                  
+ [39] "ampersand"                 "quotesingle"              
+ [41] "parenleft"                 "parenright"               
+ [43] "asterisk"                  "plus"                     
+ [45] "comma"                     "hyphen"                   
+ [47] "period"                    "slash"                    
+ [49] "zero"                      "one"                      
+ [51] "two"                       "three"                    
+ [53] "four"                      "five"                     
+ [55] "six"                       "seven"                    
+ [57] "eight"                     "nine"                     
+ [59] "colon"                     "semicolon"                
+ [61] "less"                      "equal"                    
+ [63] "greater"                   "question"                 
+ [65] "at"                        "A"                        
+ [67] "B"                         "C"                        
+ [69] "D"                         "E"                        
+ [71] "F"                         "G"                        
+ [73] "H"                         "I"                        
+ [75] "J"                         "K"                        
+ [77] "L"                         "M"                        
+ [79] "N"                         "O"                        
+ [81] "P"                         "Q"                        
+ [83] "R"                         "S"                        
+ [85] "T"                         "U"                        
+ [87] "V"                         "W"                        
+ [89] "X"                         "Y"                        
+ [91] "Z"                         "bracketleft"              
+ [93] "backslash"                 "bracketright"             
+ [95] "asciicircum"               "underscore"               
+ [97] "grave"                     "a"                        
+ [99] "b"                         "c"                        
+[101] "d"                         "e"                        
+[103] "f"                         "g"                        
+[105] "h"                         "i"                        
+[107] "j"                         "k"                        
+[109] "l"                         "m"                        
+[111] "n"                         "o"                        
+[113] "p"                         "q"                        
+[115] "r"                         "s"                        
+[117] "t"                         "u"                        
+[119] "v"                         "w"                        
+[121] "x"                         "y"                        
+[123] "z"                         "braceleft"                
+[125] "bar, verticalbar"          "braceright"               
+[127] "asciitilde"                "controlDEL"               
+[129] ""                          ""                         
+[131] ""                          ""                         
+[133] ""                          ""                         
+[135] ""                          ""                         
+[137] ""                          ""                         
+[139] ""                          ""                         
+[141] ""                          ""                         
+[143] ""                          ""                         
+[145] ""                          ""                         
+[147] ""                          ""                         
+[149] ""                          ""                         
+[151] ""                          ""                         
+[153] ""                          ""                         
+[155] ""                          ""                         
+[157] ""                          ""                         
+[159] ""                          ""                         
+[161] "nbspace, nonbreakingspace" "Aogonek"                  
+[163] "breve"                     "Lslash"                   
+[165] "currency"                  "Lcaron"                   
+[167] "Sacute"                    "section"                  
+[169] "dieresis"                  "Scaron"                   
+[171] "Scedilla"                  "Tcaron"                   
+[173] "Zacute"                    "sfthyphen, softhyphen"    
+[175] "Zcaron"                    "Zdot, Zdotaccent"         
+[177] "degree"                    "aogonek"                  
+[179] "ogonek"                    "lslash"                   
+[181] "acute"                     "lcaron"                   
+[183] "sacute"                    "caron"                    
+[185] "cedilla"                   "scaron"                   
+[187] "scedilla"                  "tcaron"                   
+[189] "zacute"                    "hungarumlaut"             
+[191] "zcaron"                    "zdot, zdotaccent"         
+[193] "Racute"                    "Aacute"                   
+[195] "Acircumflex"               "Abreve"                   
+[197] "Adieresis"                 "Lacute"                   
+[199] "Cacute"                    "Ccedilla"                 
+[201] "Ccaron"                    "Eacute"                   
+[203] "Eogonek"                   "Edieresis"                
+[205] "Ecaron"                    "Iacute"                   
+[207] "Icircumflex"               "Dcaron"                   
+[209] "Dcroat, Dslash"            "Nacute"                   
+[211] "Ncaron"                    "Oacute"                   
+[213] "Ocircumflex"               "Odblacute, Ohungarumlaut" 
+[215] "Odieresis"                 "multiply"                 
+[217] "Rcaron"                    "Uring"                    
+[219] "Uacute"                    "Udblacute, Uhungarumlaut" 
+[221] "Udieresis"                 "Yacute"                   
+[223] "Tcedilla, Tcommaaccent"    "germandbls"               
+[225] "racute"                    "aacute"                   
+[227] "acircumflex"               "abreve"                   
+[229] "adieresis"                 "lacute"                   
+[231] "cacute"                    "ccedilla"                 
+[233] "ccaron"                    "eacute"                   
+[235] "eogonek"                   "edieresis"                
+[237] "ecaron"                    "iacute"                   
+[239] "icircumflex"               "dcaron"                   
+[241] "dcroat, dmacron"           "nacute"                   
+[243] "ncaron"                    "oacute"                   
+[245] "ocircumflex"               "odblacute, ohungarumlaut" 
+[247] "odieresis"                 "divide"                   
+[249] "rcaron"                    "uring"                    
+[251] "uacute"                    "udblacute, uhungarumlaut" 
+[253] "udieresis"                 "yacute"                   
+[255] "tcedilla, tcommaaccent"    "dotaccent"                
+> 
+> 
+> 
+> cleanEx()
+> nameEx("checkFF")
+> ### * checkFF
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: checkFF
+> ### Title: Check Foreign Function Calls
+> ### Aliases: checkFF print.checkFF
+> ### Keywords: programming utilities
+> 
+> ### ** Examples
+> 
+> 
+> cleanEx()
+> nameEx("checkPoFiles")
+> ### * checkPoFiles
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: checkPoFiles
+> ### Title: Check translation files for inconsistent format strings.
+> ### Aliases: checkPoFile checkPoFiles
+> ### Keywords: utilities
+> 
+> ### ** Examples
+> 
+> ## Not run: 
+> ##D checkPoFiles("de", "/path/to/R/src/directory")
+> ## End(Not run)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("checkRdaFiles")
+> ### * checkRdaFiles
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: checkRdaFiles
+> ### Title: Report on Details of Saved Images or Re-saves them
+> ### Aliases: checkRdaFiles resaveRdaFiles
+> ### Keywords: utilities
+> 
+> ### ** Examples
+> ## Not run: 
+> ##D ## from a package top-level source directory
+> ##D paths <- sort(Sys.glob(c("data/*.rda", "data/*.RData")))
+> ##D (res <- checkRdaFiles(paths))
+> ##D ## pick out some that may need attention
+> ##D bad <- is.na(res$ASCII) | res$ASCII | (res$size > 1e4 & res$compress == "none")
+> ##D res[bad, ]
+> ## End(Not run)
+> 
+> 
+> cleanEx()
+> nameEx("check_packages_in_dir")
+> ### * check_packages_in_dir
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: check_packages_in_dir
+> ### Title: Check Source Packages and Their Reverse Dependencies
+> ### Aliases: check_packages_in_dir summarize_check_packages_in_dir_depends
+> ###   summarize_check_packages_in_dir_results
+> ###   summarize_check_packages_in_dir_timings check_packages_in_dir_changes
+> ### Keywords: utilities
+> 
+> ### ** Examples
+> 
+> ## Not run: 
+> ##D ## Check packages in dir without reverse dependencies:
+> ##D check_packages_in_dir(dir)
+> ##D ## Check packages in dir and their reverse dependencies using the
+> ##D ## defaults (all repositories in getOption("repos"), all "strong"
+> ##D ## reverse dependencies, no recursive reverse dependencies):
+> ##D check_packages_in_dir(dir, reverse = list())
+> ##D ## Check packages in dir with their reverse dependencies from CRAN,
+> ##D ## using all strong reverse dependencies and reverse suggests:
+> ##D check_packages_in_dir(dir,
+> ##D                       reverse = list(repos = getOption("repos")["CRAN"],
+> ##D                                      which = "most"))                   
+> ##D ## Check packages in dir with their reverse dependencies from CRAN,
+> ##D ## using '--as-cran' for the former but not the latter:
+> ##D check_packages_in_dir(dir,
+> ##D                       check_args = c("--as-cran", ""),
+> ##D                       reverse = list(repos = getOption("repos")["CRAN"]))
+> ## End(Not run)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("delimMatch")
+> ### * delimMatch
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: delimMatch
+> ### Title: Delimited Pattern Matching
+> ### Aliases: delimMatch
+> ### Keywords: character
+> 
+> ### ** Examples
+> 
+> x <- c("\\value{foo}", "function(bar)")
+> delimMatch(x)
+[1]  7 -1
+attr(,"match.length")
+[1]  5 -1
+> delimMatch(x, c("(", ")"))
+[1] -1  9
+attr(,"match.length")
+[1] -1  5
+> 
+> 
+> 
+> cleanEx()
+> nameEx("dependsOnPkgs")
+> ### * dependsOnPkgs
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: dependsOnPkgs
+> ### Title: Find Reverse Dependencies
+> ### Aliases: dependsOnPkgs
+> ### Keywords: utilities
+> 
+> ### ** Examples
+> 
+> 
+> cleanEx()
+> nameEx("encoded")
+> ### * encoded
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: encoded_text_to_latex
+> ### Title: Translate non-ASCII Text to LaTeX Escapes
+> ### Aliases: encoded_text_to_latex
+> ### Keywords: utilities
+> 
+> ### ** Examples
+> 
+> x <- "fa\xE7ile"
+> encoded_text_to_latex(x, "latin1")
+[1] "fa{\\c c}ile"
+> ## Not run: 
+> ##D ## create a tex file to show the upper half of 8-bit charsets
+> ##D x <- rawToChar(as.raw(160:255), multiple = TRUE)
+> ##D (x <- matrix(x, ncol = 16, byrow = TRUE))
+> ##D xx <- x
+> ##D xx[] <- encoded_text_to_latex(x, "latin1") # or latin2 or latin9
+> ##D xx <- apply(xx, 1, paste, collapse = "&")
+> ##D con <- file("test-encoding.tex", "w")
+> ##D header <- c(
+> ##D "\\documentclass{article}",
+> ##D "\\usepackage[T1]{fontenc}",
+> ##D "\\usepackage{Rd}",
+> ##D "\\begin{document}",
+> ##D "\\HeaderA{test}{}{test}",
+> ##D "\\begin{Details}\relax",
+> ##D "\\Tabular{cccccccccccccccc}{")
+> ##D trailer <- c("}", "\\end{Details}", "\\end{document}")
+> ##D writeLines(header, con)
+> ##D writeLines(paste0(xx, "\\"), con)
+> ##D writeLines(trailer, con)
+> ##D close(con)
+> ##D ## and some UTF_8 chars
+> ##D x <- intToUtf8(as.integer(
+> ##D     c(160:383,0x0192,0x02C6,0x02C7,0x02CA,0x02D8,
+> ##D       0x02D9, 0x02DD, 0x200C, 0x2018, 0x2019, 0x201C,
+> ##D       0x201D, 0x2020, 0x2022, 0x2026, 0x20AC)),
+> ##D                multiple = TRUE)
+> ##D x <- matrix(x, ncol = 16, byrow = TRUE)
+> ##D xx <- x
+> ##D xx[] <- encoded_text_to_latex(x, "UTF-8")
+> ##D xx <- apply(xx, 1, paste, collapse = "&")
+> ##D con <- file("test-utf8.tex", "w")
+> ##D writeLines(header, con)
+> ##D writeLines(paste(xx, "\\", sep = ""), con)
+> ##D writeLines(trailer, con)
+> ##D close(con)
+> ## End(Not run)
+> 
+> 
+> cleanEx()
+> nameEx("fileutils")
+> ### * fileutils
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: fileutils
+> ### Title: File Utilities
+> ### Aliases: file_ext file_path_as_absolute file_path_sans_ext
+> ###   list_files_with_exts list_files_with_type
+> ### Keywords: file
+> 
+> ### ** Examples
+> 
+> 
+> cleanEx()
+> nameEx("find_gs_cmd")
+> ### * find_gs_cmd
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: find_gs_cmd
+> ### Title: Find a GhostScript Executable
+> ### Aliases: find_gs_cmd R_GSCMD GSC
+> 
+> ### ** Examples
+> ## Not run: 
+> ##D ## Suppose a Solaris system has GhostScript 9.00 on the path and
+> ##D ## 9.07 in /opt/csw/bin.  Then one might set
+> ##D Sys.setenv(R_GSCMD = "/opt/csw/bin/gs")
+> ## End(Not run)
+> 
+> 
+> cleanEx()
+> nameEx("getDepList")
+> ### * getDepList
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: getDepList
+> ### Title: Functions to Retrieve Dependency Information
+> ### Aliases: getDepList pkgDepends
+> ### Keywords: utilities
+> 
+> ### ** Examples
+> 
+> pkgDepends("tools", local = FALSE)
+Warning: 'pkgDepends' is deprecated.
+Use 'package_dependencies()' instead.
+See help("Deprecated")
+Warning: 'package.dependencies' is deprecated.
+Use 'package_dependencies' instead.
+See help("Deprecated")
+Warning: 'getDepList' is deprecated.
+Use 'dependsOnPkgs() or package_dependencies()' instead.
+See help("Deprecated")
+$Depends
+character(0)
+
+$Installed
+character(0)
+
+$Found
+list()
+
+$NotFound
+character(0)
+
+$R
+character(0)
+
+attr(,"class")
+[1] "DependsList"
+> 
+> 
+> 
+> cleanEx()
+> nameEx("getVignetteInfo")
+> ### * getVignetteInfo
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: getVignetteInfo
+> ### Title: Get information on installed vignettes.
+> ### Aliases: getVignetteInfo
+> ### Keywords: utilities documentation
+> 
+> ### ** Examples
+> 
+> 
+> 
+> 
+> cleanEx()
+> nameEx("installFoundDepends")
+> ### * installFoundDepends
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: installFoundDepends
+> ### Title: A function to install unresolved dependencies
+> ### Aliases: installFoundDepends
+> ### Keywords: utilities
+> 
+> ### ** Examples
+> 
+> ## Set up a temporary directory to install packages to
+> tmp <- tempfile()
+> dir.create(tmp)
+> 
+> pDL <- pkgDepends("tools", local = FALSE)
+Warning: 'pkgDepends' is deprecated.
+Use 'package_dependencies()' instead.
+See help("Deprecated")
+Warning: 'package.dependencies' is deprecated.
+Use 'package_dependencies' instead.
+See help("Deprecated")
+Warning: 'getDepList' is deprecated.
+Use 'dependsOnPkgs() or package_dependencies()' instead.
+See help("Deprecated")
+> installFoundDepends(pDL$Found, destdir = tmp)
+Warning: 'installFoundDepends()' is deprecated: It is misleading nowadays
+ since it has never taken 'Imports' into consideration
+NULL
+> 
+> 
+> 
+> cleanEx()
+> nameEx("loadRdMacros")
+> ### * loadRdMacros
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: loadRdMacros
+> ### Title: Load user-defined Rd help system macros.
+> ### Aliases: loadRdMacros loadPkgRdMacros
+> ### Keywords: utilities documentation
+> 
+> ### ** Examples
+> 
+> 
+> 
+> 
+> cleanEx()
+> nameEx("makevars")
+> ### * makevars
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: makevars
+> ### Title: User and Site Compilation Variables
+> ### Aliases: makevars_user makevars_site
+> ### Keywords: utilities
+> 
+> ### ** Examples
+> 
+> 
+> cleanEx()
+> nameEx("md5sum")
+> ### * md5sum
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: md5sum
+> ### Title: Compute MD5 Checksums
+> ### Aliases: md5sum
+> ### Keywords: utilities
+> 
+> ### ** Examples
+> 
+> as.vector(md5sum(dir(R.home(), pattern = "^COPY", full.names = TRUE)))
+[1] "eb723b61539feef013de476e68b5c50a"
+> 
+> 
+> 
+> cleanEx()
+> nameEx("package_dependencies")
+> ### * package_dependencies
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: package_dependencies
+> ### Title: Computations on the Dependency Hierarchy of Packages
+> ### Aliases: package_dependencies
+> ### Keywords: utilities
+> 
+> ### ** Examples
+> 
+> ## Not run: 
+> ##D pdb <- available.packages()
+> ##D deps <- package_dependencies(packages = "MASS", pdb,
+> ##D                     which = c("Depends", "Imports", "LinkingTo", "Suggests"),
+> ##D                     recursive = TRUE, reverse = TRUE)
+> ##D length(deps$MASS)
+> ## End(Not run)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("parseLatex")
+> ### * parseLatex
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: parseLatex
+> ### Title: These experimental functions work with a subset of LaTeX code.
+> ### Aliases: parseLatex deparseLatex latexToUtf8
+> ### Keywords: utilities documentation
+> 
+> ### ** Examples
+> 
+> 
+> cleanEx()
+> nameEx("print.via.format")
+> ### * print.via.format
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: .print.via.format
+> ### Title: Printing Utilities
+> ### Aliases: .print.via.format
+> ### Keywords: utilities
+> 
+> ### ** Examples
+> 
+> ## The function is simply defined as
+>  function (x, ...) {
++     writeLines(format(x, ...))
++     invisible(x)
++  }
+function (x, ...) 
+{
+    writeLines(format(x, ...))
+    invisible(x)
+}
+> 
+> ## is used for simple print methods in R, and as prototype for new methods.
+> 
+> 
+> 
+> cleanEx()
+> nameEx("pskill")
+> ### * pskill
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: pskill
+> ### Title: Kill a Process
+> ### Aliases: pskill SIGHUP SIGINT SIGQUIT SIGKILL SIGTERM SIGSTOP SIGTSTP
+> ###   SIGCONT SIGCHLD SIGUSR1 SIGUSR2
+> ### Keywords: utilities
+> 
+> ### ** Examples
+> ## Not run: 
+> ##D pskill(c(237, 245), SIGKILL)
+> ## End(Not run)
+> 
+> 
+> cleanEx()
+> nameEx("showNonASCII")
+> ### * showNonASCII
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: showNonASCII
+> ### Title: Pick Out Non-ASCII Characters
+> ### Aliases: showNonASCII showNonASCIIfile
+> ### Keywords: utilities
+> 
+> ### ** Examples
+> 
+> out <- c(
++ "fa\xE7ile test of showNonASCII():",
++ "\\details{",
++ "   This is a good line",
++ "   This has an \xfcmlaut in it.",
++ "   OK again.",
++ "}")
+> f <- tempfile()
+> cat(out, file = f, sep = "\n")
+> 
+> showNonASCIIfile(f)
+1: fa<e7>ile test of showNonASCII():
+4:    This has an <fc>mlaut in it.
+> unlink(f)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("toHTML")
+> ### * toHTML
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: toHTML
+> ### Title: Display an object in HTML.
+> ### Aliases: toHTML toHTML.packageIQR toHTML.news_db
+> ### Keywords: utilities documentation
+> 
+> ### ** Examples
+> 
+> cat(toHTML(demo(package = "base")), sep = "\n")
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title>R: R</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<link rel="stylesheet" type="text/css" href="/doc/html/R.css" />
+</head><body>
+<h1> R
+<img class="toplogo" src="/doc/html/Rlogo.svg" alt="[R logo]" />
+</h1>
+<hr/>
+<div style="text-align: center;">
+<a href="/doc/html/index.html"><img class="arrow" src="/doc/html/up.jpg" alt="[Top]" /></a>
+</div>
+<h2>Demos in package &lsquo;base&rsquo;</h2>
+<table cols="2" width="100%">
+<tr>
+ <td style="text-align: left; vertical-align: top; width: 10%;">
+error.catching
+ </td>
+ <td style="text-align: left; vertical-align: top; width: 90%;">
+More examples on catching and handling errors
+ </td>
+</tr>
+
+<tr>
+ <td style="text-align: left; vertical-align: top; width: 10%;">
+is.things
+ </td>
+ <td style="text-align: left; vertical-align: top; width: 90%;">
+Explore some properties of R objects and is.FOO() functions. Not for newbies!
+ </td>
+</tr>
+
+<tr>
+ <td style="text-align: left; vertical-align: top; width: 10%;">
+recursion
+ </td>
+ <td style="text-align: left; vertical-align: top; width: 90%;">
+Using recursion for adaptive integration
+ </td>
+</tr>
+
+<tr>
+ <td style="text-align: left; vertical-align: top; width: 10%;">
+scoping
+ </td>
+ <td style="text-align: left; vertical-align: top; width: 90%;">
+An illustration of lexical scoping.
+ </td>
+</tr>
+
+</table>
+<p>
+</p>
+</body></html>
+> 
+> 
+> 
+> cleanEx()
+> nameEx("undoc")
+> ### * undoc
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: undoc
+> ### Title: Find Undocumented Objects
+> ### Aliases: undoc print.undoc
+> ### Keywords: documentation
+> 
+> ### ** Examples
+> 
+> undoc("tools")                  # Undocumented objects in 'tools'
+> 
+> 
+> 
+> cleanEx()
+> nameEx("vignetteDepends")
+> ### * vignetteDepends
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: vignetteDepends
+> ### Title: Retrieve Dependency Information for a Vignette
+> ### Aliases: vignetteDepends
+> ### Keywords: utilities
+> 
+> ### ** Examples
+> 
+> 
+> cleanEx()
+> nameEx("vignetteEngine")
+> ### * vignetteEngine
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: vignetteEngine
+> ### Title: Set or Get a Vignette Processing Engine
+> ### Aliases: vignetteEngine
+> ### Keywords: utilities documentation
+> 
+> ### ** Examples
+> 
+> str(vignetteEngine("Sweave"))
+List of 6
+ $ name   : chr "Sweave"
+ $ package: chr "utils"
+ $ pattern: chr "[.][rRsS](nw|tex)$"
+ $ weave  :function (...)  
+ $ tangle :function (...)  
+ $ aspell :List of 2
+  ..$ filter : chr "Sweave"
+  ..$ control: chr "-t"
+> 
+> 
+> 
+> cleanEx()
+> nameEx("writePACKAGES")
+> ### * writePACKAGES
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: write_PACKAGES
+> ### Title: Generate PACKAGES files
+> ### Aliases: write_PACKAGES
+> ### Keywords: file utilities
+> 
+> ### ** Examples
+> 
+> ## Not run: 
+> ##D write_PACKAGES("c:/myFolder/myRepository")  # on Windows
+> ##D write_PACKAGES("/pub/RWin/bin/windows/contrib/2.9",
+> ##D                type = "win.binary")  # on Linux
+> ## End(Not run)
+> 
+> 
+> cleanEx()
+> nameEx("xgettext")
+> ### * xgettext
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: xgettext
+> ### Title: Extract Translatable Messages from R Files in a Package
+> ### Aliases: xgettext xngettext xgettext2pot
+> ### Keywords: utilities
+> 
+> ### ** Examples
+> ## Not run: 
+> ##D ## in a source-directory build of R:
+> ##D xgettext(file.path(R.home(), "src", "library", "splines"))
+> ## End(Not run)
+> 
+> 
+> ### * <FOOTER>
+> ###
+> options(digits = 7L)
+> base::cat("Time elapsed: ", proc.time() - base::get("ptime", pos = 'CheckExEnv'),"\n")
+Time elapsed:  0.192 0.003 0.195 0 0 
+> grDevices::dev.off()
+null device 
+          1 
+> ###
+> ### Local variables: ***
+> ### mode: outline-minor ***
+> ### outline-regexp: "\\(> \\)?### [*]+" ***
+> ### End: ***
+> quit('no')
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/tests/Examples/stats4-Ex.Rout.save
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/tests/Examples/stats4-Ex.Rout.save	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/tests/Examples/stats4-Ex.Rout.save	(revision 2477)
@@ -0,0 +1,196 @@
+
+R version 3.3.2 RC (2016-10-26 r71594) -- "Sincere Pumpkin Patch"
+Copyright (C) 2016 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
+
+R is free software and comes with ABSOLUTELY NO WARRANTY.
+You are welcome to redistribute it under certain conditions.
+Type 'license()' or 'licence()' for distribution details.
+
+  Natural language support but running in an English locale
+
+R is a collaborative project with many contributors.
+Type 'contributors()' for more information and
+'citation()' on how to cite R or R packages in publications.
+
+Type 'demo()' for some demos, 'help()' for on-line help, or
+'help.start()' for an HTML browser interface to help.
+Type 'q()' to quit R.
+
+> pkgname <- "stats4"
+> source(file.path(R.home("share"), "R", "examples-header.R"))
+> options(warn = 1)
+> library('stats4')
+> 
+> base::assign(".oldSearch", base::search(), pos = 'CheckExEnv')
+> cleanEx()
+> nameEx("mle")
+> ### * mle
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: mle
+> ### Title: Maximum Likelihood Estimation
+> ### Aliases: mle
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> ## Avoid printing to unwarranted accuracy
+> od <- options(digits = 5)
+> x <- 0:10
+> y <- c(26, 17, 13, 12, 20, 5, 9, 8, 5, 4, 8)
+> 
+> ## Easy one-dimensional MLE:
+> nLL <- function(lambda) -sum(stats::dpois(y, lambda, log = TRUE))
+> fit0 <- mle(nLL, start = list(lambda = 5), nobs = NROW(y))
+> # For 1D, this is preferable:
+> fit1 <- mle(nLL, start = list(lambda = 5), nobs = NROW(y),
++             method = "Brent", lower = 1, upper = 20)
+> stopifnot(nobs(fit0) == length(y))
+> 
+> ## This needs a constrained parameter space: most methods will accept NA
+> ll <- function(ymax = 15, xhalf = 6) {
++     if(ymax > 0 && xhalf > 0)
++       -sum(stats::dpois(y, lambda = ymax/(1+x/xhalf), log = TRUE))
++     else NA
++ }
+> (fit <- mle(ll, nobs = length(y)))
+
+Call:
+mle(minuslogl = ll, nobs = length(y))
+
+Coefficients:
+   ymax   xhalf 
+24.9931  3.0571 
+> mle(ll, fixed = list(xhalf = 6))
+
+Call:
+mle(minuslogl = ll, fixed = list(xhalf = 6))
+
+Coefficients:
+  ymax  xhalf 
+19.288  6.000 
+> ## alternative using bounds on optimization
+> ll2 <- function(ymax = 15, xhalf = 6)
++     -sum(stats::dpois(y, lambda = ymax/(1+x/xhalf), log = TRUE))
+> mle(ll2, method = "L-BFGS-B", lower = rep(0, 2))
+
+Call:
+mle(minuslogl = ll2, method = "L-BFGS-B", lower = rep(0, 2))
+
+Coefficients:
+   ymax   xhalf 
+24.9994  3.0558 
+> 
+> AIC(fit)
+[1] 61.208
+> BIC(fit)
+[1] 62.004
+> 
+> summary(fit)
+Maximum likelihood estimation
+
+Call:
+mle(minuslogl = ll, nobs = length(y))
+
+Coefficients:
+      Estimate Std. Error
+ymax   24.9931     4.2244
+xhalf   3.0571     1.0348
+
+-2 log L: 57.208 
+> logLik(fit)
+'log Lik.' -28.604 (df=2)
+> vcov(fit)
+         ymax   xhalf
+ymax  17.8459 -3.7206
+xhalf -3.7206  1.0708
+> plot(profile(fit), absVal = FALSE)
+> confint(fit)
+Profiling...
+        2.5 %  97.5 %
+ymax  17.8845 34.6194
+xhalf  1.6616  6.4792
+> 
+> ## Use bounded optimization
+> ## The lower bounds are really > 0,
+> ## but we use >=0 to stress-test profiling
+> (fit2 <- mle(ll, method = "L-BFGS-B", lower = c(0, 0)))
+
+Call:
+mle(minuslogl = ll, method = "L-BFGS-B", lower = c(0, 0))
+
+Coefficients:
+   ymax   xhalf 
+24.9994  3.0558 
+> plot(profile(fit2), absVal = FALSE)
+> 
+> ## a better parametrization:
+> ll3 <- function(lymax = log(15), lxhalf = log(6))
++     -sum(stats::dpois(y, lambda = exp(lymax)/(1+x/exp(lxhalf)), log = TRUE))
+> (fit3 <- mle(ll3))
+
+Call:
+mle(minuslogl = ll3)
+
+Coefficients:
+ lymax lxhalf 
+3.2189 1.1170 
+> plot(profile(fit3), absVal = FALSE)
+> exp(confint(fit3))
+Profiling...
+         2.5 %  97.5 %
+lymax  17.8815 34.6186
+lxhalf  1.6615  6.4794
+> 
+> options(od)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("update-methods")
+> ### * update-methods
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: update-methods
+> ### Title: Methods for Function 'update' in Package 'stats4'
+> ### Aliases: update-methods update,ANY-method update,mle-method
+> ### Keywords: methods
+> 
+> ### ** Examples
+> 
+> x <- 0:10
+> y <- c(26, 17, 13, 12, 20, 5, 9, 8, 5, 4, 8)
+> ll <- function(ymax = 15, xhalf = 6)
++     -sum(stats::dpois(y, lambda = ymax/(1+x/xhalf), log = TRUE))
+> fit <- mle(ll)
+Warning in stats::dpois(y, lambda = ymax/(1 + x/xhalf), log = TRUE) :
+  NaNs produced
+> ## note the recorded call contains ..1, a problem with S4 dispatch
+> update(fit, fixed = list(xhalf = 3))
+
+Call:
+mle(minuslogl = ll, fixed = ..1)
+
+Coefficients:
+    ymax    xhalf 
+25.19609  3.00000 
+> 
+> 
+> 
+> ### * <FOOTER>
+> ###
+> options(digits = 7L)
+> base::cat("Time elapsed: ", proc.time() - base::get("ptime", pos = 'CheckExEnv'),"\n")
+Time elapsed:  0.293 0.003 0.296 0 0 
+> grDevices::dev.off()
+null device 
+          1 
+> ###
+> ### Local variables: ***
+> ### mode: outline-minor ***
+> ### outline-regexp: "\\(> \\)?### [*]+" ***
+> ### End: ***
+> quit('no')
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/tests/Examples/grid-Ex.Rout.save
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/tests/Examples/grid-Ex.Rout.save	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/tests/Examples/grid-Ex.Rout.save	(revision 2477)
@@ -0,0 +1,2081 @@
+
+R version 3.3.2 RC (2016-10-26 r71594) -- "Sincere Pumpkin Patch"
+Copyright (C) 2016 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
+
+R is free software and comes with ABSOLUTELY NO WARRANTY.
+You are welcome to redistribute it under certain conditions.
+Type 'license()' or 'licence()' for distribution details.
+
+  Natural language support but running in an English locale
+
+R is a collaborative project with many contributors.
+Type 'contributors()' for more information and
+'citation()' on how to cite R or R packages in publications.
+
+Type 'demo()' for some demos, 'help()' for on-line help, or
+'help.start()' for an HTML browser interface to help.
+Type 'q()' to quit R.
+
+> pkgname <- "grid"
+> source(file.path(R.home("share"), "R", "examples-header.R"))
+> options(warn = 1)
+> library('grid')
+> 
+> base::assign(".oldSearch", base::search(), pos = 'CheckExEnv')
+> cleanEx()
+> nameEx("Grid")
+> ### * Grid
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: Grid
+> ### Title: Grid Graphics
+> ### Aliases: Grid
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> ## Diagram of a simple layout
+> grid.show.layout(grid.layout(4,2,
++                      heights=unit(rep(1, 4),
++                                   c("lines", "lines", "lines", "null")),
++                      widths=unit(c(1, 1), "inches")))
+> ## Diagram of a sample viewport
+> grid.show.viewport(viewport(x=0.6, y=0.6,
++                             w=unit(1, "inches"), h=unit(1, "inches")))
+> ## A flash plotting example
+> grid.multipanel(vp=viewport(0.5, 0.5, 0.8, 0.8))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("arrow")
+> ### * arrow
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: arrow
+> ### Title: Describe arrows to add to a line.
+> ### Aliases: arrow
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> arrow()
+$angle
+[1] 30
+
+$length
+[1] 0.25inches
+
+$ends
+[1] 2
+
+$type
+[1] 1
+
+attr(,"class")
+[1] "arrow"
+> 
+> 
+> 
+> cleanEx()
+> nameEx("calcStringMetric")
+> ### * calcStringMetric
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: calcStringMetric
+> ### Title: Calculate Metric Information for Text
+> ### Aliases: calcStringMetric
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> grid.newpage()
+> grid.segments(.01, .5, .99, .5, gp=gpar(col="grey"))
+> metrics <- calcStringMetric(letters)
+> grid.rect(x=1:26/27,
++           width=unit(metrics$width, "inches"),
++           height=unit(metrics$ascent, "inches"),
++           just="bottom",
++           gp=gpar(col="red"))
+> grid.rect(x=1:26/27,
++           width=unit(metrics$width, "inches"),
++           height=unit(metrics$descent, "inches"),
++           just="top",
++           gp=gpar(col="red"))
+> grid.text(letters, x=1:26/27, just="bottom")
+> 
+> test <- function(x) {
++     grid.text(x, just="bottom")
++     metric <- calcStringMetric(x)
++     if (is.character(x)) {
++         grid.rect(width=unit(metric$width, "inches"),
++                   height=unit(metric$ascent, "inches"),
++                   just="bottom",
++                   gp=gpar(col=rgb(1,0,0,.5)))
++         grid.rect(width=unit(metric$width, "inches"),
++                   height=unit(metric$descent, "inches"),
++                   just="top",
++                   gp=gpar(col=rgb(1,0,0,.5)))
++     } else {
++         grid.rect(width=unit(metric$width, "inches"),
++                   y=unit(.5, "npc") + unit(metric[2], "inches"),
++                   height=unit(metric$ascent, "inches"),
++                   just="bottom",
++                   gp=gpar(col=rgb(1,0,0,.5)))
++         grid.rect(width=unit(metric$width, "inches"),
++                   height=unit(metric$descent, "inches"),
++                   just="bottom",
++                   gp=gpar(col=rgb(1,0,0,.5)))
++     }
++ }
+> 
+> tests <- list("t",
++               "test",
++               "testy",
++               "test\ntwo",
++               expression(x),
++               expression(y),
++               expression(x + y),
++               expression(a + b),
++               expression(atop(x + y, 2)))
+> 
+> grid.newpage()
+> nrowcol <- n2mfrow(length(tests))
+> pushViewport(viewport(layout=grid.layout(nrowcol[1], nrowcol[2]),
++                       gp=gpar(cex=5, lwd=.5)))
+> for (i in 1:length(tests)) {
++     col <- (i - 1) %% nrowcol[2] + 1
++     row <- (i - 1) %/% nrowcol[2] + 1
++     pushViewport(viewport(layout.pos.row=row, layout.pos.col=col))
++     test(tests[[i]])
++     popViewport()
++ }
+> 
+> 
+> 
+> 
+> cleanEx()
+> nameEx("current.viewport")
+> ### * current.viewport
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: Querying the Viewport Tree
+> ### Title: Get the Current Grid Viewport (Tree)
+> ### Aliases: current.viewport current.parent current.vpTree current.vpPath
+> ###   current.transform current.rotation
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> grid.newpage()
+> pushViewport(viewport(width=0.8, height=0.8, name="A"))
+> pushViewport(viewport(x=0.1, width=0.3, height=0.6,
++   just="left", name="B"))
+> upViewport(1)
+> pushViewport(viewport(x=0.5, width=0.4, height=0.8,
++   just="left", name="C"))
+> pushViewport(viewport(width=0.8, height=0.8, name="D"))
+> current.vpPath()
+GRID.VP.65::A::C::D 
+> upViewport(1)
+> current.vpPath()
+GRID.VP.65::A::C 
+> current.vpTree()
+viewport[ROOT]->(viewport[GRID.VP.65]->(viewport[A]->(viewport[B], viewport[C]->(viewport[D])))) 
+> current.viewport()
+viewport[C] 
+> current.vpTree(all=FALSE)
+viewport[C]->(viewport[D]) 
+> popViewport(0)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("depth")
+> ### * depth
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: depth
+> ### Title: Determine the number of levels in an object.
+> ### Aliases: depth depth.viewport depth.path
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> vp <- viewport()
+> depth(vp)
+[1] 1
+> depth(vpStack(vp, vp))
+[1] 2
+> depth(vpList(vpStack(vp, vp), vp))
+[1] 1
+> depth(vpPath("vp"))
+[1] 1
+> depth(vpPath("vp1", "vp2"))
+[1] 2
+> 
+> 
+> 
+> cleanEx()
+> nameEx("explode")
+> ### * explode
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: explode
+> ### Title: Explode a path into its components.
+> ### Aliases: explode explode.character explode.path
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> explode("vp1::vp2")
+[1] "vp1" "vp2"
+> explode(vpPath("vp1", "vp2"))
+[1] "vp1" "vp2"
+> 
+> 
+> 
+> cleanEx()
+> nameEx("gEdit")
+> ### * gEdit
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: gEdit
+> ### Title: Create and Apply Edit Objects
+> ### Aliases: gEdit gEditList applyEdit applyEdits
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> grid.rect(gp=gpar(col="red"))
+> # same thing, but more verbose
+> grid.draw(applyEdit(rectGrob(), gEdit(gp=gpar(col="red"))))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("gPath")
+> ### * gPath
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: gPath
+> ### Title: Concatenate Grob Names
+> ### Aliases: gPath
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> gPath("g1", "g2")
+g1::g2 
+> 
+> 
+> 
+> cleanEx()
+> nameEx("getNames")
+> ### * getNames
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: getNames
+> ### Title: List the names of grobs on the display list
+> ### Aliases: getNames
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> grid.grill()
+> getNames()
+[1] "GRID.text.165"     "GRID.rect.166"     "GRID.rect.167"    
+[4] "GRID.segments.168" "GRID.segments.169"
+> 
+> 
+> 
+> cleanEx()
+> nameEx("gpar")
+> ### * gpar
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: gpar
+> ### Title: Handling Grid Graphical Parameters
+> ### Aliases: gpar get.gpar
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> gp <- get.gpar()
+> utils::str(gp)
+List of 14
+ $ fill      : chr "transparent"
+ $ col       : chr "black"
+ $ lty       : chr "solid"
+ $ lwd       : num 1
+ $ cex       : num 1
+ $ fontsize  : num 12
+ $ lineheight: num 1.2
+ $ font      : int 1
+ $ fontfamily: chr ""
+ $ alpha     : num 1
+ $ lineend   : chr "round"
+ $ linejoin  : chr "round"
+ $ linemitre : num 10
+ $ lex       : num 1
+ - attr(*, "class")= chr "gpar"
+> ## These *do* nothing but produce a "gpar" object:
+> gpar(col = "red")
+$col
+[1] "red"
+
+> gpar(col = "blue", lty = "solid", lwd = 3, fontsize = 16)
+$col
+[1] "blue"
+
+$lty
+[1] "solid"
+
+$lwd
+[1] 3
+
+$fontsize
+[1] 16
+
+> get.gpar(c("col", "lty"))
+$col
+[1] "black"
+
+$lty
+[1] "solid"
+
+> grid.newpage()
+> vp <- viewport(w = .8, h = .8, gp = gpar(col="blue"))
+> grid.draw(gTree(children=gList(rectGrob(gp = gpar(col="red")),
++                      textGrob(paste("The rect is its own colour (red)",
++                                     "but this text is the colour",
++                                     "set by the gTree (green)",
++                                     sep = "\n"))),
++       gp = gpar(col="green"), vp = vp))
+> grid.text("This text is the colour set by the viewport (blue)",
++           y = 1, just = c("center", "bottom"),
++           gp = gpar(fontsize=20), vp = vp)
+> grid.newpage()
+> ## example with multiple values for a parameter
+> pushViewport(viewport())
+> grid.points(1:10/11, 1:10/11, gp = gpar(col=1:10))
+> popViewport()
+> 
+> 
+> 
+> cleanEx()
+> nameEx("grid.DLapply")
+> ### * grid.DLapply
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: grid.DLapply
+> ### Title: Modify the Grid Display List
+> ### Aliases: grid.DLapply
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> grid.newpage()
+> grid.rect(width=.4, height=.4, x=.25, y=.75, gp=gpar(fill="black"), name="r1")
+> grid.rect(width=.4, height=.4, x=.5, y=.5, gp=gpar(fill="grey"), name="r2")
+> grid.rect(width=.4, height=.4, x=.75, y=.25, gp=gpar(fill="white"), name="r3")
+> grid.DLapply(function(x) { if (is.grob(x)) x$gp <- gpar(); x })
+NULL
+> grid.refresh()
+> 
+> 
+> 
+> cleanEx()
+> nameEx("grid.bezier")
+> ### * grid.bezier
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: grid.bezier
+> ### Title: Draw a Bezier Curve
+> ### Aliases: grid.bezier bezierGrob
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> x <- c(0.2, 0.2, 0.4, 0.4)
+> y <- c(0.2, 0.4, 0.4, 0.2)
+> 
+> grid.newpage()
+> grid.bezier(x, y)
+> grid.bezier(c(x, x + .4), c(y + .4, y + .4),
++             id=rep(1:2, each=4))
+> grid.segments(.4, .6, .6, .6)
+> grid.bezier(x, y,
++             gp=gpar(lwd=3, fill="black"),
++             arrow=arrow(type="closed"),
++             vp=viewport(x=.9))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("grid.cap")
+> ### * grid.cap
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: grid.cap
+> ### Title: Capture a raster image
+> ### Aliases: grid.cap
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> 
+> 
+> 
+> cleanEx()
+> nameEx("grid.clip")
+> ### * grid.clip
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: grid.clip
+> ### Title: Set the Clipping Region
+> ### Aliases: grid.clip clipGrob
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> # draw across entire viewport, but clipped
+> grid.clip(x = 0.3, width = 0.1)
+> grid.lines(gp=gpar(col="green", lwd=5))
+> # draw across entire viewport, but clipped (in different place)
+> grid.clip(x = 0.7, width = 0.1)
+> grid.lines(gp=gpar(col="red", lwd=5))
+> # Viewport sets new clip region
+> pushViewport(viewport(width=0.5, height=0.5, clip=TRUE))
+> grid.lines(gp=gpar(col="grey", lwd=3))
+> # Return to original viewport;  get
+> # clip region from previous grid.clip()
+> # (NOT from previous viewport clip region)
+> popViewport()
+> grid.lines(gp=gpar(col="black"))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("grid.convert")
+> ### * grid.convert
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: grid.convert
+> ### Title: Convert Between Different grid Coordinate Systems
+> ### Aliases: convertUnit convertX convertY convertWidth convertHeight
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> ## A tautology
+> convertX(unit(1, "inches"), "inches")
+[1] 1inches
+> ## The physical units
+> convertX(unit(2.54, "cm"), "inches")
+[1] 1inches
+> convertX(unit(25.4, "mm"), "inches")
+[1] 1inches
+> convertX(unit(72.27, "points"), "inches")
+[1] 1inches
+> convertX(unit(1/12*72.27, "picas"), "inches")
+[1] 1inches
+> convertX(unit(72, "bigpts"), "inches")
+[1] 1inches
+> convertX(unit(1157/1238*72.27, "dida"), "inches")
+[1] 1inches
+> convertX(unit(1/12*1157/1238*72.27, "cicero"), "inches")
+[1] 1inches
+> convertX(unit(65536*72.27, "scaledpts"), "inches")
+[1] 1inches
+> convertX(unit(1/2.54, "inches"), "cm")
+[1] 1cm
+> convertX(unit(1/25.4, "inches"), "mm")
+[1] 1mm
+> convertX(unit(1/72.27, "inches"), "points")
+[1] 1points
+> convertX(unit(1/(1/12*72.27), "inches"), "picas")
+[1] 1picas
+> convertX(unit(1/72, "inches"), "bigpts")
+[1] 1bigpts
+> convertX(unit(1/(1157/1238*72.27), "inches"), "dida")
+[1] 1dida
+> convertX(unit(1/(1/12*1157/1238*72.27), "inches"), "cicero")
+[1] 1cicero
+> convertX(unit(1/(65536*72.27), "inches"), "scaledpts")
+[1] 1scaledpts
+> 
+> pushViewport(viewport(width=unit(1, "inches"),
++                        height=unit(2, "inches"),
++                        xscale=c(0, 1),
++                        yscale=c(1, 3)))
+>   ## Location versus dimension
+>   convertY(unit(2, "native"), "inches")
+[1] 1inches
+>   convertHeight(unit(2, "native"), "inches")
+[1] 2inches
+>   ## From "x" to "y" (the conversion is via "inches")
+>   convertUnit(unit(1, "native"), "native",
++                axisFrom="x", axisTo="y")
+[1] 2native
+>   ## Convert several values at once
+>   convertX(unit(c(0.5, 2.54), c("npc", "cm")),
++                 c("inches", "native"))
+[1] 0.5inches 1native  
+> popViewport()
+> ## Convert a complex unit
+> convertX(unit(1, "strwidth", "Hello"), "native")
+[1] 0.0558333333333333native
+> 
+> 
+> 
+> cleanEx()
+> nameEx("grid.curve")
+> ### * grid.curve
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: grid.curve
+> ### Title: Draw a Curve Between Locations
+> ### Aliases: grid.curve curveGrob arcCurvature
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> curveTest <- function(i, j, ...) {
++   pushViewport(viewport(layout.pos.col=j, layout.pos.row=i))
++   do.call("grid.curve", c(list(x1=.25, y1=.25, x2=.75, y2=.75), list(...)))
++   grid.text(sub("list\\((.*)\\)", "\\1",
++                 deparse(substitute(list(...)))),
++             y=unit(1, "npc"))
++   popViewport()
++ }
+> # grid.newpage()
+> pushViewport(plotViewport(c(0, 0, 1, 0),
++                           layout=grid.layout(2, 1, heights=c(2, 1))))
+> pushViewport(viewport(layout.pos.row=1,
++                       layout=grid.layout(3, 3, respect=TRUE)))
+> curveTest(1, 1)
+> curveTest(1, 2, inflect=TRUE)
+> curveTest(1, 3, angle=135)
+> curveTest(2, 1, arrow=arrow())
+> curveTest(2, 2, ncp=8)
+> curveTest(2, 3, shape=0)
+> curveTest(3, 1, curvature=-1)
+> curveTest(3, 2, square=FALSE)
+> curveTest(3, 3, debug=TRUE)
+> popViewport()
+> pushViewport(viewport(layout.pos.row=2,
++                       layout=grid.layout(3, 3)))
+> curveTest(1, 1)
+> curveTest(1, 2, inflect=TRUE)
+> curveTest(1, 3, angle=135)
+> curveTest(2, 1, arrow=arrow())
+> curveTest(2, 2, ncp=8)
+> curveTest(2, 3, shape=0)
+> curveTest(3, 1, curvature=-1)
+> curveTest(3, 2, square=FALSE)
+> curveTest(3, 3, debug=TRUE)
+> popViewport(2)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("grid.delay")
+> ### * grid.delay
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: grid.delay
+> ### Title: Encapsulate calculations and generating a grob
+> ### Aliases: grid.delay delayGrob
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> grid.delay({
++               w <- convertWidth(unit(1, "inches"), "npc")
++               rectGrob(width=w)
++             },
++             list())
+> 
+> 
+> 
+> cleanEx()
+> nameEx("grid.draw")
+> ### * grid.draw
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: grid.draw
+> ### Title: Draw a grid grob
+> ### Aliases: grid.draw
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> grid.newpage()
+> ## Create a graphical object, but don't draw it
+> l <- linesGrob()
+> ## Draw it
+> grid.draw(l)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("grid.edit")
+> ### * grid.edit
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: grid.edit
+> ### Title: Edit the Description of a Grid Graphical Object
+> ### Aliases: grid.edit grid.gedit editGrob
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> grid.newpage()
+> grid.xaxis(name = "xa", vp = viewport(width=.5, height=.5))
+> grid.edit("xa", gp = gpar(col="red"))
+> # won't work because no ticks (at is NULL)
+> try(grid.edit(gPath("xa", "ticks"), gp = gpar(col="green")))
+Error in editDLfromGPath(gPath, specs, strict, grep, global, redraw) : 
+  'gPath' (xa::ticks) not found
+> grid.edit("xa", at = 1:4/5)
+> # Now it should work
+> try(grid.edit(gPath("xa", "ticks"), gp = gpar(col="green")))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("grid.force")
+> ### * grid.force
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: grid.force
+> ### Title: Force a grob into its components
+> ### Aliases: grid.force grid.force.default grid.force.gPath grid.force.grob
+> ###   forceGrob grid.revert grid.revert.gPath grid.revert.grob
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> grid.newpage()
+> pushViewport(viewport(width=.5, height=.5))
+> # Draw xaxis
+> grid.xaxis(name="xax")
+> grid.ls()
+GRID.text.244
+xax
+> # Force xaxis
+> grid.force()
+> grid.ls()
+GRID.text.244
+xax
+  major
+  ticks
+  labels
+> # Revert xaxis
+> grid.revert()
+> grid.ls()
+GRID.text.244
+xax
+> # Draw and force yaxis
+> grid.force(yaxisGrob(), draw=TRUE)
+forcedgrob[GRID.yaxis.245] 
+> grid.ls()
+GRID.text.244
+xax
+GRID.yaxis.245
+  major
+  ticks
+  labels
+> # Revert yaxis
+> grid.revert()
+> grid.ls()
+GRID.text.244
+xax
+GRID.yaxis.245
+> # Force JUST xaxis
+> grid.force("xax")
+> grid.ls()
+GRID.text.244
+xax
+  major
+  ticks
+  labels
+GRID.yaxis.245
+> # Force ALL
+> grid.force()
+> grid.ls()
+GRID.text.244
+xax
+  major
+  ticks
+  labels
+GRID.yaxis.245
+  major
+  ticks
+  labels
+> # Revert JUST xaxis
+> grid.revert("xax")
+> grid.ls()
+GRID.text.244
+xax
+GRID.yaxis.245
+  major
+  ticks
+  labels
+> 
+> 
+> 
+> cleanEx()
+> nameEx("grid.frame")
+> ### * grid.frame
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: grid.frame
+> ### Title: Create a Frame for Packing Objects
+> ### Aliases: grid.frame frameGrob
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> grid.newpage()
+> grid.frame(name="gf", draw=TRUE)
+> grid.pack("gf", rectGrob(gp=gpar(fill="grey")), width=unit(1, "null"))
+> grid.pack("gf", textGrob("hi there"), side="right")
+> 
+> 
+> 
+> cleanEx()
+> nameEx("grid.function")
+> ### * grid.function
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: grid.function
+> ### Title: Draw a curve representing a function
+> ### Aliases: grid.function functionGrob grid.abline
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+>     # abline
+>     # NOTE: in ROOT viewport on screen, (0, 0) at top-left
+>     #       and "native" is pixels!
+>     grid.function(function(x) list(x=x, y=0 + 1*x))
+>     # a more "normal" viewport with default normalized "native" coords
+>     grid.newpage()
+>     pushViewport(viewport())
+>     grid.function(function(x) list(x=x, y=0 + 1*x))
+>     # slightly simpler
+>     grid.newpage()
+>     pushViewport(viewport())
+>     grid.abline()
+>     # sine curve
+>     grid.newpage()
+>     pushViewport(viewport(xscale=c(0, 2*pi), yscale=c(-1, 1)))
+>     grid.function(function(x) list(x=x, y=sin(x)))
+>     # constrained sine curve
+>     grid.newpage()
+>     pushViewport(viewport(xscale=c(0, 2*pi), yscale=c(-1, 1)))
+>     grid.function(function(x) list(x=x, y=sin(x)),
++                   range=0:1)
+>     # inverse sine curve
+>     grid.newpage()
+>     pushViewport(viewport(xscale=c(-1, 1), yscale=c(0, 2*pi)))
+>     grid.function(function(y) list(x=sin(y), y=y),
++                   range="y")
+>     # parametric function
+>     grid.newpage()
+>     pushViewport(viewport(xscale=c(-1, 1), yscale=c(-1, 1)))
+>     grid.function(function(t) list(x=cos(t), y=sin(t)),
++                   range=c(0, 9*pi/5))
+>     # physical abline
+>     grid.newpage()
+>     grid.function(function(x) list(x=x, y=0 + 1*x),
++                   units="in")
+> 
+> 
+> 
+> cleanEx()
+> nameEx("grid.get")
+> ### * grid.get
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: grid.get
+> ### Title: Get a Grid Graphical Object
+> ### Aliases: grid.get grid.gget getGrob
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> grid.xaxis(name="xa")
+> grid.get("xa")
+xaxis[xa] 
+> grid.get(gPath("xa", "ticks"))
+NULL
+> 
+> grid.draw(gTree(name="gt", children=gList(xaxisGrob(name="axis"))))
+> grid.get(gPath("gt", "axis", "ticks"))
+NULL
+> 
+> 
+> 
+> cleanEx()
+> nameEx("grid.grab")
+> ### * grid.grab
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: grid.grab
+> ### Title: Grab the current grid output
+> ### Aliases: grid.grab grid.grabExpr
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> pushViewport(viewport(w=.5, h=.5))
+> grid.rect()
+> grid.points(stats::runif(10), stats::runif(10))
+> popViewport()
+> grab <- grid.grab()
+> grid.newpage()
+> grid.draw(grab)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("grid.grep")
+> ### * grid.grep
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: grid.grep
+> ### Title: Search for grobs
+> ### Aliases: grid.grep
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> # A gTree, called "grandparent", with child gTree,
+> # called "parent", with childrenvp vpStack (vp2 within vp1)
+> # and child grob, called "child", with vp vpPath (down to vp2)
+> sampleGTree <- gTree(name="grandparent",
++                      children=gList(gTree(name="parent",
++                           children=gList(grob(name="child", vp="vp1::vp2")),
++                           childrenvp=vpStack(viewport(name="vp1"),
++                                              viewport(name="vp2")))))
+> # Searching for grobs
+> grid.grep("parent", sampleGTree)
+grandparent::parent 
+> grid.grep("parent", sampleGTree, strict=TRUE)
+character(0)
+> grid.grep("grandparent", sampleGTree, strict=TRUE)
+grandparent 
+> grid.grep("grandparent::parent", sampleGTree)
+grandparent::parent 
+> grid.grep("parent::child", sampleGTree)
+grandparent::parent::child 
+> grid.grep("[a-z]", sampleGTree, grep=TRUE)
+grandparent 
+> grid.grep("[a-z]", sampleGTree, grep=TRUE, global=TRUE)
+[[1]]
+grandparent 
+
+[[2]]
+grandparent::parent 
+
+[[3]]
+grandparent::parent::child 
+
+> # Searching for viewports
+> grid.grep("vp1", sampleGTree, viewports=TRUE)
+vp1 
+> grid.grep("vp2", sampleGTree, viewports=TRUE)
+vp1::vp2 
+> grid.grep("vp", sampleGTree, viewports=TRUE, grep=TRUE)
+vp1 
+> grid.grep("vp2", sampleGTree, viewports=TRUE, strict=TRUE)
+character(0)
+> grid.grep("vp1::vp2", sampleGTree, viewports=TRUE)
+vp1::vp2 
+> # Searching for both
+> grid.grep("[a-z]", sampleGTree, viewports=TRUE, grep=TRUE, global=TRUE)
+[[1]]
+grandparent 
+
+[[2]]
+grandparent::parent 
+
+[[3]]
+vp1 
+
+[[4]]
+vp1::vp2 
+
+[[5]]
+grandparent::parent::child 
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("grid.layout")
+> ### * grid.layout
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: grid.layout
+> ### Title: Create a Grid Layout
+> ### Aliases: grid.layout
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> ## A variety of layouts (some a bit mid-bending ...)
+> layout.torture()
+> ## Demonstration of layout justification
+> grid.newpage()
+> testlay <- function(just="centre") {
++   pushViewport(viewport(layout=grid.layout(1, 1, widths=unit(1, "inches"),
++                           heights=unit(0.25, "npc"),
++                           just=just)))
++   pushViewport(viewport(layout.pos.col=1, layout.pos.row=1))
++   grid.rect()
++   grid.text(paste(just, collapse="-"))
++   popViewport(2)
++ }
+> testlay()
+> testlay(c("left", "top"))
+> testlay(c("right", "top"))
+> testlay(c("right", "bottom"))
+> testlay(c("left", "bottom"))
+> testlay(c("left"))
+> testlay(c("right"))
+> testlay(c("bottom"))
+> testlay(c("top"))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("grid.lines")
+> ### * grid.lines
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: grid.lines
+> ### Title: Draw Lines in a Grid Viewport
+> ### Aliases: grid.lines linesGrob grid.polyline polylineGrob
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> grid.lines()
+> # Using id (NOTE: locations are not in consecutive blocks)
+> grid.newpage()
+> grid.polyline(x=c((0:4)/10, rep(.5, 5), (10:6)/10, rep(.5, 5)),
++              y=c(rep(.5, 5), (10:6/10), rep(.5, 5), (0:4)/10),
++              id=rep(1:5, 4),
++              gp=gpar(col=1:5, lwd=3))
+> # Using id.lengths
+> grid.newpage()
+> grid.polyline(x=outer(c(0, .5, 1, .5), 5:1/5),
++              y=outer(c(.5, 1, .5, 0), 5:1/5),
++              id.lengths=rep(4, 5),
++              gp=gpar(col=1:5, lwd=3))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("grid.locator")
+> ### * grid.locator
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: grid.locator
+> ### Title: Capture a Mouse Click
+> ### Aliases: grid.locator
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> if (interactive()) {
++   ## Need to write a more sophisticated unit as.character method
++   unittrim <- function(unit) {
++     sub("^([0-9]+|[0-9]+[.][0-9])[0-9]*", "\\1", as.character(unit))
++   }
++   do.click <- function(unit) {
++     click.locn <- grid.locator(unit)
++     grid.segments(unit.c(click.locn$x, unit(0, "npc")),
++                   unit.c(unit(0, "npc"), click.locn$y),
++                   click.locn$x, click.locn$y,
++                   gp=gpar(lty="dashed", col="grey"))
++     grid.points(click.locn$x, click.locn$y, pch=16, size=unit(1, "mm"))
++     clickx <- unittrim(click.locn$x)
++     clicky <- unittrim(click.locn$y)
++     grid.text(paste0("(", clickx, ", ", clicky, ")"),
++               click.locn$x + unit(2, "mm"), click.locn$y,
++               just="left")
++   }
++   do.click("inches")
++   pushViewport(viewport(width=0.5, height=0.5,
++                          xscale=c(0, 100), yscale=c(0, 10)))
++   grid.rect()
++   grid.xaxis()
++   grid.yaxis()
++   do.click("native")
++   popViewport()
++ }
+> 
+> 
+> 
+> cleanEx()
+> nameEx("grid.ls")
+> ### * grid.ls
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: grid.ls
+> ### Title: List the names of grobs or viewports
+> ### Aliases: grid.ls nestedListing pathListing grobPathListing
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> # A gTree, called "parent", with childrenvp vpTree (vp2 within vp1)
+> # and child grob, called "child", with vp vpPath (down to vp2)
+> sampleGTree <- gTree(name="parent",
++                      children=gList(grob(name="child", vp="vp1::vp2")),
++                      childrenvp=vpTree(parent=viewport(name="vp1"),
++                                        children=vpList(viewport(name="vp2"))))
+> grid.ls(sampleGTree)
+parent
+  child
+> # Show viewports too
+> grid.ls(sampleGTree, view=TRUE)
+parent
+  vp1
+    vp2
+      2
+  vp1
+    vp2
+      child
+      2
+> # Only show viewports
+> grid.ls(sampleGTree, view=TRUE, grob=FALSE)
+vp1
+  vp2
+    2
+vp1
+  vp2
+    2
+> # Alternate displays
+> # nested listing, custom indent
+> grid.ls(sampleGTree, view=TRUE, print=nestedListing, gindent="--")
+parent
+--vp1
+----vp2
+------2
+--vp1
+----vp2
+------child
+------2
+> # path listing
+> grid.ls(sampleGTree, view=TRUE, print=pathListing)
+            | parent
+vp1
+vp1::vp2
+vp1::vp2::2
+vp1
+vp1::vp2
+vp1::vp2    | parent::child
+vp1::vp2::2
+> # path listing, without grobs aligned
+> grid.ls(sampleGTree, view=TRUE, print=pathListing, gAlign=FALSE)
+ | parent
+vp1
+vp1::vp2
+vp1::vp2::2
+vp1
+vp1::vp2
+vp1::vp2 | parent::child
+vp1::vp2::2
+> # grob path listing
+> grid.ls(sampleGTree, view=TRUE, print=grobPathListing)
+         | parent
+vp1::vp2 | parent::child
+> # path listing, grobs only
+> grid.ls(sampleGTree, print=pathListing)
+ | parent
+ | parent::child
+> # path listing, viewports only
+> grid.ls(sampleGTree, view=TRUE, grob=FALSE, print=pathListing)
+vp1
+vp1::vp2
+vp1::vp2::2
+vp1
+vp1::vp2
+vp1::vp2::2
+> # raw flat listing
+> str(grid.ls(sampleGTree, view=TRUE, print=FALSE))
+List of 6
+ $ name   : chr [1:8] "parent" "vp1" "vp2" "2" ...
+ $ gDepth : num [1:8] 0 1 1 1 1 1 1 1
+ $ vpDepth: num [1:8] 0 0 1 2 0 1 2 2
+ $ gPath  : chr [1:8] "" "parent" "parent" "parent" ...
+ $ vpPath : chr [1:8] "" "" "vp1" "vp1::vp2" ...
+ $ type   : chr [1:8] "gTreeListing" "vpListing" "vpListing" "vpUpListing" ...
+ - attr(*, "class")= chr "flatGridListing"
+> 
+> 
+> 
+> cleanEx()
+> nameEx("grid.move.to")
+> ### * grid.move.to
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: grid.move.to
+> ### Title: Move or Draw to a Specified Position
+> ### Aliases: grid.move.to grid.line.to moveToGrob lineToGrob
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> grid.newpage()
+> grid.move.to(0.5, 0.5)
+> grid.line.to(1, 1)
+> grid.line.to(0.5, 0)
+> pushViewport(viewport(x=0, y=0, w=0.25, h=0.25, just=c("left", "bottom")))
+> grid.rect()
+> grid.grill()
+> grid.line.to(0.5, 0.5)
+> popViewport()
+> 
+> 
+> 
+> cleanEx()
+> nameEx("grid.null")
+> ### * grid.null
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: grid.null
+> ### Title: Null Graphical Object
+> ### Aliases: grid.null nullGrob
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> grid.newpage()
+> grid.null(name="ref")
+> grid.rect(height=grobHeight("ref"))
+> grid.segments(0, 0, grobX("ref", 0), grobY("ref", 0))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("grid.path")
+> ### * grid.path
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: grid.path
+> ### Title: Draw a Path
+> ### Aliases: grid.path pathGrob
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> pathSample <- function(x, y, rule, gp = gpar()) {
++     if (is.na(rule))
++         grid.path(x, y, id = rep(1:2, each = 4), gp = gp)
++     else
++         grid.path(x, y, id = rep(1:2, each = 4), rule = rule, gp = gp)
++     if (!is.na(rule))
++         grid.text(paste("Rule:", rule), y = 0, just = "bottom")
++ }
+> 
+> pathTriplet <- function(x, y, title) {
++     pushViewport(viewport(height = 0.9, layout = grid.layout(1, 3),
++                           gp = gpar(cex = .7)))
++     grid.rect(y = 1, height = unit(1, "char"), just = "top",
++               gp = gpar(col = NA, fill = "grey"))
++     grid.text(title, y = 1, just = "top")
++     pushViewport(viewport(layout.pos.col = 1))
++     pathSample(x, y, rule = "winding",
++                gp = gpar(fill = "grey"))
++     popViewport()
++     pushViewport(viewport(layout.pos.col = 2))
++     pathSample(x, y, rule = "evenodd",
++                gp = gpar(fill = "grey"))
++     popViewport()
++     pushViewport(viewport(layout.pos.col = 3))
++     pathSample(x, y, rule = NA)
++     popViewport()
++     popViewport()
++ }
+> 
+> pathTest <- function() {
++     grid.newpage()
++     pushViewport(viewport(layout = grid.layout(5, 1)))
++     pushViewport(viewport(layout.pos.row = 1))
++     pathTriplet(c(.1, .1, .9, .9, .2, .2, .8, .8),
++                 c(.1, .9, .9, .1, .2, .8, .8, .2),
++                 "Nested rectangles, both clockwise")
++     popViewport()
++     pushViewport(viewport(layout.pos.row = 2))
++     pathTriplet(c(.1, .1, .9, .9, .2, .8, .8, .2),
++                 c(.1, .9, .9, .1, .2, .2, .8, .8),
++                 "Nested rectangles, outer clockwise, inner anti-clockwise")
++     popViewport()
++     pushViewport(viewport(layout.pos.row = 3))
++     pathTriplet(c(.1, .1, .4, .4, .6, .9, .9, .6),
++                 c(.1, .4, .4, .1, .6, .6, .9, .9),
++                 "Disjoint rectangles")
++     popViewport()
++     pushViewport(viewport(layout.pos.row = 4))
++     pathTriplet(c(.1, .1, .6, .6, .4, .4, .9, .9),
++                 c(.1, .6, .6, .1, .4, .9, .9, .4),
++                 "Overlapping rectangles, both clockwise")
++     popViewport()
++     pushViewport(viewport(layout.pos.row = 5))
++     pathTriplet(c(.1, .1, .6, .6, .4, .9, .9, .4),
++                 c(.1, .6, .6, .1, .4, .4, .9, .9),
++                 "Overlapping rectangles, one clockwise, other anti-clockwise")
++     popViewport()
++     popViewport()
++ }
+> 
+> pathTest()
+> 
+> 
+> 
+> cleanEx()
+> nameEx("grid.plot.and.legend")
+> ### * grid.plot.and.legend
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: grid.plot.and.legend
+> ### Title: A Simple Plot and Legend Demo
+> ### Aliases: grid.plot.and.legend
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> grid.plot.and.legend()
+> 
+> 
+> 
+> cleanEx()
+> nameEx("grid.polygon")
+> ### * grid.polygon
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: grid.polygon
+> ### Title: Draw a Polygon
+> ### Aliases: grid.polygon polygonGrob
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> grid.polygon()
+> # Using id (NOTE: locations are not in consecutive blocks)
+> grid.newpage()
+> grid.polygon(x=c((0:4)/10, rep(.5, 5), (10:6)/10, rep(.5, 5)),
++              y=c(rep(.5, 5), (10:6/10), rep(.5, 5), (0:4)/10),
++              id=rep(1:5, 4),
++              gp=gpar(fill=1:5))
+> # Using id.lengths
+> grid.newpage()
+> grid.polygon(x=outer(c(0, .5, 1, .5), 5:1/5),
++              y=outer(c(.5, 1, .5, 0), 5:1/5),
++              id.lengths=rep(4, 5),
++              gp=gpar(fill=1:5))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("grid.raster")
+> ### * grid.raster
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: grid.raster
+> ### Title: Render a raster object
+> ### Aliases: grid.raster rasterGrob
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> redGradient <- matrix(hcl(0, 80, seq(50, 80, 10)),
++                       nrow=4, ncol=5)
+> # interpolated
+> grid.newpage()
+> grid.raster(redGradient)
+> # blocky
+> grid.newpage()
+> grid.raster(redGradient, interpolate=FALSE)
+> # blocky and stretched
+> grid.newpage()
+> grid.raster(redGradient, interpolate=FALSE, height=unit(1, "npc"))
+> 
+> # The same raster drawn several times
+> grid.newpage()
+> grid.raster(0, x=1:3/4, y=1:3/4, w=.1, interp=FALSE)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("grid.record")
+> ### * grid.record
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: grid.record
+> ### Title: Encapsulate calculations and drawing
+> ### Aliases: grid.record recordGrob
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> grid.record({
++               w <- convertWidth(unit(1, "inches"), "npc")
++               grid.rect(width=w)
++             },
++             list())
+> 
+> 
+> 
+> cleanEx()
+> nameEx("grid.reorder")
+> ### * grid.reorder
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: grid.reorder
+> ### Title: Reorder the children of a gTree
+> ### Aliases: grid.reorder reorderGrob
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> # gTree with two children, "red-rect" and "blue-rect" (in that order)
+> gt <- gTree(children=gList(
++                 rectGrob(gp=gpar(col=NA, fill="red"),
++                          width=.8, height=.2, name="red-rect"),
++                 rectGrob(gp=gpar(col=NA, fill="blue"),
++                          width=.2, height=.8, name="blue-rect")),
++             name="gt")
+> grid.newpage()
+> grid.draw(gt)
+> # Spec entire order as numeric (blue-rect, red-rect)
+> grid.reorder("gt", 2:1)
+> # Spec entire order as character
+> grid.reorder("gt", c("red-rect", "blue-rect"))
+> # Only spec the one I want behind as character
+> grid.reorder("gt", "blue-rect")
+> # Only spec the one I want in front as character
+> grid.reorder("gt", "blue-rect", back=FALSE)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("grid.roundrect")
+> ### * grid.roundrect
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: roundrect
+> ### Title: Draw a rectangle with rounded corners
+> ### Aliases: roundrect grid.roundrect roundrectGrob
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> grid.roundrect(width=.5, height=.5, name="rr")
+> theta <- seq(0, 360, length=50)
+> for (i in 1:50)
++     grid.circle(x=grobX("rr", theta[i]),
++                 y=grobY("rr", theta[i]),
++                 r=unit(1, "mm"),
++                 gp=gpar(fill="black"))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("grid.show.layout")
+> ### * grid.show.layout
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: grid.show.layout
+> ### Title: Draw a Diagram of a Grid Layout
+> ### Aliases: grid.show.layout
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> ## Diagram of a simple layout
+> grid.show.layout(grid.layout(4,2,
++                      heights=unit(rep(1, 4),
++                                   c("lines", "lines", "lines", "null")),
++                      widths=unit(c(1, 1), "inches")))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("grid.show.viewport")
+> ### * grid.show.viewport
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: grid.show.viewport
+> ### Title: Draw a Diagram of a Grid Viewport
+> ### Aliases: grid.show.viewport
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> ## Diagram of a sample viewport
+> grid.show.viewport(viewport(x=0.6, y=0.6,
++                             w=unit(1, "inches"), h=unit(1, "inches")))
+> grid.show.viewport(viewport(layout.pos.row=2, layout.pos.col=2:3),
++                    grid.layout(3, 4))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("grid.text")
+> ### * grid.text
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: grid.text
+> ### Title: Draw Text
+> ### Aliases: grid.text textGrob
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> grid.newpage()
+> x <- stats::runif(20)
+> y <- stats::runif(20)
+> rot <- stats::runif(20, 0, 360)
+> grid.text("SOMETHING NICE AND BIG", x=x, y=y, rot=rot,
++           gp=gpar(fontsize=20, col="grey"))
+> grid.text("SOMETHING NICE AND BIG", x=x, y=y, rot=rot,
++           gp=gpar(fontsize=20), check=TRUE)
+> grid.newpage()
+> draw.text <- function(just, i, j) {
++   grid.text("ABCD", x=x[j], y=y[i], just=just)
++   grid.text(deparse(substitute(just)), x=x[j], y=y[i] + unit(2, "lines"),
++             gp=gpar(col="grey", fontsize=8))
++ }
+> x <- unit(1:4/5, "npc")
+> y <- unit(1:4/5, "npc")
+> grid.grill(h=y, v=x, gp=gpar(col="grey"))
+> draw.text(c("bottom"), 1, 1)
+> draw.text(c("left", "bottom"), 2, 1)
+> draw.text(c("right", "bottom"), 3, 1)
+> draw.text(c("centre", "bottom"), 4, 1)
+> draw.text(c("centre"), 1, 2)
+> draw.text(c("left", "centre"), 2, 2)
+> draw.text(c("right", "centre"), 3, 2)
+> draw.text(c("centre", "centre"), 4, 2)
+> draw.text(c("top"), 1, 3)
+> draw.text(c("left", "top"), 2, 3)
+> draw.text(c("right", "top"), 3, 3)
+> draw.text(c("centre", "top"), 4, 3)
+> draw.text(c(), 1, 4)
+> draw.text(c("left"), 2, 4)
+> draw.text(c("right"), 3, 4)
+> draw.text(c("centre"), 4, 4)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("grid.xspline")
+> ### * grid.xspline
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: grid.xspline
+> ### Title: Draw an Xspline
+> ### Aliases: grid.xspline xsplineGrob
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> x <- c(0.25, 0.25, 0.75, 0.75)
+> y <- c(0.25, 0.75, 0.75, 0.25)
+> 
+> xsplineTest <- function(s, i, j, open) {
++   pushViewport(viewport(layout.pos.col=j, layout.pos.row=i))
++   grid.points(x, y, default.units="npc", pch=16, size=unit(2, "mm"))
++   grid.xspline(x, y, shape=s, open=open, gp=gpar(fill="grey"))
++   grid.text(s, gp=gpar(col="grey"),
++             x=unit(x, "npc") + unit(c(-1, -1, 1, 1), "mm"),
++             y=unit(y, "npc") + unit(c(-1, 1, 1, -1), "mm"),
++             hjust=c(1, 1, 0, 0),
++             vjust=c(1, 0, 0, 1))
++   popViewport()
++ }
+> 
+> pushViewport(viewport(width=.5, x=0, just="left",
++                       layout=grid.layout(3, 3, respect=TRUE)))
+> pushViewport(viewport(layout.pos.row=1))
+> grid.text("Open Splines", y=1, just="bottom")
+> popViewport()
+> xsplineTest(c(0, -1, -1, 0), 1, 1, TRUE)
+> xsplineTest(c(0, -1,  0, 0), 1, 2, TRUE)
+> xsplineTest(c(0, -1,  1, 0), 1, 3, TRUE)
+> xsplineTest(c(0,  0, -1, 0), 2, 1, TRUE)
+> xsplineTest(c(0,  0,  0, 0), 2, 2, TRUE)
+> xsplineTest(c(0,  0,  1, 0), 2, 3, TRUE)
+> xsplineTest(c(0,  1, -1, 0), 3, 1, TRUE)
+> xsplineTest(c(0,  1,  0, 0), 3, 2, TRUE)
+> xsplineTest(c(0,  1,  1, 0), 3, 3, TRUE)
+> popViewport()
+> pushViewport(viewport(width=.5, x=1, just="right",
++                       layout=grid.layout(3, 3, respect=TRUE)))
+> pushViewport(viewport(layout.pos.row=1))
+> grid.text("Closed Splines", y=1, just="bottom")
+> popViewport()
+> xsplineTest(c(-1, -1, -1, -1), 1, 1, FALSE)
+> xsplineTest(c(-1, -1,  0, -1), 1, 2, FALSE)
+> xsplineTest(c(-1, -1,  1, -1), 1, 3, FALSE)
+> xsplineTest(c( 0,  0, -1,  0), 2, 1, FALSE)
+> xsplineTest(c( 0,  0,  0,  0), 2, 2, FALSE)
+> xsplineTest(c( 0,  0,  1,  0), 2, 3, FALSE)
+> xsplineTest(c( 1,  1, -1,  1), 3, 1, FALSE)
+> xsplineTest(c( 1,  1,  0,  1), 3, 2, FALSE)
+> xsplineTest(c( 1,  1,  1,  1), 3, 3, FALSE)
+> popViewport()
+> 
+> 
+> 
+> cleanEx()
+> nameEx("legendGrob")
+> ### * legendGrob
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: legendGrob
+> ### Title: Constructing a Legend Grob
+> ### Aliases: legendGrob grid.legend
+> ### Keywords: aplot
+> 
+> ### ** Examples
+> 
+>   ## Data:
+>   n <- 10
+>   x <- stats::runif(n) ; y1 <- stats::runif(n) ; y2 <- stats::runif(n)
+>   ## Construct the grobs :
+>   plot <- gTree(children=gList(rectGrob(),
++                   pointsGrob(x, y1, pch=21, gp=gpar(col=2, fill="gray")),
++                   pointsGrob(x, y2, pch=22, gp=gpar(col=3, fill="gray")),
++                   xaxisGrob(),
++                   yaxisGrob()))
+>   legd <- legendGrob(c("Girls", "Boys", "Other"), pch=21:23,
++                      gp=gpar(col = 2:4, fill = "gray"))
+>   gg <- packGrob(packGrob(frameGrob(), plot),
++                  legd, height=unit(1,"null"), side="right")
+> 
+>   ## Now draw it on a new device page:
+>   grid.newpage()
+>   pushViewport(viewport(width=0.8, height=0.8))
+>   grid.draw(gg)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("resolveRasterSize")
+> ### * resolveRasterSize
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: resolveRasterSize
+> ### Title: Utility function to resolve the size of a raster grob
+> ### Aliases: resolveRasterSize
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> # Square raster
+> rg <- rasterGrob(matrix(0))
+> # Fill the complete page (if page is square)
+> grid.newpage()
+> resolveRasterSize(rg)$height
+[1] 6.8inches
+> grid.draw(rg)
+> # Forced to fit tall thin region
+> grid.newpage()
+> pushViewport(viewport(width=.1))
+> resolveRasterSize(rg)$height
+[1] 0.68inches
+> grid.draw(rg)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("showGrob")
+> ### * showGrob
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: showGrob
+> ### Title: Label grid grobs.
+> ### Aliases: showGrob
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+>     grid.newpage()
+>     gt <- gTree(childrenvp=vpStack(
++                   viewport(x=0, width=.5, just="left", name="vp"),
++                   viewport(y=.5, height=.5, just="bottom", name="vp2")),
++                 children=gList(rectGrob(vp="vp::vp2", name="child")),
++                 name="parent")
+>     grid.draw(gt)
+>     showGrob()
+>     showGrob(gPath="child")
+>     showGrob(recurse=FALSE)
+>     showGrob(depth=1)
+>     showGrob(depth=2)
+>     showGrob(depth=1:2)
+>     showGrob(gt)
+>     showGrob(gt, gPath="child")
+>     showGrob(just="left", gp=gpar(col="red", cex=.5), rot=45)
+>     showGrob(labelfun=function(grob, ...) {
++         x <- grobX(grob, "west")
++         y <- grobY(grob, "north")
++         gTree(children=gList(rectGrob(x=x, y=y,
++                 width=stringWidth(grob$name) + unit(2, "mm"),
++                 height=stringHeight(grob$name) + unit(2, "mm"),
++                 gp=gpar(col=NA, fill=rgb(1, 0, 0, .5)),
++                 just=c("left", "top")),
++                 textGrob(grob$name,
++                          x=x + unit(1, "mm"), y=y - unit(1, "mm"),
++                          just=c("left", "top"))))
++     })
+> 
+> ## Not run: 
+> ##D     # Examples from higher-level packages
+> ##D 
+> ##D     library(lattice)
+> ##D     # Ctrl-c after first example
+> ##D     example(histogram)
+> ##D     showGrob()
+> ##D     showGrob(gPath="plot_01.ylab")
+> ##D 
+> ##D     library(ggplot2)
+> ##D     # Ctrl-c after first example
+> ##D     example(qplot)
+> ##D     showGrob()
+> ##D     showGrob(recurse=FALSE)
+> ##D     showGrob(gPath="panel-3-3")
+> ##D     showGrob(gPath="axis.title", grep=TRUE)
+> ##D     showGrob(depth=2)
+> ## End(Not run)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("showViewport")
+> ### * showViewport
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: showViewport
+> ### Title: Display grid viewports.
+> ### Aliases: showViewport
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> showViewport(viewport(width=.5, height=.5, name="vp"))
+> 
+> grid.newpage()
+> pushViewport(viewport(width=.5, height=.5, name="vp"))
+> upViewport()
+> showViewport(vpPath("vp"))
+> 
+> showViewport(vpStack(viewport(width=.5, height=.5, name="vp1"),
++                      viewport(width=.5, height=.5, name="vp2")),
++              newpage=TRUE)
+> 
+> showViewport(vpStack(viewport(width=.5, height=.5, name="vp1"),
++                      viewport(width=.5, height=.5, name="vp2")),
++              fill=rgb(1:0, 0:1, 0, .1),
++              newpage=TRUE)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("unit")
+> ### * unit
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: unit
+> ### Title: Function to Create a Unit Object
+> ### Aliases: unit
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> unit(1, "npc")
+[1] 1npc
+> unit(1:3/4, "npc")
+[1] 0.25npc 0.5npc  0.75npc
+> unit(1:3/4, "npc") + unit(1, "inches")
+[1] 0.25npc+1inches 0.5npc+1inches  0.75npc+1inches
+> min(unit(0.5, "npc"), unit(1, "inches"))
+[1] min(0.5npc, 1inches)
+> unit.c(unit(0.5, "npc"), unit(2, "inches") + unit(1:3/4, "npc"),
++        unit(1, "strwidth", "hi there"))
+[1] 0.5npc          2inches+0.25npc 2inches+0.5npc  2inches+0.75npc
+[5] 1strwidth      
+> x <- unit(1:5, "npc")
+> x[2:4]
+[1] 2npc 3npc 4npc
+> x[2:4] <- unit(1, "mm")
+> x
+[1] 1npc 1mm  1mm  1mm  5npc
+> 
+> 
+> 
+> cleanEx()
+> nameEx("unit.length")
+> ### * unit.length
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: unit.length
+> ### Title: Length of a Unit Object
+> ### Aliases: unit.length
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> length(unit(1:3, "npc"))
+[1] 3
+> length(unit(1:3, "npc") + unit(1, "inches"))
+[1] 3
+> length(max(unit(1:3, "npc") + unit(1, "inches")))
+[1] 1
+> length(max(unit(1:3, "npc") + unit(1, "strwidth", "a"))*4)
+[1] 1
+> length(unit(1:3, "npc") + unit(1, "strwidth", "a")*4)
+[1] 3
+> 
+> 
+> 
+> cleanEx()
+> nameEx("unit.pmin")
+> ### * unit.pmin
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: unit.pmin
+> ### Title: Parallel Unit Minima and Maxima
+> ### Aliases: unit.pmin unit.pmax
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> max(unit(1:3, "cm"), unit(0.5, "npc"))
+[1] max(1cm, 2cm, 3cm, 0.5npc)
+> unit.pmax(unit(1:3, "cm"), unit(0.5, "npc"))
+[1] max(1cm, 0.5npc) max(2cm, 0.5npc) max(3cm, 0.5npc)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("unit.rep")
+> ### * unit.rep
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: unit.rep
+> ### Title: Replicate Elements of Unit Objects
+> ### Aliases: unit.rep
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> rep(unit(1:3, "npc"), 3)
+[1] 1npc 2npc 3npc 1npc 2npc 3npc 1npc 2npc 3npc
+> rep(unit(1:3, "npc"), 1:3)
+[1] 1npc 2npc 2npc 3npc 3npc 3npc
+> rep(unit(1:3, "npc") + unit(1, "inches"), 3)
+[1] 1npc+1inches 2npc+1inches 3npc+1inches 1npc+1inches 2npc+1inches
+[6] 3npc+1inches 1npc+1inches 2npc+1inches 3npc+1inches
+> rep(max(unit(1:3, "npc") + unit(1, "inches")), 3)
+[1] max(1npc+1inches, 2npc+1inches, 3npc+1inches)
+[2] max(1npc+1inches, 2npc+1inches, 3npc+1inches)
+[3] max(1npc+1inches, 2npc+1inches, 3npc+1inches)
+> rep(max(unit(1:3, "npc") + unit(1, "strwidth", "a"))*4, 3)
+[1] 4*max(1npc+1strwidth, 2npc+1strwidth, 3npc+1strwidth)
+[2] 4*max(1npc+1strwidth, 2npc+1strwidth, 3npc+1strwidth)
+[3] 4*max(1npc+1strwidth, 2npc+1strwidth, 3npc+1strwidth)
+> rep(unit(1:3, "npc") + unit(1, "strwidth", "a")*4, 3)
+[1] 1npc+4*1strwidth 2npc+4*1strwidth 3npc+4*1strwidth 1npc+4*1strwidth
+[5] 2npc+4*1strwidth 3npc+4*1strwidth 1npc+4*1strwidth 2npc+4*1strwidth
+[9] 3npc+4*1strwidth
+> 
+> 
+> 
+> cleanEx()
+> nameEx("viewport")
+> ### * viewport
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: Grid Viewports
+> ### Title: Create a Grid Viewport
+> ### Aliases: viewport vpList vpStack vpTree
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> # Diagram of a sample viewport
+> grid.show.viewport(viewport(x=0.6, y=0.6,
++                    w=unit(1, "inches"), h=unit(1, "inches")))
+> # Demonstrate viewport clipping
+> clip.demo <- function(i, j, clip1, clip2) {
++   pushViewport(viewport(layout.pos.col=i,
++                          layout.pos.row=j))
++   pushViewport(viewport(width=0.6, height=0.6, clip=clip1))
++   grid.rect(gp=gpar(fill="white"))
++   grid.circle(r=0.55, gp=gpar(col="red", fill="pink"))
++   popViewport()
++   pushViewport(viewport(width=0.6, height=0.6, clip=clip2))
++   grid.polygon(x=c(0.5, 1.1, 0.6, 1.1, 0.5, -0.1, 0.4, -0.1),
++                y=c(0.6, 1.1, 0.5, -0.1, 0.4, -0.1, 0.5, 1.1),
++                gp=gpar(col="blue", fill="light blue"))
++   popViewport(2)
++ }
+> 
+> grid.newpage()
+> grid.rect(gp=gpar(fill="grey"))
+> pushViewport(viewport(layout=grid.layout(2, 2)))
+> clip.demo(1, 1, FALSE, FALSE)
+> clip.demo(1, 2, TRUE, FALSE)
+> clip.demo(2, 1, FALSE, TRUE)
+> clip.demo(2, 2, TRUE, TRUE)
+> popViewport()
+> # Demonstrate turning clipping off
+> grid.newpage()
+> pushViewport(viewport(w=.5, h=.5, clip="on"))
+> grid.rect()
+> grid.circle(r=.6, gp=gpar(lwd=10))
+> pushViewport(viewport(clip="inherit"))
+> grid.circle(r=.6, gp=gpar(lwd=5, col="grey"))
+> pushViewport(viewport(clip="off"))
+> grid.circle(r=.6)
+> popViewport(3)
+> # Demonstrate vpList, vpStack, and vpTree
+> grid.newpage()
+> tree <- vpTree(viewport(w=0.8, h=0.8, name="A"),
++                vpList(vpStack(viewport(x=0.1, y=0.1, w=0.5, h=0.5,
++                                        just=c("left", "bottom"), name="B"),
++                               viewport(x=0.1, y=0.1, w=0.5, h=0.5,
++                                        just=c("left", "bottom"), name="C"),
++                               viewport(x=0.1, y=0.1, w=0.5, h=0.5,
++                                        just=c("left", "bottom"), name="D")),
++                       viewport(x=0.5, w=0.4, h=0.9,
++                                just="left", name="E")))
+> pushViewport(tree)
+> for (i in LETTERS[1:5]) {
++   seekViewport(i)
++   grid.rect()
++   grid.text(current.vpTree(FALSE),
++             x=unit(1, "mm"), y=unit(1, "npc") - unit(1, "mm"),
++             just=c("left", "top"),
++             gp=gpar(fontsize=8))
++ }
+> 
+> 
+> 
+> cleanEx()
+> nameEx("viewports")
+> ### * viewports
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: Working with Viewports
+> ### Title: Maintaining and Navigating the Grid Viewport Tree
+> ### Aliases: pushViewport downViewport seekViewport popViewport upViewport
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> # push the same viewport several times
+> grid.newpage()
+> vp <- viewport(width=0.5, height=0.5)
+> pushViewport(vp)
+> grid.rect(gp=gpar(col="blue"))
+> grid.text("Quarter of the device",
++   y=unit(1, "npc") - unit(1, "lines"), gp=gpar(col="blue"))
+> pushViewport(vp)
+> grid.rect(gp=gpar(col="red"))
+> grid.text("Quarter of the parent viewport",
++   y=unit(1, "npc") - unit(1, "lines"), gp=gpar(col="red"))
+> popViewport(2)
+> # push several viewports then navigate amongst them
+> grid.newpage()
+> grid.rect(gp=gpar(col="grey"))
+> grid.text("Top-level viewport",
++   y=unit(1, "npc") - unit(1, "lines"), gp=gpar(col="grey"))
+> if (interactive()) Sys.sleep(1.0)
+> pushViewport(viewport(width=0.8, height=0.7, name="A"))
+> grid.rect(gp=gpar(col="blue"))
+> grid.text("1. Push Viewport A",
++   y=unit(1, "npc") - unit(1, "lines"), gp=gpar(col="blue"))
+> if (interactive()) Sys.sleep(1.0)
+> pushViewport(viewport(x=0.1, width=0.3, height=0.6,
++   just="left", name="B"))
+> grid.rect(gp=gpar(col="red"))
+> grid.text("2. Push Viewport B (in A)",
++   y=unit(1, "npc") - unit(1, "lines"), gp=gpar(col="red"))
+> if (interactive()) Sys.sleep(1.0)
+> upViewport(1)
+> grid.text("3. Up from B to A",
++   y=unit(1, "npc") - unit(2, "lines"), gp=gpar(col="blue"))
+> if (interactive()) Sys.sleep(1.0)
+> pushViewport(viewport(x=0.5, width=0.4, height=0.8,
++   just="left", name="C"))
+> grid.rect(gp=gpar(col="green"))
+> grid.text("4. Push Viewport C (in A)",
++   y=unit(1, "npc") - unit(1, "lines"), gp=gpar(col="green"))
+> if (interactive()) Sys.sleep(1.0)
+> pushViewport(viewport(width=0.8, height=0.6, name="D"))
+> grid.rect()
+> grid.text("5. Push Viewport D (in C)",
++   y=unit(1, "npc") - unit(1, "lines"))
+> if (interactive()) Sys.sleep(1.0)
+> upViewport(0)
+> grid.text("6. Up from D to top-level",
++   y=unit(1, "npc") - unit(2, "lines"), gp=gpar(col="grey"))
+> if (interactive()) Sys.sleep(1.0)
+> downViewport("D")
+> grid.text("7. Down from top-level to D",
++   y=unit(1, "npc") - unit(2, "lines"))
+> if (interactive()) Sys.sleep(1.0)
+> seekViewport("B")
+> grid.text("8. Seek from D to B",
++   y=unit(1, "npc") - unit(2, "lines"), gp=gpar(col="red"))
+> pushViewport(viewport(width=0.9, height=0.5, name="A"))
+> grid.rect()
+> grid.text("9. Push Viewport A (in B)",
++   y=unit(1, "npc") - unit(1, "lines"))
+> if (interactive()) Sys.sleep(1.0)
+> seekViewport("A")
+> grid.text("10. Seek from B to A (in ROOT)",
++   y=unit(1, "npc") - unit(3, "lines"), gp=gpar(col="blue"))
+> if (interactive()) Sys.sleep(1.0)
+> seekViewport(vpPath("B", "A"))
+> grid.text("11. Seek from\nA (in ROOT)\nto A (in B)")
+> popViewport(0)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("vpPath")
+> ### * vpPath
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: vpPath
+> ### Title: Concatenate Viewport Names
+> ### Aliases: vpPath
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> vpPath("vp1", "vp2")
+vp1::vp2 
+> 
+> 
+> 
+> cleanEx()
+> nameEx("xsplinePoints")
+> ### * xsplinePoints
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: xsplinePoints
+> ### Title: Return the points that would be used to draw an Xspline (or a
+> ###   Bezier curve).
+> ### Aliases: xsplinePoints bezierPoints
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> grid.newpage()
+> xsg <- xsplineGrob(c(.1, .1, .9, .9), c(.1, .9, .9, .1), shape=1)
+> grid.draw(xsg)
+> trace <- xsplinePoints(xsg)
+> grid.circle(trace$x, trace$y, default.units="inches", r=unit(.5, "mm"))
+> 
+> grid.newpage()
+> vp <- viewport(width=.5)
+> xg <- xsplineGrob(x=c(0, .2, .4, .2, .5, .7, .9, .7),
++                   y=c(.5, 1, .5, 0, .5, 1, .5, 0),
++                   id=rep(1:2, each=4),
++                   shape=1,
++                   vp=vp)
+> grid.draw(xg)
+> trace <- xsplinePoints(xg)
+> pushViewport(vp)
+> invisible(lapply(trace, function(t) grid.lines(t$x, t$y, gp=gpar(col="red"))))
+> popViewport()
+> 
+> grid.newpage()
+> bg <- bezierGrob(c(.2, .2, .8, .8), c(.2, .8, .8, .2))
+> grid.draw(bg)
+> trace <- bezierPoints(bg)
+> grid.circle(trace$x, trace$y, default.units="inches", r=unit(.5, "mm"))
+> 
+> 
+> 
+> ### * <FOOTER>
+> ###
+> options(digits = 7L)
+> base::cat("Time elapsed: ", proc.time() - base::get("ptime", pos = 'CheckExEnv'),"\n")
+Time elapsed:  1.09 0.009 1.099 0 0 
+> grDevices::dev.off()
+null device 
+          1 
+> ###
+> ### Local variables: ***
+> ### mode: outline-minor ***
+> ### outline-regexp: "\\(> \\)?### [*]+" ***
+> ### End: ***
+> quit('no')
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/tests/Examples/datasets-Ex.Rout.save
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/tests/Examples/datasets-Ex.Rout.save	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/tests/Examples/datasets-Ex.Rout.save	(revision 2477)
@@ -0,0 +1,3470 @@
+
+R version 3.3.2 RC (2016-10-26 r71594) -- "Sincere Pumpkin Patch"
+Copyright (C) 2016 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
+
+R is free software and comes with ABSOLUTELY NO WARRANTY.
+You are welcome to redistribute it under certain conditions.
+Type 'license()' or 'licence()' for distribution details.
+
+  Natural language support but running in an English locale
+
+R is a collaborative project with many contributors.
+Type 'contributors()' for more information and
+'citation()' on how to cite R or R packages in publications.
+
+Type 'demo()' for some demos, 'help()' for on-line help, or
+'help.start()' for an HTML browser interface to help.
+Type 'q()' to quit R.
+
+> pkgname <- "datasets"
+> source(file.path(R.home("share"), "R", "examples-header.R"))
+> options(warn = 1)
+> library('datasets')
+> 
+> base::assign(".oldSearch", base::search(), pos = 'CheckExEnv')
+> cleanEx()
+> nameEx("AirPassengers")
+> ### * AirPassengers
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: AirPassengers
+> ### Title: Monthly Airline Passenger Numbers 1949-1960
+> ### Aliases: AirPassengers
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> ## Not run: 
+> ##D ## These are quite slow and so not run by example(AirPassengers)
+> ##D 
+> ##D ## The classic 'airline model', by full ML
+> ##D (fit <- arima(log10(AirPassengers), c(0, 1, 1),
+> ##D               seasonal = list(order = c(0, 1, 1), period = 12)))
+> ##D update(fit, method = "CSS")
+> ##D update(fit, x = window(log10(AirPassengers), start = 1954))
+> ##D pred <- predict(fit, n.ahead = 24)
+> ##D tl <- pred$pred - 1.96 * pred$se
+> ##D tu <- pred$pred + 1.96 * pred$se
+> ##D ts.plot(AirPassengers, 10^tl, 10^tu, log = "y", lty = c(1, 2, 2))
+> ##D 
+> ##D ## full ML fit is the same if the series is reversed, CSS fit is not
+> ##D ap0 <- rev(log10(AirPassengers))
+> ##D attributes(ap0) <- attributes(AirPassengers)
+> ##D arima(ap0, c(0, 1, 1), seasonal = list(order = c(0, 1, 1), period = 12))
+> ##D arima(ap0, c(0, 1, 1), seasonal = list(order = c(0, 1, 1), period = 12),
+> ##D       method = "CSS")
+> ##D 
+> ##D ## Structural Time Series
+> ##D ap <- log10(AirPassengers) - 2
+> ##D (fit <- StructTS(ap, type = "BSM"))
+> ##D par(mfrow = c(1, 2))
+> ##D plot(cbind(ap, fitted(fit)), plot.type = "single")
+> ##D plot(cbind(ap, tsSmooth(fit)), plot.type = "single")
+> ## End(Not run)
+> 
+> 
+> cleanEx()
+> nameEx("BOD")
+> ### * BOD
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: BOD
+> ### Title: Biochemical Oxygen Demand
+> ### Aliases: BOD
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> ## Don't show: 
+> options(show.nls.convergence=FALSE)
+> old <- options(digits = 5)
+> ## End(Don't show)
+> require(stats)
+> # simplest form of fitting a first-order model to these data
+> fm1 <- nls(demand ~ A*(1-exp(-exp(lrc)*Time)), data = BOD,
++    start = c(A = 20, lrc = log(.35)))
+> coef(fm1)
+       A      lrc 
+19.14258 -0.63282 
+> fm1
+Nonlinear regression model
+  model: demand ~ A * (1 - exp(-exp(lrc) * Time))
+   data: BOD
+     A    lrc 
+19.143 -0.633 
+ residual sum-of-squares: 26
+> # using the plinear algorithm
+> fm2 <- nls(demand ~ (1-exp(-exp(lrc)*Time)), data = BOD,
++    start = c(lrc = log(.35)), algorithm = "plinear", trace = TRUE)
+32.946 :  -1.0498 22.1260
+25.992 :  -0.62572 19.10319
+25.99 :  -0.6327 19.1419
+25.99 :  -0.63282 19.14256
+> # using a self-starting model
+> fm3 <- nls(demand ~ SSasympOrig(Time, A, lrc), data = BOD)
+> summary(fm3)
+
+Formula: demand ~ SSasympOrig(Time, A, lrc)
+
+Parameters:
+    Estimate Std. Error t value Pr(>|t|)   
+A     19.143      2.496    7.67   0.0016 **
+lrc   -0.633      0.382   -1.65   0.1733   
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Residual standard error: 2.55 on 4 degrees of freedom
+
+> ## Don't show: 
+> options(old)
+> ## End(Don't show)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("ChickWeight")
+> ### * ChickWeight
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: ChickWeight
+> ### Title: Weight versus age of chicks on different diets
+> ### Aliases: ChickWeight
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> 
+> cleanEx()
+> nameEx("DNase")
+> ### * DNase
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: DNase
+> ### Title: Elisa assay of DNase
+> ### Aliases: DNase
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(stats); require(graphics)
+> ## Don't show: 
+> options(show.nls.convergence=FALSE)
+> ## End(Don't show)
+> coplot(density ~ conc | Run, data = DNase,
++        show.given = FALSE, type = "b")
+> coplot(density ~ log(conc) | Run, data = DNase,
++        show.given = FALSE, type = "b")
+> ## fit a representative run
+> fm1 <- nls(density ~ SSlogis( log(conc), Asym, xmid, scal ),
++     data = DNase, subset = Run == 1)
+> ## compare with a four-parameter logistic
+> fm2 <- nls(density ~ SSfpl( log(conc), A, B, xmid, scal ),
++     data = DNase, subset = Run == 1)
+> summary(fm2)
+
+Formula: density ~ SSfpl(log(conc), A, B, xmid, scal)
+
+Parameters:
+      Estimate Std. Error t value Pr(>|t|)    
+A    -0.007897   0.017200  -0.459    0.654    
+B     2.377239   0.109516  21.707 5.35e-11 ***
+xmid  1.507403   0.102080  14.767 4.65e-09 ***
+scal  1.062579   0.056996  18.643 3.16e-10 ***
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Residual standard error: 0.01981 on 12 degrees of freedom
+
+> anova(fm1, fm2)
+Analysis of Variance Table
+
+Model 1: density ~ SSlogis(log(conc), Asym, xmid, scal)
+Model 2: density ~ SSfpl(log(conc), A, B, xmid, scal)
+  Res.Df Res.Sum Sq Df     Sum Sq F value Pr(>F)
+1     13  0.0047896                             
+2     12  0.0047073  1 8.2314e-05  0.2098 0.6551
+> 
+> 
+> 
+> cleanEx()
+> nameEx("Formaldehyde")
+> ### * Formaldehyde
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: Formaldehyde
+> ### Title: Determination of Formaldehyde
+> ### Aliases: Formaldehyde
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(stats); require(graphics)
+> plot(optden ~ carb, data = Formaldehyde,
++      xlab = "Carbohydrate (ml)", ylab = "Optical Density",
++      main = "Formaldehyde data", col = 4, las = 1)
+> abline(fm1 <- lm(optden ~ carb, data = Formaldehyde))
+> summary(fm1)
+
+Call:
+lm(formula = optden ~ carb, data = Formaldehyde)
+
+Residuals:
+        1         2         3         4         5         6 
+-0.006714  0.001029  0.002771  0.007143  0.007514 -0.011743 
+
+Coefficients:
+            Estimate Std. Error t value Pr(>|t|)    
+(Intercept) 0.005086   0.007834   0.649    0.552    
+carb        0.876286   0.013535  64.744 3.41e-07 ***
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Residual standard error: 0.008649 on 4 degrees of freedom
+Multiple R-squared:  0.999,	Adjusted R-squared:  0.9988 
+F-statistic:  4192 on 1 and 4 DF,  p-value: 3.409e-07
+
+> opar <- par(mfrow = c(2, 2), oma = c(0, 0, 1.1, 0))
+> plot(fm1)
+> par(opar)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("HairEyeColor")
+> ### * HairEyeColor
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: HairEyeColor
+> ### Title: Hair and Eye Color of Statistics Students
+> ### Aliases: HairEyeColor
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> ## Full mosaic
+> mosaicplot(HairEyeColor)
+> ## Aggregate over sex (as in Snee's original data)
+> x <- apply(HairEyeColor, c(1, 2), sum)
+> x
+       Eye
+Hair    Brown Blue Hazel Green
+  Black    68   20    15     5
+  Brown   119   84    54    29
+  Red      26   17    14    14
+  Blond     7   94    10    16
+> mosaicplot(x, main = "Relation between hair and eye color")
+> 
+> 
+> 
+> cleanEx()
+> nameEx("Harman23.cor")
+> ### * Harman23.cor
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: Harman23.cor
+> ### Title: Harman Example 2.3
+> ### Aliases: Harman23.cor
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(stats)
+> (Harman23.FA <- factanal(factors = 1, covmat = Harman23.cor))
+
+Call:
+factanal(factors = 1, covmat = Harman23.cor)
+
+Uniquenesses:
+        height       arm.span        forearm      lower.leg         weight 
+         0.158          0.135          0.190          0.187          0.760 
+bitro.diameter    chest.girth    chest.width 
+         0.829          0.877          0.801 
+
+Loadings:
+               Factor1
+height         0.918  
+arm.span       0.930  
+forearm        0.900  
+lower.leg      0.902  
+weight         0.490  
+bitro.diameter 0.413  
+chest.girth    0.351  
+chest.width    0.446  
+
+               Factor1
+SS loadings      4.064
+Proportion Var   0.508
+
+Test of the hypothesis that 1 factor is sufficient.
+The chi square statistic is 611.44 on 20 degrees of freedom.
+The p-value is 1.12e-116 
+> for(factors in 2:4) print(update(Harman23.FA, factors = factors))
+
+Call:
+factanal(factors = factors, covmat = Harman23.cor)
+
+Uniquenesses:
+        height       arm.span        forearm      lower.leg         weight 
+         0.170          0.107          0.166          0.199          0.089 
+bitro.diameter    chest.girth    chest.width 
+         0.364          0.416          0.537 
+
+Loadings:
+               Factor1 Factor2
+height         0.865   0.287  
+arm.span       0.927   0.181  
+forearm        0.895   0.179  
+lower.leg      0.859   0.252  
+weight         0.233   0.925  
+bitro.diameter 0.194   0.774  
+chest.girth    0.134   0.752  
+chest.width    0.278   0.621  
+
+               Factor1 Factor2
+SS loadings      3.335   2.617
+Proportion Var   0.417   0.327
+Cumulative Var   0.417   0.744
+
+Test of the hypothesis that 2 factors are sufficient.
+The chi square statistic is 75.74 on 13 degrees of freedom.
+The p-value is 6.94e-11 
+
+Call:
+factanal(factors = factors, covmat = Harman23.cor)
+
+Uniquenesses:
+        height       arm.span        forearm      lower.leg         weight 
+         0.127          0.005          0.193          0.157          0.090 
+bitro.diameter    chest.girth    chest.width 
+         0.359          0.411          0.490 
+
+Loadings:
+               Factor1 Factor2 Factor3
+height          0.886   0.267  -0.130 
+arm.span        0.937   0.195   0.280 
+forearm         0.874   0.188         
+lower.leg       0.877   0.230  -0.145 
+weight          0.242   0.916  -0.106 
+bitro.diameter  0.193   0.777         
+chest.girth     0.137   0.755         
+chest.width     0.261   0.646   0.159 
+
+               Factor1 Factor2 Factor3
+SS loadings      3.379   2.628   0.162
+Proportion Var   0.422   0.329   0.020
+Cumulative Var   0.422   0.751   0.771
+
+Test of the hypothesis that 3 factors are sufficient.
+The chi square statistic is 22.81 on 7 degrees of freedom.
+The p-value is 0.00184 
+
+Call:
+factanal(factors = factors, covmat = Harman23.cor)
+
+Uniquenesses:
+        height       arm.span        forearm      lower.leg         weight 
+         0.137          0.005          0.191          0.116          0.138 
+bitro.diameter    chest.girth    chest.width 
+         0.283          0.178          0.488 
+
+Loadings:
+               Factor1 Factor2 Factor3 Factor4
+height          0.879   0.277          -0.115 
+arm.span        0.937   0.194           0.277 
+forearm         0.875   0.191                 
+lower.leg       0.887   0.209   0.135  -0.188 
+weight          0.246   0.882   0.111  -0.109 
+bitro.diameter  0.187   0.822                 
+chest.girth     0.117   0.729   0.526         
+chest.width     0.263   0.644           0.141 
+
+               Factor1 Factor2 Factor3 Factor4
+SS loadings      3.382   2.595   0.323   0.165
+Proportion Var   0.423   0.324   0.040   0.021
+Cumulative Var   0.423   0.747   0.787   0.808
+
+Test of the hypothesis that 4 factors are sufficient.
+The chi square statistic is 4.63 on 2 degrees of freedom.
+The p-value is 0.0988 
+> 
+> 
+> 
+> cleanEx()
+> nameEx("Harman74.cor")
+> ### * Harman74.cor
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: Harman74.cor
+> ### Title: Harman Example 7.4
+> ### Aliases: Harman74.cor
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(stats)
+> (Harman74.FA <- factanal(factors = 1, covmat = Harman74.cor))
+
+Call:
+factanal(factors = 1, covmat = Harman74.cor)
+
+Uniquenesses:
+      VisualPerception                  Cubes         PaperFormBoard 
+                 0.677                  0.866                  0.830 
+                 Flags     GeneralInformation  PargraphComprehension 
+                 0.768                  0.487                  0.491 
+    SentenceCompletion     WordClassification            WordMeaning 
+                 0.500                  0.514                  0.474 
+              Addition                   Code           CountingDots 
+                 0.818                  0.731                  0.824 
+StraightCurvedCapitals        WordRecognition      NumberRecognition 
+                 0.681                  0.833                  0.863 
+     FigureRecognition           ObjectNumber           NumberFigure 
+                 0.775                  0.812                  0.778 
+            FigureWord              Deduction       NumericalPuzzles 
+                 0.816                  0.612                  0.676 
+      ProblemReasoning       SeriesCompletion     ArithmeticProblems 
+                 0.619                  0.524                  0.593 
+
+Loadings:
+                       Factor1
+VisualPerception       0.569  
+Cubes                  0.366  
+PaperFormBoard         0.412  
+Flags                  0.482  
+GeneralInformation     0.716  
+PargraphComprehension  0.713  
+SentenceCompletion     0.707  
+WordClassification     0.697  
+WordMeaning            0.725  
+Addition               0.426  
+Code                   0.519  
+CountingDots           0.419  
+StraightCurvedCapitals 0.565  
+WordRecognition        0.408  
+NumberRecognition      0.370  
+FigureRecognition      0.474  
+ObjectNumber           0.434  
+NumberFigure           0.471  
+FigureWord             0.429  
+Deduction              0.623  
+NumericalPuzzles       0.569  
+ProblemReasoning       0.617  
+SeriesCompletion       0.690  
+ArithmeticProblems     0.638  
+
+               Factor1
+SS loadings      7.438
+Proportion Var   0.310
+
+Test of the hypothesis that 1 factor is sufficient.
+The chi square statistic is 622.91 on 252 degrees of freedom.
+The p-value is 2.28e-33 
+> for(factors in 2:5) print(update(Harman74.FA, factors = factors))
+
+Call:
+factanal(factors = factors, covmat = Harman74.cor)
+
+Uniquenesses:
+      VisualPerception                  Cubes         PaperFormBoard 
+                 0.650                  0.864                  0.844 
+                 Flags     GeneralInformation  PargraphComprehension 
+                 0.778                  0.375                  0.316 
+    SentenceCompletion     WordClassification            WordMeaning 
+                 0.319                  0.503                  0.258 
+              Addition                   Code           CountingDots 
+                 0.670                  0.608                  0.581 
+StraightCurvedCapitals        WordRecognition      NumberRecognition 
+                 0.567                  0.832                  0.850 
+     FigureRecognition           ObjectNumber           NumberFigure 
+                 0.743                  0.770                  0.625 
+            FigureWord              Deduction       NumericalPuzzles 
+                 0.792                  0.629                  0.579 
+      ProblemReasoning       SeriesCompletion     ArithmeticProblems 
+                 0.634                  0.539                  0.553 
+
+Loadings:
+                       Factor1 Factor2
+VisualPerception       0.506   0.306  
+Cubes                  0.304   0.209  
+PaperFormBoard         0.297   0.260  
+Flags                  0.327   0.339  
+GeneralInformation     0.240   0.753  
+PargraphComprehension  0.171   0.809  
+SentenceCompletion     0.163   0.809  
+WordClassification     0.344   0.615  
+WordMeaning            0.148   0.849  
+Addition               0.563   0.115  
+Code                   0.591   0.207  
+CountingDots           0.647          
+StraightCurvedCapitals 0.612   0.241  
+WordRecognition        0.315   0.263  
+NumberRecognition      0.328   0.205  
+FigureRecognition      0.457   0.218  
+ObjectNumber           0.431   0.209  
+NumberFigure           0.601   0.116  
+FigureWord             0.399   0.222  
+Deduction              0.379   0.477  
+NumericalPuzzles       0.604   0.237  
+ProblemReasoning       0.390   0.462  
+SeriesCompletion       0.486   0.474  
+ArithmeticProblems     0.544   0.389  
+
+               Factor1 Factor2
+SS loadings      4.573   4.548
+Proportion Var   0.191   0.190
+Cumulative Var   0.191   0.380
+
+Test of the hypothesis that 2 factors are sufficient.
+The chi square statistic is 420.24 on 229 degrees of freedom.
+The p-value is 2.01e-13 
+
+Call:
+factanal(factors = factors, covmat = Harman74.cor)
+
+Uniquenesses:
+      VisualPerception                  Cubes         PaperFormBoard 
+                 0.500                  0.793                  0.662 
+                 Flags     GeneralInformation  PargraphComprehension 
+                 0.694                  0.352                  0.316 
+    SentenceCompletion     WordClassification            WordMeaning 
+                 0.300                  0.502                  0.256 
+              Addition                   Code           CountingDots 
+                 0.200                  0.586                  0.494 
+StraightCurvedCapitals        WordRecognition      NumberRecognition 
+                 0.569                  0.838                  0.848 
+     FigureRecognition           ObjectNumber           NumberFigure 
+                 0.643                  0.780                  0.635 
+            FigureWord              Deduction       NumericalPuzzles 
+                 0.788                  0.590                  0.580 
+      ProblemReasoning       SeriesCompletion     ArithmeticProblems 
+                 0.597                  0.498                  0.500 
+
+Loadings:
+                       Factor1 Factor2 Factor3
+VisualPerception        0.176   0.656   0.198 
+Cubes                   0.122   0.428         
+PaperFormBoard          0.145   0.563         
+Flags                   0.239   0.487   0.107 
+GeneralInformation      0.745   0.191   0.237 
+PargraphComprehension   0.780   0.249   0.118 
+SentenceCompletion      0.802   0.175   0.160 
+WordClassification      0.571   0.327   0.256 
+WordMeaning             0.821   0.248         
+Addition                0.162  -0.118   0.871 
+Code                    0.198   0.219   0.572 
+CountingDots                    0.179   0.688 
+StraightCurvedCapitals  0.190   0.381   0.499 
+WordRecognition         0.231   0.253   0.210 
+NumberRecognition       0.158   0.299   0.195 
+FigureRecognition       0.108   0.557   0.186 
+ObjectNumber            0.178   0.267   0.342 
+NumberFigure                    0.427   0.424 
+FigureWord              0.167   0.355   0.240 
+Deduction               0.392   0.472   0.181 
+NumericalPuzzles        0.178   0.406   0.473 
+ProblemReasoning        0.382   0.473   0.182 
+SeriesCompletion        0.379   0.528   0.283 
+ArithmeticProblems      0.377   0.226   0.554 
+
+               Factor1 Factor2 Factor3
+SS loadings      3.802   3.488   3.186
+Proportion Var   0.158   0.145   0.133
+Cumulative Var   0.158   0.304   0.436
+
+Test of the hypothesis that 3 factors are sufficient.
+The chi square statistic is 295.59 on 207 degrees of freedom.
+The p-value is 5.12e-05 
+
+Call:
+factanal(factors = factors, covmat = Harman74.cor)
+
+Uniquenesses:
+      VisualPerception                  Cubes         PaperFormBoard 
+                 0.438                  0.780                  0.644 
+                 Flags     GeneralInformation  PargraphComprehension 
+                 0.651                  0.352                  0.312 
+    SentenceCompletion     WordClassification            WordMeaning 
+                 0.283                  0.485                  0.257 
+              Addition                   Code           CountingDots 
+                 0.240                  0.551                  0.435 
+StraightCurvedCapitals        WordRecognition      NumberRecognition 
+                 0.491                  0.646                  0.696 
+     FigureRecognition           ObjectNumber           NumberFigure 
+                 0.549                  0.598                  0.593 
+            FigureWord              Deduction       NumericalPuzzles 
+                 0.762                  0.592                  0.583 
+      ProblemReasoning       SeriesCompletion     ArithmeticProblems 
+                 0.601                  0.497                  0.500 
+
+Loadings:
+                       Factor1 Factor2 Factor3 Factor4
+VisualPerception        0.160   0.689   0.187   0.160 
+Cubes                   0.117   0.436                 
+PaperFormBoard          0.137   0.570           0.110 
+Flags                   0.233   0.527                 
+GeneralInformation      0.739   0.185   0.213   0.150 
+PargraphComprehension   0.767   0.205           0.233 
+SentenceCompletion      0.806   0.197   0.153         
+WordClassification      0.569   0.339   0.242   0.132 
+WordMeaning             0.806   0.201           0.227 
+Addition                0.167  -0.118   0.831   0.166 
+Code                    0.180   0.120   0.512   0.374 
+CountingDots                    0.210   0.716         
+StraightCurvedCapitals  0.188   0.438   0.525         
+WordRecognition         0.197                   0.553 
+NumberRecognition       0.122   0.116           0.520 
+FigureRecognition               0.408           0.525 
+ObjectNumber            0.142           0.219   0.574 
+NumberFigure                    0.293   0.336   0.456 
+FigureWord              0.148   0.239   0.161   0.365 
+Deduction               0.378   0.402   0.118   0.301 
+NumericalPuzzles        0.175   0.381   0.438   0.223 
+ProblemReasoning        0.366   0.399   0.123   0.301 
+SeriesCompletion        0.369   0.500   0.244   0.239 
+ArithmeticProblems      0.370   0.158   0.496   0.304 
+
+               Factor1 Factor2 Factor3 Factor4
+SS loadings      3.647   2.872   2.657   2.290
+Proportion Var   0.152   0.120   0.111   0.095
+Cumulative Var   0.152   0.272   0.382   0.478
+
+Test of the hypothesis that 4 factors are sufficient.
+The chi square statistic is 226.68 on 186 degrees of freedom.
+The p-value is 0.0224 
+
+Call:
+factanal(factors = factors, covmat = Harman74.cor)
+
+Uniquenesses:
+      VisualPerception                  Cubes         PaperFormBoard 
+                 0.450                  0.781                  0.639 
+                 Flags     GeneralInformation  PargraphComprehension 
+                 0.649                  0.357                  0.288 
+    SentenceCompletion     WordClassification            WordMeaning 
+                 0.277                  0.485                  0.262 
+              Addition                   Code           CountingDots 
+                 0.215                  0.386                  0.444 
+StraightCurvedCapitals        WordRecognition      NumberRecognition 
+                 0.256                  0.639                  0.706 
+     FigureRecognition           ObjectNumber           NumberFigure 
+                 0.550                  0.614                  0.596 
+            FigureWord              Deduction       NumericalPuzzles 
+                 0.764                  0.521                  0.564 
+      ProblemReasoning       SeriesCompletion     ArithmeticProblems 
+                 0.580                  0.442                  0.478 
+
+Loadings:
+                       Factor1 Factor2 Factor3 Factor4 Factor5
+VisualPerception        0.161   0.658   0.136   0.182   0.199 
+Cubes                   0.113   0.435           0.107         
+PaperFormBoard          0.135   0.562           0.107   0.116 
+Flags                   0.231   0.533                         
+GeneralInformation      0.736   0.188   0.192   0.162         
+PargraphComprehension   0.775   0.187           0.251   0.113 
+SentenceCompletion      0.809   0.208   0.136                 
+WordClassification      0.568   0.348   0.223   0.131         
+WordMeaning             0.800   0.215           0.224         
+Addition                0.175  -0.100   0.844   0.176         
+Code                    0.185           0.438   0.451   0.426 
+CountingDots                    0.222   0.690   0.101   0.140 
+StraightCurvedCapitals  0.186   0.425   0.458           0.559 
+WordRecognition         0.197                   0.557         
+NumberRecognition       0.121   0.130           0.508         
+FigureRecognition               0.400           0.529         
+ObjectNumber            0.145           0.208   0.562         
+NumberFigure                    0.306   0.325   0.452         
+FigureWord              0.147   0.242   0.145   0.364         
+Deduction               0.370   0.452   0.139   0.287  -0.190 
+NumericalPuzzles        0.170   0.402   0.439   0.230         
+ProblemReasoning        0.358   0.423   0.126   0.302         
+SeriesCompletion        0.360   0.549   0.256   0.223  -0.107 
+ArithmeticProblems      0.371   0.185   0.502   0.307         
+
+               Factor1 Factor2 Factor3 Factor4 Factor5
+SS loadings      3.632   2.964   2.456   2.345   0.663
+Proportion Var   0.151   0.124   0.102   0.098   0.028
+Cumulative Var   0.151   0.275   0.377   0.475   0.503
+
+Test of the hypothesis that 5 factors are sufficient.
+The chi square statistic is 186.82 on 166 degrees of freedom.
+The p-value is 0.128 
+> Harman74.FA <- factanal(factors = 5, covmat = Harman74.cor,
++                         rotation = "promax")
+> print(Harman74.FA$loadings, sort = TRUE)
+
+Loadings:
+                       Factor1 Factor2 Factor3 Factor4 Factor5
+VisualPerception        0.831          -0.127           0.230 
+Cubes                   0.534                                 
+PaperFormBoard          0.736          -0.290           0.136 
+Flags                   0.647                  -0.104         
+SeriesCompletion        0.555   0.126   0.127                 
+GeneralInformation              0.764                         
+PargraphComprehension           0.845  -0.140   0.140         
+SentenceCompletion              0.872          -0.140         
+WordClassification      0.277   0.505   0.104                 
+WordMeaning                     0.846  -0.108                 
+Addition               -0.334           1.012                 
+CountingDots            0.206  -0.200   0.722           0.185 
+ArithmeticProblems              0.197   0.500   0.139         
+WordRecognition        -0.126   0.127  -0.103   0.657         
+NumberRecognition                               0.568         
+FigureRecognition       0.399  -0.142  -0.207   0.562         
+ObjectNumber           -0.108           0.107   0.613         
+StraightCurvedCapitals  0.542           0.247           0.618 
+Code                            0.112   0.288   0.486   0.424 
+NumberFigure            0.255  -0.230   0.211   0.413         
+FigureWord              0.187                   0.347         
+Deduction               0.404   0.169           0.117  -0.203 
+NumericalPuzzles        0.393           0.368                 
+ProblemReasoning        0.381   0.188           0.169         
+
+               Factor1 Factor2 Factor3 Factor4 Factor5
+SS loadings      3.529   3.311   2.367   2.109   0.762
+Proportion Var   0.147   0.138   0.099   0.088   0.032
+Cumulative Var   0.147   0.285   0.384   0.471   0.503
+> 
+> 
+> 
+> cleanEx()
+> nameEx("InsectSprays")
+> ### * InsectSprays
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: InsectSprays
+> ### Title: Effectiveness of Insect Sprays
+> ### Aliases: InsectSprays
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(stats); require(graphics)
+> boxplot(count ~ spray, data = InsectSprays,
++         xlab = "Type of spray", ylab = "Insect count",
++         main = "InsectSprays data", varwidth = TRUE, col = "lightgray")
+> fm1 <- aov(count ~ spray, data = InsectSprays)
+> summary(fm1)
+            Df Sum Sq Mean Sq F value Pr(>F)    
+spray        5   2669   533.8    34.7 <2e-16 ***
+Residuals   66   1015    15.4                   
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> opar <- par(mfrow = c(2, 2), oma = c(0, 0, 1.1, 0))
+> plot(fm1)
+> fm2 <- aov(sqrt(count) ~ spray, data = InsectSprays)
+> summary(fm2)
+            Df Sum Sq Mean Sq F value Pr(>F)    
+spray        5  88.44  17.688    44.8 <2e-16 ***
+Residuals   66  26.06   0.395                   
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> plot(fm2)
+> par(opar)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("JohnsonJohnson")
+> ### * JohnsonJohnson
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: JohnsonJohnson
+> ### Title: Quarterly Earnings per Johnson & Johnson Share
+> ### Aliases: JohnsonJohnson
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> 
+> cleanEx()
+> nameEx("LifeCycleSavings")
+> ### * LifeCycleSavings
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: LifeCycleSavings
+> ### Title: Intercountry Life-Cycle Savings Data
+> ### Aliases: LifeCycleSavings
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(stats); require(graphics)
+> pairs(LifeCycleSavings, panel = panel.smooth,
++       main = "LifeCycleSavings data")
+> fm1 <- lm(sr ~ pop15 + pop75 + dpi + ddpi, data = LifeCycleSavings)
+> summary(fm1)
+
+Call:
+lm(formula = sr ~ pop15 + pop75 + dpi + ddpi, data = LifeCycleSavings)
+
+Residuals:
+    Min      1Q  Median      3Q     Max 
+-8.2422 -2.6857 -0.2488  2.4280  9.7509 
+
+Coefficients:
+              Estimate Std. Error t value Pr(>|t|)    
+(Intercept) 28.5660865  7.3545161   3.884 0.000334 ***
+pop15       -0.4611931  0.1446422  -3.189 0.002603 ** 
+pop75       -1.6914977  1.0835989  -1.561 0.125530    
+dpi         -0.0003369  0.0009311  -0.362 0.719173    
+ddpi         0.4096949  0.1961971   2.088 0.042471 *  
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Residual standard error: 3.803 on 45 degrees of freedom
+Multiple R-squared:  0.3385,	Adjusted R-squared:  0.2797 
+F-statistic: 5.756 on 4 and 45 DF,  p-value: 0.0007904
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("Loblolly")
+> ### * Loblolly
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: Loblolly
+> ### Title: Growth of Loblolly pine trees
+> ### Aliases: Loblolly
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(stats); require(graphics)
+> plot(height ~ age, data = Loblolly, subset = Seed == 329,
++      xlab = "Tree age (yr)", las = 1,
++      ylab = "Tree height (ft)",
++      main = "Loblolly data and fitted curve (Seed 329 only)")
+> fm1 <- nls(height ~ SSasymp(age, Asym, R0, lrc),
++            data = Loblolly, subset = Seed == 329)
+> age <- seq(0, 30, length.out = 101)
+> lines(age, predict(fm1, list(age = age)))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("Nile")
+> ### * Nile
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: Nile
+> ### Title: Flow of the River Nile
+> ### Aliases: Nile
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(stats); require(graphics)
+> par(mfrow = c(2, 2))
+> plot(Nile)
+> acf(Nile)
+> pacf(Nile)
+> ar(Nile) # selects order 2
+
+Call:
+ar(x = Nile)
+
+Coefficients:
+     1       2  
+0.4081  0.1812  
+
+Order selected 2  sigma^2 estimated as  21247
+> cpgram(ar(Nile)$resid)
+> par(mfrow = c(1, 1))
+> arima(Nile, c(2, 0, 0))
+
+Call:
+arima(x = Nile, order = c(2, 0, 0))
+
+Coefficients:
+         ar1     ar2  intercept
+      0.4096  0.1987   919.8397
+s.e.  0.0974  0.0990    35.6410
+
+sigma^2 estimated as 20291:  log likelihood = -637.98,  aic = 1283.96
+> 
+> ## Now consider missing values, following Durbin & Koopman
+> NileNA <- Nile
+> NileNA[c(21:40, 61:80)] <- NA
+> arima(NileNA, c(2, 0, 0))
+
+Call:
+arima(x = NileNA, order = c(2, 0, 0))
+
+Coefficients:
+         ar1     ar2  intercept
+      0.3622  0.1678   918.3103
+s.e.  0.1273  0.1323    39.5037
+
+sigma^2 estimated as 23676:  log likelihood = -387.7,  aic = 783.41
+> plot(NileNA)
+> pred <-
++    predict(arima(window(NileNA, 1871, 1890), c(2, 0, 0)), n.ahead = 20)
+> lines(pred$pred, lty = 3, col = "red")
+> lines(pred$pred + 2*pred$se, lty = 2, col = "blue")
+> lines(pred$pred - 2*pred$se, lty = 2, col = "blue")
+> pred <-
++    predict(arima(window(NileNA, 1871, 1930), c(2, 0, 0)), n.ahead = 20)
+> lines(pred$pred, lty = 3, col = "red")
+> lines(pred$pred + 2*pred$se, lty = 2, col = "blue")
+> lines(pred$pred - 2*pred$se, lty = 2, col = "blue")
+> 
+> ## Structural time series models
+> par(mfrow = c(3, 1))
+> plot(Nile)
+> ## local level model
+> (fit <- StructTS(Nile, type = "level"))
+
+Call:
+StructTS(x = Nile, type = "level")
+
+Variances:
+  level  epsilon  
+   1469    15099  
+> lines(fitted(fit), lty = 2)              # contemporaneous smoothing
+> lines(tsSmooth(fit), lty = 2, col = 4)   # fixed-interval smoothing
+> plot(residuals(fit)); abline(h = 0, lty = 3)
+> ## local trend model
+> (fit2 <- StructTS(Nile, type = "trend")) ## constant trend fitted
+
+Call:
+StructTS(x = Nile, type = "trend")
+
+Variances:
+  level    slope  epsilon  
+   1427        0    15047  
+> pred <- predict(fit, n.ahead = 30)
+> ## with 50% confidence interval
+> ts.plot(Nile, pred$pred,
++         pred$pred + 0.67*pred$se, pred$pred -0.67*pred$se)
+> 
+> ## Now consider missing values
+> plot(NileNA)
+> (fit3 <- StructTS(NileNA, type = "level"))
+
+Call:
+StructTS(x = NileNA, type = "level")
+
+Variances:
+  level  epsilon  
+  685.8  17899.8  
+> lines(fitted(fit3), lty = 2)
+> lines(tsSmooth(fit3), lty = 3)
+> plot(residuals(fit3)); abline(h = 0, lty = 3)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("Orange")
+> ### * Orange
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: Orange
+> ### Title: Growth of Orange Trees
+> ### Aliases: Orange
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(stats); require(graphics)
+> coplot(circumference ~ age | Tree, data = Orange, show.given = FALSE)
+> fm1 <- nls(circumference ~ SSlogis(age, Asym, xmid, scal),
++            data = Orange, subset = Tree == 3)
+> plot(circumference ~ age, data = Orange, subset = Tree == 3,
++      xlab = "Tree age (days since 1968/12/31)",
++      ylab = "Tree circumference (mm)", las = 1,
++      main = "Orange tree data and fitted model (Tree 3 only)")
+> age <- seq(0, 1600, length.out = 101)
+> lines(age, predict(fm1, list(age = age)))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("OrchardSprays")
+> ### * OrchardSprays
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: OrchardSprays
+> ### Title: Potency of Orchard Sprays
+> ### Aliases: OrchardSprays
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> pairs(OrchardSprays, main = "OrchardSprays data")
+> 
+> 
+> 
+> cleanEx()
+> nameEx("PlantGrowth")
+> ### * PlantGrowth
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: PlantGrowth
+> ### Title: Results from an Experiment on Plant Growth
+> ### Aliases: PlantGrowth
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> ## One factor ANOVA example from Dobson's book, cf. Table 7.4:
+> require(stats); require(graphics)
+> boxplot(weight ~ group, data = PlantGrowth, main = "PlantGrowth data",
++         ylab = "Dried weight of plants", col = "lightgray",
++         notch = TRUE, varwidth = TRUE)
+Warning in bxp(list(stats = c(4.17, 4.53, 5.155, 5.33, 6.11, 3.59, 4.17,  :
+  some notches went outside hinges ('box'): maybe set notch=FALSE
+> anova(lm(weight ~ group, data = PlantGrowth))
+Analysis of Variance Table
+
+Response: weight
+          Df  Sum Sq Mean Sq F value  Pr(>F)  
+group      2  3.7663  1.8832  4.8461 0.01591 *
+Residuals 27 10.4921  0.3886                  
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> 
+> 
+> 
+> cleanEx()
+> nameEx("Puromycin")
+> ### * Puromycin
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: Puromycin
+> ### Title: Reaction Velocity of an Enzymatic Reaction
+> ### Aliases: Puromycin
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(stats); require(graphics)
+> ## Don't show: 
+> options(show.nls.convergence=FALSE)
+> ## End(Don't show)
+> plot(rate ~ conc, data = Puromycin, las = 1,
++      xlab = "Substrate concentration (ppm)",
++      ylab = "Reaction velocity (counts/min/min)",
++      pch = as.integer(Puromycin$state),
++      col = as.integer(Puromycin$state),
++      main = "Puromycin data and fitted Michaelis-Menten curves")
+> ## simplest form of fitting the Michaelis-Menten model to these data
+> fm1 <- nls(rate ~ Vm * conc/(K + conc), data = Puromycin,
++            subset = state == "treated",
++            start = c(Vm = 200, K = 0.05))
+> fm2 <- nls(rate ~ Vm * conc/(K + conc), data = Puromycin,
++            subset = state == "untreated",
++            start = c(Vm = 160, K = 0.05))
+> summary(fm1)
+
+Formula: rate ~ Vm * conc/(K + conc)
+
+Parameters:
+    Estimate Std. Error t value Pr(>|t|)    
+Vm 2.127e+02  6.947e+00  30.615 3.24e-11 ***
+K  6.412e-02  8.281e-03   7.743 1.57e-05 ***
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Residual standard error: 10.93 on 10 degrees of freedom
+
+> summary(fm2)
+
+Formula: rate ~ Vm * conc/(K + conc)
+
+Parameters:
+    Estimate Std. Error t value Pr(>|t|)    
+Vm 1.603e+02  6.480e+00  24.734 1.38e-09 ***
+K  4.771e-02  7.782e-03   6.131 0.000173 ***
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Residual standard error: 9.773 on 9 degrees of freedom
+
+> ## add fitted lines to the plot
+> conc <- seq(0, 1.2, length.out = 101)
+> lines(conc, predict(fm1, list(conc = conc)), lty = 1, col = 1)
+> lines(conc, predict(fm2, list(conc = conc)), lty = 2, col = 2)
+> legend(0.8, 120, levels(Puromycin$state),
++        col = 1:2, lty = 1:2, pch = 1:2)
+> 
+> ## using partial linearity
+> fm3 <- nls(rate ~ conc/(K + conc), data = Puromycin,
++            subset = state == "treated", start = c(K = 0.05),
++            algorithm = "plinear")
+> 
+> 
+> 
+> cleanEx()
+> nameEx("Theoph")
+> ### * Theoph
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: Theoph
+> ### Title: Pharmacokinetics of Theophylline
+> ### Aliases: Theoph
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(stats); require(graphics)
+> ## Don't show: 
+> options(show.nls.convergence=FALSE)
+> ## End(Don't show)
+> coplot(conc ~ Time | Subject, data = Theoph, show.given = FALSE)
+> Theoph.4 <- subset(Theoph, Subject == 4)
+> fm1 <- nls(conc ~ SSfol(Dose, Time, lKe, lKa, lCl),
++            data = Theoph.4)
+> summary(fm1)
+
+Formula: conc ~ SSfol(Dose, Time, lKe, lKa, lCl)
+
+Parameters:
+    Estimate Std. Error t value Pr(>|t|)    
+lKe  -2.4365     0.2257 -10.797 4.77e-06 ***
+lKa   0.1583     0.2297   0.689     0.51    
+lCl  -3.2861     0.1448 -22.695 1.51e-08 ***
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Residual standard error: 0.8465 on 8 degrees of freedom
+
+> plot(conc ~ Time, data = Theoph.4,
++      xlab = "Time since drug administration (hr)",
++      ylab = "Theophylline concentration (mg/L)",
++      main = "Observed concentrations and fitted model",
++      sub  = "Theophylline data - Subject 4 only",
++      las = 1, col = 4)
+> xvals <- seq(0, par("usr")[2], length.out = 55)
+> lines(xvals, predict(fm1, newdata = list(Time = xvals)),
++       col = 4)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("Titanic")
+> ### * Titanic
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: Titanic
+> ### Title: Survival of passengers on the Titanic
+> ### Aliases: Titanic
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> mosaicplot(Titanic, main = "Survival on the Titanic")
+> ## Higher survival rates in children?
+> apply(Titanic, c(3, 4), sum)
+       Survived
+Age       No Yes
+  Child   52  57
+  Adult 1438 654
+> ## Higher survival rates in females?
+> apply(Titanic, c(2, 4), sum)
+        Survived
+Sex        No Yes
+  Male   1364 367
+  Female  126 344
+> ## Use loglm() in package 'MASS' for further analysis ...
+> 
+> 
+> 
+> cleanEx()
+> nameEx("ToothGrowth")
+> ### * ToothGrowth
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: ToothGrowth
+> ### Title: The Effect of Vitamin C on Tooth Growth in Guinea Pigs
+> ### Aliases: ToothGrowth
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> coplot(len ~ dose | supp, data = ToothGrowth, panel = panel.smooth,
++        xlab = "ToothGrowth data: length vs dose, given type of supplement")
+> 
+> 
+> 
+> cleanEx()
+> nameEx("UCBAdmissions")
+> ### * UCBAdmissions
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: UCBAdmissions
+> ### Title: Student Admissions at UC Berkeley
+> ### Aliases: UCBAdmissions
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> ## Data aggregated over departments
+> apply(UCBAdmissions, c(1, 2), sum)
+          Gender
+Admit      Male Female
+  Admitted 1198    557
+  Rejected 1493   1278
+> mosaicplot(apply(UCBAdmissions, c(1, 2), sum),
++            main = "Student admissions at UC Berkeley")
+> ## Data for individual departments
+> opar <- par(mfrow = c(2, 3), oma = c(0, 0, 2, 0))
+> for(i in 1:6)
++   mosaicplot(UCBAdmissions[,,i],
++     xlab = "Admit", ylab = "Sex",
++     main = paste("Department", LETTERS[i]))
+> mtext(expression(bold("Student admissions at UC Berkeley")),
++       outer = TRUE, cex = 1.5)
+> par(opar)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("UKDriverDeaths")
+> ### * UKDriverDeaths
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: UKDriverDeaths
+> ### Title: Road Casualties in Great Britain 1969-84
+> ### Aliases: UKDriverDeaths Seatbelts
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(stats); require(graphics)
+> ## work with pre-seatbelt period to identify a model, use logs
+> work <- window(log10(UKDriverDeaths), end = 1982+11/12)
+> par(mfrow = c(3, 1))
+> plot(work); acf(work); pacf(work)
+> par(mfrow = c(1, 1))
+> (fit <- arima(work, c(1, 0, 0), seasonal = list(order = c(1, 0, 0))))
+
+Call:
+arima(x = work, order = c(1, 0, 0), seasonal = list(order = c(1, 0, 0)))
+
+Coefficients:
+         ar1    sar1  intercept
+      0.4378  0.6281     3.2274
+s.e.  0.0764  0.0637     0.0131
+
+sigma^2 estimated as 0.00157:  log likelihood = 300.85,  aic = -593.7
+> z <- predict(fit, n.ahead = 24)
+> ts.plot(log10(UKDriverDeaths), z$pred, z$pred+2*z$se, z$pred-2*z$se,
++         lty = c(1, 3, 2, 2), col = c("black", "red", "blue", "blue"))
+> 
+> ## now see the effect of the explanatory variables
+> X <- Seatbelts[, c("kms", "PetrolPrice", "law")]
+> X[, 1] <- log10(X[, 1]) - 4
+> arima(log10(Seatbelts[, "drivers"]), c(1, 0, 0),
++       seasonal = list(order = c(1, 0, 0)), xreg = X)
+
+Call:
+arima(x = log10(Seatbelts[, "drivers"]), order = c(1, 0, 0), seasonal = list(order = c(1, 
+    0, 0)), xreg = X)
+
+Coefficients:
+         ar1    sar1  intercept     kms  PetrolPrice      law
+      0.3348  0.6672     3.3539  0.0082      -1.2224  -0.0963
+s.e.  0.0775  0.0612     0.0441  0.0902       0.3839   0.0166
+
+sigma^2 estimated as 0.001476:  log likelihood = 349.73,  aic = -685.46
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("UKLungDeaths")
+> ### * UKLungDeaths
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: UKLungDeaths
+> ### Title: Monthly Deaths from Lung Diseases in the UK
+> ### Aliases: UKLungDeaths ldeaths fdeaths mdeaths
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(stats); require(graphics) # for time
+> plot(ldeaths)
+> plot(mdeaths, fdeaths)
+> ## Better labels:
+> yr <- floor(tt <- time(mdeaths))
+> plot(mdeaths, fdeaths,
++      xy.labels = paste(month.abb[12*(tt - yr)], yr-1900, sep = "'"))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("UKgas")
+> ### * UKgas
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: UKgas
+> ### Title: UK Quarterly Gas Consumption
+> ### Aliases: UKgas
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> ## maybe str(UKgas) ; plot(UKgas) ...
+> 
+> 
+> 
+> cleanEx()
+> nameEx("USArrests")
+> ### * USArrests
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: USArrests
+> ### Title: Violent Crime Rates by US State
+> ### Aliases: USArrests
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> pairs(USArrests, panel = panel.smooth, main = "USArrests data")
+> 
+> 
+> 
+> cleanEx()
+> nameEx("USJudgeRatings")
+> ### * USJudgeRatings
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: USJudgeRatings
+> ### Title: Lawyers' Ratings of State Judges in the US Superior Court
+> ### Aliases: USJudgeRatings
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> pairs(USJudgeRatings, main = "USJudgeRatings data")
+> 
+> 
+> 
+> cleanEx()
+> nameEx("USPersonalExpenditure")
+> ### * USPersonalExpenditure
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: USPersonalExpenditure
+> ### Title: Personal Expenditure Data
+> ### Aliases: USPersonalExpenditure
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(stats) # for medpolish
+> USPersonalExpenditure
+                      1940   1945  1950 1955  1960
+Food and Tobacco    22.200 44.500 59.60 73.2 86.80
+Household Operation 10.500 15.500 29.00 36.5 46.20
+Medical and Health   3.530  5.760  9.71 14.0 21.10
+Personal Care        1.040  1.980  2.45  3.4  5.40
+Private Education    0.341  0.974  1.80  2.6  3.64
+> medpolish(log10(USPersonalExpenditure))
+1: 1.126317
+2: 1.032421
+Final: 1.032421
+
+Median Polish Results (Dataset: "log10(USPersonalExpenditure)")
+
+Overall: 0.9872192
+
+Row Effects:
+   Food and Tobacco Household Operation  Medical and Health       Personal Care 
+          0.7880270           0.4327608           0.0000000          -0.5606543 
+  Private Education 
+         -0.7319467 
+
+Column Effects:
+      1940       1945       1950       1955       1960 
+-0.4288933 -0.2267967  0.0000000  0.1423128  0.3058289 
+
+Residuals:
+                         1940       1945      1950      1955      1960
+Food and Tobacco     0.000000  0.0999105  0.000000 -0.053048 -0.142555
+Household Operation  0.030103 -0.0028516  0.042418  0.000000 -0.061167
+Medical and Health  -0.010551  0.0000000  0.000000  0.016596  0.031234
+Personal Care        0.019362  0.0968971 -0.037399 -0.037399  0.000000
+Private Education   -0.293625 -0.0399168  0.000000  0.017388  0.000000
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("VADeaths")
+> ### * VADeaths
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: VADeaths
+> ### Title: Death Rates in Virginia (1940)
+> ### Aliases: VADeaths
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(stats); require(graphics)
+> n <- length(dr <- c(VADeaths))
+> nam <- names(VADeaths)
+> d.VAD <- data.frame(
++  Drate = dr,
++  age = rep(ordered(rownames(VADeaths)), length.out = n),
++  gender = gl(2, 5, n, labels = c("M", "F")),
++  site =  gl(2, 10, labels = c("rural", "urban")))
+> coplot(Drate ~ as.numeric(age) | gender * site, data = d.VAD,
++        panel = panel.smooth, xlab = "VADeaths data - Given: gender")
+> summary(aov.VAD <- aov(Drate ~ .^2, data = d.VAD))
+            Df Sum Sq Mean Sq F value   Pr(>F)    
+age          4   6288  1572.1 590.858 8.55e-06 ***
+gender       1    648   647.5 243.361 9.86e-05 ***
+site         1     77    76.8  28.876  0.00579 ** 
+age:gender   4     86    21.6   8.100  0.03358 *  
+age:site     4     43    10.6   3.996  0.10414    
+gender:site  1     73    73.0  27.422  0.00636 ** 
+Residuals    4     11     2.7                     
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> opar <- par(mfrow = c(2, 2), oma = c(0, 0, 1.1, 0))
+> plot(aov.VAD)
+> par(opar)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("WWWusage")
+> ### * WWWusage
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: WWWusage
+> ### Title: Internet Usage per Minute
+> ### Aliases: WWWusage
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> work <- diff(WWWusage)
+> par(mfrow = c(2, 1)); plot(WWWusage); plot(work)
+> ## Not run: 
+> ##D require(stats)
+> ##D aics <- matrix(, 6, 6, dimnames = list(p = 0:5, q = 0:5))
+> ##D for(q in 1:5) aics[1, 1+q] <- arima(WWWusage, c(0, 1, q),
+> ##D     optim.control = list(maxit = 500))$aic
+> ##D for(p in 1:5)
+> ##D    for(q in 0:5) aics[1+p, 1+q] <- arima(WWWusage, c(p, 1, q),
+> ##D        optim.control = list(maxit = 500))$aic
+> ##D round(aics - min(aics, na.rm = TRUE), 2)
+> ## End(Not run)
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("WorldPhones")
+> ### * WorldPhones
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: WorldPhones
+> ### Title: The World's Telephones
+> ### Aliases: WorldPhones
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> matplot(rownames(WorldPhones), WorldPhones, type = "b", log = "y",
++         xlab = "Year", ylab = "Number of telephones (1000's)")
+> legend(1951.5, 80000, colnames(WorldPhones), col = 1:6, lty = 1:5,
++        pch = rep(21, 7))
+> title(main = "World phones data: log scale for response")
+> 
+> 
+> 
+> cleanEx()
+> nameEx("ability.cov")
+> ### * ability.cov
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: ability.cov
+> ### Title: Ability and Intelligence Tests
+> ### Aliases: ability.cov
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> 
+> cleanEx()
+> nameEx("airmiles")
+> ### * airmiles
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: airmiles
+> ### Title: Passenger Miles on Commercial US Airlines, 1937-1960
+> ### Aliases: airmiles
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> plot(airmiles, main = "airmiles data",
++      xlab = "Passenger-miles flown by U.S. commercial airlines", col = 4)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("airquality")
+> ### * airquality
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: airquality
+> ### Title: New York Air Quality Measurements
+> ### Aliases: airquality
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> pairs(airquality, panel = panel.smooth, main = "airquality data")
+> 
+> 
+> 
+> cleanEx()
+> nameEx("anscombe")
+> ### * anscombe
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: anscombe
+> ### Title: Anscombe's Quartet of 'Identical' Simple Linear Regressions
+> ### Aliases: anscombe
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(stats); require(graphics)
+> summary(anscombe)
+       x1             x2             x3             x4           y1        
+ Min.   : 4.0   Min.   : 4.0   Min.   : 4.0   Min.   : 8   Min.   : 4.260  
+ 1st Qu.: 6.5   1st Qu.: 6.5   1st Qu.: 6.5   1st Qu.: 8   1st Qu.: 6.315  
+ Median : 9.0   Median : 9.0   Median : 9.0   Median : 8   Median : 7.580  
+ Mean   : 9.0   Mean   : 9.0   Mean   : 9.0   Mean   : 9   Mean   : 7.501  
+ 3rd Qu.:11.5   3rd Qu.:11.5   3rd Qu.:11.5   3rd Qu.: 8   3rd Qu.: 8.570  
+ Max.   :14.0   Max.   :14.0   Max.   :14.0   Max.   :19   Max.   :10.840  
+       y2              y3              y4        
+ Min.   :3.100   Min.   : 5.39   Min.   : 5.250  
+ 1st Qu.:6.695   1st Qu.: 6.25   1st Qu.: 6.170  
+ Median :8.140   Median : 7.11   Median : 7.040  
+ Mean   :7.501   Mean   : 7.50   Mean   : 7.501  
+ 3rd Qu.:8.950   3rd Qu.: 7.98   3rd Qu.: 8.190  
+ Max.   :9.260   Max.   :12.74   Max.   :12.500  
+> 
+> ##-- now some "magic" to do the 4 regressions in a loop:
+> ff <- y ~ x
+> mods <- setNames(as.list(1:4), paste0("lm", 1:4))
+> for(i in 1:4) {
++   ff[2:3] <- lapply(paste0(c("y","x"), i), as.name)
++   ## or   ff[[2]] <- as.name(paste0("y", i))
++   ##      ff[[3]] <- as.name(paste0("x", i))
++   mods[[i]] <- lmi <- lm(ff, data = anscombe)
++   print(anova(lmi))
++ }
+Analysis of Variance Table
+
+Response: y1
+          Df Sum Sq Mean Sq F value  Pr(>F)   
+x1         1 27.510 27.5100   17.99 0.00217 **
+Residuals  9 13.763  1.5292                   
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+Analysis of Variance Table
+
+Response: y2
+          Df Sum Sq Mean Sq F value   Pr(>F)   
+x2         1 27.500 27.5000  17.966 0.002179 **
+Residuals  9 13.776  1.5307                    
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+Analysis of Variance Table
+
+Response: y3
+          Df Sum Sq Mean Sq F value   Pr(>F)   
+x3         1 27.470 27.4700  17.972 0.002176 **
+Residuals  9 13.756  1.5285                    
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+Analysis of Variance Table
+
+Response: y4
+          Df Sum Sq Mean Sq F value   Pr(>F)   
+x4         1 27.490 27.4900  18.003 0.002165 **
+Residuals  9 13.742  1.5269                    
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> 
+> ## See how close they are (numerically!)
+> sapply(mods, coef)
+                  lm1      lm2       lm3       lm4
+(Intercept) 3.0000909 3.000909 3.0024545 3.0017273
+x1          0.5000909 0.500000 0.4997273 0.4999091
+> lapply(mods, function(fm) coef(summary(fm)))
+$lm1
+             Estimate Std. Error  t value    Pr(>|t|)
+(Intercept) 3.0000909  1.1247468 2.667348 0.025734051
+x1          0.5000909  0.1179055 4.241455 0.002169629
+
+$lm2
+            Estimate Std. Error  t value    Pr(>|t|)
+(Intercept) 3.000909  1.1253024 2.666758 0.025758941
+x2          0.500000  0.1179637 4.238590 0.002178816
+
+$lm3
+             Estimate Std. Error  t value    Pr(>|t|)
+(Intercept) 3.0024545  1.1244812 2.670080 0.025619109
+x3          0.4997273  0.1178777 4.239372 0.002176305
+
+$lm4
+             Estimate Std. Error  t value    Pr(>|t|)
+(Intercept) 3.0017273  1.1239211 2.670763 0.025590425
+x4          0.4999091  0.1178189 4.243028 0.002164602
+
+> 
+> ## Now, do what you should have done in the first place: PLOTS
+> op <- par(mfrow = c(2, 2), mar = 0.1+c(4,4,1,1), oma =  c(0, 0, 2, 0))
+> for(i in 1:4) {
++   ff[2:3] <- lapply(paste0(c("y","x"), i), as.name)
++   plot(ff, data = anscombe, col = "red", pch = 21, bg = "orange", cex = 1.2,
++        xlim = c(3, 19), ylim = c(3, 13))
++   abline(mods[[i]], col = "blue")
++ }
+> mtext("Anscombe's 4 Regression data sets", outer = TRUE, cex = 1.5)
+> par(op)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("attenu")
+> ### * attenu
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: attenu
+> ### Title: The Joyner-Boore Attenuation Data
+> ### Aliases: attenu
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> ## check the data class of the variables
+> sapply(attenu, data.class)
+    event       mag   station      dist     accel 
+"numeric" "numeric"  "factor" "numeric" "numeric" 
+> summary(attenu)
+     event            mag           station         dist       
+ Min.   : 1.00   Min.   :5.000   117    :  5   Min.   :  0.50  
+ 1st Qu.: 9.00   1st Qu.:5.300   1028   :  4   1st Qu.: 11.32  
+ Median :18.00   Median :6.100   113    :  4   Median : 23.40  
+ Mean   :14.74   Mean   :6.084   112    :  3   Mean   : 45.60  
+ 3rd Qu.:20.00   3rd Qu.:6.600   135    :  3   3rd Qu.: 47.55  
+ Max.   :23.00   Max.   :7.700   (Other):147   Max.   :370.00  
+                                 NA's   : 16                   
+     accel        
+ Min.   :0.00300  
+ 1st Qu.:0.04425  
+ Median :0.11300  
+ Mean   :0.15422  
+ 3rd Qu.:0.21925  
+ Max.   :0.81000  
+                  
+> pairs(attenu, main = "attenu data")
+> coplot(accel ~ dist | as.factor(event), data = attenu, show.given = FALSE)
+> coplot(log(accel) ~ log(dist) | as.factor(event),
++        data = attenu, panel = panel.smooth, show.given = FALSE)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("attitude")
+> ### * attitude
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: attitude
+> ### Title: The Chatterjee-Price Attitude Data
+> ### Aliases: attitude
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(stats); require(graphics)
+> pairs(attitude, main = "attitude data")
+> summary(attitude)
+     rating        complaints     privileges       learning         raises     
+ Min.   :40.00   Min.   :37.0   Min.   :30.00   Min.   :34.00   Min.   :43.00  
+ 1st Qu.:58.75   1st Qu.:58.5   1st Qu.:45.00   1st Qu.:47.00   1st Qu.:58.25  
+ Median :65.50   Median :65.0   Median :51.50   Median :56.50   Median :63.50  
+ Mean   :64.63   Mean   :66.6   Mean   :53.13   Mean   :56.37   Mean   :64.63  
+ 3rd Qu.:71.75   3rd Qu.:77.0   3rd Qu.:62.50   3rd Qu.:66.75   3rd Qu.:71.00  
+ Max.   :85.00   Max.   :90.0   Max.   :83.00   Max.   :75.00   Max.   :88.00  
+    critical        advance     
+ Min.   :49.00   Min.   :25.00  
+ 1st Qu.:69.25   1st Qu.:35.00  
+ Median :77.50   Median :41.00  
+ Mean   :74.77   Mean   :42.93  
+ 3rd Qu.:80.00   3rd Qu.:47.75  
+ Max.   :92.00   Max.   :72.00  
+> summary(fm1 <- lm(rating ~ ., data = attitude))
+
+Call:
+lm(formula = rating ~ ., data = attitude)
+
+Residuals:
+     Min       1Q   Median       3Q      Max 
+-10.9418  -4.3555   0.3158   5.5425  11.5990 
+
+Coefficients:
+            Estimate Std. Error t value Pr(>|t|)    
+(Intercept) 10.78708   11.58926   0.931 0.361634    
+complaints   0.61319    0.16098   3.809 0.000903 ***
+privileges  -0.07305    0.13572  -0.538 0.595594    
+learning     0.32033    0.16852   1.901 0.069925 .  
+raises       0.08173    0.22148   0.369 0.715480    
+critical     0.03838    0.14700   0.261 0.796334    
+advance     -0.21706    0.17821  -1.218 0.235577    
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Residual standard error: 7.068 on 23 degrees of freedom
+Multiple R-squared:  0.7326,	Adjusted R-squared:  0.6628 
+F-statistic:  10.5 on 6 and 23 DF,  p-value: 1.24e-05
+
+> opar <- par(mfrow = c(2, 2), oma = c(0, 0, 1.1, 0),
++             mar = c(4.1, 4.1, 2.1, 1.1))
+> plot(fm1)
+> summary(fm2 <- lm(rating ~ complaints, data = attitude))
+
+Call:
+lm(formula = rating ~ complaints, data = attitude)
+
+Residuals:
+     Min       1Q   Median       3Q      Max 
+-12.8799  -5.9905   0.1783   6.2978   9.6294 
+
+Coefficients:
+            Estimate Std. Error t value Pr(>|t|)    
+(Intercept) 14.37632    6.61999   2.172   0.0385 *  
+complaints   0.75461    0.09753   7.737 1.99e-08 ***
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Residual standard error: 6.993 on 28 degrees of freedom
+Multiple R-squared:  0.6813,	Adjusted R-squared:  0.6699 
+F-statistic: 59.86 on 1 and 28 DF,  p-value: 1.988e-08
+
+> plot(fm2)
+> par(opar)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("beavers")
+> ### * beavers
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: beavers
+> ### Title: Body Temperature Series of Two Beavers
+> ### Aliases: beavers beaver1 beaver2
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> (yl <- range(beaver1$temp, beaver2$temp))
+[1] 36.33 38.35
+> 
+> beaver.plot <- function(bdat, ...) {
++   nam <- deparse(substitute(bdat))
++   with(bdat, {
++     # Hours since start of day:
++     hours <- time %/% 100 + 24*(day - day[1]) + (time %% 100)/60
++     plot (hours, temp, type = "l", ...,
++           main = paste(nam, "body temperature"))
++     abline(h = 37.5, col = "gray", lty = 2)
++     is.act <- activ == 1
++     points(hours[is.act], temp[is.act], col = 2, cex = .8)
++   })
++ }
+> op <- par(mfrow = c(2, 1), mar = c(3, 3, 4, 2), mgp = 0.9 * 2:0)
+>  beaver.plot(beaver1, ylim = yl)
+>  beaver.plot(beaver2, ylim = yl)
+> par(op)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("cars")
+> ### * cars
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: cars
+> ### Title: Speed and Stopping Distances of Cars
+> ### Aliases: cars
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(stats); require(graphics)
+> plot(cars, xlab = "Speed (mph)", ylab = "Stopping distance (ft)",
++      las = 1)
+> lines(lowess(cars$speed, cars$dist, f = 2/3, iter = 3), col = "red")
+> title(main = "cars data")
+> plot(cars, xlab = "Speed (mph)", ylab = "Stopping distance (ft)",
++      las = 1, log = "xy")
+> title(main = "cars data (logarithmic scales)")
+> lines(lowess(cars$speed, cars$dist, f = 2/3, iter = 3), col = "red")
+> summary(fm1 <- lm(log(dist) ~ log(speed), data = cars))
+
+Call:
+lm(formula = log(dist) ~ log(speed), data = cars)
+
+Residuals:
+     Min       1Q   Median       3Q      Max 
+-1.00215 -0.24578 -0.02898  0.20717  0.88289 
+
+Coefficients:
+            Estimate Std. Error t value Pr(>|t|)    
+(Intercept)  -0.7297     0.3758  -1.941   0.0581 .  
+log(speed)    1.6024     0.1395  11.484 2.26e-15 ***
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Residual standard error: 0.4053 on 48 degrees of freedom
+Multiple R-squared:  0.7331,	Adjusted R-squared:  0.7276 
+F-statistic: 131.9 on 1 and 48 DF,  p-value: 2.259e-15
+
+> opar <- par(mfrow = c(2, 2), oma = c(0, 0, 1.1, 0),
++             mar = c(4.1, 4.1, 2.1, 1.1))
+> plot(fm1)
+> par(opar)
+> 
+> ## An example of polynomial regression
+> plot(cars, xlab = "Speed (mph)", ylab = "Stopping distance (ft)",
++     las = 1, xlim = c(0, 25))
+> d <- seq(0, 25, length.out = 200)
+> for(degree in 1:4) {
++   fm <- lm(dist ~ poly(speed, degree), data = cars)
++   assign(paste("cars", degree, sep = "."), fm)
++   lines(d, predict(fm, data.frame(speed = d)), col = degree)
++ }
+> anova(cars.1, cars.2, cars.3, cars.4)
+Analysis of Variance Table
+
+Model 1: dist ~ poly(speed, degree)
+Model 2: dist ~ poly(speed, degree)
+Model 3: dist ~ poly(speed, degree)
+Model 4: dist ~ poly(speed, degree)
+  Res.Df   RSS Df Sum of Sq      F Pr(>F)
+1     48 11354                           
+2     47 10825  1    528.81 2.3108 0.1355
+3     46 10634  1    190.35 0.8318 0.3666
+4     45 10298  1    336.55 1.4707 0.2316
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("chickwts")
+> ### * chickwts
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: chickwts
+> ### Title: Chicken Weights by Feed Type
+> ### Aliases: chickwts
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(stats); require(graphics)
+> boxplot(weight ~ feed, data = chickwts, col = "lightgray",
++     varwidth = TRUE, notch = TRUE, main = "chickwt data",
++     ylab = "Weight at six weeks (gm)")
+Warning in bxp(list(stats = c(216, 271.5, 342, 373.5, 404, 108, 136, 151.5,  :
+  some notches went outside hinges ('box'): maybe set notch=FALSE
+> anova(fm1 <- lm(weight ~ feed, data = chickwts))
+Analysis of Variance Table
+
+Response: weight
+          Df Sum Sq Mean Sq F value    Pr(>F)    
+feed       5 231129   46226  15.365 5.936e-10 ***
+Residuals 65 195556    3009                      
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> opar <- par(mfrow = c(2, 2), oma = c(0, 0, 1.1, 0),
++             mar = c(4.1, 4.1, 2.1, 1.1))
+> plot(fm1)
+> par(opar)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("co2")
+> ### * co2
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: co2
+> ### Title: Mauna Loa Atmospheric CO2 Concentration
+> ### Aliases: co2
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> plot(co2, ylab = expression("Atmospheric concentration of CO"[2]),
++      las = 1)
+> title(main = "co2 data set")
+> 
+> 
+> 
+> cleanEx()
+> nameEx("crimtab")
+> ### * crimtab
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: crimtab
+> ### Title: Student's 3000 Criminals Data
+> ### Aliases: crimtab
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(stats)
+> dim(crimtab)
+[1] 42 22
+> utils::str(crimtab)
+ 'table' int [1:42, 1:22] 0 0 0 0 0 0 1 0 0 0 ...
+ - attr(*, "dimnames")=List of 2
+  ..$ : chr [1:42] "9.4" "9.5" "9.6" "9.7" ...
+  ..$ : chr [1:22] "142.24" "144.78" "147.32" "149.86" ...
+> ## for nicer printing:
+> local({cT <- crimtab
++        colnames(cT) <- substring(colnames(cT), 2, 3)
++        print(cT, zero.print = " ")
++ })
+     42 44 47 49 52 54 57 60 62 65 67 70 72 75 77 80 82 85 87 90 93 95
+9.4                                                                   
+9.5                  1                                                
+9.6                                                                   
+9.7                                                                   
+9.8                     1                                             
+9.9         1     1     1                                             
+10    1        1  2     2        1                                    
+10.1           1  3  1     1  1                                       
+10.2        2  2  2  1     2     1                                    
+10.3     1  1  3  2  2  3  5                                          
+10.4        1  1  2  3  3  4  3  3                                    
+10.5           1  3  7  6  4  3  1  3  1     1                        
+10.6           1  4  5  9 14  6  3  1        1                        
+10.7        1  2  4  9 14 16 15  7  3  1  2                           
+10.8           2  5  6 14 27 10  7  1  2  1                           
+10.9              2  6 14 24 27 14 10  4  1                           
+11             2  6 12 15 31 37 27 17 10  6                           
+11.1           3  3 12 22 26 24 26 24  7  4  1                        
+11.2           3  2  7 21 30 38 29 27 20  4  1                       1
+11.3           1     5 10 24 26 39 26 24  7  2                        
+11.4              3  4  9 29 56 58 26 22 10 11                        
+11.5                 5 11 17 33 57 38 34 25 11  2                     
+11.6              2  1  4 13 37 39 48 38 27 12  2  2     1            
+11.7                 2  9 17 30 37 48 45 24  9  9  2                  
+11.8              1     2 11 15 35 41 34 29 10  5  1                  
+11.9              1  1  2 12 10 27 32 35 19 10  9  3  1               
+12                      1  4  8 19 42 39 22 16  8  2  2               
+12.1                       2  4 13 22 28 15 27 10  4  1               
+12.2                    1  2  5  6 23 17 16 11  8  1  1               
+12.3                          4  8 10 13 20 23  6  5                  
+12.4                    1  1  1  2  7 12  4  7  7  1        1         
+12.5                       1     1  3 12 11  8  6  8     2            
+12.6                             1     3  5  7  8  6  3  1  1         
+12.7                             1  1  7  5  5  8  2  2               
+12.8                                1  2  3  1  8  5  3  1  1         
+12.9                                   1  2  2     1  1               
+13                                  3     1     1     2  1            
+13.1                                   1  1                           
+13.2                                1  1     1     3                  
+13.3                                                  1     1         
+13.4                                                                  
+13.5                                                     1            
+> 
+> ## Repeat Student's experiment:
+> 
+> # 1) Reconstitute 3000 raw data for heights in inches and rounded to
+> #    nearest integer as in Student's paper:
+> 
+> (heIn <- round(as.numeric(colnames(crimtab)) / 2.54))
+ [1] 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
+> d.hei <- data.frame(height = rep(heIn, colSums(crimtab)))
+> 
+> # 2) shuffle the data:
+> 
+> set.seed(1)
+> d.hei <- d.hei[sample(1:3000), , drop = FALSE]
+> 
+> # 3) Make 750 samples each of size 4:
+> 
+> d.hei$sample <- as.factor(rep(1:750, each = 4))
+> 
+> # 4) Compute the means and standard deviations (n) for the 750 samples:
+> 
+> h.mean <- with(d.hei, tapply(height, sample, FUN = mean))
+> h.sd   <- with(d.hei, tapply(height, sample, FUN = sd)) * sqrt(3/4)
+> 
+> # 5) Compute the difference between the mean of each sample and
+> #    the mean of the population and then divide by the
+> #    standard deviation of the sample:
+> 
+> zobs <- (h.mean - mean(d.hei[,"height"]))/h.sd
+> 
+> # 6) Replace infinite values by +/- 6 as in Student's paper:
+> 
+> zobs[infZ <- is.infinite(zobs)] # 3 of them
+  73  312  674 
+-Inf  Inf -Inf 
+> zobs[infZ] <- 6 * sign(zobs[infZ])
+> 
+> # 7) Plot the distribution:
+> 
+> require(grDevices); require(graphics)
+> hist(x = zobs, probability = TRUE, xlab = "Student's z",
++      col = grey(0.8), border = grey(0.5),
++      main = "Distribution of Student's z score  for 'crimtab' data")
+> 
+> 
+> 
+> cleanEx()
+> nameEx("discoveries")
+> ### * discoveries
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: discoveries
+> ### Title: Yearly Numbers of Important Discoveries
+> ### Aliases: discoveries
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> plot(discoveries, ylab = "Number of important discoveries",
++      las = 1)
+> title(main = "discoveries data set")
+> 
+> 
+> 
+> cleanEx()
+> nameEx("esoph")
+> ### * esoph
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: esoph
+> ### Title: Smoking, Alcohol and (O)esophageal Cancer
+> ### Aliases: esoph
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(stats)
+> require(graphics) # for mosaicplot
+> summary(esoph)
+   agegp          alcgp         tobgp        ncases         ncontrols    
+ 25-34:15   0-39g/day:23   0-9g/day:24   Min.   : 0.000   Min.   : 1.00  
+ 35-44:15   40-79    :23   10-19   :24   1st Qu.: 0.000   1st Qu.: 3.00  
+ 45-54:16   80-119   :21   20-29   :20   Median : 1.000   Median : 6.00  
+ 55-64:16   120+     :21   30+     :20   Mean   : 2.273   Mean   :11.08  
+ 65-74:15                                3rd Qu.: 4.000   3rd Qu.:14.00  
+ 75+  :11                                Max.   :17.000   Max.   :60.00  
+> ## effects of alcohol, tobacco and interaction, age-adjusted
+> model1 <- glm(cbind(ncases, ncontrols) ~ agegp + tobgp * alcgp,
++               data = esoph, family = binomial())
+> anova(model1)
+Analysis of Deviance Table
+
+Model: binomial, link: logit
+
+Response: cbind(ncases, ncontrols)
+
+Terms added sequentially (first to last)
+
+
+            Df Deviance Resid. Df Resid. Dev
+NULL                           87    227.241
+agegp        5   88.128        82    139.112
+tobgp        3   19.085        79    120.028
+alcgp        3   66.054        76     53.973
+tobgp:alcgp  9    6.489        67     47.484
+> ## Try a linear effect of alcohol and tobacco
+> model2 <- glm(cbind(ncases, ncontrols) ~ agegp + unclass(tobgp)
++                                          + unclass(alcgp),
++               data = esoph, family = binomial())
+> summary(model2)
+
+Call:
+glm(formula = cbind(ncases, ncontrols) ~ agegp + unclass(tobgp) + 
+    unclass(alcgp), family = binomial(), data = esoph)
+
+Deviance Residuals: 
+    Min       1Q   Median       3Q      Max  
+-1.7628  -0.6426  -0.2709   0.3043   2.0421  
+
+Coefficients:
+               Estimate Std. Error z value Pr(>|z|)    
+(Intercept)    -4.01097    0.31224 -12.846  < 2e-16 ***
+agegp.L         2.96113    0.65092   4.549 5.39e-06 ***
+agegp.Q        -1.33735    0.58918  -2.270  0.02322 *  
+agegp.C         0.15292    0.44792   0.341  0.73281    
+agegp^4         0.06668    0.30776   0.217  0.82848    
+agegp^5        -0.20288    0.19523  -1.039  0.29872    
+unclass(tobgp)  0.26162    0.08198   3.191  0.00142 ** 
+unclass(alcgp)  0.65308    0.08452   7.727 1.10e-14 ***
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+(Dispersion parameter for binomial family taken to be 1)
+
+    Null deviance: 227.241  on 87  degrees of freedom
+Residual deviance:  59.277  on 80  degrees of freedom
+AIC: 222.76
+
+Number of Fisher Scoring iterations: 6
+
+> ## Re-arrange data for a mosaic plot
+> ttt <- table(esoph$agegp, esoph$alcgp, esoph$tobgp)
+> o <- with(esoph, order(tobgp, alcgp, agegp))
+> ttt[ttt == 1] <- esoph$ncases[o]
+> tt1 <- table(esoph$agegp, esoph$alcgp, esoph$tobgp)
+> tt1[tt1 == 1] <- esoph$ncontrols[o]
+> tt <- array(c(ttt, tt1), c(dim(ttt),2),
++             c(dimnames(ttt), list(c("Cancer", "control"))))
+> mosaicplot(tt, main = "esoph data set", color = TRUE)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("euro")
+> ### * euro
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: euro
+> ### Title: Conversion Rates of Euro Currencies
+> ### Aliases: euro euro.cross
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> cbind(euro)
+           euro
+ATS   13.760300
+BEF   40.339900
+DEM    1.955830
+ESP  166.386000
+FIM    5.945730
+FRF    6.559570
+IEP    0.787564
+ITL 1936.270000
+LUF   40.339900
+NLG    2.203710
+PTE  200.482000
+> 
+> ## These relations hold:
+> euro == signif(euro, 6) # [6 digit precision in Euro's definition]
+ ATS  BEF  DEM  ESP  FIM  FRF  IEP  ITL  LUF  NLG  PTE 
+TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE 
+> all(euro.cross == outer(1/euro, euro))
+[1] TRUE
+> 
+> ## Convert 20 Euro to Belgian Franc
+> 20 * euro["BEF"]
+    BEF 
+806.798 
+> ## Convert 20 Austrian Schilling to Euro
+> 20 / euro["ATS"]
+     ATS 
+1.453457 
+> ## Convert 20 Spanish Pesetas to Italian Lira
+> 20 * euro.cross["ESP", "ITL"]
+[1] 232.7443
+> 
+> require(graphics)
+> dotchart(euro,
++          main = "euro data: 1 Euro in currency unit")
+> dotchart(1/euro,
++          main = "euro data: 1 currency unit in Euros")
+> dotchart(log(euro, 10),
++          main = "euro data: log10(1 Euro in currency unit)")
+> 
+> 
+> 
+> cleanEx()
+> nameEx("faithful")
+> ### * faithful
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: faithful
+> ### Title: Old Faithful Geyser Data
+> ### Aliases: faithful
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(stats); require(graphics)
+> f.tit <-  "faithful data: Eruptions of Old Faithful"
+> 
+> ne60 <- round(e60 <- 60 * faithful$eruptions)
+> all.equal(e60, ne60)             # relative diff. ~ 1/10000
+[1] "Mean relative difference: 9.515332e-05"
+> table(zapsmall(abs(e60 - ne60))) # 0, 0.02 or 0.04
+
+   0 0.02 0.04 
+ 106  163    3 
+> faithful$better.eruptions <- ne60 / 60
+> te <- table(ne60)
+> te[te >= 4]                      # (too) many multiples of 5 !
+ne60
+105 108 110 112 113 120 216 230 240 245 249 250 255 260 261 262 265 270 272 275 
+  6   4   7   8   4   4   4   5   6   5   4   4   4   5   4   4   4   8   5   4 
+276 282 288 
+  4   6   6 
+> plot(names(te), te, type = "h", main = f.tit, xlab = "Eruption time (sec)")
+> 
+> plot(faithful[, -3], main = f.tit,
++      xlab = "Eruption time (min)",
++      ylab = "Waiting time to next eruption (min)")
+> lines(lowess(faithful$eruptions, faithful$waiting, f = 2/3, iter = 3),
++       col = "red")
+> 
+> 
+> 
+> cleanEx()
+> nameEx("freeny")
+> ### * freeny
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: freeny
+> ### Title: Freeny's Revenue Data
+> ### Aliases: freeny freeny.x freeny.y
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(stats); require(graphics)
+> summary(freeny)
+       y         lag.quarterly.revenue  price.index     income.level  
+ Min.   :8.791   Min.   :8.791         Min.   :4.278   Min.   :5.821  
+ 1st Qu.:9.045   1st Qu.:9.020         1st Qu.:4.392   1st Qu.:5.948  
+ Median :9.314   Median :9.284         Median :4.510   Median :6.061  
+ Mean   :9.306   Mean   :9.281         Mean   :4.496   Mean   :6.039  
+ 3rd Qu.:9.591   3rd Qu.:9.561         3rd Qu.:4.605   3rd Qu.:6.139  
+ Max.   :9.794   Max.   :9.775         Max.   :4.710   Max.   :6.200  
+ market.potential
+ Min.   :12.97   
+ 1st Qu.:13.01   
+ Median :13.07   
+ Mean   :13.07   
+ 3rd Qu.:13.12   
+ Max.   :13.17   
+> pairs(freeny, main = "freeny data")
+> # gives warning: freeny$y has class "ts"
+> 
+> summary(fm1 <- lm(y ~ ., data = freeny))
+
+Call:
+lm(formula = y ~ ., data = freeny)
+
+Residuals:
+       Min         1Q     Median         3Q        Max 
+-0.0259426 -0.0101033  0.0003824  0.0103236  0.0267124 
+
+Coefficients:
+                      Estimate Std. Error t value Pr(>|t|)    
+(Intercept)           -10.4726     6.0217  -1.739   0.0911 .  
+lag.quarterly.revenue   0.1239     0.1424   0.870   0.3904    
+price.index            -0.7542     0.1607  -4.693 4.28e-05 ***
+income.level            0.7675     0.1339   5.730 1.93e-06 ***
+market.potential        1.3306     0.5093   2.613   0.0133 *  
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Residual standard error: 0.01473 on 34 degrees of freedom
+Multiple R-squared:  0.9981,	Adjusted R-squared:  0.9978 
+F-statistic:  4354 on 4 and 34 DF,  p-value: < 2.2e-16
+
+> opar <- par(mfrow = c(2, 2), oma = c(0, 0, 1.1, 0),
++             mar = c(4.1, 4.1, 2.1, 1.1))
+> plot(fm1)
+> par(opar)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("infert")
+> ### * infert
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: infert
+> ### Title: Infertility after Spontaneous and Induced Abortion
+> ### Aliases: infert
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(stats)
+> model1 <- glm(case ~ spontaneous+induced, data = infert, family = binomial())
+> summary(model1)
+
+Call:
+glm(formula = case ~ spontaneous + induced, family = binomial(), 
+    data = infert)
+
+Deviance Residuals: 
+    Min       1Q   Median       3Q      Max  
+-1.6678  -0.8360  -0.5772   0.9030   1.9362  
+
+Coefficients:
+            Estimate Std. Error z value Pr(>|z|)    
+(Intercept)  -1.7079     0.2677  -6.380 1.78e-10 ***
+spontaneous   1.1972     0.2116   5.657 1.54e-08 ***
+induced       0.4181     0.2056   2.033    0.042 *  
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+(Dispersion parameter for binomial family taken to be 1)
+
+    Null deviance: 316.17  on 247  degrees of freedom
+Residual deviance: 279.61  on 245  degrees of freedom
+AIC: 285.61
+
+Number of Fisher Scoring iterations: 4
+
+> ## adjusted for other potential confounders:
+> summary(model2 <- glm(case ~ age+parity+education+spontaneous+induced,
++                      data = infert, family = binomial()))
+
+Call:
+glm(formula = case ~ age + parity + education + spontaneous + 
+    induced, family = binomial(), data = infert)
+
+Deviance Residuals: 
+    Min       1Q   Median       3Q      Max  
+-1.7603  -0.8162  -0.4956   0.8349   2.6536  
+
+Coefficients:
+                 Estimate Std. Error z value Pr(>|z|)    
+(Intercept)      -1.14924    1.41220  -0.814   0.4158    
+age               0.03958    0.03120   1.269   0.2046    
+parity           -0.82828    0.19649  -4.215 2.49e-05 ***
+education6-11yrs -1.04424    0.79255  -1.318   0.1876    
+education12+ yrs -1.40321    0.83416  -1.682   0.0925 .  
+spontaneous       2.04591    0.31016   6.596 4.21e-11 ***
+induced           1.28876    0.30146   4.275 1.91e-05 ***
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+(Dispersion parameter for binomial family taken to be 1)
+
+    Null deviance: 316.17  on 247  degrees of freedom
+Residual deviance: 257.80  on 241  degrees of freedom
+AIC: 271.8
+
+Number of Fisher Scoring iterations: 4
+
+> ## Really should be analysed by conditional logistic regression
+> ## which is in the survival package
+> 
+> 
+> 
+> cleanEx()
+> nameEx("iris")
+> ### * iris
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: iris
+> ### Title: Edgar Anderson's Iris Data
+> ### Aliases: iris iris3
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> dni3 <- dimnames(iris3)
+> ii <- data.frame(matrix(aperm(iris3, c(1,3,2)), ncol = 4,
++                         dimnames = list(NULL, sub(" L.",".Length",
++                                         sub(" W.",".Width", dni3[[2]])))),
++     Species = gl(3, 50, labels = sub("S", "s", sub("V", "v", dni3[[3]]))))
+> all.equal(ii, iris) # TRUE
+[1] TRUE
+> 
+> 
+> 
+> cleanEx()
+> nameEx("islands")
+> ### * islands
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: islands
+> ### Title: Areas of the World's Major Landmasses
+> ### Aliases: islands
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> dotchart(log(islands, 10),
++    main = "islands data: log10(area) (log10(sq. miles))")
+> dotchart(log(islands[order(islands)], 10),
++    main = "islands data: log10(area) (log10(sq. miles))")
+> 
+> 
+> 
+> cleanEx()
+> nameEx("longley")
+> ### * longley
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: longley
+> ### Title: Longley's Economic Regression Data
+> ### Aliases: longley
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(stats); require(graphics)
+> ## give the data set in the form it is used in S-PLUS:
+> longley.x <- data.matrix(longley[, 1:6])
+> longley.y <- longley[, "Employed"]
+> pairs(longley, main = "longley data")
+> summary(fm1 <- lm(Employed ~ ., data = longley))
+
+Call:
+lm(formula = Employed ~ ., data = longley)
+
+Residuals:
+     Min       1Q   Median       3Q      Max 
+-0.41011 -0.15767 -0.02816  0.10155  0.45539 
+
+Coefficients:
+               Estimate Std. Error t value Pr(>|t|)    
+(Intercept)  -3.482e+03  8.904e+02  -3.911 0.003560 ** 
+GNP.deflator  1.506e-02  8.492e-02   0.177 0.863141    
+GNP          -3.582e-02  3.349e-02  -1.070 0.312681    
+Unemployed   -2.020e-02  4.884e-03  -4.136 0.002535 ** 
+Armed.Forces -1.033e-02  2.143e-03  -4.822 0.000944 ***
+Population   -5.110e-02  2.261e-01  -0.226 0.826212    
+Year          1.829e+00  4.555e-01   4.016 0.003037 ** 
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Residual standard error: 0.3049 on 9 degrees of freedom
+Multiple R-squared:  0.9955,	Adjusted R-squared:  0.9925 
+F-statistic: 330.3 on 6 and 9 DF,  p-value: 4.984e-10
+
+> opar <- par(mfrow = c(2, 2), oma = c(0, 0, 1.1, 0),
++             mar = c(4.1, 4.1, 2.1, 1.1))
+> plot(fm1)
+> par(opar)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("morley")
+> ### * morley
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: morley
+> ### Title: Michelson Speed of Light Data
+> ### Aliases: morley
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(stats); require(graphics)
+> michelson <- transform(morley,
++                        Expt = factor(Expt), Run = factor(Run))
+> xtabs(~ Expt + Run, data = michelson)  # 5 x 20 balanced (two-way)
+    Run
+Expt 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
+   1 1 1 1 1 1 1 1 1 1  1  1  1  1  1  1  1  1  1  1  1
+   2 1 1 1 1 1 1 1 1 1  1  1  1  1  1  1  1  1  1  1  1
+   3 1 1 1 1 1 1 1 1 1  1  1  1  1  1  1  1  1  1  1  1
+   4 1 1 1 1 1 1 1 1 1  1  1  1  1  1  1  1  1  1  1  1
+   5 1 1 1 1 1 1 1 1 1  1  1  1  1  1  1  1  1  1  1  1
+> plot(Speed ~ Expt, data = michelson,
++      main = "Speed of Light Data", xlab = "Experiment No.")
+> fm <- aov(Speed ~ Run + Expt, data = michelson)
+> summary(fm)
+            Df Sum Sq Mean Sq F value  Pr(>F)   
+Run         19 113344    5965   1.105 0.36321   
+Expt         4  94514   23629   4.378 0.00307 **
+Residuals   76 410166    5397                   
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> fm0 <- update(fm, . ~ . - Run)
+> anova(fm0, fm)
+Analysis of Variance Table
+
+Model 1: Speed ~ Expt
+Model 2: Speed ~ Run + Expt
+  Res.Df    RSS Df Sum of Sq      F Pr(>F)
+1     95 523510                           
+2     76 410166 19    113344 1.1053 0.3632
+> 
+> 
+> 
+> cleanEx()
+> nameEx("mtcars")
+> ### * mtcars
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: mtcars
+> ### Title: Motor Trend Car Road Tests
+> ### Aliases: mtcars
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> pairs(mtcars, main = "mtcars data")
+> coplot(mpg ~ disp | as.factor(cyl), data = mtcars,
++        panel = panel.smooth, rows = 1)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("nhtemp")
+> ### * nhtemp
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: nhtemp
+> ### Title: Average Yearly Temperatures in New Haven
+> ### Aliases: nhtemp
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(stats); require(graphics)
+> plot(nhtemp, main = "nhtemp data",
++   ylab = "Mean annual temperature in New Haven, CT (deg. F)")
+> 
+> 
+> 
+> cleanEx()
+> nameEx("nottem")
+> ### * nottem
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: nottem
+> ### Title: Average Monthly Temperatures at Nottingham, 1920-1939
+> ### Aliases: nottem
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> 
+> 
+> cleanEx()
+> nameEx("npk")
+> ### * npk
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: npk
+> ### Title: Classical N, P, K Factorial Experiment
+> ### Aliases: npk
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> 
+> cleanEx()
+> nameEx("occupationalStatus")
+> ### * occupationalStatus
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: occupationalStatus
+> ### Title: Occupational Status of Fathers and their Sons
+> ### Aliases: occupationalStatus
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(stats); require(graphics)
+> 
+> plot(occupationalStatus)
+> 
+> ##  Fit a uniform association model separating diagonal effects
+> Diag <- as.factor(diag(1:8))
+> Rscore <- scale(as.numeric(row(occupationalStatus)), scale = FALSE)
+> Cscore <- scale(as.numeric(col(occupationalStatus)), scale = FALSE)
+> modUnif <- glm(Freq ~ origin + destination + Diag + Rscore:Cscore,
++                family = poisson, data = occupationalStatus)
+> 
+> summary(modUnif)
+
+Call:
+glm(formula = Freq ~ origin + destination + Diag + Rscore:Cscore, 
+    family = poisson, data = occupationalStatus)
+
+Deviance Residuals: 
+    Min       1Q   Median       3Q      Max  
+-2.6521  -0.6267   0.0000   0.5913   2.0964  
+
+Coefficients:
+              Estimate Std. Error z value Pr(>|z|)    
+(Intercept)   0.568592   0.183358   3.101 0.001929 ** 
+origin2       0.431314   0.149415   2.887 0.003893 ** 
+origin3       1.461862   0.131141  11.147  < 2e-16 ***
+origin4       1.788731   0.126588  14.130  < 2e-16 ***
+origin5       0.441011   0.144844   3.045 0.002329 ** 
+origin6       2.491735   0.121219  20.556  < 2e-16 ***
+origin7       1.127536   0.129032   8.738  < 2e-16 ***
+origin8       0.796445   0.131863   6.040 1.54e-09 ***
+destination2  0.873202   0.166902   5.232 1.68e-07 ***
+destination3  1.813992   0.153861  11.790  < 2e-16 ***
+destination4  2.082515   0.150887  13.802  < 2e-16 ***
+destination5  1.366383   0.155590   8.782  < 2e-16 ***
+destination6  2.816369   0.146054  19.283  < 2e-16 ***
+destination7  1.903918   0.147810  12.881  < 2e-16 ***
+destination8  1.398585   0.151658   9.222  < 2e-16 ***
+Diag1         1.665495   0.237383   7.016 2.28e-12 ***
+Diag2         0.959681   0.212122   4.524 6.06e-06 ***
+Diag3         0.021750   0.156530   0.139 0.889490    
+Diag4         0.226399   0.124364   1.820 0.068689 .  
+Diag5         0.808646   0.229754   3.520 0.000432 ***
+Diag6         0.132277   0.077191   1.714 0.086597 .  
+Diag7         0.506709   0.115936   4.371 1.24e-05 ***
+Diag8         0.221880   0.134803   1.646 0.099771 .  
+Rscore:Cscore 0.136974   0.007489  18.289  < 2e-16 ***
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+(Dispersion parameter for poisson family taken to be 1)
+
+    Null deviance: 4679.004  on 63  degrees of freedom
+Residual deviance:   58.436  on 40  degrees of freedom
+AIC: 428.78
+
+Number of Fisher Scoring iterations: 4
+
+> plot(modUnif) # 4 plots, with warning about  h_ii ~= 1
+Warning: not plotting observations with leverage one:
+  1, 10, 19, 28, 37, 46, 55, 64
+Warning: not plotting observations with leverage one:
+  1, 10, 19, 28, 37, 46, 55, 64
+> 
+> 
+> 
+> cleanEx()
+> nameEx("precip")
+> ### * precip
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: precip
+> ### Title: Annual Precipitation in US Cities
+> ### Aliases: precip
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> dotchart(precip[order(precip)], main = "precip data")
+> title(sub = "Average annual precipitation (in.)")
+> 
+> 
+> 
+> cleanEx()
+> nameEx("presidents")
+> ### * presidents
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: presidents
+> ### Title: Quarterly Approval Ratings of US Presidents
+> ### Aliases: presidents
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(stats); require(graphics)
+> plot(presidents, las = 1, ylab = "Approval rating (%)",
++      main = "presidents data")
+> 
+> 
+> 
+> cleanEx()
+> nameEx("pressure")
+> ### * pressure
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: pressure
+> ### Title: Vapor Pressure of Mercury as a Function of Temperature
+> ### Aliases: pressure
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> plot(pressure, xlab = "Temperature (deg C)",
++      ylab = "Pressure (mm of Hg)",
++      main = "pressure data: Vapor Pressure of Mercury")
+> plot(pressure, xlab = "Temperature (deg C)",  log = "y",
++      ylab = "Pressure (mm of Hg)",
++      main = "pressure data: Vapor Pressure of Mercury")
+> 
+> 
+> 
+> cleanEx()
+> nameEx("quakes")
+> ### * quakes
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: quakes
+> ### Title: Locations of Earthquakes off Fiji
+> ### Aliases: quakes
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> pairs(quakes, main = "Fiji Earthquakes, N = 1000", cex.main = 1.2, pch = ".")
+> 
+> 
+> 
+> cleanEx()
+> nameEx("randu")
+> ### * randu
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: randu
+> ### Title: Random Numbers from Congruential Generator RANDU
+> ### Aliases: randu
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> 
+> 
+> 
+> cleanEx()
+> nameEx("sleep")
+> ### * sleep
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: sleep
+> ### Title: Student's Sleep Data
+> ### Aliases: sleep
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(stats)
+> ## Student's paired t-test
+> with(sleep,
++      t.test(extra[group == 1],
++             extra[group == 2], paired = TRUE))
+
+	Paired t-test
+
+data:  extra[group == 1] and extra[group == 2]
+t = -4.0621, df = 9, p-value = 0.002833
+alternative hypothesis: true difference in means is not equal to 0
+95 percent confidence interval:
+ -2.4598858 -0.7001142
+sample estimates:
+mean of the differences 
+                  -1.58 
+
+> 
+> ## The sleep *prolongations*
+> sleep1 <- with(sleep, extra[group == 2] - extra[group == 1])
+> summary(sleep1)
+   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
+   0.00    1.05    1.30    1.58    1.70    4.60 
+> stripchart(sleep1, method = "stack", xlab = "hours",
++            main = "Sleep prolongation (n = 10)")
+> boxplot(sleep1, horizontal = TRUE, add = TRUE,
++         at = .6, pars = list(boxwex = 0.5, staplewex = 0.25))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("stackloss")
+> ### * stackloss
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: stackloss
+> ### Title: Brownlee's Stack Loss Plant Data
+> ### Aliases: stackloss stack.loss stack.x
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(stats)
+> summary(lm.stack <- lm(stack.loss ~ stack.x))
+
+Call:
+lm(formula = stack.loss ~ stack.x)
+
+Residuals:
+    Min      1Q  Median      3Q     Max 
+-7.2377 -1.7117 -0.4551  2.3614  5.6978 
+
+Coefficients:
+                  Estimate Std. Error t value Pr(>|t|)    
+(Intercept)       -39.9197    11.8960  -3.356  0.00375 ** 
+stack.xAir.Flow     0.7156     0.1349   5.307  5.8e-05 ***
+stack.xWater.Temp   1.2953     0.3680   3.520  0.00263 ** 
+stack.xAcid.Conc.  -0.1521     0.1563  -0.973  0.34405    
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Residual standard error: 3.243 on 17 degrees of freedom
+Multiple R-squared:  0.9136,	Adjusted R-squared:  0.8983 
+F-statistic:  59.9 on 3 and 17 DF,  p-value: 3.016e-09
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("sunspot.month")
+> ### * sunspot.month
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: sunspot.month
+> ### Title: Monthly Sunspot Data, from 1749 to "Present"
+> ### Aliases: sunspot.month
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(stats); require(graphics)
+> ## Compare the monthly series
+> plot (sunspot.month,
++       main="sunspot.month & sunspots [package'datasets']", col=2)
+> lines(sunspots) # -> faint differences where they overlap
+> 
+> ## Now look at the difference :
+> all(tsp(sunspots)     [c(1,3)] ==
++     tsp(sunspot.month)[c(1,3)]) ## Start & Periodicity are the same
+[1] TRUE
+> n1 <- length(sunspots)
+> table(eq <- sunspots == sunspot.month[1:n1]) #>  132  are different !
+
+FALSE  TRUE 
+  143  2677 
+> i <- which(!eq)
+> rug(time(eq)[i])
+> s1 <- sunspots[i] ; s2 <- sunspot.month[i]
+> cbind(i = i, time = time(sunspots)[i], sunspots = s1, ss.month = s2,
++       perc.diff = round(100*2*abs(s1-s2)/(s1+s2), 1))
+          i     time sunspots ss.month perc.diff
+  [1,]   55 1753.500     22.2     22.0       0.9
+  [2,]  838 1818.750     31.7     31.6       0.3
+  [3,]  841 1819.000     32.5     32.8       0.9
+  [4,]  862 1820.750      9.0      8.9       1.1
+  [5,]  864 1820.917      9.7      9.1       6.4
+  [6,]  866 1821.083      4.3      4.2       2.4
+  [7,]  876 1821.917      0.0      0.2     200.0
+  [8,]  901 1824.000     21.6     21.7       0.5
+  [9,]  917 1825.333     15.4     15.5       0.6
+ [10,]  920 1825.583     25.4     25.7       1.2
+ [11,]  943 1827.500     42.9     42.3       1.4
+ [12,]  946 1827.750     57.2     56.1       1.9
+ [13,]  955 1828.500     54.3     54.2       0.2
+ [14,]  960 1828.917     46.6     46.9       0.6
+ [15,]  965 1829.333     67.5     67.4       0.1
+ [16,]  968 1829.583     78.3     77.6       0.9
+ [17,]  976 1830.250    107.1    106.3       0.7
+ [18,]  988 1831.250     54.6     54.5       0.2
+ [19,]  992 1831.583     54.9     55.0       0.2
+ [20,]  994 1831.750     46.2     46.3       0.2
+ [21,]  998 1832.083     55.5     55.6       0.2
+ [22,] 1003 1832.500     13.9     14.0       0.7
+ [23,] 1047 1836.167     98.1     98.2       0.1
+ [24,] 1061 1837.333    111.3    111.7       0.4
+ [25,] 1081 1839.000    107.6    105.6       1.9
+ [26,] 1087 1839.500     84.7     84.8       0.1
+ [27,] 1090 1839.750     90.8     90.9       0.1
+ [28,] 1092 1839.917     63.6     63.7       0.2
+ [29,] 1095 1840.167     55.5     67.8      20.0
+ [30,] 1102 1840.750     49.8     55.0       9.9
+ [31,] 1105 1841.000     24.0     24.1       0.4
+ [32,] 1108 1841.250     42.6     40.2       5.8
+ [33,] 1109 1841.333     67.4     67.5       0.1
+ [34,] 1113 1841.667     35.1     36.5       3.9
+ [35,] 1124 1842.583     26.5     26.6       0.4
+ [36,] 1125 1842.667     18.5     18.4       0.5
+ [37,] 1132 1843.250      8.8      9.5       7.7
+ [38,] 1145 1844.333     12.0     11.6       3.4
+ [39,] 1149 1844.667      6.9      7.0       1.4
+ [40,] 1156 1845.250     56.9     57.0       0.2
+ [41,] 1168 1846.250     69.2     69.3       0.1
+ [42,] 1185 1847.667    161.2    160.9       0.2
+ [43,] 1191 1848.167    108.9    108.6       0.3
+ [44,] 1194 1848.417    123.8    129.0       4.1
+ [45,] 1196 1848.583    132.5    132.6       0.1
+ [46,] 1200 1848.917    159.9    159.5       0.3
+ [47,] 1201 1849.000    156.7    157.0       0.2
+ [48,] 1202 1849.083    131.7    131.8       0.1
+ [49,] 1203 1849.167     96.5     96.2       0.3
+ [50,] 1206 1849.417     81.2     81.1       0.1
+ [51,] 1208 1849.583     61.3     67.7       9.9
+ [52,] 1211 1849.833     99.7     99.0       0.7
+ [53,] 1224 1850.917     60.0     61.0       1.7
+ [54,] 1235 1851.833     50.9     51.0       0.2
+ [55,] 1238 1852.083     67.5     66.4       1.6
+ [56,] 1243 1852.500     42.0     42.1       0.2
+ [57,] 1256 1853.583     50.4     50.5       0.2
+ [58,] 1258 1853.750     42.3     42.4       0.2
+ [59,] 1264 1854.250     26.4     26.5       0.4
+ [60,] 1270 1854.750     12.7     12.6       0.8
+ [61,] 1272 1854.917     21.4     21.6       0.9
+ [62,] 1282 1855.750      9.7      9.6       1.0
+ [63,] 1283 1855.833      4.3      4.2       2.4
+ [64,] 1290 1856.417      5.0      5.2       3.9
+ [65,] 1301 1857.333     29.2     28.5       2.4
+ [66,] 1333 1860.000     81.5     82.4       1.1
+ [67,] 1334 1860.083     88.0     88.3       0.3
+ [68,] 1346 1861.083     77.8     77.7       0.1
+ [69,] 1350 1861.417     87.8     88.1       0.3
+ [70,] 1366 1862.750     42.0     41.9       0.2
+ [71,] 1407 1866.167     24.6     24.5       0.4
+ [72,] 1424 1867.583      4.9      4.8       2.1
+ [73,] 1427 1867.833      9.3      9.6       3.2
+ [74,] 1429 1868.000     15.6     15.5       0.6
+ [75,] 1430 1868.083     15.8     15.7       0.6
+ [76,] 1435 1868.500     28.6     29.0       1.4
+ [77,] 1437 1868.667     43.8     47.2       7.5
+ [78,] 1438 1868.750     61.7     61.6       0.2
+ [79,] 1442 1869.083     59.3     59.9       1.0
+ [80,] 1445 1869.333    104.0    103.9       0.1
+ [81,] 1450 1869.750     59.4     59.3       0.2
+ [82,] 1451 1869.833     77.4     78.1       0.9
+ [83,] 1452 1869.917    104.3    104.4       0.1
+ [84,] 1455 1870.167    159.4    157.5       1.2
+ [85,] 1472 1871.583    110.0    110.1       0.1
+ [86,] 1476 1871.917     90.3     90.4       0.1
+ [87,] 1486 1872.750    103.5    102.6       0.9
+ [88,] 1497 1873.667     47.5     47.1       0.8
+ [89,] 1498 1873.750     47.4     47.1       0.6
+ [90,] 1514 1875.083     22.2     21.5       3.2
+ [91,] 1527 1876.167     31.2     30.6       1.9
+ [92,] 1539 1877.167     11.7     11.9       1.7
+ [93,] 1541 1877.333     21.2     21.6       1.9
+ [94,] 1542 1877.417     13.4     14.2       5.8
+ [95,] 1543 1877.500      5.9      6.0       1.7
+ [96,] 1545 1877.667     16.4     16.9       3.0
+ [97,] 1547 1877.833     14.5     14.2       2.1
+ [98,] 1548 1877.917      2.3      2.2       4.4
+ [99,] 1550 1878.083      6.0      6.6       9.5
+[100,] 1553 1878.333      5.8      5.9       1.7
+[101,] 1561 1879.000      0.8      1.0      22.2
+[102,] 1571 1879.833     12.9     13.1       1.5
+[103,] 1572 1879.917      7.2      7.3       1.4
+[104,] 1574 1880.083     27.5     27.2       1.1
+[105,] 1575 1880.167     19.5     19.3       1.0
+[106,] 1576 1880.250     19.3     19.5       1.0
+[107,] 1588 1881.250     51.7     51.6       0.2
+[108,] 1592 1881.583     58.0     58.4       0.7
+[109,] 1594 1881.750     64.0     64.4       0.6
+[110,] 1598 1882.083     69.3     69.5       0.3
+[111,] 1599 1882.167     67.5     66.8       1.0
+[112,] 1613 1883.333     32.1     31.5       1.9
+[113,] 1614 1883.417     76.5     76.3       0.3
+[114,] 1623 1884.167     86.8     87.5       0.8
+[115,] 1643 1885.833     33.3     30.9       7.5
+[116,] 1656 1886.917     12.4     13.0       4.7
+[117,] 1663 1887.500     23.3     23.4       0.4
+[118,] 1683 1889.167      7.0      6.7       4.4
+[119,] 1687 1889.500      9.7      9.4       3.1
+[120,] 1712 1891.583     33.2     33.0       0.6
+[121,] 1716 1891.917     32.3     32.5       0.6
+[122,] 1723 1892.500     76.8     76.5       0.4
+[123,] 1734 1893.417     88.2     89.9       1.9
+[124,] 1735 1893.500     88.8     88.6       0.2
+[125,] 1738 1893.750     79.7     80.0       0.4
+[126,] 1774 1896.750     28.4     28.7       1.1
+[127,] 1837 1902.000      5.2      5.5       5.6
+[128,] 2126 1926.083     70.0     69.9       0.1
+[129,] 2151 1928.167     85.4     85.5       0.1
+[130,] 2153 1928.333     76.9     77.0       0.1
+[131,] 2162 1929.083     64.1     62.8       2.0
+[132,] 2174 1930.083     49.2     49.9       1.4
+[133,] 2233 1935.000     18.9     18.6       1.6
+[134,] 2315 1941.833     38.3     38.4       0.3
+[135,] 2329 1943.000     12.4     12.5       0.8
+[136,] 2378 1947.083    113.4    133.4      16.2
+[137,] 2427 1951.167     59.9     55.9       6.9
+[138,] 2498 1957.083    130.2    130.3       0.1
+[139,] 2552 1961.583     55.9     55.8       0.2
+[140,] 2556 1961.917     40.0     39.9       0.3
+[141,] 2594 1965.083     14.2     14.3       0.7
+[142,] 2790 1981.417     90.0     90.9       1.0
+[143,] 2819 1983.833     33.3     33.4       0.3
+> 
+> ## How to recreate the "old" sunspot.month (R <= 3.0.3):
+> .sunspot.diff <- cbind(
++     i = c(1202L, 1256L, 1258L, 1301L, 1407L, 1429L, 1452L, 1455L,
++           1663L, 2151L, 2329L, 2498L, 2594L, 2694L, 2819L),
++     res10 = c(1L, 1L, 1L, -1L, -1L, -1L, 1L, -1L,
++           1L, 1L, 1L, 1L, 1L, 20L, 1L))
+> ssm0 <- sunspot.month[1:2988]
+> with(as.data.frame(.sunspot.diff), ssm0[i] <<- ssm0[i] - res10/10)
+> sunspot.month.0 <- ts(ssm0, start = 1749, frequency = 12)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("sunspot.year")
+> ### * sunspot.year
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: sunspot.year
+> ### Title: Yearly Sunspot Data, 1700-1988
+> ### Aliases: sunspot.year
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> utils::str(sm <- sunspots)# the monthly version we keep unchanged
+ Time-Series [1:2820] from 1749 to 1984: 58 62.6 70 55.7 85 83.5 94.8 66.3 75.9 75.5 ...
+> utils::str(sy <- sunspot.year)
+ Time-Series [1:289] from 1700 to 1988: 5 11 16 23 36 58 29 20 10 8 ...
+> ## The common time interval
+> (t1 <- c(max(start(sm), start(sy)),     1)) # Jan 1749
+[1] 1749    1
+> (t2 <- c(min(  end(sm)[1],end(sy)[1]), 12)) # Dec 1983
+[1] 1983   12
+> s.m <- window(sm, start=t1, end=t2)
+> s.y <- window(sy, start=t1, end=t2[1]) # {irrelevant warning}
+> stopifnot(length(s.y) * 12 == length(s.m),
++           ## The yearly series *is* close to the averages of the monthly one:
++           all.equal(s.y, aggregate(s.m, FUN = mean), tol = 0.0020))
+> ## NOTE: Strangely, correctly weighting the number of days per month
+> ##       (using 28.25 for February) is *not* closer than the simple mean:
+> ndays <- c(31, 28.25, rep(c(31,30, 31,30, 31), 2))
+> all.equal(s.y, aggregate(s.m, FUN = mean))                     # 0.0013
+[1] "Mean relative difference: 0.001312539"
+> all.equal(s.y, aggregate(s.m, FUN = weighted.mean, w = ndays)) # 0.0017
+[1] "Mean relative difference: 0.001692215"
+> 
+> 
+> 
+> cleanEx()
+> nameEx("sunspots")
+> ### * sunspots
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: sunspots
+> ### Title: Monthly Sunspot Numbers, 1749-1983
+> ### Aliases: sunspots
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> plot(sunspots, main = "sunspots data", xlab = "Year",
++      ylab = "Monthly sunspot numbers")
+> 
+> 
+> 
+> cleanEx()
+> nameEx("swiss")
+> ### * swiss
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: swiss
+> ### Title: Swiss Fertility and Socioeconomic Indicators (1888) Data
+> ### Aliases: swiss
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(stats); require(graphics)
+> pairs(swiss, panel = panel.smooth, main = "swiss data",
++       col = 3 + (swiss$Catholic > 50))
+> summary(lm(Fertility ~ . , data = swiss))
+
+Call:
+lm(formula = Fertility ~ ., data = swiss)
+
+Residuals:
+     Min       1Q   Median       3Q      Max 
+-15.2743  -5.2617   0.5032   4.1198  15.3213 
+
+Coefficients:
+                 Estimate Std. Error t value Pr(>|t|)    
+(Intercept)      66.91518   10.70604   6.250 1.91e-07 ***
+Agriculture      -0.17211    0.07030  -2.448  0.01873 *  
+Examination      -0.25801    0.25388  -1.016  0.31546    
+Education        -0.87094    0.18303  -4.758 2.43e-05 ***
+Catholic          0.10412    0.03526   2.953  0.00519 ** 
+Infant.Mortality  1.07705    0.38172   2.822  0.00734 ** 
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Residual standard error: 7.165 on 41 degrees of freedom
+Multiple R-squared:  0.7067,	Adjusted R-squared:  0.671 
+F-statistic: 19.76 on 5 and 41 DF,  p-value: 5.594e-10
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("trees")
+> ### * trees
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: trees
+> ### Title: Girth, Height and Volume for Black Cherry Trees
+> ### Aliases: trees
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(stats); require(graphics)
+> pairs(trees, panel = panel.smooth, main = "trees data")
+> plot(Volume ~ Girth, data = trees, log = "xy")
+> coplot(log(Volume) ~ log(Girth) | Height, data = trees,
++        panel = panel.smooth)
+> summary(fm1 <- lm(log(Volume) ~ log(Girth), data = trees))
+
+Call:
+lm(formula = log(Volume) ~ log(Girth), data = trees)
+
+Residuals:
+      Min        1Q    Median        3Q       Max 
+-0.205999 -0.068702  0.001011  0.072585  0.247963 
+
+Coefficients:
+            Estimate Std. Error t value Pr(>|t|)    
+(Intercept) -2.35332    0.23066  -10.20 4.18e-11 ***
+log(Girth)   2.19997    0.08983   24.49  < 2e-16 ***
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Residual standard error: 0.115 on 29 degrees of freedom
+Multiple R-squared:  0.9539,	Adjusted R-squared:  0.9523 
+F-statistic: 599.7 on 1 and 29 DF,  p-value: < 2.2e-16
+
+> summary(fm2 <- update(fm1, ~ . + log(Height), data = trees))
+
+Call:
+lm(formula = log(Volume) ~ log(Girth) + log(Height), data = trees)
+
+Residuals:
+      Min        1Q    Median        3Q       Max 
+-0.168561 -0.048488  0.002431  0.063637  0.129223 
+
+Coefficients:
+            Estimate Std. Error t value Pr(>|t|)    
+(Intercept) -6.63162    0.79979  -8.292 5.06e-09 ***
+log(Girth)   1.98265    0.07501  26.432  < 2e-16 ***
+log(Height)  1.11712    0.20444   5.464 7.81e-06 ***
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Residual standard error: 0.08139 on 28 degrees of freedom
+Multiple R-squared:  0.9777,	Adjusted R-squared:  0.9761 
+F-statistic: 613.2 on 2 and 28 DF,  p-value: < 2.2e-16
+
+> step(fm2)
+Start:  AIC=-152.69
+log(Volume) ~ log(Girth) + log(Height)
+
+              Df Sum of Sq    RSS      AIC
+<none>                     0.1855 -152.685
+- log(Height)  1    0.1978 0.3832 -132.185
+- log(Girth)   1    4.6275 4.8130  -53.743
+
+Call:
+lm(formula = log(Volume) ~ log(Girth) + log(Height), data = trees)
+
+Coefficients:
+(Intercept)   log(Girth)  log(Height)  
+     -6.632        1.983        1.117  
+
+> ## i.e., Volume ~= c * Height * Girth^2  seems reasonable
+> 
+> 
+> 
+> cleanEx()
+> nameEx("uspop")
+> ### * uspop
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: uspop
+> ### Title: Populations Recorded by the US Census
+> ### Aliases: uspop
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> plot(uspop, log = "y", main = "uspop data", xlab = "Year",
++      ylab = "U.S. Population (millions)")
+> 
+> 
+> 
+> cleanEx()
+> nameEx("volcano")
+> ### * volcano
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: volcano
+> ### Title: Topographic Information on Auckland's Maunga Whau Volcano
+> ### Aliases: volcano
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(grDevices); require(graphics)
+> filled.contour(volcano, color.palette = terrain.colors, asp = 1)
+> title(main = "volcano data: filled contour map")
+> 
+> 
+> 
+> cleanEx()
+> nameEx("warpbreaks")
+> ### * warpbreaks
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: warpbreaks
+> ### Title: The Number of Breaks in Yarn during Weaving
+> ### Aliases: warpbreaks
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(stats); require(graphics)
+> summary(warpbreaks)
+     breaks      wool   tension
+ Min.   :10.00   A:27   L:18   
+ 1st Qu.:18.25   B:27   M:18   
+ Median :26.00          H:18   
+ Mean   :28.15                 
+ 3rd Qu.:34.00                 
+ Max.   :70.00                 
+> opar <- par(mfrow = c(1, 2), oma = c(0, 0, 1.1, 0))
+> plot(breaks ~ tension, data = warpbreaks, col = "lightgray",
++      varwidth = TRUE, subset = wool == "A", main = "Wool A")
+> plot(breaks ~ tension, data = warpbreaks, col = "lightgray",
++      varwidth = TRUE, subset = wool == "B", main = "Wool B")
+> mtext("warpbreaks data", side = 3, outer = TRUE)
+> par(opar)
+> summary(fm1 <- lm(breaks ~ wool*tension, data = warpbreaks))
+
+Call:
+lm(formula = breaks ~ wool * tension, data = warpbreaks)
+
+Residuals:
+     Min       1Q   Median       3Q      Max 
+-19.5556  -6.8889  -0.6667   7.1944  25.4444 
+
+Coefficients:
+               Estimate Std. Error t value Pr(>|t|)    
+(Intercept)      44.556      3.647  12.218 2.43e-16 ***
+woolB           -16.333      5.157  -3.167 0.002677 ** 
+tensionM        -20.556      5.157  -3.986 0.000228 ***
+tensionH        -20.000      5.157  -3.878 0.000320 ***
+woolB:tensionM   21.111      7.294   2.895 0.005698 ** 
+woolB:tensionH   10.556      7.294   1.447 0.154327    
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Residual standard error: 10.94 on 48 degrees of freedom
+Multiple R-squared:  0.3778,	Adjusted R-squared:  0.3129 
+F-statistic: 5.828 on 5 and 48 DF,  p-value: 0.0002772
+
+> anova(fm1)
+Analysis of Variance Table
+
+Response: breaks
+             Df Sum Sq Mean Sq F value    Pr(>F)    
+wool          1  450.7  450.67  3.7653 0.0582130 .  
+tension       2 2034.3 1017.13  8.4980 0.0006926 ***
+wool:tension  2 1002.8  501.39  4.1891 0.0210442 *  
+Residuals    48 5745.1  119.69                      
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("women")
+> ### * women
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: women
+> ### Title: Average Heights and Weights for American Women
+> ### Aliases: women
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> plot(women, xlab = "Height (in)", ylab = "Weight (lb)",
++      main = "women data: American women aged 30-39")
+> 
+> 
+> 
+> cleanEx()
+> nameEx("zCO2")
+> ### * zCO2
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: CO2
+> ### Title: Carbon Dioxide Uptake in Grass Plants
+> ### Aliases: CO2
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(stats); require(graphics)
+> ## Don't show: 
+> options(show.nls.convergence=FALSE)
+> ## End(Don't show)
+> coplot(uptake ~ conc | Plant, data = CO2, show.given = FALSE, type = "b")
+> ## fit the data for the first plant
+> fm1 <- nls(uptake ~ SSasymp(conc, Asym, lrc, c0),
++    data = CO2, subset = Plant == "Qn1")
+> summary(fm1)
+
+Formula: uptake ~ SSasymp(conc, Asym, lrc, c0)
+
+Parameters:
+     Estimate Std. Error t value Pr(>|t|)    
+Asym  38.1398     0.9164  41.620 1.99e-06 ***
+lrc  -34.2766    18.9661  -1.807    0.145    
+c0    -4.3806     0.2042 -21.457 2.79e-05 ***
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Residual standard error: 1.663 on 4 degrees of freedom
+
+> ## fit each plant separately
+> fmlist <- list()
+> for (pp in levels(CO2$Plant)) {
++   fmlist[[pp]] <- nls(uptake ~ SSasymp(conc, Asym, lrc, c0),
++       data = CO2, subset = Plant == pp)
++ }
+> ## check the coefficients by plant
+> print(sapply(fmlist, coef), digits = 3)
+        Qn1    Qn2    Qn3   Qc1    Qc3    Qc2    Mn3    Mn2   Mn1   Mc2     Mc3
+Asym  38.14  42.87  44.23 36.43  40.68  39.82  28.48  32.13 34.08 13.56   18.54
+lrc  -34.28 -29.66 -37.63 -9.90 -11.54 -51.53 -17.37 -29.04 -8.81 -1.98 -136.11
+c0    -4.38  -4.67  -4.49 -4.86  -4.95  -4.46  -4.59  -4.47 -5.06 -4.56   -3.47
+       Mc1
+Asym 21.79
+lrc   2.45
+c0   -5.14
+> 
+> 
+> 
+> ### * <FOOTER>
+> ###
+> options(digits = 7L)
+> base::cat("Time elapsed: ", proc.time() - base::get("ptime", pos = 'CheckExEnv'),"\n")
+Time elapsed:  1.265 0.016 1.282 0 0 
+> grDevices::dev.off()
+null device 
+          1 
+> ###
+> ### Local variables: ***
+> ### mode: outline-minor ***
+> ### outline-regexp: "\\(> \\)?### [*]+" ***
+> ### End: ***
+> quit('no')
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/tests/Examples/grDevices-Ex.Rout.save
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/tests/Examples/grDevices-Ex.Rout.save	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/tests/Examples/grDevices-Ex.Rout.save	(revision 2477)
@@ -0,0 +1,3778 @@
+
+R version 3.3.2 RC (2016-10-26 r71594) -- "Sincere Pumpkin Patch"
+Copyright (C) 2016 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
+
+R is free software and comes with ABSOLUTELY NO WARRANTY.
+You are welcome to redistribute it under certain conditions.
+Type 'license()' or 'licence()' for distribution details.
+
+  Natural language support but running in an English locale
+
+R is a collaborative project with many contributors.
+Type 'contributors()' for more information and
+'citation()' on how to cite R or R packages in publications.
+
+Type 'demo()' for some demos, 'help()' for on-line help, or
+'help.start()' for an HTML browser interface to help.
+Type 'q()' to quit R.
+
+> pkgname <- "grDevices"
+> source(file.path(R.home("share"), "R", "examples-header.R"))
+> options(warn = 1)
+> library('grDevices')
+> 
+> base::assign(".oldSearch", base::search(), pos = 'CheckExEnv')
+> cleanEx()
+> nameEx("Devices")
+> ### * Devices
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: Devices
+> ### Title: List of Graphical Devices
+> ### Aliases: Devices device
+> ### Keywords: device
+> 
+> ### ** Examples
+> ## Not run: 
+> ##D ## open the default screen device on this platform if no device is
+> ##D ## open
+> ##D if(dev.cur() == 1) dev.new()
+> ## End(Not run)
+> 
+> 
+> cleanEx()
+> nameEx("Hershey")
+> ### * Hershey
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: Hershey
+> ### Title: Hershey Vector Fonts in R
+> ### Aliases: Hershey
+> ### Keywords: aplot
+> 
+> ### ** Examples
+> 
+> Hershey
+$typeface
+[1] "serif"             "sans serif"        "script"           
+[4] "gothic english"    "gothic german"     "gothic italian"   
+[7] "serif symbol"      "sans serif symbol"
+
+$fontindex
+[1] "plain"            "italic"           "bold"             "bold italic"     
+[5] "cyrillic"         "oblique cyrillic" "EUC"             
+
+$allowed
+      [,1] [,2]
+ [1,]    1    1
+ [2,]    1    2
+ [3,]    1    3
+ [4,]    1    4
+ [5,]    1    5
+ [6,]    1    6
+ [7,]    1    7
+ [8,]    2    1
+ [9,]    2    2
+[10,]    2    3
+[11,]    2    4
+[12,]    3    1
+[13,]    3    2
+[14,]    3    3
+[15,]    4    1
+[16,]    5    1
+[17,]    6    1
+[18,]    7    1
+[19,]    7    2
+[20,]    7    3
+[21,]    7    4
+[22,]    8    1
+[23,]    8    2
+
+> 
+> ## for tables of examples, see demo(Hershey)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("Japanese")
+> ### * Japanese
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: Japanese
+> ### Title: Japanese characters in R
+> ### Aliases: Japanese
+> ### Keywords: aplot
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> plot(1:9, type = "n", axes = FALSE, frame = TRUE, ylab = "",
++      main = "example(Japanese)", xlab = "using Hershey fonts")
+> par(cex = 3)
+> Vf <- c("serif", "plain")
+> text(4, 2, "\\#J244b\\#J245b\\#J2473", vfont = Vf)
+> text(4, 4, "\\#J2538\\#J2563\\#J2551\\#J2573", vfont = Vf)
+> text(4, 6, "\\#J467c\\#J4b5c", vfont = Vf)
+> text(4, 8, "Japan", vfont = Vf)
+> par(cex = 1)
+> text(8, 2, "Hiragana")
+> text(8, 4, "Katakana")
+> text(8, 6, "Kanji")
+> text(8, 8, "English")
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("Type1Font")
+> ### * Type1Font
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: Type1Font
+> ### Title: Type 1 and CID Fonts
+> ### Aliases: Type1Font CIDFont
+> ### Keywords: device
+> 
+> ### ** Examples
+> 
+> ## This duplicates "ComputerModernItalic".
+> CMitalic <- Type1Font("ComputerModern2",
++                       c("CM_regular_10.afm", "CM_boldx_10.afm",
++                         "cmti10.afm", "cmbxti10.afm",
++                         "CM_symbol_10.afm"),
++                       encoding = "TeXtext.enc")
+> 
+> ## Not run: 
+> ##D ## This could be used by
+> ##D postscript(family = CMitalic)
+> ##D ## or
+> ##D postscriptFonts(CMitalic = CMitalic)  # once in a session
+> ##D postscript(family = "CMitalic", encoding = "TeXtext.enc")
+> ## End(Not run)
+> 
+> 
+> cleanEx()
+> nameEx("adjustcolor")
+> ### * adjustcolor
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: adjustcolor
+> ### Title: Adjust Colors in One or More Directions Conveniently.
+> ### Aliases: adjustcolor
+> 
+> ### ** Examples
+> 
+> ## Illustrative examples :
+> opal <- palette("default")
+> stopifnot(identical(adjustcolor(1:8,       0.75),
++                     adjustcolor(palette(), 0.75)))
+> cbind(palette(), adjustcolor(1:8, 0.75))
+     [,1]      [,2]       
+[1,] "black"   "#000000BF"
+[2,] "red"     "#FF0000BF"
+[3,] "green3"  "#00CD00BF"
+[4,] "blue"    "#0000FFBF"
+[5,] "cyan"    "#00FFFFBF"
+[6,] "magenta" "#FF00FFBF"
+[7,] "yellow"  "#FFFF00BF"
+[8,] "gray"    "#BEBEBEBF"
+> 
+> ##  alpha = 1/2 * previous alpha --> opaque colors
+> x <- palette(adjustcolor(palette(), 0.5))
+> 
+> sines <- outer(1:20, 1:4, function(x, y) sin(x / 20 * pi * y))
+> matplot(sines, type = "b", pch = 21:23, col = 2:5, bg = 2:5,
++         main = "Using an 'opaque ('translucent') color palette")
+> 
+> x. <- adjustcolor(x, offset = c(0.5, 0.5, 0.5, 0), # <- "more white"
++                   transform = diag(c(.7, .7, .7, 0.6)))
+> cbind(x, x.)
+     x         x.         
+[1,] "black"   "#80808099"
+[2,] "red"     "#FF808099"
+[3,] "green3"  "#80FF8099"
+[4,] "blue"    "#8080FF99"
+[5,] "cyan"    "#80FFFF99"
+[6,] "magenta" "#FF80FF99"
+[7,] "yellow"  "#FFFF8099"
+[8,] "gray"    "#FFFFFF99"
+> op <- par(bg = adjustcolor("goldenrod", offset = -rep(.4, 4)), xpd = NA)
+> plot(0:9, 0:9, type = "n", axes = FALSE, xlab = "", ylab = "",
++      main = "adjustcolor() -> translucent")
+> text(1:8, labels = paste0(x,"++"), col = x., cex = 8)
+> par(op)
+> 
+> ## and
+> 
+> (M <- cbind( rbind( matrix(1/3, 3, 3), 0), c(0, 0, 0, 1)))
+          [,1]      [,2]      [,3] [,4]
+[1,] 0.3333333 0.3333333 0.3333333    0
+[2,] 0.3333333 0.3333333 0.3333333    0
+[3,] 0.3333333 0.3333333 0.3333333    0
+[4,] 0.0000000 0.0000000 0.0000000    1
+> adjustcolor(x, transform = M)
+[1] "#000000FF" "#555555FF" "#444444FF" "#555555FF" "#AAAAAAFF" "#AAAAAAFF"
+[7] "#AAAAAAFF" "#BEBEBEFF"
+> 
+> ## revert to previous palette: active
+> palette(opal)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("as.raster")
+> ### * as.raster
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: as.raster
+> ### Title: Create a Raster Object
+> ### Aliases: is.raster as.raster as.raster.logical as.raster.numeric
+> ###   as.raster.raw as.raster.character as.raster.matrix as.raster.array
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> # A red gradient
+> as.raster(matrix(hcl(0, 80, seq(50, 80, 10)),
++                  nrow = 4, ncol = 5))
+     [,1]      [,2]      [,3]      [,4]      [,5]     
+[1,] "#C54E6D" "#C54E6D" "#C54E6D" "#C54E6D" "#C54E6D"
+[2,] "#E16A86" "#E16A86" "#E16A86" "#E16A86" "#E16A86"
+[3,] "#FE86A1" "#FE86A1" "#FE86A1" "#FE86A1" "#FE86A1"
+[4,] "#FFA2BC" "#FFA2BC" "#FFA2BC" "#FFA2BC" "#FFA2BC"
+> 
+> # Vectors are 1-column matrices ...
+> #   character vectors are color names ...
+> as.raster(hcl(0, 80, seq(50, 80, 10)))
+     [,1]     
+[1,] "#C54E6D"
+[2,] "#E16A86"
+[3,] "#FE86A1"
+[4,] "#FFA2BC"
+> #   numeric vectors are greyscale ...
+> as.raster(1:5, max = 5)
+     [,1]     
+[1,] "#333333"
+[2,] "#666666"
+[3,] "#999999"
+[4,] "#CCCCCC"
+[5,] "#FFFFFF"
+> #   logical vectors are black and white ...
+> as.raster(1:10 %% 2 == 0)
+      [,1]     
+ [1,] "#000000"
+ [2,] "#FFFFFF"
+ [3,] "#000000"
+ [4,] "#FFFFFF"
+ [5,] "#000000"
+ [6,] "#FFFFFF"
+ [7,] "#000000"
+ [8,] "#FFFFFF"
+ [9,] "#000000"
+[10,] "#FFFFFF"
+> 
+> # ... unless nrow/ncol are supplied ...
+> as.raster(1:10 %% 2 == 0, nrow = 1)
+     [,1]      [,2]      [,3]      [,4]      [,5]      [,6]      [,7]     
+[1,] "#000000" "#FFFFFF" "#000000" "#FFFFFF" "#000000" "#FFFFFF" "#000000"
+     [,8]      [,9]      [,10]    
+[1,] "#FFFFFF" "#000000" "#FFFFFF"
+> 
+> # Matrix can also be logical or numeric (or raw) ...
+> as.raster(matrix(c(TRUE, FALSE), nrow = 3, ncol = 2))
+     [,1]      [,2]     
+[1,] "#FFFFFF" "#000000"
+[2,] "#000000" "#FFFFFF"
+[3,] "#FFFFFF" "#000000"
+> as.raster(matrix(1:3/4, nrow = 3, ncol = 4))
+     [,1]      [,2]      [,3]      [,4]     
+[1,] "#404040" "#404040" "#404040" "#404040"
+[2,] "#808080" "#808080" "#808080" "#808080"
+[3,] "#BFBFBF" "#BFBFBF" "#BFBFBF" "#BFBFBF"
+> 
+> # An array can be 3-plane numeric (R, G, B planes) ...
+> as.raster(array(c(0:1, rep(0.5, 4)), c(2, 1, 3)))
+     [,1]     
+[1,] "#008080"
+[2,] "#FF8080"
+> 
+> # ... or 4-plane numeric (R, G, B, A planes)
+> as.raster(array(c(0:1, rep(0.5, 6)), c(2, 1, 4)))
+     [,1]       
+[1,] "#00808080"
+[2,] "#FF808080"
+> 
+> # subsetting
+> r <- as.raster(matrix(colors()[1:100], ncol = 10))
+> r[, 2]
+      [,1]         
+ [1,] "aquamarine3"
+ [2,] "aquamarine4"
+ [3,] "azure"      
+ [4,] "azure1"     
+ [5,] "azure2"     
+ [6,] "azure3"     
+ [7,] "azure4"     
+ [8,] "beige"      
+ [9,] "bisque"     
+[10,] "bisque1"    
+> r[2:4, 2:5]
+     [,1]          [,2]      [,3]     [,4]        
+[1,] "aquamarine4" "bisque3" "brown"  "cadetblue" 
+[2,] "azure"       "bisque4" "brown1" "cadetblue1"
+[3,] "azure1"      "black"   "brown2" "cadetblue2"
+> 
+> # assigning to subset
+> r[2:4, 2:5] <- "white"
+> 
+> # comparison
+> r == "white"
+       [,1]  [,2]  [,3]  [,4]  [,5]  [,6]  [,7]  [,8]  [,9] [,10]
+ [1,]  TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
+ [2,] FALSE  TRUE  TRUE  TRUE  TRUE FALSE FALSE FALSE FALSE FALSE
+ [3,] FALSE  TRUE  TRUE  TRUE  TRUE FALSE FALSE FALSE FALSE FALSE
+ [4,] FALSE  TRUE  TRUE  TRUE  TRUE FALSE FALSE FALSE FALSE FALSE
+ [5,] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
+ [6,] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
+ [7,] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
+ [8,] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
+ [9,] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
+[10,] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
+> 
+> ## Don't show: 
+> stopifnot(r[] == r,
++           identical(r[3:5], colors()[3:5]))
+> r[2:4] <- "black"
+> stopifnot(identical(r[1:4, 1], as.raster(c("white", rep("black", 3)))))
+> ## End(Don't show)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("axisTicks")
+> ### * axisTicks
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: axisTicks
+> ### Title: Compute Pretty Axis Tick Scales
+> ### Aliases: axisTicks .axisPars
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> ##--- Demonstrating correspondence between graphics'
+> ##--- axis() and the graphics-engine agnostic  axisTicks() :
+> 
+> require("graphics")
+> plot(10*(0:10)); (pu <- par("usr"))
+[1]   0.6  11.4  -4.0 104.0
+> aX <- function(side, at, ...)
++     axis(side, at = at, labels = FALSE, lwd.ticks = 2, col.ticks = 2,
++          tck = 0.05, ...)
+> aX(1, print(xa <- axisTicks(pu[1:2], log = FALSE)))  # x axis
+[1]  2  4  6  8 10
+> aX(2, print(ya <- axisTicks(pu[3:4], log = FALSE)))  # y axis
+[1]   0  20  40  60  80 100
+> 
+> axisTicks(pu[3:4], log = FALSE, n = 10)
+ [1]   0  10  20  30  40  50  60  70  80  90 100
+> 
+> plot(10*(0:10), log = "y"); (pu <- par("usr"))
+Warning in xy.coords(x, y, xlabel, ylabel, log) :
+  1 y value <= 0 omitted from logarithmic plot
+[1]  0.60 11.40  0.96  2.04
+> aX(2, print(ya <- axisTicks(pu[3:4], log = TRUE)))  # y axis
+[1]  10  20  50 100
+> 
+> plot(2^(0:9), log = "y"); (pu <- par("usr"))
+[1]  0.6400000 10.3600000 -0.1083708  2.8176408
+> aX(2, print(ya <- axisTicks(pu[3:4], log = TRUE)))  # y axis
+[1]   1   2   5  10  20  50 100 200 500
+> 
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("boxplot.stats")
+> ### * boxplot.stats
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: boxplot.stats
+> ### Title: Box Plot Statistics
+> ### Aliases: boxplot.stats
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> require(stats)
+> x <- c(1:100, 1000)
+> (b1 <- boxplot.stats(x))
+$stats
+[1]   1  26  51  76 100
+
+$n
+[1] 101
+
+$conf
+[1] 43.13921 58.86079
+
+$out
+[1] 1000
+
+> (b2 <- boxplot.stats(x, do.conf = FALSE, do.out = FALSE))
+$stats
+[1]   1  26  51  76 100
+
+$n
+[1] 101
+
+$conf
+NULL
+
+$out
+numeric(0)
+
+> stopifnot(b1 $ stats == b2 $ stats) # do.out = FALSE is still robust
+> boxplot.stats(x, coef = 3, do.conf = FALSE)
+$stats
+[1]   1  26  51  76 100
+
+$n
+[1] 101
+
+$conf
+NULL
+
+$out
+[1] 1000
+
+> ## no outlier treatment:
+> boxplot.stats(x, coef = 0)
+$stats
+[1]    1   26   51   76 1000
+
+$n
+[1] 101
+
+$conf
+[1] 43.13921 58.86079
+
+$out
+numeric(0)
+
+> 
+> boxplot.stats(c(x, NA)) # slight change : n is 101
+$stats
+[1]   1  26  51  76 100
+
+$n
+[1] 101
+
+$conf
+[1] 43.13921 58.86079
+
+$out
+[1] 1000
+
+> (r <- boxplot.stats(c(x, -1:1/0)))
+$stats
+[1]   1.0  25.5  51.0  76.5 100.0
+
+$n
+[1] 103
+
+$conf
+[1] 43.06022 58.93978
+
+$out
+[1] 1000 -Inf  Inf
+
+> stopifnot(r$out == c(1000, -Inf, Inf))
+> 
+> ## Don't show: 
+>  ## Difference between quartiles and hinges :
+>  nn <- 1:17 ;  n4 <- nn %% 4
+>  hin <- sapply(sapply(nn, seq), function(x) boxplot.stats(x)$stats[c(2,4)])
+>  q13 <- sapply(sapply(nn, seq), quantile, probs = c(1,3)/4, names = FALSE)
+>  m <- t(rbind(q13,hin))[, c(1,3,2,4)]
+>  dimnames(m) <- list(paste(nn), c("q1","lH", "q3","uH"))
+>  stopifnot(m[n4 == 1, 1:2] == (nn[n4 == 1] + 3)/4,   # quart. = hinge
++            m[n4 == 1, 3:4] == (3*nn[n4 == 1] + 1)/4,
++            m[,"lH"] == ( (nn+3) %/% 2) / 2,
++            m[,"uH"] == ((3*nn+2)%/% 2) / 2)
+>  cm <- noquote(format(m))
+>  cm[m[,2] == m[,1], 2] <- " = "
+>  cm[m[,4] == m[,3], 4] <- " = "
+>  cm
+   q1    lH    q3    uH   
+1   1.00  =     1.00  =   
+2   1.25  1.00  1.75  2.00
+3   1.50  =     2.50  =   
+4   1.75  1.50  3.25  3.50
+5   2.00  =     4.00  =   
+6   2.25  2.00  4.75  5.00
+7   2.50  =     5.50  =   
+8   2.75  2.50  6.25  6.50
+9   3.00  =     7.00  =   
+10  3.25  3.00  7.75  8.00
+11  3.50  =     8.50  =   
+12  3.75  3.50  9.25  9.50
+13  4.00  =    10.00  =   
+14  4.25  4.00 10.75 11.00
+15  4.50  =    11.50  =   
+16  4.75  4.50 12.25 12.50
+17  5.00  =    13.00  =   
+> ## End(Don't show)
+> 
+> 
+> 
+> 
+> cleanEx()
+> nameEx("check.options")
+> ### * check.options
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: check.options
+> ### Title: Set Options with Consistency Checks
+> ### Aliases: check.options
+> ### Keywords: utilities programming
+> 
+> ### ** Examples
+> 
+> (L1 <- list(a = 1:3, b = pi, ch = "CH"))
+$a
+[1] 1 2 3
+
+$b
+[1] 3.141593
+
+$ch
+[1] "CH"
+
+> check.options(list(a = 0:2), name.opt = "L1")
+$a
+[1] 0 1 2
+
+$b
+[1] 3.141593
+
+$ch
+[1] "CH"
+
+> check.options(NULL, reset = TRUE, name.opt = "L1")
+$a
+[1] 1 2 3
+
+$b
+[1] 3.141593
+
+$ch
+[1] "CH"
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("chull")
+> ### * chull
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: chull
+> ### Title: Compute Convex Hull of a Set of Points
+> ### Aliases: chull
+> ### Keywords: graphs
+> 
+> ### ** Examples
+> 
+> X <- matrix(stats::rnorm(2000), ncol = 2)
+> chull(X)
+ [1]  61 442 165 899 697 446 975 656 232 557 938 295 495
+> ## Not run: 
+> ##D   # Example usage from graphics package
+> ##D   plot(X, cex = 0.5)
+> ##D   hpts <- chull(X)
+> ##D   hpts <- c(hpts, hpts[1])
+> ##D   lines(X[hpts, ])
+> ## End(Not run)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("cm")
+> ### * cm
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: cm
+> ### Title: Unit Transformation
+> ### Aliases: cm
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> cm(1)  # = 2.54
+[1] 2.54
+> 
+> ## Translate *from* cm *to* inches:
+> 
+> 10 / cm(1) # -> 10cm  are 3.937 inches
+[1] 3.937008
+> 
+> 
+> 
+> cleanEx()
+> nameEx("col2rgb")
+> ### * col2rgb
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: col2rgb
+> ### Title: Color to RGB Conversion
+> ### Aliases: col2rgb
+> ### Keywords: color dplot
+> 
+> ### ** Examples
+> 
+> col2rgb("peachpuff")
+      [,1]
+red    255
+green  218
+blue   185
+> col2rgb(c(blu = "royalblue", reddish = "tomato"))  # note: colnames
+      blu reddish
+red    65     255
+green 105      99
+blue  225      71
+> 
+> col2rgb(1:8)  # the ones from the palette() (if the default)
+      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
+red      0  255    0    0    0  255  255  190
+green    0    0  205    0  255    0  255  190
+blue     0    0    0  255  255  255    0  190
+> 
+> col2rgb(paste0("gold", 1:4))
+      [,1] [,2] [,3] [,4]
+red    255  238  205  139
+green  215  201  173  117
+blue     0    0    0    0
+> 
+> col2rgb("#08a0ff")
+      [,1]
+red      8
+green  160
+blue   255
+> ## all three kinds of color specifications:
+> col2rgb(c(red = "red", hex = "#abcdef"))
+      red hex
+red   255 171
+green   0 205
+blue    0 239
+> col2rgb(c(palette = 1:3))
+      palette1 palette2 palette3
+red          0      255        0
+green        0        0      205
+blue         0        0        0
+> 
+> ##-- NON-INTRODUCTORY examples --
+> 
+> grC <- col2rgb(paste0("gray", 0:100))
+> table(print(diff(grC["red",])))  # '2' or '3': almost equidistant
+  [1] 3 2 3 2 3 2 3 2 3 3 2 3 2 3 2 3 2 3 2 3 3 2 3 2 3 2 3 2 3 3 2 3 2 3 2 3 2
+ [38] 3 2 3 3 2 3 2 3 2 3 2 3 2 3 3 2 3 2 3 2 3 2 3 3 2 3 2 3 2 3 2 3 3 2 3 2 3
+ [75] 2 3 2 3 2 3 3 2 3 2 3 2 3 2 3 2 3 3 2 3 2 3 2 3 2 3
+
+ 2  3 
+45 55 
+> ## The 'named' grays are in between {"slate gray" is not gray, strictly}
+> col2rgb(c(g66 = "gray66", darkg =  "dark gray", g67 = "gray67",
++           g74 = "gray74", gray  =       "gray", g75 = "gray75",
++           g82 = "gray82", light = "light gray", g83 = "gray83"))
+      g66 darkg g67 g74 gray g75 g82 light g83
+red   168   169 171 189  190 191 209   211 212
+green 168   169 171 189  190 191 209   211 212
+blue  168   169 171 189  190 191 209   211 212
+> 
+> crgb <- col2rgb(cc <- colors())
+> colnames(crgb) <- cc
+> t(crgb)  # The whole table
+                     red green blue
+white                255   255  255
+aliceblue            240   248  255
+antiquewhite         250   235  215
+antiquewhite1        255   239  219
+antiquewhite2        238   223  204
+antiquewhite3        205   192  176
+antiquewhite4        139   131  120
+aquamarine           127   255  212
+aquamarine1          127   255  212
+aquamarine2          118   238  198
+aquamarine3          102   205  170
+aquamarine4           69   139  116
+azure                240   255  255
+azure1               240   255  255
+azure2               224   238  238
+azure3               193   205  205
+azure4               131   139  139
+beige                245   245  220
+bisque               255   228  196
+bisque1              255   228  196
+bisque2              238   213  183
+bisque3              205   183  158
+bisque4              139   125  107
+black                  0     0    0
+blanchedalmond       255   235  205
+blue                   0     0  255
+blue1                  0     0  255
+blue2                  0     0  238
+blue3                  0     0  205
+blue4                  0     0  139
+blueviolet           138    43  226
+brown                165    42   42
+brown1               255    64   64
+brown2               238    59   59
+brown3               205    51   51
+brown4               139    35   35
+burlywood            222   184  135
+burlywood1           255   211  155
+burlywood2           238   197  145
+burlywood3           205   170  125
+burlywood4           139   115   85
+cadetblue             95   158  160
+cadetblue1           152   245  255
+cadetblue2           142   229  238
+cadetblue3           122   197  205
+cadetblue4            83   134  139
+chartreuse           127   255    0
+chartreuse1          127   255    0
+chartreuse2          118   238    0
+chartreuse3          102   205    0
+chartreuse4           69   139    0
+chocolate            210   105   30
+chocolate1           255   127   36
+chocolate2           238   118   33
+chocolate3           205   102   29
+chocolate4           139    69   19
+coral                255   127   80
+coral1               255   114   86
+coral2               238   106   80
+coral3               205    91   69
+coral4               139    62   47
+cornflowerblue       100   149  237
+cornsilk             255   248  220
+cornsilk1            255   248  220
+cornsilk2            238   232  205
+cornsilk3            205   200  177
+cornsilk4            139   136  120
+cyan                   0   255  255
+cyan1                  0   255  255
+cyan2                  0   238  238
+cyan3                  0   205  205
+cyan4                  0   139  139
+darkblue               0     0  139
+darkcyan               0   139  139
+darkgoldenrod        184   134   11
+darkgoldenrod1       255   185   15
+darkgoldenrod2       238   173   14
+darkgoldenrod3       205   149   12
+darkgoldenrod4       139   101    8
+darkgray             169   169  169
+darkgreen              0   100    0
+darkgrey             169   169  169
+darkkhaki            189   183  107
+darkmagenta          139     0  139
+darkolivegreen        85   107   47
+darkolivegreen1      202   255  112
+darkolivegreen2      188   238  104
+darkolivegreen3      162   205   90
+darkolivegreen4      110   139   61
+darkorange           255   140    0
+darkorange1          255   127    0
+darkorange2          238   118    0
+darkorange3          205   102    0
+darkorange4          139    69    0
+darkorchid           153    50  204
+darkorchid1          191    62  255
+darkorchid2          178    58  238
+darkorchid3          154    50  205
+darkorchid4          104    34  139
+darkred              139     0    0
+darksalmon           233   150  122
+darkseagreen         143   188  143
+darkseagreen1        193   255  193
+darkseagreen2        180   238  180
+darkseagreen3        155   205  155
+darkseagreen4        105   139  105
+darkslateblue         72    61  139
+darkslategray         47    79   79
+darkslategray1       151   255  255
+darkslategray2       141   238  238
+darkslategray3       121   205  205
+darkslategray4        82   139  139
+darkslategrey         47    79   79
+darkturquoise          0   206  209
+darkviolet           148     0  211
+deeppink             255    20  147
+deeppink1            255    20  147
+deeppink2            238    18  137
+deeppink3            205    16  118
+deeppink4            139    10   80
+deepskyblue            0   191  255
+deepskyblue1           0   191  255
+deepskyblue2           0   178  238
+deepskyblue3           0   154  205
+deepskyblue4           0   104  139
+dimgray              105   105  105
+dimgrey              105   105  105
+dodgerblue            30   144  255
+dodgerblue1           30   144  255
+dodgerblue2           28   134  238
+dodgerblue3           24   116  205
+dodgerblue4           16    78  139
+firebrick            178    34   34
+firebrick1           255    48   48
+firebrick2           238    44   44
+firebrick3           205    38   38
+firebrick4           139    26   26
+floralwhite          255   250  240
+forestgreen           34   139   34
+gainsboro            220   220  220
+ghostwhite           248   248  255
+gold                 255   215    0
+gold1                255   215    0
+gold2                238   201    0
+gold3                205   173    0
+gold4                139   117    0
+goldenrod            218   165   32
+goldenrod1           255   193   37
+goldenrod2           238   180   34
+goldenrod3           205   155   29
+goldenrod4           139   105   20
+gray                 190   190  190
+gray0                  0     0    0
+gray1                  3     3    3
+gray2                  5     5    5
+gray3                  8     8    8
+gray4                 10    10   10
+gray5                 13    13   13
+gray6                 15    15   15
+gray7                 18    18   18
+gray8                 20    20   20
+gray9                 23    23   23
+gray10                26    26   26
+gray11                28    28   28
+gray12                31    31   31
+gray13                33    33   33
+gray14                36    36   36
+gray15                38    38   38
+gray16                41    41   41
+gray17                43    43   43
+gray18                46    46   46
+gray19                48    48   48
+gray20                51    51   51
+gray21                54    54   54
+gray22                56    56   56
+gray23                59    59   59
+gray24                61    61   61
+gray25                64    64   64
+gray26                66    66   66
+gray27                69    69   69
+gray28                71    71   71
+gray29                74    74   74
+gray30                77    77   77
+gray31                79    79   79
+gray32                82    82   82
+gray33                84    84   84
+gray34                87    87   87
+gray35                89    89   89
+gray36                92    92   92
+gray37                94    94   94
+gray38                97    97   97
+gray39                99    99   99
+gray40               102   102  102
+gray41               105   105  105
+gray42               107   107  107
+gray43               110   110  110
+gray44               112   112  112
+gray45               115   115  115
+gray46               117   117  117
+gray47               120   120  120
+gray48               122   122  122
+gray49               125   125  125
+gray50               127   127  127
+gray51               130   130  130
+gray52               133   133  133
+gray53               135   135  135
+gray54               138   138  138
+gray55               140   140  140
+gray56               143   143  143
+gray57               145   145  145
+gray58               148   148  148
+gray59               150   150  150
+gray60               153   153  153
+gray61               156   156  156
+gray62               158   158  158
+gray63               161   161  161
+gray64               163   163  163
+gray65               166   166  166
+gray66               168   168  168
+gray67               171   171  171
+gray68               173   173  173
+gray69               176   176  176
+gray70               179   179  179
+gray71               181   181  181
+gray72               184   184  184
+gray73               186   186  186
+gray74               189   189  189
+gray75               191   191  191
+gray76               194   194  194
+gray77               196   196  196
+gray78               199   199  199
+gray79               201   201  201
+gray80               204   204  204
+gray81               207   207  207
+gray82               209   209  209
+gray83               212   212  212
+gray84               214   214  214
+gray85               217   217  217
+gray86               219   219  219
+gray87               222   222  222
+gray88               224   224  224
+gray89               227   227  227
+gray90               229   229  229
+gray91               232   232  232
+gray92               235   235  235
+gray93               237   237  237
+gray94               240   240  240
+gray95               242   242  242
+gray96               245   245  245
+gray97               247   247  247
+gray98               250   250  250
+gray99               252   252  252
+gray100              255   255  255
+green                  0   255    0
+green1                 0   255    0
+green2                 0   238    0
+green3                 0   205    0
+green4                 0   139    0
+greenyellow          173   255   47
+grey                 190   190  190
+grey0                  0     0    0
+grey1                  3     3    3
+grey2                  5     5    5
+grey3                  8     8    8
+grey4                 10    10   10
+grey5                 13    13   13
+grey6                 15    15   15
+grey7                 18    18   18
+grey8                 20    20   20
+grey9                 23    23   23
+grey10                26    26   26
+grey11                28    28   28
+grey12                31    31   31
+grey13                33    33   33
+grey14                36    36   36
+grey15                38    38   38
+grey16                41    41   41
+grey17                43    43   43
+grey18                46    46   46
+grey19                48    48   48
+grey20                51    51   51
+grey21                54    54   54
+grey22                56    56   56
+grey23                59    59   59
+grey24                61    61   61
+grey25                64    64   64
+grey26                66    66   66
+grey27                69    69   69
+grey28                71    71   71
+grey29                74    74   74
+grey30                77    77   77
+grey31                79    79   79
+grey32                82    82   82
+grey33                84    84   84
+grey34                87    87   87
+grey35                89    89   89
+grey36                92    92   92
+grey37                94    94   94
+grey38                97    97   97
+grey39                99    99   99
+grey40               102   102  102
+grey41               105   105  105
+grey42               107   107  107
+grey43               110   110  110
+grey44               112   112  112
+grey45               115   115  115
+grey46               117   117  117
+grey47               120   120  120
+grey48               122   122  122
+grey49               125   125  125
+grey50               127   127  127
+grey51               130   130  130
+grey52               133   133  133
+grey53               135   135  135
+grey54               138   138  138
+grey55               140   140  140
+grey56               143   143  143
+grey57               145   145  145
+grey58               148   148  148
+grey59               150   150  150
+grey60               153   153  153
+grey61               156   156  156
+grey62               158   158  158
+grey63               161   161  161
+grey64               163   163  163
+grey65               166   166  166
+grey66               168   168  168
+grey67               171   171  171
+grey68               173   173  173
+grey69               176   176  176
+grey70               179   179  179
+grey71               181   181  181
+grey72               184   184  184
+grey73               186   186  186
+grey74               189   189  189
+grey75               191   191  191
+grey76               194   194  194
+grey77               196   196  196
+grey78               199   199  199
+grey79               201   201  201
+grey80               204   204  204
+grey81               207   207  207
+grey82               209   209  209
+grey83               212   212  212
+grey84               214   214  214
+grey85               217   217  217
+grey86               219   219  219
+grey87               222   222  222
+grey88               224   224  224
+grey89               227   227  227
+grey90               229   229  229
+grey91               232   232  232
+grey92               235   235  235
+grey93               237   237  237
+grey94               240   240  240
+grey95               242   242  242
+grey96               245   245  245
+grey97               247   247  247
+grey98               250   250  250
+grey99               252   252  252
+grey100              255   255  255
+honeydew             240   255  240
+honeydew1            240   255  240
+honeydew2            224   238  224
+honeydew3            193   205  193
+honeydew4            131   139  131
+hotpink              255   105  180
+hotpink1             255   110  180
+hotpink2             238   106  167
+hotpink3             205    96  144
+hotpink4             139    58   98
+indianred            205    92   92
+indianred1           255   106  106
+indianred2           238    99   99
+indianred3           205    85   85
+indianred4           139    58   58
+ivory                255   255  240
+ivory1               255   255  240
+ivory2               238   238  224
+ivory3               205   205  193
+ivory4               139   139  131
+khaki                240   230  140
+khaki1               255   246  143
+khaki2               238   230  133
+khaki3               205   198  115
+khaki4               139   134   78
+lavender             230   230  250
+lavenderblush        255   240  245
+lavenderblush1       255   240  245
+lavenderblush2       238   224  229
+lavenderblush3       205   193  197
+lavenderblush4       139   131  134
+lawngreen            124   252    0
+lemonchiffon         255   250  205
+lemonchiffon1        255   250  205
+lemonchiffon2        238   233  191
+lemonchiffon3        205   201  165
+lemonchiffon4        139   137  112
+lightblue            173   216  230
+lightblue1           191   239  255
+lightblue2           178   223  238
+lightblue3           154   192  205
+lightblue4           104   131  139
+lightcoral           240   128  128
+lightcyan            224   255  255
+lightcyan1           224   255  255
+lightcyan2           209   238  238
+lightcyan3           180   205  205
+lightcyan4           122   139  139
+lightgoldenrod       238   221  130
+lightgoldenrod1      255   236  139
+lightgoldenrod2      238   220  130
+lightgoldenrod3      205   190  112
+lightgoldenrod4      139   129   76
+lightgoldenrodyellow 250   250  210
+lightgray            211   211  211
+lightgreen           144   238  144
+lightgrey            211   211  211
+lightpink            255   182  193
+lightpink1           255   174  185
+lightpink2           238   162  173
+lightpink3           205   140  149
+lightpink4           139    95  101
+lightsalmon          255   160  122
+lightsalmon1         255   160  122
+lightsalmon2         238   149  114
+lightsalmon3         205   129   98
+lightsalmon4         139    87   66
+lightseagreen         32   178  170
+lightskyblue         135   206  250
+lightskyblue1        176   226  255
+lightskyblue2        164   211  238
+lightskyblue3        141   182  205
+lightskyblue4         96   123  139
+lightslateblue       132   112  255
+lightslategray       119   136  153
+lightslategrey       119   136  153
+lightsteelblue       176   196  222
+lightsteelblue1      202   225  255
+lightsteelblue2      188   210  238
+lightsteelblue3      162   181  205
+lightsteelblue4      110   123  139
+lightyellow          255   255  224
+lightyellow1         255   255  224
+lightyellow2         238   238  209
+lightyellow3         205   205  180
+lightyellow4         139   139  122
+limegreen             50   205   50
+linen                250   240  230
+magenta              255     0  255
+magenta1             255     0  255
+magenta2             238     0  238
+magenta3             205     0  205
+magenta4             139     0  139
+maroon               176    48   96
+maroon1              255    52  179
+maroon2              238    48  167
+maroon3              205    41  144
+maroon4              139    28   98
+mediumaquamarine     102   205  170
+mediumblue             0     0  205
+mediumorchid         186    85  211
+mediumorchid1        224   102  255
+mediumorchid2        209    95  238
+mediumorchid3        180    82  205
+mediumorchid4        122    55  139
+mediumpurple         147   112  219
+mediumpurple1        171   130  255
+mediumpurple2        159   121  238
+mediumpurple3        137   104  205
+mediumpurple4         93    71  139
+mediumseagreen        60   179  113
+mediumslateblue      123   104  238
+mediumspringgreen      0   250  154
+mediumturquoise       72   209  204
+mediumvioletred      199    21  133
+midnightblue          25    25  112
+mintcream            245   255  250
+mistyrose            255   228  225
+mistyrose1           255   228  225
+mistyrose2           238   213  210
+mistyrose3           205   183  181
+mistyrose4           139   125  123
+moccasin             255   228  181
+navajowhite          255   222  173
+navajowhite1         255   222  173
+navajowhite2         238   207  161
+navajowhite3         205   179  139
+navajowhite4         139   121   94
+navy                   0     0  128
+navyblue               0     0  128
+oldlace              253   245  230
+olivedrab            107   142   35
+olivedrab1           192   255   62
+olivedrab2           179   238   58
+olivedrab3           154   205   50
+olivedrab4           105   139   34
+orange               255   165    0
+orange1              255   165    0
+orange2              238   154    0
+orange3              205   133    0
+orange4              139    90    0
+orangered            255    69    0
+orangered1           255    69    0
+orangered2           238    64    0
+orangered3           205    55    0
+orangered4           139    37    0
+orchid               218   112  214
+orchid1              255   131  250
+orchid2              238   122  233
+orchid3              205   105  201
+orchid4              139    71  137
+palegoldenrod        238   232  170
+palegreen            152   251  152
+palegreen1           154   255  154
+palegreen2           144   238  144
+palegreen3           124   205  124
+palegreen4            84   139   84
+paleturquoise        175   238  238
+paleturquoise1       187   255  255
+paleturquoise2       174   238  238
+paleturquoise3       150   205  205
+paleturquoise4       102   139  139
+palevioletred        219   112  147
+palevioletred1       255   130  171
+palevioletred2       238   121  159
+palevioletred3       205   104  137
+palevioletred4       139    71   93
+papayawhip           255   239  213
+peachpuff            255   218  185
+peachpuff1           255   218  185
+peachpuff2           238   203  173
+peachpuff3           205   175  149
+peachpuff4           139   119  101
+peru                 205   133   63
+pink                 255   192  203
+pink1                255   181  197
+pink2                238   169  184
+pink3                205   145  158
+pink4                139    99  108
+plum                 221   160  221
+plum1                255   187  255
+plum2                238   174  238
+plum3                205   150  205
+plum4                139   102  139
+powderblue           176   224  230
+purple               160    32  240
+purple1              155    48  255
+purple2              145    44  238
+purple3              125    38  205
+purple4               85    26  139
+red                  255     0    0
+red1                 255     0    0
+red2                 238     0    0
+red3                 205     0    0
+red4                 139     0    0
+rosybrown            188   143  143
+rosybrown1           255   193  193
+rosybrown2           238   180  180
+rosybrown3           205   155  155
+rosybrown4           139   105  105
+royalblue             65   105  225
+royalblue1            72   118  255
+royalblue2            67   110  238
+royalblue3            58    95  205
+royalblue4            39    64  139
+saddlebrown          139    69   19
+salmon               250   128  114
+salmon1              255   140  105
+salmon2              238   130   98
+salmon3              205   112   84
+salmon4              139    76   57
+sandybrown           244   164   96
+seagreen              46   139   87
+seagreen1             84   255  159
+seagreen2             78   238  148
+seagreen3             67   205  128
+seagreen4             46   139   87
+seashell             255   245  238
+seashell1            255   245  238
+seashell2            238   229  222
+seashell3            205   197  191
+seashell4            139   134  130
+sienna               160    82   45
+sienna1              255   130   71
+sienna2              238   121   66
+sienna3              205   104   57
+sienna4              139    71   38
+skyblue              135   206  235
+skyblue1             135   206  255
+skyblue2             126   192  238
+skyblue3             108   166  205
+skyblue4              74   112  139
+slateblue            106    90  205
+slateblue1           131   111  255
+slateblue2           122   103  238
+slateblue3           105    89  205
+slateblue4            71    60  139
+slategray            112   128  144
+slategray1           198   226  255
+slategray2           185   211  238
+slategray3           159   182  205
+slategray4           108   123  139
+slategrey            112   128  144
+snow                 255   250  250
+snow1                255   250  250
+snow2                238   233  233
+snow3                205   201  201
+snow4                139   137  137
+springgreen            0   255  127
+springgreen1           0   255  127
+springgreen2           0   238  118
+springgreen3           0   205  102
+springgreen4           0   139   69
+steelblue             70   130  180
+steelblue1            99   184  255
+steelblue2            92   172  238
+steelblue3            79   148  205
+steelblue4            54   100  139
+tan                  210   180  140
+tan1                 255   165   79
+tan2                 238   154   73
+tan3                 205   133   63
+tan4                 139    90   43
+thistle              216   191  216
+thistle1             255   225  255
+thistle2             238   210  238
+thistle3             205   181  205
+thistle4             139   123  139
+tomato               255    99   71
+tomato1              255    99   71
+tomato2              238    92   66
+tomato3              205    79   57
+tomato4              139    54   38
+turquoise             64   224  208
+turquoise1             0   245  255
+turquoise2             0   229  238
+turquoise3             0   197  205
+turquoise4             0   134  139
+violet               238   130  238
+violetred            208    32  144
+violetred1           255    62  150
+violetred2           238    58  140
+violetred3           205    50  120
+violetred4           139    34   82
+wheat                245   222  179
+wheat1               255   231  186
+wheat2               238   216  174
+wheat3               205   186  150
+wheat4               139   126  102
+whitesmoke           245   245  245
+yellow               255   255    0
+yellow1              255   255    0
+yellow2              238   238    0
+yellow3              205   205    0
+yellow4              139   139    0
+yellowgreen          154   205   50
+> 
+> ccodes <- c(256^(2:0) %*% crgb)  # = internal codes
+> ## How many names are 'aliases' of each other:
+> table(tcc <- table(ccodes))
+
+  1   2   3   4 
+352 146   3   1 
+> length(uc <- unique(sort(ccodes))) # 502
+[1] 502
+> ## All the multiply named colors:
+> mult <- uc[tcc >= 2]
+> cl <- lapply(mult, function(m) cc[ccodes == m])
+> names(cl) <- apply(col2rgb(sapply(cl, function(x)x[1])),
++                    2, function(n)paste(n, collapse = ","))
+> utils::str(cl)
+List of 150
+ $ 0,0,0      : chr [1:3] "black" "gray0" "grey0"
+ $ 0,0,128    : chr [1:2] "navy" "navyblue"
+ $ 0,0,139    : chr [1:2] "blue4" "darkblue"
+ $ 0,0,205    : chr [1:2] "blue3" "mediumblue"
+ $ 0,0,255    : chr [1:2] "blue" "blue1"
+ $ 0,139,139  : chr [1:2] "cyan4" "darkcyan"
+ $ 0,191,255  : chr [1:2] "deepskyblue" "deepskyblue1"
+ $ 0,255,0    : chr [1:2] "green" "green1"
+ $ 0,255,127  : chr [1:2] "springgreen" "springgreen1"
+ $ 0,255,255  : chr [1:2] "cyan" "cyan1"
+ $ 3,3,3      : chr [1:2] "gray1" "grey1"
+ $ 5,5,5      : chr [1:2] "gray2" "grey2"
+ $ 8,8,8      : chr [1:2] "gray3" "grey3"
+ $ 10,10,10   : chr [1:2] "gray4" "grey4"
+ $ 13,13,13   : chr [1:2] "gray5" "grey5"
+ $ 15,15,15   : chr [1:2] "gray6" "grey6"
+ $ 18,18,18   : chr [1:2] "gray7" "grey7"
+ $ 20,20,20   : chr [1:2] "gray8" "grey8"
+ $ 23,23,23   : chr [1:2] "gray9" "grey9"
+ $ 26,26,26   : chr [1:2] "gray10" "grey10"
+ $ 28,28,28   : chr [1:2] "gray11" "grey11"
+ $ 30,144,255 : chr [1:2] "dodgerblue" "dodgerblue1"
+ $ 31,31,31   : chr [1:2] "gray12" "grey12"
+ $ 33,33,33   : chr [1:2] "gray13" "grey13"
+ $ 36,36,36   : chr [1:2] "gray14" "grey14"
+ $ 38,38,38   : chr [1:2] "gray15" "grey15"
+ $ 41,41,41   : chr [1:2] "gray16" "grey16"
+ $ 43,43,43   : chr [1:2] "gray17" "grey17"
+ $ 46,46,46   : chr [1:2] "gray18" "grey18"
+ $ 46,139,87  : chr [1:2] "seagreen" "seagreen4"
+ $ 47,79,79   : chr [1:2] "darkslategray" "darkslategrey"
+ $ 48,48,48   : chr [1:2] "gray19" "grey19"
+ $ 51,51,51   : chr [1:2] "gray20" "grey20"
+ $ 54,54,54   : chr [1:2] "gray21" "grey21"
+ $ 56,56,56   : chr [1:2] "gray22" "grey22"
+ $ 59,59,59   : chr [1:2] "gray23" "grey23"
+ $ 61,61,61   : chr [1:2] "gray24" "grey24"
+ $ 64,64,64   : chr [1:2] "gray25" "grey25"
+ $ 66,66,66   : chr [1:2] "gray26" "grey26"
+ $ 69,69,69   : chr [1:2] "gray27" "grey27"
+ $ 71,71,71   : chr [1:2] "gray28" "grey28"
+ $ 74,74,74   : chr [1:2] "gray29" "grey29"
+ $ 77,77,77   : chr [1:2] "gray30" "grey30"
+ $ 79,79,79   : chr [1:2] "gray31" "grey31"
+ $ 82,82,82   : chr [1:2] "gray32" "grey32"
+ $ 84,84,84   : chr [1:2] "gray33" "grey33"
+ $ 87,87,87   : chr [1:2] "gray34" "grey34"
+ $ 89,89,89   : chr [1:2] "gray35" "grey35"
+ $ 92,92,92   : chr [1:2] "gray36" "grey36"
+ $ 94,94,94   : chr [1:2] "gray37" "grey37"
+ $ 97,97,97   : chr [1:2] "gray38" "grey38"
+ $ 99,99,99   : chr [1:2] "gray39" "grey39"
+ $ 102,102,102: chr [1:2] "gray40" "grey40"
+ $ 102,205,170: chr [1:2] "aquamarine3" "mediumaquamarine"
+ $ 105,105,105: chr [1:4] "dimgray" "dimgrey" "gray41" "grey41"
+ $ 107,107,107: chr [1:2] "gray42" "grey42"
+ $ 110,110,110: chr [1:2] "gray43" "grey43"
+ $ 112,112,112: chr [1:2] "gray44" "grey44"
+ $ 112,128,144: chr [1:2] "slategray" "slategrey"
+ $ 115,115,115: chr [1:2] "gray45" "grey45"
+ $ 117,117,117: chr [1:2] "gray46" "grey46"
+ $ 119,136,153: chr [1:2] "lightslategray" "lightslategrey"
+ $ 120,120,120: chr [1:2] "gray47" "grey47"
+ $ 122,122,122: chr [1:2] "gray48" "grey48"
+ $ 125,125,125: chr [1:2] "gray49" "grey49"
+ $ 127,127,127: chr [1:2] "gray50" "grey50"
+ $ 127,255,0  : chr [1:2] "chartreuse" "chartreuse1"
+ $ 127,255,212: chr [1:2] "aquamarine" "aquamarine1"
+ $ 130,130,130: chr [1:2] "gray51" "grey51"
+ $ 133,133,133: chr [1:2] "gray52" "grey52"
+ $ 135,135,135: chr [1:2] "gray53" "grey53"
+ $ 138,138,138: chr [1:2] "gray54" "grey54"
+ $ 139,0,0    : chr [1:2] "darkred" "red4"
+ $ 139,0,139  : chr [1:2] "darkmagenta" "magenta4"
+ $ 139,69,19  : chr [1:2] "chocolate4" "saddlebrown"
+ $ 140,140,140: chr [1:2] "gray55" "grey55"
+ $ 143,143,143: chr [1:2] "gray56" "grey56"
+ $ 144,238,144: chr [1:2] "lightgreen" "palegreen2"
+ $ 145,145,145: chr [1:2] "gray57" "grey57"
+ $ 148,148,148: chr [1:2] "gray58" "grey58"
+ $ 150,150,150: chr [1:2] "gray59" "grey59"
+ $ 153,153,153: chr [1:2] "gray60" "grey60"
+ $ 154,205,50 : chr [1:2] "olivedrab3" "yellowgreen"
+ $ 156,156,156: chr [1:2] "gray61" "grey61"
+ $ 158,158,158: chr [1:2] "gray62" "grey62"
+ $ 161,161,161: chr [1:2] "gray63" "grey63"
+ $ 163,163,163: chr [1:2] "gray64" "grey64"
+ $ 166,166,166: chr [1:2] "gray65" "grey65"
+ $ 168,168,168: chr [1:2] "gray66" "grey66"
+ $ 169,169,169: chr [1:2] "darkgray" "darkgrey"
+ $ 171,171,171: chr [1:2] "gray67" "grey67"
+ $ 173,173,173: chr [1:2] "gray68" "grey68"
+ $ 176,176,176: chr [1:2] "gray69" "grey69"
+ $ 179,179,179: chr [1:2] "gray70" "grey70"
+ $ 181,181,181: chr [1:2] "gray71" "grey71"
+ $ 184,184,184: chr [1:2] "gray72" "grey72"
+ $ 186,186,186: chr [1:2] "gray73" "grey73"
+ $ 189,189,189: chr [1:2] "gray74" "grey74"
+ $ 190,190,190: chr [1:2] "gray" "grey"
+  [list output truncated]
+> ## Not run: 
+> ##D  if(require(xgobi)) { ## Look at the color cube dynamically :
+> ##D    tc <- t(crgb[, !duplicated(ccodes)])
+> ##D    table(is.gray <- tc[,1] == tc[,2] & tc[,2] == tc[,3])  # (397, 105)
+> ##D    xgobi(tc, color = c("gold", "gray")[1 + is.gray])
+> ##D  }
+> ## End(Not run)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("colorRamp")
+> ### * colorRamp
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: colorRamp
+> ### Title: Color interpolation
+> ### Aliases: colorRamp colorRampPalette
+> ### Keywords: color
+> 
+> ### ** Examples
+> 
+> ## Both return a *function* :
+> colorRamp(c("red", "green"))( (0:4)/4 ) ## (x) , x in [0,1]
+       [,1]   [,2] [,3]
+[1,] 255.00   0.00    0
+[2,] 191.25  63.75    0
+[3,] 127.50 127.50    0
+[4,]  63.75 191.25    0
+[5,]   0.00 255.00    0
+> colorRampPalette(c("blue", "red"))( 4 ) ## (n)
+[1] "#0000FF" "#5500AA" "#AA0055" "#FF0000"
+> ## a ramp in opacity of blue values
+> colorRampPalette(c(rgb(0,0,1,1), rgb(0,0,1,0)), alpha = TRUE)(8)
+[1] "#0000FFFF" "#0000FFDA" "#0000FFB6" "#0000FF91" "#0000FF6D" "#0000FF48"
+[7] "#0000FF24" "#0000FF00"
+> 
+> require(graphics)
+> 
+> ## Here space="rgb" gives palettes that vary only in saturation,
+> ## as intended.
+> ## With space="Lab" the steps are more uniform, but the hues
+> ## are slightly purple.
+> filled.contour(volcano,
++                color.palette =
++                    colorRampPalette(c("red", "white", "blue")),
++                asp = 1)
+> filled.contour(volcano,
++                color.palette =
++                    colorRampPalette(c("red", "white", "blue"),
++                                     space = "Lab"),
++                asp = 1)
+> 
+> ## Interpolating a 'sequential' ColorBrewer palette
+> YlOrBr <- c("#FFFFD4", "#FED98E", "#FE9929", "#D95F0E", "#993404")
+> filled.contour(volcano,
++                color.palette = colorRampPalette(YlOrBr, space = "Lab"),
++                asp = 1)
+> filled.contour(volcano,
++                color.palette = colorRampPalette(YlOrBr, space = "Lab",
++                                                 bias = 0.5),
++                asp = 1)
+> 
+> ## 'jet.colors' is "as in Matlab"
+> ## (and hurting the eyes by over-saturation)
+> jet.colors <-
++   colorRampPalette(c("#00007F", "blue", "#007FFF", "cyan",
++                      "#7FFF7F", "yellow", "#FF7F00", "red", "#7F0000"))
+> filled.contour(volcano, color = jet.colors, asp = 1)
+> 
+> ## space="Lab" helps when colors don't form a natural sequence
+> m <- outer(1:20,1:20,function(x,y) sin(sqrt(x*y)/3))
+> rgb.palette <- colorRampPalette(c("red", "orange", "blue"),
++                                 space = "rgb")
+> Lab.palette <- colorRampPalette(c("red", "orange", "blue"),
++                                 space = "Lab")
+> filled.contour(m, col = rgb.palette(20))
+> filled.contour(m, col = Lab.palette(20))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("colors")
+> ### * colors
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: colors
+> ### Title: Color Names
+> ### Aliases: colors colours
+> ### Keywords: color dplot sysdata
+> 
+> ### ** Examples
+> 
+> cl <- colors()
+> length(cl); cl[1:20]
+[1] 657
+ [1] "white"         "aliceblue"     "antiquewhite"  "antiquewhite1"
+ [5] "antiquewhite2" "antiquewhite3" "antiquewhite4" "aquamarine"   
+ [9] "aquamarine1"   "aquamarine2"   "aquamarine3"   "aquamarine4"  
+[13] "azure"         "azure1"        "azure2"        "azure3"       
+[17] "azure4"        "beige"         "bisque"        "bisque1"      
+> 
+> length(cl. <- colors(TRUE))
+[1] 502
+> ## only 502 of the 657 named ones
+> 
+> ## ----------- Show all named colors and more:
+> demo("colors")
+
+
+	demo(colors)
+	---- ~~~~~~
+
+> ### ----------- Show (almost) all named colors ---------------------
+> 
+> ## 1) with traditional 'graphics' package:
+> showCols1 <- function(bg = "gray", cex = 0.75, srt = 30) {
++     m <- ceiling(sqrt(n <- length(cl <- colors())))
++     length(cl) <- m*m; cm <- matrix(cl, m)
++     ##
++     require("graphics")
++     op <- par(mar=rep(0,4), ann=FALSE, bg = bg); on.exit(par(op))
++     plot(1:m,1:m, type="n", axes=FALSE)
++     text(col(cm), rev(row(cm)), cm,  col = cl, cex=cex, srt=srt)
++ }
+
+> showCols1()
+
+> ## 2) with 'grid' package:
+> showCols2 <- function(bg = "grey", cex = 0.75, rot = 30) {
++     m <- ceiling(sqrt(n <- length(cl <- colors())))
++     length(cl) <- m*m; cm <- matrix(cl, m)
++     ##
++     require("grid")
++     grid.newpage(); vp <- viewport(w = .92, h = .92)
++     grid.rect(gp=gpar(fill=bg))
++     grid.text(cm, x = col(cm)/m, y = rev(row(cm))/m, rot = rot,
++               vp=vp, gp=gpar(cex = cex, col = cm))
++ }
+
+> showCols2()
+Loading required package: grid
+
+> showCols2(bg = "gray33")
+
+> ###
+> 
+> ##' @title Comparing Colors
+> ##' @param col
+> ##' @param nrow
+> ##' @param ncol
+> ##' @param txt.col
+> ##' @return the grid layout, invisibly
+> ##' @author Marius Hofert, originally
+> plotCol <- function(col, nrow=1, ncol=ceiling(length(col) / nrow),
++                     txt.col="black") {
++     stopifnot(nrow >= 1, ncol >= 1)
++     if(length(col) > nrow*ncol)
++         warning("some colors will not be shown")
++     require(grid)
++     grid.newpage()
++     gl <- grid.layout(nrow, ncol)
++     pushViewport(viewport(layout=gl))
++     ic <- 1
++     for(i in 1:nrow) {
++         for(j in 1:ncol) {
++             pushViewport(viewport(layout.pos.row=i, layout.pos.col=j))
++             grid.rect(gp= gpar(fill=col[ic]))
++             grid.text(col[ic], gp=gpar(col=txt.col))
++             upViewport()
++             ic <- ic+1
++         }
++     }
++     upViewport()
++     invisible(gl)
++ }
+
+> ## A Chocolate Bar of colors:
+> plotCol(c("#CC8C3C", paste0("chocolate", 2:4),
++           paste0("darkorange", c("",1:2)), paste0("darkgoldenrod", 1:2),
++           "orange", "orange1", "sandybrown", "tan1", "tan2"),
++         nrow=2)
+
+> ##' Find close R colors() to a given color {original by Marius Hofert)
+> ##' using Euclidean norm in (HSV / RGB / ...) color space
+> nearRcolor <- function(rgb, cSpace = c("hsv", "rgb255", "Luv", "Lab"),
++                        dist = switch(cSpace, "hsv" = 0.10, "rgb255" = 30,
++                        "Luv" = 15, "Lab" = 12))
++ {
++     if(is.character(rgb)) rgb <- col2rgb(rgb)
++     stopifnot(length(rgb <- as.vector(rgb)) == 3)
++     Rcol <- col2rgb(.cc <- colors())
++     uniqC <- !duplicated(t(Rcol)) # gray9 == grey9 (etc)
++     Rcol <- Rcol[, uniqC] ; .cc <- .cc[uniqC]
++     cSpace <- match.arg(cSpace)
++     convRGB2 <- function(Rgb, to)
++         t(convertColor(t(Rgb), from="sRGB", to=to, scale.in=255))
++     ## the transformation,  rgb{0..255} --> cSpace :
++     TransF <- switch(cSpace,
++                      "rgb255" = identity,
++                      "hsv" = rgb2hsv,
++                      "Luv" = function(RGB) convRGB2(RGB, "Luv"),
++                      "Lab" = function(RGB) convRGB2(RGB, "Lab"))
++     d <- sqrt(colSums((TransF(Rcol) - as.vector(TransF(rgb)))^2))
++     iS <- sort.list(d[near <- d <= dist])# sorted: closest first
++     setNames(.cc[near][iS], format(d[near][iS], digits=3))
++ }
+
+> nearRcolor(col2rgb("tan2"), "rgb")
+         0.0         21.1         25.8         29.5 
+      "tan2"       "tan1" "sandybrown"    "sienna1" 
+
+> nearRcolor(col2rgb("tan2"), "hsv")
+      0.0000       0.0410       0.0618       0.0638       0.0667       0.0766 
+      "tan2"    "sienna2"     "coral2"    "tomato2"       "tan1"      "coral" 
+      0.0778       0.0900       0.0912       0.0918 
+   "sienna1" "sandybrown"     "coral1"     "tomato" 
+
+> nearRcolor(col2rgb("tan2"), "Luv")
+        0.00         7.42         7.48        12.41        13.69 
+      "tan2"       "tan1" "sandybrown"    "orange3"    "orange2" 
+
+> nearRcolor(col2rgb("tan2"), "Lab")
+        0.00         5.56         8.08        11.31 
+      "tan2"       "tan1" "sandybrown"       "peru" 
+
+> nearRcolor("#334455")
+         0.0867 
+"darkslategray" 
+
+> ## Now, consider choosing a color by looking in the
+> ## neighborhood of one you know :
+> 
+> plotCol(nearRcolor("deepskyblue", "rgb", dist=50))
+
+> plotCol(nearRcolor("deepskyblue", dist=.1))
+
+> plotCol(nearRcolor("tomato", "rgb", dist= 50), nrow=3)
+
+> plotCol(nearRcolor("tomato", "hsv", dist=.12), nrow=3)
+
+> plotCol(nearRcolor("tomato", "Luv", dist= 25), nrow=3)
+
+> plotCol(nearRcolor("tomato", "Lab", dist= 18), nrow=3)
+> ## -----------
+> 
+> 
+> 
+> cleanEx()
+
+detaching ‘package:grid’
+
+> nameEx("contourLines")
+> ### * contourLines
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: contourLines
+> ### Title: Calculate Contour Lines
+> ### Aliases: contourLines
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> x <- 10*1:nrow(volcano)
+> y <- 10*1:ncol(volcano)
+> contourLines(x, y, volcano)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("convertColor")
+> ### * convertColor
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: convertColor
+> ### Title: Convert between Colour Spaces
+> ### Aliases: convertColor colorspaces
+> ### Keywords: color
+> 
+> ### ** Examples
+> 
+> ## The displayable colors from four planes of Lab space
+> ab <- expand.grid(a = (-10:15)*10,
++                   b = (-15:10)*10)
+> require(graphics); require(stats) # for na.omit
+> par(mfrow = c(2, 2), mar = .1+c(3, 3, 3, .5), mgp = c(2,  .8,  0))
+> 
+> Lab <- cbind(L = 20, ab)
+> srgb <- convertColor(Lab, from = "Lab", to = "sRGB", clip = NA)
+> clipped <- attr(na.omit(srgb), "na.action")
+> srgb[clipped, ] <- 0
+> cols <- rgb(srgb[, 1], srgb[, 2], srgb[, 3])
+> image((-10:15)*10, (-15:10)*10, matrix(1:(26*26), ncol = 26), col = cols,
++   xlab = "a", ylab = "b", main = "Lab: L=20")
+> 
+> Lab <- cbind(L = 40, ab)
+> srgb <- convertColor(Lab, from = "Lab", to = "sRGB", clip = NA)
+> clipped <- attr(na.omit(srgb), "na.action")
+> srgb[clipped, ] <- 0
+> cols <- rgb(srgb[, 1], srgb[, 2], srgb[, 3])
+> image((-10:15)*10, (-15:10)*10, matrix(1:(26*26), ncol = 26), col = cols,
++   xlab = "a", ylab = "b", main = "Lab: L=40")
+> 
+> Lab <- cbind(L = 60, ab)
+> srgb <- convertColor(Lab, from = "Lab", to = "sRGB", clip = NA)
+> clipped <- attr(na.omit(srgb), "na.action")
+> srgb[clipped, ] <- 0
+> cols <- rgb(srgb[, 1], srgb[, 2], srgb[, 3])
+> image((-10:15)*10, (-15:10)*10, matrix(1:(26*26), ncol = 26), col = cols,
++   xlab = "a", ylab = "b", main = "Lab: L=60")
+> 
+> Lab <- cbind(L = 80, ab)
+> srgb <- convertColor(Lab, from = "Lab", to = "sRGB", clip = NA)
+> clipped <- attr(na.omit(srgb), "na.action")
+> srgb[clipped, ] <- 0
+> cols <- rgb(srgb[, 1], srgb[, 2], srgb[, 3])
+> image((-10:15)*10, (-15:10)*10, matrix(1:(26*26), ncol = 26), col = cols,
++   xlab = "a", ylab = "b", main = "Lab: L=80")
+> 
+> cols <- t(col2rgb(palette())); rownames(cols) <- palette(); cols
+        red green blue
+black     0     0    0
+red     255     0    0
+green3    0   205    0
+blue      0     0  255
+cyan      0   255  255
+magenta 255     0  255
+yellow  255   255    0
+gray    190   190  190
+> zapsmall(lab <- convertColor(cols, from = "sRGB", to = "Lab", scale.in = 255))
+               L       a.x          b
+black    0.00000   0.00000    0.00000
+red     53.48418  80.01027   67.38407
+green3  71.91841 -73.33548   70.41134
+blue    32.24075  78.82042 -107.93632
+cyan    91.01106 -48.46075  -14.29081
+magenta 60.50231  97.95195  -60.51490
+yellow  97.14950 -21.36677   94.42044
+gray    76.97594   0.00000    0.00000
+> stopifnot(all.equal(cols, # converting back.. getting the original:
++    round(convertColor(lab, from = "Lab", to = "sRGB", scale.out = 255)),
++                     check.attributes = FALSE))
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("densCols")
+> ### * densCols
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: densCols
+> ### Title: Colors for Smooth Density Plots
+> ### Aliases: densCols blues9
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> 
+> cleanEx()
+> nameEx("dev")
+> ### * dev
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: dev
+> ### Title: Control Multiple Devices
+> ### Aliases: dev.cur dev.list dev.next dev.prev dev.off dev.set dev.new
+> ###   graphics.off
+> ### Keywords: device iplot
+> 
+> ### ** Examples
+> 
+> ## Not run: 
+> ##D ## Unix-specific example
+> ##D x11()
+> ##D plot(1:10)
+> ##D x11()
+> ##D plot(rnorm(10))
+> ##D dev.set(dev.prev())
+> ##D abline(0, 1) # through the 1:10 points
+> ##D dev.set(dev.next())
+> ##D abline(h = 0, col = "gray") # for the residual plot
+> ##D dev.set(dev.prev())
+> ##D dev.off(); dev.off() #- close the two X devices
+> ## End(Not run)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("dev.capabilities")
+> ### * dev.capabilities
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: dev.capabilities
+> ### Title: Query Capabilities of the Current Graphics Device
+> ### Aliases: dev.capabilities
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> dev.capabilities()
+$semiTransparency
+[1] TRUE
+
+$transparentBackground
+[1] "semi"
+
+$rasterImage
+[1] "yes"
+
+$capture
+[1] FALSE
+
+$locator
+[1] FALSE
+
+$events
+character(0)
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("dev.interactive")
+> ### * dev.interactive
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: dev.interactive
+> ### Title: Is the Current Graphics Device Interactive?
+> ### Aliases: dev.interactive deviceIsInteractive
+> ### Keywords: device
+> 
+> ### ** Examples
+> 
+> dev.interactive()
+[1] FALSE
+> print(deviceIsInteractive(NULL))
+[1] "X11"      "X11cairo" "quartz"   "windows"  "JavaGD"   "CairoWin" "CairoX11"
+> 
+> 
+> 
+> cleanEx()
+> nameEx("dev.size")
+> ### * dev.size
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: dev.size
+> ### Title: Find Size of Device Surface
+> ### Aliases: dev.size
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> dev.size("cm")
+[1] 17.78 17.78
+> 
+> 
+> 
+> cleanEx()
+> nameEx("dev2")
+> ### * dev2
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: dev2
+> ### Title: Copy Graphics Between Multiple Devices
+> ### Aliases: dev.copy dev.print dev.copy2eps dev.copy2pdf dev.control
+> ### Keywords: device
+> 
+> ### ** Examples
+> 
+> ## Not run: 
+> ##D x11() # on a Unix-alike
+> ##D plot(rnorm(10), main = "Plot 1")
+> ##D dev.copy(device = x11)
+> ##D mtext("Copy 1", 3)
+> ##D dev.print(width = 6, height = 6, horizontal = FALSE) # prints it
+> ##D dev.off(dev.prev())
+> ##D dev.off()
+> ## End(Not run)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("extendrange")
+> ### * extendrange
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: extendrange
+> ### Title: Extend a Numerical Range by a Small Percentage
+> ### Aliases: extendrange
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> x <- 1:5
+> (r <- range(x))         # 1    5
+[1] 1 5
+> extendrange(x)          # 0.8  5.2
+[1] 0.8 5.2
+> extendrange(x, f= 0.01) # 0.96 5.04
+[1] 0.96 5.04
+> ## Use 'r' if you have it already:
+> stopifnot(identical(extendrange(r = r),
++                     extendrange(x)))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("getGraphicsEvent")
+> ### * getGraphicsEvent
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: getGraphicsEvent
+> ### Title: Wait for a mouse or keyboard event from a graphics window
+> ### Aliases: getGraphicsEvent setGraphicsEventHandlers getGraphicsEventEnv
+> ###   setGraphicsEventEnv
+> ### Keywords: iplot
+> 
+> ### ** Examples
+> 
+> # This currently only works on the Windows
+> # and X11(type = "Xlib") screen devices...
+> ## Not run: 
+> ##D savepar <- par(ask = FALSE)
+> ##D dragplot <- function(..., xlim = NULL, ylim = NULL, xaxs = "r", yaxs = "r") {
+> ##D     plot(..., xlim = xlim, ylim = ylim, xaxs = xaxs, yaxs = yaxs)
+> ##D     startx <- NULL
+> ##D     starty <- NULL
+> ##D     prevx <- NULL
+> ##D     prevy <- NULL
+> ##D     usr <- NULL
+> ##D 
+> ##D     devset <- function()
+> ##D         if (dev.cur() != eventEnv$which) dev.set(eventEnv$which)
+> ##D 
+> ##D     dragmousedown <- function(buttons, x, y) {
+> ##D         startx <<- x
+> ##D         starty <<- y
+> ##D         prevx <<- 0
+> ##D         prevy <<- 0
+> ##D         devset()
+> ##D         usr <<- par("usr")
+> ##D         eventEnv$onMouseMove <- dragmousemove
+> ##D         NULL
+> ##D     }
+> ##D 
+> ##D     dragmousemove <- function(buttons, x, y) {
+> ##D         devset()
+> ##D         deltax <- diff(grconvertX(c(startx, x), "ndc", "user"))
+> ##D         deltay <- diff(grconvertY(c(starty, y), "ndc", "user"))
+> ##D 	if (abs(deltax-prevx) + abs(deltay-prevy) > 0) {
+> ##D 	    plot(..., xlim = usr[1:2]-deltax, xaxs = "i",
+> ##D 		      ylim = usr[3:4]-deltay, yaxs = "i")
+> ##D 	    prevx <<- deltax
+> ##D 	    prevy <<- deltay
+> ##D 	}
+> ##D         NULL
+> ##D     }
+> ##D 
+> ##D     mouseup <- function(buttons, x, y) {
+> ##D     	eventEnv$onMouseMove <- NULL
+> ##D     }	
+> ##D 
+> ##D     keydown <- function(key) {
+> ##D         if (key == "q") return(invisible(1))
+> ##D         eventEnv$onMouseMove <- NULL
+> ##D         NULL
+> ##D     }
+> ##D 
+> ##D     setGraphicsEventHandlers(prompt = "Click and drag, hit q to quit",
+> ##D                      onMouseDown = dragmousedown,
+> ##D                      onMouseUp = mouseup,
+> ##D                      onKeybd = keydown)
+> ##D     eventEnv <- getGraphicsEventEnv()
+> ##D }
+> ##D 
+> ##D dragplot(rnorm(1000), rnorm(1000))
+> ##D getGraphicsEvent()
+> ##D par(savepar)
+> ## End(Not run)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("grSoftVersion")
+> ### * grSoftVersion
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: grSoftVersion
+> ### Title: Report Versions of Graphics Software
+> ### Aliases: grSoftVersion
+> 
+> ### ** Examples
+> 
+> 
+> 
+> 
+> cleanEx()
+> nameEx("gray")
+> ### * gray
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: gray
+> ### Title: Gray Level Specification
+> ### Aliases: gray grey
+> ### Keywords: color
+> 
+> ### ** Examples
+> 
+> gray(0:8 / 8)
+[1] "#000000" "#202020" "#404040" "#606060" "#808080" "#9F9F9F" "#BFBFBF"
+[8] "#DFDFDF" "#FFFFFF"
+> 
+> 
+> 
+> cleanEx()
+> nameEx("gray.colors")
+> ### * gray.colors
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: gray.colors
+> ### Title: Gray Color Palette
+> ### Aliases: gray.colors grey.colors
+> ### Keywords: color
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> pie(rep(1, 12), col = gray.colors(12))
+> barplot(1:12, col = gray.colors(12))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("hcl")
+> ### * hcl
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: hcl
+> ### Title: HCL Color Specification
+> ### Aliases: hcl
+> ### Keywords: color dplot
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> # The Foley and Van Dam PhD Data.
+> csd <- matrix(c( 4,2,4,6, 4,3,1,4, 4,7,7,1,
++                  0,7,3,2, 4,5,3,2, 5,4,2,2,
++                  3,1,3,0, 4,4,6,7, 1,10,8,7,
++                  1,5,3,2, 1,5,2,1, 4,1,4,3,
++                  0,3,0,6, 2,1,5,5), nrow = 4)
+> 
+> csphd <- function(colors)
++   barplot(csd, col = colors, ylim = c(0,30),
++           names = 72:85, xlab = "Year", ylab = "Students",
++           legend = c("Winter", "Spring", "Summer", "Fall"),
++           main = "Computer Science PhD Graduates", las = 1)
+> 
+> # The Original (Metaphorical) Colors (Ouch!)
+> csphd(c("blue", "green", "yellow", "orange"))
+> 
+> # A Color Tetrad (Maximal Color Differences)
+> csphd(hcl(h = c(30, 120, 210, 300)))
+> 
+> # Same, but lighter and less colorful
+> # Turn off automatic correction to make sure
+> # that we have defined real colors.
+> csphd(hcl(h = c(30, 120, 210, 300),
++           c = 20, l = 90, fixup = FALSE))
+> 
+> # Analogous Colors
+> # Good for those with red/green color confusion
+> csphd(hcl(h = seq(60, 240, by = 60)))
+> 
+> # Metaphorical Colors
+> csphd(hcl(h = seq(210, 60, length = 4)))
+> 
+> # Cool Colors
+> csphd(hcl(h = seq(120, 0, length = 4) + 150))
+> 
+> # Warm Colors
+> csphd(hcl(h = seq(120, 0, length = 4) - 30))
+> 
+> # Single Color
+> hist(stats::rnorm(1000), col = hcl(240))
+> 
+> ## Exploring the hcl() color space {in its mapping to R's sRGB colors}:
+> demo(hclColors)
+
+
+	demo(hclColors)
+	---- ~~~~~~~~~
+
+> ### ------ hcl() explorations
+> 
+> hcl.wheel <-
++     function(chroma = 35, lums = 0:100, hues = 1:360, asp = 1,
++              p.cex = 0.6, do.label = FALSE, rev.lum = FALSE,
++              fixup = TRUE)
++ {
++     ## Purpose: show chroma "sections" of hcl() color space; see  ?hcl
++     ## ----------------------------------------------------------------------
++     ## Arguments: chroma: can be vector -> multiple plots are done,
++     ##            lums, hues, fixup : all corresponding to hcl()'s args
++     ##            rev.lum: logical indicating if luminance
++     ## 			should go from outer to inner
++     ## ----------------------------------------------------------------------
++     ## Author: Martin Maechler, Date: 24 Jun 2005
++ 
++     require("graphics")
++     stopifnot(is.numeric(lums), lums >= 0, lums <= 100,
++               is.numeric(hues), hues >= 0, hues <= 360,
++               is.numeric(chroma), chroma >= 0, (nch <- length(chroma)) >= 1)
++     if(is.unsorted(hues)) hues <- sort(hues)
++     if(nch > 1) {
++         op <- par(mfrow= n2mfrow(nch), mar = c(0,0,0,0), xpd = TRUE)
++         on.exit(par(op))
++     }
++     for(i.c in 1:nch) {
++         plot(-1:1,-1:1, type="n", axes = FALSE, xlab="",ylab="", asp = asp)
++         ## main = sprintf("hcl(h = <angle>, c = %g)", chroma[i.c]),
++         text(0.4, 0.99, paste("chroma =", format(chroma[i.c])),
++              adj = 0, font = 4)
++         l.s <- (if(rev.lum) rev(lums) else lums) / max(lums) # <= 1
++         for(ang in hues) { # could do all this using outer() instead of for()...
++             a. <- ang * pi/180
++             z.a <- exp(1i * a.)
++             cols <- hcl(ang, c = chroma[i.c], l = lums, fixup = fixup)
++             points(l.s * z.a, pch = 16, col = cols, cex = p.cex)
++             ##if(do."text") : draw the 0,45,90,... angle "lines"
++             if(do.label)
++                 text(z.a*1.05, labels = ang, col = cols[length(cols)/2],
++                      srt = ang)
++         }
++         if(!fixup) ## show the outline
++             lines(exp(1i * hues * pi/180))
++    }
++    invisible()
++ }
+
+> ## and now a few interesting calls :
+> 
+> hcl.wheel() # and watch it redraw when you fiddle with the graphic window
+
+> hcl.wheel(rev.lum= TRUE) # ditto
+
+> hcl.wheel(do.lab = TRUE) # ditto
+
+> ## Now watch:
+> hcl.wheel(ch = c(25,35,45,55))
+
+> hcl.wheel(ch = seq(10, 90, by = 10), p.cex = 0.4)
+
+> hcl.wheel(ch = seq(10, 90, by = 10), p.cex = 0.3, fixup = FALSE)
+
+> hcl.wheel(ch = seq(10, 90, by = 10), p.cex = 0.3, rev.lum = TRUE)
+
+> if(dev.interactive()) # new "graphics window" -- to compare with previous :
++     dev.new()
+
+> hcl.wheel(ch = seq(10, 90, by = 10), p.cex = 0.3, rev.lum = TRUE, fixup=FALSE)
+> 
+> 
+> 
+> 
+> cleanEx()
+> nameEx("hsv")
+> ### * hsv
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: hsv
+> ### Title: HSV Color Specification
+> ### Aliases: hsv
+> ### Keywords: color dplot
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> hsv(.5,.5,.5)
+[1] "#408080"
+> 
+> ## Red tones:
+> n <- 20;  y <- -sin(3*pi*((1:n)-1/2)/n)
+> op <- par(mar = rep(1.5, 4))
+> plot(y, axes = FALSE, frame.plot = TRUE,
++      xlab = "", ylab = "", pch = 21, cex = 30,
++      bg = rainbow(n, start = .85, end = .1),
++      main = "Red tones")
+> par(op)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("make.rgb")
+> ### * make.rgb
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: make.rgb
+> ### Title: Create colour spaces
+> ### Aliases: make.rgb colorConverter
+> ### Keywords: color
+> 
+> ### ** Examples
+> 
+> (pal <- make.rgb(red =   c(0.6400, 0.3300),
++                  green = c(0.2900, 0.6000),
++                  blue =  c(0.1500, 0.0600),
++                  name = "PAL/SECAM RGB"))
+Color space converter: PAL/SECAM RGB
+Reference white: D65
+display gamma = 2.2
+> 
+> ## converter for sRGB in #rrggbb format
+> hexcolor <- colorConverter(toXYZ = function(hex, ...) {
++                             rgb <- t(col2rgb(hex))/255
++                             colorspaces$sRGB$toXYZ(rgb, ...) },
++                            fromXYZ = function(xyz, ...) {
++                               rgb <- colorspaces$sRGB$fromXYZ(xyz, ..)
++                               rgb <- round(rgb, 5)
++                               if (min(rgb) < 0 || max(rgb) > 1)
++                                    as.character(NA)
++                               else rgb(rgb[1], rgb[2], rgb[3])},
++                            white = "D65", name = "#rrggbb")
+> 
+> (cols <- t(col2rgb(palette())))
+     red green blue
+[1,]   0     0    0
+[2,] 255     0    0
+[3,]   0   205    0
+[4,]   0     0  255
+[5,]   0   255  255
+[6,] 255     0  255
+[7,] 255   255    0
+[8,] 190   190  190
+> zapsmall(luv <- convertColor(cols, from = "sRGB", to = "Luv", scale.in = 255))
+            L         u          v
+[1,]  0.00000   0.00000    0.00000
+[2,] 53.48418 175.36468   37.80017
+[3,] 71.91841 -68.70661   87.86408
+[4,] 32.24075  -9.66060 -130.19297
+[5,] 91.01106 -71.17303  -15.34147
+[6,] 60.50231  84.56678 -108.14654
+[7,] 97.14950   7.89815  106.44098
+[8,] 76.97594   0.00000    0.00000
+> (hex <- convertColor(luv, from = "Luv",  to = hexcolor, scale.out = NULL))
+[1] "#000000" "#FF0000" "#00CD00" "#0000FF" "#00FFFF" "#FF00FF" "#FFFF00"
+[8] "#BEBEBE"
+> 
+> ## must make hex a matrix before using it
+> (cc <- round(convertColor(as.matrix(hex), from = hexcolor, to = "sRGB",
++                           scale.in = NULL, scale.out = 255)))
+     [,1] [,2] [,3]
+[1,]    0    0    0
+[2,]  255    0    0
+[3,]    0  205    0
+[4,]    0    0  255
+[5,]    0  255  255
+[6,]  255    0  255
+[7,]  255  255    0
+[8,]  190  190  190
+> stopifnot(cc == cols)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("n2mfrow")
+> ### * n2mfrow
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: n2mfrow
+> ### Title: Compute Default mfrow From Number of Plots
+> ### Aliases: n2mfrow
+> ### Keywords: dplot utilities
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> n2mfrow(8) # 3 x 3
+[1] 3 3
+> 
+> n <- 5 ; x <- seq(-2, 2, len = 51)
+> ## suppose now that 'n' is not known {inside function}
+> op <- par(mfrow = n2mfrow(n))
+> for (j in 1:n)
++    plot(x, x^j, main = substitute(x^ exp, list(exp = j)), type = "l",
++    col = "blue")
+> 
+> sapply(1:10, n2mfrow)
+     [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
+[1,]    1    2    3    2    3    3    3    3    3     4
+[2,]    1    1    1    2    2    2    3    3    3     3
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("nclass")
+> ### * nclass
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: nclass
+> ### Title: Compute the Number of Classes for a Histogram
+> ### Aliases: nclass.Sturges nclass.scott nclass.FD
+> ### Keywords: univar
+> 
+> ### ** Examples
+> 
+> set.seed(1)
+> x <- stats::rnorm(1111)
+> nclass.Sturges(x)
+[1] 12
+> 
+> ## Compare them:
+> NC <- function(x) c(Sturges = nclass.Sturges(x),
++       Scott = nclass.scott(x), FD = nclass.FD(x))
+> NC(x)
+Sturges   Scott      FD 
+     12      20      26 
+> onePt <- rep(1, 11)
+> NC(onePt) # no longer gives NaN
+Sturges   Scott      FD 
+      5       1       1 
+> 
+> 
+> 
+> cleanEx()
+> nameEx("palette")
+> ### * palette
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: palette
+> ### Title: Set or View the Graphics Palette
+> ### Aliases: palette
+> ### Keywords: color sysdata
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> palette()               # obtain the current palette
+[1] "black"   "red"     "green3"  "blue"    "cyan"    "magenta" "yellow" 
+[8] "gray"   
+> palette(rainbow(6))     # six color rainbow
+> 
+> (palette(gray(seq(0,.9,len = 25)))) # gray scales; print old palette
+[1] "red"     "yellow"  "green"   "cyan"    "blue"    "magenta"
+> matplot(outer(1:100, 1:30), type = "l", lty = 1,lwd = 2, col = 1:30,
++         main = "Gray Scales Palette",
++         sub = "palette(gray(seq(0, .9, len=25)))")
+> palette("default")      # reset back to the default
+> 
+> ## on a device where alpha-transparency is supported,
+> ##  use 'alpha = 0.3' transparency with the default palette :
+> mycols <- adjustcolor(palette(), alpha.f = 0.3)
+> opal <- palette(mycols)
+> x <- rnorm(1000); xy <- cbind(x, 3*x + rnorm(1000))
+> plot (xy, lwd = 2,
++        main = "Alpha-Transparency Palette\n alpha = 0.3")
+> xy[,1] <- -xy[,1]
+> points(xy, col = 8, pch = 16, cex = 1.5)
+> palette("default")
+> 
+> 
+> 
+> cleanEx()
+> nameEx("palettes")
+> ### * palettes
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: Palettes
+> ### Title: Color Palettes
+> ### Aliases: rainbow heat.colors terrain.colors topo.colors cm.colors
+> ### Keywords: color dplot
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> # A Color Wheel
+> pie(rep(1, 12), col = rainbow(12))
+> 
+> ##------ Some palettes ------------
+> demo.pal <-
++   function(n, border = if (n < 32) "light gray" else NA,
++            main = paste("color palettes;  n=", n),
++            ch.col = c("rainbow(n, start=.7, end=.1)", "heat.colors(n)",
++                       "terrain.colors(n)", "topo.colors(n)",
++                       "cm.colors(n)"))
++ {
++     nt <- length(ch.col)
++     i <- 1:n; j <- n / nt; d <- j/6; dy <- 2*d
++     plot(i, i+d, type = "n", yaxt = "n", ylab = "", main = main)
++     for (k in 1:nt) {
++         rect(i-.5, (k-1)*j+ dy, i+.4, k*j,
++              col = eval(parse(text = ch.col[k])), border = border)
++         text(2*j,  k * j + dy/4, ch.col[k])
++     }
++ }
+> n <- if(.Device == "postscript") 64 else 16
+>      # Since for screen, larger n may give color allocation problem
+> demo.pal(n)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("pdf")
+> ### * pdf
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: pdf
+> ### Title: PDF Graphics Device
+> ### Aliases: pdf
+> ### Keywords: device
+> 
+> ### ** Examples
+> 
+> 
+> 
+> cleanEx()
+> nameEx("pdf.options")
+> ### * pdf.options
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: pdf.options
+> ### Title: Auxiliary Function to Set/View Defaults for Arguments of pdf
+> ### Aliases: pdf.options
+> ### Keywords: device
+> 
+> ### ** Examples
+> 
+> pdf.options(bg = "pink")
+> utils::str(pdf.options())
+List of 18
+ $ width      : num 7
+ $ height     : num 7
+ $ onefile    : logi TRUE
+ $ family     : chr "Helvetica"
+ $ title      : chr "R Graphics Output"
+ $ fonts      : NULL
+ $ version    : chr "1.4"
+ $ paper      : chr "special"
+ $ encoding   : chr "default"
+ $ bg         : chr "pink"
+ $ fg         : chr "black"
+ $ pointsize  : num 12
+ $ pagecentre : logi TRUE
+ $ colormodel : chr "srgb"
+ $ useDingbats: logi TRUE
+ $ useKerning : logi TRUE
+ $ fillOddEven: logi FALSE
+ $ compress   : logi TRUE
+> pdf.options(reset = TRUE) # back to factory-fresh
+> 
+> 
+> 
+> cleanEx()
+> nameEx("pictex")
+> ### * pictex
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: pictex
+> ### Title: A PicTeX Graphics Driver
+> ### Aliases: pictex
+> ### Keywords: device
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> pictex()
+> plot(1:11, (-5:5)^2, type = "b", main = "Simple Example Plot")
+> dev.off()
+pdf 
+  2 
+> ##--------------------
+> ## Not run: 
+> ##D %% LaTeX Example
+> ##D \documentclass{article}
+> ##D \usepackage{pictex}
+> ##D \usepackage{graphics} % for \rotatebox
+> ##D \begin{document}
+> ##D %...
+> ##D \begin{figure}[h]
+> ##D   \centerline{\input{Rplots.tex}}
+> ##D   \caption{}
+> ##D \end{figure}
+> ##D %...
+> ##D \end{document}
+> ## End(Not run)
+> ##--------------------
+> unlink("Rplots.tex")
+> 
+> 
+> 
+> cleanEx()
+> nameEx("plotmath")
+> ### * plotmath
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: plotmath
+> ### Title: Mathematical Annotation in R
+> ### Aliases: plotmath symbol plain bold italic bolditalic hat bar dot ring
+> ###   widehat widetilde displaystyle textstyle scriptstyle
+> ###   scriptscriptstyle underline phantom over frac atop integral inf sup
+> ###   group bgroup
+> ### Keywords: aplot
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> x <- seq(-4, 4, len = 101)
+> y <- cbind(sin(x), cos(x))
+> matplot(x, y, type = "l", xaxt = "n",
++         main = expression(paste(plain(sin) * phi, "  and  ",
++                                 plain(cos) * phi)),
++         ylab = expression("sin" * phi, "cos" * phi), # only 1st is taken
++         xlab = expression(paste("Phase Angle ", phi)),
++         col.main = "blue")
+> axis(1, at = c(-pi, -pi/2, 0, pi/2, pi),
++      labels = expression(-pi, -pi/2, 0, pi/2, pi))
+> 
+> 
+> ## How to combine "math" and numeric variables :
+> plot(1:10, type="n", xlab="", ylab="", main = "plot math & numbers")
+> theta <- 1.23 ; mtext(bquote(hat(theta) == .(theta)), line= .25)
+> for(i in 2:9)
++     text(i, i+1, substitute(list(xi, eta) == group("(",list(x,y),")"),
++                             list(x = i, y = i+1)))
+> ## note that both of these use calls rather than expressions.
+> ##
+> text(1, 10,  "Derivatives:", adj = 0)
+> text(1, 9.6, expression(
++  "             first: {f * minute}(x) " == {f * minute}(x)), adj = 0)
+> text(1, 9.0, expression(
++  "     second: {f * second}(x) "        == {f * second}(x)), adj = 0)
+> 
+> 
+> plot(1:10, 1:10)
+> text(4, 9, expression(hat(beta) == (X^t * X)^{-1} * X^t * y))
+> text(4, 8.4, "expression(hat(beta) == (X^t * X)^{-1} * X^t * y)",
++      cex = .8)
+> text(4, 7, expression(bar(x) == sum(frac(x[i], n), i==1, n)))
+> text(4, 6.4, "expression(bar(x) == sum(frac(x[i], n), i==1, n))",
++      cex = .8)
+> text(8, 5, expression(paste(frac(1, sigma*sqrt(2*pi)), " ",
++                             plain(e)^{frac(-(x-mu)^2, 2*sigma^2)})),
++      cex = 1.2)
+> 
+> ## some other useful symbols
+> plot.new(); plot.window(c(0,4), c(15,1))
+> text(1, 1, "universal", adj = 0); text(2.5, 1,  "\\042")
+> text(3, 1, expression(symbol("\042")))
+> text(1, 2, "existential", adj = 0); text(2.5, 2,  "\\044")
+> text(3, 2, expression(symbol("\044")))
+> text(1, 3, "suchthat", adj = 0); text(2.5, 3,  "\\047")
+> text(3, 3, expression(symbol("\047")))
+> text(1, 4, "therefore", adj = 0); text(2.5, 4,  "\\134")
+> text(3, 4, expression(symbol("\134")))
+> text(1, 5, "perpendicular", adj = 0); text(2.5, 5,  "\\136")
+> text(3, 5, expression(symbol("\136")))
+> text(1, 6, "circlemultiply", adj = 0); text(2.5, 6,  "\\304")
+> text(3, 6, expression(symbol("\304")))
+> text(1, 7, "circleplus", adj = 0); text(2.5, 7,  "\\305")
+> text(3, 7, expression(symbol("\305")))
+> text(1, 8, "emptyset", adj = 0); text(2.5, 8,  "\\306")
+> text(3, 8, expression(symbol("\306")))
+> text(1, 9, "angle", adj = 0); text(2.5, 9,  "\\320")
+> text(3, 9, expression(symbol("\320")))
+> text(1, 10, "leftangle", adj = 0); text(2.5, 10,  "\\341")
+> text(3, 10, expression(symbol("\341")))
+> text(1, 11, "rightangle", adj = 0); text(2.5, 11,  "\\361")
+> text(3, 11, expression(symbol("\361")))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("postscriptFonts")
+> ### * postscriptFonts
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: postscriptFonts
+> ### Title: PostScript and PDF Font Families
+> ### Aliases: postscriptFonts pdfFonts
+> ### Keywords: device
+> 
+> ### ** Examples
+> 
+> postscriptFonts()
+$serif
+$family
+[1] "Times"
+
+$metrics
+[1] "Times-Roman.afm"      "Times-Bold.afm"       "Times-Italic.afm"    
+[4] "Times-BoldItalic.afm" "Symbol.afm"          
+
+$encoding
+[1] "default"
+
+attr(,"class")
+[1] "Type1Font"
+
+$sans
+$family
+[1] "Helvetica"
+
+$metrics
+[1] "Helvetica.afm"             "Helvetica-Bold.afm"       
+[3] "Helvetica-Oblique.afm"     "Helvetica-BoldOblique.afm"
+[5] "Symbol.afm"               
+
+$encoding
+[1] "default"
+
+attr(,"class")
+[1] "Type1Font"
+
+$mono
+$family
+[1] "Courier"
+
+$metrics
+[1] "Courier.afm"             "Courier-Bold.afm"       
+[3] "Courier-Oblique.afm"     "Courier-BoldOblique.afm"
+[5] "Symbol.afm"             
+
+$encoding
+[1] "default"
+
+attr(,"class")
+[1] "Type1Font"
+
+$AvantGarde
+$family
+[1] "AvantGarde"
+
+$metrics
+[1] "agw_____.afm" "agd_____.afm" "agwo____.afm" "agdo____.afm" "Symbol.afm"  
+
+$encoding
+[1] "default"
+
+attr(,"class")
+[1] "Type1Font"
+
+$Bookman
+$family
+[1] "Bookman"
+
+$metrics
+[1] "bkl_____.afm" "bkd_____.afm" "bkli____.afm" "bkdi____.afm" "Symbol.afm"  
+
+$encoding
+[1] "default"
+
+attr(,"class")
+[1] "Type1Font"
+
+$Courier
+$family
+[1] "Courier"
+
+$metrics
+[1] "Courier.afm"             "Courier-Bold.afm"       
+[3] "Courier-Oblique.afm"     "Courier-BoldOblique.afm"
+[5] "Symbol.afm"             
+
+$encoding
+[1] "default"
+
+attr(,"class")
+[1] "Type1Font"
+
+$Helvetica
+$family
+[1] "Helvetica"
+
+$metrics
+[1] "Helvetica.afm"             "Helvetica-Bold.afm"       
+[3] "Helvetica-Oblique.afm"     "Helvetica-BoldOblique.afm"
+[5] "Symbol.afm"               
+
+$encoding
+[1] "default"
+
+attr(,"class")
+[1] "Type1Font"
+
+$`Helvetica-Narrow`
+$family
+[1] "Helvetica-Narrow"
+
+$metrics
+[1] "hvn_____.afm" "hvnb____.afm" "hvno____.afm" "hvnbo___.afm" "Symbol.afm"  
+
+$encoding
+[1] "default"
+
+attr(,"class")
+[1] "Type1Font"
+
+$NewCenturySchoolbook
+$family
+[1] "NewCenturySchoolbook"
+
+$metrics
+[1] "ncr_____.afm" "ncb_____.afm" "nci_____.afm" "ncbi____.afm" "Symbol.afm"  
+
+$encoding
+[1] "default"
+
+attr(,"class")
+[1] "Type1Font"
+
+$Palatino
+$family
+[1] "Palatino"
+
+$metrics
+[1] "por_____.afm" "pob_____.afm" "poi_____.afm" "pobi____.afm" "Symbol.afm"  
+
+$encoding
+[1] "default"
+
+attr(,"class")
+[1] "Type1Font"
+
+$Times
+$family
+[1] "Times"
+
+$metrics
+[1] "Times-Roman.afm"      "Times-Bold.afm"       "Times-Italic.afm"    
+[4] "Times-BoldItalic.afm" "Symbol.afm"          
+
+$encoding
+[1] "default"
+
+attr(,"class")
+[1] "Type1Font"
+
+$URWGothic
+$family
+[1] "URWGothic"
+
+$metrics
+[1] "a010013l.afm" "a010015l.afm" "a010033l.afm" "a010035l.afm" "s050000l.afm"
+
+$encoding
+[1] "default"
+
+attr(,"class")
+[1] "Type1Font"
+
+$URWBookman
+$family
+[1] "URWBookman"
+
+$metrics
+[1] "b018012l.afm" "b018015l.afm" "b018032l.afm" "b018035l.afm" "s050000l.afm"
+
+$encoding
+[1] "default"
+
+attr(,"class")
+[1] "Type1Font"
+
+$NimbusMon
+$family
+[1] "NimbusMon"
+
+$metrics
+[1] "n022003l.afm" "n022004l.afm" "n022023l.afm" "n022024l.afm" "s050000l.afm"
+
+$encoding
+[1] "default"
+
+attr(,"class")
+[1] "Type1Font"
+
+$NimbusSan
+$family
+[1] "NimbusSan"
+
+$metrics
+[1] "n019003l.afm" "n019004l.afm" "n019023l.afm" "n019024l.afm" "s050000l.afm"
+
+$encoding
+[1] "default"
+
+attr(,"class")
+[1] "Type1Font"
+
+$URWHelvetica
+$family
+[1] "URWHelvetica"
+
+$metrics
+[1] "n019003l.afm" "n019004l.afm" "n019023l.afm" "n019024l.afm" "s050000l.afm"
+
+$encoding
+[1] "default"
+
+attr(,"class")
+[1] "Type1Font"
+
+$NimbusSanCond
+$family
+[1] "NimbusSanCond"
+
+$metrics
+[1] "n019043l.afm" "n019044l.afm" "n019063l.afm" "n019064l.afm" "s050000l.afm"
+
+$encoding
+[1] "default"
+
+attr(,"class")
+[1] "Type1Font"
+
+$CenturySch
+$family
+[1] "CenturySch"
+
+$metrics
+[1] "c059013l.afm" "c059016l.afm" "c059033l.afm" "c059036l.afm" "s050000l.afm"
+
+$encoding
+[1] "default"
+
+attr(,"class")
+[1] "Type1Font"
+
+$URWPalladio
+$family
+[1] "URWPalladio"
+
+$metrics
+[1] "p052003l.afm" "p052004l.afm" "p052023l.afm" "p052024l.afm" "s050000l.afm"
+
+$encoding
+[1] "default"
+
+attr(,"class")
+[1] "Type1Font"
+
+$NimbusRom
+$family
+[1] "NimbusRom"
+
+$metrics
+[1] "n021003l.afm" "n021004l.afm" "n021023l.afm" "n021024l.afm" "s050000l.afm"
+
+$encoding
+[1] "default"
+
+attr(,"class")
+[1] "Type1Font"
+
+$URWTimes
+$family
+[1] "URWTimes"
+
+$metrics
+[1] "n021003l.afm" "n021004l.afm" "n021023l.afm" "n021024l.afm" "s050000l.afm"
+
+$encoding
+[1] "default"
+
+attr(,"class")
+[1] "Type1Font"
+
+$ArialMT
+$family
+[1] "ArialMT"
+
+$metrics
+[1] "ArialMT.afm"            "ArialMT-Bold.afm"       "ArialMT-Italic.afm"    
+[4] "ArialMT-BoldItalic.afm" "Symbol.afm"            
+
+$encoding
+[1] "default"
+
+attr(,"class")
+[1] "Type1Font"
+
+$ComputerModern
+$family
+[1] "ComputerModern"
+
+$metrics
+[1] "CM_regular_10.afm"      "CM_boldx_10.afm"        "CM_italic_10.afm"      
+[4] "CM_boldx_italic_10.afm" "CM_symbol_10.afm"      
+
+$encoding
+[1] "TeXtext.enc"
+
+attr(,"class")
+[1] "Type1Font"
+
+$ComputerModernItalic
+$family
+[1] "ComputerModernItalic"
+
+$metrics
+[1] "CM_regular_10.afm" "CM_boldx_10.afm"   "cmti10.afm"       
+[4] "cmbxti10.afm"      "CM_symbol_10.afm" 
+
+$encoding
+[1] "TeXtext.enc"
+
+attr(,"class")
+[1] "Type1Font"
+
+$Japan1
+$family
+[1] "HeiseiKakuGo-W5"
+
+$metrics
+[1] ""           ""           ""           ""           "Symbol.afm"
+
+$cmap
+[1] "EUC-H"
+
+$cmapEncoding
+[1] "EUC-JP"
+
+$pdfresource
+[1] ""
+
+attr(,"class")
+[1] "CIDFont"
+
+$Japan1HeiMin
+$family
+[1] "HeiseiMin-W3"
+
+$metrics
+[1] ""           ""           ""           ""           "Symbol.afm"
+
+$cmap
+[1] "EUC-H"
+
+$cmapEncoding
+[1] "EUC-JP"
+
+$pdfresource
+[1] ""
+
+attr(,"class")
+[1] "CIDFont"
+
+$Japan1GothicBBB
+$family
+[1] "GothicBBB-Medium"
+
+$metrics
+[1] ""           ""           ""           ""           "Symbol.afm"
+
+$cmap
+[1] "EUC-H"
+
+$cmapEncoding
+[1] "EUC-JP"
+
+$pdfresource
+[1] ""
+
+attr(,"class")
+[1] "CIDFont"
+
+$Japan1Ryumin
+$family
+[1] "Ryumin-Light"
+
+$metrics
+[1] ""           ""           ""           ""           "Symbol.afm"
+
+$cmap
+[1] "EUC-H"
+
+$cmapEncoding
+[1] "EUC-JP"
+
+$pdfresource
+[1] ""
+
+attr(,"class")
+[1] "CIDFont"
+
+$Korea1
+$family
+[1] "Baekmuk-Batang"
+
+$metrics
+[1] ""           ""           ""           ""           "Symbol.afm"
+
+$cmap
+[1] "KSCms-UHC-H"
+
+$cmapEncoding
+[1] "CP949"
+
+$pdfresource
+[1] ""
+
+attr(,"class")
+[1] "CIDFont"
+
+$Korea1deb
+$family
+[1] "Batang-Regular"
+
+$metrics
+[1] ""           ""           ""           ""           "Symbol.afm"
+
+$cmap
+[1] "KSCms-UHC-H"
+
+$cmapEncoding
+[1] "CP949"
+
+$pdfresource
+[1] ""
+
+attr(,"class")
+[1] "CIDFont"
+
+$CNS1
+$family
+[1] "MOESung-Regular"
+
+$metrics
+[1] ""           ""           ""           ""           "Symbol.afm"
+
+$cmap
+[1] "B5pc-H"
+
+$cmapEncoding
+[1] "CP950"
+
+$pdfresource
+[1] ""
+
+attr(,"class")
+[1] "CIDFont"
+
+$GB1
+$family
+[1] "BousungEG-Light-GB"
+
+$metrics
+[1] ""           ""           ""           ""           "Symbol.afm"
+
+$cmap
+[1] "GBK-EUC-H"
+
+$cmapEncoding
+[1] "GBK"
+
+$pdfresource
+[1] ""
+
+attr(,"class")
+[1] "CIDFont"
+
+> ## This duplicates "ComputerModernItalic".
+> CMitalic <- Type1Font("ComputerModern2",
++                       c("CM_regular_10.afm", "CM_boldx_10.afm",
++                         "cmti10.afm", "cmbxti10.afm",
++                          "CM_symbol_10.afm"),
++                       encoding = "TeXtext.enc")
+> postscriptFonts(CMitalic = CMitalic)
+> 
+> ## A CID font for Japanese using a different CMap and
+> ## corresponding cmapEncoding.
+> `Jp_UCS-2` <- CIDFont("TestUCS2",
++                   c("Adobe-Japan1-UniJIS-UCS2-H.afm",
++                     "Adobe-Japan1-UniJIS-UCS2-H.afm",
++                     "Adobe-Japan1-UniJIS-UCS2-H.afm",
++                     "Adobe-Japan1-UniJIS-UCS2-H.afm"),
++                   "UniJIS-UCS2-H", "UCS-2")
+> pdfFonts(`Jp_UCS-2` = `Jp_UCS-2`)
+> names(pdfFonts())
+ [1] "serif"                "sans"                 "mono"                
+ [4] "AvantGarde"           "Bookman"              "Courier"             
+ [7] "Helvetica"            "Helvetica-Narrow"     "NewCenturySchoolbook"
+[10] "Palatino"             "Times"                "URWGothic"           
+[13] "URWBookman"           "NimbusMon"            "NimbusSan"           
+[16] "URWHelvetica"         "NimbusSanCond"        "CenturySch"          
+[19] "URWPalladio"          "NimbusRom"            "URWTimes"            
+[22] "ArialMT"              "Japan1"               "Japan1HeiMin"        
+[25] "Japan1GothicBBB"      "Japan1Ryumin"         "Korea1"              
+[28] "Korea1deb"            "CNS1"                 "GB1"                 
+[31] "Jp_UCS-2"            
+> 
+> 
+> 
+> cleanEx()
+> nameEx("pretty.Date")
+> ### * pretty.Date
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: pretty.Date
+> ### Title: Pretty Breakpoints for Date-Time Classes
+> ### Aliases: pretty.Date pretty.POSIXt
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> pretty(as.Date("2000-03-01")) # R 1.0.0 came in a leap year
+[1] "2000-02-28" "2000-02-29" "2000-03-01" "2000-03-02" "2000-03-03"
+[6] "2000-03-04"
+> 
+> ## time ranges in diverse scales:% also in ../../../../tests/reg-tests-1c.R
+> require(stats)
+> steps <- setNames(,
++     c("10 secs", "1 min", "5 mins", "30 mins", "6 hours", "12 hours",
++       "1 DSTday", "2 weeks", "1 month", "6 months", "1 year",
++       "10 years", "50 years", "1000 years"))
+> x <- as.POSIXct("2002-02-02 02:02")
+> lapply(steps,
++        function(s) {
++            at <- pretty(seq(x, by = s, length = 2), n = 5)
++            attr(at, "labels")
++        })
+$`10 secs`
+[1] "00" "02" "04" "06" "08" "10"
+
+$`1 min`
+[1] "00" "10" "20" "30" "40" "50" "00"
+
+$`5 mins`
+[1] "02:02" "02:03" "02:04" "02:05" "02:06" "02:07"
+
+$`30 mins`
+[1] "02:00" "02:10" "02:20" "02:30" "02:40"
+
+$`6 hours`
+[1] "02:00" "03:00" "04:00" "05:00" "06:00" "07:00" "08:00" "09:00"
+
+$`12 hours`
+[1] "00:00" "03:00" "06:00" "09:00" "12:00" "15:00"
+
+$`1 DSTday`
+[1] "Feb 02 00:00" "Feb 02 06:00" "Feb 02 12:00" "Feb 02 18:00" "Feb 03 00:00"
+[6] "Feb 03 06:00"
+
+$`2 weeks`
+[1] "Jan 28" "Feb 04" "Feb 11" "Feb 18"
+
+$`1 month`
+[1] "Jan 28" "Feb 04" "Feb 11" "Feb 18" "Feb 25" "Mar 04"
+
+$`6 months`
+[1] "Feb" "Mar" "Apr" "May" "Jun" "Jul" "Aug" "Sep"
+
+$`1 year`
+[1] "Jan" "Apr" "Jul" "Oct" "Jan" "Apr"
+
+$`10 years`
+[1] "2002" "2004" "2006" "2008" "2010" "2012" "2014"
+
+$`50 years`
+[1] "2000" "2010" "2020" "2030" "2040" "2050" "2060"
+
+$`1000 years`
+[1] "2000" "2200" "2400" "2600" "2800" "3000" "3200"
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("ps.options")
+> ### * ps.options
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: ps.options
+> ### Title: Auxiliary Function to Set/View Defaults for Arguments of
+> ###   postscript
+> ### Aliases: ps.options setEPS setPS
+> ### Keywords: device
+> 
+> ### ** Examples
+> 
+> ps.options(bg = "pink")
+> utils::str(ps.options())
+List of 18
+ $ onefile    : logi TRUE
+ $ family     : chr "Helvetica"
+ $ title      : chr "R Graphics Output"
+ $ fonts      : NULL
+ $ encoding   : chr "default"
+ $ bg         : chr "pink"
+ $ fg         : chr "black"
+ $ width      : num 0
+ $ height     : num 0
+ $ horizontal : logi TRUE
+ $ pointsize  : num 12
+ $ paper      : chr "default"
+ $ pagecentre : logi TRUE
+ $ print.it   : logi FALSE
+ $ command    : chr "default"
+ $ colormodel : chr "srgb"
+ $ useKerning : logi TRUE
+ $ fillOddEven: logi FALSE
+> 
+> ### ---- error checking of arguments: ----
+> ps.options(width = 0:12, onefile = 0, bg = pi)
+Warning: ‘mode(onefile)’ and ‘mode(bg)’ differ between new and previous
+	 ==> NOT changing ‘onefile’ & ‘bg’
+Warning: ‘length(width)’ differs between new and previous
+	 ==> NOT changing ‘width’
+> # override the check for 'width', but not 'bg':
+> ps.options(width = 0:12, bg = pi, override.check = c(TRUE,FALSE))
+Warning: ‘mode(bg)’ differs between new and previous
+	 ==> NOT changing ‘bg’
+Warning: ‘length(width)’ differs between new and previous
+> utils::str(ps.options())
+List of 18
+ $ onefile    : logi TRUE
+ $ family     : chr "Helvetica"
+ $ title      : chr "R Graphics Output"
+ $ fonts      : NULL
+ $ encoding   : chr "default"
+ $ bg         : chr "pink"
+ $ fg         : chr "black"
+ $ width      : int [1:13] 0 1 2 3 4 5 6 7 8 9 ...
+ $ height     : num 0
+ $ horizontal : logi TRUE
+ $ pointsize  : num 12
+ $ paper      : chr "default"
+ $ pagecentre : logi TRUE
+ $ print.it   : logi FALSE
+ $ command    : chr "default"
+ $ colormodel : chr "srgb"
+ $ useKerning : logi TRUE
+ $ fillOddEven: logi FALSE
+> ps.options(reset = TRUE) # back to factory-fresh
+> 
+> 
+> 
+> cleanEx()
+> nameEx("recordGraphics")
+> ### * recordGraphics
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: recordGraphics
+> ### Title: Record Graphics Operations
+> ### Aliases: recordGraphics
+> ### Keywords: device
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> 
+> plot(1:10)
+> # This rectangle remains 1inch wide when the device is resized
+> recordGraphics(
++   {
++     rect(4, 2,
++          4 + diff(par("usr")[1:2])/par("pin")[1], 3)
++   },
++   list(),
++   getNamespace("graphics"))
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("rgb")
+> ### * rgb
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: rgb
+> ### Title: RGB Color Specification
+> ### Aliases: rgb
+> ### Keywords: color
+> 
+> ### ** Examples
+> 
+> rgb(0, 1, 0)
+[1] "#00FF00"
+> 
+> rgb((0:15)/15, green = 0, blue = 0, names = paste("red", 0:15, sep = "."))
+    red.0     red.1     red.2     red.3     red.4     red.5     red.6     red.7 
+"#000000" "#110000" "#220000" "#330000" "#440000" "#550000" "#660000" "#770000" 
+    red.8     red.9    red.10    red.11    red.12    red.13    red.14    red.15 
+"#880000" "#990000" "#AA0000" "#BB0000" "#CC0000" "#DD0000" "#EE0000" "#FF0000" 
+> 
+> rgb(0, 0:12, 0, max = 255) # integer input
+ [1] "#000000" "#000100" "#000200" "#000300" "#000400" "#000500" "#000600"
+ [8] "#000700" "#000800" "#000900" "#000A00" "#000B00" "#000C00"
+> 
+> ramp <- colorRamp(c("red", "white"))
+> rgb( ramp(seq(0, 1, length = 5)), max = 255)
+[1] "#FF0000" "#FF3F3F" "#FF7F7F" "#FFBFBF" "#FFFFFF"
+> 
+> 
+> 
+> cleanEx()
+> nameEx("rgb2hsv")
+> ### * rgb2hsv
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: rgb2hsv
+> ### Title: RGB to HSV Conversion
+> ### Aliases: rgb2hsv
+> ### Keywords: color dplot
+> 
+> ### ** Examples
+> 
+> ## These (saturated, bright ones) only differ by hue
+> (rc <- col2rgb(c("red", "yellow","green","cyan", "blue", "magenta")))
+      [,1] [,2] [,3] [,4] [,5] [,6]
+red    255  255    0    0    0  255
+green    0  255  255  255    0    0
+blue     0    0    0  255  255  255
+> (hc <- rgb2hsv(rc))
+  [,1]      [,2]      [,3] [,4]      [,5]      [,6]
+h    0 0.1666667 0.3333333  0.5 0.6666667 0.8333333
+s    1 1.0000000 1.0000000  1.0 1.0000000 1.0000000
+v    1 1.0000000 1.0000000  1.0 1.0000000 1.0000000
+> 6 * hc["h",] # the hues are equispaced
+[1] 0 1 2 3 4 5
+> 
+> ## Don't show: 
+> set.seed(151)
+> ## End(Don't show)
+> (rgb3 <- floor(256 * matrix(stats::runif(3*12), 3, 12)))
+     [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12]
+[1,]  122  137  116  244   20  153  191  250  134   117    27   202
+[2,]  221  113  210  200  218  151   64  182  195   103   218   254
+[3,]  199  157   88   76   39   91   80  146   22   105    17   239
+> (hsv3 <- rgb2hsv(rgb3))
+       [,1]      [,2]      [,3]      [,4]      [,5]      [,6]      [,7]
+h 0.4629630 0.7575758 0.2950820 0.1230159 0.3493266 0.1612903 0.9790026
+s 0.4479638 0.2802548 0.5809524 0.6885246 0.9082569 0.4052288 0.6649215
+v 0.8666667 0.6156863 0.8235294 0.9568627 0.8549020 0.6000000 0.7490196
+        [,8]      [,9]     [,10]     [,11]     [,12]
+h 0.05769231 0.2254335 0.9761905 0.3250415 0.4519231
+s 0.41600000 0.8871795 0.1196581 0.9220183 0.2047244
+v 0.98039216 0.7647059 0.4588235 0.8549020 0.9960784
+> ## Consistency :
+> stopifnot(rgb3 == col2rgb(hsv(h = hsv3[1,], s = hsv3[2,], v = hsv3[3,])),
++           all.equal(hsv3, rgb2hsv(rgb3/255, maxColorValue = 1)))
+> 
+> ## A (simplified) pure R version -- originally by Wolfram Fischer --
+> ## showing the exact algorithm:
+> rgb2hsvR <- function(rgb, gamma = 1, maxColorValue = 255)
++ {
++     if(!is.numeric(rgb)) stop("rgb matrix must be numeric")
++     d <- dim(rgb)
++     if(d[1] != 3) stop("rgb matrix must have 3 rows")
++     n <- d[2]
++     if(n == 0) return(cbind(c(h = 1, s = 1, v = 1))[,0])
++     rgb <- rgb/maxColorValue
++     if(gamma != 1) rgb <- rgb ^ (1/gamma)
++ 
++     ## get the max and min
++     v <- apply( rgb, 2, max)
++     s <- apply( rgb, 2, min)
++     D <- v - s # range
++ 
++     ## set hue to zero for undefined values (gray has no hue)
++     h <- numeric(n)
++     notgray <- ( s != v )
++ 
++     ## blue hue
++     idx <- (v == rgb[3,] & notgray )
++     if (any (idx))
++         h[idx] <- 2/3 + 1/6 * (rgb[1,idx] - rgb[2,idx]) / D[idx]
++     ## green hue
++     idx <- (v == rgb[2,] & notgray )
++     if (any (idx))
++         h[idx] <- 1/3 + 1/6 * (rgb[3,idx] - rgb[1,idx]) / D[idx]
++     ## red hue
++     idx <- (v == rgb[1,] & notgray )
++     if (any (idx))
++         h[idx] <-       1/6 * (rgb[2,idx] - rgb[3,idx]) / D[idx]
++ 
++     ## correct for negative red
++     idx <- (h < 0)
++     h[idx] <- 1+h[idx]
++ 
++     ## set the saturation
++     s[! notgray] <- 0;
++     s[notgray] <- 1 - s[notgray] / v[notgray]
++ 
++     rbind( h = h, s = s, v = v )
++ }
+> 
+> ## confirm the equivalence:
+> all.equal(rgb2hsv (rgb3),
++           rgb2hsvR(rgb3), tolerance = 1e-14) # TRUE
+[1] TRUE
+> 
+> 
+> 
+> cleanEx()
+> nameEx("trans3d")
+> ### * trans3d
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: trans3d
+> ### Title: 3D to 2D Transformation for Perspective Plots
+> ### Aliases: trans3d
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> ## See  help(persp) {after attaching the 'graphics' package}
+> ##      -----------
+> 
+> 
+> 
+> cleanEx()
+> nameEx("xy.coords")
+> ### * xy.coords
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: xy.coords
+> ### Title: Extracting Plotting Structures
+> ### Aliases: xy.coords
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> xy.coords(stats::fft(c(1:9)), NULL)
+$x
+[1] 45.0 -4.5 -4.5 -4.5 -4.5 -4.5 -4.5 -4.5 -4.5
+
+$y
+[1]   0.0000000  12.3636484   5.3628912   2.5980762   0.7934714  -0.7934714
+[7]  -2.5980762  -5.3628912 -12.3636484
+
+$xlab
+[1] "Re()"
+
+$ylab
+[1] "Im()"
+
+> 
+> with(cars, xy.coords(dist ~ speed, NULL)$xlab ) # = "speed"
+[1] "speed"
+> 
+> xy.coords(1:3, 1:2, recycle = TRUE)
+$x
+[1] 1 2 3
+
+$y
+[1] 1 2 1
+
+$xlab
+NULL
+
+$ylab
+NULL
+
+> xy.coords(-2:10, NULL, log = "y")
+Warning in xy.coords(-2:10, NULL, log = "y") :
+  3 y values <= 0 omitted from logarithmic plot
+$x
+ [1]  1  2  3  4  5  6  7  8  9 10 11 12 13
+
+$y
+ [1] NA NA NA  1  2  3  4  5  6  7  8  9 10
+
+$xlab
+[1] "Index"
+
+$ylab
+NULL
+
+> ##> warning: 3 y values <= 0 omitted ..
+> 
+> 
+> 
+> cleanEx()
+> nameEx("xyTable")
+> ### * xyTable
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: xyTable
+> ### Title: Multiplicities of (x,y) Points, e.g., for a Sunflower Plot
+> ### Aliases: xyTable
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> xyTable(iris[, 3:4], digits = 6)
+$x
+  [1] 1.0 1.1 1.2 1.3 1.3 1.3 1.4 1.4 1.4 1.5 1.5 1.5 1.5 1.6 1.6 1.6 1.7 1.7
+ [19] 1.7 1.7 1.9 1.9 3.0 3.3 3.5 3.6 3.7 3.8 3.9 3.9 3.9 4.0 4.0 4.0 4.1 4.1
+ [37] 4.2 4.2 4.2 4.3 4.4 4.4 4.4 4.5 4.5 4.5 4.5 4.6 4.6 4.6 4.7 4.7 4.7 4.7
+ [55] 4.8 4.8 4.9 4.9 4.9 5.0 5.0 5.0 5.0 5.1 5.1 5.1 5.1 5.1 5.1 5.1 5.2 5.2
+ [73] 5.3 5.3 5.4 5.4 5.5 5.5 5.6 5.6 5.6 5.6 5.6 5.7 5.7 5.7 5.8 5.8 5.8 5.9
+ [91] 5.9 6.0 6.0 6.1 6.1 6.1 6.3 6.4 6.6 6.7 6.7 6.9
+
+$y
+  [1] 0.2 0.1 0.2 0.2 0.3 0.4 0.1 0.2 0.3 0.1 0.2 0.3 0.4 0.2 0.4 0.6 0.2 0.3
+ [19] 0.4 0.5 0.2 0.4 1.1 1.0 1.0 1.3 1.0 1.1 1.1 1.2 1.4 1.0 1.2 1.3 1.0 1.3
+ [37] 1.2 1.3 1.5 1.3 1.2 1.3 1.4 1.3 1.5 1.6 1.7 1.3 1.4 1.5 1.2 1.4 1.5 1.6
+ [55] 1.4 1.8 1.5 1.8 2.0 1.5 1.7 1.9 2.0 1.5 1.6 1.8 1.9 2.0 2.3 2.4 2.0 2.3
+ [73] 1.9 2.3 2.1 2.3 1.8 2.1 1.4 1.8 2.1 2.2 2.4 2.1 2.3 2.5 1.6 1.8 2.2 2.1
+ [91] 2.3 1.8 2.5 1.9 2.3 2.5 1.8 2.0 2.1 2.0 2.2 2.3
+
+$number
+  [1] 1 1 2 4 2 1 2 8 3 2 7 1 3 5 1 1 1 1 1 1 1 1 1 2 2 1 1 1 1 1 1 1 1 3 1 2 1
+ [38] 2 1 2 1 1 2 1 5 1 1 1 1 1 1 2 1 1 1 3 2 2 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1
+ [75] 1 1 2 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
+
+> 
+> ## Discretized uncorrelated Gaussian:
+> ## Don't show: 
+> set.seed(1)
+> ## End(Don't show)
+> require(stats)
+> xy <- data.frame(x = round(sort(rnorm(100))), y = rnorm(100))
+> xyTable(xy, digits = 1)
+$x
+ [1] -2 -2 -2 -2 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1  0  0  0  0  0  0  0  0
+[26]  0  0  0  0  0  0  0  0  0  0  0  0  0  0  1  1  1  1  1  1  1  1  1  1  1
+[51]  1  1  1  1  1  1  2  2  2  2
+
+$y
+ [1] -0.90 -0.60  0.04  0.20 -0.70 -0.60 -0.50 -0.40 -0.30 -0.20 -0.10  0.40
+[13]  0.50  0.70  0.90  1.00  2.00 -2.00 -1.00 -0.90 -0.80 -0.70 -0.60 -0.50
+[25] -0.30 -0.20 -0.07 -0.06 -0.04 -0.02  0.02  0.06  0.30  0.40  0.50  0.70
+[37]  0.90  1.00  2.00 -1.00 -0.90 -0.80 -0.70 -0.40 -0.30 -0.20 -0.10 -0.08
+[49] -0.03  0.10  0.20  0.40  0.50  0.80  1.00  2.00 -1.00 -0.40  0.40  1.00
+
+$number
+ [1] 1 1 1 1 2 1 2 1 2 4 1 1 1 1 1 2 2 5 5 1 1 2 3 2 3 1 1 1 1 1 1 1 1 1 2 1 1 3
+[39] 3 3 1 1 1 1 2 2 1 1 1 1 2 1 2 2 4 2 3 1 1 1
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("xyz.coords")
+> ### * xyz.coords
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: xyz.coords
+> ### Title: Extracting Plotting Structures
+> ### Aliases: xyz.coords
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> xyz.coords(data.frame(10*1:9, -4), y = NULL, z = NULL)
+$x
+[1] 1 2 3 4 5 6 7 8 9
+
+$y
+[1] 10 20 30 40 50 60 70 80 90
+
+$z
+[1] -4 -4 -4 -4 -4 -4 -4 -4 -4
+
+$xlab
+[1] "Index"
+
+$ylab
+NULL
+
+$zlab
+NULL
+
+> 
+> xyz.coords(1:5, stats::fft(1:5), z = NULL, xlab = "X", ylab = "Y")
+$x
+[1] 15.0 -2.5 -2.5 -2.5 -2.5
+
+$y
+[1]  0.0000000  3.4409548  0.8122992 -0.8122992 -3.4409548
+
+$z
+[1] 1 2 3 4 5
+
+$xlab
+[1] "Re(Y)"
+
+$ylab
+[1] "Im(Y)"
+
+$zlab
+[1] "X"
+
+> 
+> y <- 2 * (x2 <- 10 + (x1 <- 1:10))
+> xyz.coords(y ~ x1 + x2, y = NULL, z = NULL)
+$x
+ [1]  1  2  3  4  5  6  7  8  9 10
+
+$y
+ [1] 11 12 13 14 15 16 17 18 19 20
+
+$z
+ [1] 22 24 26 28 30 32 34 36 38 40
+
+$xlab
+[1] "x1"
+
+$ylab
+[1] "x2"
+
+$zlab
+[1] "y"
+
+> 
+> xyz.coords(data.frame(x = -1:9, y = 2:12, z = 3:13), y = NULL, z = NULL,
++            log = "xy")
+Warning in xyz.coords(data.frame(x = -1:9, y = 2:12, z = 3:13), y = NULL,  :
+  2 x values <= 0 omitted from logarithmic plot
+$x
+ [1] NA NA  1  2  3  4  5  6  7  8  9
+
+$y
+ [1]  2  3  4  5  6  7  8  9 10 11 12
+
+$z
+ [1]  3  4  5  6  7  8  9 10 11 12 13
+
+$xlab
+[1] "x"
+
+$ylab
+[1] "y"
+
+$zlab
+[1] "z"
+
+> ##> Warning message: 2 x values <= 0 omitted ...
+> 
+> 
+> 
+> ### * <FOOTER>
+> ###
+> options(digits = 7L)
+> base::cat("Time elapsed: ", proc.time() - base::get("ptime", pos = 'CheckExEnv'),"\n")
+Time elapsed:  7.569 0.134 7.704 0 0 
+> grDevices::dev.off()
+null device 
+          1 
+> ###
+> ### Local variables: ***
+> ### mode: outline-minor ***
+> ### outline-regexp: "\\(> \\)?### [*]+" ***
+> ### End: ***
+> quit('no')
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/flashClust/R/flashClust.rdx
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/flashClust/R/flashClust.rdx
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/flashClust/R/flashClust
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/flashClust/R/flashClust	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/flashClust/R/flashClust	(revision 2477)
@@ -0,0 +1,27 @@
+#  File share/R/nspackloader.R
+#  Part of the R package, http://www.R-project.org
+#
+#  Copyright (C) 1995-2012 The R Core Team
+#
+#  This program is free software; you can redistribute it and/or modify
+#  it under the terms of the GNU General Public License as published by
+#  the Free Software Foundation; either version 2 of the License, or
+#  (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  A copy of the GNU General Public License is available at
+#  http://www.r-project.org/Licenses/
+
+local({
+    info <- loadingNamespaceInfo()
+    pkg <- info$pkgname
+    ns <- .getNamespace(as.name(pkg))
+    if (is.null(ns))
+        stop("cannot find namespace environment for ", pkg, domain = NA);
+    dbbase <- file.path(info$libname, pkg, "R", pkg)
+    lazyLoad(dbbase, ns, filter = function(n) n != ".__NAMESPACE__.")
+})
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/flashClust/R/flashClust.rdb
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/flashClust/R/flashClust.rdb
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/flashClust/html/00Index.html
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/flashClust/html/00Index.html	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/flashClust/html/00Index.html	(revision 2477)
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title>R: Implementation of optimal hierarchical clustering</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<link rel="stylesheet" type="text/css" href="R.css" />
+</head><body>
+<h1> Implementation of optimal hierarchical clustering
+<img class="toplogo" src="../../../doc/html/Rlogo.svg" alt="[R logo]" />
+</h1>
+<hr/>
+<div style="text-align: center;">
+<a href="../../../doc/html/packages.html"><img class="arrow" src="../../../doc/html/left.jpg" alt="[Up]" /></a>
+<a href="../../../doc/html/index.html"><img class="arrow" src="../../../doc/html/up.jpg" alt="[Top]" /></a>
+</div><h2>Documentation for package &lsquo;flashClust&rsquo; version 1.01-2</h2>
+
+<ul><li><a href="../DESCRIPTION">DESCRIPTION file</a>.</li>
+</ul>
+
+<h2>Help Pages</h2>
+
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="flashClust.html">flashClust</a></td>
+<td>Faster alternative to hclust</td></tr>
+<tr><td style="width: 25%;"><a href="flashClust.html">hclust</a></td>
+<td>Faster alternative to hclust</td></tr>
+</table>
+</body></html>

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/flashClust/html/00Index.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/flashClust/html/R.css
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/flashClust/html/R.css	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/flashClust/html/R.css	(revision 2477)
@@ -0,0 +1,97 @@
+body {
+    background: white;
+    color: black;
+}
+
+a:link {
+    background: white;
+    color: blue;
+}
+
+a:visited {
+    background: white;
+    color: rgb(50%, 0%, 50%);
+}
+
+h1 {
+    background: white;
+    color: rgb(55%, 55%, 55%);
+    font-family: monospace;
+    font-size: x-large;
+    text-align: center;
+}
+
+h2 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-size: large;
+    text-align: center;
+}
+
+h3 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-size: large;
+}
+
+h4 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-style: italic;
+    font-size: large;
+}
+
+h5 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+}
+
+h6 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-style: italic;
+}
+		
+img.toplogo {
+    width: 4em;
+    vertical-align: middle;
+}
+
+img.arrow {
+    width: 30px;
+    height: 30px;
+    border: 0;
+}
+
+span.acronym {
+    font-size: small;
+}
+
+span.env {
+    font-family: monospace;
+}
+
+span.file {
+    font-family: monospace;
+}
+
+span.option{
+    font-family: monospace;
+}
+
+span.pkg {
+    font-weight: bold;
+}
+
+span.samp{
+    font-family: monospace;
+}
+
+div.vignettes a:hover {
+    background: rgb(85%, 85%, 85%);
+}

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/flashClust/html/R.css
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/flashClust/Meta/package.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/flashClust/Meta/package.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/flashClust/Meta/nsInfo.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/flashClust/Meta/nsInfo.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/flashClust/Meta/hsearch.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/flashClust/Meta/hsearch.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/flashClust/Meta/links.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/flashClust/Meta/links.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/flashClust/Meta/Rd.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/flashClust/Meta/Rd.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/flashClust/help/flashClust.rdx
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/flashClust/help/flashClust.rdx
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/flashClust/help/AnIndex
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/flashClust/help/AnIndex	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/flashClust/help/AnIndex	(revision 2477)
@@ -0,0 +1,2 @@
+flashClust	flashClust
+hclust	flashClust
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/flashClust/help/paths.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/flashClust/help/paths.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/flashClust/help/aliases.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/flashClust/help/aliases.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/flashClust/help/flashClust.rdb
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/flashClust/help/flashClust.rdb
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/flashClust/libs/flashClust.so.dSYM/Contents/Resources/DWARF/flashClust.so
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/flashClust/libs/flashClust.so.dSYM/Contents/Resources/DWARF/flashClust.so
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/flashClust/libs/flashClust.so.dSYM/Contents/Info.plist
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/flashClust/libs/flashClust.so.dSYM/Contents/Info.plist	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/flashClust/libs/flashClust.so.dSYM/Contents/Info.plist	(revision 2477)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+	<dict>
+		<key>CFBundleDevelopmentRegion</key>
+		<string>English</string>
+		<key>CFBundleIdentifier</key>
+		<string>com.apple.xcode.dsym.flashClust.so</string>
+		<key>CFBundleInfoDictionaryVersion</key>
+		<string>6.0</string>
+		<key>CFBundlePackageType</key>
+		<string>dSYM</string>
+		<key>CFBundleSignature</key>
+		<string>????</string>
+		<key>CFBundleShortVersionString</key>
+		<string>1.0</string>
+		<key>CFBundleVersion</key>
+		<string>1</string>
+	</dict>
+</plist>
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/grDevices/tests/ps-tests.Rout.save
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/grDevices/tests/ps-tests.Rout.save	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/grDevices/tests/ps-tests.Rout.save	(revision 2477)
@@ -0,0 +1,98 @@
+
+R version 3.3.2 RC (2016-10-26 r71594) -- "Sincere Pumpkin Patch"
+Copyright (C) 2016 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
+
+R is free software and comes with ABSOLUTELY NO WARRANTY.
+You are welcome to redistribute it under certain conditions.
+Type 'license()' or 'licence()' for distribution details.
+
+R is a collaborative project with many contributors.
+Type 'contributors()' for more information and
+'citation()' on how to cite R or R packages in publications.
+
+Type 'demo()' for some demos, 'help()' for on-line help, or
+'help.start()' for an HTML browser interface to help.
+Type 'q()' to quit R.
+
+> ## tests of the fonts in the postscript() device.
+> 
+> testit <- function(family, encoding="default")
++ { 
++     postscript("ps-tests.ps", height=7, width=7, family=family,
++                encoding=encoding)
++     plot(1:10, type="n")
++     text(5, 9, "Some text")
++     text(5, 8 , expression(italic("italic")))
++     text(5, 7 , expression(bold("bold")))
++     text(5, 6 , expression(bolditalic("bold & italic")))
++     text(8, 3, expression(paste(frac(1, sigma*sqrt(2*pi)), " ",
++         plain(e)^{frac(-(x-mu)^2, 2*sigma^2)})))
++     dev.off()
++ }
+> 
+> testit("Helvetica")
+null device 
+          1 
+> testit("AvantGarde")
+null device 
+          1 
+> testit("Bookman")
+null device 
+          1 
+> testit("Courier")
+null device 
+          1 
+> testit("Helvetica-Narrow")
+null device 
+          1 
+> testit("NewCenturySchoolbook")
+null device 
+          1 
+> testit("Palatino")
+null device 
+          1 
+> testit("Times")
+null device 
+          1 
+> 
+> testit("URWGothic")
+null device 
+          1 
+> testit("URWBookman")
+null device 
+          1 
+> testit("NimbusMon")
+null device 
+          1 
+> testit("NimbusSan")
+null device 
+          1 
+> testit("NimbusSanCond")
+null device 
+          1 
+> testit("CenturySch")
+null device 
+          1 
+> testit("URWPalladio")
+null device 
+          1 
+> testit("NimbusRom")
+null device 
+          1 
+> testit("URWHelvetica")
+null device 
+          1 
+> testit("URWTimes")
+null device 
+          1 
+> 
+> testit("ComputerModern", "TeXtext.enc")
+null device 
+          1 
+> 
+> unlink("ps-tests.ps")
+> 
+> proc.time()
+   user  system elapsed 
+  0.391   0.022   0.400 
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/grDevices/tests/xfig-tests.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/grDevices/tests/xfig-tests.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/grDevices/tests/xfig-tests.R	(revision 2477)
@@ -0,0 +1,84 @@
+## tests for the xfig device
+
+
+
+xfig("xfig-tests.fig",onefile=TRUE,defaultfont=TRUE,textspecial=TRUE)
+
+xfig("xfig-tests.fig",onefile=TRUE,defaultfont=TRUE,textspecial=FALSE)
+
+xfig("xfig-tests.fig",onefile=TRUE,defaultfont=FALSE,textspecial=TRUE)
+
+xfig("xfig-tests.fig",onefile=TRUE,defaultfont=FALSE,textspecial=FALSE)
+
+unlink("xfig-tests.fig")
+
+## tests for the xfig device
+
+
+
+xfig("xfig-tests.fig",onefile=TRUE,defaultfont=TRUE,textspecial=TRUE)
+
+xfig("xfig-tests.fig",onefile=TRUE,defaultfont=TRUE,textspecial=FALSE)
+
+xfig("xfig-tests.fig",onefile=TRUE,defaultfont=FALSE,textspecial=TRUE)
+
+xfig("xfig-tests.fig",onefile=TRUE,defaultfont=FALSE,textspecial=FALSE)
+
+unlink("xfig-tests.fig")
+
+## tests for the xfig device
+
+
+
+xfig("xfig-tests.fig",onefile=TRUE,defaultfont=TRUE,textspecial=TRUE)
+
+xfig("xfig-tests.fig",onefile=TRUE,defaultfont=TRUE,textspecial=FALSE)
+
+xfig("xfig-tests.fig",onefile=TRUE,defaultfont=FALSE,textspecial=TRUE)
+
+xfig("xfig-tests.fig",onefile=TRUE,defaultfont=FALSE,textspecial=FALSE)
+
+unlink("xfig-tests.fig")
+
+## tests for the xfig device
+
+
+
+xfig("xfig-tests.fig",onefile=TRUE,defaultfont=TRUE,textspecial=TRUE)
+
+xfig("xfig-tests.fig",onefile=TRUE,defaultfont=TRUE,textspecial=FALSE)
+
+xfig("xfig-tests.fig",onefile=TRUE,defaultfont=FALSE,textspecial=TRUE)
+
+xfig("xfig-tests.fig",onefile=TRUE,defaultfont=FALSE,textspecial=FALSE)
+
+unlink("xfig-tests.fig")
+
+## tests for the xfig device
+
+
+
+xfig("xfig-tests.fig",onefile=TRUE,defaultfont=TRUE,textspecial=TRUE)
+
+xfig("xfig-tests.fig",onefile=TRUE,defaultfont=TRUE,textspecial=FALSE)
+
+xfig("xfig-tests.fig",onefile=TRUE,defaultfont=FALSE,textspecial=TRUE)
+
+xfig("xfig-tests.fig",onefile=TRUE,defaultfont=FALSE,textspecial=FALSE)
+
+unlink("xfig-tests.fig")
+
+## tests for the xfig device
+
+
+
+xfig("xfig-tests.fig",onefile=TRUE,defaultfont=TRUE,textspecial=TRUE)
+
+xfig("xfig-tests.fig",onefile=TRUE,defaultfont=TRUE,textspecial=FALSE)
+
+xfig("xfig-tests.fig",onefile=TRUE,defaultfont=FALSE,textspecial=TRUE)
+
+xfig("xfig-tests.fig",onefile=TRUE,defaultfont=FALSE,textspecial=FALSE)
+
+unlink("xfig-tests.fig")
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/grDevices/tests/ps-tests.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/grDevices/tests/ps-tests.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/grDevices/tests/ps-tests.R	(revision 2477)
@@ -0,0 +1,39 @@
+## tests of the fonts in the postscript() device.
+
+testit <- function(family, encoding="default")
+{ 
+    postscript("ps-tests.ps", height=7, width=7, family=family,
+               encoding=encoding)
+    plot(1:10, type="n")
+    text(5, 9, "Some text")
+    text(5, 8 , expression(italic("italic")))
+    text(5, 7 , expression(bold("bold")))
+    text(5, 6 , expression(bolditalic("bold & italic")))
+    text(8, 3, expression(paste(frac(1, sigma*sqrt(2*pi)), " ",
+        plain(e)^{frac(-(x-mu)^2, 2*sigma^2)})))
+    dev.off()
+}
+
+testit("Helvetica")
+testit("AvantGarde")
+testit("Bookman")
+testit("Courier")
+testit("Helvetica-Narrow")
+testit("NewCenturySchoolbook")
+testit("Palatino")
+testit("Times")
+
+testit("URWGothic")
+testit("URWBookman")
+testit("NimbusMon")
+testit("NimbusSan")
+testit("NimbusSanCond")
+testit("CenturySch")
+testit("URWPalladio")
+testit("NimbusRom")
+testit("URWHelvetica")
+testit("URWTimes")
+
+testit("ComputerModern", "TeXtext.enc")
+
+unlink("ps-tests.ps")
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/grDevices/tests/xfig-tests.Rout.save
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/grDevices/tests/xfig-tests.Rout.save	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/grDevices/tests/xfig-tests.Rout.save	(revision 2477)
@@ -0,0 +1,105 @@
+
+R version 3.3.2 RC (2016-10-26 r71594) -- "Sincere Pumpkin Patch"
+Copyright (C) 2016 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
+
+R is free software and comes with ABSOLUTELY NO WARRANTY.
+You are welcome to redistribute it under certain conditions.
+Type 'license()' or 'licence()' for distribution details.
+
+R is a collaborative project with many contributors.
+Type 'contributors()' for more information and
+'citation()' on how to cite R or R packages in publications.
+
+Type 'demo()' for some demos, 'help()' for on-line help, or
+'help.start()' for an HTML browser interface to help.
+Type 'q()' to quit R.
+
+> ## tests for the xfig device
+> 
+> 
+> 
+> xfig("xfig-tests.fig",onefile=TRUE,defaultfont=TRUE,textspecial=TRUE)
+> 
+> xfig("xfig-tests.fig",onefile=TRUE,defaultfont=TRUE,textspecial=FALSE)
+> 
+> xfig("xfig-tests.fig",onefile=TRUE,defaultfont=FALSE,textspecial=TRUE)
+> 
+> xfig("xfig-tests.fig",onefile=TRUE,defaultfont=FALSE,textspecial=FALSE)
+> 
+> unlink("xfig-tests.fig")
+> 
+> ## tests for the xfig device
+> 
+> 
+> 
+> xfig("xfig-tests.fig",onefile=TRUE,defaultfont=TRUE,textspecial=TRUE)
+> 
+> xfig("xfig-tests.fig",onefile=TRUE,defaultfont=TRUE,textspecial=FALSE)
+> 
+> xfig("xfig-tests.fig",onefile=TRUE,defaultfont=FALSE,textspecial=TRUE)
+> 
+> xfig("xfig-tests.fig",onefile=TRUE,defaultfont=FALSE,textspecial=FALSE)
+> 
+> unlink("xfig-tests.fig")
+> 
+> ## tests for the xfig device
+> 
+> 
+> 
+> xfig("xfig-tests.fig",onefile=TRUE,defaultfont=TRUE,textspecial=TRUE)
+> 
+> xfig("xfig-tests.fig",onefile=TRUE,defaultfont=TRUE,textspecial=FALSE)
+> 
+> xfig("xfig-tests.fig",onefile=TRUE,defaultfont=FALSE,textspecial=TRUE)
+> 
+> xfig("xfig-tests.fig",onefile=TRUE,defaultfont=FALSE,textspecial=FALSE)
+> 
+> unlink("xfig-tests.fig")
+> 
+> ## tests for the xfig device
+> 
+> 
+> 
+> xfig("xfig-tests.fig",onefile=TRUE,defaultfont=TRUE,textspecial=TRUE)
+> 
+> xfig("xfig-tests.fig",onefile=TRUE,defaultfont=TRUE,textspecial=FALSE)
+> 
+> xfig("xfig-tests.fig",onefile=TRUE,defaultfont=FALSE,textspecial=TRUE)
+> 
+> xfig("xfig-tests.fig",onefile=TRUE,defaultfont=FALSE,textspecial=FALSE)
+> 
+> unlink("xfig-tests.fig")
+> 
+> ## tests for the xfig device
+> 
+> 
+> 
+> xfig("xfig-tests.fig",onefile=TRUE,defaultfont=TRUE,textspecial=TRUE)
+> 
+> xfig("xfig-tests.fig",onefile=TRUE,defaultfont=TRUE,textspecial=FALSE)
+> 
+> xfig("xfig-tests.fig",onefile=TRUE,defaultfont=FALSE,textspecial=TRUE)
+> 
+> xfig("xfig-tests.fig",onefile=TRUE,defaultfont=FALSE,textspecial=FALSE)
+> 
+> unlink("xfig-tests.fig")
+> 
+> ## tests for the xfig device
+> 
+> 
+> 
+> xfig("xfig-tests.fig",onefile=TRUE,defaultfont=TRUE,textspecial=TRUE)
+> 
+> xfig("xfig-tests.fig",onefile=TRUE,defaultfont=TRUE,textspecial=FALSE)
+> 
+> xfig("xfig-tests.fig",onefile=TRUE,defaultfont=FALSE,textspecial=TRUE)
+> 
+> xfig("xfig-tests.fig",onefile=TRUE,defaultfont=FALSE,textspecial=FALSE)
+> 
+> unlink("xfig-tests.fig")
+> 
+> 
+> proc.time()
+   user  system elapsed 
+  0.169   0.013   0.169 
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/grDevices/Meta/links.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/grDevices/Meta/links.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/grDevices/Meta/demo.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/grDevices/Meta/demo.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/grDevices/Meta/Rd.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/grDevices/Meta/Rd.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/grDevices/Meta/package.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/grDevices/Meta/package.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/grDevices/Meta/nsInfo.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/grDevices/Meta/nsInfo.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/grDevices/Meta/hsearch.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/grDevices/Meta/hsearch.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/grDevices/icc/srgb.flate
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/grDevices/icc/srgb.flate
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/grDevices/icc/srgb
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/grDevices/icc/srgb	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/grDevices/icc/srgb	(revision 2477)
@@ -0,0 +1,200 @@
+<< /N 3 /Alternate /DeviceRGB /Length 9433 /Filter /ASCIIHexDecode >>
+stream
+00 00 0c 48 4c 69 6e 6f 02 10 00 00 6d 6e 74 72
+52 47 42 20 58 59 5a 20 07 ce 00 02 00 09 00 06
+00 31 00 00 61 63 73 70 4d 53 46 54 00 00 00 00
+49 45 43 20 73 52 47 42 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 f6 d6 00 01 00 00 00 00 d3 2d
+48 50 20 20 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 11 63 70 72 74 00 00 01 50 00 00 00 33
+64 65 73 63 00 00 01 84 00 00 00 6c 77 74 70 74
+00 00 01 f0 00 00 00 14 62 6b 70 74 00 00 02 04
+00 00 00 14 72 58 59 5a 00 00 02 18 00 00 00 14
+67 58 59 5a 00 00 02 2c 00 00 00 14 62 58 59 5a
+00 00 02 40 00 00 00 14 64 6d 6e 64 00 00 02 54
+00 00 00 70 64 6d 64 64 00 00 02 c4 00 00 00 88
+76 75 65 64 00 00 03 4c 00 00 00 86 76 69 65 77
+00 00 03 d4 00 00 00 24 6c 75 6d 69 00 00 03 f8
+00 00 00 14 6d 65 61 73 00 00 04 0c 00 00 00 24
+74 65 63 68 00 00 04 30 00 00 00 0c 72 54 52 43
+00 00 04 3c 00 00 08 0c 67 54 52 43 00 00 04 3c
+00 00 08 0c 62 54 52 43 00 00 04 3c 00 00 08 0c
+74 65 78 74 00 00 00 00 43 6f 70 79 72 69 67 68
+74 20 28 63 29 20 31 39 39 38 20 48 65 77 6c 65
+74 74 2d 50 61 63 6b 61 72 64 20 43 6f 6d 70 61
+6e 79 00 00 64 65 73 63 00 00 00 00 00 00 00 12
+73 52 47 42 20 49 45 43 36 31 39 36 36 2d 32 2e
+31 00 00 00 00 00 00 00 00 00 00 00 12 73 52 47
+42 20 49 45 43 36 31 39 36 36 2d 32 2e 31 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+58 59 5a 20 00 00 00 00 00 00 f3 51 00 01 00 00
+00 01 16 cc 58 59 5a 20 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 58 59 5a 20 00 00 00 00
+00 00 6f a2 00 00 38 f5 00 00 03 90 58 59 5a 20
+00 00 00 00 00 00 62 99 00 00 b7 85 00 00 18 da
+58 59 5a 20 00 00 00 00 00 00 24 a0 00 00 0f 84
+00 00 b6 cf 64 65 73 63 00 00 00 00 00 00 00 16
+49 45 43 20 68 74 74 70 3a 2f 2f 77 77 77 2e 69
+65 63 2e 63 68 00 00 00 00 00 00 00 00 00 00 00
+16 49 45 43 20 68 74 74 70 3a 2f 2f 77 77 77 2e
+69 65 63 2e 63 68 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 64 65 73 63 00 00 00 00 00 00 00 2e
+49 45 43 20 36 31 39 36 36 2d 32 2e 31 20 44 65
+66 61 75 6c 74 20 52 47 42 20 63 6f 6c 6f 75 72
+20 73 70 61 63 65 20 2d 20 73 52 47 42 00 00 00
+00 00 00 00 00 00 00 00 2e 49 45 43 20 36 31 39
+36 36 2d 32 2e 31 20 44 65 66 61 75 6c 74 20 52
+47 42 20 63 6f 6c 6f 75 72 20 73 70 61 63 65 20
+2d 20 73 52 47 42 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 64 65 73 63
+00 00 00 00 00 00 00 2c 52 65 66 65 72 65 6e 63
+65 20 56 69 65 77 69 6e 67 20 43 6f 6e 64 69 74
+69 6f 6e 20 69 6e 20 49 45 43 36 31 39 36 36 2d
+32 2e 31 00 00 00 00 00 00 00 00 00 00 00 2c 52
+65 66 65 72 65 6e 63 65 20 56 69 65 77 69 6e 67
+20 43 6f 6e 64 69 74 69 6f 6e 20 69 6e 20 49 45
+43 36 31 39 36 36 2d 32 2e 31 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 76 69 65 77 00 00 00 00 00 13 a4 fe
+00 14 5f 2e 00 10 cf 14 00 03 ed cc 00 04 13 0b
+00 03 5c 9e 00 00 00 01 58 59 5a 20 00 00 00 00
+00 4c 09 56 00 50 00 00 00 57 1f e7 6d 65 61 73
+00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 02 8f 00 00 00 02
+73 69 67 20 00 00 00 00 43 52 54 20 63 75 72 76
+00 00 00 00 00 00 04 00 00 00 00 05 00 0a 00 0f
+00 14 00 19 00 1e 00 23 00 28 00 2d 00 32 00 37
+00 3b 00 40 00 45 00 4a 00 4f 00 54 00 59 00 5e
+00 63 00 68 00 6d 00 72 00 77 00 7c 00 81 00 86
+00 8b 00 90 00 95 00 9a 00 9f 00 a4 00 a9 00 ae
+00 b2 00 b7 00 bc 00 c1 00 c6 00 cb 00 d0 00 d5
+00 db 00 e0 00 e5 00 eb 00 f0 00 f6 00 fb 01 01
+01 07 01 0d 01 13 01 19 01 1f 01 25 01 2b 01 32
+01 38 01 3e 01 45 01 4c 01 52 01 59 01 60 01 67
+01 6e 01 75 01 7c 01 83 01 8b 01 92 01 9a 01 a1
+01 a9 01 b1 01 b9 01 c1 01 c9 01 d1 01 d9 01 e1
+01 e9 01 f2 01 fa 02 03 02 0c 02 14 02 1d 02 26
+02 2f 02 38 02 41 02 4b 02 54 02 5d 02 67 02 71
+02 7a 02 84 02 8e 02 98 02 a2 02 ac 02 b6 02 c1
+02 cb 02 d5 02 e0 02 eb 02 f5 03 00 03 0b 03 16
+03 21 03 2d 03 38 03 43 03 4f 03 5a 03 66 03 72
+03 7e 03 8a 03 96 03 a2 03 ae 03 ba 03 c7 03 d3
+03 e0 03 ec 03 f9 04 06 04 13 04 20 04 2d 04 3b
+04 48 04 55 04 63 04 71 04 7e 04 8c 04 9a 04 a8
+04 b6 04 c4 04 d3 04 e1 04 f0 04 fe 05 0d 05 1c
+05 2b 05 3a 05 49 05 58 05 67 05 77 05 86 05 96
+05 a6 05 b5 05 c5 05 d5 05 e5 05 f6 06 06 06 16
+06 27 06 37 06 48 06 59 06 6a 06 7b 06 8c 06 9d
+06 af 06 c0 06 d1 06 e3 06 f5 07 07 07 19 07 2b
+07 3d 07 4f 07 61 07 74 07 86 07 99 07 ac 07 bf
+07 d2 07 e5 07 f8 08 0b 08 1f 08 32 08 46 08 5a
+08 6e 08 82 08 96 08 aa 08 be 08 d2 08 e7 08 fb
+09 10 09 25 09 3a 09 4f 09 64 09 79 09 8f 09 a4
+09 ba 09 cf 09 e5 09 fb 0a 11 0a 27 0a 3d 0a 54
+0a 6a 0a 81 0a 98 0a ae 0a c5 0a dc 0a f3 0b 0b
+0b 22 0b 39 0b 51 0b 69 0b 80 0b 98 0b b0 0b c8
+0b e1 0b f9 0c 12 0c 2a 0c 43 0c 5c 0c 75 0c 8e
+0c a7 0c c0 0c d9 0c f3 0d 0d 0d 26 0d 40 0d 5a
+0d 74 0d 8e 0d a9 0d c3 0d de 0d f8 0e 13 0e 2e
+0e 49 0e 64 0e 7f 0e 9b 0e b6 0e d2 0e ee 0f 09
+0f 25 0f 41 0f 5e 0f 7a 0f 96 0f b3 0f cf 0f ec
+10 09 10 26 10 43 10 61 10 7e 10 9b 10 b9 10 d7
+10 f5 11 13 11 31 11 4f 11 6d 11 8c 11 aa 11 c9
+11 e8 12 07 12 26 12 45 12 64 12 84 12 a3 12 c3
+12 e3 13 03 13 23 13 43 13 63 13 83 13 a4 13 c5
+13 e5 14 06 14 27 14 49 14 6a 14 8b 14 ad 14 ce
+14 f0 15 12 15 34 15 56 15 78 15 9b 15 bd 15 e0
+16 03 16 26 16 49 16 6c 16 8f 16 b2 16 d6 16 fa
+17 1d 17 41 17 65 17 89 17 ae 17 d2 17 f7 18 1b
+18 40 18 65 18 8a 18 af 18 d5 18 fa 19 20 19 45
+19 6b 19 91 19 b7 19 dd 1a 04 1a 2a 1a 51 1a 77
+1a 9e 1a c5 1a ec 1b 14 1b 3b 1b 63 1b 8a 1b b2
+1b da 1c 02 1c 2a 1c 52 1c 7b 1c a3 1c cc 1c f5
+1d 1e 1d 47 1d 70 1d 99 1d c3 1d ec 1e 16 1e 40
+1e 6a 1e 94 1e be 1e e9 1f 13 1f 3e 1f 69 1f 94
+1f bf 1f ea 20 15 20 41 20 6c 20 98 20 c4 20 f0
+21 1c 21 48 21 75 21 a1 21 ce 21 fb 22 27 22 55
+22 82 22 af 22 dd 23 0a 23 38 23 66 23 94 23 c2
+23 f0 24 1f 24 4d 24 7c 24 ab 24 da 25 09 25 38
+25 68 25 97 25 c7 25 f7 26 27 26 57 26 87 26 b7
+26 e8 27 18 27 49 27 7a 27 ab 27 dc 28 0d 28 3f
+28 71 28 a2 28 d4 29 06 29 38 29 6b 29 9d 29 d0
+2a 02 2a 35 2a 68 2a 9b 2a cf 2b 02 2b 36 2b 69
+2b 9d 2b d1 2c 05 2c 39 2c 6e 2c a2 2c d7 2d 0c
+2d 41 2d 76 2d ab 2d e1 2e 16 2e 4c 2e 82 2e b7
+2e ee 2f 24 2f 5a 2f 91 2f c7 2f fe 30 35 30 6c
+30 a4 30 db 31 12 31 4a 31 82 31 ba 31 f2 32 2a
+32 63 32 9b 32 d4 33 0d 33 46 33 7f 33 b8 33 f1
+34 2b 34 65 34 9e 34 d8 35 13 35 4d 35 87 35 c2
+35 fd 36 37 36 72 36 ae 36 e9 37 24 37 60 37 9c
+37 d7 38 14 38 50 38 8c 38 c8 39 05 39 42 39 7f
+39 bc 39 f9 3a 36 3a 74 3a b2 3a ef 3b 2d 3b 6b
+3b aa 3b e8 3c 27 3c 65 3c a4 3c e3 3d 22 3d 61
+3d a1 3d e0 3e 20 3e 60 3e a0 3e e0 3f 21 3f 61
+3f a2 3f e2 40 23 40 64 40 a6 40 e7 41 29 41 6a
+41 ac 41 ee 42 30 42 72 42 b5 42 f7 43 3a 43 7d
+43 c0 44 03 44 47 44 8a 44 ce 45 12 45 55 45 9a
+45 de 46 22 46 67 46 ab 46 f0 47 35 47 7b 47 c0
+48 05 48 4b 48 91 48 d7 49 1d 49 63 49 a9 49 f0
+4a 37 4a 7d 4a c4 4b 0c 4b 53 4b 9a 4b e2 4c 2a
+4c 72 4c ba 4d 02 4d 4a 4d 93 4d dc 4e 25 4e 6e
+4e b7 4f 00 4f 49 4f 93 4f dd 50 27 50 71 50 bb
+51 06 51 50 51 9b 51 e6 52 31 52 7c 52 c7 53 13
+53 5f 53 aa 53 f6 54 42 54 8f 54 db 55 28 55 75
+55 c2 56 0f 56 5c 56 a9 56 f7 57 44 57 92 57 e0
+58 2f 58 7d 58 cb 59 1a 59 69 59 b8 5a 07 5a 56
+5a a6 5a f5 5b 45 5b 95 5b e5 5c 35 5c 86 5c d6
+5d 27 5d 78 5d c9 5e 1a 5e 6c 5e bd 5f 0f 5f 61
+5f b3 60 05 60 57 60 aa 60 fc 61 4f 61 a2 61 f5
+62 49 62 9c 62 f0 63 43 63 97 63 eb 64 40 64 94
+64 e9 65 3d 65 92 65 e7 66 3d 66 92 66 e8 67 3d
+67 93 67 e9 68 3f 68 96 68 ec 69 43 69 9a 69 f1
+6a 48 6a 9f 6a f7 6b 4f 6b a7 6b ff 6c 57 6c af
+6d 08 6d 60 6d b9 6e 12 6e 6b 6e c4 6f 1e 6f 78
+6f d1 70 2b 70 86 70 e0 71 3a 71 95 71 f0 72 4b
+72 a6 73 01 73 5d 73 b8 74 14 74 70 74 cc 75 28
+75 85 75 e1 76 3e 76 9b 76 f8 77 56 77 b3 78 11
+78 6e 78 cc 79 2a 79 89 79 e7 7a 46 7a a5 7b 04
+7b 63 7b c2 7c 21 7c 81 7c e1 7d 41 7d a1 7e 01
+7e 62 7e c2 7f 23 7f 84 7f e5 80 47 80 a8 81 0a
+81 6b 81 cd 82 30 82 92 82 f4 83 57 83 ba 84 1d
+84 80 84 e3 85 47 85 ab 86 0e 86 72 86 d7 87 3b
+87 9f 88 04 88 69 88 ce 89 33 89 99 89 fe 8a 64
+8a ca 8b 30 8b 96 8b fc 8c 63 8c ca 8d 31 8d 98
+8d ff 8e 66 8e ce 8f 36 8f 9e 90 06 90 6e 90 d6
+91 3f 91 a8 92 11 92 7a 92 e3 93 4d 93 b6 94 20
+94 8a 94 f4 95 5f 95 c9 96 34 96 9f 97 0a 97 75
+97 e0 98 4c 98 b8 99 24 99 90 99 fc 9a 68 9a d5
+9b 42 9b af 9c 1c 9c 89 9c f7 9d 64 9d d2 9e 40
+9e ae 9f 1d 9f 8b 9f fa a0 69 a0 d8 a1 47 a1 b6
+a2 26 a2 96 a3 06 a3 76 a3 e6 a4 56 a4 c7 a5 38
+a5 a9 a6 1a a6 8b a6 fd a7 6e a7 e0 a8 52 a8 c4
+a9 37 a9 a9 aa 1c aa 8f ab 02 ab 75 ab e9 ac 5c
+ac d0 ad 44 ad b8 ae 2d ae a1 af 16 af 8b b0 00
+b0 75 b0 ea b1 60 b1 d6 b2 4b b2 c2 b3 38 b3 ae
+b4 25 b4 9c b5 13 b5 8a b6 01 b6 79 b6 f0 b7 68
+b7 e0 b8 59 b8 d1 b9 4a b9 c2 ba 3b ba b5 bb 2e
+bb a7 bc 21 bc 9b bd 15 bd 8f be 0a be 84 be ff
+bf 7a bf f5 c0 70 c0 ec c1 67 c1 e3 c2 5f c2 db
+c3 58 c3 d4 c4 51 c4 ce c5 4b c5 c8 c6 46 c6 c3
+c7 41 c7 bf c8 3d c8 bc c9 3a c9 b9 ca 38 ca b7
+cb 36 cb b6 cc 35 cc b5 cd 35 cd b5 ce 36 ce b6
+cf 37 cf b8 d0 39 d0 ba d1 3c d1 be d2 3f d2 c1
+d3 44 d3 c6 d4 49 d4 cb d5 4e d5 d1 d6 55 d6 d8
+d7 5c d7 e0 d8 64 d8 e8 d9 6c d9 f1 da 76 da fb
+db 80 dc 05 dc 8a dd 10 dd 96 de 1c de a2 df 29
+df af e0 36 e0 bd e1 44 e1 cc e2 53 e2 db e3 63
+e3 eb e4 73 e4 fc e5 84 e6 0d e6 96 e7 1f e7 a9
+e8 32 e8 bc e9 46 e9 d0 ea 5b ea e5 eb 70 eb fb
+ec 86 ed 11 ed 9c ee 28 ee b4 ef 40 ef cc f0 58
+f0 e5 f1 72 f1 ff f2 8c f3 19 f3 a7 f4 34 f4 c2
+f5 50 f5 de f6 6d f6 fb f7 8a f8 19 f8 a8 f9 38
+f9 c7 fa 57 fa e7 fb 77 fc 07 fc 98 fd 29 fd ba
+fe 4b fe dc ff 6d ff ff >
+endstream
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/R/mice.rdb
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/R/mice.rdb
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/R/mice.rdx
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/R/mice.rdx
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/R/mice
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/R/mice	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/R/mice	(revision 2477)
@@ -0,0 +1,27 @@
+#  File share/R/nspackloader.R
+#  Part of the R package, http://www.R-project.org
+#
+#  Copyright (C) 1995-2012 The R Core Team
+#
+#  This program is free software; you can redistribute it and/or modify
+#  it under the terms of the GNU General Public License as published by
+#  the Free Software Foundation; either version 2 of the License, or
+#  (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  A copy of the GNU General Public License is available at
+#  http://www.r-project.org/Licenses/
+
+local({
+    info <- loadingNamespaceInfo()
+    pkg <- info$pkgname
+    ns <- .getNamespace(as.name(pkg))
+    if (is.null(ns))
+        stop("cannot find namespace environment for ", pkg, domain = NA);
+    dbbase <- file.path(info$libname, pkg, "R", pkg)
+    lazyLoad(dbbase, ns, filter = function(n) n != ".__NAMESPACE__.")
+})
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/html/R.css
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/html/R.css	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/html/R.css	(revision 2477)
@@ -0,0 +1,97 @@
+body {
+    background: white;
+    color: black;
+}
+
+a:link {
+    background: white;
+    color: blue;
+}
+
+a:visited {
+    background: white;
+    color: rgb(50%, 0%, 50%);
+}
+
+h1 {
+    background: white;
+    color: rgb(55%, 55%, 55%);
+    font-family: monospace;
+    font-size: x-large;
+    text-align: center;
+}
+
+h2 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-size: large;
+    text-align: center;
+}
+
+h3 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-size: large;
+}
+
+h4 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-style: italic;
+    font-size: large;
+}
+
+h5 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+}
+
+h6 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-style: italic;
+}
+		
+img.toplogo {
+    width: 4em;
+    vertical-align: middle;
+}
+
+img.arrow {
+    width: 30px;
+    height: 30px;
+    border: 0;
+}
+
+span.acronym {
+    font-size: small;
+}
+
+span.env {
+    font-family: monospace;
+}
+
+span.file {
+    font-family: monospace;
+}
+
+span.option{
+    font-family: monospace;
+}
+
+span.pkg {
+    font-weight: bold;
+}
+
+span.samp{
+    font-family: monospace;
+}
+
+div.vignettes a:hover {
+    background: rgb(85%, 85%, 85%);
+}

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/html/R.css
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/html/00Index.html
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/html/00Index.html	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/html/00Index.html	(revision 2477)
@@ -0,0 +1,445 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title>R: Multivariate Imputation by Chained Equations</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<link rel="stylesheet" type="text/css" href="R.css" />
+</head><body>
+<h1> Multivariate Imputation by Chained Equations
+<img class="toplogo" src="../../../doc/html/Rlogo.svg" alt="[R logo]" />
+</h1>
+<hr/>
+<div style="text-align: center;">
+<a href="../../../doc/html/packages.html"><img class="arrow" src="../../../doc/html/left.jpg" alt="[Up]" /></a>
+<a href="../../../doc/html/index.html"><img class="arrow" src="../../../doc/html/up.jpg" alt="[Top]" /></a>
+</div><h2>Documentation for package &lsquo;mice&rsquo; version 2.30</h2>
+
+<ul><li><a href="../DESCRIPTION">DESCRIPTION file</a>.</li>
+<li><a href="../doc/index.html">User guides, package vignettes and other documentation.</a></li>
+<li><a href="../NEWS">Package NEWS</a>.</li>
+</ul>
+
+<h2>Help Pages</h2>
+
+
+<p style="text-align: center;">
+<a href="#A">A</a>
+<a href="#B">B</a>
+<a href="#C">C</a>
+<a href="#D">D</a>
+<a href="#E">E</a>
+<a href="#F">F</a>
+<a href="#G">G</a>
+<a href="#H">H</a>
+<a href="#I">I</a>
+<a href="#L">L</a>
+<a href="#M">M</a>
+<a href="#N">N</a>
+<a href="#P">P</a>
+<a href="#Q">Q</a>
+<a href="#R">R</a>
+<a href="#S">S</a>
+<a href="#T">T</a>
+<a href="#V">V</a>
+<a href="#W">W</a>
+<a href="#X">X</a>
+<a href="#misc">misc</a>
+</p>
+
+
+<h2><a name="A">-- A --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="ampute.html">ampute</a></td>
+<td>Generate Missing Data for Simulation Purposes</td></tr>
+<tr><td style="width: 25%;"><a href="ampute.continuous.html">ampute.continuous</a></td>
+<td>Multivariate Amputation Based On Continuous Probability Functions</td></tr>
+<tr><td style="width: 25%;"><a href="ampute.default.freq.html">ampute.default.freq</a></td>
+<td>Default 'freq' in 'ampute'</td></tr>
+<tr><td style="width: 25%;"><a href="ampute.default.odds.html">ampute.default.odds</a></td>
+<td>Default 'odds' in 'ampute()'</td></tr>
+<tr><td style="width: 25%;"><a href="ampute.default.patterns.html">ampute.default.patterns</a></td>
+<td>Default 'patterns' in 'ampute'</td></tr>
+<tr><td style="width: 25%;"><a href="ampute.default.type.html">ampute.default.type</a></td>
+<td>Default 'type' in 'ampute()'</td></tr>
+<tr><td style="width: 25%;"><a href="ampute.default.weights.html">ampute.default.weights</a></td>
+<td>Default 'weights' in 'ampute'</td></tr>
+<tr><td style="width: 25%;"><a href="ampute.discrete.html">ampute.discrete</a></td>
+<td>Multivariate Amputation Based On Discrete Probability Functions</td></tr>
+<tr><td style="width: 25%;"><a href="ampute.mcar.html">ampute.mcar</a></td>
+<td>Multivariate Amputation In A MCAR Manner</td></tr>
+<tr><td style="width: 25%;"><a href="appendbreak.html">appendbreak</a></td>
+<td>Appends specified break to the data</td></tr>
+<tr><td style="width: 25%;"><a href="as.mids.html">as.mids</a></td>
+<td>Converts an multiply imputed dataset (long format) into a 'mids' object</td></tr>
+<tr><td style="width: 25%;"><a href="as.mira.html">as.mira</a></td>
+<td>Create a 'mira' object from repeated analyses</td></tr>
+</table>
+
+<h2><a name="B">-- B --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="boys.html">boys</a></td>
+<td>Growth of Dutch boys</td></tr>
+<tr><td style="width: 25%;"><a href="bwplot.mids.html">bwplot</a></td>
+<td>Box-and-whisker plot of observed and imputed data</td></tr>
+<tr><td style="width: 25%;"><a href="bwplot.mads.html">bwplot.mads</a></td>
+<td>Box-and-whisker plot of amputed and non-amputed data</td></tr>
+<tr><td style="width: 25%;"><a href="bwplot.mids.html">bwplot.mids</a></td>
+<td>Box-and-whisker plot of observed and imputed data</td></tr>
+</table>
+
+<h2><a name="C">-- C --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="mice.impute.cart.html">cart</a></td>
+<td>Imputation by classification and regression trees</td></tr>
+<tr><td style="width: 25%;"><a href="cbind.mids.html">cbind.mids</a></td>
+<td>Columnwise combination of a 'mids' object.</td></tr>
+<tr><td style="width: 25%;"><a href="cc.html">cc</a></td>
+<td>Select complete cases</td></tr>
+<tr><td style="width: 25%;"><a href="cci.html">cci</a></td>
+<td>Complete case indicator</td></tr>
+<tr><td style="width: 25%;"><a href="complete.html">complete</a></td>
+<td>Creates imputed data sets from a 'mids' object</td></tr>
+</table>
+
+<h2><a name="D">-- D --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="densityplot.mids.html">densityplot</a></td>
+<td>Density plot of observed and imputed data</td></tr>
+<tr><td style="width: 25%;"><a href="densityplot.mids.html">densityplot.mids</a></td>
+<td>Density plot of observed and imputed data</td></tr>
+</table>
+
+<h2><a name="E">-- E --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="extractBS.html">extractBS</a></td>
+<td>Extract broken stick estimates from a 'lmer' object</td></tr>
+</table>
+
+<h2><a name="F">-- F --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="mice.impute.fastpmm.html">fastpmm</a></td>
+<td>Imputation by fast predictive mean matching</td></tr>
+<tr><td style="width: 25%;"><a href="fdd.html">fdd</a></td>
+<td>SE Fireworks disaster data</td></tr>
+<tr><td style="width: 25%;"><a href="fdd.html">fdd.pred</a></td>
+<td>SE Fireworks disaster data</td></tr>
+<tr><td style="width: 25%;"><a href="fdgs.html">fdgs</a></td>
+<td>Fifth Dutch growth study 2009</td></tr>
+<tr><td style="width: 25%;"><a href="fico.html">fico</a></td>
+<td>Fraction of incomplete cases among cases with observed</td></tr>
+<tr><td style="width: 25%;"><a href="flux.html">flux</a></td>
+<td>Influx and outflux of multivariate missing data patterns</td></tr>
+<tr><td style="width: 25%;"><a href="fluxplot.html">fluxplot</a></td>
+<td>Fluxplot of the missing data pattern</td></tr>
+</table>
+
+<h2><a name="G">-- G --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="getfit.html">getfit</a></td>
+<td>Extracts fit objects from 'mira' object</td></tr>
+<tr><td style="width: 25%;"><a href="glm.mids.html">glm.mids</a></td>
+<td>Generalized linear model for 'mids' object</td></tr>
+</table>
+
+<h2><a name="H">-- H --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="nelsonaalen.html">hazard</a></td>
+<td>Cumulative hazard rate or Nelson-Aalen estimator</td></tr>
+</table>
+
+<h2><a name="I">-- I --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="ibind.html">ibind</a></td>
+<td>Combine imputations fitted to the same data</td></tr>
+<tr><td style="width: 25%;"><a href="ic.html">ic</a></td>
+<td>Select incomplete cases</td></tr>
+<tr><td style="width: 25%;"><a href="ici.html">ici</a></td>
+<td>Incomplete case indicator</td></tr>
+<tr><td style="width: 25%;"><a href="ici.html">ici-method</a></td>
+<td>Incomplete case indicator</td></tr>
+<tr><td style="width: 25%;"><a href="is.mads.html">is.mads</a></td>
+<td>Check for 'mads' object</td></tr>
+<tr><td style="width: 25%;"><a href="is.mids.html">is.mids</a></td>
+<td>Check for 'mids' object</td></tr>
+<tr><td style="width: 25%;"><a href="is.mipo.html">is.mipo</a></td>
+<td>Check for 'mipo' object</td></tr>
+<tr><td style="width: 25%;"><a href="is.mira.html">is.mira</a></td>
+<td>Check for 'mira' object</td></tr>
+</table>
+
+<h2><a name="L">-- L --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="leiden85.html">leiden85</a></td>
+<td>Leiden 85+ study</td></tr>
+<tr><td style="width: 25%;"><a href="lm.mids.html">lm.mids</a></td>
+<td>Linear regression for 'mids' object</td></tr>
+</table>
+
+<h2><a name="M">-- M --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="mads-class.html">mads-class</a></td>
+<td>Multivariate Amputed Data Set ('mads')</td></tr>
+<tr><td style="width: 25%;"><a href="mammalsleep.html">mammalsleep</a></td>
+<td>Mammal sleep data</td></tr>
+<tr><td style="width: 25%;"><a href="md.pairs.html">md.pairs</a></td>
+<td>Missing data pattern by variable pairs</td></tr>
+<tr><td style="width: 25%;"><a href="md.pattern.html">md.pattern</a></td>
+<td>Missing data pattern</td></tr>
+<tr><td style="width: 25%;"><a href="mdc.html">mdc</a></td>
+<td>Graphical parameter for missing data plots.</td></tr>
+<tr><td style="width: 25%;"><a href="selfreport.html">mgg</a></td>
+<td>Self-reported and measured BMI</td></tr>
+<tr><td style="width: 25%;"><a href="mice.html">mice</a></td>
+<td>Multivariate Imputation by Chained Equations (MICE)</td></tr>
+<tr><td style="width: 25%;"><a href="mice.impute.2l.norm.html">mice.impute.2l.norm</a></td>
+<td>Imputation by a two-level normal model</td></tr>
+<tr><td style="width: 25%;"><a href="mice.impute.2l.pan.html">mice.impute.2l.pan</a></td>
+<td>Imputation by a two-level normal model using 'pan'</td></tr>
+<tr><td style="width: 25%;"><a href="mice.impute.2lonly.mean.html">mice.impute.2lonly.mean</a></td>
+<td>Imputation of the mean within the class</td></tr>
+<tr><td style="width: 25%;"><a href="mice.impute.2lonly.norm.html">mice.impute.2lonly.norm</a></td>
+<td>Imputation at level 2 by Bayesian linear regression</td></tr>
+<tr><td style="width: 25%;"><a href="mice.impute.2lonly.pmm.html">mice.impute.2lonly.pmm</a></td>
+<td>Imputation at level 2 by predictive mean matching</td></tr>
+<tr><td style="width: 25%;"><a href="mice.impute.cart.html">mice.impute.cart</a></td>
+<td>Imputation by classification and regression trees</td></tr>
+<tr><td style="width: 25%;"><a href="mice.impute.fastpmm.html">mice.impute.fastpmm</a></td>
+<td>Imputation by fast predictive mean matching</td></tr>
+<tr><td style="width: 25%;"><a href="mice.impute.lda.html">mice.impute.lda</a></td>
+<td>Imputation by linear discriminant analysis</td></tr>
+<tr><td style="width: 25%;"><a href="mice.impute.logreg.html">mice.impute.logreg</a></td>
+<td>Imputation by logistic regression</td></tr>
+<tr><td style="width: 25%;"><a href="mice.impute.logreg.boot.html">mice.impute.logreg.boot</a></td>
+<td>Imputation by logistic regression using the bootstrap</td></tr>
+<tr><td style="width: 25%;"><a href="mice.impute.mean.html">mice.impute.mean</a></td>
+<td>Imputation by the mean</td></tr>
+<tr><td style="width: 25%;"><a href="mice.impute.midastouch.html">mice.impute.midastouch</a></td>
+<td>Predictive Mean Matching with distance aided selection of donors</td></tr>
+<tr><td style="width: 25%;"><a href="mice.impute.norm.html">mice.impute.norm</a></td>
+<td>Imputation by Bayesian linear regression</td></tr>
+<tr><td style="width: 25%;"><a href="mice.impute.norm.boot.html">mice.impute.norm.boot</a></td>
+<td>Imputation by linear regression, bootstrap method</td></tr>
+<tr><td style="width: 25%;"><a href="mice.impute.norm.nob.html">mice.impute.norm.nob</a></td>
+<td>Imputation by linear regression (non Bayesian)</td></tr>
+<tr><td style="width: 25%;"><a href="mice.impute.norm.predict.html">mice.impute.norm.predict</a></td>
+<td>Imputation by linear regression, prediction method</td></tr>
+<tr><td style="width: 25%;"><a href="mice.impute.passive.html">mice.impute.passive</a></td>
+<td>Passive imputation</td></tr>
+<tr><td style="width: 25%;"><a href="mice.impute.pmm.html">mice.impute.pmm</a></td>
+<td>Imputation by predictive mean matching</td></tr>
+<tr><td style="width: 25%;"><a href="mice.impute.polr.html">mice.impute.polr</a></td>
+<td>Imputation by polytomous regression - ordered</td></tr>
+<tr><td style="width: 25%;"><a href="mice.impute.polyreg.html">mice.impute.polyreg</a></td>
+<td>Imputation by polytomous regression - unordered</td></tr>
+<tr><td style="width: 25%;"><a href="mice.impute.quadratic.html">mice.impute.quadratic</a></td>
+<td>Imputation of quadratric terms</td></tr>
+<tr><td style="width: 25%;"><a href="mice.impute.rf.html">mice.impute.rf</a></td>
+<td>Imputation by random forests</td></tr>
+<tr><td style="width: 25%;"><a href="mice.impute.ri.html">mice.impute.ri</a></td>
+<td>Imputation by the random indicator method for nonignorable data</td></tr>
+<tr><td style="width: 25%;"><a href="mice.impute.sample.html">mice.impute.sample</a></td>
+<td>Imputation by simple random sampling</td></tr>
+<tr><td style="width: 25%;"><a href="mice.mids.html">mice.mids</a></td>
+<td>Multivariate Imputation by Chained Equations (Iteration Step)</td></tr>
+<tr><td style="width: 25%;"><a href="mice.theme.html">mice.theme</a></td>
+<td>Set the theme for the plotting Trellis functions</td></tr>
+<tr><td style="width: 25%;"><a href="mids-class.html">mids</a></td>
+<td>Multiply imputed data set ('mids')</td></tr>
+<tr><td style="width: 25%;"><a href="mids-class.html">mids-class</a></td>
+<td>Multiply imputed data set ('mids')</td></tr>
+<tr><td style="width: 25%;"><a href="mids2mplus.html">mids2mplus</a></td>
+<td>Export 'mids' object to Mplus</td></tr>
+<tr><td style="width: 25%;"><a href="mids2spss.html">mids2spss</a></td>
+<td>Export 'mids' object to SPSS</td></tr>
+<tr><td style="width: 25%;"><a href="mipo-class.html">mipo</a></td>
+<td>Multiply imputed pooled analysis ('mipo')</td></tr>
+<tr><td style="width: 25%;"><a href="mipo-class.html">mipo-class</a></td>
+<td>Multiply imputed pooled analysis ('mipo')</td></tr>
+<tr><td style="width: 25%;"><a href="mira-class.html">mira</a></td>
+<td>Multiply imputed repeated analyses ('mira')</td></tr>
+<tr><td style="width: 25%;"><a href="mira-class.html">mira-class</a></td>
+<td>Multiply imputed repeated analyses ('mira')</td></tr>
+</table>
+
+<h2><a name="N">-- N --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="ncc.html">ncc</a></td>
+<td>Number of complete cases</td></tr>
+<tr><td style="width: 25%;"><a href="nelsonaalen.html">nelsonaalen</a></td>
+<td>Cumulative hazard rate or Nelson-Aalen estimator</td></tr>
+<tr><td style="width: 25%;"><a href="nhanes.html">nhanes</a></td>
+<td>NHANES example - all variables numerical</td></tr>
+<tr><td style="width: 25%;"><a href="nhanes2.html">nhanes2</a></td>
+<td>NHANES example - mixed numerical and discrete variables</td></tr>
+<tr><td style="width: 25%;"><a href="nic.html">nic</a></td>
+<td>Number of incomplete cases</td></tr>
+<tr><td style="width: 25%;"><a href="mice.impute.norm.html">norm</a></td>
+<td>Imputation by Bayesian linear regression</td></tr>
+<tr><td style="width: 25%;"><a href="mice.impute.norm.boot.html">norm.boot</a></td>
+<td>Imputation by linear regression, bootstrap method</td></tr>
+<tr><td style="width: 25%;"><a href="norm.draw.html">norm.draw</a></td>
+<td>Draws values of beta and sigma by Bayesian linear regression</td></tr>
+<tr><td style="width: 25%;"><a href="mice.impute.norm.nob.html">norm.nob</a></td>
+<td>Imputation by linear regression (non Bayesian)</td></tr>
+<tr><td style="width: 25%;"><a href="mice.impute.norm.predict.html">norm.predict</a></td>
+<td>Imputation by linear regression, prediction method</td></tr>
+</table>
+
+<h2><a name="P">-- P --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="pattern.html">pattern</a></td>
+<td>Datasets with various missing data patterns</td></tr>
+<tr><td style="width: 25%;"><a href="pattern.html">pattern1</a></td>
+<td>Datasets with various missing data patterns</td></tr>
+<tr><td style="width: 25%;"><a href="pattern.html">pattern2</a></td>
+<td>Datasets with various missing data patterns</td></tr>
+<tr><td style="width: 25%;"><a href="pattern.html">pattern3</a></td>
+<td>Datasets with various missing data patterns</td></tr>
+<tr><td style="width: 25%;"><a href="pattern.html">pattern4</a></td>
+<td>Datasets with various missing data patterns</td></tr>
+<tr><td style="width: 25%;"><a href="plot.mids.html">plot.mids</a></td>
+<td>Plot the trace lines of the MICE algorithm</td></tr>
+<tr><td style="width: 25%;"><a href="mice.impute.pmm.html">pmm</a></td>
+<td>Imputation by predictive mean matching</td></tr>
+<tr><td style="width: 25%;"><a href="pool.html">pool</a></td>
+<td>Multiple imputation pooling</td></tr>
+<tr><td style="width: 25%;"><a href="pool.compare.html">pool.compare</a></td>
+<td>Compare two nested models fitted to imputed data</td></tr>
+<tr><td style="width: 25%;"><a href="pool.r.squared.html">pool.r.squared</a></td>
+<td>Pooling: R squared</td></tr>
+<tr><td style="width: 25%;"><a href="pool.scalar.html">pool.scalar</a></td>
+<td>Multiple imputation pooling: univariate version</td></tr>
+<tr><td style="width: 25%;"><a href="popmis.html">popmis</a></td>
+<td>Hox pupil popularity data with missing popularity scores</td></tr>
+<tr><td style="width: 25%;"><a href="pops.html">pops</a></td>
+<td>Project on preterm and small for gestational age infants (POPS)</td></tr>
+<tr><td style="width: 25%;"><a href="pops.html">pops.pred</a></td>
+<td>Project on preterm and small for gestational age infants (POPS)</td></tr>
+<tr><td style="width: 25%;"><a href="potthoffroy.html">potthoffroy</a></td>
+<td>Potthoff-Roy data</td></tr>
+<tr><td style="width: 25%;"><a href="print.mads.html">print.mads</a></td>
+<td>Print a 'mads' object</td></tr>
+<tr><td style="width: 25%;"><a href="print.html">print.mids</a></td>
+<td>Print a 'mids' object</td></tr>
+<tr><td style="width: 25%;"><a href="print.html">print.mipo</a></td>
+<td>Print a 'mids' object</td></tr>
+<tr><td style="width: 25%;"><a href="print.html">print.mira</a></td>
+<td>Print a 'mids' object</td></tr>
+</table>
+
+<h2><a name="Q">-- Q --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="mice.impute.quadratic.html">quadratic</a></td>
+<td>Imputation of quadratric terms</td></tr>
+<tr><td style="width: 25%;"><a href="quickpred.html">quickpred</a></td>
+<td>Quick selection of predictors from the data</td></tr>
+</table>
+
+<h2><a name="R">-- R --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="rbind.mids.html">rbind.mids</a></td>
+<td>Rowwise combination of a 'mids' object.</td></tr>
+<tr><td style="width: 25%;"><a href="mice.impute.ri.html">ri</a></td>
+<td>Imputation by the random indicator method for nonignorable data</td></tr>
+</table>
+
+<h2><a name="S">-- S --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="selfreport.html">selfreport</a></td>
+<td>Self-reported and measured BMI</td></tr>
+<tr><td style="width: 25%;"><a href="mammalsleep.html">sleep</a></td>
+<td>Mammal sleep data</td></tr>
+<tr><td style="width: 25%;"><a href="squeeze.html">squeeze</a></td>
+<td>Squeeze the imputed values to be within specified boundaries.</td></tr>
+<tr><td style="width: 25%;"><a href="stripplot.mids.html">stripplot</a></td>
+<td>Stripplot of observed and imputed data</td></tr>
+<tr><td style="width: 25%;"><a href="stripplot.mids.html">stripplot.mids</a></td>
+<td>Stripplot of observed and imputed data</td></tr>
+<tr><td style="width: 25%;"><a href="summary.html">summary.mads</a></td>
+<td>Summary of a 'mira' object</td></tr>
+<tr><td style="width: 25%;"><a href="summary.html">summary.mids</a></td>
+<td>Summary of a 'mira' object</td></tr>
+<tr><td style="width: 25%;"><a href="summary.html">summary.mipo</a></td>
+<td>Summary of a 'mira' object</td></tr>
+<tr><td style="width: 25%;"><a href="summary.html">summary.mira</a></td>
+<td>Summary of a 'mira' object</td></tr>
+<tr><td style="width: 25%;"><a href="supports.transparent.html">supports.transparent</a></td>
+<td>Supports semi-transparent foreground colors?</td></tr>
+</table>
+
+<h2><a name="T">-- T --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="tbc.html">tbc</a></td>
+<td>Terneuzen birth cohort</td></tr>
+<tr><td style="width: 25%;"><a href="tbc.html">tbc.target</a></td>
+<td>Terneuzen birth cohort</td></tr>
+<tr><td style="width: 25%;"><a href="tbc.html">terneuzen</a></td>
+<td>Terneuzen birth cohort</td></tr>
+<tr><td style="width: 25%;"><a href="supports.transparent.html">transparent</a></td>
+<td>Supports semi-transparent foreground colors?</td></tr>
+</table>
+
+<h2><a name="V">-- V --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="version.html">version</a></td>
+<td>Echoes the package version number</td></tr>
+</table>
+
+<h2><a name="W">-- W --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="walking.html">walking</a></td>
+<td>Walking disability data</td></tr>
+<tr><td style="width: 25%;"><a href="windspeed.html">windspeed</a></td>
+<td>Subset of Irish wind speed data</td></tr>
+<tr><td style="width: 25%;"><a href="with.mids.html">with.mids</a></td>
+<td>Evaluate an expression in multiple imputed datasets</td></tr>
+</table>
+
+<h2><a name="X">-- X --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="xyplot.mids.html">xyplot</a></td>
+<td>Scatterplot of observed and imputed data</td></tr>
+<tr><td style="width: 25%;"><a href="xyplot.mads.html">xyplot.mads</a></td>
+<td>Scatterplot of amputed and non-amputed data against weighted sum scores</td></tr>
+<tr><td style="width: 25%;"><a href="xyplot.mids.html">xyplot.mids</a></td>
+<td>Scatterplot of observed and imputed data</td></tr>
+</table>
+
+<h2><a name="misc">-- misc --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="norm.draw.html">.norm.draw</a></td>
+<td>Draws values of beta and sigma by Bayesian linear regression</td></tr>
+<tr><td style="width: 25%;"><a href="pmm.match.html">.pmm.match</a></td>
+<td>Finds an imputed value from matches in the predictive metric</td></tr>
+<tr><td style="width: 25%;"><a href="mice.impute.2l.norm.html">2l.norm</a></td>
+<td>Imputation by a two-level normal model</td></tr>
+<tr><td style="width: 25%;"><a href="mice.impute.2l.pan.html">2l.pan</a></td>
+<td>Imputation by a two-level normal model using 'pan'</td></tr>
+<tr><td style="width: 25%;"><a href="mice.impute.2lonly.mean.html">2lonly.mean</a></td>
+<td>Imputation of the mean within the class</td></tr>
+<tr><td style="width: 25%;"><a href="mice.impute.2lonly.norm.html">2lonly.norm</a></td>
+<td>Imputation at level 2 by Bayesian linear regression</td></tr>
+<tr><td style="width: 25%;"><a href="mice.impute.2lonly.pmm.html">2lonly.pmm</a></td>
+<td>Imputation at level 2 by predictive mean matching</td></tr>
+</table>
+</body></html>

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/html/00Index.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/doc/fimd9.r
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/doc/fimd9.r	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/doc/fimd9.r	(revision 2477)
@@ -0,0 +1,474 @@
+### fimd9.R
+### R code from Van Buuren, S. (2012). 
+###		Flexible Imputation of Missing Data. 
+###		CRC/Chapman & Hall, Boca Raton, FL.
+### (c) 2012 Stef van Buuren, www.multiple-imputation.com
+### Version 1, 21mar2012
+### Version 2, 4nov2015 tested with mice 2.23
+### Tested with Mac OS X 10.7.3, R2.14-2, mice 2.12
+
+if (packageVersion("mice")<'2.12') stop("This code requires mice 2.12.")
+
+### Section 9.2 SE Fireworks Disaster Study
+
+### Section 9.2.1 Intention to treat
+
+library("mice")
+library("lattice")
+
+### Table 9.1
+
+yvars <- c("yc1","yc2","yc3", "yp1","yp2","yp3")
+x <- cbind(fdd[,c("id","trt","pp",yvars)])
+x
+
+md.pattern(fdd[fdd$pp=="Y",yvars])
+md.pattern(fdd[fdd$pp=="N",yvars])
+
+
+### Section 9.2.2 Imputation model
+
+pred <- fdd.pred 
+vars <-c("ypa1", "ypb1", "ypc1",
+         "ypa2", "ypb2", "ypc2",
+         "ypa3", "ypb3", "ypc3")
+pred[vars[1:3],vars]
+
+dry <- mice(fdd, maxit=0)
+method <- dry$method
+method["yc1"] <- "~I(yca1 + ycb1 + ycc1)"
+method["yc2"] <- "~I(yca2 + ycb2 + ycc2)"
+method["yc3"] <- "~I(yca3 + ycb3 + ycc3)"
+method["yp1"] <- "~I(ypa1 + ypb1 + ypc1)"
+method["yp2"] <- "~I(ypa2 + ypb2 + ypc2)"
+method["yp3"] <- "~I(ypa3 + ypb3 + ypc3)"
+imp <- mice(fdd,pred=pred,meth=method,maxit=20,seed=54434)
+
+
+### Section 9.2.3 Inspecting imputations
+
+lowi <- complete(imp, "long", inc=TRUE)
+lowi <- data.frame(lowi,cbcl2=NA, cbin2=NA,cbex2=NA)
+lolo <- reshape(lowi, idvar = 'id',
+                varying = 11:ncol(lowi),
+                direction = "long",
+                new.row.names = 1:(nrow(lowi)*3),
+                sep="")
+lolo <- lolo[order(lolo$.imp, lolo$id, lolo$time),]
+row.names(lolo) <- 1:nrow(lolo)
+
+
+### Figure 9.1
+
+iv <- is.na(lolo[lolo$.imp==0,]$yp)
+ivn <- ifelse(iv,1,0)
+col12  <- c("grey80","grey80",
+            mdc(2),mdc(1),
+            mdc(2),"transparent",
+            mdc(2),"transparent",
+            mdc(2),"transparent",
+            mdc(2),"transparent")
+ic <- unique(lolo$id[iv])
+ss <- lolo$id %in% ic
+grp <- 2*as.integer(lolo$.imp) - ivn
+loloss <- data.frame(lolo, grp=grp)
+trellis.par.set(strip.background=list(col="grey95"))
+tp1 <- xyplot(yp~time|factor(id), data=loloss, type="l",
+      groups=factor(.imp), col="grey80", subset=ss,
+       ylab="UCLA-RI Parent Score", pch=19, cex=1,
+       xlab="Time", xlim=c("T1","T2","T3"),
+             as.table=TRUE)
+tp2 <- xyplot(yp~time|factor(id), data=loloss, type="p",
+       groups=grp, col=col12, subset=ss,
+       ylab="UCLA-RI Parent Score",        
+       pch=19,
+       cex=0.8,
+       xlab="Time", xlim=c("T1","T2","T3"),
+       as.table=TRUE)
+print(tp1)
+print(tp2, newpage=FALSE)
+
+
+### Figure 9.2
+
+means <- aggregate(lolo$yp, list(lolo$.imp!=0,lolo$trt,lolo$time), mean, na.rm=TRUE)
+names(means) <- c(".imp","trt","time","yp")
+levels(means$trt) <- c("EMDR","CBT")
+tp <- xyplot(yp~time|trt, data=means, type="o", pch=19,
+      groups=factor(.imp), col=c(mdc(4), mdc(6)),
+       ylab="UCLA-RI Parent Score", lwd=2,
+       xlab="Time", xlim=c("T1","T2","T3"))
+print(tp)
+
+
+### Figure 9.3
+
+means <- aggregate(lolo$yc, list(lolo$.imp!=0,lolo$trt,lolo$time), mean, na.rm=TRUE)
+names(means) <- c(".imp","trt","time","yc")
+levels(means$trt) <- c("EMDR","CBT")
+tp <- xyplot(yc~time|trt, data=means, type="o", pch=19,
+      groups=factor(.imp), col=c(mdc(4),mdc(6)),
+       ylab="UCLA-RI Child Score", lwd=2,
+       xlab="Time", xlim=c("T1","T2","T3"))
+print(tp)
+
+
+### Section 9.3 Time raster imputation
+
+library("mice")
+library("splines")
+library("lme4")
+
+data <- tbc
+md.pattern(data)
+
+### remove those with nocc 1 or 2 or 3
+data <- data[data$nocc>=3,]
+
+### Section 9.3.3 Broken stick model
+
+### specify break ages
+brk <- c(0, 8/365, 1/3, 1, 2, 6, 10, 18, 29)
+k <- length(brk)
+                  
+### calculate B-spline
+X <- bs(data$age,
+        knots = brk,
+        B = c(brk[1],brk[k]+0.0001),
+        degree = 1)
+X <- X[,-(k+1)]
+dimnames(X)[[2]] <- paste("x",1:ncol(X),sep="")
+data <- cbind(data,X)
+round(head(X,3),2)
+
+### fit broken stick model
+fit <- lmer(wgt.z~0+x1+x2+x3+x4+x5+x6+x7+x8+x9+
+                 (0+x1+x2+x3+x4+x5+x6+x7+x8+x9|id),
+                 data=data)
+
+### calculate size and increment per person
+tsiz <- t(ranef(fit)$id) + fixef(fit)
+tinc <- diff(tsiz)
+
+### inspect size and increment estimates
+round(head(t(tsiz)),2)
+round(head(t(tinc)),2)
+
+### broken stick for hgt and BMI
+fit.wgt <- fit
+fit.hgt <- lmer(hgt.z~0+x1+x2+x3+x4+x5+x6+x7+x8+x9+
+                 (0+x1+x2+x3+x4+x5+x6+x7+x8+x9|id),
+                 data=data)
+fit.bmi <- lmer(bmi.z~0+x1+x2+x3+x4+x5+x6+x7+x8+x9+
+                 (0+x1+x2+x3+x4+x5+x6+x7+x8+x9|id),
+                 data=data)
+
+
+### define time warp
+
+warp.setup <- data.frame(age = brk, age2 = seq(0, 29, length.out=k))
+warp.model <- lm(age2 ~ bs(age, knots=brk[c(-1,-k)], degree=1) - 1, 
+                 data=warp.setup, x=T, y=T)
+warped.knots <- warp.model$y
+maxage <- max(warped.knots)
+age2  <- predict(warp.model,newdata=data)
+data  <- cbind(data, age2=age2)
+rm(age2)
+
+### Figure: time warping function (not in book)
+
+par(fin=c(3,3),omi=c(0,0,0,0),mai=c(1,1,1,1),mfrow=c(1,1),lwd=0.5)
+eqscplot(x=brk, y=warp.model$y, 
+         ylab="Warped age",
+         xlab="Age (years)",
+         axes=F,type="o",lwd=1,pch=16)
+axis(1, at=seq(0,32,4), cex=0.5, pos=c(-0.5,0))
+axis(2, at=warp.setup$age2,
+     labels=c("0y","8d","4m","1y","2y","6y","10y","18y","29y"),
+     line=0.5,cex=0.5)
+lines(x=c(0,29), y=c(0,29), lwd=1)
+
+
+# Prepare for figure 9.5 (weight, height and BMI profiles for six cases)
+ 
+wsiz.bs <- extractBS(fit.wgt)
+hsiz.bs <- extractBS(fit.hgt)
+bsiz.bs <- extractBS(fit.bmi)
+id <- unique(fit.wgt@flist$id)
+
+data2 <- appendbreak(data, brk, id=id, warp.model=warp.model, typ="pred")
+data2[data2$typ=="pred",c("wgt.z","hgt.z","bmi.z")] <- round(cbind(wsiz.bs, hsiz.bs, bsiz.bs),3)
+
+six <- c(1259,7019,2447,7460,8046,7646)
+set.seed(23221)
+sample <- unique(c(six,sample(unique(tbc$id),300)))
+
+idx <- data2$id %in% six
+pd  <- data2[idx,]
+pd$id <- as.factor(pd$id)
+pd <- cbind(pd,rowname=row.names(pd))
+pdr <- reshape(pd, 
+               varying = c("wgt.z","hgt.z","bmi.z"),
+               idvar = "rowname",
+               direction="long",
+               v.names="y")
+pdr$grp <- pdr$time
+pdr$grp[pdr$typ=="pred"] <- pdr$grp[pdr$typ=="pred"] + 3
+
+
+### Figure 9.5 Only weight
+
+tbcstick <- xyplot(y~age2|id, data=pdr, xlim=c(-1,maxage+1), ylim=c(-4,4),
+       as.table = TRUE, 
+       scales = list(x=list(at=warped.knots, 
+              labels=c("0","8d","4m","1y","2y","6y","10y","18y","29y"))),
+                   xlab = "Age", ylab = "Weight SDS",
+                   layout = c(2,3),
+                   subset = (grp==1 | grp==4),
+                   groups = grp,
+                   pch=19,
+                   type=c(rep("p",3),rep("l",3)), 
+                   distribute.type = TRUE, 
+                   lwd=2,
+                   col=c(rep(mdc(1),3),rep(mdc(5),3)),
+                   panel = function(...) {
+         panel.abline(v=warped.knots, lty=2, col="grey80")
+         panel.abline(h=c(-2,0,2), lty=1, col="grey80")
+         panel.xyplot(...)
+       },
+       strip = strip.custom(bg="grey95"))
+print(tbcstick)
+
+### Same plot, but then with height and BMI added (not in book)
+
+tbcstick <- xyplot(y~age2|id, data=pdr, xlim=c(-1,maxage+1), ylim=c(-4,4),
+       as.table = TRUE, 
+       scales = list(x=list(at=warped.knots, 
+              labels=c("0","8d","4m","1y","2y","6y","10y","18y","29y"))),
+       xlab = "Age", ylab = "Standard Deviation Score (SDS)",
+       layout = c(2,3),
+       groups = grp,
+       pch=20,
+       type=c(rep("p",3),rep("l",3)), distribute.type = TRUE, 
+       lwd=1.5,
+       col=c(mdc(1), hcl(80,100,40,0.7),hcl(160,100,40,0.7)),
+       panel = function(...) {
+         panel.abline(v=warped.knots, lty=2, col="grey80")
+         panel.abline(h=c(-2,0,2), lty=1, col="grey80")
+         panel.xyplot(...)
+       },
+       strip = strip.custom(bg="grey95"),
+       key = list(
+         text   = list(c("Weight","Height","BMI"), cex=0.8),
+         lines  = list(lty=1, lwd=2, type="l"), 
+         col  = c(mdc(1), hcl(80,100,40,0.7),hcl(160,100,40,0.7)),
+         columns = 3,
+         space  = "bottom",
+         border = FALSE)
+       )
+print(tbcstick)
+
+### Section 9.3.6 Imputation
+
+### append break ages before imputation
+id <- unique(data$id)
+data2 <- appendbreak(data, brk, id=id, warp.model=warp.model, typ="sup")
+table(data2$typ)
+
+options(digits=2)
+head(data2)
+
+### specify imputation methods
+Y <- c("hgt.z","wgt.z","bmi.z")
+imp <- mice(data2, maxit=0)
+meth <- imp$method
+meth[1:length(meth)] <- ""
+meth[Y] <- "2l.norm"
+
+## Note: The following statements are outdated
+##       and replaced by the intercept=FALSE option
+##       in the call to mice()
+## mice.impute.2l.norm.noint <- mice.impute.2l.norm
+## meth[Y] <- "2l.norm.noint"
+
+### specify predictor matrix
+pred <- imp$pred
+pred[1:nrow(pred),1:ncol(pred)] <- 0
+pred[Y,"id"] <- (-2) # class variable
+pred[Y,"sex"] <- 1 # fixed effect
+pred[Y, paste("x",1:9,sep="")] <- 2
+pred[Y[1],Y[2]] <- 2  # mutual random effect
+pred[Y[2],Y[1]] <- 2  # mutual random effect
+pred[Y[3],Y[1:2]] <- 2  # random effect
+
+
+### specify visit sequence
+vis <- 1:3
+names(vis) <- c("hgt.z","wgt.z","bmi.z")
+
+### ready to go - TIME CONSUMING (30 MINUTES)
+imp.1 <- mice(data2, intercept = FALSE, meth=meth, pred=pred, m=5, maxit=10, seed=52711)
+imp.2 <- mice(data2, intercept = FALSE, meth=meth, pred=pred, m=5, maxit=10, seed=88348)
+imp.1745 <- ibind(imp.1, imp.2)  ## create m=10 imputations
+
+
+### Figure 9.6 diagnostic plot
+### Note: The solution is different from that in the book
+###       The sample size in the book is much larger (n=2604 instead of n=306)
+###       The larger sample regularizes many of the imputed sticks
+###       The plot for non-typical subject 7646 reveals that
+###       with n=306, fit to the data is low for this subject
+
+cd <- complete(imp.1745,"long")
+sup <- cd[cd$typ=="sup",]
+data3 <- data.frame(.imp=0, data2)
+data3 <- rbind(data3, sup[,-2])
+idx <- data3$id %in% six
+pd  <- data3[idx,]
+pd$id <- as.factor(pd$id)
+pd$grp <- pd$.imp
+pd$grp[pd$grp==0] <- NA
+pd$grp[pd$typ=="obs"] <- 11
+pd$grp <- reorder(pd$grp, as.numeric(pd$grp))
+tbcimp <- xyplot(wgt.z~age2|id, data=pd, xlim=c(-1,maxage+1), ylim=c(-4,4),
+       as.table = TRUE, 
+       scales = list(x=list(at=warped.knots, 
+              labels=c("0","8d","4m","1y","2y","6y","10y","18y","29y"))),
+       xlab = "Age", ylab = "Weight SDS",
+       groups=grp, layout = c(2,3),
+       pch=c(rep(20,10), 19),
+       type=c(rep("l",10),"p"), lwd=c(rep(1,10),1),
+       col=c(rep(mdc(5),10),mdc(1)), distribute.type=TRUE,
+       panel = function(...) {
+         panel.abline(v=warped.knots, lty=2, col="grey80")
+         panel.abline(h=c(-2,0,2), lty=1, col="grey80")
+         panel.xyplot(...)
+       },
+       strip=strip.custom(bg="grey95")
+       )
+print(tbcimp)
+
+
+### Figure 9.7
+
+cd <- complete(imp.1745,1)
+idx <- (cd$id) %in% sample
+cd <- cd[idx,]
+shingle <- cut(cd$age,breaks=c(brk,29.01),right=FALSE, inc=TRUE,
+               labels=c("0d-8d","8d-4m","4m-1y","1y-2y","2y-6y",
+                 "6y-10y","10y-18y","18y-29y","29y"))
+tbchw <- xyplot(wgt.z~hgt.z|shingle,data=cd, 
+       xlim=c(-4,4), ylim=c(-4,4), type=c("p","g"),
+       group=(typ=="sup"),pch=c(1,20),
+       col=c(mdc(1:2)),
+       xlab="Height SDS", ylab="Weight SDS",pty="s",
+       strip=strip.custom(bg="grey95"))
+print(tbchw)
+
+### Section 9.3.7 Complete data analysis
+
+### post-processing of imputed data
+
+imp <- imp.1745
+cd <- complete(imp,"long")
+sup <- cd[cd$typ=="sup",]
+
+sup$age <- round(sup$age,2)
+sup$hgt.z <- round(sup$hgt.z,2)
+sup$wgt.z <- round(sup$wgt.z,2)
+sup$bmi.z <- round(sup$bmi.z,2)
+
+lowi <- reshape(sup, idvar=c('id','.imp'), timevar = 'age', 
+                v.names=c('hgt.z','wgt.z','bmi.z'), 
+                direction="wide",
+                drop=c(".id","occ","first","typ","hgt","wgt","bmi",
+                  paste("x",1:9,sep=""),"age2"))
+hsiz <- lowi[,c(".imp","id","nocc","sex",
+                "hgt.z.0","hgt.z.0.02","hgt.z.0.33",
+                "hgt.z.1","hgt.z.2","hgt.z.6","hgt.z.10","hgt.z.18",
+                "hgt.z.29")]
+wsiz <- lowi[,c(".imp","id","nocc","sex",
+                "wgt.z.0","wgt.z.0.02","wgt.z.0.33",
+                "wgt.z.1","wgt.z.2","wgt.z.6","wgt.z.10","wgt.z.18",
+                "wgt.z.29")]
+bsiz <- lowi[,c(".imp","id","nocc","sex",
+                "bmi.z.0","bmi.z.0.02","bmi.z.0.33",
+                "bmi.z.1","bmi.z.2","bmi.z.6","bmi.z.10","bmi.z.18",
+                "bmi.z.29")]
+# merge outcome data
+bsiz <- merge(bsiz, tbc.target,all.x=TRUE)
+
+
+hinc <- cbind(hsiz[,1:4],t(diff(t(hsiz[,-1:-4]))))
+winc <- cbind(wsiz[,1:4],t(diff(t(wsiz[,-1:-4]))))
+binc <- cbind(bsiz[,1:4],t(diff(t(bsiz[,-1:-4]))))
+
+# merge outcome data
+binc <- merge(binc, tbc.target,all.x=TRUE)
+
+bmi.z.0.02 <- by(binc, binc$.imp, function(x) lm(bmi.z.0.02~ao, data = x, na.action='na.omit'))
+bmi.z.0.33 <- by(binc, binc$.imp, function(x) lm(bmi.z.0.33~ao, data = x, na.action='na.omit'))
+bmi.z.1    <- by(binc, binc$.imp, function(x) lm(bmi.z.1   ~ao, data = x, na.action='na.omit'))
+bmi.z.2    <- by(binc, binc$.imp, function(x) lm(bmi.z.2   ~ao, data = x, na.action='na.omit'))
+bmi.z.6    <- by(binc, binc$.imp, function(x) lm(bmi.z.6   ~ao, data = x, na.action='na.omit'))
+bmi.z.10   <- by(binc, binc$.imp, function(x) lm(bmi.z.10  ~ao, data = x, na.action='na.omit'))
+bmi.z.18   <- by(binc, binc$.imp, function(x) lm(bmi.z.18  ~ao, data = x, na.action='na.omit'))
+bmi.z.29   <- by(binc, binc$.imp, function(x) lm(bmi.z.29  ~ao, data = x, na.action='na.omit'))
+
+tab.bmi.z.0.02 <- summary(pool(as.mira(bmi.z.0.02)))
+tab.bmi.z.0.33 <- summary(pool(as.mira(bmi.z.0.33)))
+tab.bmi.z.1    <- summary(pool(as.mira(bmi.z.1)))
+tab.bmi.z.2    <- summary(pool(as.mira(bmi.z.2)))
+tab.bmi.z.6    <- summary(pool(as.mira(bmi.z.6)))
+tab.bmi.z.10   <- summary(pool(as.mira(bmi.z.10)))
+tab.bmi.z.18   <- summary(pool(as.mira(bmi.z.18)))
+tab.bmi.z.29   <- summary(pool(as.mira(bmi.z.29)))
+
+(bmi.z.0.33 <- summary(pool(as.mira(by(bsiz, bsiz$.imp, function(x) lm(bmi.z.jv~bmi.z.0.33+bmi.z.0.02, data = x, na.action='na.omit'))))))
+(bmi.z.1 <- summary(pool(as.mira(by(bsiz, bsiz$.imp, function(x) lm(bmi.z.jv~bmi.z.1+bmi.z.0.33, data = x, na.action='na.omit'))))))
+(bmi.z.2 <- summary(pool(as.mira(by(bsiz, bsiz$.imp, function(x) lm(bmi.z.jv~bmi.z.2+bmi.z.1, data = x, na.action='na.omit'))))))
+(bmi.z.6 <- summary(pool(as.mira(by(bsiz, bsiz$.imp, function(x) lm(bmi.z.jv~bmi.z.6+bmi.z.2, data = x, na.action='na.omit'))))))
+(bmi.z.10 <- summary(pool(as.mira(by(bsiz, bsiz$.imp, function(x) lm(bmi.z.jv~bmi.z.10+bmi.z.6, data = x, na.action='na.omit'))))))
+(bmi.z.18 <- summary(pool(as.mira(by(bsiz, bsiz$.imp, function(x) lm(bmi.z.jv~bmi.z.18+bmi.z.10, data = x, na.action='na.omit'))))))
+
+(bmi.z.6 <- summary(pool(as.mira(by(bsiz, bsiz$.imp, function(x) lm(bmi.z.jv~bmi.z.6+bmi.z.2, data = x, na.action='na.omit'))))))
+summary(by(bsiz, bsiz$.imp, function(x) lm(bmi.z.jv~bmi.z.6+bmi.z.2, data = x, na.action='na.omit'))[[2]])
+
+
+# repeat the analysis for the broken stick estimates
+
+bsiz.bs <- as.data.frame(t(t(ranef(fit.bmi)[[1]]) + fixef(fit.bmi)))
+dimnames(bsiz.bs)[[2]] <- names(bsiz)[5:13]
+binc.bs <- t(diff(t(bsiz.bs)))
+bsiz.bs <- data.frame(id=bsiz[bsiz$.imp==1,"id"], bsiz.bs)
+binc.bs <- data.frame(id=bsiz[bsiz$.imp==1,"id"], binc.bs)
+bsiz.bs <- merge(bsiz.bs, tbc.target)
+binc.bs <- merge(binc.bs, tbc.target)
+
+bmi.z.0.02.bs <- lm(bmi.z.0.02~ao, data = binc.bs, na.action='na.omit')
+bmi.z.0.33.bs <- lm(bmi.z.0.33~ao, data = binc.bs, na.action='na.omit')
+bmi.z.1.bs    <- lm(bmi.z.1   ~ao, data = binc.bs, na.action='na.omit')
+bmi.z.2.bs    <- lm(bmi.z.2   ~ao, data = binc.bs, na.action='na.omit')
+bmi.z.6.bs    <- lm(bmi.z.6   ~ao, data = binc.bs, na.action='na.omit')
+bmi.z.10.bs   <- lm(bmi.z.10  ~ao, data = binc.bs, na.action='na.omit')
+bmi.z.18.bs   <- lm(bmi.z.18  ~ao, data = binc.bs, na.action='na.omit')
+
+summary(bmi.z.0.02.bs)
+summary(bmi.z.0.33.bs)
+summary(bmi.z.1.bs)
+summary(bmi.z.2.bs)
+summary(bmi.z.6.bs)
+summary(bmi.z.10.bs)
+summary(bmi.z.18.bs)
+
+### Materials for Table 9.3
+
+a<-round(cor(bsiz[,-(1:4)],use="pair"),2)
+b<-round(cor(bsiz.bs,use="pair"),2)
+
+
+a2<-round(cor(bsiz[!is.na(bsiz$ao),-(1:4)],use="complete.obs"),2)
+b2<-round(cor(bsiz.bs[!is.na(bsiz$ao),],use="complete.obs"),2)
+
+
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/doc/JSScode.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/doc/JSScode.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/doc/JSScode.R	(revision 2477)
@@ -0,0 +1,814 @@
+## This file contains the R code used in  
+
+## Van Buuren, S., Groothuis-Oudshoorn, K. (2011) 
+## mice: Multivariate Imputation by Chained Equations in R. 
+## Journal of Statistical Software.
+
+## Compiles with R 2.13.0
+## Assumes that subdirectory "figures" is part of working directory 
+## Requires R packages: mice (>2.9), VIM, mitools, Zelig (+dependencies)
+
+## SvB 31AUG2011
+### Version 2, 4nov2015 tested with mice 2.23
+
+
+###################################################
+### chunk number 1: init1
+###################################################
+options(prompt = "R> ", continue = "+  ", width = 70, useFancyQuotes = FALSE)
+if (as.numeric(packageDescription("mice")$Version)<2.9) warning("mice 2.9 or higher needed")
+
+###
+###   2.4 Simple example
+###
+ 
+###################################################
+### chunk number 4: example1
+###################################################
+library("mice")
+library("lattice")
+
+
+###################################################
+### chunk number 5: example2 eval=FALSE
+###################################################
+nhanes
+
+
+###################################################
+### chunk number 6: example3
+###################################################
+md.pattern(nhanes)
+
+
+###################################################
+### chunk number 7: example4
+###################################################
+p <- md.pairs(nhanes)
+p
+
+
+###################################################
+### chunk number 9: marginplot
+###################################################
+library("VIM")
+marginplot(nhanes[,c("chl","bmi")], col=mdc(1:2), cex=1.2, cex.lab=1.2, cex.numbers=1.3, pch=19)
+
+
+###################################################
+### chunk number 10: example1
+###################################################
+imp <- mice(nhanes, seed=23109)
+
+
+###################################################
+### chunk number 11: example2
+###################################################
+print(imp)
+
+
+###################################################
+### chunk number 12: example3
+###################################################
+imp$imp$bmi
+
+
+###################################################
+### chunk number 13: example4 eval=FALSE
+###################################################
+complete(imp)
+
+
+###################################################
+### chunk number 14: stripplotcmd eval=FALSE
+###################################################
+stripplot(imp, pch=20, cex=1.2)
+
+
+###################################################
+### chunk number 16: xyplotcmd eval=FALSE
+###################################################
+xyplot(imp, bmi~chl|.imp, pch=20, cex=1.4)
+
+
+###################################################
+### chunk number 18: example6
+###################################################
+fit <- with(imp, lm(chl~age+bmi))
+
+
+###################################################
+### chunk number 19: example7
+###################################################
+print(pool(fit))
+
+
+###################################################
+### chunk number 20: example8
+###################################################
+round(summary(pool(fit)),2)
+
+
+###################################################
+### chunk number 21: example9
+###################################################
+imp50 <- mice(nhanes, m=50, seed=23109)
+fit <- with(imp50, lm(chl~age+bmi))
+
+
+###################################################
+### chunk number 22: example10
+###################################################
+round(summary(pool(fit)),2)
+
+###
+###  3.2 Univariate imputation methods
+###
+
+###################################################
+### chunk number 23: models1 eval=FALSE
+###################################################
+imp <- mice(nhanes, method = "norm")
+
+
+###################################################
+### chunk number 24: models2 eval=FALSE
+###################################################
+imp <- mice(nhanes, meth = c("", "norm", "pmm", "mean"))
+
+
+###################################################
+### chunk number 25: models3
+###################################################
+str(nhanes2)
+
+
+###################################################
+### chunk number 26: models4 eval=FALSE
+###################################################
+imp <- mice(nhanes2, me=c("polyreg","pmm","logreg","norm"))
+
+
+###################################################
+### chunk number 27: models5 eval=FALSE
+###################################################
+imp <- mice(nhanes2, meth=c("","","logreg","norm"))
+
+
+###################################################
+### chunk number 28: models6 eval=FALSE
+###################################################
+mice(nhanes2, defaultMethod = c("norm","logreg","polyreg","polr"))
+
+###
+###   3.3 Predictor selection
+###
+
+###################################################
+### chunk number 29: predictor1
+###################################################
+imp <- mice(nhanes, print=FALSE)
+imp$predictorMatrix
+
+
+### removing a predictor
+###################################################
+### chunk number 30: predictor2
+###################################################
+pred <- imp$predictorMatrix
+pred[,"bmi"] <- 0
+pred
+
+
+###################################################
+### chunk number 31: predictor3
+###################################################
+imp <- mice(nhanes, pred=pred, pri=FALSE)
+
+
+### skipping imputation
+###################################################
+### chunk number 32: predictor4
+###################################################
+ini <- mice(nhanes2, maxit=0, pri=FALSE)
+pred <- ini$pred
+pred[,"bmi"] <- 0
+meth <- ini$meth
+meth["bmi"] <- ""
+imp <- mice(nhanes2, meth=meth, pred=pred, pri=FALSE)
+imp$imp$bmi
+
+
+### intercept imputation
+###################################################
+### chunk number 33: predictor5
+###################################################
+pred <- ini$pred
+pred["bmi",] <- 0
+imp <- mice(nhanes2, pred=pred, pri=FALSE, seed=51162)
+imp$imp$bmi
+
+### multilevel imputation
+###################################################
+### chunk number 34: multilevel1
+###################################################
+popmis[1:3,]
+ini <- mice(popmis, maxit=0)
+pred <- ini$pred
+pred["popular",] <- c(0, -2, 0, 2, 1, 2, 0)
+imp <- mice(popmis, meth=c("","","2l.norm","","","",""), pred=pred, maxit=1, seed=71152)
+
+###
+###   quick predictor selection
+###
+
+###################################################
+### chunk number 35: quickpred1
+###################################################
+round(cor(nhanes, use="pair"),3)
+
+
+###################################################
+### chunk number 36: quickpred2
+###################################################
+round(cor(y=nhanes, x=!is.na(nhanes), use="pair"),3)
+
+
+###################################################
+### chunk number 37: quickpred3
+###################################################
+p <- md.pairs(nhanes)
+round(p$mr/(p$mr+p$mm), 3)
+
+
+###################################################
+### chunk number 38: quickpred4
+###################################################
+quickpred(nhanes)
+
+
+###################################################
+### chunk number 39: quickpred5 eval=FALSE
+###################################################
+imp <- mice(nhanes, pred=quickpred(nhanes, minpuc=0.25, include="age"))
+
+###
+###   3.4 Passive imputation
+###
+
+### Preserving a transformation
+###################################################
+### chunk number 40: transform1
+###################################################
+nhanes2.ext <- cbind(nhanes2, lchl=log(nhanes2$chl))
+ini <- mice(nhanes2.ext, max=0, print=FALSE)
+meth <- ini$meth
+meth["lchl"] <- "~log(chl)"
+pred <- ini$pred
+pred[c("hyp","chl"),"lchl"] <- 0
+pred["bmi","chl"] <- 0
+pred
+imp <- mice(nhanes2.ext, meth=meth, pred=pred, seed=38788, print=FALSE)
+head(complete(imp))
+
+
+### index of two variables
+###################################################
+### chunk number 41: transform2
+###################################################
+nhanes2.ext <- cbind(nhanes2, lchl=NA)
+
+
+###################################################
+### chunk number 42: index1
+###################################################
+md.pattern(boys[,c("hgt","wgt","bmi")])
+
+
+###################################################
+### chunk number 43: index2
+###################################################
+ini <- mice(boys,max=0,print=FALSE)
+meth <- ini$meth
+meth["bmi"] <- "~I(wgt/(hgt/100)^2)"
+pred <- ini$pred
+pred[c("wgt","hgt","hc","reg"),"bmi"] <- 0
+pred[c("gen","phb","tv"),c("hgt","wgt","hc")] <- 0
+pred
+
+
+###################################################
+### chunk number 44: index3
+###################################################
+imp.idx <- mice(boys, pred=pred, meth=meth, maxit=20, seed=09212, print=FALSE)
+head(complete(imp.idx)[is.na(boys$bmi),],3)
+
+
+###################################################
+### chunk number 45: index4
+###################################################
+meth["bmi"] <- "~round(wgt/(hgt/100)^2,dig=2)"
+
+
+### sum scores
+###################################################
+### chunk number 46: sumscore1
+###################################################
+ini <- mice(cbind(boys,mat=NA),max=0,print=FALSE)
+meth <- ini$meth
+meth["mat"] <- "~I(as.integer(gen) + as.integer(phb) +
+ + as.integer(cut(tv,breaks=c(0,3,6,10,15,20,25))))"
+meth["bmi"] <- "~I(wgt/(hgt/100)^2)"
+pred <- ini$pred
+pred[c("bmi","gen","phb","tv"),"mat"] <- 0
+pred[c("hgt","wgt","hc","reg"),"mat"] <- 1
+pred[c("hgt","wgt","hc","reg"),c("gen","phb","tv")] <- 0
+pred[c("wgt","hgt","hc","reg"),"bmi"] <- 0
+pred[c("gen","phb","tv"),c("hgt","wgt","hc")] <- 0
+pred
+
+
+###################################################
+### chunk number 47: sumscore2
+###################################################
+#line 705 "/Users/stefvanbuuren/Documents/Sync/Impute/JSS/ArtikelV5/mice.Rnw"
+imp.sum <- mice(cbind(boys,mat=NA), pred=pred, meth=meth, maxit=20, seed=10948, print=FALSE)
+
+
+###################################################
+### chunk number 48: sumscore3 eval=FALSE
+###################################################
+xyplot(imp.sum, mat~age|.imp, na=gen|phb|tv, subset=.imp==1,
+        ylab="Maturation score", xlab="Age (years)")
+
+
+### interactions continuous variables
+###################################################
+### chunk number 50: interaction1
+###################################################
+nhanes2.ext <- cbind(nhanes2, bmi.chl=NA)
+ini <- mice(nhanes2.ext, max=0, print=FALSE)
+meth <- ini$meth
+meth["bmi.chl"] <- "~I((bmi-25)*(chl-200))"
+pred <- ini$pred
+pred[c("bmi","chl"),"bmi.chl"] <- 0
+imp <- mice(nhanes2.ext, meth=meth, pred=pred, seed=51600, print=FALSE)
+
+
+###################################################
+### chunk number 51: interaction2
+###################################################
+head(ini$pad$data,3)
+
+
+### interaction categorical variables
+###################################################
+### chunk number 52: interaction3 eval=FALSE
+###################################################
+nhanes2.ext <- cbind(nhanes2,age.1.bmi=NA,age.2.bmi=NA)
+ini <- mice(nhanes2.ext, max=0, print=FALSE)
+meth <- ini$meth
+meth["age.1.bmi"] <- "~I(age.1*(bmi-25))"
+meth["age.2.bmi"] <- "~I(age.2*(bmi-25))"
+pred <- ini$pred
+pred[c("age","bmi"),c("age.1.bmi","age.2.bmi")] <- 0
+imp <- mice(nhanes2.ext, meth=meth, pred=pred, maxit=10)
+
+
+### squeeze
+###################################################
+### chunk number 53: squeeze1 eval=FALSE
+###################################################
+nhanes2.ext <- cbind(nhanes2, lchl=NA)
+ini <- mice(nhanes2.ext,max=0,pri=FALSE)
+meth <- ini$meth
+meth[c("lchl","chl")] <- c("~log(chl)","norm")
+pred <- ini$pred
+pred[c("hyp","chl"),"lchl"] <- 0
+pred["bmi","chl"] <- 0
+imp <- mice(nhanes2.ext, meth=meth, pred=pred, seed=1, maxit=100)
+
+
+###################################################
+### chunk number 54: squeeze2 eval=FALSE
+###################################################
+meth["lchl"] <- "~log(squeeze(chl, bounds=c(100,300)))"
+imp <- mice(nhanes2.ext, meth=meth, pred=pred, seed=1, maxit=100)
+
+
+### post-processing: prevent negative chl
+###################################################
+### chunk number 55: post1
+###################################################
+nhanes2.ext <- cbind(nhanes2, lchl=NA)
+ini <- mice(nhanes2.ext,max=0,print=FALSE)
+meth <- ini$meth
+meth[c("lchl","chl")] <- c("~log(chl)","norm")
+pred <- ini$pred
+pred[c("hyp","chl"),"lchl"] <- 0
+pred["bmi","chl"] <- 0
+post <- ini$post
+post["chl"] <- "imp[[j]][,i] <- squeeze(imp[[j]][,i],c(100,300))"
+imp <- mice(nhanes2.ext, meth=meth, pred=pred, post=post, 
+            seed=30031, maxit=10, print=FALSE)
+imp$imp$chl
+
+### post-processing: constrain maturation scores below age 5 yrs
+###################################################
+### chunk number 56: post2
+###################################################
+ini <- mice(cbind(boys,mat=NA),max=0,print=FALSE)
+meth <- ini$meth
+meth["mat"] <- "~I(as.integer(gen) + as.integer(phb) +
+ + as.integer(cut(tv,breaks=c(0,3,6,10,15,20,25))))"
+meth["bmi"] <- "~I(wgt/(hgt/100)^2)"
+pred <- ini$pred
+pred[c("bmi","gen","phb","tv"),"mat"] <- 0
+pred[c("hgt","wgt","hc","reg"),"mat"] <- 1
+pred[c("hgt","wgt","hc","reg"),c("gen","phb","tv")] <- 0
+pred[c("wgt","hgt","hc","reg"),"bmi"] <- 0
+pred[c("gen","phb","tv"),c("hgt","wgt","hc")] <- 0
+pred
+
+
+###################################################
+### chunk number 57: post3
+###################################################
+post <- ini$post
+post["gen"] <- "imp[[j]][p$data$age[!r[,j]]<5,i] <- levels(boys$gen)[1]"
+post["phb"] <- "imp[[j]][p$data$age[!r[,j]]<5,i] <- levels(boys$phb)[1]"
+post["tv"]  <- "imp[[j]][p$data$age[!r[,j]]<5,i] <- 1"
+imp <- mice(cbind(boys,mat=NA), pred=pred, meth=meth, post=post, maxit=10, print=FALSE)
+
+
+###################################################
+### chunk number 58: post4 eval=FALSE
+###################################################
+xyplot(imp,mat~age|.imp, na=gen|phb|tv, subset=.imp==1,ylab="Maturation score", xlab="Age (years)")
+
+
+###
+###   3.6 Visiting scheme
+###
+
+###################################################
+### chunk number 60: visit1
+###################################################
+nhanes2.ext <- cbind(nhanes2, bmi.chl=NA)
+ini <- mice(nhanes2.ext, max=0, print=FALSE)
+meth <- ini$meth
+meth["bmi.chl"] <- "~I((bmi-25)*(chl-200))"
+pred <- ini$pred
+pred[c("bmi","chl"),"bmi.chl"] <- 0
+imp <- mice(nhanes2.ext, meth=meth, pred=pred, seed=51600, print=FALSE)
+
+
+###################################################
+### chunk number 61: visit2
+###################################################
+imp$vis
+
+
+###################################################
+### chunk number 62: visit3 eval=FALSE
+###################################################
+vis<-imp$vis
+vis<-append(vis,vis[4],1)
+vis
+imp <- mice(nhanes2.ext, meth=meth, pred=pred, vis=vis)
+
+
+###################################################
+### chunk number 63: visit4 eval=FALSE
+###################################################
+imp <- mice(nhanes2.ext, meth=meth, pred=pred, vis=c(2,4,5,3))
+
+
+###################################################
+### chunk number 64: visit5 eval=FALSE
+###################################################
+imp <- mice(nhanes2.ext, meth=meth, pred=pred, vis="monotone")
+
+
+###
+###   4.1 Dry run
+###
+
+###################################################
+### chunk number 65: dryrun1
+###################################################
+ini <- mice(nhanes2, maxit=0)
+
+
+###################################################
+### chunk number 66: dryrun2
+###################################################
+import <- matrix(c(30,30,30,29,25,21,25,25,22,33,27,22,27,35,27,20,27,30), byrow=TRUE,nr=9)
+imp <- mice(nhanes, print=FALSE, seed=77172)
+imp$imp$bmi[,1:2] <- import
+imp$imp$bmi
+
+
+###
+###   4.2 Step by Step
+###
+
+###################################################
+### chunk number 67: step1
+###################################################
+imp <- mice(nhanes, maxit=4, seed=44612, print=FALSE)
+imp1 <- mice(nhanes, maxit=1, seed=44612, print=FALSE)
+a <- runif(10)
+imp2 <- mice.mids(imp1, maxit=3, print=FALSE)
+
+
+###################################################
+### chunk number 68: step2
+###################################################
+all(imp$imp$bmi==imp2$imp$bmi)
+
+
+###
+###   4.3 Assessing convergence
+###
+
+### first pathological example
+###################################################
+### chunk number 69: convergence1
+###################################################
+ini <- mice(boys,max=0,print=FALSE)
+meth <- ini$meth
+meth["bmi"] <- "~I(wgt/(hgt/100)^2)"
+meth["wgt"] <- "~I(bmi*(hgt/100)^2)"
+meth["hgt"] <- "~I(100*sqrt(wgt/bmi))"
+imp1 <- mice(boys, meth=meth, maxit=20, print=FALSE, seed=09212)
+
+
+###################################################
+### chunk number 70: convergence1plotcmd eval=FALSE
+###################################################
+plot(imp1, c("hgt","wgt","bmi"))
+
+
+### second pathological example
+###################################################
+### chunk number 72: convergence2
+###################################################
+ini <- mice(boys,max=0,print=FALSE)
+meth <- ini$meth
+meth["bmi"] <- "~I(wgt/(hgt/100)^2)"
+imp2 <- mice(boys, meth=meth, maxit=20, print=FALSE, seed=09212)
+
+
+###################################################
+### chunk number 73: convergence2plotcmd eval=FALSE
+###################################################
+plot(imp2, c("hgt","wgt","bmi"))
+
+
+# solution from section 3.3, sum scores - healthy convergenc
+###################################################
+### chunk number 75: convergence3plotcmd eval=FALSE
+###################################################
+plot(imp.idx, c("hgt","wgt","bmi"))
+
+
+
+###################################################
+### chunk number 77: convergence4plotcmd eval=FALSE
+###################################################
+plot(imp.idx, c("hc","gen","phb"), tick.number=3)
+
+
+### monitor Kendall's tau between gen and phb
+###################################################
+### chunk number 79: convergence5
+###################################################
+m <- 5
+T <- 20
+imp.kendall <- mice(boys, m=m, meth=imp.idx$meth, pred=imp.idx$pred, maxit=0, print=FALSE)
+tau <- matrix(NA,nrow=T,ncol=m)
+for (i in 1:T) {
+  if(i==1) set.seed(09212)
+  imp.kendall <- mice.mids(imp.kendall, maxit=1, print=FALSE)
+  x <- complete(imp.kendall,"repeated")[,paste("gen",1:m,sep=".")]
+  y <- complete(imp.kendall,"repeated")[,paste("phb",1:m,sep=".")]
+  xn <- as.data.frame(lapply(x,as.numeric))
+  yn <- as.data.frame(lapply(y,as.numeric))
+  tau[i,] <- diag(cor(xn,yn,method="kendall"))
+}
+
+
+###################################################
+### chunk number 80: convergence5plotcmd
+###################################################
+matplot(x=1:T,y=tau,xlab="Iteration",type="l")
+
+
+###################################################
+### chunk number 81: convergence5plot
+###################################################
+matplot(x=1:T,y=tau,xlab="Iteration",type="l")
+
+###
+###   4.5 Checking your imputations
+### 
+
+### density plot
+###################################################
+### chunk number 82: densityplotcmd eval=FALSE
+###################################################
+densityplot(imp.kendall, scales=list(x=list(relation="free")), layout=c(5,1))
+
+
+### conditional propensity score plot
+###################################################
+### chunk number 84: propensity
+###################################################
+hc.na <- is.na(boys$hc)
+fit.hc <- with(imp.kendall, glm(hc.na~age+wgt+hgt+reg,family=binomial))
+ps <- rep(rowMeans(sapply(fit.hc$analyses, fitted.values)),6)
+
+
+###################################################
+### chunk number 85: propensityplotcmd eval=FALSE
+###################################################
+xyplot(imp.kendall, hc~ps|.imp, pch=c(1,20), cex=c(0.8,1.2), 
+         xlab="Probability that head circumference is missing", 
+         ylab="Head circumference (cm)",scales=list(tick.number=3))
+
+
+### calculate model and residuals
+###################################################
+### chunk number 87: residuals1
+###################################################
+hc <- complete(imp.kendall,"long",TRUE)$hc
+fit <- lm(hc ~ poly(ps,4))
+
+
+###################################################
+### chunk number 88: residuals2 eval=FALSE
+###################################################
+densityplot(~ residuals(fit), group = hc.na, plot.points = FALSE, ref = TRUE, scales = list(y=list(draw=FALSE)), par.settings = simpleTheme(col.line = rep(mdc(1:2))), xlab = "Residuals of regression of hc on propensity score", lwd=2)
+
+
+###
+###   5.1 Repeated data analysis
+###
+
+###################################################
+### chunk number 90: repeated1
+###################################################
+imp <- mice(nhanes2, seed=99210, print=FALSE)
+fit <- with(imp, lm(chl~age+bmi))
+summary(pool(fit))
+
+
+###################################################
+### chunk number 91: repeated2
+###################################################
+expr <- expression(ov<-cut(bmi,c(10,25,50)),table(age,ov))
+fit <- with(imp, eval(expr))
+
+
+###################################################
+### chunk number 92: repeated3
+###################################################
+fit$an[c(2,5)]
+
+
+###################################################
+### chunk number 93: extract1
+###################################################
+com <- complete(imp, 3)
+
+
+###################################################
+### chunk number 94: extract2
+###################################################
+com <- complete(imp, "long")
+
+
+###################################################
+### chunk number 95: extract3
+###################################################
+com <- complete(imp, "long", include=TRUE)
+by(cbind(age=com$age,ov=cut(com$bmi,c(10,25,50))), com$.imp, table)
+
+
+###
+###   6.1 Adding your own imputation functions
+###
+
+###################################################
+### chunk number 96: pool1
+###################################################
+fit <- with(imp, lm(chl~age+bmi))
+est <- pool(fit)
+
+
+###################################################
+### chunk number 97: pool2
+###################################################
+methods(coef)
+methods(vcov)
+
+### Model testing - Wald method
+###################################################
+### chunk number 98: pool3
+###################################################
+imp <- mice(nhanes2, print=FALSE, m=50, seed=00219)
+fit0 <- with(data=imp,expr=lm(bmi~age+hyp))
+fit1 <- with(data=imp,expr=lm(bmi~age+hyp+chl))
+stat <- pool.compare(fit1, fit0, method="Wald")
+stat$p
+
+
+### Model testing - LLR method
+###################################################
+### chunk number 99: pool4
+###################################################
+imp <- mice(boys, print=FALSE, seed=60019)
+fit0 <- with(data=imp, expr=glm(I(gen>levels(gen)[1])~hgt+hc, family=binomial))
+fit1 <- with(data=imp, expr=glm(I(gen>levels(gen)[1])~hgt+hc+reg, family=binomial))
+stat <- pool.compare(fit1, fit0, method="likelihood", data=imp)
+stat$p
+
+
+
+###################################################
+### chunk number 100: ownfunction eval=FALSE
+###################################################
+mice(nhanes, method="myfunc")
+
+###
+###   6.2 Sensitivity analysis under MNAR
+###
+
+###################################################
+### chunk number 101: sensitivity
+###################################################
+ini <- mice(nhanes2,maxit=0,print=FALSE)
+post <- ini$post
+k <- seq(1,1.5,0.1)
+est <- vector("list",length(k))
+for (i in 1:length(k)) {
+   post["chl"] <- paste("imp[[j]][,i] <-",k[i],"* imp[[j]][,i]")
+   imp <- mice(nhanes2, post=post, seed=00010, print=FALSE, maxit=20)
+   fit <- with(imp, lm(bmi~age+chl))
+   est[[i]] <- summary(pool(fit))
+ }
+
+
+###
+###   7.2 SPSS
+###
+
+# The code below should not be run from R, but from SPSS.
+# Remove one (1) # sign per line, and run.
+# 
+# BEGIN PROGRAM R.
+# Instruct R to import the data and the dictionary from SPSS.
+#dict <- spssdictionary.GetDictionaryFromSPSS()
+#data <- spssdata.GetDataFromSPSS()
+## Load mice, impute and get the original + imputed data.
+#library(mice)
+#imp <- mice(data,maxit=10)
+#com <- complete(imp,"long",inc=TRUE)
+#com <- cbind(com, Imputation_ = as.integer(com$.imp)-1)
+## Export imputed data and dictionary from R to SPSS.
+#spssdictionary.SetDictionaryToSPSS("com", dict)
+#spssdata.SetDataToSPSS("com", com)
+#spssdictionary.EndDataStep()
+#END PROGRAM.
+
+###
+###   7.3 MItools
+###
+
+###################################################
+### chunk number 102: mitools1
+###################################################
+library("mitools")
+mydata <- imputationList(lapply(1:5, complete, x=imp))
+
+
+###################################################
+### chunk number 103: mitools2 eval=FALSE
+###################################################
+fit <- with(mydata, expr=lm(chl~age + bmi))
+
+###
+###   7.3 Zelig
+###
+
+###################################################
+### chunk number 104: zelig1
+###################################################
+library("Zelig")
+imp <- cbind.mids(imp.idx,data.frame(r.hc=is.na(boys$hc)))
+mydata2 <- mi(complete(imp,1), complete(imp,2), complete(imp,3), complete(imp,4),complete(imp,5))
+fit <- zelig(r.hc~age+wgt+hgt+bmi+gen+phb+tv+reg, model="logit", data=mydata2)
+summary(fit)
+
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/doc/index.html
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/doc/index.html	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/doc/index.html	(revision 2477)
@@ -0,0 +1,44 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title>R: Vignettes and other documentation</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<link rel="stylesheet" type="text/css" href="/doc/html/R.css" />
+</head><body>
+<h1> Vignettes and other documentation
+<img class="toplogo" src="/doc/html/Rlogo.svg" alt="[R logo]" />
+</h1>
+<hr/>
+<div style="text-align: center;">
+<a href="/doc/html/index.html"><img class="arrow" src="/doc/html/up.jpg" alt="[Top]" /></a>
+</div>
+<h2>Vignettes from package 'mice'</h2>
+<table width="100%">
+<col style="width: 22%;" />
+<col style="width:  2%;" />
+<col style="width: 50%;" />
+<col style="width:  8%;" />
+<col style="width:  8%;" />
+<col style="width:  8%;" />
+<tr><td style="text-align: right; vertical-align: top;"><a href="../../../library/mice/doc/ampute.html">mice::ampute</a></td>
+<td></td><td valign="top">Create simulation data</td>
+<td valign="top"><a href="../../../library/mice/doc/ampute.html">HTML</a></td>
+<td valign="top"><a href="../../../library/mice/doc/ampute.Rmd">source</a></td>
+<td valign="top" style="white-space: nowrap"><a href="../../../library/mice/doc/ampute.R">R code</a></td></tr>
+</table>
+<h2>Other files in the <span class="samp">doc</span> directory</h2>
+<table width="100%">
+<col style="width: 24%;" />
+<col style="width: 50%;" />
+<col style="width: 24%;" />
+<tr><td></td><td><span class="samp"><a href="JSScode.R">JSScode.R</a></span></td></tr>
+<tr><td></td><td><span class="samp"><a href="fimd1.r">fimd1.r</a></span></td></tr>
+<tr><td></td><td><span class="samp"><a href="fimd2.r">fimd2.r</a></span></td></tr>
+<tr><td></td><td><span class="samp"><a href="fimd3.r">fimd3.r</a></span></td></tr>
+<tr><td></td><td><span class="samp"><a href="fimd4.r">fimd4.r</a></span></td></tr>
+<tr><td></td><td><span class="samp"><a href="fimd5.r">fimd5.r</a></span></td></tr>
+<tr><td></td><td><span class="samp"><a href="fimd6.r">fimd6.r</a></span></td></tr>
+<tr><td></td><td><span class="samp"><a href="fimd7.r">fimd7.r</a></span></td></tr>
+<tr><td></td><td><span class="samp"><a href="fimd8.r">fimd8.r</a></span></td></tr>
+<tr><td></td><td><span class="samp"><a href="fimd9.r">fimd9.r</a></span></td></tr>
+</table>
+</body></html>

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/doc/index.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/doc/ampute.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/doc/ampute.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/doc/ampute.R	(revision 2477)
@@ -0,0 +1,232 @@
+## ----setup, include=FALSE------------------------------------------------
+knitr::opts_chunk$set(echo = TRUE, fig.width = 5, fig.height = 5, 
+                      fig.align = "center", dev = "pdf")
+
+## ---- out.width = "600px", echo = FALSE, fig.cap="Figure 1: Step-by-step flowchart of R-function ampute()"----
+knitr::include_graphics("Figures/Flowchart.pdf")
+
+## ------------------------------------------------------------------------
+require("mice")
+set.seed(2016)
+testdata <- MASS::mvrnorm(n = 500, mu = c(10, 5, 0), 
+                    Sigma = matrix(data = c(1.0, 0.2, 0.2, 0.2, 1.0, 0.2, 
+                                            0.2, 0.2, 1.0), nrow = 3, byrow = T))
+testdata <- as.data.frame(testdata)
+summary(testdata)
+
+## ------------------------------------------------------------------------
+result <- ampute(testdata)
+result
+
+## ------------------------------------------------------------------------
+names(result)
+
+## ------------------------------------------------------------------------
+md.pattern(result$amp)
+
+## ------------------------------------------------------------------------
+result$prop
+
+## ------------------------------------------------------------------------
+result <- ampute(testdata, prop = 0.2, bycases = FALSE)
+md.pattern(result$amp)
+
+## ------------------------------------------------------------------------
+result$prop
+
+## ------------------------------------------------------------------------
+mypatterns <- result$patterns
+mypatterns
+
+## ------------------------------------------------------------------------
+mypatterns[2, 1] <- 0
+mypatterns <- rbind(mypatterns, c(0, 1, 0))
+mypatterns
+
+## ------------------------------------------------------------------------
+result <- ampute(testdata, prop = 0.3, patterns = mypatterns)
+md.pattern(result$amp)
+
+## ------------------------------------------------------------------------
+result$freq
+
+## ------------------------------------------------------------------------
+result <- ampute(testdata, prop = 0.3, patterns = mypatterns, 
+                 freq = c(0.7, 0.1, 0.1, 0.1))
+md.pattern(result$amp)
+
+## ------------------------------------------------------------------------
+result <- ampute(testdata, prop = 0.3, patterns = mypatterns, 
+                 freq = c(0.7, 0.1, 0.1, 0.1), mech = "MCAR")
+result$mech
+
+## ------------------------------------------------------------------------
+result <- ampute(testdata, prop = 0.3, patterns = mypatterns, 
+                 freq = c(0.7, 0.1, 0.1, 0.1))
+myweights <- result$weights
+myweights
+
+## ------------------------------------------------------------------------
+mypatterns
+
+## ------------------------------------------------------------------------
+result <- ampute(testdata, prop = 0.3, patterns = mypatterns, 
+                 freq = c(0.7, 0.1, 0.1, 0.1), mech = "MNAR")
+result$weights
+
+## ------------------------------------------------------------------------
+myweights[1, ] <- c(0, 0.8, 0.4)
+
+## ------------------------------------------------------------------------
+myweights[3, ] <- c(3, 1, 0)
+myweights
+
+## ------------------------------------------------------------------------
+result <- ampute(testdata, prop = 0.3, patterns = mypatterns, 
+                 freq = c(0.7, 0.1, 0.1, 0.1), weights = myweights)
+
+## ------------------------------------------------------------------------
+lattice::bwplot(result, which.pat = c(1, 3), descriptives = TRUE)
+
+## ---- include = FALSE----------------------------------------------------
+require(BSDA)
+
+## ------------------------------------------------------------------------
+BSDA::tsum.test(mean.x = 0.52879, mean.y = -0.22978,
+                s.x = sqrt(0.85752), s.y = sqrt(0.89401),
+                n.x = 2099, n.y = 4896)
+
+## ------------------------------------------------------------------------
+xyplot(result, which.pat = 1, colors = mdc(1:2))
+
+## ---- fig.cap = "Figure 2: Adaptations of continuous logit functions", echo = FALSE----
+logistic <- function(x){
+  exp(x)/(1+exp(x))
+} 
+x1 <- seq(-3, 3, 0.01)
+y1 <- logistic(-mean(x1)+x1[])
+data2 <- as.data.frame(matrix(c(x1, y1), 601, 2))
+names(data2) <- c("X1", "Y")
+data2[602:1202, "X1"] <- x1
+data2[602:1202, "Y"] <- logistic(-abs(x1[]-mean(x1))+0.75)
+data2[1203:1803, "X1"] <- x1
+data2[1203:1803, "Y"] <- logistic(abs(x1[]-mean(x1))-0.75)
+data2[1804:2404, "X1"] <- x1
+data2[1804:2404, "Y"] <- logistic(mean(x1)-x1[])
+data2["Type"] <- c(rep("RIGHT", 601), rep("MID", 601), rep("TAIL", 601), rep("LEFT", 601))
+plot1 <- xyplot(Y ~ X1, data2, group = Type, t = 'l', 
+                lty=c(1,2,3,4), 
+                cex = 0.5, col = rep("black", 4),
+                xlab = "Standardized weighted sum scores", 
+                ylab = "Probability",
+                key=list(space="top", columns=4, lines = list(lty = c(1, 2, 3, 4)), text = list(c("LEFT", "MID", "RIGHT", "TAIL"), cex = 0.5),
+                colors = mdc(1:2)))
+plot1
+
+## ------------------------------------------------------------------------
+result <- ampute(testdata, prop = 0.3, patterns = mypatterns, 
+                 freq = c(0.7, 0.1, 0.1, 0.1), weights = myweights,
+                 type = c("RIGHT", "TAIL", "MID", "LEFT"))
+
+## ----echo = FALSE--------------------------------------------------------
+lattice::bwplot(result, which.pat = 2, descriptives = FALSE)
+
+## ----echo = FALSE--------------------------------------------------------
+xyplot(result, which.pat = 4, colors = mdc(1:2))
+
+## ------------------------------------------------------------------------
+result$weights
+
+## ------------------------------------------------------------------------
+myodds <- result$odds
+myodds
+
+## ---- include = FALSE----------------------------------------------------
+len <- length(result$scores[[1]])
+R <- sample(x = c(1, 0), size = len, 
+            prob = c(100 / len, (len - 100) / len), replace = TRUE)
+data3 <- matrix(NA, length(R[R == 1]), 3)
+data3[, 1] <- result$scores[[1]][R == 1]
+ng <- length(result$odds[1, ][!is.na(result$odds[1, ])])
+quantiles <- quantile(data3[, 1], probs = seq(0, 1, by = 1 / ng))
+Q <- rep(NA, length(data3[, 1]))
+for (k in 1:ng) {
+  Q <- replace(Q, data3[, 1] >= quantiles[k] 
+               & data3[, 1] <= quantiles[k + 1], k)
+}
+data3[, 2] <- Q
+for (l in 1:ng) {
+data3[data3[, 2] == l, 3] <- (ng * result$prop * result$odds[1, l]) / 
+  sum(result$odds[1, ], na.rm = TRUE)
+}
+data3 <- as.data.frame(data3)
+names(data3) <- c("scores", "group", "prob")
+plot2 <- xyplot(prob ~ scores, data = data3, groups = group,
+                ylab = "Probability", xlab = "Standardized weighted sum scores",
+                pch=c(1,2,3,4), 
+                cex = 0.5, col = rep("black", 4),
+                key=list(space="top", columns=4, title="", 
+                         cex = 1, points = list(pch = c(1, 2, 3, 4)), 
+                         text = list(c("Group1", "Group2", "Group3", "Group4"), 
+                                     cex = 0.5)))
+dat <- result$data[result$cand == 1, "V2"]
+data3["V2"] <-  dat[R == 1]
+dat <- result$data[result$cand == 1, "V3"]
+data3["V3"] <-  dat[R == 1]
+plot3 <- xyplot(V3 ~ V2, data = data3, groups = group,
+                ylab = "Variable V3", xlab = "Variable V2", 
+                pch=c(1,2,3,4), 
+                cex = 0.8, col = rep("black", 4),
+                key=list(space="top", columns=4, title="", 
+                         cex = 1, points = list(pch = c(1, 2, 3, 4)), 
+                         text = list(c("Group1", "Group2", "Group3", "Group4"), 
+                                     cex = 0.5)))
+
+## ----fig.cap = "Figure 3: Probabilities to have missing values for the four groups in pattern 1 and the relation between the groups and the weighted sum scores", echo = FALSE----
+plot2
+
+## ----fig.cap = "Figure 4: Division of odds groups over variables $V_2$ and $V_3$", echo = FALSE----
+plot3
+
+## ------------------------------------------------------------------------
+myodds[3, ] <- c(1, 0, 0, 1)
+myodds[4, ] <- c(1, 1, 2, 2)
+myodds <- cbind(myodds, matrix(c(NA, NA, NA, 1, NA, NA, NA, 1), nrow = 4, byrow = F))
+myodds
+
+## ------------------------------------------------------------------------
+result <- ampute(testdata, prop = 0.3, patterns = mypatterns, 
+                 freq = c(0.7, 0.1, 0.1, 0.1), weights = myweights,
+                 cont = FALSE, odds = myodds)
+
+## ------------------------------------------------------------------------
+bwplot(result, which.pat = c(3, 4), descriptives = FALSE)
+
+## ------------------------------------------------------------------------
+ampdata1 <- ampute(testdata, patterns = c(0, 1, 1), prop = 0.2, mech = "MAR")$amp
+ampdata2 <- ampute(testdata, patterns = c(1, 0, 1), prop = 0.5, mech = "MNAR")$amp
+ampdata3 <- ampute(testdata, patterns = c(1, 1, 0), prop = 0.8, mech = "MCAR")$amp
+
+indices <- sample(x = c(1, 2, 3), size = nrow(testdata), replace = TRUE, 
+                  prob = c(1/3, 1/3, 1/3))
+
+ampdata <- matrix(NA, nrow = nrow(testdata), ncol = ncol(testdata))
+ampdata[indices == 1, ] <- as.matrix(ampdata1[indices == 1, ])
+ampdata[indices == 2, ] <- as.matrix(ampdata2[indices == 2, ])
+ampdata[indices == 3, ] <- as.matrix(ampdata3[indices == 3, ])
+
+md.pattern(ampdata)
+
+## ------------------------------------------------------------------------
+emptyresult <- ampute(testdata, run = FALSE)
+emptyresult$amp
+
+## ------------------------------------------------------------------------
+result$cand[1:30]
+
+## ------------------------------------------------------------------------
+result$scores[[1]][1:10]
+
+## ------------------------------------------------------------------------
+head(result$data)
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/doc/ampute.Rmd
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/doc/ampute.Rmd	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/doc/ampute.Rmd	(revision 2477)
@@ -0,0 +1,487 @@
+---
+title: "Multivariate amputation using ampute"
+author: "Rianne Schouten [aut, cre], Peter Lugtig [ctb], Gerko Vink [aut]"
+date: "`r Sys.Date()`"
+output: rmarkdown::html_vignette
+vignette: >
+  %\VignetteEngine{knitr::rmarkdown}
+  %\VignetteIndexEntry{Create simulation data}
+  %\usepackage[utf8]{inputenc}
+---
+
+
+```{r setup, include=FALSE}
+knitr::opts_chunk$set(echo = TRUE, fig.width = 5, fig.height = 5, 
+                      fig.align = "center", dev = "pdf")
+```
+
+When new multiple imputation techniques are tested, simulated data sets have to be made incomplete. Often, a univariate amputation procedure is followed, generating missing values one variable at a time. This procedure is repeated for every variable that should have missing values. Van Buuren (2012, pp. 63, 64) explains in detail how this can be done. However, there are some drawbacks of this approach. First, a univariate amputation procedure makes it difficult to relate the missingness on one variable to the missingness on any other variable. Second, both simulated and real data have a multivariate structure. Applying a univariate amputation procedure to multivariate data would not do justice to the complicated nature of data sets. For these reasons, function `ampute` is developed to perform multivariate amputation according the user's specific desires.
+
+```{r, out.width = "600px", echo = FALSE, fig.cap="Figure 1: Step-by-step flowchart of R-function ampute()"}
+knitr::include_graphics("Figures/Flowchart.pdf")
+```
+
+Function `ampute()` enables the generation of missing values based on different underlying missingness mechanisms. To this end, `ampute()` has multiple arguments and the most important ones are displayed in Figure 1. Figure 1 also gives an overview of the order in which decisions need to be taken if you would like to generate a missingness mechanism that cannot easily be traced back. This is especially useful for the evaluation and comparison of missing data methods. Nevertheless, the default settings create genuine multivariate missingness as well. 
+
+The underlying method of `ampute()` is based on Brand's (1999) multivariate amputation procedure. An adaptation to this method is made to make continuous amputation possible. The possibility to create MNAR missingness is an extra feature as well. 
+
+In this vignette, Figure 1 serves as a guideline to explain how `ampute`'s arguments can be used to generate multivariate missingness. We will discuss the possiblities by examining each step of Figure 1. Concurrently, we will explain the underlying amputation method since this might give the user the opportunity to not only generate missing values but also use the method's features to generate complicated missingness mechanisms. Our goal is to make the use of `ampute()` easy and straightforward. 
+
+### 1. Data and quick amputation
+
+First, we need a complete data set. In simulation settings, multivariate data can be generated by using `mvrnorm()` from the package `MASS`. Be aware that the covariance matrix should be semi definite. 
+
+```{r}
+require("mice")
+set.seed(2016)
+testdata <- MASS::mvrnorm(n = 500, mu = c(10, 5, 0), 
+                    Sigma = matrix(data = c(1.0, 0.2, 0.2, 0.2, 1.0, 0.2, 
+                                            0.2, 0.2, 1.0), nrow = 3, byrow = T))
+testdata <- as.data.frame(testdata)
+summary(testdata)
+```
+
+The function `ampute()` immediately works when the data are entered into the function. Storing the result allows you to work with the amputed data. 
+
+```{r}
+result <- ampute(testdata)
+result
+```
+
+#### Class
+
+The return object is of class `mads` (Multivariate Amputed Data Set) and contains all the useful information about the amputation. In total, the object contains the following:
+
+```{r}
+names(result)
+```
+
+#### Inspect amputed data
+
+The amputed data is stored under `amp`. To see whether the amputation has gone according plan, a quick investigation can be done by using function `md.pattern()`.
+
+```{r}
+md.pattern(result$amp)
+```
+
+The rows of the table show the different missing data patterns with the number of cases accordingly. The first row always refers to the complete cases. The last column contains the number of variables with missings in that specific pattern. Consequently, each column total describes the number of cells with missing values for that variable. A more thorough explanation of `md.pattern()` can be found in its help file (`?md.pattern`). Note that because `md.pattern()` sorts the columns in increasing amounts of missing information, the order of the variables is different from the order in the data. 
+
+### 2. Proportion of missingness
+
+The proportion of missingness is specified under:
+
+```{r}
+result$prop
+```
+
+In the default setting, this means that 50% of the cases will have missing values. It is easy to change this proportion by using the argument `prop`. One might also want to specify the percentage of missing cells. For this, the argument `bycases` should be `FALSE`. 
+
+```{r}
+result <- ampute(testdata, prop = 0.2, bycases = FALSE)
+md.pattern(result$amp)
+``` 
+
+An inspection of the result shows that the proportion of missing cells is approximately 20%, as requested (the data set contains 10000 * 3 = 30000 cells, in total, 5964 cells are made missing). `ampute()` automatically calculates the proportion of missing cases that belongs to this setting. 
+
+```{r}
+result$prop
+```
+
+### 3. Patterns
+
+The basic idea of `ampute()` is the generation of missingness patterns. Each pattern is a combination of missingness on specific variables while other variables remain complete. For example, someone could have forgotten the last page of a questionnaire, resulting in missingness on a specific set of questions. Another missingness pattern could occur when someone is not willing to answer private questions. Or when a participant misses a wave in a longitudinal study. Consequently, each pattern is a specific combination of missing and complete variables. 
+
+The default missingness patterns can by obtained by:  
+
+```{r}
+mypatterns <- result$patterns
+mypatterns
+```
+
+In the `patterns` matrix, each row refers to a missing data pattern and each column to a variable. `0` is used for variables that should have missing values in a particular pattern. `1` is used otherwise. Here, three missing data patterns are specified with missing values on 1 variable only. Note that as a result of this, none of the cases will have missingness on more than one variable. A case either has missingness on V1, V2 or V3 or remains complete.  
+
+Subsequently, the default `patterns` matrix can be changed according your desires. For example, the missingness patterns might be changed into:
+
+```{r}
+mypatterns[2, 1] <- 0
+mypatterns <- rbind(mypatterns, c(0, 1, 0))
+mypatterns
+```
+
+By doing this, a missingness pattern is created where cases will have missingness on V1 and V2 but not on V3 (pattern 2). Also, I have added a fourth missing data pattern to create a combinaton of missingness on V1 and V3. 
+
+Now, I can ampute the data again, with the desired `patterns` matrix as its third argument. Note that I have changed the desired proportion of missingness to `bycases = TRUE` (default) and 30%. 
+
+```{r}
+result <- ampute(testdata, prop = 0.3, patterns = mypatterns)
+md.pattern(result$amp)
+```
+
+### 4. Relative frequency
+
+The function `ampute()` works by assigning cases to the different missing data patterns. Each case is assigned to one pattern only, and all cases are divided among the patterns. In other words, every case is \textit{candidate} for a certain missing data pattern. This does not automatically mean that each case will obtain missing values. That decision will be made later on. 
+
+The argument `freq` specifies with which frequency the cases should be divided over the patterns. As a default, equal frequencies are used for the patterns.  
+
+```{r}
+result$freq
+```
+
+The specifications below are an example of a situation where one would like to impose missing data pattern 1 with a higher frequency than the other missing data patterns. When changing the `freq` argument, one should keep in mind that the sum of the relative frequencies should always be 1 (in order to divide all the cases over the patterns). 
+
+```{r}
+result <- ampute(testdata, prop = 0.3, patterns = mypatterns, 
+                 freq = c(0.7, 0.1, 0.1, 0.1))
+md.pattern(result$amp)
+```
+
+An inspection of the missingness patterns using `md.pattern()` shows that indeed pattern 1 has received 7 times as many candidates as pattern 2 to 4. In total, approximately 3000 cases have missing values (which is what was specified under `prop`). 
+
+### 5. Mechanism
+
+At this point, the total proportion of missingness is defined, the missing data patterns are specified as well as the relative frequency with which they should occur. All cases are candidate for a missing data pattern. 
+
+Whether a case will be made missing eventually depends on the missingness mechanism. If each case should have an equal probability of having missing values, the argument `mech` should be changed to `"MCAR"` (Missing Completely At Random). Then, step 6 to 9 do not need to be specified. 
+
+```{r}
+result <- ampute(testdata, prop = 0.3, patterns = mypatterns, 
+                 freq = c(0.7, 0.1, 0.1, 0.1), mech = "MCAR")
+result$mech
+```
+
+Two other opties are `"MAR"` (Missing At Random), where the probability to be missing depends on the values of the variables that will not be made missing (the 'observed' variables) or `"MNAR"` (Missing Not At Random), where these probabilities depend on the values of the variables that will be made missing. For a more thorough explanation of these terms, Van Buuren (2012, pp. 6, 7, 31, 32) is useful. 
+
+### 6. Weights
+
+In case of `MAR` (default) or `MNAR` missingness, a weighted sum score will be calculated for each case. This is an important part in the process because the probability that a case will be made missing depends on this score. The way in which the sum scores are used, will be explained in step 8 and step 9. 
+
+The weighted sum scores are built from the variable values and certain pre-specified weights. For each case, the value on a certain variable is multiplied with a weight. This is done for all variables and the resulting values are summed: a weighted sum score. The formula that describes the calculation is: 
+
+\begin{equation}
+s_{ik} = \sum\limits_{j=1}^J w_{jk}*c_{ij}
+\end{equation}
+
+where $s_{ik}$ is the weighted sum score of a case $i$ in a certain pattern $k$, $w_{jk}$ is the pre-specified weight of a certain variable $j$ in a certain pattern $k$ and $c_{ij}$ is the value of case $i$ on variable $j$. In the example, $j\in\{1, 2, 3\}$ and $k\in\{1, 2, 3, 4\}$ because there are three variables and four missing data patterns. 
+
+The `weights` matrix stores the $w_{jk}$ and is of size #patterns by #variables. The default `weights` matrix for `MAR` missingness is as follows. 
+
+```{r}
+result <- ampute(testdata, prop = 0.3, patterns = mypatterns, 
+                 freq = c(0.7, 0.1, 0.1, 0.1))
+myweights <- result$weights
+myweights
+```
+
+At first sight, this matrix might be complicated, but if you compare the matrix with the `patterns` matrix that we used, the contents make more sense. 
+
+```{r}
+mypatterns
+```
+
+As you see, the `weights` and `patterns` matrices are exactly similar. The reason for this is that in case of `MAR` missingness, the variables that will be made missing should not be weighted (`0` in the `weights` matrix). Those are the variables with `0` in the `patterns` matrix. 
+
+The other variables receive a weight of `1`, as a default. Thus, the variables have equal weights. 
+
+In case of `MNAR` missingness, the default `weights` matrix is as follows:
+
+```{r}
+result <- ampute(testdata, prop = 0.3, patterns = mypatterns, 
+                 freq = c(0.7, 0.1, 0.1, 0.1), mech = "MNAR")
+result$weights
+```
+
+If this matrix is compared with the `patterns` matrix that was used, it is easy to see that the values are reversed. Since a `MNAR` missingness mechanism means that the the missingness will depend on the variables that will be amputed, those variables are weighted in the `weight` matrix. Those are the variables with a value `0` in the `patterns` matrix. Again, the weighted variables receive equal weights of `1`. The variables that will remain complete are not weighted and receive a `0`.  
+
+Naturally, the idea of the `weights` matrix is to weight variables differently from each other. From now on, we will impose a `MAR` mechanism to the data. We therefore focus at the default `weights` matrix which we stored under `myweights`. 
+For instance, we could desire to give the values on variable V2 a higher weight than the values on variable V3. Therefore, for pattern 1, we could change the `weights` matrix into something as: 
+
+```{r}
+myweights[1, ] <- c(0, 0.8, 0.4)
+```
+
+By choosing the values 0.8 and 0.4, variable V2 is weighted twice as heavy as variable V3. The weight values are relative values, meaning that choosing the values 8 and 4 would have the same effect on the amputation process. In order to clearly see the result of the `weights` setting, one can specify weights for just a few variables and with a relative big distance from each other. 
+
+For pattern 3, variable V1 will be weighted three times as heavy as variable V2. 
+
+```{r}
+myweights[3, ] <- c(3, 1, 0)
+myweights
+```
+
+We will now apply these settings and inspect the results in two ways: boxplots and scatterplots.   
+
+```{r}
+result <- ampute(testdata, prop = 0.3, patterns = mypatterns, 
+                 freq = c(0.7, 0.1, 0.1, 0.1), weights = myweights)
+```
+
+#### Boxplots
+
+First, there is the function `bwplot()` that can be imposed on the `mads` object immediately. `bwplot()` plots the distributions of the amputed and non-amputed data for several variables. This is useful since these boxplots show the relation between the missingness and the variables values. In other words, by examining the boxplots one can see for which values of a certain variable the data will be amputed. Note that not necessarily the values of the variables themselves will be amputed. The boxplots merely show the relation between the amputations and the variables. 
+
+In the function `bwplot()`, the argument `which.pat` can be used to define the patterns you are interested in (default: all patterns). The argument `yvar` should contain the variables names (default: all variables). Besides, the function returns the mean, variance and n of the amputed and non-amputed data for each variable and each pattern requested. In the column `Amp`, a `1` refers to the amputed data and `0` to the non-amputed data. If the descriptives are not required, the argument `descriptives` can be set to `FALSE`. 
+
+```{r}
+lattice::bwplot(result, which.pat = c(1, 3), descriptives = TRUE)
+```
+
+The medians and boundaries of the boxes show that in pattern 1, the amputed data is shifted to the right with respect to the non-amputed data. For variable V2, this effect is the largest, due to the weight value that was specified. For V1, there is a very small difference between the boxplots of the amputed and non-amputed data. This makes sense, because variable V1 was amputed in the first pattern and therefore set to `0` in the `weights` matrix. The small difference that is visible is due to the positive correlation between V1 on the one side and V2 and V3 on the other side. These correlations were created during the simulation of the data. 
+
+If desired, one could use the function `tsum.test()` from package `BSDA` to perform a t-test on the amputed and non-amputed data. The data returned in the descriptives table can be used for that. For example, to know whether the mean difference between the amputed and non-amputed data for variable V2 in pattern 1 is significant, one could run:
+
+```{r, include = FALSE}
+require(BSDA)
+```
+
+```{r}
+BSDA::tsum.test(mean.x = 0.52879, mean.y = -0.22978,
+                s.x = sqrt(0.85752), s.y = sqrt(0.89401),
+                n.x = 2099, n.y = 4896)
+```
+
+As is visible, there is a significant difference between the amputed and non-amputed data of variable V2 in pattern 1. 
+
+For pattern 3, the difference between the distributions of the amputed and non-amputed data is largest for variable V1, as can be expected due to the weight values in pattern 3. 
+
+#### Scatterplots
+
+Scatterplots might also help to investigate the effect of the specifications. We can directly impose the function `xyplot()` on the `mads` object. The function contains arguments comparable to `bwplot()`. 
+
+For example, we can investigate the weighted sum scores of pattern 1 as follows:
+
+```{r}
+xyplot(result, which.pat = 1, colors = mdc(1:2))
+```
+
+The scatterplots show that there is a very small relation between V1 and the weighted sum scores. Furthermore, the relation between V2 and the weighted sum scores is very strong, meaning that a case's value on V2 is very important in the generation of the weighted sum score. Actually, this is what causes the differences between the amputed and non-amputed data in the boxplots above. For V3 and the weighted sum scores, the relation is a bit weaker than for V2 but more present than for V1. 
+
+### 7. Continuous
+
+As a default, `ampute()` creates continuous missingness. This means that logit probability functions are used to define a candidate's probability of having missing values. The type of continuous amputation can be decided under `type`. A more thorough explanation of how the logit functions work will be given in part 8 of this vignette.
+
+Instead of using continuous formulas to specify the missingness probabilities, these probabilities can also be defined by hand. Thereto, the argument `cont` should be set to `FALSE`. The `odds` argument can be used to define the probabilities (see part 9). 
+
+### 8. Type
+
+```{r, fig.cap = "Figure 2: Adaptations of continuous logit functions", echo = FALSE}
+logistic <- function(x){
+  exp(x)/(1+exp(x))
+} 
+x1 <- seq(-3, 3, 0.01)
+y1 <- logistic(-mean(x1)+x1[])
+data2 <- as.data.frame(matrix(c(x1, y1), 601, 2))
+names(data2) <- c("X1", "Y")
+data2[602:1202, "X1"] <- x1
+data2[602:1202, "Y"] <- logistic(-abs(x1[]-mean(x1))+0.75)
+data2[1203:1803, "X1"] <- x1
+data2[1203:1803, "Y"] <- logistic(abs(x1[]-mean(x1))-0.75)
+data2[1804:2404, "X1"] <- x1
+data2[1804:2404, "Y"] <- logistic(mean(x1)-x1[])
+data2["Type"] <- c(rep("RIGHT", 601), rep("MID", 601), rep("TAIL", 601), rep("LEFT", 601))
+plot1 <- xyplot(Y ~ X1, data2, group = Type, t = 'l', 
+                lty=c(1,2,3,4), 
+                cex = 0.5, col = rep("black", 4),
+                xlab = "Standardized weighted sum scores", 
+                ylab = "Probability",
+                key=list(space="top", columns=4, lines = list(lty = c(1, 2, 3, 4)), text = list(c("LEFT", "MID", "RIGHT", "TAIL"), cex = 0.5),
+                colors = mdc(1:2)))
+plot1
+```
+
+The logit functions are more thoroughly explained by Van Buuren (2012, pp. 63, 64), but a quick overview will be given here. Four missingness functions are known: RIGHT, MID, TAIL and LEFT missingness. Figure 2 shows the course of the probabilities for standardized values. 
+
+In `ampute()`, the logit functions will be applied to the weighted sum scores. Consequently, in the situation of RIGHT missingness, cases with high weighted sum scores will have a higher probability to have missing values, compared to cases with low weighted sum scores. For MID missingness, the higher probabilities are given to the cases with weighted sum scores around the average.
+
+For each pattern, a different missingness type can be chosen. In our example, we have four patterns, so four type specifications are required. It is advised to inspect the result with `bwplot()` (below this is done for pattern 2), although the scatterplots give insight as well (as an example, a plot for pattern 4 is shown). 
+
+```{r}
+result <- ampute(testdata, prop = 0.3, patterns = mypatterns, 
+                 freq = c(0.7, 0.1, 0.1, 0.1), weights = myweights,
+                 type = c("RIGHT", "TAIL", "MID", "LEFT"))
+```
+
+```{r echo = FALSE}
+lattice::bwplot(result, which.pat = 2, descriptives = FALSE)
+```
+
+From the boxplots of pattern 2, it becomes visible that the interquartile range (IQR) is much larger for the amputed V3 values compared to the non-amputed data. This is due to the fact that in pattern 2 only V3 defines the missingness. Besides, we requested a TAIL missingness type, which means that all the cases with values at the tails of the distribution of the weighted sum scores (based on merely V3), will be made missing.
+
+```{r echo = FALSE}
+xyplot(result, which.pat = 4, colors = mdc(1:2))
+```
+
+First, notice that there are much fewer dots in these scatterplots compared to the scatterplots we saw earlier. This is due to the `freq` setting: we specified that only 10 percent of the cases with missing values should have missingness pattern 4. Second, the scatterplots show that all the amputed data are at the left hand side of the weighted sum scores due to the `"LEFT"` setting in the `type` argument. Third, these figures show that there is a perfect relation between variable V2 and the weighted sum scores. Clearly, pattern 4 depends on variable V2 only, which we can remember from the `weights` matrix we used.   
+
+```{r}
+result$weights
+```
+
+### 9. Odds
+
+If the missingness probabilities should not depend on a continuous probability function, you will have to define the probabilities to be missing yourself. This method was first described by Brand (1999) and consists of two steps. First, one has to decide in how many groups the weighted sum scores should be divided. Second, for each group, an odds value defines the relative probability of having missing values. In other words, each candidate case will be assigned to a group based on his weighted sum score. 
+
+Let us first have a look at the working of the odds values. The default `odds` matrix is as follows:  
+
+```{r}
+myodds <- result$odds
+myodds
+```
+
+This matrix means that for each pattern, the candidates will be divided into four groups. This division occurs based on quantiles, in order to obtain equally sized groups. The values `c(1, 2, 3, 4)` mean that a case with a weighted sum score in the highest quantile will have a probability of having missing values that is four times higher than a candidate with a weighted sum score in the lowest quantile. In Figure 3 the different probabilities that belong to this setting are shown for 100 candidates of pattern 1. 
+
+```{r, include = FALSE}
+len <- length(result$scores[[1]])
+R <- sample(x = c(1, 0), size = len, 
+            prob = c(100 / len, (len - 100) / len), replace = TRUE)
+data3 <- matrix(NA, length(R[R == 1]), 3)
+data3[, 1] <- result$scores[[1]][R == 1]
+ng <- length(result$odds[1, ][!is.na(result$odds[1, ])])
+quantiles <- quantile(data3[, 1], probs = seq(0, 1, by = 1 / ng))
+Q <- rep(NA, length(data3[, 1]))
+for (k in 1:ng) {
+  Q <- replace(Q, data3[, 1] >= quantiles[k] 
+               & data3[, 1] <= quantiles[k + 1], k)
+}
+data3[, 2] <- Q
+for (l in 1:ng) {
+data3[data3[, 2] == l, 3] <- (ng * result$prop * result$odds[1, l]) / 
+  sum(result$odds[1, ], na.rm = TRUE)
+}
+data3 <- as.data.frame(data3)
+names(data3) <- c("scores", "group", "prob")
+plot2 <- xyplot(prob ~ scores, data = data3, groups = group,
+                ylab = "Probability", xlab = "Standardized weighted sum scores",
+                pch=c(1,2,3,4), 
+                cex = 0.5, col = rep("black", 4),
+                key=list(space="top", columns=4, title="", 
+                         cex = 1, points = list(pch = c(1, 2, 3, 4)), 
+                         text = list(c("Group1", "Group2", "Group3", "Group4"), 
+                                     cex = 0.5)))
+dat <- result$data[result$cand == 1, "V2"]
+data3["V2"] <-  dat[R == 1]
+dat <- result$data[result$cand == 1, "V3"]
+data3["V3"] <-  dat[R == 1]
+plot3 <- xyplot(V3 ~ V2, data = data3, groups = group,
+                ylab = "Variable V3", xlab = "Variable V2", 
+                pch=c(1,2,3,4), 
+                cex = 0.8, col = rep("black", 4),
+                key=list(space="top", columns=4, title="", 
+                         cex = 1, points = list(pch = c(1, 2, 3, 4)), 
+                         text = list(c("Group1", "Group2", "Group3", "Group4"), 
+                                     cex = 0.5)))
+```
+
+```{r fig.cap = "Figure 3: Probabilities to have missing values for the four groups in pattern 1 and the relation between the groups and the weighted sum scores", echo = FALSE}
+plot2
+```
+
+As can be seen, there are indeed four groups in pattern 1. The groups have an approximately equal size, with each a certain probability to obtain missing values. The probability of group 4 is indeed four times as large as the probability of group 1.
+
+```{r fig.cap = "Figure 4: Division of odds groups over variables $V_2$ and $V_3$", echo = FALSE}
+plot3
+```
+
+The relation between the groups and the variable values is shown in Figure 4. Because the relationship between variable V2 and the weighted sum scores is high (due to the `weights` setting), the groups can be distinguished very well. Besides, for higher values of V2, the weighted sum scores are higher. These are the cases that are placed in group 4. Therefore, they are at the right hand side of the V2 scale. For variable V3, the relation between the values and the group allocation is small. This again is due to the `weights` setting. Still, because of the odds values, group 4 is much more to the right of the V3 scale than group 1, 2 and 3. 
+
+Let us now dig deeper into the contents of the `odds` matrix. The #rows of this matrix is equal to #patterns. The #columns can be defined by the user and depends on the desired amputation procedure. 
+
+The amount of values in each row defines the number of groups that will be created from the weighted sum scores in that specific pattern. This number can be different for the different patterns. The values themselves define the odds probabilities of having missing values. Note that the values are relative values. For instance, a setting of `c(2, 6)` is similar to `c(3, 9)`.
+
+The cells in the `odds` matrix that are not used, should be filled with NAs. Let us define the matrix as follows. 
+
+```{r}
+myodds[3, ] <- c(1, 0, 0, 1)
+myodds[4, ] <- c(1, 1, 2, 2)
+myodds <- cbind(myodds, matrix(c(NA, NA, NA, 1, NA, NA, NA, 1), nrow = 4, byrow = F))
+myodds
+```
+
+We keep the default setting of the first two patterns. Then, for pattern 3, the weighted sum scores will be divided into four groups. The odds values mean that candidates with low weighted sum scores will have a probability to have missing values that is equal to the probability of candidates with high weighted sum scores. However, candidates with weighted sum scores around average will not be made missing. Because pattern 3 depends on variable V1 with a weight of 3 and on variable V2 with a weight of 1, the effect will be most visible for variable V1. 
+
+The weighted sum scores of the fourth pattern will be divided into six groups. All candidates will have a probability of having missing values, but this chance is larger for candidates with weighted sum scores around average. 
+
+```{r}
+result <- ampute(testdata, prop = 0.3, patterns = mypatterns, 
+                 freq = c(0.7, 0.1, 0.1, 0.1), weights = myweights,
+                 cont = FALSE, odds = myodds)
+```
+
+```{r}
+bwplot(result, which.pat = c(3, 4), descriptives = FALSE)
+```
+
+In the boxplots of pattern 3, it is visible that the IQR of the amputed data is larger than the one of the non-amputed data. This is especially the case for variable V1, a bit less for variable V2 but almost not present for variable V3.
+
+In pattern 4, the effect of the specifications is only visible for variable V2, because the other variables will be made missing. In contrast to pattern 3, the amputation is performed in the center of the weighted sum scores, resulting to a MID-like missingness pattern. 
+
+### 10. Combining missingness mechanisms
+
+Function `ampute()` imposes a certain missingness mechanism on all the patterns. If `mech == "MAR"`, for instance, all patterns specified under `patterns` are created with a `MAR` mechanism. Besides, all these patterns should be made missing based on either continuous (`cont == TRUE`) or discrete (`cont == FALSE`) probability distributions. 
+
+In reality, you might want to generate multiple kinds of missingness mechanisms within the same data set. In order to do this, I advise to ampute one data set multiple times according the desired specifications. Thereafter, for each row of the original data set, a row can be sampled from the multiple amputed data sets. In case of three missingness mechanisms, 1/3 of the data set would be the result of amputation 1, 1/3 from amputation 2 and the last third from amputation 3. In total, all three amputation mechanisms will be generated in the data set. 
+
+Below is an example of how this can be done. 
+
+```{r}
+ampdata1 <- ampute(testdata, patterns = c(0, 1, 1), prop = 0.2, mech = "MAR")$amp
+ampdata2 <- ampute(testdata, patterns = c(1, 0, 1), prop = 0.5, mech = "MNAR")$amp
+ampdata3 <- ampute(testdata, patterns = c(1, 1, 0), prop = 0.8, mech = "MCAR")$amp
+
+indices <- sample(x = c(1, 2, 3), size = nrow(testdata), replace = TRUE, 
+                  prob = c(1/3, 1/3, 1/3))
+
+ampdata <- matrix(NA, nrow = nrow(testdata), ncol = ncol(testdata))
+ampdata[indices == 1, ] <- as.matrix(ampdata1[indices == 1, ])
+ampdata[indices == 2, ] <- as.matrix(ampdata2[indices == 2, ])
+ampdata[indices == 3, ] <- as.matrix(ampdata3[indices == 3, ])
+
+md.pattern(ampdata)
+```
+
+The function `md.pattern()` does not show the different mechanisms (`bwplot()` or `xyplot()` are more useful for this), but the proportions show that the code above works. 
+
+20% of cases is amputed according a MAR mechanism, 50% according a MNAR mechanism and 80 percent according a MCAR mechanism. For each mechanism, merely one missingness pattern is created to clearly see the difference between the three amputation rounds. These rounds are imposed on the data with equal probabilities (1/3 each). Consequently, 1/3 of 20% of the cases has a MAR missingness mechanism, 1/3 of 50% of the cases has a MNAR missingness mechanism and 1/3 of 80% of the cases has a MCAR missingness mechanism. In total, this results in 50% of the cases having missing values. 
+
+### 11. Other specifications
+
+#### Argument `run`
+
+For large data sets or slow computers, you might not want to perform the amputation right away. When the argument `run` is set to `FALSE`, all results will be stored in the `mads` object except for the amputed data set. Subsequently, the default settings for the `patterns`, `weights` or `odds` argument can be changed easily and entered into a new run thereafter (with `run == TRUE`).
+
+```{r}
+emptyresult <- ampute(testdata, run = FALSE)
+emptyresult$amp
+```
+
+#### Other `mads` contents
+
+The return object from `ampute()` is of class `mads`. `mads` contains the amputed data set, the function specifications and some extra objects that might be useful. 
+
+The object `cand` is a vector that contains for every case the missing data pattern it was candidate for. 
+
+```{r}
+result$cand[1:30]
+```
+
+The object `scores` is a list with, for each pattern, the weighted sum scores of the candidates. 
+
+```{r}
+result$scores[[1]][1:10]
+```
+
+Furthermore, the object `data` contains the original data. 
+
+```{r}
+head(result$data)
+```
+
+## Go ahead and `ampute`!
+
+### References
+
+Brand, J.P.L. (1999). Development, implementation and 
+evaluation of multiple imputation strategies for the statistical analysis of incomplete data sets (pp. 110-113). Dissertation. Rotterdam: Erasmus University.
+
+Van Buuren, S. (2012). Flexible imputation of missing data.
+Boca Raton, FL.: Chapman & Hall/CRC Press.
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/doc/ampute.html
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/doc/ampute.html	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/doc/ampute.html	(revision 2477)
@@ -0,0 +1,524 @@
+<!DOCTYPE html>
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+
+<meta charset="utf-8">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta name="generator" content="pandoc" />
+
+<meta name="viewport" content="width=device-width, initial-scale=1">
+
+<meta name="author" content="Rianne Schouten [aut, cre], Peter Lugtig [ctb], Gerko Vink [aut]" />
+
+<meta name="date" content="2017-02-18" />
+
+<title>Multivariate amputation using ampute</title>
+
+
+
+<style type="text/css">code{white-space: pre;}</style>
+<style type="text/css">
+div.sourceCode { overflow-x: auto; }
+table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
+  margin: 0; padding: 0; vertical-align: baseline; border: none; }
+table.sourceCode { width: 100%; line-height: 100%; }
+td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
+td.sourceCode { padding-left: 5px; }
+code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
+code > span.dt { color: #902000; } /* DataType */
+code > span.dv { color: #40a070; } /* DecVal */
+code > span.bn { color: #40a070; } /* BaseN */
+code > span.fl { color: #40a070; } /* Float */
+code > span.ch { color: #4070a0; } /* Char */
+code > span.st { color: #4070a0; } /* String */
+code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
+code > span.ot { color: #007020; } /* Other */
+code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
+code > span.fu { color: #06287e; } /* Function */
+code > span.er { color: #ff0000; font-weight: bold; } /* Error */
+code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
+code > span.cn { color: #880000; } /* Constant */
+code > span.sc { color: #4070a0; } /* SpecialChar */
+code > span.vs { color: #4070a0; } /* VerbatimString */
+code > span.ss { color: #bb6688; } /* SpecialString */
+code > span.im { } /* Import */
+code > span.va { color: #19177c; } /* Variable */
+code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
+code > span.op { color: #666666; } /* Operator */
+code > span.bu { } /* BuiltIn */
+code > span.ex { } /* Extension */
+code > span.pp { color: #bc7a00; } /* Preprocessor */
+code > span.at { color: #7d9029; } /* Attribute */
+code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
+code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
+code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
+code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
+</style>
+
+
+
+<link href="data:text/css;charset=utf-8,body%20%7B%0Abackground%2Dcolor%3A%20%23fff%3B%0Amargin%3A%201em%20auto%3B%0Amax%2Dwidth%3A%20700px%3B%0Aoverflow%3A%20visible%3B%0Apadding%2Dleft%3A%202em%3B%0Apadding%2Dright%3A%202em%3B%0Afont%2Dfamily%3A%20%22Open%20Sans%22%2C%20%22Helvetica%20Neue%22%2C%20Helvetica%2C%20Arial%2C%20sans%2Dserif%3B%0Afont%2Dsize%3A%2014px%3B%0Aline%2Dheight%3A%201%2E35%3B%0A%7D%0A%23header%20%7B%0Atext%2Dalign%3A%20center%3B%0A%7D%0A%23TOC%20%7B%0Aclear%3A%20both%3B%0Amargin%3A%200%200%2010px%2010px%3B%0Apadding%3A%204px%3B%0Awidth%3A%20400px%3B%0Aborder%3A%201px%20solid%20%23CCCCCC%3B%0Aborder%2Dradius%3A%205px%3B%0Abackground%2Dcolor%3A%20%23f6f6f6%3B%0Afont%2Dsize%3A%2013px%3B%0Aline%2Dheight%3A%201%2E3%3B%0A%7D%0A%23TOC%20%2Etoctitle%20%7B%0Afont%2Dweight%3A%20bold%3B%0Afont%2Dsize%3A%2015px%3B%0Amargin%2Dleft%3A%205px%3B%0A%7D%0A%23TOC%20ul%20%7B%0Apadding%2Dleft%3A%2040px%3B%0Amargin%2Dleft%3A%20%2D1%2E5em%3B%0Amargin%2Dtop%3A%205px%3B%0Amargin%2Dbottom%3A%205px%3B%0A%7D%0A%23TOC%20ul%20ul%20%7B%0Amargin%2Dleft%3A%20%2D2em%3B%0A%7D%0A%23TOC%20li%20%7B%0Aline%2Dheight%3A%2016px%3B%0A%7D%0Atable%20%7B%0Amargin%3A%201em%20auto%3B%0Aborder%2Dwidth%3A%201px%3B%0Aborder%2Dcolor%3A%20%23DDDDDD%3B%0Aborder%2Dstyle%3A%20outset%3B%0Aborder%2Dcollapse%3A%20collapse%3B%0A%7D%0Atable%20th%20%7B%0Aborder%2Dwidth%3A%202px%3B%0Apadding%3A%205px%3B%0Aborder%2Dstyle%3A%20inset%3B%0A%7D%0Atable%20td%20%7B%0Aborder%2Dwidth%3A%201px%3B%0Aborder%2Dstyle%3A%20inset%3B%0Aline%2Dheight%3A%2018px%3B%0Apadding%3A%205px%205px%3B%0A%7D%0Atable%2C%20table%20th%2C%20table%20td%20%7B%0Aborder%2Dleft%2Dstyle%3A%20none%3B%0Aborder%2Dright%2Dstyle%3A%20none%3B%0A%7D%0Atable%20thead%2C%20table%20tr%2Eeven%20%7B%0Abackground%2Dcolor%3A%20%23f7f7f7%3B%0A%7D%0Ap%20%7B%0Amargin%3A%200%2E5em%200%3B%0A%7D%0Ablockquote%20%7B%0Abackground%2Dcolor%3A%20%23f6f6f6%3B%0Apadding%3A%200%2E25em%200%2E75em%3B%0A%7D%0Ahr%20%7B%0Aborder%2Dstyle%3A%20solid%3B%0Aborder%3A%20none%3B%0Aborder%2Dtop%3A%201px%20solid%20%23777%3B%0Amargin%3A%2028px%200%3B%0A%7D%0Adl%20%7B%0Amargin%2Dleft%3A%200%3B%0A%7D%0Adl%20dd%20%7B%0Amargin%2Dbottom%3A%2013px%3B%0Amargin%2Dleft%3A%2013px%3B%0A%7D%0Adl%20dt%20%7B%0Afont%2Dweight%3A%20bold%3B%0A%7D%0Aul%20%7B%0Amargin%2Dtop%3A%200%3B%0A%7D%0Aul%20li%20%7B%0Alist%2Dstyle%3A%20circle%20outside%3B%0A%7D%0Aul%20ul%20%7B%0Amargin%2Dbottom%3A%200%3B%0A%7D%0Apre%2C%20code%20%7B%0Abackground%2Dcolor%3A%20%23f7f7f7%3B%0Aborder%2Dradius%3A%203px%3B%0Acolor%3A%20%23333%3B%0Awhite%2Dspace%3A%20pre%2Dwrap%3B%20%0A%7D%0Apre%20%7B%0Aborder%2Dradius%3A%203px%3B%0Amargin%3A%205px%200px%2010px%200px%3B%0Apadding%3A%2010px%3B%0A%7D%0Apre%3Anot%28%5Bclass%5D%29%20%7B%0Abackground%2Dcolor%3A%20%23f7f7f7%3B%0A%7D%0Acode%20%7B%0Afont%2Dfamily%3A%20Consolas%2C%20Monaco%2C%20%27Courier%20New%27%2C%20monospace%3B%0Afont%2Dsize%3A%2085%25%3B%0A%7D%0Ap%20%3E%20code%2C%20li%20%3E%20code%20%7B%0Apadding%3A%202px%200px%3B%0A%7D%0Adiv%2Efigure%20%7B%0Atext%2Dalign%3A%20center%3B%0A%7D%0Aimg%20%7B%0Abackground%2Dcolor%3A%20%23FFFFFF%3B%0Apadding%3A%202px%3B%0Aborder%3A%201px%20solid%20%23DDDDDD%3B%0Aborder%2Dradius%3A%203px%3B%0Aborder%3A%201px%20solid%20%23CCCCCC%3B%0Amargin%3A%200%205px%3B%0A%7D%0Ah1%20%7B%0Amargin%2Dtop%3A%200%3B%0Afont%2Dsize%3A%2035px%3B%0Aline%2Dheight%3A%2040px%3B%0A%7D%0Ah2%20%7B%0Aborder%2Dbottom%3A%204px%20solid%20%23f7f7f7%3B%0Apadding%2Dtop%3A%2010px%3B%0Apadding%2Dbottom%3A%202px%3B%0Afont%2Dsize%3A%20145%25%3B%0A%7D%0Ah3%20%7B%0Aborder%2Dbottom%3A%202px%20solid%20%23f7f7f7%3B%0Apadding%2Dtop%3A%2010px%3B%0Afont%2Dsize%3A%20120%25%3B%0A%7D%0Ah4%20%7B%0Aborder%2Dbottom%3A%201px%20solid%20%23f7f7f7%3B%0Amargin%2Dleft%3A%208px%3B%0Afont%2Dsize%3A%20105%25%3B%0A%7D%0Ah5%2C%20h6%20%7B%0Aborder%2Dbottom%3A%201px%20solid%20%23ccc%3B%0Afont%2Dsize%3A%20105%25%3B%0A%7D%0Aa%20%7B%0Acolor%3A%20%230033dd%3B%0Atext%2Ddecoration%3A%20none%3B%0A%7D%0Aa%3Ahover%20%7B%0Acolor%3A%20%236666ff%3B%20%7D%0Aa%3Avisited%20%7B%0Acolor%3A%20%23800080%3B%20%7D%0Aa%3Avisited%3Ahover%20%7B%0Acolor%3A%20%23BB00BB%3B%20%7D%0Aa%5Bhref%5E%3D%22http%3A%22%5D%20%7B%0Atext%2Ddecoration%3A%20underline%3B%20%7D%0Aa%5Bhref%5E%3D%22https%3A%22%5D%20%7B%0Atext%2Ddecoration%3A%20underline%3B%20%7D%0A%0Acode%20%3E%20span%2Ekw%20%7B%20color%3A%20%23555%3B%20font%2Dweight%3A%20bold%3B%20%7D%20%0Acode%20%3E%20span%2Edt%20%7B%20color%3A%20%23902000%3B%20%7D%20%0Acode%20%3E%20span%2Edv%20%7B%20color%3A%20%2340a070%3B%20%7D%20%0Acode%20%3E%20span%2Ebn%20%7B%20color%3A%20%23d14%3B%20%7D%20%0Acode%20%3E%20span%2Efl%20%7B%20color%3A%20%23d14%3B%20%7D%20%0Acode%20%3E%20span%2Ech%20%7B%20color%3A%20%23d14%3B%20%7D%20%0Acode%20%3E%20span%2Est%20%7B%20color%3A%20%23d14%3B%20%7D%20%0Acode%20%3E%20span%2Eco%20%7B%20color%3A%20%23888888%3B%20font%2Dstyle%3A%20italic%3B%20%7D%20%0Acode%20%3E%20span%2Eot%20%7B%20color%3A%20%23007020%3B%20%7D%20%0Acode%20%3E%20span%2Eal%20%7B%20color%3A%20%23ff0000%3B%20font%2Dweight%3A%20bold%3B%20%7D%20%0Acode%20%3E%20span%2Efu%20%7B%20color%3A%20%23900%3B%20font%2Dweight%3A%20bold%3B%20%7D%20%20code%20%3E%20span%2Eer%20%7B%20color%3A%20%23a61717%3B%20background%2Dcolor%3A%20%23e3d2d2%3B%20%7D%20%0A" rel="stylesheet" type="text/css" />
+
+</head>
+
+<body>
+
+
+
+
+<h1 class="title toc-ignore">Multivariate amputation using ampute</h1>
+<h4 class="author"><em>Rianne Schouten [aut, cre], Peter Lugtig [ctb], Gerko Vink [aut]</em></h4>
+<h4 class="date"><em>2017-02-18</em></h4>
+
+
+
+<p>When new multiple imputation techniques are tested, simulated data sets have to be made incomplete. Often, a univariate amputation procedure is followed, generating missing values one variable at a time. This procedure is repeated for every variable that should have missing values. Van Buuren (2012, pp. 63, 64) explains in detail how this can be done. However, there are some drawbacks of this approach. First, a univariate amputation procedure makes it difficult to relate the missingness on one variable to the missingness on any other variable. Second, both simulated and real data have a multivariate structure. Applying a univariate amputation procedure to multivariate data would not do justice to the complicated nature of data sets. For these reasons, function <code>ampute</code> is developed to perform multivariate amputation according the user’s specific desires.</p>
+<div class="figure" style="text-align: center">
+<img src="data:application/pdf;base64,JVBERi0xLjUKJdDUxdgKNiAwIG9iago8PAovTGVuZ3RoIDIzNjEgICAgICAKL0ZpbHRlciAvRmxhdGVEZWNvZGUKPj4Kc3RyZWFtCnja3VrLbh3HEd3zK2ZpLW6n349lHMQGDDgAE+6SLAiSEgXwIVE0DP99qmam69Ezl2YuVxQkkeK51V2nq89UVffQTRb+uClYY2uZnK8m+TZd3Z99nc7s9DN++QRfTGg1Tb9PCMNfN1lT539Pn3YAn0yzwYfJRdNidGm6n84OW/QO0Wqcja4wevDN1FpDnFwwLrXWJGRNS82m6QrHdvRA8J2GeYLu5iD8dEKMXQnyB8lzZ/yOmx1COOOG/J0EafAmEtuIwWy3eoUiwj9OZ+d9N+ZdRRa+wvdgbI64q87AJ+s/+f+r+0nvOE8BrmyG70Am5oST/Hhx9pef6tRMyz5PFx+n1aabXFxP//7h2/Pl0/OH/178cvb3C5ptMIS5ztnVSpa4nvfl8I5EZ0pssWg9MawExbCIVwwmhZCDwpIpIaYyaCoXk5Mvg6Qy/C8FYCgcFWdyKFUqqkNKUB1UeurgjostF6km5n2n0L7CnUDshGyjqM4HQvyvQU0wMyghWxCsP1FN2eAyDrmaUMq+mBaT1WLWkjPXl8+XGzEpw0FLM1VmSlpy+AzGULSWUjMuFK+VlLJpAUkxmhJO6ESQGREiIlBIiLG+uzx/DznREOphwkI9DpNGjFlsl8NM4GsVDgTE8mFQykegfWXCB61/J3qLfmh1R9UDH7gKiThVWPWpucg640uel5jakVy02qwms368+fL0+GWjH22pBXRY+TLdrYRk7u1bJ2sGbTCBPUyU8wkQ5YJiKcsFgzSU5MPTd/3IesF7JrmJ3SWYRUBOBCQYEioZMsiDuw/hYozdoB8ZUy2gDJMFWK03Pp6YfVowfi7sPkOp2U8/q003mfUTzJfL5+ebp4dvo4YG60FDK2VizBJqkIhrdFlpCGJlXCm5KBU5eNQagKILcBESW/Pw6HKsGZIbRagSk4R5gu5GCIIIaUURey2pBgWnJrmJrmFgm1eOBCapEqyYMsrjVzfCyyaai6rkOo/qyqUCpQ9bRBObOzEx1YLBW5RlQ93PTKtRt5mlFc3Hp5uvm9Q0mA666pSJsRBWMT7lGnV9c9FD4Y+t6gqH8Sk2WpXiA2Q8iLEqBQITZU7AotBJlCoRO6J6xZRktWP+styBCsBnEbYek3d0TbVLAhP9EqOqYRIwrZP9cDx2Irqqixd6tOrhKn1ob2yaijcBE/1LXdNqI9umZO5vrj74+sPt5cPnb/cbkekho8ZW5ns91MunP5Ee4FGNMTid3AhVyY1QlbPgSODLXEEFCLL31Y/5zUcTYg5hTHDwCKVYMIOIDAe9cQhASaU4AoccR7hOcjyHyGjsTYKdmspzvJK7AaZVkzMKzja221RHxPbOhC4FGIdm0D/XmE5NePjMYPMAyq/xSL5bbFaTWZL/sS6CFm9vrrcpT1lvMt7CWpDm4yHEBCJlh/Ohh8c6NJeiznnwzIO1lV09yNxEOHQGeXgSmEh5AhYpT6KUjMgPpSwmJE+HzF4eDyHrhFabOh9Cd1dhX9UBkTF5QiRUHxEZpmWyHw7HTjwXkYl1Hs14PjZQHzb66O3ERt8XcOSXRj/E/Ua/26wms7yy+R3z3c3nT7f4/XnTrw2DBpV17kxdiQwKQ02qY4O+zlRni1Mdm4dnMdtW5E0O1IoKZUTc9hAib4o6qNo1gdJociHuo4iMvs8i5vpCq2GLgeVXXGg1U3JoypHA1JVWh/WdFqE8fnUjvGwi2dVFyzzarOEaHeoPHiVfThUXVrblRstbf0Rcs003mcVVzNXjwyyrz/O33x5/29GXGrfR18KeyJO8QoWcHwZ1BUjkMegzZcCTRnBW9LoBygucshoHnRGxZQQqbQmUR3cXB+FjoaKURaSVsEKFqhbgRzm8RjwnSWEJSJLsqOJIIA/uPoSLMYKLqsQCj6oqwNPUbHvT2TIUmKPllw+X3UidLqt5Rjn98eXDAXPXKKlxzKCpzn17yOTtkWWRdlIWRbHlBHPgqFoISNRERkVJFGAvVsJJrx5ERhREpi3qoRAVjSUBsQeGuBoyKIuhQGl17IODsI3hKKujlRB3Bhb4tt4fd39+WfFC799tZO/fzOMsp+vrb3uCEuY7ekLW/3/fHzMkvVLbILgITy10xDFryUWHt28Om1uCo4XqXEtIYlckJkQnYKE6iXZRCEd9qwQlITzBXygvwvQRCpjYadh243O0yovAWHsCleKTMK2T/XA8diK6yE8sVOhv0+xH78HrGyUYk8e6/KIEu42U4PFef7AeFNhJv0WBMtfzbssyxbIglINKhUZAokqJ6Ms6JWGagNXHflh+sliJ3VZEWRg8AwuIPQlMciVYUWWUx3c/ws0mnhv5vfgCkvQHC07tjfLDpsq+LL/V5JXy4wn35EeUWX1wLEop4GtwpAyHUuzmoOrer0AoBrZ1DvBSChazYalktqw5IJcyf3KPVTw4SCeQg10tsOUWH+484dbN7xxNSjbilTKcJOcNPqwfrYb9xz6QRhzUEGXbnR66V0HparqdPk7n07QbhuXXBmCmlE1umMbwVQgYoOQFSgEZt3/H9v1HpYKsoo1L1gY/s0AYdBVvepzXMnFdKvjDjvH7D4vD58VXmHWhf+ZCNi7PhO1xiSir7yAKBZ8Z27zOHwL+8yyyY/z+A4MX8lBIvE4mPiQTqov1Ndlkz/jdBearvvCw0CNBgA5Qs0o58bYWb1bmoxP0oGn/snY1WS3mAvrrX/+5ud5QVuPtxkqVmZ6LnVZriibj76VAx2H9qUuK+EYJ5oAUa9uRNS02q8myqH/srUrZbZa1sCWyf/JUQz9e4YiVhqe6wXnRgTZf91iT9TuXryvBNLxdrvPbihP3GnbAzi/gMD55f69Xm9Vk2eu/7ey1thtfM6x0me35kWSF/TMcx6qq8QJ9RZHfs/4O0vj8Iit416t88NZEjy9aXyzz2uydyz7YNN9rJVPTiTk7QC1Lbr6XjVDU9rN2N+o2s+z/mF+BbK99Btvx3melfCDOx6TfvLHQ9UfdwMxXedHiO0F8S+R9UNqvIWaHYUwpz9ro35cP9ka/dw04vPHBXzOO+Jb3RBVE2A6PvSLkLWfdvgpWo24zq+DhcSOAwWwUwMqX6R4RAF6dwg7VpDu1iALKPr6mUdux/Q4OwxSXNfPRKl9MfMrqPUYB/j7MX/8Hv8RciQplbmRzdHJlYW0KZW5kb2JqCjUgMCBvYmoKPDwKL1R5cGUgL1BhZ2UKL0NvbnRlbnRzIDYgMCBSCi9SZXNvdXJjZXMgNCAwIFIKL01lZGlhQm94IFswIDAgNDk5LjU0NCAxNDMuNjcyXQovUGFyZW50IDggMCBSCj4+CmVuZG9iago0IDAgb2JqCjw8CiAvQ29sb3JTcGFjZSAzIDAgUiAvUGF0dGVybiAyIDAgUiAvRXh0R1N0YXRlIDEgMCBSIAovRm9udCA8PCAvRjggNyAwIFIgPj4KL1Byb2NTZXQgWyAvUERGIC9UZXh0IF0KPj4KZW5kb2JqCjEgMCBvYmoKPDw+PgplbmRvYmoKMiAwIG9iago8PD4+CmVuZG9iagozIDAgb2JqCjw8ICAvcGdmcHJnYiBbL1BhdHRlcm4gL0RldmljZVJHQl0gPj4KZW5kb2JqCjkgMCBvYmoKWzU1NS42IDU1NS42IDgzMy4zIDgzMy4zIDI3Ny44IDMwNS42IDUwMCA1MDAgNTAwIDUwMCA1MDAgNzUwIDQ0NC40IDUwMCA3MjIuMiA3NzcuOCA1MDAgOTAyLjggMTAxMy45IDc3Ny44IDI3Ny44IDI3Ny44IDUwMCA4MzMuMyA1MDAgODMzLjMgNzc3LjggMjc3LjggMzg4LjkgMzg4LjkgNTAwIDc3Ny44IDI3Ny44IDMzMy4zIDI3Ny44IDUwMCA1MDAgNTAwIDUwMCA1MDAgNTAwIDUwMCA1MDAgNTAwIDUwMCA1MDAgMjc3LjggMjc3LjggMjc3LjggNzc3LjggNDcyLjIgNDcyLjIgNzc3LjggNzUwIDcwOC4zIDcyMi4yIDc2My45IDY4MC42IDY1Mi44IDc4NC43IDc1MCAzNjEuMSA1MTMuOSA3NzcuOCA2MjUgOTE2LjcgNzUwIDc3Ny44IDY4MC42IDc3Ny44IDczNi4xIDU1NS42IDcyMi4yIDc1MCA3NTAgMTAyNy44IDc1MCA3NTAgNjExLjEgMjc3LjggNTAwIDI3Ny44IDUwMCAyNzcuOCAyNzcuOCA1MDAgNTU1LjYgNDQ0LjQgNTU1LjYgNDQ0LjQgMzA1LjYgNTAwIDU1NS42IDI3Ny44IDMwNS42IDUyNy44IDI3Ny44IDgzMy4zIDU1NS42IDUwMCA1NTUuNiA1MjcuOCAzOTEuNyAzOTQuNCAzODguOSA1NTUuNiA1MjcuOCA3MjIuMiA1MjcuOCA1MjcuOF0KZW5kb2JqCjEwIDAgb2JqCjw8Ci9MZW5ndGgxIDE4ODkKL0xlbmd0aDIgMTUwMDAKL0xlbmd0aDMgMAovTGVuZ3RoIDE2MTc4ICAgICAKL0ZpbHRlciAvRmxhdGVEZWNvZGUKPj4Kc3RyZWFtCnjajbUFUJ7bsi2KB3fXH7fg7u7u7vy4uwZ3DRbc3SG4BYK7uwYnuDtclpy91j7vVd1bVME3ukf37NGze0JOrKhCJ2RqbwwUt7dzoWOiZ+QGiMgpMzECGBlZ6BkZmWHJyVUtXWyAf5thydWBTs6W9nbc/yKIOAGNXD5sokYuHzw5ezuAtKsNgIkFwMTOzcTBzcgIYGZk5Pofor0TN0DUyM3SFCBHD5C2twM6w5KL2Dt4OlmaW7h8HPM/nwAqE2oAExcXx+c/wwFCtkAnSxMjO4CckYsF0PbjRBMjG4CKvYkl0MXzv1JQ8Vq4uDhwMzC4u7vTG9k609s7mfNTfwa4W7pYAJSBzkAnN6Ap4A/BAHkjW+BfyuhhyQGqFpbOf9lV7M1c3I2cgIAPg42lCdDO+SPC1c4U6AT4OBygIiULUHAA2v1Flv2L8Bnwd28ATPRM/0n3d/QfiSzt/gw2MjGxt3UwsvO0tDMHmFnaAAEK4rL0Lh4unwFGdqZ/EI1snO0/4o3cjCxtjIw/CH9WbgQQF1ICGH0I/Fues4mTpYOLM72zpc0fEhn+SPPRZTE7UxF7W1ugnYsz7B/1iVo6AU0+2u7J8NfNWtvZu9t5/w3MLO1Mzf4QYerqwKBmZ+noCpQS/ZvyYYL9x2YOdAGwMTIycnCxAICOAKCHiQXDH+lVPR2AfzqZ/jB/KPD1drB3AJh9iAD6WpoBP/7AejsbuQEBLk6uQF/vfzv+G8EyMQFMLU1cAMZAc0s72H+yf5iBZn/hj8t3svQA6DB+zB4TgPGPn/986X2Ml6m9nY3nP/Q/75dBVVhNW0aR9i/F//EJC9t7ALzpWBkBdMxsjACmP4aM4+PD97/TKBpZ/l3Gv2Kl7MzsAVx/VfvRpv+p2O3vAaD6ezmoAf+dS97+Y2qBAKp/hlyXkY3R5OMX0//zqP8Z8v834X9k+b8N+f8uSNzVxuZPN9Wf/v+P28jW0sbzb8LH0Lq6fCyAnP3HGtj9b6oG8K+llQOaWrra/m+vlIvRxyII2Znb/KeNls7ilh5AU0VLFxOLv6blL7vaH1tmY2kHVLR3tvzjWQHQfVzN//J9rJaJ9cfT4fwxkn+6gB+b899HitmZ2Jv+sWLMbOwAIycnI0/Yj0v+QGwAb6aPXTQFevw5xAAGejt7l48QwIc8X4CZvRPsHzfKzgZgEPrD9BfiADCI/AdxfCC5fxAngEH+P4iTGcCg/B/E9cE0+gdxARhM/oP+UMVg+i/IBGAA/gd+FM3wV0v/IXykNvsH/oEs/+Gz/AHd/pXgD7+9q9O/4j8o5v+CrAAGi3/BD8GW/4Iftdr+Az8Wh8Hun9wfsuw+ruFf/o/i7f8DWT+C7f/L/VGMwz/uD20OHyNu/y/1H/8uGBz/BT+K+1fpTB/FOf9z/B8I6Ab8V0EfdOePd+GfgI8j/mndx3oxuFg4Af/VnQ89Lu72/wr4kOT6L/ihwP1fvf5I4Pkn/K8hM3F1cvp4Z/98Bj4m8H/wn486EOgBNIFdXrA34Qm2qg/ueKgVwnOn25vgmyXf00ilpvNedup0fUL8lExdkxm46XQnlDz8E3ltR4zqVnCF6NX7uLXhU1hbolL7s8+LwVfl6b122KUpzIHJwmOh7/0EMPh0qoL7Pq+OPuoB1uCtoD+kyXMdXTkRFfPRHtz7JDy+95evjoUu7Cnt17DLwL2Uz9DFqEXrBpTMkecZZ81jk0C50BFA06BeeCDN3d7NouZMvhNJf6WF9T2JYSny1t5ijn2c91qvVGV27sYhw9HGJgC/RR2bpvAWPkyRxlr0Li1aG1jyaOUtIspB+PxtjQ6Z/pA5o8ZSOcquubfObWy5i2k3NxkQTIk3gLabWFfWjG7gRKKAUdNuEIXmUsdiDSQ47DITXu+4U+8xs/qGv8I18/0dMIegZXHs39Lj/dzguD48MkB3H/qt7WG4eWSnx1ejRKBfAN/cnYlGzEIncm2VO4PgG2S5yzhYtwZQCh3584pbMucLpFEIr3fgpfATLtN2ISOjNidkL+gY/hlbrs9lrG9V44V819YcyqKNO6pe0HsQu/y78Y9vFxeFOBYsYoaZoVR5GWI9EXkbcZRKPPXAxrmgcoaLrSpMetEyTyLZhG22pctBsiJWKYnevcXq4UjdQE+rR64C+jP1KrX2eLYCJeLdkyi68cPGgCHhoJA+rjvTw+27igphfYwje/XHiyr3cOHh2F+qHMF5EV3K/jndzgppEkJRYMX3O/O9MMakp6rCbsS2zXFIGqp8Tzvj3cUv7p/LpUTJKYuW5fpljnjDfJb1lkSLenFq/QUxI26b/ZnrOxUeqEDgM5HXY8kz91fBSQ06h5vVL99whfFUVB/ySb22QHoXZ8Z3iEend8i8bap0S1j7WgA8bNFp4DZfKYgXd/zTrzf5qKIj38wiWzbU3IUaVvDrMuYGgJsnQ2MQwqSfOlkY0fknTiQBhWWUmRuyRbTo7wuJ2VbbXlmCT0RxLXzVzrr1G+i3vCEVfLrdWqBkm6IC4Wq/Yab2X9iTc2Y8JPKU7AYr8NIjcXYta8gXkrKJF6dhZZlBsOp0stNRbnaK/KiJo81CNAOhTQ5RoqBBdnjnKdGH6uNSLpXRFFnE8oiD6bjrUChRtt6mhBClkWroIZf76kWkJ0CkXcpBKHq9OaDi2etgSQPUp3qnuo/nFyTn8RKvoxjKRhDFF83dScTZkuLcL1XCyXxq3gPslXgnDia+wcFNG35p4s0iZGIs84FOe+dtP7I9b2h+XMrcGLa42MgN3qw68odubKytzRAYxjEUuOZIOcaEMxjLhdRJ7rrm9FDkZWWaJ7jmc5l8kARZQULgYU9rbfF1knFlOmJ5TlcTAYG0TMdskHSpqp+e9b3zxCZcePtiQkiuu+l47q/b1rbPqsDqRqyTYXAv1ZZfe/695gVjYN8kCpdxk6DiSk76US5Hi7FyLM7Nm30TO2lB96EXAOaU4zicTsKCw3cPnpSlOqMlQ78mg/17mLrnM5bEiIy3UbiItrBEdicsIYHnKhVipAxlaC+zAuOs+rdqdilFMjKb56Onyha6RKwtnW7s4zng+HDUwyAuNI7M2CIFM7l5knGNV9i99BhO2mdX+y9ylcx92F4brglpuWFz7DTp7TTFCP0/ESqm37l+TJRuCvQVyCRhmlBjj07e/9K9MM9xqaIQKNuJney7ebaDUj1270zc7yDLNZXXFWnJKJxYUbhbmBQs0mD2IDrkdCSWNZ2p3sGzP/6yy6TOED0kzCdYd/N0SsyY0KOVZ+/1SHb6OHU/6E/eV/VjehjD/dfGL2Y9+/LeTUC1wauAlMUokuthnrDtmTgUFncjEyL0UoopdNmQJ/t9YPfKBoBAHKE0GFvWjk3lyp2ijO54trYmW8LroZTrNzbfEGXCLtXYa4fUi4X8U8OC964CKgAxlQlc1s1k3hYD0rKxuJtiiETu5Ldtn2CzxnxoFXZhle2aMTnjciokzZNh+vGnvrzEzUQGs9veLJtOckUx5jxuQnUhahVhWYZ93nLMMza0cpFsoYLN+ywbnmrv0W44KtK2JU1IO3GoBBLoKJBUkGBOb+Ul+wSUnj5VLKpdA40LMGOhNz8ZH3s5OAO0hdlvGiibb/hfOxE8d+UO39n9K3Lr9DvvjVyyiaAFFZiO8xiyQMQviZKaWDwJSdN2TJDk5BanJPq1X9d1wG0r39u8JqPF/aBgUG3KHytIfkrzVwMhltSF4zSE8X0P1KnjIdZUhlYtcT7nnQdslJwro2K2YBZ1tovHDIKXdypm0R92ykJM+3s8QBRjG+hMaKqHo2ANXt8o5dYgqCq+37oF5T7CAkc+Jzi8reAGOflZJD61JLpiXsYHRxvS2njjQt8Dle4X4g0EzbDYWXAlNxWN3Ka9cNTGMQxqc8bRB7QrmAhpyncHY1Br4uRoB40d/EN5vNfLx2ACqpRYMA/V1XmW8jrGw2cREVCrFegVsrcsP3dwclYsEAad9IaGmOfw6fJtCZKIbz3JiD+o5hk/p37tUg+ItaGyMa/uyVoxnqmKWSduOSyfT5kf1f31+mjEqsSEVTv2BVDBte2oXtRSMlYESHDWtz7NdzaNzbBD9PraA/2pquCgkHsBXzbbC0cvFuWi3Akusii/PMhNXrQrSk6Cg4tMStbyjSJRaMkc75edDbsnaJg0TJy4QuMVrwzM3rHieKFCrJAQ9ohbaKLfxoxNPsVB44PW3mID5fIEiMbK1F4QRXc+Y4AM4A0HI53BEsZyecYVxjgb96cILOdgn5eQZNF8DgsorCf9lU6uR+v2uguTkGtVeRa8g9AkvQ5rgcoSs7F7Eq0JwKWs8EweiIttgS86Vr8O10+SRkz4ZbeCh5bDQbfQ3QMHVWtbAlZ/nU2senztMBEDFT/HYK01RaLx/tfFkT8VoRC8TTPa9BmT4RqnK/21K+3ZzjLJ0zU/z8VnP6/hhmlyWPv2ms1cD/AhxlTnQJSFIRxUDSZxj8mzucNvmwDzN9uvMY0e6p63jSso01kkeqReX7C/lTi4XfUgZBGEfk27W+ovpXcS5oogw7Br0RKpEmF66nMpNxUkvS/lBJmylg+bi5KpBc2d5Sno/j2XaBMg/kQFBbcULX8dWQzKs/WryPSt8ufzKWhCFfLLJk1HJO9AcV7yTj9aMFo5uHN3MRdvo0QcgoiYYYj6Ub7FVudwHzmGUuKEeJG9Ymff9jRKkB9ZeXwnyTQLS8e9Itci14l2jDNXGCil4U4VIcKJ04rGI7d8UtHJkPPs7WBSM5EglFkQfKY+gcZ6CAUzqztqmY0X3D7ZHLPGOVq9+3rIwIkCl/F7wR6JQnEO2si4Ri+NOKreOkOxoWd5tFIdTPhwkq5S8k88cZryNUtVzMuYQ315wJ2pQYGcYVBhqAq56nf5NhmOuBpoWuW0hRMdp6KMlyGt2360Uy1HoG9H3RI+fFHU/ZJWmOLTDeyEOKiaWP7J9Vv0xaxMUPc8kmQ0ZX0jP6i2kuAEktTylgt5we57Sma3Tik1Rx9F10uuxYRdFnwdzpEW5dyq0c8m1d5LSk0nv7nNNAY7A7tkcGnZPEw4aKoUQdj6g9zRqXTYqkZ5Am8Z8cbN1Qt96wzjjZ92v79gnhrK1hToQa8aFarlgbb2e7+Eo7ptn8turrXt57Mm3jClkvmhOdkKvZ85J6P/HLi+stPeBKdJa+crux9xvr2wz0A3FvT+6rkAB00sIkIU5Y1lAk2v4afddHJOuM+IZQe3ZewQYu6smGpKRjete1czMZdBIcvr8AMCtQXJBg3ep/VLRgPn4RP9cF9KE63ZxKCXZ6lbENEvg3phr+qRsJzQG2YBt7kOaCiw39cdt4thvZqgRgXEnDjzhbawKath2Obuy8SfYKEfOPbEYbQEPVX0vlyG5IClVT3a2AsvHFUmwhClZLkRMz4eNkeKJwXCr28+nZWJbRrphAeaPSh6sPpLhuRi+Pz+pPHSwLMqQbiAjqyFRsIifMO2fP2y//BLUpdktkIH6oEpZSLt1IRN/oGr3IGfmUO6Xfj1utGZAfwsssmc6qbMA0PpM6ILv071Nud4ooRzf0sAN5EyGZceOzpF+JOtZzW1ZSNOpNvwkdXPO43SKNk+ZWF9AmVhI5sfxx7fDXIXtbK469nkSmogNvfPVtHPIz+hxbZXITXi+ZU+M1gVhmz1L+cR+24YJp0di1Jo4PsPle8uKGm2kkFJbpYcII25SBVWdcD4Dc3TL2vhXwou2WFUOKUgG9yc2K0F/IRG6FJ42XERkoekk0WwS4n6JgBpsIGpbxCyao6e0PglG3MgjifGkLB26rRURjhs44Id2NfUs0ZU87UFlj/p0OaHksPXUNyKfL9Z6u7QpqzHxqIrhhieTyo4lPD6rbfcuy4Q0nVWgr/RPSq+B4lRMUqM8Ey0YawqOYLFlg0mWatStl5kI/Nk88Y74tkt7boGuNjIijAlavYB2MZxv8E6fl3sc5wpChDYjZryYhJRoe3GL1Bk6v1CCBwGU2Eeh2OpkE6RWxkJTrahupxtJIMmbAMOK+0x2DrIs8lwgGq8AiN9qHtXlzaMIiVTqra0W2drWF1j1Hx/9Pcd9N6UQqGrAaaJR1O0kk9+gzwSz4FKQc9p7ZXO5uDIkB+aFInVtJwQPmfwCS+PSenh+atAMd0DSK9n21AsEMd0lEJlLcq16PYCv6g4vXkasQHkFLUkyuaneAi5IGLw9SDKprG0QDCjQgTZ/BPWN6epcGEfMr/yw2X1BjUPi0paheUj7zhjOGEEeqylwO7T/+RfmVqoqcmbtP5WvWLTx0ORUkPKe7CSXnsFjKc2m94V98owbB5sFsjfkTIBEVSRpEjhfYfsSDiDALrZgXCiBWSJB+Lr7qjXlbP0XxtVCRF7enbscF/O0qJnmxAXeFxApgQaT8q9LUT8YjDzZdlMyTgeLR7cIZEoS0GpOqA0k3Oe/jRHpKmh9ur7ctfY3KLV1xijD+c/t0huNT5ILNl1HqUg+Q49PB5LZPDYFMVzGFY/ceX3dVu6xS0PsT5Ab40Ulmz5UznSKqWIhUAAWxpvsAr2K0H76Whtz6VgYhV2Fky6UWWDPx16mpCfSWTokY29BmiDHNVVHJQTSHMJ6arh4pSdlrfVqiGLjw2YG0G1YRullE3uq99WHfFew0ve7aziz5ET76R8KLGa1HO+CQejQ324gCWLYwVrcMOs5rOMHYeHJ/gqTlfPNTKnq5T162RXWDNfE8deWrYezy/Er+t681lPeA/dJ4hqn6tAu1xyqfctuSWvcrsUQvpWqaoNgAoBRwTi6l1vjlNQmPyVrodbfXQS3OG/Lvu8grJDMiS1dcnj1E7dlrpBCBGmvHb0sbdGhWM8yf3lVbdbmlj4sKs1j7cEOmzRpRMeMOlmWYLvCSx3FiUF1+IDzCaDXq1blOmPM25f3Sj9B23pUSnHVXZ+iraPLdt4vhBhcyRi5sNr3S6IfK/qtz1q1G+qkXBlM5DI+PTQuMxU/IzkwhA9B/e2FTO2fQG7xRpRx1RlF27wLMrv6wBFu29Wbs5lQUbwVNoPqid4LvdouKQ/0yohc8fDVgFV6D543A6xK+XkeC5UymImFLiphWLpWun/c32396pz+vxkBlXLCfmIQPT2jjsuZsWU8JNyEfg6IFHIBQX+mK48/jM69XabUXnhcJvF9iSXzlyJ6zu0ygE2l0wCTjBKn6pMmZEm2a67+XBik0KQzjaYRxSe42BQgSeEFFXKe4cVMptsSblUt0mjr48FYTfZVy/RbTS1yZ/x7u1aMbSdr5Xa3BPnB32Thf2ZTD+uGm38loHdeIOghq4PgmC4PhCVJ0QYC2vhhw3pA/or7HhnDNme08+GRhd5qMVDCJE6NRORyIYzXWNi2QU/3XF7IE+MCPHg87z2La9kjYKxUH2tRmoPhgWfCyL3fPv9PJD2zzWaID+l7dmFOcemMtrRIHoj1tgIaJd5XUclj6BG8bcccJ4SOdDJTlMMFTyDn8sY8gMMG0rJfxqm5J+t/xh2LhdocxttH9DXfYmgScBYeFUa+VUqb2wWQrva0bURnG1PAhOzXKIG0+E1fW3+23zcaDc23rVBPHc6jbcXTfPJc72lvHIK7ImmA2zI/O6dVUCTWe9nPGupZPp4fsbiVbp+z5SjLNC+PjNV7fT6C/x9UULCFAf/CfVA4XWapF18NlhbaZUQB8mRt2ioMi8Ds8urXP/gzaPzXrH/szWXlOZNgllBWeY0+Pb75OszLdpysabYSUkK8hD971/E3VO9JDTSqyociN0rWoQ10PiHkOdWqwgEFDPLQofS8LQV++E/WtuhUVdQ+W5T5PP2yNjd6lVwVbVQIkhXsatlv72zTpScHQhkgExS3p3c9z76iWOZqkvILnymPcB0xqiUeCvc0mdoKXNs6IUYvgO1iO5Hqnx81Cas9AoWLXMRhGe5B6KmZ+Qcyi0J8ltR82pYGO7KdYTzvy/mD79/+QXcOlUXlZ73+dbWponkO10i4hQ5hDWgOiQ0dAhnhv0KllqQkKToywMZSTLbIXM3SzrxVTW3GVH8/kn3APf1Xn8uEZwAFxyOJw2m2+e3MkBUty8QQdJ1jv1dqf91KpUyS4llyJjHg7QllojlmkhljLvcyhjldJW8xUX66ycG/pE8hfezTAIn9Y2AnzgeerWtUB381NvnOT2Nev42WY/gbPZdyDoHeVPiPMif5SlKKdEsyyJ16+SVeqSuJOfGb6aIugVUuU8Fl8TPsQ7k3+E+qWj2rDPW8VZSt1tsaSxABXSymrWKizZbxK3SL31XBaPWV4GcpiMMsXP3ff0MF64t3yKGMSUCelNzD6cFF6MMCWz0+jl3d8HSMaML27Tkcvr2pvWLzTAOS/yLQYZHT0wQuFq2TxSlZkLjYFiwhCCS2gIyuxScLlFa8MHaHf8L97C6wTPYMP98MReNFKMv5myjLon3Egb0OYvaitfA5bDrrnimGfjYcmHIreJm6Qi1WHw4J1Lgi1pR5pM7dfWFOVrkKIbjHPeWqRVpUWvNGka4xSfHQbiizA5newS6VsEEWBlwCY64HZIqH6WpMLD98qc9gPaVl7NPSKBvQZ/sfIMKWmQRt79Z+bxtR8lPIZbzuIULFTjmPj6crws6302blxJfpDN1175jElbhX2GanKxg+788IvlAjbp0WTFND2QIHTi9RWJUd09Xv+GMSbv9/CxD5AMKc9UQMpmsvhEfnwmb+pKhFNygs7bBq9ajyY0PEbiyKmBCe0e+VQdzKt++JqzCxhX6ENTzHTSmPJukd6Ev87v5oepRx/quvnGZRj801CpVPQ0ZINodqvLhkBojMjpxJ0QfXZ7YqapXy6uItyiUAsvpG4+QqZQIniFDeIAvLJ0VAJTdS3fU5gpp7DUyU4YVl2Y8QIYOZ3Fdo0hlTzFqvFqoXIIyqA+zb+0J6/vUzJjYOfPSlKQiRw9WDeGp1q7GMF29+DCqmNzXRb30IeGI7RwyVBC9S2ZyXqXW/e0v++AW+r8Id47GTmr9CgZJVwa9TYsd3KeDCUAsnyx/E9lDczkljqt523mN+rKr6F3zKRrsnGIGRDSqAjqUVB2UiuSVdUoi7xXsC181FNjL6U0HflXhChIfLH47FNLHrcY6kIGrXhNp5iF3WRtbCGlngNxXoW3R6EHQaUHLAyAcw1tPSAqTGs8ywhJ9kXiEE+OJLSccSoOQ/zYj3oHRfbNrav/waNEvuuQJKtIsyaJkt70HO+a/+3kM0UIHU4QCAaapPwfEMsfn7e0aeNTgzMcmgSvSV+nM00prCkPAFDZ0q5UPqYXKw1A8AymJrz9n0jxka5EUABZwzqMG7oY4gK8tUfWrM/dgolKh++gxwuRF3eoQuhowUu2iBcc3g6hOudrHNEZ4o+8kNPd0nTStIOlUyP0kngj6qIi3nNKyjvpEsGMUGjBSmmXyShmgM1DOVp4vJnkezCPclNZP6mnvVstZ45p4Z3BVT3PaqEF15GiuBO0NClLHmZwaOTN9s8bQAC2YO8JOopgI4QmUq75x8IpN9JhRGEpKTV5wmg10YAHuBjzjtIR5t9+he6fK4PCwNuR1JCHWeNDwLX/JyuRsUEuqsjgT+72O1lK9yWgzSUk50pfHIz3Cks1hwBgWwalpWj/KuGlnfNPDNoul/vN4hlupFL6Ojbsxs3Aw/1U0frH4Pp0H+xMC2WbXFe5OD7bASDuDPPCWEk9T77ZTGOcm+3AwoqzDz0QRPtJZ7xqzOJCbiWAPV1AzbbhkDwL2uVLv13lXEIq8qG258Csrmo0g1venmMt0bhHSdVZvjUYROVt7OIASEw5VP3yuRUJHQhDFQdoLtJs85LeRo+N2j4B7aqrMHqRzgKV8X3Qt7+VvBbX7pF0NxVioHDW3rkQClxQsWZD9dQoQvF+vshUNktw8Lreh1ZsbRvmo4/EKXuoQBfOvL1Ln3wJ79QQ+4eAkv53dE7jf2UjL0BnkUUUOy13JBMbqIDI4YnW1vjGYaXVbxEfAAUc2NpKHfhynqQrAWmMh3pkbXdE8Oz6A2U6KXOAwGTMdodkbpZC+ZoDwofCxeRXb5IiZBQpw9KRASPC7SlQv8c8i0k/PcIggCx9HFTkXnBWl+FHQqOUV92ZKyBCnjJ3hVRI2FoHn/m4yV4Sxu/DhbOO33H4E6y5uQniai9/Ru25neugqsfsxiLSEOYPTVDnfO6JDY9Z1LNh12Nivl6P1fWtuL97B+JmnwLh+2gryRq0UgVRCRGqvSKzjnHr+zbJIt3MW2SevesuZVcuxUDSpnz1Nx5yfNISy0lQLTohgpVOxaJUaRv440EIYa+hkJOCUYBLIEZVKEbVbMj/rJDhUsaQ1bd0KPJj0m6JhHQYvKS4o5vg95DSfFjcSKB2Lu07yQxg/FaAaBARzmo3TuVwlGO5UbqPCAbh/AvQ7WBKMLpUTe+lE49Y64Rw9PYFObsNpus15dISjZ4xyfJmq/ey5MFMDv8lQKZQGHi89R3EYnMk5c/E17ZLbyS5xrZ1RzJlPJBxJDrTzzHrhsyVM6xOtpGqSJBnhtj6eXiDRE1kEqyIduOkcSHkvhquQF7Vebt2XOllprazVJjl1Xz9s9D3FduzN0C4/l6JCsu3Vd7CfRLycKz6FdcM1eLcpe4e/PMGKnOLSz3tX+QMajyl4UtwlpHIgPjk+2BxFJP1Cc8kBSPyMhIHC5InY87yqc8xpc0yANhaz/kVK66JIvlbDQEK0dtcDv2xBY9qf3hD7leMSSq9AIOD4vBivFCDRqbxIS5aWK6rQnC0r+IyKBJl2q6z2eS0bf1Wode43o66jCtIylmgau7gnht8wOSvwzBwkDFilNPv4CLvH0/kG7bBWKfVDpUv497R6pXNfUk9722w2CBg203oFn6docF+pThzIt42jVkcpifJUM75CY6iDEh1Cr24yD9YGFeIu0475RoCr0KwctCQSLn6ePT1DdD9rzOGk03SczrXZ+ymhBkpSnbnFe48SERTaLutmorBJ3HdhZ4HIYaKNzlem4s5BO0sGcbIlOYffC1LZ22SWkL1eVPyqGIvfdbdS1hmVw1XyH5LdB8Nz33vPvkc9nDehqgxx+Ot5V/qLb/ZeDumz6D2o4djHAvoJKYJxsvfOF/PLpGk36ZWYAOE/5SnOi+L61CRVpVQmluixfTDJpq9BymXrjRFcKECIjR6DqpP3hM/nakFEzcZwIiKw6Dya0PBKkOyj+I3ZvbCEfb86iooRaN8NC7lSWdeOi3yFSbPUX3BqkWANvc9nDl5ZL6sjq5F1Yqr8xmy0Tn2qQiqfBilpZZX6owV6c8caWqfbtdNJuHLOIRqK/KluI3feACXXXB6lFx4xRQac0kYH3E1RvFp27GvCvr96DfHoVCQ1E1sDyBEjSa5hVjCN0OvKkTV2n0gZ1Pv9Zwvud2orpeBEpPKwIvhErzyfT90A9lkHfXfCRKdPSk3GcJPl/c8p4YydgxlfgmKvkBPFEHAovrD3syTncpE9NQPAtcT45PzNLLr1/ZuaZAvPAzDmFBFglqZbQ+uPq9VAErwsj3hN8m1kroOGBxCwFypOFqanaZnybQUu0CnQHbgINX8E+o6uRYN8Ztwg30gpLSq/kycm9kimQtC17f51X/3Un4Lp+gCPQuDV65pk4Mof5C+9DXdWnbiaukG6r1BPVKpCueClsjnzvSsbk8Tp/UV8z58ZmGjJazIxI4nXVma03ZueNb3EaOqyjqjHLZN/mEHm3bn+OWM82k6S5bp/tulTV7nPYwDDGl5kijWMDiqvdC4htQzR3pRPCGHAZyPzerJ3afp8Y3/a+oCT2h4vPhs7jremn8nZ+kB3V3aUq+iUGj775FSzxg7SWgaxvYsVvMcr2PalhdoX3qTy+olcrs3a++1eJPPh6N/WkbYxkes/cVWRzHgQEvsH8vR1yssovJHlDpZR+3+M7B3KGuiQVUf1QLR+gsdNkEDkXrwcT5L/WtVJ+K6mtZYE9WW+XvIqgJY18SDV2QwKFXYRNXW008reItqXaGraGjPV17jplAxbLFvjcTIKUN6NusXgpDWEbzfzZeQZZ+CZhgpj3Or3w/YISSX4IOABFNmuMv6I4RTxSYyYEte8R67QlTQU63v1cGrswizWnOWNWFCW1kYG1gtlkaJpik+O99Onz8M7631kMl1ANWxnGPR5BC7caM8JDKYdhBajqFoZt5Jk1wcxxotX08dEVfEDl9lfdqaEVNe6Y9P+a6KbA6WB4pOutUKQyD8yLSyO1BpYtA1bdQcVy76KT1CGz+9STH/qR9md/VUBJLCyIVJTmMOCfUrDmWk1cM167mulyPZhZyfTPVIseTT/CiqBOvMJxipIl+7Zj2qEBSpGevTgWOLYEFJpyz3riMUpUWk/I4AipCgCofc6D+BMvsNqBAtt6Q5ZcbO8xZ7pQSxMDVa2cYBsokl9/wl5MzNtuapInwibvzFnCrx644FSV6YhjVGbfaEIvxUklUJyfviZOkF0Z7+SRH+xwr23htVHtYoxfQUJ3k0BYsIernOF4c7Jq7cN5TAHbi1fJOVH+efI6Ii5/rJSlina7t+x8NttBXFY5wwvLLNRZJ4K4semcFad2i6BVt0hqQLk28MMvnyooF1h17DLIQ6a+XNb0cXLrnhNbU5+whEDQ7jIeZ4sMX4LfpbNpO9bFEhN4gsasBmLs6ZCsYdUjnlvGlhr2yO0ziiH5SyCWV9ghHeI+u0lTUMjGnOfYqoPx/q/j0UDGSXLiGAx8r6K781FNFNP0aO5xygyPDAmvw2dcXvtZZrpUjSPB1RZYE5yB5eH6Tb2rpgajX5D5MRwHZt4yihk0xnovoOLJ2xl30TnpE4H6mfsin/1JNbEDVbdJQwZqwI/jFbX4GxtxozqyleONyd0sxGmVfXaBR/QU6111TE3piLd/ioSxWwYPm2GbmHt+Maf8qri/SBpsXYaw4BtmyfziG2JqifmmiE/hxnB549Taep816spamg/7T/vZGBZvhagyQ2qo5uf/sWZRMW2fAL7vi7weWqqRA3N6T4ca54Bm5EN/EfodPP6YcukBTPlA7ETatdPZKSZ9c+ttbZMJCUcIiqQc3RHA03o6Xd7+2wUYTEcXTgJE5WbGPUC2Dr8smqWI8JJQ3vvt56HWkDY+DRQj8dFzZ98dZKQl8lktJ6zV6FGMdLaKvCuwXJXVYGqlq2Nptwkg0abhPhjh430y/FrTIG3UGAqsRPwXgFBqHbVCfYiNtAgVOgtdZwaeGkYG1rhP2u1u99DxS66CMkF991g23ETPBpwmJ6QZcRz46lji4orNZrmcGeRfwwJbVw15SYYgMzkiTfxxwxYZM/EopPlHJKwfp/HvLm1GcGo1LRyvkhABGvzJY5in0JTVag58xjQAdcy6F6+Ehj6NYauu04bcQhwjW7OudB05Z7wELaNVGR7lefEoK+OpJk0+eFROE0F0dLVbvl0hd+N1u/Jv09uTYbRPhhTfnqRKDZYcU0X5RQWI+anM4JhYPCwn3Q9JxZTMblM1iuYVRmO6xNget5CrygU11YUuM429Sb2hKJDPKvWjnFpMtRzJQ26T9PWUWsuZwamZoQsO/QKS29o9oW8AX7vgTxo4bBe1HkHebt3fyqgDLTxjSTTBTe/GFTNF1HJjimA+yWXnq4HSNl36qDs5iTVMVaATx51fvVMAQvJ22Jc1aPXPSvA+qXuBwGGvgwrEWVVAnp7iY0ASWGZ3E+bDGAkAscLihunPgdP8fErkQeB5wo5azueF3i2fcD8WXnY7e05aNf2Uas11BLQ1H8QLq4MkHXsA8wkOgT/wvVmyv4NaIkH86byVDieHd1z/2CVRKTxoECnEqLPEeJ8LvCZEMp9b8t1N3R73PArwhtAJBwrv2A9NHnd08GXyKaiLq6kQoydf+UbaeV1OJjD2kwQdKo2X6risOC+R2n5aB7/5Mncc7+3e8ZbDhLUtzuj3hzST2HiUe31974s2agPTe+aSik+E3ZdTGRjnuMSfPJc+YYFEhb0YA0mbdffzjZN18tODzhxZphFK5QFlysyEA0SNLunKqcwwwKIQgxSMLCQQMnynTZZHfZgATfE0ru94OR9TC4D8yJ9UcmqZuult9/hpxqM+/oWLhIwW/jCNs6Dvb8iAimW+3PJUyBowCs7hreMgk9UNiv9ro5ITaqH52tlCaVkCJyuBLTPRTkKnztM6t4KArmDxG0pb5q5kHZ2ZHkE3wjMwSjDwzcdLN0kNVml3ydErrlu56jI6fQz6JtEBzELqIgkZWlmzr+jR1EDuHtj/TVrZO/NMgKsA0G3FglKULTljcyTMrQU7kzv1Q72DC1XavXsD7SekqjRLJJB0oQprlx4fsVP8Xt/RYo+mxZQuIEorYTR+iHz29Pq8K6dcrJAdDXtQo1B5W6kwS/8W47uiWeVcxHRIXveis9GLEQ+QsWkem/Q9IBy50D+cb8VPat7D7UxqHkRa+zPaBEHHmUDeB8vlgpnHVskkG3Y0P5sngaHLw0WGyIBTnFNglPR+vpV0PTYGm4zM9vpjfCT4qHzSXHtsMxQIikPwsKg4U44g/FGpTwV9A/CqOB0g7BMfTuGFGSHkaqryEyzURj8nB2ohqRsg5/hGgnYFoua86QXIMqS+HnElmvEzTzZL2tiySjuxJLww8Ohsvni4cp2uGbgx9sLolvqzIsx7Z85FvE4KMY6Fqj7pUj7Kmxji+deLNPRK4mZbLAFSF7HyTA2Do/wcO8RY7IqZxxY+U6MJ4YLdmBoiRQUlkpjBxZ22rpIvWXIL01tsn8Ey/1Ou8XH+HEHJU57StC+ju5eQpK1K45U9IuCKYpYY3mqQAbMHQvJgwUqp8nSX1rfNx1MeEw0LdpiNBhQLUhjXqxyNnUKqfZTKOzYzuOYYGoEzb09nx7nR953abCbWVg+Np76vEb0CZLGZCl4NC0VyOHbdTEeAk7Or20Xm6s/NKwtD71cmcrO88mvIX4n3nAvFjMHt6LaNOPCM8o0KDuG1lqmirLZf6IEHdEYXPrZe6cMzBo6Xa99DoStvUsuLMSaUVOiM0zlK0GW1z10qTR2xUKG7O6NBfnyrTFLFKnxawtX2EqG9uto80B6ktEgkTyu+QkJzgJnhxwepVKl39LuzETDl9VdRt/zBTE7wz09BeP07t1Dd2QUEg9UwsI4Q6lohO+1E4Xr0CIigYSzPCAEvwYs7OoZod3yYAm7r9e1O3qqlr9cG3FmPdwmLtnp0muDGa+K7nEyXRF+Z2NYY8GKZ5J61OOWzoWO4phJxYN7Y3EPe7ZasJq7DKCN1vwVQRiW8+lKXaDxEzLc9MT9XnZHRqHON86zVcOhw7mq+wKco98eXIWlxm8gWR6K5Ak6XhSV5KoTmZ7Yp60makz626sZLy2G+Fl56KNib75ur8gsXVOoxJoNN1bFadDR/a45ohu2FRPjDl1Biy3uwhajA3jXobRcNm2vVkuT99G9J66isn7YBVAziUJgzuU4xEbqWWKSibSH+VnkJlQvFgsM8oXrY/rVZjuq73xSQZKmJmQ4t/y0h9WOqeCd+7rIGdnwBkFy1MVD0hPLW3TZ+y5U3meWUv7YaPaENKp0U6ieAdP6tlYIWk25J24M5Phd0wZrip6K9wJODTo+7pUsZiTh5j+ks4pPQtFGtpnrXJ/wYUSVGquk4CY0tBObW5DjDln3L2k18PkGCG95NOpWbL48m3Pdcl4oO5Hwhnjgbdxlp2Vi4foutiwy8hwIDoVNxoXbErfxzXCjSjoB0WEsnr62vFizktmT+0gNSNNOsAA/QxNbc0X4RUkz5MrrGshHVLgxe+Bx9VUb5WwqrDy65GxODNdCYyM5JJ+1TlJW/ZASVthn6SoUD8y958mdDJmL+tKVossLxgz7VcEP65fqtyZM3kPPkiwnN+3El62idns1TwUJ9lnLmZ6MOa3jAmPViI6jw2cOPrjyu4bvOfjuw29YMXDt6j4YZre/gmq6n5J0JNANRp3OSJpEf2l/CWN70aY+YX2u2nSHbN59z7JrDMIbNcGV9BwS0iEFm/6dwU1rjj014Qlxq/LE6PzqzFVzwvWM+bvHWLAjRzY5f4iBJdFO4eL0tMD0Vxc/94irwY/6rF8yehyd29RLFVbxGw1tSQwUM/e4febbW6+LdOkCU6GXhA/9mnsww1KXK7g1hqOupk8QBaP6ZjdEK96nE/EkhDlPkx43b6LtxDIMVQ7zrxbiltI/6tehHeSV8uYfK3Y2yFAYhAW5S8Px4iyXzHC9umXfScQZPmVZf9oJ41ZpXvx+/SI6m7JXLIAQHD3rTVH6Ehy9UefM9Cj88vQOfuYrMbq4GdUpfhARVTHh4QYpNi7BFjI00omAYltmZQ6lO14aojmo9RsRXV2rwlcV2XxteMuPJHLOYXFFdP0o6pVlXKaWj9HTXPsZmauT1tqUJYDuCpRYGHTHBsDl6NAapQiJp5hyr9UaDk8giDWkjaFF47/0rNoHQn8xYYNgp/JjEXdWObCswr4NPGIuvirws9VcV/JdZHq9pszNO0IpbGUFgLyGii+zdtrzcxc1XOE7jCEtYhxCpk29D3ohy5jRPlqv6XhoWXLfeesRpY6zBM7NrSB3J/NUVHntvYWlX601fGL++8AEt6Bnl+hO1cbMDbwXNagkwjVtAC+/bpJNeu6DEFZba7pijjAoJBINLOH2DTYCLy8RHFoZNU8Pn92yKRnb5Q6x7jdkU4SCe22cOQnN4MTdtDG1Av8JnYs57OZ7CgUothOnF3uP3QQzDLG4iMEpHXFkKnXdeDHLExjKiOYKlZCEQVVntwTiLsR0xbzR8XIIKkwl5wO00bQnoeXi72KZpYaq6kuChyUH0asomShp2VSLSi32VOasixVdDRyqDUa4jRmIbPRSTpQYn2UB/v00PnwhOXbmRG+hmhjoKgdjg4jf2QKRh6vuBsA6Kx1x2Fv6BsphldavxJXTSj+1mQ4c0UugqqRwZ48M2tiAkCcnjCiZC0cQ0KR8B7u719hPtK+t6SPkMfgC9+Pz7nBY6kG3dkhpfMmSl3o9ZHtJkP0VZN+Ic4rfOWUQHH4uTHwgGfNOZKKDiz5ZmMr0y1assOxY0W8s7bMZ4d7APDSGWVjIIHOeadyBomEs/gNn5Y4YJ1JfD4j695somFf7EeXzZCf7DMTV2qt8HZJPlf0YrLFNVcGe6EUtINsbQojfTHR85RRZzwjlQJdO7pxh8aXu72SO28jBOhc0FyHuZJVL/IreUis42qHNc76haiXzO+9/mck1o2XNSI296hu2yp2MTugLLDD4vkh+rD1N2FxKL9Iac53WFHGviXnaU90Hj70NEy8yJn8ddqAman5FLHzyW7qEc0BMeTMknIvg1tgKrQSXUPvUOGjDHdOwW9sIkuCwzXyqyfCIilfjWAfw+aElnOdG101oKSJKqI2puxdPDtIayqZOYyrSblK5Om3DpaNaX87zyvtZ8pWOqEwEHvbmkuqkRIN1t/7TdP+bsOOF3pp1BgLCY5NHs4AiAx1JqHr059KUhgvEKvVspyLVXNIF3wm5HnuTEfXcwH1PQoeVB7PCeAfwLElNNu7md2T3gOLa+mu7ufftg+dZ053G0SUuhbj5iBm4y7gyNJx87j1ldtERZeyHrjPuDqTM5+sNXHyZ4W/xviANGrfVfWRdXATE38rDX1zQTHPXYJjcPbOBNXzzhOafepd+ucOiogsfT6Ec4/b7eojhahooEeoTRoltyjYSXzPgOUzHBqPbI7Xi2t42xwFC8e/a0V1PhIb3r8q5tXliiqMcHiBeEdftQfIvd30wmjhoyWd+Kysqn8oyQiHF0lTHdPFiYbabBWLoaUqwkHvtja3uNaVs6Xttp2I4PF/FU+G+YhPBVcmvoiTkDVHhDp/9csV/JZ1M66Couemyg3jXTAcRtftiQ8L5JK4Nn0obBrYH5PSqSzaekyUPGrNkePIZ9ZU9Z0Bs6thLNO2OmpCEx29RuUIezTwHlb629pIOCGMcbe86NPi8Mxm91ksKAUj2qzviZdGl64tPEHLLNb+7SBkvnyRctMebjV/JuWQxpO1TyZJS5b1LQbEVZISYm6wXkrjDxsBogY91U0NsjnnJUzyup7M1EpIZfIJdvdnnsHC1y1nt+jLkaSfTYppJQE3eZaJ2PIpRcVIHYYqUnvKdRQHZ+rdKBtpYm0vxA3w7c79if/eFWtdLAWtkhk5YN4GwHsay1E0Ksa1STEyCg7n+wgVYKKNB10lL5PB7mC5Dtoc/CMK5kTNVPcjlIWyELFqIoXJY6EwgV/yQY5MaKAy6Nos2t744/oLq4KeiB6kwWJLp7YEZUARhZMjfUNjOrm0DLuhLOdFATWM6c0ACoNSzjkUXuE2kkm85uK9T4dQhvVzKodUDp5qoIRIO6n41YWisY8RPGlbcFm1T+mW2ZqzYUpqwNs/bggbGl8+HqL/ZKdoCfcP5ZunhnJEU4wplu6cuV3b+xhYyoqDY0wmORlzoitTpsm+g2acHSY913yOdV0tZpCf2YvsZr+tklsSCEgozLbnWsfguUMMuf23gMB/pk8eVgEQCot/grmQd68jPmezSI186zUSc5j1AiG/xeOYyuETY9O7TN+FftEat015pEqUjx7tDkKH0NIkCIsJTtcpB+4KuBsIwiDiO3mmHLUxD16TSmwvUuAlCawlwaueyAWgnCiNbFTRNmAOy3jTFNuO7OZ8P2lo1AvtDYMbojeVng3aewGP4eUpBK865gom6mpgXn0RL0M4iztnHYPzcWaAIeiG8BtNN/SvtsoG/yb1lxzvzFbVB6yCajDKTe5TzEOgh5gIMfLLmxuU6RGtmB8gAA1r7vG7LjVm59tvJe8ayOebfD4/pfviSCotU1fxSZxCa+012+KCQ1A5lSKNSUTaJMt7GmyMispmkajXtsMrKNDa0UybXBc6i+tR9++0pEuJhk+sGFgy14QgdjUVJC6cj5J2IQGursubSfP3n2XnKMzYK1k4aiGOH5yWpPd9Bopb+iLxjwImigvk1mk80WYBYMUjg5FADtq21zutyFdvKbPfm5ZnXxJjQ0rcu3J8yaoWeo+OFDJmZCcj7e17bv/tTZLi+hO5fep+YeQrRbiXPlbkRyU12PQbSmueVh0z7dGm+VsBa3HlESIXUk2AyZeA74JAl6VN7YtNhB17NlujjxfKrYYBB9kpXtGpoPQA33ZRUQpgOnN93a2Fk6+PMQ/1VSeKxJR0wnCwMU/zyzXXbYLGHM1JFzYgVic217NQKy8GPL5qcA+hk3kB/nu6kpOoYFe8bvcyuTDN77oewHlWBM/9MngbAbBGzX4Y6l5wCNS69Oi367lX8qJrntGAFPPfnWItkkoKZK8KfNfNBoZ4uu7iSrsWcKgzIOWGwelTS9crT/YyRomAL5OIXdUrBl/XzX7/0h1LUe6WzGKn7je2mo59PYZ8kv1sFUul+pXnc4Ff+Tqnl00+vnIdri21zHTW/7IH8zZZeWI7L/4cHRASnmBT8ycoGH8Fo6ag1TXF5U2rT4Bl80m3HKI/AqoZcxnMDUJyRDKvextEabL9JmUt6FEsls8a2FU+7xxVNJ+vqjllcZ50z81UU+N6dT6BUL667GTcWvZgSd8oLnhJ/zbZSx6zy2iT3zOjxFfM0rrJBuIAAePSVKIKDdPjtPHifOOGicJVAFaV/++n9B8UdFYhMrYkP2YVSh840Be0n6wJ4PMmvjUvHwPK8XB9v5dWyg0Mb245XBlMu3XRwr+lSKyX1UjiJHv1VpJrttKQ7dnjubFCWnlRmH+52dGc96g7WeR+arhc1kN7pB5bcS0NKyBbWo1qulrzCe+wsb44cJ+R0CtOSpUAUA8l3P2sNFw5wpHTnZbfWn4WfNu9vRU5ixOYkWGa+m/44hoCT49KR1/e8Z9YzbtHDsh7tK3Ta3uZqAKWihOKkwjpxl4rVg0ksyv4OzkhBDE3W2cA4HFx//ovnq5t9yfpch9yuizPd4pEMUp3pno7jEIUQ6b45dWvmTFZ1JwEoGgiCyCNikN3vlMsd1iaTVM1FNB2/q7vZMKZzwujarytDfHndzn7zkN8NBVeOKjwV7ZIuNNx3000OU2ashvNgr6hbGKCqY5cHvGLAFjJ25Bg/DVA5J8vg3Nas9uHB+ZwrRAb2G9YkMafK5nhZ2oCcCydghuJrOzfPNl4zXxRqKeh8TS/HcapcOGedgjrt+JJZIxv3CyldmDmvFMrR3YOvfZRPdTc3ruJG2qwtoK8kp0/W9wwy/HPhGCco+qpgHZk9s9MRWcVtICwP7ucQIdvz1ulcW9Q0nXqh4AQoiHJllGC9c1IgSjkAvKlKI/J6Ph5DX2FO12nLVqj9cZRI450H4meLmPcELz53+gDYqFtSjYYh1vuw9olCoXPmlSnGU/vogGllGH+/kUB3fJLHQkxk0SdHKy/ZRMjoXPqLbcn3ZbUvO9DGqYM/ZBO3ZYYYJL9zvsiKfEd0jgzN0w7J2UsLGz9o215s7kBZZ1X+pbJnNwk+GUUSXHTpiqzAxSmovYZkV2BjW6Yv/C0OCY0c1jAVU9K9fP5mkm4Z3tTj6+WloxKlKJX4TS+qR5DPuKTcEqpSj+WblrWOLMKp+68a5YMq5x0gLO9Ux3Md7vSOD2qXbeDL6FVbuAxal0IaKvJ3W3Fohko4FZluH4YMz3MzxopWIRNpj2C+klE1GMEFdpjh2LuKH7gZ/aC+Wa2oi7DQm5gNvxLJ9pTz3BnOxOxX7FQAAcn9k8y0UxQEFF/AaUcGwYRDULL5iBY/E5HCi6zgkn1NK6GBk9JQ2kV6NGeYOq14a48ozTTniP+ZzZpSbeVg799NFjLhK1MecedoBVmd+m0w/yx+iG7pGrt63YDeN/uU+hqa4xO8sLqnfc/OTyqYs5LbDdjN5/mmeDhTRXRxAULIgGs0T8kkb3E63Hfwykv1IfKIhQOrzQtrGoy6rGkNdFIQHyJZlVrI4vR836DMrBx7N+wRocUFl9DfXfsa5vtYDG9hpWKFBrHMhl7eTwV+s1U6ZHII2muLLNG55NfNNfFd4CE666vG0nxsvMf6Nt8u+u1wjRAwnkL5Mb0M27TGKGQEnBF55v006bjVS84vOoQ2h7nBf/OT22LwGDddQvLu/oyeFg8x/F1hNdx/5M8ZdA6V2lo/GEXlpc7EdC7hb4AvTSW8i6fVU6PfP2pqHWPuNrjrfE2MaBNkiR9Wmms7TyV7NcAINndicieCDVmYMSAKrvRETsLfAlHFhjuXOrLHyJf9HQvABdiyFjA4Gm0auN/pBjRW2HmJlGYFQByR72gA63RzPJKobQKVtMgxTo/OFiksj4AteJevqC/44I7diMR90Qe2VaIjHp8jJri3pajoBB873vjk0TohUIaaEi3xIqIK0MZ1HUGN/QgX3lWhkua/kXI7RdIiUM3jLriUn4HolPPdcAVkzbUwOzTYKag70nls4qv9ik1yOG54flB0XIDcp87fZdyXLBKTUGcSJ+VRl1jsDfEn7H2Ou5RRjrePW0/KGOyrbFDm3n4YwQGv+ySAa6caykEZqpCh7F92JgPGQbsf8BoVenwO5G9sZ+VlrQhIsJbveEsxyyNQuK/ilMVPH5bj1z0jtkUn20EugvdUyFghojVaxT5fKwkuQgmRly8fcwB6sU6DV5w4/x/doH8UCmVuZHN0cmVhbQplbmRvYmoKMTEgMCBvYmoKPDwKL1R5cGUgL0ZvbnREZXNjcmlwdG9yCi9Gb250TmFtZSAvVEJVWktQK0NNUjEwCi9GbGFncyA0Ci9Gb250QkJveCBbLTQwIC0yNTAgMTAwOSA3NTBdCi9Bc2NlbnQgNjk0Ci9DYXBIZWlnaHQgNjgzCi9EZXNjZW50IC0xOTQKL0l0YWxpY0FuZ2xlIDAKL1N0ZW1WIDY5Ci9YSGVpZ2h0IDQzMQovQ2hhclNldCAoL0EvQy9NL04vUi9hL2MvZC9lL2VpZ2h0L2YvZmkvZml2ZS9mb3VyL2cvaC9pL20vbi9uaW5lL28vb25lL3AvcGVyaW9kL3Evci9zL3NldmVuL3NpeC90L3RocmVlL3R3by91L3cveSkKL0ZvbnRGaWxlIDEwIDAgUgo+PgplbmRvYmoKNyAwIG9iago8PAovVHlwZSAvRm9udAovU3VidHlwZSAvVHlwZTEKL0Jhc2VGb250IC9UQlVaS1ArQ01SMTAKL0ZvbnREZXNjcmlwdG9yIDExIDAgUgovRmlyc3RDaGFyIDEyCi9MYXN0Q2hhciAxMjEKL1dpZHRocyA5IDAgUgo+PgplbmRvYmoKOCAwIG9iago8PAovVHlwZSAvUGFnZXMKL0NvdW50IDEKL0tpZHMgWzUgMCBSXQo+PgplbmRvYmoKMTIgMCBvYmoKPDwKL1R5cGUgL0NhdGFsb2cKL1BhZ2VzIDggMCBSCj4+CmVuZG9iagoxMyAwIG9iago8PAovUHJvZHVjZXIgKE1pS1RlWCBwZGZUZVgtMS40MC4xNykKL0NyZWF0b3IgKFRlWCkKL0NyZWF0aW9uRGF0ZSAoRDoyMDE2MTAwNzE0NDMxNCswMicwMCcpCi9Nb2REYXRlIChEOjIwMTYxMDA3MTQ0MzE0KzAyJzAwJykKL1RyYXBwZWQgL0ZhbHNlCi9QVEVYLkZ1bGxiYW5uZXIgKFRoaXMgaXMgTWlLVGVYLXBkZlRlWCAyLjkuNjA1MCAoMS40MC4xNykpCj4+CmVuZG9iagp4cmVmCjAgMTQKMDAwMDAwMDAwMCA2NTUzNSBmIAowMDAwMDAyNjg2IDAwMDAwIG4gCjAwMDAwMDI3MDYgMDAwMDAgbiAKMDAwMDAwMjcyNiAwMDAwMCBuIAowMDAwMDAyNTY3IDAwMDAwIG4gCjAwMDAwMDI0NTUgMDAwMDAgbiAKMDAwMDAwMDAxNSAwMDAwMCBuIAowMDAwMDIwMDA0IDAwMDAwIG4gCjAwMDAwMjAxNDIgMDAwMDAgbiAKMDAwMDAwMjc3OSAwMDAwMCBuIAowMDAwMDAzMzg4IDAwMDAwIG4gCjAwMDAwMTk2ODYgMDAwMDAgbiAKMDAwMDAyMDE5OSAwMDAwMCBuIAowMDAwMDIwMjQ5IDAwMDAwIG4gCnRyYWlsZXIKPDwgL1NpemUgMTQKL1Jvb3QgMTIgMCBSCi9JbmZvIDEzIDAgUgovSUQgWzw2QzlENjA0QkYxNjEwMDdEQUQ0NEM0OUE3ODI5NThGND4gPDZDOUQ2MDRCRjE2MTAwN0RBRDQ0QzQ5QTc4Mjk1OEY0Pl0gPj4Kc3RhcnR4cmVmCjIwNDcxCiUlRU9GCg==" alt="Figure 1: Step-by-step flowchart of R-function ampute()" width="600px" />
+<p class="caption">
+Figure 1: Step-by-step flowchart of R-function ampute()
+</p>
+</div>
+<p>Function <code>ampute()</code> enables the generation of missing values based on different underlying missingness mechanisms. To this end, <code>ampute()</code> has multiple arguments and the most important ones are displayed in Figure 1. Figure 1 also gives an overview of the order in which decisions need to be taken if you would like to generate a missingness mechanism that cannot easily be traced back. This is especially useful for the evaluation and comparison of missing data methods. Nevertheless, the default settings create genuine multivariate missingness as well.</p>
+<p>The underlying method of <code>ampute()</code> is based on Brand’s (1999) multivariate amputation procedure. An adaptation to this method is made to make continuous amputation possible. The possibility to create MNAR missingness is an extra feature as well.</p>
+<p>In this vignette, Figure 1 serves as a guideline to explain how <code>ampute</code>’s arguments can be used to generate multivariate missingness. We will discuss the possiblities by examining each step of Figure 1. Concurrently, we will explain the underlying amputation method since this might give the user the opportunity to not only generate missing values but also use the method’s features to generate complicated missingness mechanisms. Our goal is to make the use of <code>ampute()</code> easy and straightforward.</p>
+<div id="data-and-quick-amputation" class="section level3">
+<h3>1. Data and quick amputation</h3>
+<p>First, we need a complete data set. In simulation settings, multivariate data can be generated by using <code>mvrnorm()</code> from the package <code>MASS</code>. Be aware that the covariance matrix should be semi definite.</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">require</span>(<span class="st">&quot;mice&quot;</span>)</code></pre></div>
+<pre><code>## Loading required package: mice</code></pre>
+<pre><code>## Loading required package: Rcpp</code></pre>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">set.seed</span>(<span class="dv">2016</span>)
+testdata &lt;-<span class="st"> </span>MASS::<span class="kw">mvrnorm</span>(<span class="dt">n =</span> <span class="dv">500</span>, <span class="dt">mu =</span> <span class="kw">c</span>(<span class="dv">10</span>, <span class="dv">5</span>, <span class="dv">0</span>), 
+                    <span class="dt">Sigma =</span> <span class="kw">matrix</span>(<span class="dt">data =</span> <span class="kw">c</span>(<span class="fl">1.0</span>, <span class="fl">0.2</span>, <span class="fl">0.2</span>, <span class="fl">0.2</span>, <span class="fl">1.0</span>, <span class="fl">0.2</span>, 
+                                            <span class="fl">0.2</span>, <span class="fl">0.2</span>, <span class="fl">1.0</span>), <span class="dt">nrow =</span> <span class="dv">3</span>, <span class="dt">byrow =</span> T))
+testdata &lt;-<span class="st"> </span><span class="kw">as.data.frame</span>(testdata)
+<span class="kw">summary</span>(testdata)</code></pre></div>
+<pre><code>##        V1               V2              V3          
+##  Min.   : 6.846   Min.   :2.096   Min.   :-2.81241  
+##  1st Qu.: 9.255   1st Qu.:4.264   1st Qu.:-0.76266  
+##  Median : 9.976   Median :4.957   Median : 0.05888  
+##  Mean   : 9.956   Mean   :4.947   Mean   : 0.01798  
+##  3rd Qu.:10.648   3rd Qu.:5.558   3rd Qu.: 0.68486  
+##  Max.   :13.869   Max.   :7.933   Max.   : 2.50922</code></pre>
+<p>The function <code>ampute()</code> immediately works when the data are entered into the function. Storing the result allows you to work with the amputed data.</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">result &lt;-<span class="st"> </span><span class="kw">ampute</span>(testdata)
+result</code></pre></div>
+<pre><code>## Multivariate Amputed Data Set
+## Call: ampute(data = testdata)
+## Class: mads
+## Proportion of Missingness:  0.5
+## Frequency of Patterns:  0.3333333 0.3333333 0.3333333
+## Pattern Matrix:
+##   V1 V2 V3
+## 1  0  1  1
+## 2  1  0  1
+## 3  1  1  0
+## Mechanism:[1] &quot;MAR&quot;
+## Weight Matrix:
+##   V1 V2 V3
+## 1  0  1  1
+## 2  1  0  1
+## 3  1  1  0
+## Type Vector:
+## [1] &quot;RIGHT&quot; &quot;RIGHT&quot; &quot;RIGHT&quot;
+## Odds Matrix:
+##      [,1] [,2] [,3] [,4]
+## [1,]    1    2    3    4
+## [2,]    1    2    3    4
+## [3,]    1    2    3    4
+## Head of Amputed Data Set
+##          V1       V2         V3
+## 1 11.282560 3.986711  1.6053922
+## 2  8.995550 5.620620 -1.6681172
+## 3 10.140799 3.984980         NA
+## 4  9.913233 5.477239 -0.9984129
+## 5 12.569587 7.685735         NA
+## 6 11.376321 4.656118         NA</code></pre>
+<div id="class" class="section level4">
+<h4>Class</h4>
+<p>The return object is of class <code>mads</code> (Multivariate Amputed Data Set) and contains all the useful information about the amputation. In total, the object contains the following:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">names</span>(result)</code></pre></div>
+<pre><code>##  [1] &quot;call&quot;     &quot;prop&quot;     &quot;patterns&quot; &quot;freq&quot;     &quot;mech&quot;     &quot;weights&quot; 
+##  [7] &quot;cont&quot;     &quot;type&quot;     &quot;odds&quot;     &quot;amp&quot;      &quot;cand&quot;     &quot;scores&quot;  
+## [13] &quot;data&quot;</code></pre>
+</div>
+<div id="inspect-amputed-data" class="section level4">
+<h4>Inspect amputed data</h4>
+<p>The amputed data is stored under <code>amp</code>. To see whether the amputation has gone according plan, a quick investigation can be done by using function <code>md.pattern()</code>.</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">md.pattern</span>(result$amp)</code></pre></div>
+<pre><code>##     V3 V2 V1    
+## 243  1  1  1   0
+##  96  1  1  0   1
+##  82  1  0  1   1
+##  79  0  1  1   1
+##     79 82 96 257</code></pre>
+<p>The rows of the table show the different missing data patterns with the number of cases accordingly. The first row always refers to the complete cases. The last column contains the number of variables with missings in that specific pattern. Consequently, each column total describes the number of cells with missing values for that variable. A more thorough explanation of <code>md.pattern()</code> can be found in its help file (<code>?md.pattern</code>). Note that because <code>md.pattern()</code> sorts the columns in increasing amounts of missing information, the order of the variables is different from the order in the data.</p>
+</div>
+</div>
+<div id="proportion-of-missingness" class="section level3">
+<h3>2. Proportion of missingness</h3>
+<p>The proportion of missingness is specified under:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">result$prop</code></pre></div>
+<pre><code>## [1] 0.5</code></pre>
+<p>In the default setting, this means that 50% of the cases will have missing values. It is easy to change this proportion by using the argument <code>prop</code>. One might also want to specify the percentage of missing cells. For this, the argument <code>bycases</code> should be <code>FALSE</code>.</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">result &lt;-<span class="st"> </span><span class="kw">ampute</span>(testdata, <span class="dt">prop =</span> <span class="fl">0.2</span>, <span class="dt">bycases =</span> <span class="ot">FALSE</span>)
+<span class="kw">md.pattern</span>(result$amp)</code></pre></div>
+<pre><code>##      V1  V3  V2    
+## 178   1   1   1   0
+## 106   0   1   1   1
+## 109   1   1   0   1
+## 107   1   0   1   1
+##     106 107 109 322</code></pre>
+<p>An inspection of the result shows that the proportion of missing cells is approximately 20%, as requested (the data set contains 10000 * 3 = 30000 cells, in total, 5964 cells are made missing). <code>ampute()</code> automatically calculates the proportion of missing cases that belongs to this setting.</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">result$prop</code></pre></div>
+<pre><code>## [1] 0.6</code></pre>
+</div>
+<div id="patterns" class="section level3">
+<h3>3. Patterns</h3>
+<p>The basic idea of <code>ampute()</code> is the generation of missingness patterns. Each pattern is a combination of missingness on specific variables while other variables remain complete. For example, someone could have forgotten the last page of a questionnaire, resulting in missingness on a specific set of questions. Another missingness pattern could occur when someone is not willing to answer private questions. Or when a participant misses a wave in a longitudinal study. Consequently, each pattern is a specific combination of missing and complete variables.</p>
+<p>The default missingness patterns can by obtained by:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">mypatterns &lt;-<span class="st"> </span>result$patterns
+mypatterns</code></pre></div>
+<pre><code>##   V1 V2 V3
+## 1  0  1  1
+## 2  1  0  1
+## 3  1  1  0</code></pre>
+<p>In the <code>patterns</code> matrix, each row refers to a missing data pattern and each column to a variable. <code>0</code> is used for variables that should have missing values in a particular pattern. <code>1</code> is used otherwise. Here, three missing data patterns are specified with missing values on 1 variable only. Note that as a result of this, none of the cases will have missingness on more than one variable. A case either has missingness on V1, V2 or V3 or remains complete.</p>
+<p>Subsequently, the default <code>patterns</code> matrix can be changed according your desires. For example, the missingness patterns might be changed into:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">mypatterns[<span class="dv">2</span>, <span class="dv">1</span>] &lt;-<span class="st"> </span><span class="dv">0</span>
+mypatterns &lt;-<span class="st"> </span><span class="kw">rbind</span>(mypatterns, <span class="kw">c</span>(<span class="dv">0</span>, <span class="dv">1</span>, <span class="dv">0</span>))
+mypatterns</code></pre></div>
+<pre><code>##   V1 V2 V3
+## 1  0  1  1
+## 2  0  0  1
+## 3  1  1  0
+## 4  0  1  0</code></pre>
+<p>By doing this, a missingness pattern is created where cases will have missingness on V1 and V2 but not on V3 (pattern 2). Also, I have added a fourth missing data pattern to create a combinaton of missingness on V1 and V3.</p>
+<p>Now, I can ampute the data again, with the desired <code>patterns</code> matrix as its third argument. Note that I have changed the desired proportion of missingness to <code>bycases = TRUE</code> (default) and 30%.</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">result &lt;-<span class="st"> </span><span class="kw">ampute</span>(testdata, <span class="dt">prop =</span> <span class="fl">0.3</span>, <span class="dt">patterns =</span> mypatterns)
+<span class="kw">md.pattern</span>(result$amp)</code></pre></div>
+<pre><code>##     V2 V3 V1    
+## 373  1  1  1   0
+##  33  1  1  0   1
+##  34  1  0  1   1
+##  30  0  1  0   2
+##  30  1  0  0   2
+##     30 64 93 187</code></pre>
+</div>
+<div id="relative-frequency" class="section level3">
+<h3>4. Relative frequency</h3>
+<p>The function <code>ampute()</code> works by assigning cases to the different missing data patterns. Each case is assigned to one pattern only, and all cases are divided among the patterns. In other words, every case is  for a certain missing data pattern. This does not automatically mean that each case will obtain missing values. That decision will be made later on.</p>
+<p>The argument <code>freq</code> specifies with which frequency the cases should be divided over the patterns. As a default, equal frequencies are used for the patterns.</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">result$freq</code></pre></div>
+<pre><code>## [1] 0.25 0.25 0.25 0.25</code></pre>
+<p>The specifications below are an example of a situation where one would like to impose missing data pattern 1 with a higher frequency than the other missing data patterns. When changing the <code>freq</code> argument, one should keep in mind that the sum of the relative frequencies should always be 1 (in order to divide all the cases over the patterns).</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">result &lt;-<span class="st"> </span><span class="kw">ampute</span>(testdata, <span class="dt">prop =</span> <span class="fl">0.3</span>, <span class="dt">patterns =</span> mypatterns, 
+                 <span class="dt">freq =</span> <span class="kw">c</span>(<span class="fl">0.7</span>, <span class="fl">0.1</span>, <span class="fl">0.1</span>, <span class="fl">0.1</span>))
+<span class="kw">md.pattern</span>(result$amp)</code></pre></div>
+<pre><code>##     V2 V3  V1    
+## 343  1  1   1   0
+## 107  1  1   0   1
+##  13  1  0   1   1
+##  19  0  1   0   2
+##  18  1  0   0   2
+##     19 31 144 194</code></pre>
+<p>An inspection of the missingness patterns using <code>md.pattern()</code> shows that indeed pattern 1 has received 7 times as many candidates as pattern 2 to 4. In total, approximately 3000 cases have missing values (which is what was specified under <code>prop</code>).</p>
+</div>
+<div id="mechanism" class="section level3">
+<h3>5. Mechanism</h3>
+<p>At this point, the total proportion of missingness is defined, the missing data patterns are specified as well as the relative frequency with which they should occur. All cases are candidate for a missing data pattern.</p>
+<p>Whether a case will be made missing eventually depends on the missingness mechanism. If each case should have an equal probability of having missing values, the argument <code>mech</code> should be changed to <code>&quot;MCAR&quot;</code> (Missing Completely At Random). Then, step 6 to 9 do not need to be specified.</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">result &lt;-<span class="st"> </span><span class="kw">ampute</span>(testdata, <span class="dt">prop =</span> <span class="fl">0.3</span>, <span class="dt">patterns =</span> mypatterns, 
+                 <span class="dt">freq =</span> <span class="kw">c</span>(<span class="fl">0.7</span>, <span class="fl">0.1</span>, <span class="fl">0.1</span>, <span class="fl">0.1</span>), <span class="dt">mech =</span> <span class="st">&quot;MCAR&quot;</span>)
+result$mech</code></pre></div>
+<pre><code>## [1] &quot;MCAR&quot;</code></pre>
+<p>Two other opties are <code>&quot;MAR&quot;</code> (Missing At Random), where the probability to be missing depends on the values of the variables that will not be made missing (the ‘observed’ variables) or <code>&quot;MNAR&quot;</code> (Missing Not At Random), where these probabilities depend on the values of the variables that will be made missing. For a more thorough explanation of these terms, Van Buuren (2012, pp. 6, 7, 31, 32) is useful.</p>
+</div>
+<div id="weights" class="section level3">
+<h3>6. Weights</h3>
+<p>In case of <code>MAR</code> (default) or <code>MNAR</code> missingness, a weighted sum score will be calculated for each case. This is an important part in the process because the probability that a case will be made missing depends on this score. The way in which the sum scores are used, will be explained in step 8 and step 9.</p>
+<p>The weighted sum scores are built from the variable values and certain pre-specified weights. For each case, the value on a certain variable is multiplied with a weight. This is done for all variables and the resulting values are summed: a weighted sum score. The formula that describes the calculation is:</p>
+<span class="math display">\[\begin{equation}
+s_{ik} = \sum\limits_{j=1}^J w_{jk}*c_{ij}
+\end{equation}\]</span>
+<p>where <span class="math inline">\(s_{ik}\)</span> is the weighted sum score of a case <span class="math inline">\(i\)</span> in a certain pattern <span class="math inline">\(k\)</span>, <span class="math inline">\(w_{jk}\)</span> is the pre-specified weight of a certain variable <span class="math inline">\(j\)</span> in a certain pattern <span class="math inline">\(k\)</span> and <span class="math inline">\(c_{ij}\)</span> is the value of case <span class="math inline">\(i\)</span> on variable <span class="math inline">\(j\)</span>. In the example, <span class="math inline">\(j\in\{1, 2, 3\}\)</span> and <span class="math inline">\(k\in\{1, 2, 3, 4\}\)</span> because there are three variables and four missing data patterns.</p>
+<p>The <code>weights</code> matrix stores the <span class="math inline">\(w_{jk}\)</span> and is of size #patterns by #variables. The default <code>weights</code> matrix for <code>MAR</code> missingness is as follows.</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">result &lt;-<span class="st"> </span><span class="kw">ampute</span>(testdata, <span class="dt">prop =</span> <span class="fl">0.3</span>, <span class="dt">patterns =</span> mypatterns, 
+                 <span class="dt">freq =</span> <span class="kw">c</span>(<span class="fl">0.7</span>, <span class="fl">0.1</span>, <span class="fl">0.1</span>, <span class="fl">0.1</span>))
+myweights &lt;-<span class="st"> </span>result$weights
+myweights</code></pre></div>
+<pre><code>##   V1 V2 V3
+## 1  0  1  1
+## 2  0  0  1
+## 3  1  1  0
+## 4  0  1  0</code></pre>
+<p>At first sight, this matrix might be complicated, but if you compare the matrix with the <code>patterns</code> matrix that we used, the contents make more sense.</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">mypatterns</code></pre></div>
+<pre><code>##   V1 V2 V3
+## 1  0  1  1
+## 2  0  0  1
+## 3  1  1  0
+## 4  0  1  0</code></pre>
+<p>As you see, the <code>weights</code> and <code>patterns</code> matrices are exactly similar. The reason for this is that in case of <code>MAR</code> missingness, the variables that will be made missing should not be weighted (<code>0</code> in the <code>weights</code> matrix). Those are the variables with <code>0</code> in the <code>patterns</code> matrix.</p>
+<p>The other variables receive a weight of <code>1</code>, as a default. Thus, the variables have equal weights.</p>
+<p>In case of <code>MNAR</code> missingness, the default <code>weights</code> matrix is as follows:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">result &lt;-<span class="st"> </span><span class="kw">ampute</span>(testdata, <span class="dt">prop =</span> <span class="fl">0.3</span>, <span class="dt">patterns =</span> mypatterns, 
+                 <span class="dt">freq =</span> <span class="kw">c</span>(<span class="fl">0.7</span>, <span class="fl">0.1</span>, <span class="fl">0.1</span>, <span class="fl">0.1</span>), <span class="dt">mech =</span> <span class="st">&quot;MNAR&quot;</span>)
+result$weights</code></pre></div>
+<pre><code>##   V1 V2 V3
+## 1  1  0  0
+## 2  1  1  0
+## 3  0  0  1
+## 4  1  0  1</code></pre>
+<p>If this matrix is compared with the <code>patterns</code> matrix that was used, it is easy to see that the values are reversed. Since a <code>MNAR</code> missingness mechanism means that the the missingness will depend on the variables that will be amputed, those variables are weighted in the <code>weight</code> matrix. Those are the variables with a value <code>0</code> in the <code>patterns</code> matrix. Again, the weighted variables receive equal weights of <code>1</code>. The variables that will remain complete are not weighted and receive a <code>0</code>.</p>
+<p>Naturally, the idea of the <code>weights</code> matrix is to weight variables differently from each other. From now on, we will impose a <code>MAR</code> mechanism to the data. We therefore focus at the default <code>weights</code> matrix which we stored under <code>myweights</code>. For instance, we could desire to give the values on variable V2 a higher weight than the values on variable V3. Therefore, for pattern 1, we could change the <code>weights</code> matrix into something as:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">myweights[<span class="dv">1</span>, ] &lt;-<span class="st"> </span><span class="kw">c</span>(<span class="dv">0</span>, <span class="fl">0.8</span>, <span class="fl">0.4</span>)</code></pre></div>
+<p>By choosing the values 0.8 and 0.4, variable V2 is weighted twice as heavy as variable V3. The weight values are relative values, meaning that choosing the values 8 and 4 would have the same effect on the amputation process. In order to clearly see the result of the <code>weights</code> setting, one can specify weights for just a few variables and with a relative big distance from each other.</p>
+<p>For pattern 3, variable V1 will be weighted three times as heavy as variable V2.</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">myweights[<span class="dv">3</span>, ] &lt;-<span class="st"> </span><span class="kw">c</span>(<span class="dv">3</span>, <span class="dv">1</span>, <span class="dv">0</span>)
+myweights</code></pre></div>
+<pre><code>##   V1  V2  V3
+## 1  0 0.8 0.4
+## 2  0 0.0 1.0
+## 3  3 1.0 0.0
+## 4  0 1.0 0.0</code></pre>
+<p>We will now apply these settings and inspect the results in two ways: boxplots and scatterplots.</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">result &lt;-<span class="st"> </span><span class="kw">ampute</span>(testdata, <span class="dt">prop =</span> <span class="fl">0.3</span>, <span class="dt">patterns =</span> mypatterns, 
+                 <span class="dt">freq =</span> <span class="kw">c</span>(<span class="fl">0.7</span>, <span class="fl">0.1</span>, <span class="fl">0.1</span>, <span class="fl">0.1</span>), <span class="dt">weights =</span> myweights)</code></pre></div>
+<div id="boxplots" class="section level4">
+<h4>Boxplots</h4>
+<p>First, there is the function <code>bwplot()</code> that can be imposed on the <code>mads</code> object immediately. <code>bwplot()</code> plots the distributions of the amputed and non-amputed data for several variables. This is useful since these boxplots show the relation between the missingness and the variables values. In other words, by examining the boxplots one can see for which values of a certain variable the data will be amputed. Note that not necessarily the values of the variables themselves will be amputed. The boxplots merely show the relation between the amputations and the variables.</p>
+<p>In the function <code>bwplot()</code>, the argument <code>which.pat</code> can be used to define the patterns you are interested in (default: all patterns). The argument <code>yvar</code> should contain the variables names (default: all variables). Besides, the function returns the mean, variance and n of the amputed and non-amputed data for each variable and each pattern requested. In the column <code>Amp</code>, a <code>1</code> refers to the amputed data and <code>0</code> to the non-amputed data. If the descriptives are not required, the argument <code>descriptives</code> can be set to <code>FALSE</code>.</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">lattice::<span class="kw">bwplot</span>(result, <span class="dt">which.pat =</span> <span class="kw">c</span>(<span class="dv">1</span>, <span class="dv">3</span>), <span class="dt">descriptives =</span> <span class="ot">TRUE</span>)</code></pre></div>
+<pre><code>## $Descriptives
+## , , Variable =  V1
+## 
+##        Descriptives
+## Pattern Amp     Mean     Var   N
+##       1   1  0.22073 0.86536 103
+##       1   0 -0.04961 1.05858 237
+##       3   1  0.33444 0.59032  11
+##       3   0 -0.20962 0.84662  35
+## 
+## , , Variable =  V2
+## 
+##        Descriptives
+## Pattern Amp     Mean     Var   N
+##       1   1  0.46341 0.93151 103
+##       1   0 -0.20328 0.93454 237
+##       3   1  0.01570 0.77581  11
+##       3   0 -0.14247 1.00356  35
+## 
+## , , Variable =  V3
+## 
+##        Descriptives
+## Pattern Amp     Mean     Var   N
+##       1   1  0.12542 0.80449 103
+##       1   0 -0.12869 0.97211 237
+##       3   1 -0.23301 0.64986  11
+##       3   0  0.26061 0.96268  35
+## 
+## 
+## $`Boxplot pattern 1`</code></pre>
+<p><img src="data:application/pdf;base64,JVBERi0xLjQKJYHigeOBz4HTXHIKMSAwIG9iago8PAovQ3JlYXRpb25EYXRlIChEOjIwMTcwMjE4MjE0MTM2KQovTW9kRGF0ZSAoRDoyMDE3MDIxODIxNDEzNikKL1RpdGxlIChSIEdyYXBoaWNzIE91dHB1dCkKL1Byb2R1Y2VyIChSIDMuMy4yKQovQ3JlYXRvciAoUikKPj4KZW5kb2JqCjIgMCBvYmoKPDwgL1R5cGUgL0NhdGFsb2cgL1BhZ2VzIDMgMCBSID4+CmVuZG9iago3IDAgb2JqCjw8IC9UeXBlIC9QYWdlIC9QYXJlbnQgMyAwIFIgL0NvbnRlbnRzIDggMCBSIC9SZXNvdXJjZXMgNCAwIFIgPj4KZW5kb2JqCjggMCBvYmoKPDwKL0xlbmd0aCAxMTg4IC9GaWx0ZXIgL0ZsYXRlRGVjb2RlCj4+CnN0cmVhbQp4nMVYS28bNxC+76+Yo30wwxk+91inD8BAA6QS0kOQg5ukgA1LSS0X/fsdkrPL1Wqt1cOBD5L1mZxvhjPkfLtEuAGEe/inec+f62XzZvPHb9fwedNopbWG4ffm87p58yvx/OXfgKRkoHwVjDooZwUsV/Dx4ufbp1v4crd5eryEK3RwcffXJZCGi3+f7r6tN3C3hu+3T09f0zDx8Brw8hMsb5pfljmkwQesVhbBOoUGWq+iBwqYwONX+BPW4/mylreLibUs3r7j/wYH/zUfP4GGLw3CDX/uG8zL+b0pzlqr2gArMFYFK+gBFjKK3itt+mGBdZxMUKj7cYF13Oio0PfjAtP4MZXQo0qU76B8gBaViakQF1d0Ccv7lNVEvd+WjHJpcaSszcb6WFsy+U+yPdqv0Va5kG1tZ/v+hA066cL5tD8NKWqzh59W3w+PL0Zl48D43bf11YDg0G161rZ0TkUOMlDeeB3kjRkiPIxhCCqaOVioesgZQrsLhXk/7KhGcNG0rYqOd5RTvuWoBXI+eY8+jCESpqTN4sJWMeedO8guFvr9sCMbwUVfDqA03zAqheGzXjOwAoG8dxMrn2DkilU/KxAcnCLME8SiVKMjIIddC+gIyrJ7AuLkigtJc/G5AqlYDaGspXhk+5KWGkAxF4+d+SCAYi7+evuB/5mjmA8UlgPFavAIURnkX7r88HzaOVzfpgSm4/SQDlKe2R/H562z0vjcpKKeMN8+RUMyTGReeZfJ8g9vFbZAXHSa4jrIOlLqLEcbI/d84iq0Ia1q1/wFtWy6Iy0mJNagV+RlKlpl9XbvyiVvbQvD79x9a5Tj4UOjnPZ9nfJ40iNJROU0s/I2czm/H3CsKi+Q2+mot3OLLP8Ujnh+eTHVQ2dykKfJHkanjJ3Xvdn1nZVndKR85GBQ+aR8gkmzomcVGONgUwufw8JXsWOR91NY/M/hnm+EuaFzTkJ5rnJJBTvMM9psMcKEUQWax4WvYuOUjhO445/DHd8YP6+FyL285oqlQrA2+UmDzwFxu66+ViA48uGhonbFRMrTUxDLFTfXIUVZfk9BNk/MHJLy4pY5pIQ1DFlSccsUJUODKGQTFa89wyAKYRCvPcUgivNUEb1OzQNDTLk+WhaJ1d+mx5I2RXmmLJLO1SIuBZ/lo6VNzDkUG3+Usu3tOZPt93W0ba/z08UtbRPjt9SNXlTd9sa9nV/il1jO+yvIGzmdgzxN3oif3Aifl7ez8mcM75C2XiMYPhl+cI8g4/UioUwY3CTIjHqVUGYM7hJkRr1MKDMGtwkHl+istZJt8+WPZ7/cfnvcGqXTm9YOZtfOzePCV7H15d1sBwv/HO75Rpglhl27UBQP0woER5tzvYMNOuXiPC58FXMZop/AHf8c7vjG+HmFJpaVmiuWrYJbfre0ZROlW5c+lBUI5pfCTsGFoVSnZ0hJDHqLoqy+pyB++HRFXiXjxesKpIA1CFlPccoEJT2DGIq9+OwJBjEIg/jsKQYxnCfP5EJqhOl+wMy9Kk6YG42KYpZnTz9KE/ee8sme/TqauNf56ZqYHtb4jXqoieZFNXFv3ItdiWv+B2MTyGllbmRzdHJlYW0KZW5kb2JqCjMgMCBvYmoKPDwgL1R5cGUgL1BhZ2VzIC9LaWRzIFsgNyAwIFIgXSAvQ291bnQgMSAvTWVkaWFCb3ggWzAgMCAzNjAgMzYwXSA+PgplbmRvYmoKNCAwIG9iago8PAovUHJvY1NldCBbL1BERiAvVGV4dF0KL0ZvbnQgPDwgL0YxIDEwIDAgUiAvRjIgMTEgMCBSID4+Ci9FeHRHU3RhdGUgPDwgPj4KL0NvbG9yU3BhY2UgPDwgL3NSR0IgNSAwIFIgPj4KPj4KZW5kb2JqCjUgMCBvYmoKWy9JQ0NCYXNlZCA2IDAgUl0KZW5kb2JqCjYgMCBvYmoKPDwgL0FsdGVybmF0ZSAvRGV2aWNlUkdCIC9OIDMgL0xlbmd0aCAyNTk2IC9GaWx0ZXIgL0ZsYXRlRGVjb2RlID4+CnN0cmVhbQp4nJ2Wd1RT2RaHz703vVCSEIqU0GtoUgJIDb1IkS4qMQkQSsCQACI2RFRwRFGRpggyKOCAo0ORsSKKhQFRsesEGUTUcXAUG5ZJZK0Z37x5782b3x/3fmufvc/dZ+991roAkPyDBcJMWAmADKFYFOHnxYiNi2dgBwEM8AADbADgcLOzQhb4RgKZAnzYjGyZE/gXvboOIPn7KtM/jMEA/5+UuVkiMQBQmIzn8vjZXBkXyTg9V5wlt0/JmLY0Tc4wSs4iWYIyVpNz8ixbfPaZZQ858zKEPBnLc87iZfDk3CfjjTkSvoyRYBkX5wj4uTK+JmODdEmGQMZv5LEZfE42ACiS3C7mc1NkbC1jkigygi3jeQDgSMlf8NIvWMzPE8sPxc7MWi4SJKeIGSZcU4aNkxOL4c/PTeeLxcwwDjeNI+Ix2JkZWRzhcgBmz/xZFHltGbIiO9g4OTgwbS1tvijUf138m5L3dpZehH/uGUQf+MP2V36ZDQCwpmW12fqHbWkVAF3rAVC7/YfNYC8AirK+dQ59cR66fF5SxOIsZyur3NxcSwGfaykv6O/6nw5/Q198z1K+3e/lYXjzkziSdDFDXjduZnqmRMTIzuJw+Qzmn4f4Hwf+dR4WEfwkvogvlEVEy6ZMIEyWtVvIE4gFmUKGQPifmvgPw/6k2bmWidr4EdCWWAKlIRpAfh4AKCoRIAl7ZCvQ730LxkcD+c2L0ZmYnfvPgv59V7hM/sgWJH+OY0dEMrgSUc7smvxaAjQgAEVAA+pAG+gDE8AEtsARuAAP4AMCQSiIBHFgMeCCFJABRCAXFIC1oBiUgq1gJ6gGdaARNIM2cBh0gWPgNDgHLoHLYATcAVIwDp6AKfAKzEAQhIXIEBVSh3QgQ8gcsoVYkBvkAwVDEVAclAglQ0JIAhVA66BSqByqhuqhZuhb6Ch0GroADUO3oFFoEvoVegcjMAmmwVqwEWwFs2BPOAiOhBfByfAyOB8ugrfAlXADfBDuhE/Dl+ARWAo/gacRgBAROqKLMBEWwkZCkXgkCREhq5ASpAJpQNqQHqQfuYpIkafIWxQGRUUxUEyUC8ofFYXiopahVqE2o6pRB1CdqD7UVdQoagr1EU1Ga6LN0c7oAHQsOhmdiy5GV6Cb0B3os+gR9Dj6FQaDoWOMMY4Yf0wcJhWzArMZsxvTjjmFGcaMYaaxWKw61hzrig3FcrBibDG2CnsQexJ7BTuOfYMj4nRwtjhfXDxOiCvEVeBacCdwV3ATuBm8Et4Q74wPxfPwy/Fl+EZ8D34IP46fISgTjAmuhEhCKmEtoZLQRjhLuEt4QSQS9YhOxHCigLiGWEk8RDxPHCW+JVFIZiQ2KYEkIW0h7SedIt0ivSCTyUZkD3I8WUzeQm4mnyHfJ79RoCpYKgQo8BRWK9QodCpcUXimiFc0VPRUXKyYr1iheERxSPGpEl7JSImtxFFapVSjdFTphtK0MlXZRjlUOUN5s3KL8gXlRxQsxYjiQ+FRiij7KGcoY1SEqk9lU7nUddRG6lnqOA1DM6YF0FJppbRvaIO0KRWKip1KtEqeSo3KcRUpHaEb0QPo6fQy+mH6dfo7VS1VT1W+6ibVNtUrqq/V5qh5qPHVStTa1UbU3qkz1H3U09S3qXep39NAaZhphGvkauzROKvxdA5tjssc7pySOYfn3NaENc00IzRXaO7THNCc1tLW8tPK0qrSOqP1VJuu7aGdqr1D+4T2pA5Vx01HoLND56TOY4YKw5ORzqhk9DGmdDV1/XUluvW6g7ozesZ6UXqFeu169/QJ+iz9JP0d+r36UwY6BiEGBQatBrcN8YYswxTDXYb9hq+NjI1ijDYYdRk9MlYzDjDON241vmtCNnE3WWbSYHLNFGPKMk0z3W162Qw2szdLMasxGzKHzR3MBea7zYct0BZOFkKLBosbTBLTk5nDbGWOWtItgy0LLbssn1kZWMVbbbPqt/pobW+dbt1ofceGYhNoU2jTY/OrrZkt17bG9tpc8lzfuavnds99bmdux7fbY3fTnmofYr/Bvtf+g4Ojg8ihzWHS0cAx0bHW8QaLxgpjbWadd0I7eTmtdjrm9NbZwVnsfNj5FxemS5pLi8ujecbz+PMa54256rlyXOtdpW4Mt0S3vW5Sd113jnuD+wMPfQ+eR5PHhKepZ6rnQc9nXtZeIq8Or9dsZ/ZK9ilvxNvPu8R70IfiE+VT7XPfV8832bfVd8rP3m+F3yl/tH+Q/zb/GwFaAdyA5oCpQMfAlYF9QaSgBUHVQQ+CzYJFwT0hcEhgyPaQu/MN5wvnd4WC0IDQ7aH3wozDloV9H44JDwuvCX8YYRNRENG/gLpgyYKWBa8ivSLLIu9EmURJonqjFaMTopujX8d4x5THSGOtYlfGXorTiBPEdcdj46Pjm+KnF/os3LlwPME+oTjh+iLjRXmLLizWWJy++PgSxSWcJUcS0YkxiS2J7zmhnAbO9NKApbVLp7hs7i7uE54Hbwdvku/KL+dPJLkmlSc9SnZN3p48meKeUpHyVMAWVAuep/qn1qW+TgtN25/2KT0mvT0Dl5GYcVRIEaYJ+zK1M/Myh7PMs4qzpMucl+1cNiUKEjVlQ9mLsrvFNNnP1IDERLJeMprjllOT8yY3OvdInnKeMG9gudnyTcsn8n3zv16BWsFd0VugW7C2YHSl58r6VdCqpat6V+uvLlo9vsZvzYG1hLVpa38otC4sL3y5LmZdT5FW0ZqisfV+61uLFYpFxTc2uGyo24jaKNg4uGnupqpNH0t4JRdLrUsrSt9v5m6++JXNV5VffdqStGWwzKFsz1bMVuHW69vctx0oVy7PLx/bHrK9cwdjR8mOlzuX7LxQYVdRt4uwS7JLWhlc2V1lULW16n11SvVIjVdNe61m7aba17t5u6/s8djTVqdVV1r3bq9g7816v/rOBqOGin2YfTn7HjZGN/Z/zfq6uUmjqbTpw37hfumBiAN9zY7NzS2aLWWtcKukdfJgwsHL33h/093GbKtvp7eXHgKHJIcef5v47fXDQYd7j7COtH1n+F1tB7WjpBPqXN451ZXSJe2O6x4+Gni0t8elp+N7y+/3H9M9VnNc5XjZCcKJohOfTuafnD6Vderp6eTTY71Leu+ciT1zrS+8b/Bs0Nnz53zPnen37D953vX8sQvOF45eZF3suuRwqXPAfqDjB/sfOgYdBjuHHIe6Lztd7hmeN3ziivuV01e9r567FnDt0sj8keHrUddv3ki4Ib3Ju/noVvqt57dzbs/cWXMXfbfkntK9ivua9xt+NP2xXeogPT7qPTrwYMGDO2PcsSc/Zf/0frzoIflhxYTORPMj20fHJn0nLz9e+Hj8SdaTmafFPyv/XPvM5Nl3v3j8MjAVOzX+XPT806+bX6i/2P/S7mXvdNj0/VcZr2Zel7xRf3PgLett/7uYdxMzue+x7ys/mH7o+Rj08e6njE+ffgP3hPP7ZW5kc3RyZWFtCmVuZG9iago5IDAgb2JqCjw8Ci9UeXBlIC9FbmNvZGluZyAvQmFzZUVuY29kaW5nIC9XaW5BbnNpRW5jb2RpbmcKL0RpZmZlcmVuY2VzIFsgNDUvbWludXMgOTYvcXVvdGVsZWZ0CjE0NC9kb3RsZXNzaSAvZ3JhdmUgL2FjdXRlIC9jaXJjdW1mbGV4IC90aWxkZSAvbWFjcm9uIC9icmV2ZSAvZG90YWNjZW50Ci9kaWVyZXNpcyAvLm5vdGRlZiAvcmluZyAvY2VkaWxsYSAvLm5vdGRlZiAvaHVuZ2FydW1sYXV0IC9vZ29uZWsgL2Nhcm9uIC9zcGFjZV0KPj4KZW5kb2JqCjEwIDAgb2JqCjw8IC9UeXBlIC9Gb250IC9TdWJ0eXBlIC9UeXBlMSAvTmFtZSAvRjEgL0Jhc2VGb250IC9aYXBmRGluZ2JhdHMgPj4KZW5kb2JqCjExIDAgb2JqCjw8IC9UeXBlIC9Gb250IC9TdWJ0eXBlIC9UeXBlMSAvTmFtZSAvRjIgL0Jhc2VGb250IC9IZWx2ZXRpY2EKL0VuY29kaW5nIDkgMCBSID4+CmVuZG9iagp4cmVmCjAgMTIKMDAwMDAwMDAwMCA2NTUzNSBmIAowMDAwMDAwMDIxIDAwMDAwIG4gCjAwMDAwMDAxNjMgMDAwMDAgbiAKMDAwMDAwMTU1MiAwMDAwMCBuIAowMDAwMDAxNjM1IDAwMDAwIG4gCjAwMDAwMDE3NTkgMDAwMDAgbiAKMDAwMDAwMTc5MiAwMDAwMCBuIAowMDAwMDAwMjEyIDAwMDAwIG4gCjAwMDAwMDAyOTIgMDAwMDAgbiAKMDAwMDAwNDQ4NyAwMDAwMCBuIAowMDAwMDA0NzQ0IDAwMDAwIG4gCjAwMDAwMDQ4MjggMDAwMDAgbiAKdHJhaWxlcgo8PCAvU2l6ZSAxMiAvSW5mbyAxIDAgUiAvUm9vdCAyIDAgUiA+PgpzdGFydHhyZWYKNDkyNQolJUVPRgo=" style="display: block; margin: auto;" /></p>
+<pre><code>## 
+## $`Boxplot pattern 3`</code></pre>
+<p><img src="data:application/pdf;base64,JVBERi0xLjQKJYHigeOBz4HTXHIKMSAwIG9iago8PAovQ3JlYXRpb25EYXRlIChEOjIwMTcwMjE4MjE0MTM2KQovTW9kRGF0ZSAoRDoyMDE3MDIxODIxNDEzNikKL1RpdGxlIChSIEdyYXBoaWNzIE91dHB1dCkKL1Byb2R1Y2VyIChSIDMuMy4yKQovQ3JlYXRvciAoUikKPj4KZW5kb2JqCjIgMCBvYmoKPDwgL1R5cGUgL0NhdGFsb2cgL1BhZ2VzIDMgMCBSID4+CmVuZG9iago3IDAgb2JqCjw8IC9UeXBlIC9QYWdlIC9QYXJlbnQgMyAwIFIgL0NvbnRlbnRzIDggMCBSIC9SZXNvdXJjZXMgNCAwIFIgPj4KZW5kb2JqCjggMCBvYmoKPDwKL0xlbmd0aCAxMTcxIC9GaWx0ZXIgL0ZsYXRlRGVjb2RlCj4+CnN0cmVhbQp4nMVYS28cNwy+z6/g0T5YkajR61inD8BAA6S7SA9BDm6SAjY8m9R20b9fSuJI8ux4Zx8OfNjFfpb4kSIlfpIVXIGCW/ine0+fy3X35uGP3y7h80MnhZQS2u+Hz5vuza9I89d/g0LBA/krYyWdMD2D9QAfz36+fryGLzcPj/fncKEMnN38dQ4o4ezfx5tvmwe42cD368fHr3EYaXgD+vwTrK+6X9YppOYDvRS9gt4IpSFY4S2gUxHcf4U/YTOdz2t5u5pZy+rtO/qrM/Bf9/ETSPjSKbiiz22n0nJ+77IzT/wSBtC9cD2jO1jxqNJaYB1m2Ix7I3QznmEdR+1EX8cZNuM+CNOMZxjHD6mUnFQqfzthHTgql4qFOrvAc1jfxqxH6n1sFQZh2Vjtb4w6ulSUSpeN5aG2SGn22fZgv0glCNm2LPj9Ebt/1oWxcfNrFBiSh5+G7/vH573ofWP87tvmoiHY9wyctOeNER4BVRAOYRgh9kIauJtC2jteL8FMNULlqXJ+G2bm3bBQTeCqC0F4A8pS9g1FnSFKLSydlSlUqFLSFjCzVay9UH4Gs/PdcCSbwFUpB1DZDWhCuTA0o2ZgAIbaxDMTj7+iilU/AzC2ND+kCdmCqzESIKWu1y0BL7sQoE+nJM7gImSfA3DFagh5Ldkj2ee01AC4StnjaN4EwGXJ/op943/hKKYDpfKBIqm5By+0ol8y/6BATNx+NrqNx+kuHqQ0sxzH562TjMVNoGOj2zZ/QYGZP8mrGd3TtBi0PFX1USmenPmUqtAHaL9T16pRTof3jXLe92XM41H3BOr+JGSazjBdCWJ+P6hpN36B3M5H/TS3ijQX3QGXihdTC2V0CvI4uUh3iX5ZLxbXd1KelUFhPQUTUhsYMUoqrI3dcopdL2xYxMxXMfUv5+Yw+1/ChW+CqRFSTqijKadjToYRI3WAJC9TjMrHH0uY+Sru+9iJtvHofwmPfFP8vIak7lVyNcCIVdo4scWmoIuvARhbupr5rBLZhMtTKBDdeI9lE15+oUAnhWYOTnl2SxxcwhoGLym7JYqcoSYK3kTZa2FoohiLlL0WiiaK09REWRmbh/KO3zWHyQlK6j1xT0iB/Yz50zPWkqlIZoU1iSz9UJQY0vS4tmB+lDbt7BqzDfR11Gmn8+PlSTmqm32iT1uvhZfI7z4ChfT2o7y/gkChkSnI4wQKPdmp5wXqpPxpTTsk1Ne5pqNhm+c5j9f3eZ7QPNDHGeWFzjPqE51n1Dd6ntE80scZ5ZXOM+ozfe8inpQN7EP6r4uzQtFlesQoMT+gtjC5NmYRM1/FFL4Mc5j9L+HCN8EkI4Hu6y4/R+IbbsQYso5PsSb1MH4ZZ76Ck36pGcz8S7jwTfHzKowkHTVXJE2MKdcsf5rUocZCu4ixtJEpiWy24foUDuxxfIyxDa+/cGBI/6JJHJzz7HeAsYY1jnHN2S9xcI6aOHgfZb+Fo4ljzEv2WziaOE4TYjQuNsx4+0E8XIi1VALjtqBq2R+lnTvP+mxvfx3t3On8eO1EZ2JtWu3UL6qdO+NebUth9z+pZqpxZW5kc3RyZWFtCmVuZG9iagozIDAgb2JqCjw8IC9UeXBlIC9QYWdlcyAvS2lkcyBbIDcgMCBSIF0gL0NvdW50IDEgL01lZGlhQm94IFswIDAgMzYwIDM2MF0gPj4KZW5kb2JqCjQgMCBvYmoKPDwKL1Byb2NTZXQgWy9QREYgL1RleHRdCi9Gb250IDw8IC9GMSAxMCAwIFIgL0YyIDExIDAgUiA+PgovRXh0R1N0YXRlIDw8ID4+Ci9Db2xvclNwYWNlIDw8IC9zUkdCIDUgMCBSID4+Cj4+CmVuZG9iago1IDAgb2JqClsvSUNDQmFzZWQgNiAwIFJdCmVuZG9iago2IDAgb2JqCjw8IC9BbHRlcm5hdGUgL0RldmljZVJHQiAvTiAzIC9MZW5ndGggMjU5NiAvRmlsdGVyIC9GbGF0ZURlY29kZSA+PgpzdHJlYW0KeJydlndUU9kWh8+9N71QkhCKlNBraFICSA29SJEuKjEJEErAkAAiNkRUcERRkaYIMijggKNDkbEiioUBUbHrBBlE1HFwFBuWSWStGd+8ee/Nm98f935rn73P3Wfvfda6AJD8gwXCTFgJgAyhWBTh58WIjYtnYAcBDPAAA2wA4HCzs0IW+EYCmQJ82IxsmRP4F726DiD5+yrTP4zBAP+flLlZIjEAUJiM5/L42VwZF8k4PVecJbdPyZi2NE3OMErOIlmCMlaTc/IsW3z2mWUPOfMyhDwZy3PO4mXw5Nwn4405Er6MkWAZF+cI+LkyviZjg3RJhkDGb+SxGXxONgAoktwu5nNTZGwtY5IoMoIt43kA4EjJX/DSL1jMzxPLD8XOzFouEiSniBkmXFOGjZMTi+HPz03ni8XMMA43jSPiMdiZGVkc4XIAZs/8WRR5bRmyIjvYODk4MG0tbb4o1H9d/JuS93aWXoR/7hlEH/jD9ld+mQ0AsKZltdn6h21pFQBd6wFQu/2HzWAvAIqyvnUOfXEeunxeUsTiLGcrq9zcXEsBn2spL+jv+p8Of0NffM9Svt3v5WF485M4knQxQ143bmZ6pkTEyM7icPkM5p+H+B8H/nUeFhH8JL6IL5RFRMumTCBMlrVbyBOIBZlChkD4n5r4D8P+pNm5lona+BHQllgCpSEaQH4eACgqESAJe2Qr0O99C8ZHA/nNi9GZmJ37z4L+fVe4TP7IFiR/jmNHRDK4ElHO7Jr8WgI0IABFQAPqQBvoAxPABLbAEbgAD+ADAkEoiARxYDHgghSQAUQgFxSAtaAYlIKtYCeoBnWgETSDNnAYdIFj4DQ4By6By2AE3AFSMA6egCnwCsxAEISFyBAVUod0IEPIHLKFWJAb5AMFQxFQHJQIJUNCSAIVQOugUqgcqobqoWboW+godBq6AA1Dt6BRaBL6FXoHIzAJpsFasBFsBbNgTzgIjoQXwcnwMjgfLoK3wJVwA3wQ7oRPw5fgEVgKP4GnEYAQETqiizARFsJGQpF4JAkRIauQEqQCaUDakB6kH7mKSJGnyFsUBkVFMVBMlAvKHxWF4qKWoVahNqOqUQdQnag+1FXUKGoK9RFNRmuizdHO6AB0LDoZnYsuRlegm9Ad6LPoEfQ4+hUGg6FjjDGOGH9MHCYVswKzGbMb0445hRnGjGGmsVisOtYc64oNxXKwYmwxtgp7EHsSewU7jn2DI+J0cLY4X1w8TogrxFXgWnAncFdwE7gZvBLeEO+MD8Xz8MvxZfhGfA9+CD+OnyEoE4wJroRIQiphLaGS0EY4S7hLeEEkEvWITsRwooC4hlhJPEQ8TxwlviVRSGYkNimBJCFtIe0nnSLdIr0gk8lGZA9yPFlM3kJuJp8h3ye/UaAqWCoEKPAUVivUKHQqXFF4pohXNFT0VFysmK9YoXhEcUjxqRJeyUiJrcRRWqVUo3RU6YbStDJV2UY5VDlDebNyi/IF5UcULMWI4kPhUYoo+yhnKGNUhKpPZVO51HXURupZ6jgNQzOmBdBSaaW0b2iDtCkVioqdSrRKnkqNynEVKR2hG9ED6On0Mvph+nX6O1UtVU9Vvuom1TbVK6qv1eaoeajx1UrU2tVG1N6pM9R91NPUt6l3qd/TQGmYaYRr5Grs0Tir8XQObY7LHO6ckjmH59zWhDXNNCM0V2ju0xzQnNbS1vLTytKq0jqj9VSbru2hnaq9Q/uE9qQOVcdNR6CzQ+ekzmOGCsOTkc6oZPQxpnQ1df11Jbr1uoO6M3rGelF6hXrtevf0Cfos/ST9Hfq9+lMGOgYhBgUGrQa3DfGGLMMUw12G/YavjYyNYow2GHUZPTJWMw4wzjduNb5rQjZxN1lm0mByzRRjyjJNM91tetkMNrM3SzGrMRsyh80dzAXmu82HLdAWThZCiwaLG0wS05OZw2xljlrSLYMtCy27LJ9ZGVjFW22z6rf6aG1vnW7daH3HhmITaFNo02Pzq62ZLde2xvbaXPJc37mr53bPfW5nbse322N3055qH2K/wb7X/oODo4PIoc1h0tHAMdGx1vEGi8YKY21mnXdCO3k5rXY65vTW2cFZ7HzY+RcXpkuaS4vLo3nG8/jzGueNueq5clzrXaVuDLdEt71uUnddd457g/sDD30PnkeTx4SnqWeq50HPZ17WXiKvDq/XbGf2SvYpb8Tbz7vEe9CH4hPlU+1z31fPN9m31XfKz95vhd8pf7R/kP82/xsBWgHcgOaAqUDHwJWBfUGkoAVB1UEPgs2CRcE9IXBIYMj2kLvzDecL53eFgtCA0O2h98KMw5aFfR+OCQ8Lrwl/GGETURDRv4C6YMmClgWvIr0iyyLvRJlESaJ6oxWjE6Kbo1/HeMeUx0hjrWJXxl6K04gTxHXHY+Oj45vipxf6LNy5cDzBPqE44foi40V5iy4s1licvvj4EsUlnCVHEtGJMYktie85oZwGzvTSgKW1S6e4bO4u7hOeB28Hb5Lvyi/nTyS5JpUnPUp2Td6ePJninlKR8lTAFlQLnqf6p9alvk4LTduf9ik9Jr09A5eRmHFUSBGmCfsytTPzMoezzLOKs6TLnJftXDYlChI1ZUPZi7K7xTTZz9SAxESyXjKa45ZTk/MmNzr3SJ5ynjBvYLnZ8k3LJ/J9879egVrBXdFboFuwtmB0pefK+lXQqqWrelfrry5aPb7Gb82BtYS1aWt/KLQuLC98uS5mXU+RVtGaorH1futbixWKRcU3NrhsqNuI2ijYOLhp7qaqTR9LeCUXS61LK0rfb+ZuvviVzVeVX33akrRlsMyhbM9WzFbh1uvb3LcdKFcuzy8f2x6yvXMHY0fJjpc7l+y8UGFXUbeLsEuyS1oZXNldZVC1tep9dUr1SI1XTXutZu2m2te7ebuv7PHY01anVVda926vYO/Ner/6zgajhop9mH05+x42Rjf2f836urlJo6m06cN+4X7pgYgDfc2Ozc0tmi1lrXCrpHXyYMLBy994f9Pdxmyrb6e3lx4ChySHHn+b+O31w0GHe4+wjrR9Z/hdbQe1o6QT6lzeOdWV0iXtjusePhp4tLfHpafje8vv9x/TPVZzXOV42QnCiaITn07mn5w+lXXq6enk02O9S3rvnIk9c60vvG/wbNDZ8+d8z53p9+w/ed71/LELzheOXmRd7LrkcKlzwH6g4wf7HzoGHQY7hxyHui87Xe4Znjd84or7ldNXva+euxZw7dLI/JHh61HXb95IuCG9ybv56Fb6ree3c27P3FlzF3235J7SvYr7mvcbfjT9sV3qID0+6j068GDBgztj3LEnP2X/9H686CH5YcWEzkTzI9tHxyZ9Jy8/Xvh4/EnWk5mnxT8r/1z7zOTZd794/DIwFTs1/lz0/NOvm1+ov9j/0u5l73TY9P1XGa9mXpe8UX9z4C3rbf+7mHcTM7nvse8rP5h+6PkY9PHup4xPn34D94Tz+2VuZHN0cmVhbQplbmRvYmoKOSAwIG9iago8PAovVHlwZSAvRW5jb2RpbmcgL0Jhc2VFbmNvZGluZyAvV2luQW5zaUVuY29kaW5nCi9EaWZmZXJlbmNlcyBbIDQ1L21pbnVzIDk2L3F1b3RlbGVmdAoxNDQvZG90bGVzc2kgL2dyYXZlIC9hY3V0ZSAvY2lyY3VtZmxleCAvdGlsZGUgL21hY3JvbiAvYnJldmUgL2RvdGFjY2VudAovZGllcmVzaXMgLy5ub3RkZWYgL3JpbmcgL2NlZGlsbGEgLy5ub3RkZWYgL2h1bmdhcnVtbGF1dCAvb2dvbmVrIC9jYXJvbiAvc3BhY2VdCj4+CmVuZG9iagoxMCAwIG9iago8PCAvVHlwZSAvRm9udCAvU3VidHlwZSAvVHlwZTEgL05hbWUgL0YxIC9CYXNlRm9udCAvWmFwZkRpbmdiYXRzID4+CmVuZG9iagoxMSAwIG9iago8PCAvVHlwZSAvRm9udCAvU3VidHlwZSAvVHlwZTEgL05hbWUgL0YyIC9CYXNlRm9udCAvSGVsdmV0aWNhCi9FbmNvZGluZyA5IDAgUiA+PgplbmRvYmoKeHJlZgowIDEyCjAwMDAwMDAwMDAgNjU1MzUgZiAKMDAwMDAwMDAyMSAwMDAwMCBuIAowMDAwMDAwMTYzIDAwMDAwIG4gCjAwMDAwMDE1MzUgMDAwMDAgbiAKMDAwMDAwMTYxOCAwMDAwMCBuIAowMDAwMDAxNzQyIDAwMDAwIG4gCjAwMDAwMDE3NzUgMDAwMDAgbiAKMDAwMDAwMDIxMiAwMDAwMCBuIAowMDAwMDAwMjkyIDAwMDAwIG4gCjAwMDAwMDQ0NzAgMDAwMDAgbiAKMDAwMDAwNDcyNyAwMDAwMCBuIAowMDAwMDA0ODExIDAwMDAwIG4gCnRyYWlsZXIKPDwgL1NpemUgMTIgL0luZm8gMSAwIFIgL1Jvb3QgMiAwIFIgPj4Kc3RhcnR4cmVmCjQ5MDgKJSVFT0YK" style="display: block; margin: auto;" /></p>
+<p>The medians and boundaries of the boxes show that in pattern 1, the amputed data is shifted to the right with respect to the non-amputed data. For variable V2, this effect is the largest, due to the weight value that was specified. For V1, there is a very small difference between the boxplots of the amputed and non-amputed data. This makes sense, because variable V1 was amputed in the first pattern and therefore set to <code>0</code> in the <code>weights</code> matrix. The small difference that is visible is due to the positive correlation between V1 on the one side and V2 and V3 on the other side. These correlations were created during the simulation of the data.</p>
+<p>If desired, one could use the function <code>tsum.test()</code> from package <code>BSDA</code> to perform a t-test on the amputed and non-amputed data. The data returned in the descriptives table can be used for that. For example, to know whether the mean difference between the amputed and non-amputed data for variable V2 in pattern 1 is significant, one could run:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">BSDA::<span class="kw">tsum.test</span>(<span class="dt">mean.x =</span> <span class="fl">0.52879</span>, <span class="dt">mean.y =</span> -<span class="fl">0.22978</span>,
+                <span class="dt">s.x =</span> <span class="kw">sqrt</span>(<span class="fl">0.85752</span>), <span class="dt">s.y =</span> <span class="kw">sqrt</span>(<span class="fl">0.89401</span>),
+                <span class="dt">n.x =</span> <span class="dv">2099</span>, <span class="dt">n.y =</span> <span class="dv">4896</span>)</code></pre></div>
+<pre><code>## 
+##  Welch Modified Two-Sample t-Test
+## 
+## data:  Summarized x and y
+## t = 31.2, df = 4046.1, p-value &lt; 2.2e-16
+## alternative hypothesis: true difference in means is not equal to 0
+## 95 percent confidence interval:
+##  0.7109025 0.8062375
+## sample estimates:
+## mean of x mean of y 
+##   0.52879  -0.22978</code></pre>
+<p>As is visible, there is a significant difference between the amputed and non-amputed data of variable V2 in pattern 1.</p>
+<p>For pattern 3, the difference between the distributions of the amputed and non-amputed data is largest for variable V1, as can be expected due to the weight values in pattern 3.</p>
+</div>
+<div id="scatterplots" class="section level4">
+<h4>Scatterplots</h4>
+<p>Scatterplots might also help to investigate the effect of the specifications. We can directly impose the function <code>xyplot()</code> on the <code>mads</code> object. The function contains arguments comparable to <code>bwplot()</code>.</p>
+<p>For example, we can investigate the weighted sum scores of pattern 1 as follows:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">xyplot</span>(result, <span class="dt">which.pat =</span> <span class="dv">1</span>, <span class="dt">colors =</span> <span class="kw">mdc</span>(<span class="dv">1</span>:<span class="dv">2</span>))</code></pre></div>
+<pre><code>## $`Scatterplot Pattern 1`</code></pre>
+<p><img src="data:application/pdf;base64,JVBERi0xLjQKJYHigeOBz4HTXHIKMSAwIG9iago8PAovQ3JlYXRpb25EYXRlIChEOjIwMTcwMjE4MjE0MTM2KQovTW9kRGF0ZSAoRDoyMDE3MDIxODIxNDEzNikKL1RpdGxlIChSIEdyYXBoaWNzIE91dHB1dCkKL1Byb2R1Y2VyIChSIDMuMy4yKQovQ3JlYXRvciAoUikKPj4KZW5kb2JqCjIgMCBvYmoKPDwgL1R5cGUgL0NhdGFsb2cgL1BhZ2VzIDMgMCBSID4+CmVuZG9iago3IDAgb2JqCjw8IC9UeXBlIC9QYWdlIC9QYXJlbnQgMyAwIFIgL0NvbnRlbnRzIDggMCBSIC9SZXNvdXJjZXMgNCAwIFIgPj4KZW5kb2JqCjggMCBvYmoKPDwKL0xlbmd0aCA2MDExMyAvRmlsdGVyIC9GbGF0ZURlY29kZQo+PgpzdHJlYW0KeJy0fUmvpMtx3b5/xV2KC13mPGwp2AQE2IDdD9ZC0EK4pGURKtrmk23Av95fxjknIqslwaSHRd+uiKiIjPqGHGLMH3/5kT9+9/Ffv/2769+vfvr2y5///a9/9fH187f0mVL6uP/+/PX7b7/81+Xh++k/fuTySQL+AN7rs3Z+/un18dd/9v0f//b3v/nbP/zm7//nLz5y//iz3/7m47//4qM8n/72H/7bb3/++Pvff/yXv/3Hf/ztH37x8ecH+/uP/Iu/+fjpL7/9q5/+VI0uNf780i63z/F8I9fPNaDTX/3io6ZHlb//u//0j48+P/+31yPoP//htz+/jXz9+2j7M5WPnj7XI6/2z7JMYB0ff/jtx199/P5HBur8F9//GZ2//8W/fbCzf/yPb3/9Nx/p4zff8sdfPv9+9y2bvv/mG0Yb/XOtj9dHq+eSAvqHj++krnZTAQU1p3qTCV70Uj7XDDrAi97yGx3gRR/pjQ7w0P+UJyj98ATZ3zI+y/4Y5fx97taf/Xn5xcdPvzs35Yj+Y3hXdt78x/PW8pnr8zmJOf3JvHmfB+Pw/unj1iXeP+H3krdP8Vbx/j95Dufz1Gw+9a8PQK2fIc+dzmmfey8ywYvenocyBx3gRV/PpZ5BBxj0/+snaazPvM81+j94knIan31ezH/C05DbM/nUi/dPGXfOz3Yr3X64o//7qeiXv/6eP/7u539661tpz9858h9x6z+eOWF/9m4vxHxmkhvzPHVn7PQ5qk0t+VGh5s/dBX2db9d67qfTGyYi8hIy2fi2Yfb+bEOsZy1xyQDwVRuYVOhEvjeVv759P99+ftEz4h7nsXpdiOc6P1/N+Wj3yOrn/S2fPRGwkc6aUZzaPnfwATCp+CoQ9oyLr37OkGoAvooxSYU25Lt0pfo92y977nea0F+Y/Fn3898jvdl/7bnY3RY5QjZY73b5RX8myIuXkMnGt4Fp6zwc4m3zc4RsQPg2xhYdeon31pu/5bmTuX3s/jk3fgoR8zM/P/4883axn5f2PAGPaAB6Pp7RRe2fO/gAmFR8FYhmv5h81X4wpRqAr2JMUqEN+S5d9SQ9450Hen72wUeJmHVW15yfKbzbPLiHLQZ9CrLBSjoTqOjleayDV5DJxreJee5IC97njlyyDcIzxbFJp17gfdNbv2Wcn/z8vKWfAsS0O/5wNHv/zsPwiH6uAQD9jue6k/qomZ2PgEnVjziIZs8J+ao9GJRqwBev5RmTVGgDvltXqv/8ltWwreGjJMwzIWa7qrvgAmx7rc51AKRX8LkWTi+fI3gFmWx8m5hiV128+UzULtsg+7bGBl16gfdNb/yWZ1md5UxgG/MT4MP+3NDZbJp/uGv9mM+8UAScoc5a0Zz6zFLBZwCE2jcBr89n8gfXc8e6ROKzfc/GIw2KgedSUi/z89Lgoj5T1uvGPPKLvXjnv+dqdCxUswnCqzc/0wj6Oq+b8xIy2fg2Me3M7M77aHXJNkiTRStBp17kvfXGbzkbxvTx7D+emf0VcP6c82OVs8I+f9ezy66fI/HzGefZdT93mrRxFk7y4LPJs+8ZPPeZ1sHz3I8kefhs37OxSDMdyHPpd61q3a5eGrGsYfY5y+LzkBasLvY6FVsXAfnKNoPesHiTl5DJ9sWt2zU7F5q8z+syQjYgvVxnbNGpF3lvvfUyN9sTPPc+8UkS5lniCya1Zdo1bsySoC+9+iXo6yzEzkvIZPvrmaDdCt527oTLNgjf5tikUy/y3nrrviybUY4uXK6JeX743DZzV8wh5xI+M+LYgjBhPlvHHPT6mYKXEGTj28Qsu6jkPfqEbEC4LxibdGkK3je9dV/OlvG89JX7PyBse5Vspun477xWzyS0iqAv3cQW9H5WWuc1CKJ1nbH423ttnM82aLtgAPiqjSsqdCTfpXCs2Rs/dlVfszcuj/3ufV62s06dR/ZBnisESAvYuYqil/N6i5cQZOvuGeaZP7PzPstXC9mAdD/O2KRLU/C+6e2zVN9nLnmuzSvged7gZ+Z4tmBrnfXymVX25mebVfpnzaLZUkoefDZ5nKUO3M7lJk897yzl2WfOUmcs0KADeC79XOPnWPKMVn1ePfAy/nJWobXPZvHIGvxMjdMSbZwdDXnw2eRR42y/4zltkccmKsqzz9T4jAUadADPpZ+el3Ku+7PXeCbp14WY2Em1c8c2ppbczw0F8MUt1NhOnedREB8Ak6rNzkFgViFftfWbUg3Q3HvGJBXakO/SlXuJhWnq2RBgJhWiHhPYs5hw2pq2UqUkgBepFqdWzKXGJ8Ck2leJSOcVBN/ZGkgoPtt2wkYELFWM6U3ROB1wr9OWHw8WtLCzbrGdcjJT11niSxKkbX8vQR/65cY7NF7Tt4nJtmEWbzoPkcs2SOeEtYJOvch76x3LAM+3vfkyYJhsh6jn1T/v/MOzsTGeXZAvAzPoFYsmeAUlveDEPJe5FLFu7JcgGYDmnFZFhU7ke1OZ72+zLf6zRDTssoXY57R65gis6Mteey723DQ/b9WZn0ndmJ/Bt7Xx445ZCDumkO9ZiZNLBaC5rDmV2oDv1lV3gRuV5yJk3gVizEDj25pq58jnNZS9Ivtb2nfQbQ5yXkImW0ewB3NWny3WMxe4ZADXfkpU00l8t8r4GcOWkTMLYxYl3I/MUbjfPBbixkvG2XH0z5ZFG+eykAefq2ZHwuUYVciTz5aO8uyzfQ9jgQYdwHPpxwvf+plYz0UYPJ4Js22L0oYdXJ6n82xf2jzTNSG7PsfGtZzekw69h1eQyYYZgphhCyx5n3m0hGxAkI2xRade5L311i6o2un5HLn5KhNzjuTYrBTsIDbOkH0KwnZl2MlddN99rOEQZGsvy3W/FOc9B/iQDUhbrDO26NSUvLfe8VvOsNW2VK8b03S8OkrWrtHLECTt+gr6srdTvIRMtnbaA/NjT8HLPSRlG6TfYmMnHd3WxXvrzblpnp3RsRnj/EM4n0Ge3cLO9nSOj53Ozg2fzzjbnl/S7PkFDz8nWTkAP+vUMSUZz3NuXpKHzzYj2ViAoQN4bv3ixHzmhHJMIq8LUW3H91zGYUt7p4FrE9Bp+ZkrRF1mECEfgBKWMiDMI0O+s5VyqQB0Tj7bKlKhDfkuXaH+M0GZiaedl+11IfpZ98xvcl7iIePIudmAcHuLHbtErzbLi5dQc3OWMEXGE+PN9i5LtkFfPJfQFPVgpJaxvinN35GPlee5SQvTKeDnRj1vyy7yH9mOa2R+tgeiHeMHaeNMReSxz5Bn3wNsJhTwzHEO7pCHz3zAnrFIg07gufSjxgk2rXb2kq8L0c+13Bknt3FsVOepzQJslHo0ELXjgAg+AibVvkpEOftJ8WW7ipRqAF8iGxNUagO+W1fNOh2WzO12U2LO5gBn8ART/MYKzhOy7KYPI0/JG1uMGbyEIPuLdpAJu6rZ5bZOwTlkA9KMdsYWvcsmW9oPenMtHliybRP7uhC2kR1Ta/hzAB3rLOEEbDOcsHEwxMzYUxifgKQzLhFH+SG+YyhzqQBsVcaYpEIb8L3pGsebbG/FWn684SH97Hgf3QosjAV2oN4E4dp2LFukDyxp5DUIonUc2mbC70Ocx3niggHIGlWKU6Ej+S6FY2/9nF6HHSpegXiumW1jbb2bdl25zE4/uJxZ4ZkPRK1n2iAfgOFHFyEWJhvje651d6kAtKl+xiSV6oHv1lVvwz6TMJ/f140puI4Z5pmKa1z0SJW4VnyueI/mxUsoxU0ABs+weM8mOWQDkuUuTadTL/K+6c012Gzfx0KM3QThbetfxnEyW7ACDegG8AS5h1OficfZ8NlEyhRgj0pNZHrm1yKJ+PxF00IRDWqA51KRs6nNuKvJCUV4mG/CZuBn6c62dz9m3enrako8n2RMfUVcApqvq0RU8ySRzy42hRY5oDggaFDEmG4ltXuwM895ErnjcUzFxgpenmeps02XnYMIYa23w5foDf4k8goq7uMRJmFTBt7nOV8hG5B2J9xrGp16kffWm2aKfrwJ085Lr4DtAXsWxAVDwjzfyIWfaU5ojfBzY7t4+HnJMUnY7DrgmXYCgzx8Nnk2FmnQATyXfnzS63kHll2tV8Dm833+DntwjzGkn0cUn3kKLku0ZdYm8OBz1SxO2K4RecxJTHlZTnWOBRp0AM+ln+YZbJqyWQBeN4a2BWyxMq0J3aZEQDq3MGwqY4GcFy+hJIudMIl2DfAmmhQgG9C9vRMdeqWwiVyy7bfMCoPX1PV3DIz5s5ll63n+jthp7hZCNt65rSXoy8xX4iU0dS8cgyOKeOEIkOzuYQ4am/Qqk57x3npz+lnnhP3sqCpMEoSrhTTs82I9m0abpNN55wBoB52rU+vZZ4FNQHH7AhEJ87fxPZv87VIBfGET3zZhqmJct5qagIqdzM4CwMOjMNhDnCND7CGq2YQJyeKWW9AnlmvyEkp+eCTmLD7Jec/CFLIBfekklYIOvcR76x37oIovzuoboQrRtheFhbN2xHU1c8kC0t4mtaBPc8yKl1CJgA9i8rmmzpuO19ZlJzl1fWzSqRd5b735QNWzwq2hHSnhdd6552F5vr7MIfJs70fjZ55T9hBtHZXIg8/ubyFszjzyNDswQ17Ta8OxQIMO4Ln009RkLqFHQNbMBMTAelm4VTS3YrNYmSkjlB1eklOHjUa+QbWuGQy6rOp8BZZWSC0xfWFMUqEN+S5duRYM+fczFwMiLM7nuYgJFotuLoxaBHzh5MbYgqNZhqcf8UFZbn9OLEDsTaPDsF3MlEx85tKBuNtDM03A86Ym1910XvZna5oYagDY4vaebXCfhqlnf/ws/vjMqIBzJAXN7GbkwWeT94V1/MDjzFDgGd2sKCYPn3m8ecYiDTqA59Iv4lSKmag18QNhbgTMrBU3aWO3Pbog7cztCAd6yTjsJZkTkkTL1wfvThniVDyMCQagN/oZV1ToSL5LYU2c27wv88yrrwux7XzWzCP6bFnOXvxEDhYC2IdZtIKoFtYgPgAmFV8FYphdGnzPDekuFYB2d8+YpFIb8N26ut2nYeWfbvdpOGskOmC5/GFDv5IgLUW5BL3pnJJWQCUsOU1noNaCN5lVVrIN0o68LWGklrG+Ke3ODPxmGlEImz3qmamet+f51cMMdznxM98vXGfMnt158LnLfEK4WkgIeMwERXlFthOOBRp0AM+lnx7+fLbOw37360LwspSz6R5NJ/fz6higg9+z0Iva7QX0W7Ek1U/1DyLpbH6Cdnn9TGqPUAuM2f1Sp+C7dA2/RVUUe8DzaHR8Cfm86c9O9/gZKj/Tb3E8FqCZb5w8+Nx1tiXczs0gTz2qUF7VqZZjgQYdwHPpp4Vp2e6oHMPq60JwKdjmy2q2kcowGzZtpCwOpjoVxkPwETCpWuFhWszb+RJMQG6M1E4OY4JKbcB36xo7NJ4E5XYRBq6TZ5fEs985kT3blb0EaYd2NuqiT4TfkpdQuF2EgeuEvBVuFcqu4Xbh2KJTL/LeeutWDAv7aB72SkSHzWIy/LbBQFcKAZkAexP1uaTD+Qi0iIkBAgs/+TI8e5CaPdqVY5IKbbhhuHQNKw+d1a4/MVQkwQBCHWFQS9dPqApIMjrOGOJt8uP7ryCGP6PKtT0u2fFDNLb/zhW8b3q7wSRh3z7cYpLgQUtmMrFJxU7559TQBPB4MYcQdvhwRoeqP1HCFAuBIKuZmiU463nSsKBSIfDd6moibb4Xkju+ac/GcFNt2hCtoV2bvObLt23Ntgbz4t2+cQsfO3duRaxne+aSAfg5Ijm1afdWflCZNwIbxXYm31fAZqzYlTvhZd/Ay8EJHlYx0swqRp7JMwJnd8L1rM3kQU4X5BWF0HEs0BTcntabfrF9g6/ZVzA5ojNiZLp5rwuO44gj0ApWzJVAarEbTT4C1VcwIiwCQ3xZh/y1CbhPfzpVru+23nWN9eB8rY3z8143ZiICZhtnW9qHnA1Ku+ypxfQVvdpPIa+g4UEmwjQ8+OStMC9QtkFaGWxs0KUXeN/0jpDp49R49oJbXhhiGiYIxC3RBX5cCE3QPWvIRV7sLSOvoOI+G2GyiRFvkiXZZKdwDnJs0qkXeN/05ovQsX00N/TrQgzO+xlShvsUAPA4u5JTOduBzydoWiyEqPb4L0X5rJDqvm6NWbhGpeC7deWtKN1SP56VtXI6Iua5AANO1GNufS7AmRbKMiMDIDzu23JQSK/J0lPISwiysfISs5D4B94K3w1lA4JsjC06NSXvrbffig3f3Uy6FRtrULLrxDib7KmhAHh9xxTCQl6c0aHsMd3CJDNYbK1d1QUD4ESWqlOpUKIRZF9i3VDaz4lWcexATAYi2G5yMg6h66gspezUND3CYQafAZDqFtJ+trJzie+cel0qAJ2Czg6WVKg3FWW7Q+p3zn0Z25xGs5wwBY9PQYyIpSSZwX8Kwg1viDEhnZ5Z8hLKbmgr7rk994y8iTmlVRkvSd8uyohJJfQi7633ddpn7s2M4z52iA2BMOdOV/4IhGAB8uP+dnqBN4u8gky2n/envRGrO+/zRsyQDciP/D3o0Eu8t948bppPZxYPnQNceZ54dnWz8TgxNz9/wZiUs2jmayIPPhcPmgNsI5InMShubn6mp61N0aBDDn+U5GnL/Uyx04S9LsSEXd7sgCeRBB7mZxUAoNVhLFGzBWKQj8CIqDog3FV5+OiXhNQaJm+MSSq0oUPz0tUN69liWfqUYf1EZ5gf64Q4WpTFhj/u+QoAeevOd0hFUC3TrQyATNkJt8VZly6+xewqkwqAk1vphKnaopkoh8jvnKDP6e4EjyvwlRjMjBUHvgIPQy0ILu93ouU5ZoqOE6h4CZU70XIjOJ2ZlovB6ZfsFLmWHJt06kXeW2/NRoXRyoWTKRHN4mtPoGo1yzEmjxP60j3X4iwv06njvFniA1BjbwhERu4c+LBDotQUe0OMSSq0Id+lqx91pkXgrKmTzoErU9zgjyl2NoErpui5sNwcICxASVwCIsODiKRM1ePntawLCF2e3YEBSYMixnQr6S6A5wU5CXJZLoCJkxn8Rcjey7ZLyfzMERAMXAzbnQefTR73TN1+etviqeYeGkroy3IBMKcvSwfwXPqFaeuszR5HIwQiM85JzizwFdvmmQjIXpWKUy2PS3wAUth/DbE2gpONbzEyw6Quj6PhmKKaNuK7dOXkvnjOarjghG17tGzXuG0btS00Bp+/eGIrotkpHTz83PxCArbsHvJYbg/l2WfaHNciTB2M59YvgrCOh3F4wicRC/lNZn8/cxZOD6kS0FGDceKIv2rOR2B4JAARHZFD4Gs2W1Bq8xQ0jkkqtCHfpWsYb3Fpkxtv7R3IFj6yzFV5cuTw/BZNFMcQ20XbfBNz4WfIk/G22rcXeZad0iAPn2m8xVrcknQCz6VfpDM0u3ureTYDvLsZoazd5roCz+naBDDrWiaqqJakKj4Abk0WIts8Sb5kxhJKNQBfxZikQhvyXbrGZuA99t8xiAV5trMR/a9Q3wj/t3Ahj/8363DwCvIMAMdwLd1XDoBkRxKAxhZ9XGkA73q73aSZqba43aRZ+kK3WaQhz0BJ+PisQ10VbZpRATyTpt/ix41illi890jYXC7PDe0cCzToUPj+tpAn/zRjuIcyF4ixiFILIoR50LIFUeEGkKbI3YI+caYi71SFmBF5Dolhfzt4M7KhKTtr0fCxs7Kly8V76x1PUsX5rhR/kiih44BfcbRhzAhPPaP4lELtBix+OXgFJY8yAGYvBZHgFLpcMgB/jJZTB4+SO/2gcrzPCeuNoliFmUg4KshCWGbqqBUmn+UWkYpUbtE7wlfJSyjCpYXhFEBezgFVnho52TR2U0JSunhvvX2rfM607fgwXwF3c3JuO0vYHsO2J5WANi/niEtqsXD3DqcrgOZhDERU2HrBlxFUDKlZyekc0mCqYly3mpHOydCzIkMuMAWmo+fq8uQ3YKhl6sWQdQMPLekFDy15CUG2H19x6tzFeZ8LuUI2IBmJ+wz61Il1lx/09iC4Vjl3vAJeTMvvthwjXX9Vfjbn+Way1zBHUREPP0+9p4TNt0cem48or2lPwrFA61y9D8+lX1z9YXvEWvziD7tPA9lkw45axxx+UncyAV35Wp1qMx75CEzPoyQCNnnywRpOqS3yKDFm00UeznfrSn9ktRCJpmmIsG05RmPIxDPFjGHRdUMTEOJ6SbPtIXnwuWnqIWzha+TJZ2qhvKx5h2OBBh3Ac+kXWf4MRK/bs/xZymJiIa20NV1lLKbHoWaG2ZJusbTOS6h7rIEwTQHIGybNfckuHm6gsYvCgsvFe+ut37IZDdRUsAAIVGU4iYqNNT7sYDbeyohUGu+MajtG8QGIMiJEIKyMfNhcUGr2qgYcE1RqA75bV6/SYVNXU/KOEP28PZMerXECKp4XqlYB9oZNzJCgLsyd4CPQFGQshJVjE182i85QpAtvrsYEldqA79aVz363RJQu4whhSy97nlUkrOx5nuFa+dme1X1UADzT0Q08/NxlGCFs6WjksfQzyquyinAs0KADeC79eMEVW0uPHeFuof6IpzWr/USY95CvblqoN2nbznjgwecmLx1hM9iTx8zplOfGdo4FGnQAz6VfGJKbHdLdfgZEhv3M0rU2LCwnSbkS0GEod6dOm7rJB+AKCTDEWrKDZTusTJcKAF+1MUU1bcR36cpHZPPYwwMiYUugmok2C+RLrM7PX3gRYGcrgzeTPI0GML7EhHFjjIc3xuThMx+lXglTB+O59fND4fNw9anAJMKW/7kskXUkFgh4Hk585qEwddHM6EIefJ6KRiJs+aLg6Z3FAx553V1jGIs06DBYcKCGvO9cu835yN0L4WLxRIk5Awjw7pOfbQQLoCOtmgmyMOB7Sx6NvedF3SpLY9PNkjx81t6gE4YO4Ln1k0HPwpLOf0q3EWYgb6ZjHp5IqZmw7c/IuEFIrugIyRUvoRZJN8QgLUG8BUjKLu590dhFYubFe+t9eXpYkONy9WCXNkusXnT1MdpiuSlRK6e7EOfFS2jcZWm06q7gbYg08EiOdPl8ZtCpF3lvvcOHuPFSM4/RMQ15IAPB3x3ZyUg1B6QrParTa9IEcngFeaEjx5jt0nnNeOmyvdyRj0069SLvrfd7sMzZlcs4tWWhpRFhY+FPcD2XJUjbHBqUE05B4+IllKM8ETEJBgyG6NO4xcy2sH1xbNKlF3jf9A4D+ILFmvt6x0z8/orgUyurda6GvQjLz+JloFYa6eamdl5Cw8/iwsAPJ96KTJ+uxLalb3Ns0qlXU+7PumQzU3awplxVqiw3MjCqTSxPSHRlGiULie2uTMtemc0kPgIeTC+EaSU+Ey6pHkmvMQutfyP4bl09Q3zg0WYIlhBW/HBhp1WtLuKzep2BqpdNfMQxMK1ZVnBzPgFeM5GIYmUPyVesIiKlFi+YyDGBoDbge9M1nqTGaa36k9Qwe5pcmAGKmSjtNiZBepJyCfpEHM2QTsVl60kqeDZOnoF4rbKcy/bCcz426dSLvLfecXKsNNV1PzoykI+u3IbEwwFX7NyCdHpkAORA4aUcvIJGzG3EwN4l3io379yCdIZsM+jUy21l9ZLtJb4QbTbku1heHQhTCROGWMNiNEH6LXsEvSJcDbyCiof5CGOlipw3YQpMiq4pEe9ei9OlF3jf9I5VBDkLMjMSsXHlBtMUEqYihD/KxlgUIGnhoYkOk8NHICY1IibMLca3BiwxJnVdM5qNKSq0Id+la4SmY41jJoYQLOOWVHOxIwBybUHaHZcc9KY8epaAKy5aC3ThgzOCtyAsI8td7MXPOLZhpJaxvintM1Wx8y5jaAhPuqsqCqHKH4XPNvWYSwrwxunWeLbOzwwoIdzsMAyeGv4tfOb8VJto0MF4bv2uAkdIsbpeggr7LF8CBuDzJZhFkF5RPuh8CXLwEoJs9+Eyn3A4b5p6Cbj/ul6ClpwuTZdegnrJpvc0WbTCbPKeJjsv4pplS79ALdg2+Jnr1rHXJJawXc6Dz1MnSMLDatMZz7QqRltnWQZqYSzSoAN4Lv1c42Fv3nKNh30vwy5irodikXCp8DM1qU20Rdl56HOUdwCc6OyolvjQJA+f5e9NokGHRKfKCHnMn12MgJxKoF2sBICQesyIKPJWloAvLtvJqQvhkOAjUOWHF8IqRovPCppIapIfXmOCSm0yq8etS6r8MQOx8m6IIyYrG//EXbZyb/kByQ9tAZlFR4Z28RKKpB9iTuT9dN467yNBjbwfji069BLvrbefmjdClurUsXlj4RubhfGsOu9kZTwCur7TqRsBeeAjYFJ5eDZEt2Km5MNxlVKrjEwaE1RqA75b19gWocqL0uCBsBkXU8mC98oiKT0tSbv/Z31pK+gTEafkNehyfBMxEQtpnPBKU/Dl+Ma4okJH8l0Kx4GnIoFGhcmEqbgUSYVYmRQykyDd8lSCjlAf8RLKUZiMmKRSEgkzYA3ZgHTgMXfcVimRGrxveut+WDbdyHEOTbRmZxbCspScgh3rqZLSYqNmzkVRbX0RH4DsuzQiEMsKvo5QVkgF4Bus5VRoQ75L1/f41aH6oEJYWVTFr266WWoXQL/VmEJ4fOpSdb7pcrUj4AtB1w5O+61egbHMt4ywWXhjdvDd6kaQOgoTeaYJEEWJJkkRh7YTrAS+NIt5oYpsFemXVxyZ9aq9QMTka218k691Zv3pK8EEJZHGlDbku3WlSazQWsyodMLW12BWWpyrrZOp8zPdVs+cQJrV5CcPPlf5XQmb+4I8Vr+b8rI8rhwLNOgAnks/j+xkxW/l/xKB/N96pfyiXMOV/4t6DqJO7GMKN7nJpXLZQ1WUNcjGHN8WucC0+Xk+MDQhz60mH3bLml5WcfsV8GaTg2Em3o0Cnp2f5fYtkwgr2ikuAVHWmwhkxoJvISrLhC4v6Y0BSYMiM3K9JdELRMtx+boQW6Ur8qa707bv8ovKCreqU1GsbasG9ZbUL703mf5Q8sEJSqkA8FUbU9RGlzkt+zmk8pTCYJCkQ8pCkwfEuS/7zQVXtiQCbr8vTrWqr+JrilgJ+yFCxlhQDTFjLaSWMEwmRZ0kKWNst6JRso6VTj3ooXoeBIJNlSLB4KQkCAe/ibqqpHvVV+NdSlPzoAcvEVuaeE9wgIsGgO/ayKJSqeThVJdgeVIr7uoMTyoXOK6xnC2ZkzmzIK2hXJgzNmH54iV0+V2J8ey9BFNrDdm33xVjR2ZgvXhvvVVds6kKl1qaCFORF8IAnoa8kAnLZfOuJm3pwGt0BDmKl1BxM5IwCTkpxnvc+C4aAL7bWQPMqFSKjLfSUZ810TOm9DBimnLgMi7VxgGgVUHaVc8e9IksXfISqlGli5iipH3WesiX7OzpGho733sr8d56x5vSUNizRXXHhh3QQnnHDtPVQiXGNQXpTck76AvpBeQllDxejpi8Ya8H77P1SCEbkN6V3oPO1Z68t97vFi68TreFC6+UrEwJMQG0QgG6LVyiV61sFmVDKEWUTWXJLwbZbByhXTKAy7xFKnQi35vK+hkWF24lDfTOA9Ngs8oWRG7VEXD1zvUA5HaE7fQCiw55CUG2ogkMw/KF4K0wXVE2ID26Z2zRqSl5b72vWvwWg5yuWvxmjmuY6hpmdGalJQJaGnJxareJlHwAos41EMdOPcR3jtEuFYD2BG051bQR36Wr77KRgRpJYqz2b9iKmd2WPmTlxR4B8wmD/JKYBIw7PSwhzXuJrZngyYzv6kGdLIyTpEZncEkJgTqlZWvB0aNQX7ZSHYwtRFjPhuUA8T47oslREp81tnbwGTCj7AgRSw6oZdUmskudV9kRG5NUqrfkmMohVclUGw63pLd4yKxLUxjtug0hL7UK0gM9utNPcdXgFWSy9c5PuLcY/kVD/bhkxwyhsUmnXuB90zsqBjU9068L4ZuR8/j7XoS7mHimc3Eq9hHkG9oZ6auDLweLgebCx1hSrzcFY5Ka+TLS2NBCqvIzsLd2e91ElPpg4N22ci0IHsZnngNROBYW4O48i+EY2+11iGZnwmtntwcGI3snCAYkLzbBms5z6Rd7jI0oRkYMOcYSqi21mBXVpm0EahOkPcYYQd9IcCfvVjK80qqEQW0f8XZMyJTdPW9PY5NOvch76x3Z/0zWTopbBCYniWYFk4bHbyVBelhpnW74yeXiBXTlPArDEnngVTG9oefOg5tZAZn0Jss1DT7tku0xRnBWDZ32iWnwuVcVxkpArilITzidZazjVy7eqQL4V8mLAi9G7cGbxbSmID+t9KAXVfNijb92ydaxrmHNztH3p2GrYCm0bMqA8I40vJFWdPJh0jUbApWLd2s/4Pm3m9uFucS6WbTQJAPQjIFj10zSSXy3ylFU/ZmoxvAAGSKWAvafB2DAcPYIbo2AbsccTrV9jfgAjDiDA9GxdwdfU1ZyawSuBV9UaEO+S9crkGTLo/u6Me5RTjDILYTk1C1IbsCZnV7Zqgi8grwWj2MQsC5ehKhLdg4vEccmnXqR99Y7TGEJr1kLW1jCaYBlcDNeSjW/KoJ0EtM8NbUWi1fQuI1ni/NQD16PgG1FkJ6/nJwuvbq3w7pk0ye4LbeJe1fCFj95Gmag0pzl99TCzzbHW2g7aeUsqODh5679KuFmJVMyA8uKy6vaqXIsg6mD8dz6xYYDZZBrFPtAnPRgdLa9CJwWdyOgzQbKL0/GfDsfgSuiDIiOkm7ga9haQWqEk3FMUqEN+G5d4z224pFXdBgxHh3GTnWMDjs3v17RYejCIPpSmctZArqiw4hhhBd5PTrMZL9Fh/UUdOrldSbaJfs7X5zC/b0qTBCD+vtloebHxAltw+7iNc/Oa7qL02vxlrgjoCtdrUitwyRe1O6X7MhY09ikT7cZlR/0DgdDskpmc7qD4SBYVxh1x1j82DIHhidh25ayOhUl0cin+mjK7yeiyqdw+AqieSC1yLWlMUmFNlXehhRSmWuDYkYs9bFZgt6qdWz4KBKmjsTK9VHoI+HoKXpVpjkNNlmCtfwi15zZUskKI20XvL3IB4bdqs9exXXr6kHBA1thtkYUYhyJM0Gvec6ysyiFjy6biQRdUpnmCT7P+aTLRoh29qviq2agL+r0yB6JGtMQ0sb43nT1CLaNBF6VriIC+UURemM5JHUI+MIZlZ5mXMgZfEOVqTSXEmEd3sh3thsuFcAXtv6pOdWjeTAJ70uqnp3MiPtXwMjXtn5BcyMoxcIzp4/CJkWiWv8isAkYkagJRFe8ClKuWkhtsjpxSKR0QxXjutUMJy07VMheIcxQqFjBjrMhlHNkQfL27Rr0qfSKlgLqb9sE/LQ5gheub8l+i6gqO+hFl2WOH/QO33+3GqY5UjHRHrV5cb/nonR4YpHS4GUxBru4sqdfDT4A5W42Va0cKsOIkUkxXSoAWQyeMUWFNkmblB5SmareUP6mVeWqs/H17Mx7tp0MaiR0AdwjsJDMsmNpcT4BXiKWCFjEyceMb0hNXiWWYwJBbcD3pivV38gKnSoUIMRmTj7rkFekwRcB1IkpytWsAy34mmr0qMhxU1ciBkQhe6m7VAD2Ve9giQK/w/nedI3UY4t1Y5dWwpPlDRDPhmymVfiZM0puolkl7KVk1SJ5tBAUlA5t4qnMqlqFn3kp4JtEjlNznku/q1beOlPHyn5YRgaMlbq2ry68Jtl0AqCTMpJqCroFzOAzAFJ1TJ5WMKZt8R1XrUsFoJcIAVAtu3rku3SNmWfg9VoRfz2gQaaRCfZbBhimKgizw0CZn6TwxHbxTr26K+KvG65K286bO+JgIRuQ70Zy0KkXeW+95VMYii5k6zfHVNQbmupAZlWRtlrVqsz+qaeWnN6yjoBlBpTVBs4xyRQB76lj7KIByFuBUMbeQykwvil9FROwOAdvRTAUM0EzRKWvBTPFqIJ0dNrd6SdKMHgBQbTOcKmyTAk5N+4LBO8RbQjQVGvIulGC71I46udNlhmIluMsttdZnBUre6cjcQiSXmyq0jlRB6+gaDYiDH055PWaSayl7P1GODZrI1Ev8L7pHbmYWLdX5GJ2bC3zcuvtMeQw5ngKeltBSW/a0bLVVpVo7aurFdJmagLqdTYXDOCyOJNKHadKbvaQ+p0zNnRI7ONFROEmrMPchI3u2gJoL+Wa31DWJPi2fhm3m0DAo+mFcoZkbo9Q39oJja6iN5spDO0SSGcIqv2kLGcI28RUezppQ0NONE1sqguzZYFryLgpzkgIYuURKXYBkZWd7boPScVnrjWoKjSydAPPpWcUkUG0dlIgBhBTbxDanLBcGGLAPWTCVkdSM4qeMxIQwNAGQYimomDoQTtCalUleY1Zlcy0g+/SNU74E5Gq0clxmqNo431Co2kmSaMFtfwbyXomiwoTelPDsi6pehu7La3MzW5o0hZSPV9PY5JauSQzgGiGVKmfF/fxrwvB/ZQ1QF0J213sTpJH4KdBFxQ32jv4JhfUEvmlB8GXxvhmR80Xkzq9LhTHFBXa+MuWQ6rbVyymuUfvyWbrOueubuXlNnZbaxBw28pyqrm8xAdgeL9kIrqs8EhFzSHVALeqNKdWhmPTHNFCKjei3F1yXyFEYXkxhgkUy0Uy21/1OluoppjVs2UFH4HkFaKq97Lf4kvoxULD9vLJAGMCQW2S2rmkS6qsKNl2wQq1IAKmpmJT+R7IDyusJXy1QkNB4c2MyuADEKZnIirWgsrCwTmkFjfIc0xSoU3V+pNDKmf7ZEXz+egTruYHs1Dc2Vj8oS1+5v74dHhqLFOxnAeffedKGMUCjWfYphLyhm9bMRZp0AE8l37+vBTkEdGaKARKL6MZfEJNZvSJT1Gwueq8C09mCj4CUbOZCBRgrurgmEJqlG1OSq1LybWpTHwul1Sdu8w4xF4/gG2Rt46PLHnNGtFNgI5dw6nhMGkEIFSnLnO8oIR0tSewSSQ+68hVCFOxyTSlEfJYwK97rbHXhUAlsql8KUTdbi9n5gum1zQ7+lfndMhPsY4Z6tZUEF0xXHTyhicc2OuadWd8Uzh2y9N3e68bMxRotnxHZ0fn9b53TCpHa1FBWR4jxrl1l619KY8FjDfrjPG8ZHu/Oh+7KC9uBu+b3hFKhCoyIyKJrou/sXVO9gidvopV0BePbgymTtw8OiuBMFkTMWz1BCMLqEHuVV4Nw5JKhcB3qxuRNxvb6C2fUlJfUG4cU5cR71yKOgVpkRk76F39SjUZuGy5Hicupe3AwZt8N0sRVznS1INOvch76/1eTyZb45e7nsyJuYh6MnneNV/yW6qJ3bZIRbl4u7oC9IiCpH21RD2ZXBVhOZogPYe1BD0ppbLMH/T2CWozt9Hn1830RmQlQthEccgmgDPUGE5tWJwL44SmS+UUNXGqw7I28LJulwqAnrdUhKA24HvTNY6TrF3q3iZihjxGGwkqbHpTliBdrpGCTmPmUJ7dcNk6TtIYmlbwVqTqUXYNb5O/YimFXk2eqnXJ1m8ZOMXKTiEMC6IuvAJd2/2UBfmtr0EvMvSUGVBxO4UwGQYT8qKeqmSn6Be29Pr1HnqB901vD9XZeNL4U4SwSIjd8VhZwsaZMpoAzfLDqd7xoUwHun5EdHwY1fkqz2F8WLufLPko9+7agO/WNcp1bIYcKz2KGItyU/535gl8Yra6juC8XKRvFLsmL6EovCBMUaF69mkel+y31Cv2eR4j9CLvrbd7PxrDPIfcH4xUQwhyZ6AZg4ybIE2NFiXgzrLirA6tqHBafRpszqtux961hCYNDs2Wxt7yBM60dgn2+Ar4/Zf8l13+6AyjoTmkEWpTFjKspkfVlC33eWFpjuAV1DyCQRiE4ogXwTeS7VUOfGzSuwIUe/9Bb08dHGayV79fwGrcOzPnwGX5Szu6/eKNyMoedZ7NikRq9gt40nJQLV2kSN6KZr82FmnQATyXflEdH7U+y/bi+A1FPlmqwMIaBiJJUNvVI3o7i78O3KYSfIPVQOVvI8IyGMVX1GEXbZrkb+OYRaUJW/Bdul4VaxSt+7oQBWtE5aqkcjWKbNSRH7F9KlYTfACiKQoRSZVqRmHcB6UC0JuCFU1laoLv0lUG7C5DYpIB26tFsmnURCC91dRY2M24nc46TbgZ75ikW/AKclMdMcw+ACsMcpQc1joOLKoKXxrfrbIeIpSSz1ECCYiqKkalM6LYmm3MK9z4VA3B+dCoKC7PDqgAsh+zq0rPWzMsFJdnC1MUl99xzN4stGWFj1TpnjWTckjV8lytzpaHDAKBqkLJ5qzJsKTN2vxXf6y0RM02L06vCJglVetytm71tYvvOSgXlwpAizLi4Mp0bcB36xqxv7SOqZKyMF3xfxU+OH5tNEHagLPVFk1w6eIlVD06RZiC2MOmVlntkp09RlpjZ8Utlov31jsyXrgcueW9KmohI9pgUvvxQccXIXcSr6AvxVGwSWVz2XLHNQZItuDN3vJqCMK3OTbpVYlAvf2gtycT0mlTh7IJq3vaN2L54FbfWz2Lvc9jVgbNZFKQczqUo88jMUmWhqRjICRvr7KLYUmbqkvFDvKXUO2VujX+Ttu3St1ySum+Q+lDevb2JKB90jNLi7qZi2p8ALqnkRBRbatEvqI15Ugt94rDxNPt2pDv0jWCHTHdSf1EX3qCd4Dm3QxPKb3wOUpu00lPelVb1ZYFQbQOfsXsJ9zuZTgQXDAA2flR8mls1xF8t8LRBoCnvRQtLmm1qNi56BDAnckWpGd256AjJFS8XZVJtXYRk7yGxIY1ZYRsQLpAnJ5Gcr2SV5jIl2w51RZPrvotW8XPuVXlhnfAHMqC2SOsrDyNsJjZuHjdiFDC0MoLvJbzpqlCTYyu8SYYbgxYyfUi75ve4Xmug9nmrwsx5XeGHa9ibZ2DgJbhtERtmYHW9DlnSZXLGSVL6HGGDbOH1Hp7nFFlhB7n6ny3rvFYDbwCZfpjNXgw5FXnSYWHjixID0qtQceLLd6h10urmTBTifos/7pCNiA/iu+gZ/fI9B/09mkWtuvWNMuOzOaIGwcuHlBSutoquomyBh1llbem3CaxmmObd3MEo5xdiUFvybNNhnoublVZzuVN0zgvcBH1nrsMlylououdabUuuakI0JmhOXUrPKcMB5rCGYWodDDWpnVreWH7Hs13k1OpDfhuXSPyiz0xVbk+341CrWcWH5O3OHBP7rg7kFpOysXLDuY7KtdPmSh4OqRN9YoxB6QZedWgU1Py3nq7YXxZQJlSkAyemYWmtgWN1ca2Rfgso3ifRFjVFHERgEg9bqMrbBt8Y7KzXun8TEPJrqJBMWO6lbzsGTYPzBbmDHvbraTzoKMgI5IYHoQcgcZjORVvDPk2Z5ero95UZJT4LMxcUrNfEI5JKrQh36WrX3UU8k3eT6hYElfd3JFsM52z+ILX5WABBprVsd+hxT3raB3thFJltR2WWLC6Gyyv4EU5MBxppgZ5LhVZkWNgn9i9Mv3QprNbbegG58NA/eolwN4v+iSnGhw7n4Du9emJqGpwzCjxkFq8RP3UPnZl18b43nS9ag3iVKzKZFMJnkl74j1U53MuAvJJ5iRqKfSQluRAjbwXIBCnQz6E6VBqjjagizEAbbk24Lt1DfXhIJzR4WCqphtrzx4/KcxduRCQ+lgkjeqNg4YDKZ54Q3DqBB+nTkgFIPVXEhXakO/WNV5Y7A16bKrRkH2zoB8mh439LxeuHdvqPIK+Wc5kZweWuxeIcLsZ6jFllwtA+2r0XcrbFSLfpW4Y7BB5UcNehygR7tnR4pO7eRSGm2Gsa0PUmhglMrYD1f1CRMCDQz7s0ig1uVOIYyZZl2bwXbpq64ZyWNmbozoG1WFrVX+KgRySPATJNMLHdCB/pV+8hLxFqmNQWVa8SIySbO+S6mOTXhRUv9MPenMmsqqoJyQPv4Sw2c5RKR/NkpcVWsVnTi2I5VpWBruJh5+n/MqE0SMsM24subwu+yXHMpg6GM+tX+TNToQz6PUVBu9hY8lqvKKNJa3jDW4seU06DTzkJRQvMTEZbyN5M15Uys7xHnNs0aGXeG+944Bf6KB+BWz+n20NhuMMXq4zuC1JzZ3ghXtDNhnPEukn+yJPLPmsiQ2FeosbDth4mqhiupV0t8HCMSp5d5uFMy2amC0EDtPHzx5HHgNQEBDfVLN/OKtDJWIAqk4VrJfdEXM6QjYgLupslooQgeWcbyqH43xYfl0NxzkaGzCvGvFz5juR0f2a27GlnvCaN+cj0GM3UxkMnorzFZStg9Ti27usjglMAx/Od+saUeTVqvrL8EvEUIULGPobfFGogCyr7ykOMJ1qxZrEB6C7yZcIy9YSX0ENYUgtbvLlmKRCG/JdusZZHj8vdz/K4yeyWAoCFlnRJRUCuqTnKpLaeMHbdKB5YDMRBT04wWf5FZKaPayZY4JKbcB36xoHFyb71e4HF8bDsRAjW35PXIyRBLmhpAR9yg9svFPJgO6+nXIVMN590zdxya7hvuXYpBcl/KX6g95h/q1WBM5jTjN7lCiv3HaMfF1nJYD3E0XelmK6c/ABiJhTIjx2NFnRtxFSr5hTjFn1mtfgu3QN9cdiqOjrQgwlQaJQZEUAaloEpH5LTlX5ybIcaDHnAlEVZ4QKFD2klnvOxVmnD9fGDdsjpHrkfmKz4deFWN6oxJxBnaaxRECWwF1ERW3f5Q2Ck6S6m8E6tazpfM2LgCcC8lWV5VRo01XmoIRUHmWwA2MFF8Lm2ZyTR05Ev+7GzzzGMBzSEliqePi5eTm/zGK9iLxlOKPLKyrcwrEKA2S7eG79omjRsB3IVvpN57tekCwyUWMwY74rBDQb1iZqSZxbSnXApGo6adbvw+6N8al5s0m9WzvbmKKaNuK7dNXmmVXUrWzZ68Yg5KKwrjqKoBUU7QAEvVgPnnTWgycvoeQ/mJgTr7Kd9xhBQjYgzbZMKjR6VV4aywisS/b3b7/89ff88Xc/fzsLdPs4x9PycYjr4/tf/FuetVhJwn8pMVj/TyWv4XuD0455CfIzSQr6QGQCeQmt+KVDUXx7O2/q3up5CdIGYI2gZ0UP7v2D3leUHlJY2BHQMVsF+elEmHiYtHepPl6uQa++8+kBrbt5AOuuswZQZux+yAakh5r10ncNvcD7prdXmmbfF/YZE6KzeOZEFAzavdnu24v4ronNN6gLu23wLbWYad5DqPvOXXy2TZfUoigZjQlqVZMa5OrNS6qKTm2rAr6iFcpuV0UovJysFYXX1r2D5qUTtbGdVfgVZ3RUI6Jd3r1Z4fiD1OioxjFBpTZN/X13SJX1YiF9zussEgMfXl4q9cS24qwL7Cf1jJ4OVdXwRvAKSr4WEJO3Ku2xl0QN2YC0r+QjZHUWp/pBtPmD3hG9wL7rqnEvDDY8pyYljuusyH3mREA47S68fqRvTVLGu/UiKy1ZGGSMixebJcmubqjS2KR3WTaM99Y7rAJ0dei+CIO44Odkzq2exRV1+PtjgT5Olh30iYtG3qkyl7ovwsCAKV5YMCU7Yoo1NulFW1TjvfWOUotWY6x7RrYwwzZ61QvXnBWrehsULWiVFc1IX2oxb7yEuudlC1NtwyFerE+SHetX9VYpM4de5L319sPqxObMq0NM2AMHy/jupm68SInY4a/pyalWT3h7a4oumTqloo1H8WpK2+LxJTVaGmBIBOsvWjFLeVMzNoawSntN3sH+3hmrbkaENZK2UMe6RCrY7KLmxH6kuTvgGehCZGw3wZeUYIYOdr7Zx5hJm/0UfJeuV1QeghR3cyvfhmuggHB8XxVVvgqaRwCSoW8sp5+ou+AVNP1mCYMqX+QtXZ2e6hCkPZCFu5NOvch76x1ZeQvrv1KehUHrn7PwI2yZCzHPfp7wtXX+K1jWR/AKipwvYZjYuHW+a5fs6inPGpt06tW0pK9LtmKV+PxoVyXMUgJggY2FuYF0os3QjkcI9kfdwStoxoaZGI8UMF7GBVB2812Vxva4gRy8b3pHKjpnyR2p6A0rVMEi2LECVezi1hSkPV/eQYfBWryERuz5iOlYKsiLyhOSHYUpNDbp1Iu8t97cVWWM6p4sIWzOPiXjsVi1qVzM4s4sNnEgFb0eyEfAvVnqBGHvuZo/mMuKUrP7szgmqdCGfLeu8Vix1Xiv/lh1hO/zFMCqErtqX0NIDwqrbPL0UoNXkPc+cwyaGIm342WkbG9/5mOTTr2G9ya6ZCuJ4+zHrKrF60KwS4R5oib6EmVzTM5oS5TNOSmqJZ9O7y6xJFU7xGX1utIQ35geLlwI6Ork5FTTRnyXrleNNk8GeN2YgX4BqEt8XEusBbIFaTA7fUxtGlbwCrpSC4rsvakGb8GTRdmRWqCxi6aNFLxvesdOhD0G3ddCDObuCndzxtxd4azMUf2xTkVzD9QSmxfv0k1yX8vSTTV/ydT9XpfsHL4Wjk161a0z3lvvKz0X59ER6cUNI7CdsPl2qqrvrCTIl98S9AVvK3mXamaOay5NH54HNdXfqYTse4XC2Cny9i/eW+/YufNAoLhpYRAAXWmcRWx0RZp9idDpijx70hvy7MkrKKKnhUna53PWTiE7RwA1xxbdLcpp/aB3hIBPHmdU+5aYrKWXpcS5UOvgFDVtOcVzWe8XL6FoIEdMXoqZZeGiFbIBaWe5ZtDZ3cgdP/OSzXAIhF3wbEu4s+0DfLaoKA9nrqdnJNk+YbLs4hIQMa9EIGyVfBbRSqEe78oBM8MBpphuJa/Ee4RDbX8zMmqFZHs4URaCexqkFyvMMllMi6gW+CI+AMODLIloygBcFgIyQmqNIMvGVPKxXRvyXbrGXpe+H9mghemIcxhwFLG081JojczQJ4B1Of3Zy7bgFXS1fCCmqLSg8WaVHUxDkPY4dGH1EXqR99abv6VPRbkrYFQY1KTvqB1crQR57pZ+R8jGG1lh+od+SvgFr6Dl76oww94d8h61QjYg+zbHFp16gfdN7zD1Wj2zHD30uqqjJYaAXUl7jO1sbl84zq/i9JLUwDOlgHKUPSMmoc4deE+x4pANSEZfhrKwGVu7eG+9w2F2di+1eqKNMKi/xnpKtSOIAr2Aa4/I54J6+F2pOPviJVQj3YYYVKYRb1JKjclOkXHDsUGXXuB901urx1RoXVPTE2KmLcC0zSSrRmOzfxWE9SDj5EB6Ua7h4RUUGXfCdHj8s04d6ZIdGXcaG3TpBd43vSP/iWmiubmVeiBpRK8p3oCOcDZ7eHacRTvyqUlnBT7yej2+HLFxDW/IKsHblOGXkiC33q2gUy8vSDEu2TKNnhXllP+OgvyGmdoCnNXohEFgq3NWK0Da/J7VTHRrIei8hEa8XcQ0BakYb0X4N2VXf7s0dlXxxxm8b3rHb2GeuB9ItvIl6Yho2N5u7FsZeO8HkordKOno2y1eQikOJMCcHVN23lMDO2QD0m9p3enUi7xver+5rLZlr10uKzZrhvtoo+c0nEu73mXg4EFb7rIiHwGvfSREwg/fjAtO4QiL0kd0k20lGo/gu3R1h0HjeXXJYdDgqVrmeOyIW3t2OMfPWAXQYZC7U3kyb4yWKy6VDgMemJ9diPgsSUpSvey1xgSV2oDv1jUiLWgtKlGwL+Fl7fDH0/5poSpDtk/txPOUtWrgUq6Ll5AHbTqmYi6dqpq5Ltkl7m6XfXTl0Kv6keySrdlqql3460IgfwRiNk7dxWq+AtBMhUAvo5r+4hvRhNydaagbU50PrcYptXmACcckNTMOLNd3XWOrnjzm4XVjPCbC3jjGSzS84jNyKxE3GBEW6+IderdH5HcapqryCKeIcskudyuxfEVYUK+qKIR0yVYIybFh9BnZLMTAHp5RdbrD/sfcMUB6Bc8KJTrqW4uXUDQ6EwYWQfHCli7Z0etMYzfVPqgX7613WEw2IqKzW0y2BQjSmpOY8clYrylIk+fYQbfrLFYA0eiaCHb1aUyUKC53R6NrDCsqFCLfpW5Y2xk7pl4uxGRsyVDlw+oENj8Z58hTxOlYdNQYFi8hyJaJZeC0MovznrTgkA3Ijy0z6ENttmf5Qe+oTU7pDOt0zFIZAZZIMcMF5u20w7CR5ZpmEGkLXkEe4ukYeGXFi5oKku2Bnj426NKLHt1b74ju2ebnWNGXZuern9+2bMQCo3fNBPS2IxCQAT0z+ABEjwUimmpCMlkgpEaDBY5Z1eV2B9+l6xWlh7III9YOxoDz+ZZjG/P7bIK0GjC43OhbUem7OgTZfl5hdYTtvKeuQcgGpFeJIeYM0awX7613nEAqkhqaH0AqMhtQB6KhMHHzqbvEvtWqiYuKNYB8BkAqvtrYU4dhuslCF6tLXTN8RDbm8t441fluXeNJ6jQmd3+UOuZoM4uyPmxDao9H18kselIgZtCHeiyPGVCJyqfDs7Sr86rMKmQD0jM1atCpF3lvvSMIgCYCD5+cfmKAD6PTAQtL2BqCFARgZeCmAixL8ArqEURJTNU2KiPaYl6yS5iPOXaRv7sF75vesTss7Oz0CtiaO63GwmXdktlW4WftDJtoi3XS2tLnrLhmwKeZaiMPmqhBHj5rT6gGa9CBPJd+15yEWqmRLm8TNMvGVi13FnPdtNx5unzXcsd0+XnxDq53V7Y81rtexLmxC4RgANqAYL1jpvwOvkvh6zc09il4BcJbJLCHNc47qSk5bcXLMEbQx1t7BYN2tIsmYikMaVhAZnLBAPw3FKdmlnzJ9V1hvQWDlripVP/BLSvNOajin5HV0+vd3fQ8t11UTKjkIzA8lZ6Irto4q3svA0htbsjjmKRCm67yNTmkwgqCk16dyu93zFJPeSvagXzSltWzUHo1nDJFxwlUvE39EKWaMEg5FS+qL0h2RLtqbNClF3jf9A4PORuAeAFqYtgHC7GCxZ24FoM0owA1GpeJjqZm4iV0TcXEVMUpLFjk6yX7bSouPejUq6rXab5k67FCNTs/bQOBUip5cv+xsCCjRt6KI3TvopbMaoSzOnDVKgeiee/LrvKSlBqeH45Zvamm8926hsuMrY52dBRmEoEZlNmsfiuUSeulDGDcKJA+kf66FCa1XLYcbEyftT42Q1W3+iW7Rf/hphZNRq9q0TTaD3pzbZhMf1FF2KliIdgysI5IsaCUOgSY8yGr1EVBaybnA7Cj4mhhpnfb5IL7ACK3V8nHeICp2GJxox3y9ARNW5VqTEwT7QtoC0aJT5qJBwHf0yxRYbUnH4EVbgMgpmo7tqX255AKQE/Qak6FNlPFBWdIdTMg8tzdHbMVfc88fQsNL/LusrZIi1oW9m4VtRDoF2/zgpTR+Lnbtn1OsaI8NiXvqBeFgUlNqkwy5w8q62eg8WMPd2tjxdmNNx/1xRPD7DMBzUfwMiXG2QbfZhlvd7QC0XBqW/QjlZBaw8uKMUltNHywMuwKqXz2bVbbyg4joiaaws4MWNHMN5kMAHr4s1OL0iPRk3y4VD79A0GVpYnvzMIuFQB3UnsKIfWM701Xql+YTqYgYcCI9a10Np4g4MZe7YoQHkxgWzZGcR58jvDgyTajuYkH4b+NvXkVG1zZuBdNNZrzXPpFBGdGo9AI4Mx2hxhpmK1k+8S6ifqmHo/ZOQ8bdfBQyAjGLamaX7dNSWdtIx+ycSk1knU5JqmFnV/SfNdV6nu7XEVKAIHCe9ViZE5nORzp+yKggVDX3aiNFd+NT71JVCiciGRWp+qtdl0qANkRTgoGqdCGfJeuUYsQr3zPXotwf7AKw0b3BBWUSbJveuBY0Rl2I3yhOKtDxUOzhGHBmSIDUb5kJ4WnamhDSCnjfFNZ2andKkNXt7wQAQsbHBSs7A2/CADsuZZlZJK6WZp6Ngeq21yIQGVv8qE4KqV6ZUCNSSq0Id+la9gkh2/DXjdmKd7Y7L2I3Msde5foWpK9QlPn2e/iJRSbPmFgnhcvzteSHZu+7HWaGJY0Lt5bb1nBhh+8FBw4VJ+7I8CvRc6p7FLV53XZrqrm0hy8grJP7cAwAxWsTDqFZABfNMbRjp6lE/neVI6ddYdb06sjE9PcToi058rUnCVIy1NNTkerJvEKKp4IL0xG2g95k6f9LEHaWY8RdOpF3lvvyIJhS0Z1DxVmILAF4ylcKClBXpV9Cs6oEU6UgldQj9qbxDS5gjZ3mZfsGnX4ODbo0otB07fenK8yJuXq9V6I6BZfAyl1MJutbgE2pXStDGhJPYNvKI5djQSJQO1k8mXmtNUtwL7KMUHNWjPgjNuX1KP+cC8VazAIYaWHBswGKD47ltpMsgbDTN5adlqpGucTMPX0CWF1acVnhWgltenR05igUhvje9M1jEZwwlxWI+RrwWzEls+0GyUBMhwVpy5lx9J05FJlO2LRlOZ8WdajJIDmI9qDaT8KvltXPjy2ZMwpXwNh24NvK5P2LJoN/U8yP/NpKFW0yVaFVYX4IM++N9k7EEX9i6XPDpfX5FngWKBBh85SKD3k+as7bTVZ16uLYADFUHdbmBipd8yiLUp4FTyDouNZJa+gKOElTId9krxNkXwmu0WbYI7dPPY7eN/05tVPCihnlIMQi0m9NDog3ZdV+pu3sWNYfFva7pGvqzUUncxCdDtekq8xGbhuAdyEs5n4WK4N+G5dr5K1jOXU8YyYDT9SU9VxRrbVIshn7RZ0+pG2yqRNly3nE/1Mtw+qw+sE2YC+eMRSf90depH31jtildUAMWKVM7Z6CqjAboDdEPsUJEca45GZ5rqDV1Bxq6UwCGASb1JPRO7zWliZ1IKxh15ZvRXzJZsnnmMiacNrsRFh2YILPTsaoioajHTeWvaE5Sen2s0WHwFvLStEZ7EK42uqtrYE8OxTh1OpjSc7X1I9sXDdoQFEsCTlosWDSXxlvYUGWDCRqIVGlOlRs3doABDu4h/Jnf+QGqEBHBNUatPl4F/rPTSgDJU4ydO3eywWy30nuz6ZeXDhOa6+l3mWM+bRdKyiKXgFZW97DMze+MGb12a6ZADa7tXi1MGCS4yhKJdY5tNrcdpKqM8o27dtRi6I234mhQlXPwBbbLf6NW2r97WdT8BQ5QAhzC0lvnYmY0ltSkzUmKAO9Xkq813Xqy4G9vql+gGCWTX0tVV4jehrG1OQfJJ7B31qM8bjRHLZOkAkzAfsj7FxLFyX7BaZbhy76chQLt5bb53ltsKUFEEmTLfb1xOiiGAX6hneseERZL1i40l6Q3gSeZtCmRRBJgyMQ+JF6rZkF48g09igSy/wvuntlYZgtZxeaYgtrZYsn4lFgVbmZ8yBWc233LoKLgEzKg4X1m+n++mYaLvtTkwoPn/5yZ60yWLxrb0pGUtdgcmpN1/qmBLMTMzKFxBP8JiCZHBjmbONJJ908RKakcZJzEAeZ1cCcb5kd3dpa2zSqddQDmi5ZCsUgAc+RZgIMxX0S4tacz89Ifer1qBvmeoYbDxctvZEg6fpErxV/WZKFqTXjqX0Rwu9yHvrrfuCdjHnuVQSPTFVSQMV8UMFz81ognTt9gg62tiIl1COjANiUNeTvG2rZOFogvTI1hJ06pWUrlAu2bovGWGzqsAiTFdBjowwcxan7UmQm9ZL0Bd6uHWV+tgu29c0pC8rrwOxuPOSnaN1FMcmvanwAXMN8yWb6R8dhsel9I+eWUptW97JtmoFe9GHlRXTkujH0s0Tl4DmCW5EVL+6qJzpQos3h8aAoEGRylSQHhJV02TijDYUsFRVunbjlMi6HwlXOidBblEpQV/qzrVbQJETJkxHssFUsdtyyY6cMI1NelVv6pp+0Du8DgX3cnR3OxSEcm5YSVhoK8FzPrYgeR7oA0ywwKSLd3seX+xRlTNXg7ehMAtlN98ta2zSqRd5b73jvrCE1Jx+XxgWkzA3siAVXb1szpxj6zNm0L0YVtoBldgoEZNtvy1edPWS7Oj6pbFJryrv3PoPel+ho4jD94gHYKpHPJw1rnrEwznO17eIh5WCPiwWsnrEw3LZOmMtZKMw5oH1ElLILm9RD3kEnZqS99Y7Tk116JT8ujHNz6uI/GXHuTkE6RyUVtCr7DJ1B3RZxojJumGMkhiX7OSVvTU26NILvG96X2UOcAxVNVBhls6nPAiqwv0WpPFWdnpOKryu0vkuW/ZNNl3l27VwYN6XbDdJ+dhNZ9908d56x2+ZCOLxTMKh3tDMBuQOnTkMeQiSdszCZAn8HryCopSuMM3bLKIywLpkRzVdjU069fLOHfOS/Z3nIZTzces5EN2Tf4aa9VQru7VGmM6rxVKRasW3xNfoeXK7ORBIIiYfcogpNbvdnGOCSm2KHI8zpOp1z6jQVv1tz8iSgNGfxT4w87HQRxS1W8Wp1pRVfIPNgXoUtUNLHqXVWh5EDqkpstCrSoFU14Z8l64Rp5+w/VvqiANMTQr4TziYMiWtZUG+atWgo3+weLv8Et68oGsjynS4iZNMC9mAdIJPO+jUlLy33m6rZcdvevaEsGohq6kB0bYzAtMt6dhbqEJFKvLDyUcgy6snRDrbIfCd6C4JxWdaauFxydlVAdOtaMS8JvimajRyTziaDkyDLLrEcI1WBelazR50j4I03iq/lwd0EIP9rnix35XsyAPV2FUhHyl43/R2DyvXouj2xuIl6PbGkAV2e2Pn6hG76tWDXvRu9BVQj/09MVWldRbWtXXJLle3N74F6PaWnfNNZb0ZSR0cNt/s4qH3BcZixo5UnHhSFqQ3o9agd7U6LN2hqyyFMEunqcoKEiH7KktRPKy/19B0KT9zXLL1lne8NDvScToeDSbEs5Ff5a5mCZJ2NQUdFQrEO5QXrCBjYRLKh4A3byXq7yXI7XQj6NSLvLfe57f8u4//av9++evv5dT0++XP//7Xv/r4i+/fTvuW9HH/PcX90nmw/8e3v/6bj/Txm2/54y+ff7/7hl4v/+Zbs238c2JbSN8vKIrwPMh/+O1HjPX8+8BX82jYu+G71mT5+epfffzeFOozVPo69Qb3s8zff3/++v0/p/mPX/tjNf8X1PnVt1/9dOnzT6+MqfGvH/6Pn/7jR7Ym0sn/ADaP7HMDhu0Uf3p9/Nl/yL/4+Ol33/7VT/8/7sG/8Eve70FeliHxL9yvcxOub7/9+3+iaUFJEQz/+iDYzE78D4+qpVkTG6cDvOjLnPVOBxj0ms2RJDrBm26lOgcyVD5qsckK4EU/cUkXHeBF58bMv0D4/gbO/fENwPc3Wn7/BuD7GyO9fwPwP8Qt/SNupwp3/pPb1sqp4zmfae5/f9s+PkppitmjucIxth8qhQ402zeVMhGfU2W0KMVrEhudna7J632vp76NltRmFSLr6aDkkgHgqzawqKaT+G6VMYkfHJugVP8VDCLtkGWr2rMinJFgcOWCYXokp8KpSL7NGLlcXX8UJH52auKzusmSWlUsVGOS2lhy2PguXan+Rr7ic795lnRMPufBspHB2K1kVdmoNt29w2nZyJ4UHZmV4iWUdJYUptlRX7zNjvqSDQjfxtiiQy/x3nrzt5zQukLH6+tC2A0u1UpDbPM5l7rplaFhrrREv82hnoB45yPgwX5CmLtZfObSlVQP9tOYpEIb8N26Sv2i4ypDPh1jfcRKrbICPRu+Uju2q1sbwiNSW4xD95w/4/Xcuq5ve+7d89o6r3WUcNldjgAfm/SiY7Tx3nrztzSrm7i9yqoQZmIsJyjNrv4zB5Vm+Vvbq6yWZmU+RLUcLvEB8CqrQpiHU3xmZZRUr7KqMUmFNuS7dJX6C1Z9y6R+3RjLpj7jFvi+nutUZF0e8poXWJidXlSS7PAKqvKaO6Yc36PzWt9Al+19BX1s0KUXeN/01m9BsXLfMBNhYWbdrkvDJv7ZWZzLtpIgDZeL0zuKnJAX0Pb9shC25SXntt0wBW/fLHNcUTsnQuO7FNZvQOFjJIq+boyZb88rubDXfg7dpSEVG9AXnz468Y3edbwxXkIm+4sXqOMIP1fwmrHXZXuvex+bdOpF3ltv/pZjzLWi3jRECmFJOAVlq5YFFpRTD6YQwNSez2wjqtXLIh8BD18gYlr5FfJN69JLqQDsqxiTVGhDvltXrXeo5ZOWGqA7xioRFVb+yValqNSsFOcWM0lqQW94usjbVKYs6dtNTubZnBc5ZJINCN9OCgM7dOkF3je9NeMiDDBNFTtyzDpfthGw637EFmaoAJJ2tQUd+S7iJeTVBxxjZYOd11Y9l+3VB3xs0pNqGI71g978LR09nNNWcKUwyJoovXnUy5lkuorGM+bqOZZ4iZNDXwp+MV5AkI1vE7OOn1q8cKBKNiB8u+mFM3r1iJr+g97X6lHODMAKjETYxithKmf03cJMXwT5AtKCvvGYkBd9b7bv9pq666QhTvQloOBoWsBxRYWO5LsU5m8YFSaYpQK+why7zfO7z9kKSWLledFGh9M+K7ihjIE+JaSj9JB4AUE2vj1lWnp2ueLNVnJZsgHh2xhb9CqTlvHeeuudRzvHoRpHQkzsitUX8iymxRZTAJiH0FOSVPWiNL7JPi5ZX52MjlrF+SpeXkj1foIak1R1mzS+S1epn86OaE1lfgthpU0PQ2ps1nfk1kHgK3bzonYmSxlfZxpV1VeBsBKr4rMSq5LaZIvRmKRCG/JdusYstayaMzM7hJjYfWUmr9qkgzbCS5kdZ5bp06md7bSMD0BXZocQnG/AV080kKRWZXZoTFITU2I5T62QiolpyK1VOckKY/fQJg+umMkmltYFYfKg6wf0kWTBP7yCitrBOybZSwres5Vw0QB8yqtOpVJkvJXWfWBR/qJCRo6xMpZ2ATGH2457KCiFLphzGCgj6BvzP3m3uqo2fXsr6dp23OS1MpYuOynY1McmvWnTmMcPemuGLfq1jKxxjO0+fZtjO1PfAnmvqrNFmjPoQ82vjXfoFmgOAGbbxpWs23aqlAwAX63M4TZqYd8547tVjoWCHrW2faVYWJIXtpK7yO13JvTSBGml6CPoWxVYVg5o3TvvgTiiPJ0XjkDJTl5tUmOLTr3Ie+sdr/mxwSbrV/K6Mda27ByzEgxDdpqt6tJJv8a5zTMFvavHp/ES8u4oxJwVa4t1W8cSSt7eGoUDi2o6ie9WWZOt/cJVZdMWwmIGj+WioNsYjBx9EtD+bW1RUUCQfAS8y5UQVjhDfFYpQ1KzTNkak1RoA75bV81WCbEDdjp+3RgrdnbOalzEz13tDALzdNaz1Rkz6F1VMoy3qybG0Le7Fuo6nTd3nBqr4ilKnBPp4+Gpc1+8t97aggz1L9NLTkwxV+rZNLB9zXmJx1ZZb73kM3n8/UOfbBIEXkLZKxk6xpJlxIu6U5KdvZKhxhZ9aENzeN/05m+ZjNawzpavG9NMwqxuqj6jM37D+2iW2d2geeiM3yAvIe+j6Zhs50XxWn08l52Ujudjk069yHvrrVfEvEroZ/W6EOZWORufZiXfB/ZIJ3iy+BGn2MGM1GqFN8lHILkdBQi0yiLfnHbzIBWANmnPmKJ2tnwzvkvXOAEip5YBc0JYBcczareo7b7tLV2LgE5/yOPtmHZK8AEobpEjwizU5FtW6JFSAeiXIk/+UKkN+G5d9Vaw9pQnDznGsoDO08euRR3vCFsWyXA2lqr5Gn2rFKfxEvIUIsdYLpDzWpqQy/YsIh+b9K6ukcZ76x22hOdENZfSJ4g43Z6PLcFOWAu2GvThAfDFTfDcohY79pEPwFy32eEgYKsB37Tge0qdHt/PMUWFeuC7ddWSN1V+tXCCEqbbxa225jDr5OyIWNp1aLOASY/0VlRs6fAKaiq84xjLQ3HebBdXsrMq7/jYpFMv8L7prYXDq6bJetu9XMLZ7/Wi3OFjne0s1+k5+2cpYLVQo3vZurUcSp627xjLvxdvstR8yU6eua+xRc/eS6T9oHdsqxg5tuMA3pDwUmlAYzQ/rLlrCtK2Ku+gI+lLvIRSHKu3qmON4bzHVBeyAblxrgcdeon31vuyJZgDZ122BNzYgp+ymQXOI38W5LaEGnQvhFGSIIh2W4K5kvoQ57bAGAoG4LvD7VToSL5LYf4GGHqGHVRegZjWO6gkK1w0cXlhi5pxIDomnCLqse44H4AR5yEicGXBd9IyXSoA+yrGFBXqge/WVbeAD0iKe0BMwXWc2LtUXeMyBcmq3LfTnwd2BK+g5DeBGDzQ4k0LF5qP2or7MNWKol2PG3jf9Nbip35NDFUWYmO1tMtspSyLjBSEZE1gREyCiSMFq3wiQ98drIV1bhwYt6UXUC4AmRNqcioUIt+lrh4mC9xa3qhMCOs1dm5fW+zxee7yutuInociF1GzvQXkI+AtyoSwpjTis6Y0kur9yTQmqdAGfLeummfdG67dkzDWhesYAAbqBJwZYWQ1fdMGalR1AzI6ol7FS6j4HkqYhC0y+4JubJ+zkpW0jeLYpEsv8L7pHXa1au1zx3S72kFYp7qCGlXL2uwU1D1Y3smnoDqWqFb5QHwAvJOPEBOHLuObA8cxkwpAdrVWnQptyHfpqt2HquWx+6sQzQwqeavm0LLnkBWJlj+yrFe0bNTufASqz/hE2IUTX4bTH1KzxwRwTFCpDfhuXbX72OpKxaJljrF83OPYSYyP7rZ7UHx0d1PFzEFHw1zxEkpuSCQmWXaWeI+vIGQDklMpTadTL/K+6a23Yun4p3shjCWcnCeTjZ/O9T6NFrogPLlFT67Rq8IWjddbF+qOCGMmWue1ZBWX3f2maGzQpRd43/TWW7FYtIsdyoSoOLNbfVwkVJsjRKV2bsskqRahRz4CJcwaQFiGNfmeE8R2qQB06HrGJJXagO/WNaIQLGYm+UlVGCt/WipztqrN1izYB0ibWsvfBr1lVDMEr6DkJ1VizoqVnDdZFVTJBiSnfx1BZ69r8L7prVN3RzqsVYx/3RjLyj3n5FPso9r+s0ykqVRvvVUmihmTvpCsQV5BxQNXhLEdqfMmczxLdnLHtMYmvStx13hvvcPkeabTEXtaIBa2pXYKXfBDNssRXZeTaNhJilTb/YsPwOUkAgIuSPI17VUR8exbWYxJKrQh36Vr2NWaBYzksKs12wU02NU63OuwgK1CQG9FbqI+F6U4HwEv9iqERSKLr8D5AaklXCMYk1RoA75bV119ZiTY1Py6MdYv0yIHmJGNPV4fgnSEWSvoVS2QjLd6XUB9u6oo3xArWmxSMgAPWVAzTupEvjeVteSZL+3Z6ia+D0RYCYqSLbdtWofMc959rsX0/plnccpd1GKpc+QjsNDW/sMRVpWafMOqUlMqAEi1MUWFNuS7dNVdsGSSU9NKN4GZKclm+sYJI8MHkuRm3bG1pqt180QbvIAg2g+dSWE84GQYDwRH/iHHVZDPZDEBBgeNkKpdB3Lh9/ZdB8qkVFwspL+fvWSxZEUA2nU8l0lUW4PJR2Aqm16IIR/hwzetfSOlAtCNPQn5oFIb8N26hp2AZfRn2AkW+qUkXNWNdGA7qzf1B8phJ7B8INLR/Ui8Q91TZtgJmEvUWvBaaUuXnZSA4GOTTr3Ie+sdjtVkP1zmGyJgGitW2OD58QMnI1gYR3hwYYMc8O+u4APQ3XBDRDXbC/lgE6PU4lYbjkkqtCHfpWuchM55NyvJRoh6DivnVPL84OcAUHAAfv4DoJNQL6Jmq2NBPgJZ6TVCWIIW+ToiRiC1R0AJxhQV2oDv1lUvgtVDH14bX4gJnayxxrDCrSVbUfXhtfFtbuhOtXYd4gPgtfGFsJqt4qv4LZDqtfE1JqnQhnyXrnGSbnYm7NlP0s18+raE2NS+GrZc1Yp1t9iQWda9qHbuFR8Ar/YnhJXsE59lzkiql/rTmKRCG/JdumprNJCQFY4iYeDsOeWTthVHO46g59x0rGwtHEXPvHNCw0h/Bl3BKygcRcLA2UNehGlKdg1HEccWnXqR99Zbt2Kw3JRigInomCetNFdsNNBGUJFANbGXYIObrjgfgeZHViKwYSBfxvy62CvwOrL24lRow43GpatWNeSjpNBfGCjSkMuSoGNDrkuKn9CQCyM68mTESyh+hTBQR7zQVLLjh2hs0rMypoz31jt2qWpKsH2bqmqL2UYYCOahV5mHKfc6D/Utple6XrzTmxbo29MbF8zgzfbYSHb2x0pjk168McH8Qe8w79PEnsO8vxFIYMF/yFI7e7pmZ5faBelsM2bQkQ9HXkE5IgcMs22XStZt7hZKBvDFc36qokIn8r2prHnWLsRu6nUqhNVKO9NjsirfJ4wj2/UEIHfImE5VW3bjA9B87iei2kpOPsv6kdTikYRZ/daNCm3Id+kq9eExrL7KEWGtowp69z0njQJrYa8ENCOu7lRrCig+AN7SVQgzz4jP2qxKqvdz1ZigZjk0bc24dNU8uzFzelM6x1ip0zMzHt8Gms4VpgdHU7qyEMkiekONHPIS8qZ0jrHGcs5rTedctjel87FBl17gfdNbvyXbsbQV1WZ3jG3FjrP4HGmb1cY5buU9BcmJfY7EoqNcqHgJFfcoCWOxv85rrlKXndyjpLFJp17kvfV+t8OmrtbMjhn2utIWejJGi9tKAd12WNFZuYC8hMJ9L0yVRYpumnXJDve9xga9e4aVnVNuvflbFuJYEHL1ujAnu+M8Bwi9OYkfzZ4KFknVfLIQeiM6gm3EC6h6sTfHWFM98SKkS7Kr13vT2KJTU/LeescCoq6DyReQjNThw9OqaiWfRKnGqOB2B7+rxyFCbffFO7xbor5NTIJlhJG/G6YRRv1u90VxbNGpF3lvvWPmfe7jc0jOMfM+iIlAi2zBMxNxFvQuZ/dQPTNo3U6Fm5p8BkCqZt6DsAai5BvW4JBSAWjfPLtToR75Ll0vixNcviwH7ZiCdQnF5nLFktVQj7CGbc87mxl9qpC18U5vQaZve3Mz3jhe6hSyo2aOxhadepH31jtiifpQnePXjbEvn1gGdnE4eSgDLaqr19c78UDWQQL057bU4BXk9fWEKVYoT7yopCzZxUvsaWzRoRd53/SO+JvnlZrFgwaJqEiSs9DhaVfMLFmDgIxez90W1QxF4gPgfRCEyIipAB92+5QahwGOSSq0Id+lq94KKzoxze/2uhBTZqdnTjh1/GANqYmAlt5RRC32rpGPwIjTEBANQTXgqzJIHanVre4ck1RoA75b10hzO5F7FqX3CsRGDCaMw9ui+06Q4qnVkFWRxdLUtlOtxKT4DIBUmboPwmL/yLcQfAmpAPDVxi5jebp65Lt01YuAbfFJr+F+RBjMmGMgQJDekOlV4uQNWV5JDgFD8+IlVNw6KYx1UXdezJiSndxMrbFJp17kvfWOSK5kGXNsQSlEU2B3tsOcBXajj3uP/BQTJKp1cxcfgOq7SCIy4p7BlxD2DKnJd5EcE1RqA75b18skbo/HmmESt6j1DNdMt61wQRzY8yUAbhLfolar10c+ApEZQ0SC9dz41sZh2KSuSIvBmKJCm6S40xZS5edK1lJihZ8roUYb/FzZTjAFHqm2CUh9tGo1qiVgko9AV90cIZpNteSzoi6SWtXiRmOCSm3Ad+t6PTxW4Ub+FCIQaVITs5ItryszX1kParXkNFEruxnU5EBEBwGxEOADvoVIE0hdERqEMUmFNuS7dY2Hhx1Fsj88bDdS4ddDjxLM7CMR0EC7iFrtGEY+As0vKRHWb0t81s1RUr3Zo8YkVQ1OuF6UkPpdZ/HMRimvC7FgQ28selPghEI1HE+wnda4kVSzHokPwIgEWyA6TuDgaziAQ2qLBFuMSWplm5ze3nXVImCr29p+KGUDhWyHy/PG2YG34Inok4Cm67Wd2m3xIF/ndO3TSedk3pb41lQyX58E/C3vToV65Lt0DYMZdFrNDWbd5peM8Fqk1pz4umJtc3ZYs6s11iH1kV2dj0BYs4nImo6LFWptITWpPKjGJBXagO/W9YrvKz+mTbCEItMmeoq0iIEeX29pE7l9XGkT5eIltP5JwrKnTWRPlJDs97QJFmykgatdvLfe78ldLdYwIDp+PBKthq1STMMavoYxSYvUzsr+xtcZyeKWkM5gkrWcL2OVgtSw93NMUqEN+S5dIzubGdtsU+UYqz9m+3heIFjwmGmuSaMtZZonXPx98W5lmo/st4KZ5mUHb0ZO+1TSkBYZjU16VLrdP+itl7oiWTe5SUAYa0phEd1ILh94WXsRpN3dakGfyJ8h71QGaIlYBiRg7iTWPWHEM8kANGOU5FTTSXy3ypFJq3Ks8tARMxGN2xAWuBSpm7cgeNGmF39FhEu/eJeXkdW3icF8IN4m717egvDt5sVfR+hF3ltvubjQg8kKV70uhOX6lWS9vKd1KCznVg4CcEZZqydRrWW4+AA0j8UgwiJqxGcRNZKavUQAxyQV2pDv0lWbbXSmPB0RlcECTIGZahRUUoeZaqDwPyBsiDuKv5M+UPydvIAgW9vnjqq8x2FI3jwQfc+mAsMnZ44telZr+V1+0Psq74Hsy+znntVV/aWa+XRb2Warv9EJ6M3o06mY6sk3ldOZ/bXA4rO286H6C6W22MZUBktxG7OC79L1yhg0H30NWwaq2Qws8QicmLA2tEXAbUrJqYPhGKM5MD1hlQjLtBbf/6LtS3ptXXKs5vkr7hAGqKJvplWCkpBAgpeCAWJ0aSTEQYIa8Pc54bWW7X2KpkDF4N1M28cO772/JsLN8kDB/iACzo0QRl0uhTfUS77GoXlZPlGPJjKwQwEk3zEgX0EwrKjEBQwDpA27TuiRGFGJC0ZDJSP0qj12aLX6Q4lrUgpvoJd9/cBTYVLqK3NQ6wF0E5vWwbTPEKXXxFohvxjYS11S08skxBmoZTwO+pdsN6+U0NqUD72CWAd5k23voxUa9FdiADKjWxkF0Fgah+UF4Mvrg+0uvQFOLSIAX8hg0R30bOa4rNZAmcCalMIb6iVfI9t40I+s/idxDPT7XXxsSpn4OtoW5RucG/KFUDV1SY3AJVoeyt6hW/Ez0naNn7kpfbVv+EXd7HdsnvA2UCyGjIXwVrVHtVXeNQACgvCEz3EpwlTUm3xXKBZDxkCrUWewqIbV7rEYrklp4RuhzU9fo4SgWgGd4xJUQn4OlApX6ya1OxW1ditwCVCNR+kk/uhYTozAJQAD2QTqIdRPq5EJ4JqUwhvqJV9TIx3GLVQ/QQ+7MEf303lDdxzO7VHW0DuH2ap3LvQG61NTY3Az+FTrnTO9N2XBrYLQ2QQjbXeVN9TLvsYLbVgzwAm4KsxNrzjVAwC34Z4CNK73Ji7GeRqgqlrogYjeRDLwQ0GPPxSsgtCXMotL4Q31kq9E37yWhZw+FEMMzLe4luRemHzxpqRWEr/tT+3NKall16UHIuZikIG5GNCblr+j1enpPa4pKbyhXvI1vdDs5aKdERkN9Tb7BW+PDXSwV08j4S+0IWnUtqxU9dKioGoYHBBrqLrBCB23un1WPdeU1LyhXvY1CtY3ppSop0kcdLHM68Mxiu2nbF7QDpyHJpj4joTgDF1RwzubxGGbB3VRPSrbzVNHWpvVpfSLlafZ78/a1rq8QkAcG56l2tZqfS+qba2Ov6zaVskJ6EvdrpnNClSIM1UuqOLBZHt4qYDWhlx+QffD76he1+w6NUUsH2CHoPtAdYzFxw/gwnwi16u10IggVLi00BUVeFbiVKCAFR3GRrIdkFZam/IlGDPbB2e/dXpo6Jit7x3zlTlNbQ4coVEQIB9NlE4Pe4R8qZP3nqBqNBaRY/eIdCuCbLRdIwbHtSWnX9TNfsf90oDDreODOOiunaiWb4BQW0VTTXWCWHbgcnkXavfsQS0/RIiDNJd0keeS7e7nCK0NufyC7offusaAelCmY2aKs/TLHsdZftdBnb8SzvLb2Y3t8gGkAeqKih4EceCddBvCtbQdPQham3L61XWA2sk2rjGrWLGRr8qLkgMMzG1Pbst0Iu9pMPiBn7lxipTc3g+uSyrwM8nBqAzpYlSGbLfAz+TalNMv6n74HaXJvB/U7SGOoeG8Z03F5IqXaJgd42q2f9Nz4A6gfGLUDXWnRuHomxYH2QbpEmaQtgOGUGtTTr+om/3WZ2ma+9n4HBNnA2WRgxCOBTS+feFkNU5WeaEXjldbADhbSZfU8qeeOIi7SdeGBrjt7k89rU05/aJu9jveLxaAtdF5X5nDp75V4Kc3wovagdJ6L7In+bCuVOmSal7UJE5FETh1C3pvabvk3txbXC6/oPvhd5R0VMvRKNxJhqE9vvKKZhm/gkTyPCQ8zVxcemwQOfVAxOOODCuJoN6xRxCtnnjWYU1J4Q31kq8RkLoYWaU2FnEWNhNEKNzeT7pE6ZViHRaU++CNWYJKuWJyOvpNqWsJVLedcsVdQwv3Cb+696om20Iu7ihHVOQcjI3m5EmMZMNTNkA5EMpVle1Sa1CRHojpJTNkDMApQ6+jOXmx4rFHkH10l8KbIRjmHlb/YCigAK1JdwU531dfAaRWxdVXgMRpc9Oa3xXDQDZcbvkR6ZKCbZ2sidhkV3bVXJcWtkHpDcWxjU8uT6H74bfuCuuV+T5Lb23mwbCcd6tWUH8sNf4uylNI/Oa+vzaXWqZQeiC2n07JWCiDMr3v83R3qyDwp7ampPCGesnX6KStdv5UOowMC9DZtg6pdnQwItaTUDlOd6lN+pBeZ5hGBwwyrIOCesfGDdHq8UnJXJNSegO97GsE/NWDGdCZbKuZgM7c2DW/9+hc6MGc/p6dG5CnlFvW0HVJda88EMemJ7gu4GpkuwQsJ9emvKud584ffsd+pKH4UIFCcaod6nfBUNhmp/qH2XREaYdhCN2UD0ybpS6p6Kci59VTb9ft1u4k2z1aqrg25fSLuh9+63eZmN6xNBvKOda8YN8WUi8bb+VRRemb3j3kONVJl9TSbCjnTOxXqGt1sm67e/RLa1NOv6b2OiXZVtRwLObcv4JhcHZ4/DD5tnDlMzGnw8WYms3HttKWdI3K+X0wNrD5TBPJdxrO+X1bV1L4SL3kcMpVYhTVTrlK9CoX5CorrvzKfGIR5bnKFvKLnQN1SVWPRYmDZj3qFnTr0TYofeZ6Qk6/qJv9VmLMiv9X9WMuGQg8Ftu5LAQeqzUDLJ+jZ0/A5VLbIFGPhI+NE6MAAcn05gU2klmdPjOOa1JKb6CXfdWtsTGwZTm6rDhE1bU3gB0vux3Z+hGl4+AuIbctg3RFrUCXJQdBaukOoMfS9vA+V60NufyC7offAXw4G5EsvhKjqYtoOR5IN/wlEB7bHC6dhMs2vcnki3cfGWMDyRV6QLOg1QSYgTUlNW+kl3wNDK7X59u9pp+Mid46tYO+Vz/aerdPfLLWiOlSNZm244SPexKjKWY3UfocVqunlLlmVSTwuF72NQqJGp4s3phNDsJfg/tMhL8G96DRmD0w0kHyo+nAswRVc6dvOd5gvTmRYbvl1JiNhSU1n6SXXY5MRrdg9YwykG5bAgbfu9XOWFquGUpT8ejgC/B0l06L01MPRADJk4FOZeidhU2wWT2BIo81JYU31Eu+BsIToFZ0O5Nhe+f3ABjWtvxu1mJXIgj83JWYbw3PmOp6JLbfyGQsFAeb3rY9N62C+M3n4eguhTfQy75GSq8hk6xyLjCWyrIAftVQqQFYLC/nQv8VpZfdVLU5MaKcCwz0l1KvoWALVluUc01m/0Zxb7rKwFpYVTUa02Y+eaOqUY2TN9iodpF2YKPajfwhG9Uu0os76S41qs3IfWwA2QqHGfPo3DQIZTRKdymdKg78nAwrUtCn0rxfmWO73ndaH2i5eJWukyM9i2cbZwfkDeUD0THqDsXhtFcUB32T1GXfJG2npDLXVl8l/WLPZfY7ugeJYOtRQnK6x4cBp6zY8RGl890sIW/otYSuqBZRQnIKithM91qbLU2DUBL6LEnlFBQ/nE7tqWxsLL73mwC5PjjJLHwxF0Akd4rS3q/tkGMUrnSXN01GR07H1VdP6FY0dnTvbiz+sYl7aHL6Rd3sd5z0NgbBqXJQnIovztBhDbISLaIM2p1oIWVg7yCBPZPu0JA5rxwEp16kD6BbDyoDYRuUznxnuZx+UffD74D6rUe301fm4M05axpf/kJfvGSURZvWUObyodbfuYIqfs4F55WdNalem8lKyyDwp5X7d5MWjexuP1xWU6GlQ945yhvRwRkIlDEuPBoa0REzBqUzXN0ht8SN64KCbfw1OQfN5NDtiJcplr2jEZ3xbsrpKXWz3wlRzPLEJSGKWR84W0VRKD6I/dVIaIOELvFBRDHXIxFo6WAcgwSj3rFqHFoFgTfmJQTeOvKGetlX3emWargrWu/AQLfeMIDke9Vjha5jvxOtmEPSyY7l0pyIJjQyprCKmpV49bA6ouMOa1IKb6iXfP2sBgl0GDAON0ZWmXGA/YK6jRPQMKjqkNTqPY5vqIqsag/1GAB48SqS6lZ3AMN4BQq3TS30kq+6n7FTbTYC9StzsL/+PpbbaOoNPBPEVkEpXFBOyJEclS4ps61TDgdlW5qWunwW0HZ6VnBtf1b0pJv9jgLzOnkxfyUGpgW0rS0MQqrocxFgh/e62PajsDv8FCfSkAEwMCeAehghQKvpnsGalMIb6iVfA2eI2GqaLrCJvsaWg2J9Jy+2OFBY0j3yOG1mEqVTdS8EETqyqgflsb36atLjoJGh2hXHErA1JTVvqJd9DfdfEqZur4sS5+C9dZB0vwj+YCYWKPk1W8gbUHegK2p7dZQ4CzO1qDvtvSXb0wuktDbk8gu6H37H+W6jC7c0P99t9t1iAgORiAf2E+zCTW2lY4b8oF+Yukcdvt5WejTpZxfXLaicpO0ShZVcW/KukV4ctLWT7T/0I2LUlgAzxRmoPbw+oh3f3aii9LtwHFfB73JCV1SPsC45BnzputU6xmS7elhXa0Muv6D74XfsCjnDo8aukOCwA98Gqyp1Ch+i9BJYAYE2Fio2/Vfcblu7wj3yUdv2F9stg9AWDbizu8gn6WWXdXBtL9awVkATgwEk/3ciuoZy9vCM7Ei2oh282KFNUis6kx6I5XtgMiYghqE3AD4MqyOgibEmpfCGesnXT9zM1v1BK46dD4Vd2Qy4SNiWLcCRiH0peVc35wnczBb4SOI0e25K1xAc3Xb1J67Whlx+QffD74RA3lDOo3A5Oaj6nU37Z6YSLBh7ItWAlg7J0fwhXVIBmiPORLyRukMTvpSejnuJweCywy/qZr+jlQRYI9rTkmHP6ndmLhoI/47TXQPhFVBY06UWx5ceiOm7WTJsJLz0bAy8rHbfynJNSuEN9ZKvCTLGkAF6gozZ7+pehIyZ77onxEDfJBS9W9elNsBIeiCiCI4MgOhSj+C7sBoVcFyTUnhDveSrkkiWMK89CtrEQVHaOkKheNf5S+sUUdr2vxICyRsQLqArKgraxEF5gnRRniDbUdCmtSGXX9D98DuSFpND5IcnLTjwkSDfizgk2BncLkrP9TZdPgtGwC+Bi3e3rc1LZ6SohS7g6GQ7+vu0NuX0i7rZb5Ws2hDj7x9xb5asgoFeuWJQ5wutcg+jsZLQY7F1l9qQZ+kNPkGVNyMDoRLqAeWJVpsnzbimMeQNBvplXz8etjdQVvgUK0BK4fOuoHiaz8MStdV8XkreFUUz3U7wJ+0iycAJCpoXECowfANhBetSSh+hlx2ORoyCQgqN7xRnWZZRfXHbanvekNMlStupfULu3Xt7BzU9JzQ8xlV76HbLMsp29zme0ZNXZvhF3ex3VFC8LcTDJ9RTlhw0ZHW0gbyHNroJmNYp0W3A1I/JrUlCuqJqYI2RU4QX1pGva2EblEK9e7hcfkH3w++ooEAmRQN7yUCHfDXkMiAKEyNrx1rVcM8k3cQ5Nz3FvRW/IsOaEKSHDnlaHR684pqUwhvqJV91a6DOu0yPfIhjzzLrC0RBycBegMPERuwV6nL5qhpGNkpQURAmTseYmSIg3pVsp4Kw7Y2aJ/yC7offATgGUE7HJwGjC/h22pdGBJKH7DkCn8QQgiQd7xeRHogW+CRgYEIp9NZF44JZBfGbcYy5JaU30Mu+pkY3YOEMDUwmpwK1r6MT0OpPrCvtitJdaAcqyhdQfahLKkCByWGMnbrlICcO2yVwgbm25PBLutnvqGxpeLkJpGF+QDDNIcygFxJ68LBVlDZ5Cd5p8hhDXVI74IHJWfZIpm7B3pu2QSkgyiHjRHRuSTf7HWniYlh0mjtMxhbERLVdoFo/JgmlUQAGo7aR0BtEuEsTh49BdnPg8LYBcSus9hg3XIlWx1lcJfSSrzHrYdojyNE+GmHxDO3D+qjfrAJc94DSU4lis+O9pIbCID0jYFVhmsc4QO0wvb2B52FWQeheW9WlcI96yde4kg6A+uW/OJgUPQcqkwtmnNvCpPwhskNuZbWuS2pHRTk5CzPQoVsnqn1hG5SH1nvIu/pyx/3hd0LoJ7B19DiwRrfhINCQS+rIM7G218cUXvSiQz6qEuBtB1V9UqE4BWMILicFTzcNQkcXpLnnDKeomJ2OF/jB6Xz6+/twMOgOPysGVPChX2OARQPKOuUd0y2hCwqm9ehZFicYXZp36Qtog0T6fiilj9DLDuusUTCOaXs7pThH1SacffHK6YT8d72d8nuHuXrIp+ZqmC6pGGAjzrQzrnSBVSXbMcNGa1NOv6ib/Y6OOIzfTR1xDZtUtsR1hpDwGFpTlI6Yd4d8a94p2+KKTOtSKZY2n0Oad+n5tiYJPf16dyl83GqLa2FVNzrnnpXpNzrRFjmkkkiMA+f+XUXpRmeufKCMriZdUtW3rOAwlQrV6yX5mKXlFfm2sKTmk/Syy/G2eFea4Sl/BeN9nR2TDXhrDAwK4a0xomeSt8ZAvGElXaNg2tP/domvK8270KrfeWt4I3/lrbGq+0i95HBKAmwOhv5KDA7k2fZSONgdHYOzOb6veMH8K+kL87seieWbCjKGmj6fHmetwGr3YQNck1J4Q73ka3LfIKBWgORUdPADJKfZ91QAZzMPCbl/i6ScOQs9EtHMSEazEdfUq4LeQQOBNzNuthe04d5QL/kaJTnl8CDwlRhXNXnVUlzvhyyXBdreflBYpL1QZ3Ncj0QgeZGBzmnobdsF0uoOJC+sKSm8gV72NcH+omSn+S6cxUDDa8aQVWY12XFkhdY4AJKA+zf0QCwfBU7GBEIw9AYQgmHVCO3CW5eU3kAv+xrwsougQ9pvXHWqVJQdbk7Jqd4xB0rn/xcwl5z9d9QlVfybXQ5/NK7rFsO+km1QOmzt4nL6Rd0Pv1Na2NJ1M6WFgWLAtLChY10mcDsJTwtPl057kFNvEo0rZQS6Jc6IAAYIrRpWW6QDsCal8IZ6yde0c7UzUks7VzuXTe5c7Tdf3GNeEtq59urSbZCs1AORNrlgAFMKeguQUrC60ia3E2v1VPeGesnXBIiL1/pIgLh4kW8kWiqSRoegtVWUn+d6yJc2AcQyuW5b57mLF2I5oQukbtkOIG+t3dR1UpNu9jtezpiOrtFSk3Pa0f0xgV5dMN9xMoJYHZ1k+px2kzMeSV2jYFov8muFetYEjQnu6ACBYRB+lKsuhY9bo3lqWFVytfsZ9itzrpJlY+oca1Ak++PEPGs651pfYOiKihOzOIA6oW7BtBzaLjFMh2tLTr8Ik5L9ji5D1pip3k4cTEWcHUVDW/V0t3xsR5lEkXxrDkGtQcV2VBxUO0sX5c6yHVMVtTbl9Iu62e+EVmx5P72uyQCMFYuv3umASeMmStd9HSHfHDt5lxMppL45gao3KRIOD3YTWB6WlbRx4lVvn+6mnk8E7+/2X+N0jyLOjpnjiCK+vswuSr/GnCHfOli0G1Tgn4izsCFd6jueYbsEBArXlrzpmbLmD78jbcGeonk9bTGQ6r9AirEuoi1QHib+HZSH3W+Qq4wAulFUMKM2syE913boAg9VtnvGpGFPU73hF3Wz3/EuZ/+F0mHiAOltoart295GuHIWUQr8nxZylN1Jt6tvxJEhWJbHUYbQLRxlyJrQE8gQrKg7Aoevofvhd1TYWq/7zFgPxlnCenhPibaF9bCuKF0H7Lw/iL+VpEtqBtYDORzvRN0urId1RXnyabtcfg1hPbRk23vF0AGpOIg4+C13wR7Kys0sMbdEKXHH1g6TD+UH2g6qeRxEHKtIc12g48p28UiI1oZcfkH3w+8o5jyAwtNnEWejYMMwo19yu+P42K4ofdOrhtySua5LavpnEcfiB67bzVfZ7v5ZtDbl9Iu62e/U98b0uQAIyUHp3sSU+IoD/dyePg9IQcvbUM4ubOpG57j+2ru09whdNJrJdjSiaW3K6Rd1s9+6Xxaesica38i5aBjBxO1WNPx7dVF6jt3p8vf+Dl1RxyMo4iCXR90KtDDargEmxrUlp1/UzX7/rd/l7M/fZeH9ze+GV81W8UXq/LTvlnJ+79T13+Xsz9+FVw11gRMh2y2XY/CJOnb4Rd3sdxzOt8UHfI41GBxGva0UsHpH9yWhE/eskvb6nvTUIxFDrMnYwoQGBldzqycNsbY1JYU32/vEw6pDfxsOVBOEPxgIrLyDP6p4CdI/SHjYfkn6ImCuRyIGaZGBJk/qNYf+HyTg/mHTmsYGuF72NdzfheXJX4lh8NacFRA1m7WQkPuctFnMwel6JGLQDhmo2YTeuWiON6sg5P4+ktIb1nomX2Nz0vdHjFAcHyQ1pscAx8Y2O2KEqpVjjLBgi84YIakUIzSOmjFMlVFAWE4xQiwsKaYHUC+7nNrWLT6k2jUyOHnXKoxVOm2junJhtUE1StoZk2rNiRpHeDC80ffaFz/dKojfDAy8gmsO5IU30Mu+KkA1CK2qYkgygMNYDIBoo+DqxYcWCYWS+nHptXEU1AMRE8zIsBla1HsvYLcKAn9qa0oKb6iXfI1ytYNEslADxOFoy4YQ7QK47VBKu0VJ9VwhXwjRxlhMt63n42IBZQtdjrYcHv7VXzcPD4/wi7rZ77iSFjFell9KC8hYjKoszJxrmF1WiihdIr2FfADLaiqSM9y2YkLEuiK6OoeyjmS7Bi570VBXzlxbofvhd0SrmJfoy8NVC2VMC1WgGwH+jXNhmaLkXd8hn3gUUJdU9Q5Ycfxc2Xc6ciLloTY7rCwpnaJidjqaSYp1MJYYFFus/XZwqi6ynxhvMjoJPA4tXy+pnc+oR2LG7JbGntpXwkO9hjcPrDZ/83BNSOkN9LKvqdXKMPxL6rS69okHO63wQBvshrqi/ORcQz4AHEpdo2Bav9m0CRJ7S/PayBQaBqHL6WxJ6SP0ssORoGSHYdEjlhybB/xU3skXkCLv961TlJ6yY4e843wOXVElR9PsDH5wrTWhhK2wDUpZSp66bYIJ/KLuh9+pXQyRKCHNi1P1XGjw/tl7EZYtSie/c0M+cCagLqniXbHklAPYcOgWnhphu6RTZVWR4inxCqVu9juKz7vFWXRYGprP3FCbhcnNHWnh3Ujoji3DpdapKz0QcUwiAycd6mFLSqtxRuKalMIb6iVfYyN+WDwWG/HD4yQ24pfHRWQd2xGlrfUqLl94QFKXVIm3mjgboCtX4F8nbIPSi4Z4UGeHp9TNfsdeCinYEeWpAP/eOJR0xGhZQcpn3om2FrtMinoFi6uSOPFSK8wY1yZFJthgN6XfsKykkxnj2j7djaD0BLCwun3EwetsMtG90dHDJPeOhh8MLpP8KOjaVlAjen6OXi+rhS5eZ7LdvO1Ha1NOv6ib/U4N1AgnCyecnHd14BtmN8zCLb+3KA/v3JAP3XpzOAXb8q7iu7jFdcvC1ELYBqXfj900p4Wn0P3wW+8/Q8db138WMDbKC+pg5ZsBPE0O1Xb4J8Pwk9TyitI7rLTTD0IGS9RNb6G6AFZB4E9tTUnhHvWSr/Hu6PaIECYWGRMo3TYj+1rw+L2TdiOhp0kZLu18LJXlRPeqYjIaGmegV9HdVNh7qi+Fa0JKb6CXfU1nJJyadxyRDM+ZY4UxqWqgiWtfEh68rZJOwGcxjF90Ft9+UQDoysoLL+Eqlls9gWqCNSU1b6SXfA2MTu5ffVzB1IOPeKt8KC40VpQiSt9Vby5/CGmhK2rGpJHie9wbug0t9bTdYm7BEhAeUTlX0s1+B7zDse9Xg9LJQPKZ4+cWoNqsKBHEb33q6lKMn5sOZCGr7hYAu5frVYecuCR0MMfUIs4XOqGXfI1SlmWNxn4jgNFwIxgaz8veol6xNBJYCN1dlE6LHFAPRImhyJPxAbugTe/7WuluFYRCELu41LyRXvI1Zb9tA+GJDDAu8hgVv1dBHqNpysuNnWkbITcMH6mCOBlZP21iBktvqtsF4Qnw4tLCeTGml9yNT8BpZds/wcb+hCj7mP+107NGvRTvrDZcisE01APRPf1ERlP1/jCA9BtWi+eeuCal8IZ6ydf0A3BKTItfgJNigPS1MLpk4RF4ryg/0NWQ27PCdUnFpF5xMG1Xuk1IF/eK8t9hh5x+UTf7HffCtp9KE1XJ4Cjvyjkjac7PzVOAxnDp5M+8hxPbE9pkALun6ycsYXVGMFQ/f2nuDfWSrwHbdRDf1r0sDm7KachNL4Pz7tdlBTOksBUFJIfkAO+grqjy0TCDaPlorltx19J2jZuaa1NOv6j74Xc8VZftERNmDpB9NOax6qzeBwv7EmBOny5dhvq5BZczZFVP1dF9XNokJmgNqzEciWv6MLXV05i1FVbVS8wyfS9DIKfjZHOVphkAHObU5BGFBZycPFCCuEJXVIsyhK7SeitDaOqbXmEblN7/bAqwAxD9gu6H3wlBzcZX9HhDINK+VorBb1R83kpCd0XrLrVmWumBCExQMgYudeg1xP0bJ2TceEO8NSmFN0O3yAyriIbbQfVMjyaTYfiJVtJn4fqB8ZvtkNBvvopLO8f4sC1zySr+FIyuQY0YuLPCavM4MteElN50DYY8YVWH6QctYGBIX4kxsblrLIzksXdcEnq2nupSG74kPRAjqrXB8LaTg8EjYbVGrTbWpBTeUC/5Ghk6tuV3+U/O1j6yoaR6ozrHLt1UGH5RVAT5w4MOXVFRGy7OFOrjIZRWst0jgMC1Kadf09Emk22ExG1y0o6KWTJQ+VoMxWUfAZ6VQgKHE5vWRGmtBLnt04momCUDla/UQ00srUbFLNekFN5AL/uamgsvC12/EgO7z2GQD2+qFQID45LQV3WqSw1rQnqHA2A9jnq4x2THKyfLhNXmT1+uSekgbscan77GGwFDVlTJTwaK8ZGMOqjT79YhfqKMv1vvoqSWBJTe4kAY7d3IQBk+9YaG2zyrUTHFNSmFN9RLvuoxNBl1cvibqcgTkpA4cF7mxBoJPTBw4LzAXKmuR2LkKbU4gbblegDcotUW8DdYk9LJM2Zbn74GDmUxHOirtjswGnABDar7WKV8w1sdBBayFzulzUaSUY+EWVVk/Bgc5rzSi2Hjo+Vh41hTUvOGetnX1HeAWEmPBqO+vehjDkReGt6gE5GX5j1+r3nghvwoNLt6UMU/MDmv7Oe67oulhG1QitOMGfKuQsB7f/j9Pstf/PUf9dd//Js/vdf1+PXyrO3XE55ff/zVP+cjcKEkyT9pUQkx9wO7xF4BOCCg5A1LY/hNjKQ7NSHVPyk5C94SR2Tqk5QmSoHkXUJOv5aKyFayLZC+ixbFHiB97NexN+sVoCCR9PoV5SmdGvKGDAd0RR0fAiEO0Byo+3wN26AUgiAg4e3hF5Egst8BpPZiuW34YDpxpsGf7Co0qVcusi2jRcrW2wZJ4PIJRCjqkopxyeJgKy9dbOVlu3mRjtamnH5RN/sdUF7FyuuVjySDSFrWPCgkLWtr3FFE0ywlJam1Q24HPD2yij8FY2jE2tPrGr72rMY4Pq5JKbyhXvI1KjkHugVTXa1xmtfV8hyEi/psUQrC1xtyO9m7LqmS62obpnWyrpYDXXvYBqWtvM5R1/2SbvZbVXZLF5HmFIizBWFhP+0BhMXBT3+8WXsXXBpH8BgldEVNb9YWxzDFXNcAc9129+iW1qZ86ULq64ffkbO/qCTy34Ucr3cuqIDi79KbKD2M1gi5lT26LqlU70xOV03TQgVUT7Y/6p1LCTn9om72O6FRFPt8NSYqcWLNwESli2+abYiv9hqUn65byK04Vbqipneri9PRSkhdvKxkO73MuLa/zG7ofvgdO69t24g5fOe1Le530PJ3bLNwMdHy1VtHQqXbuDxJLawjPRCRTSED7QPUK5qTiXl+HnhsnPhXh3tDveRrhPqn9acI/ZgMO6ZYkYINAW14zN9OQu+ENl3a2RPDhtYuqwr1dxsCyjGdDQPTw2o0GXDNoq7V6XrZV704MOGnbc+0iIPpXht3Ugdo2sasIFC4Z63RSvLDexa6orb/XuIANI26DfNoaRsUbPtdbHL6Rd3sd8DFVbxG1XclzhaOSMPmhzPB5xWlJAObdzlT/CZdUtHRJg5AMqJ3ZiTb3fuutDbl9Iu62e8I8XTkKLTREueo/2MAdWRjs7OPKIV4WA3OjVgNXVE7NlrkTMHJVXRY3GR7+EZLa0Muv6D74XdEDjl/Wtt7cWyyrSWi0VHf0ZPG2dbybrHOGPLl1dAG/09quXfiTKXEGQqbyXaAdmjtIYj/GroffuuNWAELHLkxcfDsXgb3aOBm256c84iCd8Mnh21r6b5Jl1RkyMipSHVRtyILRts1kmRcW3L4Jd3sd1TpTJ9F95U5Bwg/LEzCnKqB7xWUnknthnzoaHFmUDH5ThwMq5LuxN1F2x+T75bPq3O/oPvht06Q9f1W28A+vhKjAorMHpgb06Wq5c53DJ+qNu5PUsvDSw9EgIqAsTijyPTWBhSZWV2BKII1JTVvpJd8DfzXgXJuBbLEWQhGcaD7RqBqaRzMTr3oPeQXEV/qkormB3EsCO26DXUeSzHa1DBAmBiT0y/qZr/TRgvQS8rZiDNVycDCc9YZ9CHKN1or5MCDlO4SrFPqC2RxudUhTMErnWQ7Bpdr7ao6hZt0s9/x6Bo4r654dA3YvPjuJrZqBY+XM0TpYVQDWGo1DDSFrqhovSaHbVvU5euIttPrimtLDr+i5Wsk23p08fHiyHjVt2poRyp4dBkCpA0vI6WHEbeBhxPfku4SkrrK38RBITZ1MUhetmuUcHNtyelXEbrkTbZ1MCkEaYmDSQEG5cLBhINxFw4PHJqro8ZC+yTlrwE3dEXFoEByKnI+1K1I+tA2KB1MeC+e435JN/sdyBtjct/6lRjTZ1Fb+kezqCcJ7WrrdunmdlKzqGX1N4Mb6KrWLGok8cNqzaAb2DQGIJH0kq8f2EZ3Ra2narUMfqKyiXZc1z5e6AmMIknhBvX0SR0ZE4yBck3odbVBwKfcJNFdCm+ol3yNRrI30q7FDBxxMMxmY7AvsbR3BRZ2jMF5r43A2t5WWe26pGLahjjA0pYucPdlO6ZtaG3I5Rd0P/yOz2LWj5esimNVKc8eN+sD2JbvaQNK3r3ScsmHHVqlS+r4PSvOwj0E3TZxD8E2KH0Wbvbt/qRf0P3wW5/l6InioQdy0CK4LqY1DIUW6hGl38WmNVDuGzELPXTNbvDQQ9f8hr5ct178ir6RavH0OMvl8gu6H35HE+m763v3lh9xhkYe20Bb68x7zzsbLhBQr2+G1Q45YKGkSyrQXsWxPZXrFo1DNtvFe3+0NuTyC7offv9oG18eaRTHEB69ddtweby1O7B/1PpNOdvCqetN5N4OSM5Enz91MdRatlM7INemnH5RN/uta6wpmFV5+BUHaGsPTGPZHfCefQ9x6YjSO47HXZNvhK+ouxXs8gKIrYDXaaEL0DXZHlEAwbUpbzoKn/bDbx3kgXQ4lqMwirNxNwMKbNgEx4bh9qRwNAfEFuXHoGWkK2r53SWOTXh03Y4nAW33uLu4NuX0C7offiesdNaeRn1DQU7ksFYQ+ZSLNlQW2t+AWdg35A1h0Ooji922jsqH9afVdcsBvBtsg9Lht06X0y/qfvgdWQbEnUb1JAMiUxzivdAQh3PNHSSUYXhtXJAOK2ilHokAfSKjCO4UrVjFrZ4E+XRY9MZkwnS97Gs8hi/Ps/EYvrgwCaDMl+VJaYYAGVc6gPKOFx51SQXIuDgACpdu1SO+r18ZZFxrV0Wfb+h++K1bpOkVpLpQcVDbqUQG6j63pSlJKR61Rsgt4+m6pKIuVBzUdkoXdZ+yHXWhkUQxOf2ibvY7Ojq6oU6NaBnvR+0sEwMwj674fUgoCVeLSzFjk3oauDni7PcYUziJ1foGS1gd0epYGYst072Zuol6WP2Du7nJRvKYusaKuYsALev6CspVWdenvUc/quvjuOSedEmN3C7Duj6ONGZdX0u2Wwx1m6rrayX86qqxncm2fZYD2Ii5vblGHDugtQPICTRftANIClB4lgKygvILOAvqioqRc+LghpIubijZjqlzWpty+kXd7HcAqRCoTlFHMBji6XgaYsDSGHhSxpDzsRwjDwHUGqogYso5GZiuBMXL0JDZvTHlHMtKCoeol9yNLoiBijRN0iGnYn82C6IZ0R5ZRXkotIccqETSHap280k6Q2Cv2+GDDBolbIP6zXt0XJfLU+h++J3aCBBM9ZJRDwJvtEAyCMwKVAaBvULVg8CHYFGhOzwI7NNSyFnC3arYPZVkO9WOcm0Wj9IvVo9mv6NC5djh9ESFyvHZiW0Rwalhfg/6dFpUqMwtabfIoGYugoj3DRkD00Whh9mJtBovG65J6eTxcq5PX9OAChwJPBAETivaZAymvYnjWkT5g7SFHICo0l0awqObQ5yDYM4UHk4L26C0gSGeDjcwI+lmv+OnQL+8CnnBuAZk3lAD8Ap3AEMIoEFtYttl035lcaTrgYBV/RSPcawKF3oHfVKweqKNCmtKCveol3yNu8KC4s1jpeJ0FP0VgbmwhJBA76nCkDOAWYC4ky6pFi2D5FTBVm+C7IRtUApbEwz+zvALuh9+x5ZkYiqLCjDFwXBJFN9ZohYwNQYosgNqZqEggPKNOSzU3Zr4ojJMcbrVU0q32fcg282/J61NeVPZwuk//I5S2HU4WOsrMTjVzjr7blenSDkklHJlC+Wy6M5wPRI1jxUddkWcIT1OtYNVELpYv/+vZuWZN9TLvuqy6px3p5b+zpbcooptTptkMTenUaqlv29Nq2zssEq6hyXjan0kw44+1LyGRk/DIBT3Qvn3GO4j9ZLDgQ6NgawjwKEXeiw3wKE5z/VEfVOJid+qQ+Ipq+JtD11QN2Z+k8FzUOFbubhhEPpu9nQpfIRedjguIxQr7riM0NJbcBmN40NlC3smUhU9+iYqLqPmeiSWXxtkTHyvjYWOPayOmHSNNSGlN9DLvqYD07WJMYIgEOco1vy+9Y5G122Dlkl5PLGG3OomXJdUVM6Kg25X6QJtVrajeFZrQy6/oPvhd+BbL8YgBLJFDqaQLSuHsDjEjPzB9ueNcgiUW9GF65KK57I4mJkgXUwhk+14LmttyulX11z3lWw7JIF1wvg5HIyl6r5j/S48addBwjegy6VW+SU9EDPn+aeVqMRYkcupIrAauSGumeeVUC/7GqGqijSZh6mbRl41jO9qGNtnQUjzgpS+XIYsWR91ky6p5ReKOBOhZupicyTbwx/eWpty+kXd7Hf8FGxmip9iEN4dvwVndjRUShLAJB0HOPODp4WWdNE5F3CrZBwvtFjKMMDwjZkC3ko3qvvIzERyWE+pwTJv3eVkXIxinS9s+VoJsaFiX6GeJ1a0IqkNCZTeVbdiPHqKlXqXIb3vY9t1qyB+cxP3vaakg4Xnppd8DSDTQshLdTaSA9TwcWzL+f0dD8wmHEOUTjJ7uVywMtAVVTx3A85rWNtSJXI4LN8AuMLCkm7CNez9w+WEXWM3yooraaGWHRcS+ut4+8FWicuoL5eiT26pkmHIqi6iYTdnu67XdRoFMETqBkYPIwsVlutlX2P3NxhRXr77Gyi3OpFTedH4ZTu0h8AAynd/JeRbpVrnOAXb2v0xtv12KNR9z+awDSrngiSnp9TNfqfuRjtAjRhxsu0QtdknbLuYgxdznSS0x8EB/6B1a4be5IBYT02C0VW5N7Y3BXeOcvVpKFiz6XSyQy/5qvvZMkOv91SgbGAQId6ySM+nazcadgCq9QQEpqSbu4ddnehe6ElGs1cg9dAeTKvRPcw1KYU31Eu+hvsDA46buw8Ut4YHwLTeko4T1Rkk5NPDhqP0EDWOIPRNVn9zK/YYxSJV0HtdEW4VhNyfzaXwhnrJ11SKj5DbjCg5cScP6n8KqrQuOvL7FqW9KDEtL27KHbqimtd8iVPRQU3dgklERS0Rqn7V2pDLL+h++B34ePh1FLMhA4kclEITBr1dXkkn0AlxJR0Umx7XI9GjzbfySkrtuo55CKiHEr9aOS7dvJJq+fQ1AatW7dm+MufgVFkAxnod/LSK0v7VhulcnVhL0h0CkPUTKTlTp0rTxclctmOHqLUhl1/Q/fA7cCw0pkThzOmYKmjDIxzYYvZmilKuR3gtKIQcoSuqRhjGOPdizPIlGthxyyAUKAUa2KnySXrZ5ajR5ZR7YUOLgzfLxlQhwARaQm2LUvrt1UBKbpOdXZdU8/58cao1skjXppC57eLY0FqbcvpF3ex36igYlsrWoFdxFqrLt2VG+sagmmNZE1BKvb+8DuWvYyB0RU2vthQHRdXS7TiA0HaPakuuTTn9om72W59l44DVvXZanGn1OMuu+uddR8EGj2peO10tXE75BgwadUV1r50WB9jR0q1IPdN2jdQ0165KTffQ/fA7GogKAk0CihDHRrNqvWa1T7YB6KL8IDpDPtBzT11SO65IcqwaynUNNsxtj7giuTbl9Iu62e+UAhhWBqBIlDgTIwh5wOAgVG5Xo21/8oBB+dAIQtMlFZ374mAQqnQrcKx8Y6y9v9aGPDbWZ/zwO4AAv3/HvT2bQYZt5l/b4rRxkAO9SGeTwHPfrhhJbcYX9UjsmFkDBiZDUM/Ke2R1eBKDa0JKb6CXfVVuzMpEX3ZfsMPiHHuBHusEqQOwm8c6UEghf4WIleTHLhvpkgr8MnFsj+i6tkl028MfDlqbcvpF3ex3pFwLYIF8zmXx8SqoH2W2xS6U5mNZjl9WHAvKC+kkXVLbk9viTFxI1B2YY0nbI+ZcVpXsrxN+TQdTS7YV2WnIBbWYXNYQy15s6wGo+WLLzxGlyE4pIUc/oHRJnahIImehIgm6ZaIiCbZBKbLTV8iLUOru/uF3nGUXINXP9LPsQsCiYjQtK4gbMtNlidJ310/IG0a9QldUi+R503DY2UO3CA24LFE6zu7hcvkF3Q+/db9Y5ca77vRKEQctjcfKPN79YO02Nr6R1G/eXS/HILkNcXRdUjE9WJxprwXporNRtoe/UrQ25fSLutnvyCWj0dynDTeCyhBt6HgRwrAMVypRGIvhl4OvbYbeJryNf8VgsJFg8aRewmqUKHBNShv32rV/+hqXVeUEwu2XVQ6KHM1dnJg7Yc/1HlMzirB2Z3TxRcDkum1dhJiteKZUFfe4QvvZfk0hrs2vo7reh8uB8LH5slOkh5ytw9LhWAlgrdYm6jd3zGOEfGmWLwd5TLet323iyaOBGnyhJdsjkKy49tBBbCfd7HdcURptEONtFxpehcyJ1iGBdl5RflXVkG9UAlB3q8PCu/PImT60BH0PJ9keuUFv75A3H7tQf/gdZ5OBTY/XuJEzNX57YpvD8okzRels8jbXlL8hKKErakSNGzmMWlG3qbXtTFH+K/aQ06+utrmRbHsFu6Vvd6pgRwEaK9jRX8la80UC59hFpPDKCvbQA7EjZQMGU2Gm97B43CoIZXfmcCm8WUr1jLD6B19ml92w2seTgyLVKPO8w08JLVAkeZKQ/KLui7qkAkhSHAwLkC6KVGV7RtEo16Z8qF7NdLPfKU/A3XGUtFbukFHSqsM87M0uyvMEM+SYgyxdUoG1Ks5AEwh1AbIi2zHtUGt3zwwk3ew3P8vLsbwCpeqdEeJg3tvFTPm3Af/27mLiDai3Xn+I0U2cXjA/B7pOVQUhnWOAp9JFq6Nsg7LPwrUlp18AS/3wO66xl3prI0bFkjM17rXiBreuxYVe/HiwLkPEdPkBagB1ScWDVZyGUzR1K07YtF1jVCzXppx+NY2ZLcm2Qr3HXrL7eKj3DIeOw5tsq3ulDRIK9c7l0slovelNBsvVlkdGV4/KtKqUHlabt+VxTUrhDfWSr1FdPIFFq/kh4myNXuHwrIKhSHeK0g6w7ZB3ZPqhK2plVN2ORsZeQndgih1tRzeb1oZcfkH3w+/YpHCAzoq9L0e3XOx92clQiAvXRPm5Ybj8eRe6olaMsSXHhjW6rk1rdNvD99Vam3L6Bd0Pvz+r8atFZ3M1fkVWlBXx1aJKqpgHlR+VkqPaXrqkmu+ixLGGCNfF+DTZjvFqWpvyJlRu081+K5zSFRfV5pecXhQgWQjYvPf1A9KqopSredjZktu0TtcF1aIUQxzUVFC3odyCtltUY3BtyekpdbPfOvcu9CV1b3kWZwCuAhX8Ddhv86gDylue7d0u+UKvAHVFpSAcOQCAk24RGrrZLoGGzrUpX+qgYpfsSLY9Ioz9aw9oYyIDLexvWd+1cfeUJsojwsPlswixaN2gIswlztLd17Ebvsl2hLm0NuVT+EU8yqxk289XqCZVD2RgDC2MHDjoXeD4inpF+S6vhnwDsoC6pAJMWBzUjkjXsH7dduAJa23K6Rd1s9+RTi+WlPI5rWBMzFu1g5wGJK2YlqT81V5pfNIJvcNUl89pPTH5SHoVk1gXk1I+pxVrVk1xLaGXfJX7zY6dzffyZFgn1guuATr37dRf78MgoexhXS7d9maj3uZrTrt4Miw3ID1r35LV4lt4rkkpvKFe8jXhlyG7ezQeAhzgvVmXN/LQDT3W+4jSXVhLyK2603VBwTb+mpyNOBh0ARcn26AUB2PV0CjhKXWz39GfVpFAUSpRHKBIvhF3BGqsZn1OUVhv6sq9KNS9SXep6m9Goe5lnd+V7r3ABDLTILQT+F5ZUjpFxex0QAIUVM6oxEScjSAfq4JR3ciHXY3ix2mXt8vx6JQuqWhjFccGXbiuNZe67Whj1dqU0y/qZr8Dp5NtfGmSHlv9NEkPBeOcpLeLKD1IGcLkJL0auqJmnqRXEZm5I3SbJuntIkoPNlu7aZJeD90Pv+N36dge3u6/S0fLQENDzUB7Sccls7sofdNlhvyq3aBNpxLGhjgHKUimKDeCj0xfBsYG15acnlI3+x1broWeKp+i2VRI14AxsvmyRgFfWaK05eon5FsFfG0HVb04WpyCSZhLIAAzbNdIJHNtyekXdbPf77P8i1//1f77i7/+oz0Aw7/4m3/513/566/++NMDHCq/8r8PydDqP/77n/7Nv/1Vfv27P9Vf//T7v//0J4zM+Wd/qseQv6fVgVpCDgXi39fzf/v3v2Kx7/9+8W/rsqSN/tiGXH3/7b/+9V/MpbnDqd8PXvGO+yv/+ze//8v/zPeff/Z39v1/4c9f/ukv/5wc+ttfjvnxT75vl19//g+/qs3jKv5P9VHgb4+4bP/4569f/+BftX/468//6U//+M//X36G/8VH+fwZhh3G6sPrXH/7J3s/w9+ra9sa83qxcc5fv0g+XI/76z9/u8aZ3v4HotNfAAU5/oJ0+otT3n0Uf0E6/uLv9SPxGwRC7tevgWMryLcY5A/V5vsGlJxkkgOt3OUgk3yWDznIJF/3Qw4yyc/5kIP8e/8ydOnp26gHoHbxdfAv/PvgX6QvRH+hb0R/EV+J/kLfif4ivhT9hb4V/UV8LfoLfS/6i/hiPu749Aj639/65cetj38vqlNu0a3/j/zWf8v8nbQbWtxMu/7fa79iJmiX/3tl1JA+5f+HldeS8v/Dhz5Tyv3Hw/Lv8OwSLO/fuqZHeyi9+/tx/H++pn9ZLQs7YRjodg4ALfpEU02x6u++1WTBQPdrQxgn5FdNdqZL6ijQ7ZxtQSPqNptrJNvNxx5pbcnpF3Wz39i6GPDJsXPOQUDVOVNlYexm44TzfkTZehgN63JD7XBdUl05aedgep10bT6h2/b5hb425fSLutlvfhZge77AzUFE0jlXtfQvFvteAI5JSsrWq4Cplhw41dIltVVk6JyF8Bx091TY8NkGhb/G2pLTr6XQ3k6232e5iIW0rktMDOR9EDf5/n4uymLKFWWLvfRoDXnHCEtTdar7BSYOopLSRVRStqsuMC1tDDllmh8u8xfpAwXcU/CLzlkWoO0TNd0bDTccwbwFv/iubwI3s5mnJF1SUwCHzulqwbmY8nCT7aYTqq9NOf2ibvYbn+WguKh1hbvFMNTUN+cZM6uLdRO0IeKtdVACRelGQRD0SHQFusVo1oVAvUq0e7Nadb1qTUjpDfSyr7ygCGdVFeEWw0dfITsAyKl5RPzGtXeLS/n6hV68i6cuD8Lf9y69B2PqVkHYny7B3ye0LehlX+m+NWG9BxlhjMS4LMMdhKWydsh9RfzmJ60uxbwn6pHYCuaJYYdu6gGEilZB2J9iTUrpDfSyr3o0TQ3nYg7OOROoSEhF9gXoyS10MZ7F3+OFcLwNx7ubdEk5RplzGlqMqFtRcUPbDlPma1NOv6ib/eZneYO4is2BJlCDc66K8mwLVzSU7WVdQOF5MzDvr2hM2066pI6CYs5ZmJsJ3VfUFLZB4a+xtuT0i7rZb36WgSrkPv2VIY6BAhnWDhB/G7B2bhdl6w2r23W5pQxcl5TXpTtn2GNfuh0pUtr20nRfm3L6Rd3stx62G3fBUP2AcwwU6G0dXggAe4b3sDxbFNbzYvwnH5Zik66oobiYc6wLwXWb5Xdkuyku5mtTTr+g++E3b/ctV4l9KYZtXS7wd18nECbBTRG6BtoWx2bKu6ZT239BcSZQsKo+5wnTQz+gFh7scpyu+OGwP7LYG0BULDEM2EoTPS7BtmcRYQsNNTagLfKGHgnHwxJjEuDb9Aahv82qg2FpzUEo7hp62de4zRsLaK7f5kxBXsCTdEA3XYxfXVOUthVM0BDxuSRdUp6Yd84UvvPFAL+abHti3temnH5RN/utz2Jd+Q9cVrtccbBTLTaCp9XlY2inKKwHLGDJgQUsXVKxyxWnCQXYdLGLle3Y5WptyulX88G0yTZeJYYA+FavfPyKs7C3RHjpPecLDkBN1G/uia3kmHLWHC+llbfb1r51YzjrPqFL6AfaNgp/zbWbxpfcpJv91mepOL90vdadM4Xkr50UDnPaRh3/LOeEnE2bUwns67b1WS7mUvQVulUHRW21jn8W7bdO+EXd7Dc+y/fO3p4NRSPMxKgv1/i909/YfmLQRuki3lr74hlkjEPEedMTUbQXI+MdpLr0ms1uplUQZnWpeW5NeUO97Kt+ioue6fI+9VfmVHQw2gxxG5qG3DCRSFmVJMgtyTmKlbqkimAexGmErofu6+oL26Dw11ibcvpF3Q+/+eQFkOD3H3TcIWLwjWBDbKzZC098DqjTRVwwX0nyATQV6g4hr/TYzXRcoi+yVXw20w3boH7zEbqaOHLLVD+c1m9iYIu265v8TchBA1Ht2KkfCyfVgW360QXgOzvKDQTSdUkt7cedYxsR1wUKpmx3lVb42pTTL+pmvxVoaACeOOpYcg6ablp3LAoUSjFEwqYEq8ksIV+4ea/KuY7bxl+Ts1GSBV1AJsg2KF2NDKOwZKsk3ew3r69iz4pq4OZfiYHRuxXPSKC8NXvkgOCb/WEFUIrCSuqRqLoQxQDsG/ReANytgviNrcVbk1J6A73sq36KCtCFqaoa5yzBOZ8aBa0jlbfqp2AZPotpZ9IlNfVsc85AZSJ1OwCcabvr8eZrd8FQ76Sb/eZPwWbyrQYMMQ4HhnSUfi9DQmOrPLsv1LMOKR4j1COxtQEQw2Dro9f9hNWht7/WHJy410Iv+xohK0MBL5o455yKIQXAmFsNmEdA6wLlIasWcmDfSZdU0dw5cebVgIMZlQW0DcpDVifk8Eu62W8GSFCYVOzb+UqM+/ZqnG/5Ojhs9ug7H4Cwt9q14wMY1xI01BPhgANi2PdOvWJoALRaHHCAa1JKb6CXfdUeccKHq54RcRqaMorhPNkOYCA3fEVpj3hryC8azqkLqt4I0ZFzVDb1dHE2l+26I0SHtSWnp9TNfuuzHMwr8UZ253RB49scIU5Qqqq06IpWNsw/orxjqgd0RXk7u3NwoKcuOzloe3hHu9ZWp8fR5JVVfvjtkdB3FZYlcAoxLLx3r56EBUcSPiR5sdjRoYQcyLlQdcpLoJwzsc2nLrEJaduroLS0MeSUaX64rBt94/XVhCnunI7vGDp9CA2PoJms3zHw8hZyuEZdUU24ns4pQn6dOE2usN0cOVNrUy6/oPvht66uioCSVdl/ZQ6q8Atn/qJCv6CuHJTOerZ1uGpNWUmX1PZrUZyldjcGJ2+yPfxa1NpDnUEn6Wa/07YXq++07X0VLGhCaxhfNRAOb8DyHx4ON1i3E3JMzZJu17ey07YXHozmumhclu1obNbalMtTlvxmv3mnICLTLIL8lRiG4XuZSTaw3zd/fotQFOG6dAMfA3oktnb6YixNRmVY1K2CsD/FmpTSG+hlX/1Gf/uta8VJX4lxuD1+c4oKgQELnuxFKCX22+6Q25AVqjrlhVDOwTcL3ZdibG6bFG/0V+oGhpwyzQ+X441eqi7nr8xB23ydwpZmeRdBlPhD2OyZHvLjkNYrqOOnLnG2xuxtoMG1sA1Kb3Q7K1E+BF3d2w+/FVHE5qYtlfk6Z6PuGr2E7QAb389lLPN9cAajunz4ue7piloq83WORYJc1yJBbrurzNfXppx+QffD70hFFRQWpKStcbqSthU79QsohHFEab33IJQcj0zpkmqRtCWnIvFK3YKkLG2XnLStK+T0qyppW5JtzyZ0leR9ZU7VFKBWvb+5soytRTLSEa35KLlJ96oTrkSi83Yv+aveTLrCNig/c9aQT+G77/LDb+4a0QJZrK38KzGs6/ygXbJYQ/q1+bokdOrpLsWgROiJWJrmJ4aldKRnzemyOjTaW2saQ96Y3oevehdyX2tf3lfmoLbu1Vp2xMDY/jlF/WbsznZ2rNKrXg60gqr+RhCnaCAw98Y3bIPCU27r+7kj/GIdZ/Zb50IG4o9qfp1zhUNhLZ42s/k1N5wtCpcxkYAg701h+KcrykdDO2cDj4MJhCV8jLNFqXJgzpDTL+h++B27+YGSek4lds4CMgxSq2Or9vMcUdqltuLyWjBGHbqipopRnQMYHukChke2fa6Cr005/aJu9jt28y+q2uzd9pU5DpxbUBkx2DZfROmqIR6FmvBDV1S8ScmpR1fkRvx4he2a3qRYm3L6Rd0Pv/UYntq36MArzrVDa1/YbxV7c/eN/VbxA29HBYnkF/sp6l7tt3TgFcc6XqWLllfZBvWbL7c6Qj6132rrh9/6XbZmI3Kog3OqmsEX2pzO8RMfKL+bq8s5tZa6oopwL3yq7cUoNOjOI8gImzjpI4O1tuTwi7offuOzLMv8vLcbt8FiGLTBsvTm+5G/eQuByuoZqDfWa4mxEfKEngjPQIlhKU3p2YFZVv08rTUhpTem9+Gr3ohM3NsIuq/MGSr2adiadhbrXFH+jqsub0SLg66o5lFccSpGR1K3eCHQFaUdna1N+VJQYZ4ffvONuJDDO4pDkPEi3NZxfdEd2m0aCTP3/NJuUXIfY02W65Fo/nYQYxNVk5Ho6VZB/OYrubiU7pneh6/Mg2CCK4AHvxLDGlQ2pr1eiynti+pQDzkdq9gk42C2O/RETLW1imFtLdKzPhZZ7Wpr1ZqQ0hvT+/DVv/2GTGj3b78h+7rs228MO4+3UVhFBKNYt4nxcOJcT4RDtYuxiFp6kbW9YdV3nloT0iWc/9I+feUhCi3dr2iCZ0Ay9rsfL47Lb+iOpZXfSRqE+bRUHwHY3ht6W1UV28+AF8GQ0Vyv20VHq90/KdeElN5AL/sar7qOx/uMwFXHAfsQ9YevTmyA9hGlhySnLnD0dw1dUcVDUeT0izEBTVMXatgGpVfdWC6nX9T98JtXkn3I9o6aCE2LYZXGr7UOpSvfD3XeRiC4B32POEpxP1KPRFOeXYz6nvfSK+8ZJKtFSXatCSm9gV72lfex4ay+OmiCqpJxDRf1GFJivQaZegy9lYQthDZfSg31VXogjsOpiiG8zKd3gKQJq8cLVLjmEV7mcr0PX939VHmeGNY8eYDQfq0UWY8Sx2P4duOhVlE6bMdJPRIOxiCGzfGSXiXcp1l1aHutWelxd70PXz0Y8k7y2OF/JUZ9vx0glO2YAOT5d6oCpfDGmCG3MZRUdaoIHEwcnB+kWzb692C7OHIglwaDTkHzw2W9lg96mAzA5itzFjrjrjqeoiGZlKKe94bcEQU576q4bUXXCtrOOe7xot29JNs9Ai3XIdFH+DXUDdiSbR26FyoEOKLeOR1j1BaQSYdFi74tlCXK1zsu//ZnhK6oqqOtc4o1CFP3+39G2AalQ/dbW3L6Rd3s92d+oMdnEQf+MEbf+VkQw+/psyDGLzni/9QVFZ9FHPoD3UZfYbvFZ+HalMuvoibrnWzj1MrTVvVrrPn5a2MMp53NMDK0V2/qVvDF3hUuH2jOoi4pn2vkHIwUpW7HEFHa7j7XSGtTLr84jjT7rd/lotH4+DaWnM6a9IK65IptLADQQPnZbYa8o6SQuqBgW78Lm6Xncd3GmnTYBuVn3OpyeQrdD7910rsI4DUh4DoH469GUVn6C7cO7xBn4+Irf2RL9gT8YEu6Qz3YVX9NTgF0IXQxtF22QXlg8rpcfkH3w++I8liXUn2+fGUOhx4aFOg7n9zpVykofXelu5zXfPWBitVt61xonIK7C7rFByZaIOv6J+faktMv6H74rd8Fc4YwQvcrcyYKQzGUaBOpFfgvO4LI3UBgXG5DDVyXVLq7yGmW7ZMuRvTKdrq7uDbl9Iu62e90jR1DL90trrFjOu+OG6h++NZ5d9y7Do4oXWOthBw1FtIdGlysvBU5y4Chpft9Tu1hG5SuMZvjADn9ou6H314/1llXf1Q/1pHp+r6X98Le03h7C9RdJ5wr6J9uW7PqeiK8YkCM+l4K0rMsvqx6uYDWhJTeQC/7GrVK9nXsKEts+oIGHj/88tjywvnFMwoNbws5JhJKl9SOskRygHMg3aGJVGZ7RFki16acfk3NqGrJNl4pBiLP2WxficP5bQ0R/FExOxnR/eEYWO/R/jAbKO9Fj/19nOqOgeWcgxQidPvWFJhTRME21pacnlI3+81TiM1Ge3tZonqKcV5J3bE5avVaD8bbfXcR3NxamyKk0yKh1COxVBMkhgGGSG9YOSOtDhUEac3BYscbetlX/RQDtZL3XbZfiTMQTmlo0hgIp7SF2oPqEcC2Nb5sEuIi6R6h4isCKM7WD7sRc95hG9RvXhS1hpyebh+onWyr7uoiJqeqDHJWcfieCeDWBjSALUrrcbB1B3rdTrqgYFsXinE2sv7QnQCWpG1QvneeIaen1M1+M15oCArvKMlqUTGs4HNhO1CsFnQDtLV4qej30/05Ril2HdAT4XWiYFget1HvBYSOrJKweCEQHsCAN9T78NVT5a9BqnThKYthtTQXjVUourlouwLBMMl7rlOKdi3qkeh+WCLDprxJD/O+aLWqYlFrVo7iOKGXfXX3K8qFmNwQwwo9X1yFm5tuoxirCGb6T3fpQt0R9JaKkJjWEMOgr6RnFZ6y6vA7WhNSegO97GskZxaa2GeUWhkHT8xiEE4vP8nElrW8t1w89WpuKa8GDyVdUcVzseSMi/5G6A48MWl7eBBMa0sOv6Sb/f6MWLUi7A/nOL4dD3p9elQJVI5YSY6IFHVFldhIggPoVekCelW2QeWIFeX0i7offsdneYk0/MVX4jRH73tJuFcSi43p2aL8s9yQd8W973QqYGSd43OEK4reWtgOGFmtTbk8he6H35ER4GFjLs8IDBwxDgqbWG2QKiuaz4Gy4pvu8kbQJ873qTqMTP21g0K1EboVqRra9tmLvjblSweOVLUh238wQvPaXWoUKZHTWO4yPnp27V2cenYNs3yGHBh10gVVo0hJnC0ctoJmmB62axQpcW3J6Sl1s99RH8MyyarfhZyO8atTuZeJbsVeRal2YfWQX/Q4UJdUi2+aHIBIU7deBJ9gu/rQQK0t+VBe54wffnvtAs+sLE0UY76n4DmCRyuoaa0imACY3aUNoGuTT8/lVlm7sPAZX20h9Wxqm6z6UDetaQx5Y3ofvvItgv7DV8LBgisyrHblolexWuXRtRcECYYB7xbDusRd0antv5k4i1PlTNVOjDI89YtpWUjpEPSyu6lBApfyikPHxMXPBAC/uoKDgcU7utdJVtiUHGtLd+sWW3Ho4FfSjutW4JfTdo3GVa4tOfySbvZbnwU3C4qzvjJn41LHjcY6yYobMZeCcS4o5RwMSl0fE+qlYOQMfdaCVtSTbMcpXmt3JVJ60s1+xwNrooTpLn9gTRRMNbbxotiKIwruEeUxjRJyvri6hhZ0t60HVmfD8XDdYskA2S43LkasLTn9om72O/ogJzOu+izkcORCVSMMR/mxUWbHemyk2fCnJ11SNT45OQVT+qCLSkzZBqUba56Q06+iCX8z2dZLcXEC4vaX4kJ7UwO0+kbKuAMAvgxReilytGsH9vEIXVHbS/TEQdUMdR/YctgGpet3t5DTL1bcZL/jfhnoDVEVsjgTdwD2qMOmw1kzQxel9eoM+bH6UumSShXx5PiTouJUeZPtVBHPtf0pNJJu9juqkC+ORJwj6ZwOSFo8QN+79lrd8Du9gdLpbd2QDxywqDt03Cr6a3IKOnZM953yl9smpV+xTJfLr6IRATfZ1r2/8b3f6/e+cbhZG6r/74AvZX9Av37vs3+gA2h1Jt2j3/RGZ65xJlJdW9/tTLZHdBlz7aFU2E662e/ota3I4vj9UtQqZvcLxlRjbJI91ZcovQPYhqZJe0l3aMSo7hdxOq556qITWLZb3C9cm/LiHanzh9/ejq7mWEfQoDcYGc7RqGlE81bt0QNfOi5dGsfqM5tplWfGDT/2cj172Mlqc7ANrtk4Q/yGXvY1XvVsj7vHX/XsnmOyY6AqSHPqlyi96ssJOYCTpEuqRl/VVkXuWq77XhlhG5R+5jFC3tS3x7k0PdnW+TdGbX5lzsCs8CVsEOKpM/br57qTpnq+k9FJujcNB9XJifgfp4duwQzzrRivUiNam3L6Rd3styeqCRDUvD2nYAs6gdKKIu0HdViKoIe84aZqi2rypt3rm3ggyicDilNtxJ90cbqS7erDAbk0GHQKmh8up5MvXpbpFD/wItcpnkF13F6niPKTbws5UgPUFVXzKb6xxaa7LkY9ynaMgtTalMuvolP8SLZZd8J4Ed+LYljv/kGovFhb/9mIQk29FM9BjArSi+gV9K5iW3wjimGNQdKzFn9ZLXodak1Ih2JbTy/7Gu8P3YzF3x+8WRt7fnijsx9oidIFfE7INxpwqUuqRkM2OQV5TOgWJCFou0SSgmtL3vWQmOeH37F3HKiOPbF3HAjCVO4dkalv2N+dI8rXKyGf6B2mLqntaQdxFroEoVsxDp62QfnecYWcflE3+83L6sqcDrtk2OySi0R3tYbKizx4jZ5NpMkpRQadeiS8Z1MM65WVng08kVUfEq01jSFvTO/D17isXubt1UA1v6yMs1BZZl3hr7roItL3qnBB6UKpLeQ41UmX1IwmR3IGqsOoizSjbEcaUmtTTr+GBmONZFvvj44OWTUTkvN6vlHcPwgygtX3FqUnij0OIa9AV6AuKdhW/NQ4G0cW6L6uvLANSrefhfuX0J160s1+BwBhQax3qRmdHHT2YH7zg2Qu0zNcoDzN0UKOfJl0STVHRBCnYrYDdX3qk9kujoigtX3qU0m62e/AOOjYcCq2Jc7EpG+bNW3QNEgRccM5I7dXesg3tq/U3drMKrYlTkNxFHUriqNo2ydm+tqU0y/qZr/jqNhQeLOioprFJwwZGHweDzVHWFUlVVR3l79DROiKitAKOY3hkatSlRa2WwqtYG3J4VeLsEyyrbe7tWVeDZMW5/uX5SxJgzivmL1iPduk9HYnRPphUCl0ScG2B34WMgjFdR9katgGpXvRINK3ZmCe0P3wO5p0ql/hX5kzBcH5MgRz4YhubypSyja/qlDKu72tpCsqddmRY1e561ZAcNJ29SOJ1q6C96yh++F33C8HWHMOPkrO0IgrK6/iJ0PODJTul7lCjmybdEm1AB8lh95Rt+DITNslH6lvCzn9om72O+LaDSnTBD5qHAcf7ZjEomlAW5Su6XtDfq2UcTr4aHHbursKE7jFdef0aUBblOLafYacfjn4aEu2hST3si/Tpix+ZU63zXZHq9kcGmptFhwC4xXDzBvyBn+gK6r5Ny1O1dBr0y02GVC2iwcvtDbk8gu6H34HcCQOR0SlEMMarG7TELyHO2FnTxI89pbj0gV8GugtTeHTDocMm1AoPRu8Lqs1hfPHcGnVaL11P31Nx95mFQteQUtO1WyJUfxBXjEFDpQfe0fItwpTmACpbtuPvahnrM11+0GFLGyD8mNvCTn8km72O/UXAmtMkVRxsD1oNumqYdSG9QA2UXoYWeMP5L2pKenpiloBOUjOVG0mO4hust0j3ce1Kadf0P3wm9VabLRpatIRw7odNjtv5suJ7SawTqbMNkELILV/pUfCM91imD3p2Uqy6mnu7d0+c7g30Mu+xq6LuLNe4dQFS8tiFgZjD6bGMFh7Yu/BYK7JMeZQukeTskd8uQORnjpCt6KCibZrVDhx7SoQhZV0s9/6LEdIll4ATI5fSESIZAGw2lKj6PA9cSTvgEbgRUZqR4kiOUsFwKbrF5nZnn6LaG1eSMfbWtsPv1NlBE7kM3b2C/UnBzv7992UDXwxu/NIeWXEcnktiEtBV9TMJb0DJ/x6Qrdr71GGKK+MaCGfig7wMLqSbeIBWXHCFX4kGc3ag89CaYMV6Z8NpMrqTS0HfWWQXqQ9oAcCVhmHuHhotC09wG/TKgj7U6xJ6VTtRNufvsZPYRiU9e2rvzKnaVRhAZIV69QN9qnnOnZDhoK8YugcdUXVKJ0Ap1u+Wrr9eKnGFpUT+pLDL+lmv/VCBzbgOsIidc7FSCpMU8KTwqqjuyi90F8lnOQY40RdUVFCIw4uO+oua/OS7eWtZFqbcvkF3Q+/Iyb/HmfABPvKHIzUrXgQcvhubZpANPVN4zEqOZ6w0iU1NADMOQZL5rpV04juEKWY/Gohp1/UzX47zO1mEYDD3G4cfIAuctgaAdTC2kUpgPNO2pI3zWrrI6h0zmiaAUfUQ9MdQkRkqf1yoFtVCzR3yjQ/XI7s1cADVNB+5LyS12uZv4kr8iBreK4obbVbDTlh0qgLCrb1emi4N2qMU+4b0H2wDUoZy7ldLk+h++G3V2E/H15ws6oK27BhrDR1Y0zZtQrWbU8OEvYGtqcHGcf6jahHAlbtSUTGeR+Fei9s6lZBmFWsSSndg172Nb0/jhJcX5kzAbyL9AySXPaMP5/ptIvtJOS1CIzg1qAinSZOxMixFa3JdgvQXq5NOf2ibvabP8VG2OnoQEUGUFLe94QQV7MGurlF8Ps9V4yD8lXokYBV+1My7GVBvWJouLQKwn4KrEnpVlRslk9f/fV3Ue7J1gQxLOt1Nt6u1m72/XPai3coIPh+0iPGLUg3mZ6Iqoi9GAbMAL2Xqu2ySsKsbrRpQkpvoJd99bzOxJgYjmcjo1ss7F7Htu32+LhTlB42thGi3KGn2nQKlvHX3WFsq+sCNlK2mz+/uTQY8tI0P1xO1WaoV2up2gwVauy/LyyAZUVYF6W0/5ohv6h+2+r7325bp/LNGtkRusAIku2E0s+1Kadf1M1+RwPiBZyh7m1x0Mb+injQq2n37rEvFZS8W9vlzRJ80hU1/d4WZyCHRV0r83Xb3e9trU05/aJu9jsg5DZTfUqMkNNRQ4ax2W2gsGUIy+FGqmPWkGOct3SXoBm95IcczMSVLmbiynbxuKrWppx+UTf7HVEstjCqEIWcXoSFbNA2FQPrh9ojVYjSUD4iOYqupQuq3WgCIOdooP3B3XDDNii9WjnQgjjLNelmvxO0n2eevzJnodGNDY/bJ24PUf67rJCjbEe6pFIee3nErocuW1BpO+WxuXbXkM+TdLPfAS5uCGH3XRVfiYMBq94s6dOxiW/dAv+UGNeMK8+kCwq2dTdPYKHN5bqomJDtKKjwZkvKq3DU5vrhd0DNEBRczzFxGpKPRy24C3Cjp4vSxrROl7+ep9AVVeM5Bk67eBZBtx3U5sM2KOW6Zg35VnvvHT/85mcB1ueLcavQURyU5M2K4aq4AybzLMULHYFK6nJ2ZlGX1PFCR3FwB1B32JQs2QaFv67aLZmcflE3+82XPI7/uKG+EuMSD4Aoi8NS3URYZBbuoDeT0q1xNr05cZRMEWM956j3GnrcKgj70y4MxlXcG+hlXxMo3sJE0QSKh67FTVC8YSe9Q+C6JQpnN/QMSo50hXRJpdAJOQydUJehE9qO0InWppx+UTf7nVCtmbPugWrNfDmAvA9z7d0elWytUINBAzqG5JiKK11SO/rzycEAb+q+uz5sg/rNF8JZIadf1M1+O4rLxNuP0TkxrGXxDkzwWzYKDKd9EL9xhGzXpYgcUI/EUFxOjE7Al8bejbDaFJTTmpDSG+hlXwOUG0EqYuiIASycqfrcbUXdNs/nZmSZ4VIMq6QeicDQIcOwcKRn2ydZdQwdrQkpvYFe9lV3hX3Kl0bYSn+QA7SPbh/cpjdjVti7ckHpyt0n5AupRuqSMtv4a3Ks88t1ARYi28WrI7U25fSLutnvVCHfcFVH/mAitjaRPzC4oaaa2dtE6bXGKsOF/EFPuqRirAM5laMZoFu3N1A0UZ4oLSGHX9LNfjtGWcNenbD7ZDRDNFwH169NslkXKeOq4OUuyCgbYzckm02PBKzan5Jh86ypV22ANa2CeH/KNSmle6b34WukP+z8G5CE4rBA2maHC3Kwo4QzQRK+AV0n5CgIpa6ogCQUB7CC0gXkoGwHJKHWhlx+QffD73QWQa5snziLLIRW2L89frH91c4L61dutK044VLecIilrqjUaEsOSpWky0rOo6RZj9rNMkJOv6amm91km0+rCxA1IpCK0QxJ1KCjrfOhW3NKE8En6BouvUiQQY9EdQTSq9L6WqX3ptC5VRBMJpbi0qE8dK2fvn4gBTUvMRPDvlrC9XQWkFUHE4mzzpghBxJQY4FZVwzRd3rdQUGG6zYWkFX1y+ntctUMNZY7tTi/ayfDf+CPic6k8YRk2IvoRQEMO2ljbrsjw6kIqBB5iXKCMlHXAZxUBFQcxYnRCdNtiE7QdvMiIK3dGPjorvrhdMRCWTySxug0PJU5RsdaV7vG6FgpieNJvZ2CzS6mfOiJzoKh4rYVCy0oEOHx7umOozE6LENJY3TY+soxOi10P/wOzPqLx0BTpJ0cFB6zh2NgHif7O0D95v5rnZA3PUbmDCowhcTBPE7povBYthOmENeGXH41BUJusv0HonwV0ReOPBHDWiFOw9N6vkPZIUDWdGyDYWc1SqfCNHs70R3bgIz2jEvP+ieOg3AVh0Fo1aUO4fX0sq8Oqvi2vXf6cCkyrIpn2+iOd/VjuNTr4AfBsPT7ucE4VoNLPRFeTCdG53Ap02scLmVWvZJOa0JKb6CXfQ3MmXccXlEYJw6K27o1Mbzd/UTS9UVhVxTGdRu15nJroHBdUlEYJw5qHqRbldA9V5S/KHfI6VdTsngk23+khyAK274yB9MyykAp3ETxJa4IUMrdtRnyo1663oKKMjpxKgooqeujM4nvlEdr1pB34UOt88PvCPdU/MYzJjkYB51+BTOBL6cp2GhfUlrvnfklx7xh6ZJqURRLDkIo0i0qep1DlMeQW8jpF3Wz39wdNsTFtlqoxDivemd1nJMt47MmTtBXJUhrIaYM6UbLMPS2Zqix/kiM+e5/6Y2XrZXVoc4prQlpE8Ds08u+BsTURfTLp6qSMzQopSDCtYrn6vuM5tSCXRHktWLHNDSEZbttxYNYlXRO6BbAFl81+Z24CNkIaHL6VRVtvcm2DlAW2rgRVmCFadFNyFpUQq6xVtXDCl7LanLWuVIXFGwrCFHRGGuhgSUYlhK2QekA1W/I6elRNUdPtr333rsgvjJnKjY9cIAs7I8fojxVv0LuwJ53BTX89S8OBrtItyluvYco3X6E7Wwj/KJu9ttfghwzSOQvMQbxNgeeVEDi3FME32xlu3Qhmgg9El5zJoZNnZGeVZrIqhecaU1I6Q30sq98CQJJ617tdMF4aSuACb843/suFqFCSXChMlxqdfbUY9E9rDKCZgwbGCto002Y4d1E8NU6ihhyz/Q+fI08wUTLtkMZkYN2EnRBGTgRKrBs6kJM72poOJecs4SpSyqmd4mzVMHFl84O233GCavrpWVy+kXd7LefmSauhu1nJqXZbZj3QnVKBcTMFsEzk/L32EKHHonpWDVkWPe59DoLMM1qd6wargkpvYFe9tV7WTaagphaFsNCjtcAHxoGIN6Grp6l1PLtapRpFj2aoTc0BVDjgsmwaYjSqwZ93NQrNDyNa2saQ96Y3oev/PYBGFYCuIEMADf4EKxrY4Y5/0rADcQZgtQmpUqPhMM2iAH0ha6+sRpWA7WBa0JKb6CXfU2tBei1ntGF3tD4cNCFbi8L6/YWaMeIvvKKojrKW1XTxLlBRV+5OMPOd9LtVjAs20Z5BKuGfKkPvM0ffkeCmbO1dvUE88QZvRCLFf3+78hZl0ILmmtRD9JclF8EGKh7FRjY1T95Bx5Av67bNgB0YBuUElgW26OcnlI3+52Sssy8F98NbiSuDkqMDhPs2L/V/SvjiRYmvShnQmyrcHG6bU/KIjbNAkKigdZke0TxIdemnH5NddHtZJvFIx39mOznFMNQuza7Jm0W82ZgZquZ81Tsdoxx2Nhpese7PK8f4ioCQqu7nqF2bQ8GMdmpNSH1QNK33oevEV8jBv+KCT8NP+8FSlBniAi9OKuJ0mV1h8sR6ZSuqOUze8Tx6QgX1bwt2R7RqcC1Kadf1M1++2u74qo4Ra/tikxYtSKb5mnVU1BNW7VPfcU51aVNGbRXMwMCVvlTXM+4Ug896rQKgq9tVph8M+Se6X34GhjWTL5tPa2O5+eAiDCQrn1PjFaEXqwnSqTZ646EPHQjPb+jFq4ioTdm6A4089D2CHwBrg25/GItY/bb6w0HIgtMbIgxGZScCG9XQIx3Eb91Mpzi2OnMNZ3qntUQp6Epnbr1uSTTVUkNLQwpXTLFD4fj1rBngzUvfmVOA5KHY/ocBKKZq9JhphIjifKrTNduQUWrpDgFE8aPOtBL2K6pVZKYQFcTyGvSzX5HhM0aIqfj5IizUXRw0EyJUq5XXrRF+bvtuvxdLaErKkGakTMUezTd7kBaW5S+pzFDvoU5ojxQsq3+YECQtOP9wdf+ZtlM4s4+UduhrCuCm5KXcqF0wC/okRiqyhCjcaah6VXue8xqVUmG1jSGvDG9D1/pPkqa3nwf3OViGGTAucAVKTbHF5VRIGyhZmccSjtOP4AaIHG0GxHD4jjUe+0AbhXEb3x/xBut270xvQ9f3f1B4K8l94m1MO3DM0e7bHt2rgi6T2y7ZV9pcz0RfowSo1gelRFMO+PQao1j1NXN8c2QN4UTTkayau+IplpFNjWC8X67V+hKeA2DptlE32h6CG6CczSGQmvoGUGrDFoa4zBo+W7LazcxrJKwP+2YWgEp3YNe9jXBR6CgpsaEroFo20BrhZXnELSuoDwngdo1HaiZk22hKyqB2pFTlDetKAPfYbsFqB3Xplx+FTWuj2T7D3zwzoJL4lB7deb3ru77exqo/rmGCb2nCH6/GhyKd2nokVgOLk2GDdWUntVNyOrQUVZrQhojRdenrwmqnce963E0njHtVbWR8TqqUt5blOJo5bq8VlSFQVfU9NecOMBekW4XdNHeohQLGjPky0+3+4ffflOzcYswqWJYxegr9uW20Y5ZGns7/KZeLkUsCHoifFilGJXnXTaZ1bDqkyq1Jkqpj5rMWvv01VFquavki1oM6yO6Hd1A1pB/EcgCwbPnHi7llCnokfCAuhjWqy89C3LLqkfTtSak9AZ62Ve6PxFvmCrgFsMieXepJ6da8QnbdRi8vlfDVCvaK0qEHEU56IpzbLazVC2KJ8OOuqJlO4fvttDL7kbFAUdbaDilOPasf91prH+z1pui2jhvzamWppa8obkUuqJ80JNz7Kt03YJ5qUXtoMLw1dqQyy/ofvjtMY+J12rxmAeHUfajiZ7DRijfhiN+9Uw0WpwpRS809aZe8sVjHnzP7iG9bgOoaRUEYx6ru5TuQS/7yp/igb8h06s3hDjA/nhtQagpem+AMVVTpDfEWKopMvlWTZHpkur+hhAHAXTpIoAu28XfEFqb8q4ss+lmv/mGGBqQzZCHGAb7u1G29wIoVSMEQPANsY9LCW8AvaPR2Qx2kNENB07DCQwGToMJjiIdXJPSoXmSTy/7Gptuw+vvEbIhZyLsgtm9g6NGid6fRpFinLrkiIVRV1T3kI04Nr3RdW16o9uuEbLh2pDLL+h++B39PpWZEiXwyOnA+uU03iH4o9lFKd9g03yHsLFv0iUVOBjiAD6fuv0KJ5ixbO9PIxIH5fSrCFqpJtvKGhHcT1ONxbHivJe5eef4gZkQHXi8oDzt20PuQcQ+gloeIREHMyGk260fTra7R0i0NuX0i7rZ76jXtqBjCyRtcnxEDLFd3lVTroArczvojCuyAmDSx8cct61dCAEoew1djoDxo4sjaR/l01oPv6D74bc+C7YEL+yjMafkbPQSYv9QDVjOoV2P5xYE70o5clrSJbW8ekucCXRq6nYMcqft7jh9Wrtr0HtLutlvL6y1FjLrpfpKDMMmvAOnd5v6dSfOLz5e7C6ccCDd6CmDHgmfLSZG1Ybl/iLCrKx6NbvWhJTeVG2QklVPEhdVJX8lzhsXBvzLi65qAgP2IsqTxM3lb53QJVVjspA4GzU20H2jxsI2KP1w94ScnkL3w29PIRVA156qFFJBEvrlhTARvRtG3+XIE0cCvJyKAikemdQD0QIG8AiBc1zpNQF6GKxehvsgtCeyRiX0sq/R3d7sE63l3e0oWL3HJ3NaQe7rQ2+/UjH1QbElpRz+CT0QsMoNN5HT+pBe3RwEO5sIpl1bcSndg172NV1JaAZ0SKSFCuris5uRIz0xNKEkSKQCFGWHTNqhC4q2/UoaGB5TpGvVem6blJcbtJDTU0IiZb8dhn3hWiFSlRjWL3QMfL5hbtstgtnUiaBqyBJOBMP1RFRVWIhhqHPUwww3WgXBH3gPMeSN6X34GiXaFSHwpf1IUy/S5RwFBAcK0zhblNI854acmVHqknL0GecUgNBC93katkF5qGGGnH5RN/uty2ro76suq6GSpYEaBpYzTfy0yzP+/hDZIb+AOaAuKNjWfqRMnRKli2OibLcAfObaktNT6ma//fRdETHU5KT/Udu19Np65NT5+RV7CAOUej+GpIFISLQEN4IBYtA63SC1dMIjjfj7nPJay67vJlEjBIObyPZeVT57f4+qsr1MhcWmFmIIh3Kx24J/S+BldRYQtCIyAZyEouxCKYzXXzhrbqNRk2cXck5TyBvDPXwN7smBx5n6vEmzvLCRFymSR3QNR3KJLnH8cO3CUhqesiNNxw/X1OuyXWM3T9nR3LTTL2Jvv4PipSBgN0VXs9RG6xzigfvNOiui4dZIkrSR3SXsKPsiVtKMjEBqhrrQkYSsxtiQtJEty+3yC9iH37FkXyyaHL5kX0iWL0yogq/kvi9Nkp/nDbdj4SCspOln/tIM8NtvEab1GLvGLpNzy95V+jnaV35HIgIOi7mTksKWrecZifsxo8XFlqCD/OzWDkpe4Cj4HkoK2wYJZ+tVjeobKM0Ja9Lx9cHdvvoBFctXk7dRKtxHWhsl8lk1yyjh19w832QPt04RZR3cVPhY6fxTmXszO66dBbZGbVrJa05Yi36emZ+++gOq4HmWtx5QBXn13YhyKtIYu/3xo0rQA6q71TLgiZPggT8pmnX8Jc4CchrVo36a0xTyxnAPX+n+QMCjqJxHima9zSfOyI2YZ20cj3elA2xbslKxM45bDCehqJxHCnthC5esNyJHTSrn0Zyw0hvDPXy9tt7IDBARozSWqGTbXzxlKlbmvUjyrXcLOxZ6wlIanvMijaU5Odbe1z5285wXzU07/SL29tsXsw0LLv0UVGy2mWfb8GyrGTYV50+xtlqOZ1sJFcdJmP5TUGEbMuAyKvMwKgUuZs8xAa30BrjbV+f4Y7sl5q1IUc6oCm/VswXZrGCpSlrZSNKnFQnVxHWVjHU/kzaFddAkLlsHTY4K4Qqp0ZrVbymvp6/OJTexY2bhKhUH0A+v2wI/2ucNNMExDUGxkeXWLjbpgyMx9lLJhBR2lxOXrachR4VgH83KgDtWugfc7WtwyVUEkZyR1BvEFFD4NOQWWhIDm8v0aCpCMivavTGN2Ex97He++DOT2ntgE3g5OXaK5C/OTXv1ZPr+ld+xfq14u/i5DTUF5zYdSRUN5zYDyeDNz23S0sOS5zr5wlLKQeNFTVJzi4SrqMTYkHz9usNOv5KaatRrbJZUdZQgksRTii3C/I6QLMn01etKsSoEGWVv6pW1YjYM/X59S9l4cIQ9BCcxNiQFPPqWRm4Z9OF0dBho9upQNfFSrwpUBWdktU3yljdJvtIcYQdxK6AuXc3MqOnYeWb1stjX2NVDbJzaFHLKkA+X4xGLhQlZy6SwIrrzuMNT6CzmwWIKQY/YLcUGIypwErIn1yZ12VtZuGzldhwVgh6x3a1dHfQO7vZVh7MD9Vhxk0uDG7VGkeg0Tre0JCHGkEDDAHvLopI62BbFqfp0VoPdc6MKi5tYY8dNrrlpH6ocs8LY2++LFCjZb5WV0UXNMLLfjEPHMtFZBf2kiqcGWNZoCfvGKRqxlHpklFJTrZWpsAX9czh28fwvzU07/SL29vvKhgIpRb+yoUCIsZANlRH72cxYSpI84FDCDjJFYSmtIIykZqqsdzEQEmND0lFDXmGnX8TefgdhC9MAqg5CqOneKINb+mxHE21KeuevOHfYO24jYrsIha7sWLav3DuwGRWEVXfA1qc5N+30i9jb7zjUWQh+zGhXs1DmktGuxljwir4NC9OUKJAeCNXQPlEakPVNDx8bn6ZmocgZ2DpVAE2GvBrtasiSV1d4Suztt5+vsR6RlVVS2Lv1rOxRO9ksT4q1k3wxnLSgLsXZPDhOQtVbQQpL5hUunf2dRk2qrNKcsNIbwz18jWT/ZgmFyxtXmMKIGDcozfElbbSfh8C9TxtubZbiQByF4gfNVFjFoHDJ/lKOmvygmXOaQt5kfn/zGtXq2qrqRDfcl8LesQNkiNkuvdHBT+DX+Bj6wo91iW7s4Cj4BS6FvZmJQ+YQR4VgH8WctFb9FAd3+xorqo3NifrCS4OFfBo6bOk4w2OatqeJLx1gdNSmzQtL6UoTjxr8FdisWBOT69UXXnPTHnX/6yu/dVPjNPR0CtNNTU3HjdlsRZmGburRJd1nr7KzLzWxlGrc1NQU3dQb2Yz1GjvHTc25aadfxN5+O3MRKZlFT1jE4ZysUKsjHSZ7xx4IXDnk4VZ0+yFuii1EDYWosKRX4SwXRKMmpyesYvyoxb0B7vbVb+qBe5H5/VKgKzfKv7Jl8G+UfmXP7z+HLMOtDW3DgGvqIcb8fiksT184deVOTQJvapvTFPIGdQG3r0ETwBeIuECkqWqWmJEEN0EYxDTveRXL77BXrRi5r1k+9jv3Ywuvs5QdiyYbGhsSPo25aZdfwD78jgrJiSTkoYMQajZYRhtWnvaWtP5iW5LO/Jn+bfaFU+8thtLuY+t5YJopEuaOzOESY0evds0tO/0i9vbb90wDaSbKMnKeknNXpaSFJlsqcSHqLZWqFqqNlaEXltJynnNpBrYmJNPv2pqkJUl7JnKgYNczHPpw+vwd33z3Jb/+5ce3k/TSXudgprzONnG9vvzq19p/4SmbpocGOotgsGMbIPZvF+ffcgpecfPR3vFcJbbrCe6/b9eh5nzw+o1r7Bq/L+emPeloy7C33zp96PYyrUN9DV0zrTizIPR8fAU3fSmSdHzfm9srgtzEShrqbuiaJmZ55mOOa+yqtHafm3b6Reztt+90yQ0VvfSY2IVeetakpoEllU1qWvTSY5Ma2quYRXoNyRtFu4bbezap4fY+ixkkeukZ0fVmL73lyIfLQXyLMmQ1CutOzWXbUJF22drRwspDscy1EVUe7Jk9HSfBewdKUdjwi9HoEqN6uoDmhJXeAHf7GhfURhpRb35BmWajHNZadtuOCRGe89rtj8TG82runvg4AytpObO6NNOORoltA80OMDYkPyrLYadfxN5+69GM9ue9itvINbihMiqKekeGB6qNIGmncJKHZAe9qLCUgvFeGtYyEstaRo79ZLzfbpdfwD78jsUXO5mImlQae7sZySbSUzeY3M+bu/mr/CygyDhj9gnCK2Kn6K88U4YaO1h1bAJvOMdOkSnT1Ekl9/CL2NvvODI9ofNuTLMft8bYaI3jvKMtE441T1gekh4sa4cdgW9hKZXgV6cGWT/CIutHY6cHv3oPO/0i9vY7qkYbmBRrVI3yUHqQmH5g9YZkMXa19UV4V67MRH5HubCU0t3dkY0G93JsZjsMjJ2vdhhFZ947uV/C3n5Hwj1U3SNqfWnXz4cMNv076ZyG9MqfC0Ie5Wzb/1XHSUgefIMiWzifuGwRfI6avRyBc0JBb4B7+OrlfRnXCcM4UkweStrvank0G9U5ELS+sMtiqcB2O9KlHj9a1iXHdZFhrZuuhq76zTQxrFPX+QnH3Q7HI4sswCoOlwbdpBTQBrkXOrVT0iOL4fiNh0K9sJRqHOU19V8qPbDoJqWxcxzlJe0n8wy/SBx2+x2ZkwNhSl9nFXWPqWxAjaxxrqPSlKSLnVwlTO5rF3YqBHqtoxtqA5iAZ9iCdRTHLrHOqgppch02Luzt98VAjCNbX+VP7w7Alfqwl1FiF+Il6Z1HeSW5PRckbAArqbl30lS0SyG2qM/AWpJ8TzDCPtWVgDuEdo2ta+xcd80jbtJ0PsATrlg+wDMuaA+62SHZDnvFveAP/+1j64o0jW1VhG0DbWEwdhvxEsXctMtTYB9+61XCXsRddZeuQQfOkpEeyRZbVQkpvkZtWvlzjToubFeyizixpWGbLGKtt6yPXZwTW3PTTr+Ivf32dJKz49zepUaKzbKOhNyojoqmKoE7dTsQgdXigMJR8P40UljdEHAZdUNkBNxeAYM5ZaU3wN2+xmVVyS2R/LKqSK9vbMBE/ghSNHVJulCsjrSrMV++sJSiHZM0Rh/s2GRvUY2d/IGtuWGXX8A+/I6z+IFPKN4jTVXy30QpATvbpy5Jp+vWD4l2NIUVllKOhzY1Cd3rga0b8RWMDUm336xhp1/E3n4/03yW2s5JYftmptyAXYoJOc1rY5iuQ6uTmo515/w48bLyfpqn+dj/lObTLxKWWtwamT3t6WsUl1ZsIXL0Juemgx3fW/YlWsaGol9J38W+QNmrnZATS6ldSd/UTG0JEp5GM8ZuV9I35qZdnk51mq/X2FyhdDzAlHFFhV2BqK8117DdnRK05ihbmox6XyJdWhGJpwbBIGKbBYM4NASuUEZ369Qj+aRd3Q7HeRdDQSM6SZumIFDclPiUUPfSuyS91RmKSmxJfmEpZa88kSahnTmwZwkYY0Pyk5kadvpF7O13bKpyU4Dx49Z0rIGa+DwKbszeJOnGXSPsIOEWllJVqqtrClpvEZvVeqs3SXrAlRJ2+kXs7XckvLL7rOq6pAHDaxyZkLKCxyU5jkSs1y3tTUSsqYaUPdgoTdJKjoHTGmND8mt3hD0pKGvY2++458+RxVkZR0G5aaYlraaNbrpIxz0P9yJJq61zOiJ7QZAXWEndE16lQTqusFUJpjZ2vRNQ2cmXCaopsA+/vY6WDRpIBri9z/Z5pqIKA9WG27tzr0eKBWsRE8rlWKdIqQURoDSoyQW04bHK0jmn5eO0TQ/rFrjbXRVvIjQ5ssqGXAMugAYeigHOgIZIDCSkMyBaI/uwp6iwlLIzBlLTLZQlbLdQlsaGhE9jbtnhl7C33/4ybEiWLEUvw4bsKyyrSPw2ilLcqvME7YGE/8GucCVwUyUKYkmjolha3VChwIpRvZRkO0spkvVa4G5fo8tDxhmUt4ymZqDts3UXO5d6Ab+OnUjNaBndLMdTduts5lhK0chYmor0MWILWkJXnXZ5y2jOTTv9Ivb2O7pvnK9iVs/Ql6YjTx0netOI1DK4Pyjh7NAIQNyOs0NhKdUg1aTGOFMdm5HjzrFzkGpybtrpF7G333qR4DTv5K8qNErNFiHpwvp0YLV6vilI99mh7F0tWUcKad2teUxj3KPCfrq8YmxIehiuGXb6Reztt+c7kMSH6UFUFGsFvrCqKbZxW/hOi7dA30kEQt2OdpLjKGQnhpJini+TuGxkTRw1OysU56SV7hnu4avHsM4SMhjIpQCJeEIlPgnGE6r0LwJyMOS43cK6jqWU7yKRhMjALo4lwTjHvgjIOTc0dAvQh9P+3rCm5Z5xJoWlH+yhk+lqNFGzS+B7I00p7AXrQJci20wa2zoIaslkGthzzTQtrHQIuNvdoFIhdVpyKhWE1bu1c27IG/u8xmdHz+OharM5lUI4wJ4SOApN1WZS2C5buHxeeBo1i1ZDc8JKb4C7fdVrD8F79Kz9uDUIzjXwrzbEAxrC3JDsez0hkOH2XnRaf7CSiqLyrkE8gNhqdI0aGxJee0vVGWanX8A+/NbfYomZZTWvupHGDpQzktTKmngpo+M3JM13FkWyo3+4sJSiPZ00uImELeJusLHLze1gcxdxP6QLe/vtlbOV2aVTlbOVWa3WfL4xIXaey3U2CdzppOFWpO4TR2Fc9xA3Aqk7zo6yNGp1AqwuopU93Rvgbl8jI2hgXbEiI0iEsdjVcHtfWCHeJem0j8cDBUcZ7cJSGsFdvbW+aSuwDeTrHLsFOTvnpp1+EXv7HZy+G68epZJKM7RI2DjBZX56zZIUyBk17CAXF5ZSpJJKg3RQYZEqqrHLTSW4d9jpF7G337G04m8spmtp0GURLdgLGrZntGCnpKXVXGHv2N0RS+lqdEFNMaJkYdFlUWNfjS44N+30i9jb7wjiVqz+q36XrnfP2PbdcZU/+b0XSQri8r127KCcFFbS9MMuaYa1HxG2gZ52ijVnx29uc9NOv4i9/Y5S7YUgVgtGq8UqDHA2nF113gjlo5EHJB39MWy0kKw6Aitp+iJWmoE9PLEdmfzb+RWC0Wq3sNMvYB9+a8lbbU/fkh+RSpPF6lFx0n+OQE+yS5GEbxpF6rJjtyksJS9NkqaCeYLYCuYJjl29Oklzy16VKTLXV377+mRjN7CT1iemsO3KZpaAFTBtntd5edNmjgBIUxOP7EjCQqlEFDOO9JZDjUdl+0GgapQ8OaF7ORNxt7tXtQsKBHZUa1dUhajol9WUCMYyRbpGoT4rWiqevfnCevHBjmpt00x0MAD25CrH2JD0JG4z7PSU2NvvSLjueB55d1xqplK6B16FTPfeQ5JOssoKu73nHUtpROdrahCAFxYBeI3dglOOc9NOv4i9/Y5YG9nPik6ypl7kHSerRnlm/cgyGltT0j3cRtgLTtaAlTSjxp+arudDg/frGrspFcjnbnr2zMA+/A763IQaKbUYkaarDVFC0v4GU3HLkhRDYucotjhagZXU/KqRxkJRjjWWZh+7OH+A5oZdfgH78FtPL+t7dxrPiN1AGpaKW5e805bStskW6KKkTfW5TmQfdg0JS8mzbF0DolphQVSrsT3R1uemnX4Re/sdv4uRgpUoHKGmqviDFGMb32RekvRN9xT2itNUYCXFc1uajH5vRWUo+Ro7ntuaOykzegb24befaWUsALIHeDIJB0Biiku0D1HyFy953x35KLAO3bkHR8FZ1aTAUSVxChux8HJ6gKc0txYVba729NWDIgOhMhENUmELqdMsrduKQFSCU5JOlq2XCu1Gm0yoSy04MKipWN8Si3WUxi5ONsipi6gIHflwOcIiJOPokQacUGTOEkKrfN3oytbRPG7HLnyo7fFGEH9d2Kl2yT2SHVb3wIOwCDxo7Fg4a+6u8sR0YW+/Y8k18fLJ2ZdcppkIPmH2vO6wPCSPtm63M8hPrKQglJPGSpAcWxG42mKB8sAD56adfgH78DtymrL9eUFj0p2P/JTWnD1CIo0JW48X5yYh0WwBH4LjJEynMaHCSo+IAxE5R4Vgp1mYEwp5M0hj0q9ReW8v7DUjeLvwRkLwduNgZFqgnzf69BuWNzuCtyNwFOoVvB2ILoHbk7fzjlHTVx00aC1O5dSevl50tMvOm2vwLJkGB/Zpgo0RB/aJD7ftN2xOCLbAnvmoBFbS9AWZNAP848SyOxfHvrp3cW7a6RewD79jWcLy+FJ8WbJRTt9J0EMiaWQ71CrJtxY97IjiEyupRJsBaliZCGxmZSLGhqTFZcpul1/APvyOtBkGWrM2u0mB2IbNbgrvComGq+ftloY+27STs5hYSjnydqGhd8Rm1CRz7Bw1y5xbdvgl7O23k9qxoTIzs6j4/JK28aVYsqFxje8ORreitCxwbMlquX/CQcCofBtkNIshyUkB1byPCuGdB1LLrXTPSVWuUb9wVcS+R0WlxV3ljh0NlAfeUufgsGJd1iKT7RRYVLc3rPKIlZQ8V4yaz2HOwSGx1YqjNTYkrcHGDntXmaVhb7+fScpY0txJyljyKFEYyyElEkPSLoQl5x1ln+vCTjFB5Cj7XNz5D8eSZ5FjXzyMnFt2+CXs7Xfc7pZv0VR56JoBBgKcpXW0lzk/6Zak2z1lt59LLLCS2l1gm5BD2ndgi16wY0u6zwBlp1/APvz2W8RozpbHElgCa6RAu4l0rNrhpvEoZz8HZW0trAvXA3AQMCpvEVNMCwgAV6zNDUeFwFuEZGV9unvA3b4GNepZ/M+kJaJr0J+sojRtonVZtXccJV3Gp9BRdssDcCylFFsJaAa6mxE70NGMY0N65wGObVNoh1/C3n7H3zKwNVFXWWmaJSidHNRmm5VTt12Ny5OSb4tW2PEOE5ZS9VRNaVC3LayR5PvYyVM1NTft9IvY22+9RXDLDWs98XFrqlpnnxt0NHR72bb2h6SDw5OGQHts2tiyu/vY7/dmM4FjAdi+EcnG2JB0WHzmlp1+AfvwO1YqNkIXQ4VrLDnPbqtmtzOPII4vkPQGXsvtGfEbYiV18VS4puIYgVh75fvYxcsdNTft9IvY2++geUUeN59cUthvdyhXkRNejY+rLwna5SW3gtOUOApeMy2FpeATV6wqmqMWr5nmnLTSm0TyrXyNSj4jK1psCpBIYZ11SUSerAEvKcohcD/L8shiiRcjcBSac+xTYW0mhCu2veOoxTn2OSes9Aa429eobrFMg+YkOtJ0e3GiarXMCcpsO/mmpCv3PNxlRx8aYSk5ZZprKii1ibUdiI9doss056a9KkvCsLffUZLXUD9QvSSvWYgmW6x44wy5ML+sSdJu22oCaK+qZM89pOYPH2kq3mlF1QXtGrtc7eRZrN6qO2XIh8vcA6L9Uh1qHy2FfVmLuzz7Hk8VdpdguzVU0NLaQYIPXBcjvtpHU2FfsXD2nWrUqvbRmhPWrO4nsz59Dcb2hOTlobMqZ63eOLnL4OtOIDGxVOdoolzIiA17cbbsXUKKJsrUkFKR2LpwKsimPCs66S51ny3J/RId4+23bg4kW88WrwxqBh77SNSeU6+E2SXpFZVm2JEELiylFq8MaipeGcQWUPZw7OKvDM1d9EqpgX347UcLA8dlPKaWottmHlwWJ0ppbB9pSOATpS63VicPrS60r0g4ihVOCJetFJWjZp1Oa05TyBvDPXz1coPFGEBRuYF1HLAAxqEjQa1PNS7uMiTwed6XW7sz/DYJxeMeUkz2s+r4s7uPWjzowTlppXuT/bPWNapojCzi2zw9Q5puO6EMvrDK3O2h2LLSMzL4xmQHF5mwlJqnZ0hT1SMhIWlvX2PnKLbk3LTTL2Jvv7UonEgIa2fr+XFrhj2az+2Fc8+TMVtxggRJuzpj7If93NqBldQ81iNN1Y5xY0fZr7GLx3o0N+30C9iH30o1WbYd7nYXfdwaKzM+ySE8iDnR5J51SKN79uQPlrBXnJUDKynuWWksgUzYhlgvx24RC+bctMsvYB9++x1uvO1dwRspjJz3kJOz3tKIN2uSwDt8FLdWHDwYTkL3654KSz4SzvYqGtW3MprTFPLGcA9fdYvgPLR3/ymkGQiN4Sy1WwZMzlvlkvopkLone2EhGLCSeqy4syof9wxsQVhte+VshBBXDzv9AvbhdwRsFj6xImCz8KlMtq6ODTZecmVK8oDNDrtdv8JKii6J0hTQJhCbQanAsZ9dErvb5RewD7+jUuqs/ueOEgpoFqrmM1qpLrQDymgGB8kDqivsaAknLCSMrYMP0yy0KAV2omqeY0PyY4vmdnkK7MPvyHwd+Da2HsNJ32ZhXwVkH1bWhk9J8q7usCPsLSylx4O1IT1xVMd+3s49xoakv8UWPlulQePC3n5H2UFHEbO4D6Sx1mFW5IpAt33TCVsebzpmZZsl7DjsI1aS9x1zTdYvUXCunq+xvfWYzw27/AL24XeUg0y+ZtS2JCmharKHMF+PyxbfOUtSzIj9FycqzfuF7ernV6PJSecrbgQ2o9KcY+doW8K5aU9K60rjK7/jnKHiNdOynzNUFDQZAdBU2O/siE9235akhV3Obj/1y4GV1ERP5pqKJSaxKIXU2MXbD2hu2ukXsA+/o1sDyRyLd2tIthxf1uJCdI22AkpJAtdHtbi1II1KYdXmo/Lt05KSBIljszaMGs3aOCcU9KZ664ZrVIU5eczhuRnUMDcD2R8duRekK+iRm5EwpuyYu3tex/Cxdc5pGs+vGFgrrGvsKzeDc9NOv4i9/b6Ye5EtpO5R0hQQjPDRVEUwQlIOPSoL9jeyYyckLKXkIRpqzsMoOZbdmjj21c2Jc8sOv4S9/b6qJFFk6cdX1PD4yjqGWKYlHn6zSfLz5xF21JcRK+k6vqIGR1DC4nhKY1/HV5zbj7dqYB9+R/FtwxZe9UbSoMlALuJBanjM8khCxRuZ3XNoH+KRryOk5nmb0rAFsnfeGdfY2fM2NXdWCLJd2NtvT25oYGdk3nW0dD5tVNj5GW2U2Be6RaUZ20Y3VJp5k+myQsqedC1NUmXDwYKWgUND4El9z26lS+jBdDscwcKEgLCWkdJkLQVZm2jLxKL9qi8jK7JbaW+qezQspfQoUUIcZ0/HntVijA1Ji05jl6Qdfgl7+63dCWv9LMb9cWumlcc0VkEuy9tt6OcOCTuIYdlisqM7vLCURqS2U2NBdMc2K1HS2C3aFkYF5gi/iL399mMtnrIycEgFDlZX8VY78xxA8eyWUcPVkewJK8ICxA3ve8KPUmGFuMQVq8PlqBB4rKXeJdPdA+72NVIWreq9eZaJNB2ZIqiMO98amvOsLkk3bp5hRymQsJSivFWagiwTYjO4cjl2lLdqbtrpF7G330F1knDCp+Z90lgFgK2B6suJO5sn5Ue655xhHygSJJZSfZRQo4iQqzHDJnAGcewUJdScO4mPKF3Y228+slBjDUaMj0thHUs36rGbNXXf6MgD4Z1rzL6lsRIoR7oU5BvSDDzggEWmH4cO7g1OTCtdMuDD4XgdFuwFvBh6addGvi2WK+Uce4Fy5yTtHXbuWsjl5fuM62pJKJOv27Ftqh3hmJL0Oqzd7fJ0qWlyucb+8va3r3+3f99896UcUsNvfvy77759/erL21nGpdf938NuaKe1//X2j//0Sq/fvuXXX3/++/1btjXf37w1a0yRpwWYmFJp25Dx+o/fvWKyz38vfLZsHBPzs1YX8vnRf3j9YB597vfdp/fDuLg/9/z3f398/+HnXP/6Y/9T13/BnW/fvv3+8uenX4258VefwNf3//w6yxUY8B/I9rN83ibbVo/ff7z+5O/rn76+//3bX37///Ej/MJf8vgNnMnyJ/O1cogt5+cL9I/P93p1K1iqzZiaPi6FvW8+X2Wfe5XarFlX37B4K69hOZJUnOxax0ko/lEq7LifuLOR8FEhnI9yTlrHhXv4qhvgZ76Hn6P2/GPfQ17GXXN9Ea6xvyifPmJTf2xeGzb/LvI2sljZd7mxkkp8mhr7u4TFn6yx4xvR3LKPG/vwW1/K45K/bsH/xbV/Ogofb6ya5Vz6f/7xb//5h9/99vUXv/nDb+6b4P9wzhOW/dzMXJP++l9/+LNfmvgn/97+G7dJItxlbmRzdHJlYW0KZW5kb2JqCjMgMCBvYmoKPDwgL1R5cGUgL1BhZ2VzIC9LaWRzIFsgNyAwIFIgXSAvQ291bnQgMSAvTWVkaWFCb3ggWzAgMCAzNjAgMzYwXSA+PgplbmRvYmoKNCAwIG9iago8PAovUHJvY1NldCBbL1BERiAvVGV4dF0KL0ZvbnQgPDwvRjIgMTAgMCBSID4+Ci9FeHRHU3RhdGUgPDwgL0dTMSAxMSAwIFIgL0dTMiAxMiAwIFIgL0dTMjU3IDEzIDAgUiA+PgovQ29sb3JTcGFjZSA8PCAvc1JHQiA1IDAgUiA+Pgo+PgplbmRvYmoKNSAwIG9iagpbL0lDQ0Jhc2VkIDYgMCBSXQplbmRvYmoKNiAwIG9iago8PCAvQWx0ZXJuYXRlIC9EZXZpY2VSR0IgL04gMyAvTGVuZ3RoIDI1OTYgL0ZpbHRlciAvRmxhdGVEZWNvZGUgPj4Kc3RyZWFtCnicnZZ3VFPZFofPvTe9UJIQipTQa2hSAkgNvUiRLioxCRBKwJAAIjZEVHBEUZGmCDIo4ICjQ5GxIoqFAVGx6wQZRNRxcBQblklkrRnfvHnvzZvfH/d+a5+9z91n733WugCQ/IMFwkxYCYAMoVgU4efFiI2LZ2AHAQzwAANsAOBws7NCFvhGApkCfNiMbJkT+Be9ug4g+fsq0z+MwQD/n5S5WSIxAFCYjOfy+NlcGRfJOD1XnCW3T8mYtjRNzjBKziJZgjJWk3PyLFt89pllDznzMoQ8GctzzuJl8OTcJ+ONORK+jJFgGRfnCPi5Mr4mY4N0SYZAxm/ksRl8TjYAKJLcLuZzU2RsLWOSKDKCLeN5AOBIyV/w0i9YzM8Tyw/FzsxaLhIkp4gZJlxTho2TE4vhz89N54vFzDAON40j4jHYmRlZHOFyAGbP/FkUeW0ZsiI72Dg5ODBtLW2+KNR/Xfybkvd2ll6Ef+4ZRB/4w/ZXfpkNALCmZbXZ+odtaRUAXesBULv9h81gLwCKsr51Dn1xHrp8XlLE4ixnK6vc3FxLAZ9rKS/o7/qfDn9DX3zPUr7d7+VhePOTOJJ0MUNeN25meqZExMjO4nD5DOafh/gfB/51HhYR/CS+iC+URUTLpkwgTJa1W8gTiAWZQoZA+J+a+A/D/qTZuZaJ2vgR0JZYAqUhGkB+HgAoKhEgCXtkK9DvfQvGRwP5zYvRmZid+8+C/n1XuEz+yBYkf45jR0QyuBJRzuya/FoCNCAARUAD6kAb6AMTwAS2wBG4AA/gAwJBKIgEcWAx4IIUkAFEIBcUgLWgGJSCrWAnqAZ1oBE0gzZwGHSBY+A0OAcugctgBNwBUjAOnoAp8ArMQBCEhcgQFVKHdCBDyByyhViQG+QDBUMRUByUCCVDQkgCFUDroFKoHKqG6qFm6FvoKHQaugANQ7egUWgS+hV6ByMwCabBWrARbAWzYE84CI6EF8HJ8DI4Hy6Ct8CVcAN8EO6ET8OX4BFYCj+BpxGAEBE6ooswERbCRkKReCQJESGrkBKkAmlA2pAepB+5ikiRp8hbFAZFRTFQTJQLyh8VheKilqFWoTajqlEHUJ2oPtRV1ChqCvURTUZros3RzugAdCw6GZ2LLkZXoJvQHeiz6BH0OPoVBoOhY4wxjhh/TBwmFbMCsxmzG9OOOYUZxoxhprFYrDrWHOuKDcVysGJsMbYKexB7EnsFO459gyPidHC2OF9cPE6IK8RV4FpwJ3BXcBO4GbwS3hDvjA/F8/DL8WX4RnwPfgg/jp8hKBOMCa6ESEIqYS2hktBGOEu4S3hBJBL1iE7EcKKAuIZYSTxEPE8cJb4lUUhmJDYpgSQhbSHtJ50i3SK9IJPJRmQPcjxZTN5CbiafId8nv1GgKlgqBCjwFFYr1Ch0KlxReKaIVzRU9FRcrJivWKF4RHFI8akSXslIia3EUVqlVKN0VOmG0rQyVdlGOVQ5Q3mzcovyBeVHFCzFiOJD4VGKKPsoZyhjVISqT2VTudR11EbqWeo4DUMzpgXQUmmltG9og7QpFYqKnUq0Sp5KjcpxFSkdoRvRA+jp9DL6Yfp1+jtVLVVPVb7qJtU21Suqr9XmqHmo8dVK1NrVRtTeqTPUfdTT1Lepd6nf00BpmGmEa+Rq7NE4q/F0Dm2OyxzunJI5h+fc1oQ1zTQjNFdo7tMc0JzW0tby08rSqtI6o/VUm67toZ2qvUP7hPakDlXHTUegs0PnpM5jhgrDk5HOqGT0MaZ0NXX9dSW69bqDujN6xnpReoV67Xr39An6LP0k/R36vfpTBjoGIQYFBq0Gtw3xhizDFMNdhv2Gr42MjWKMNhh1GT0yVjMOMM43bjW+a0I2cTdZZtJgcs0UY8oyTTPdbXrZDDazN0sxqzEbMofNHcwF5rvNhy3QFk4WQosGixtMEtOTmcNsZY5a0i2DLQstuyyfWRlYxVtts+q3+mhtb51u3Wh9x4ZiE2hTaNNj86utmS3Xtsb22lzyXN+5q+d2z31uZ27Ht9tjd9Oeah9iv8G+1/6Dg6ODyKHNYdLRwDHRsdbxBovGCmNtZp13Qjt5Oa12Oub01tnBWex82PkXF6ZLmkuLy6N5xvP48xrnjbnquXJc612lbgy3RLe9blJ3XXeOe4P7Aw99D55Hk8eEp6lnqudBz2de1l4irw6v12xn9kr2KW/E28+7xHvQh+IT5VPtc99XzzfZt9V3ys/eb4XfKX+0f5D/Nv8bAVoB3IDmgKlAx8CVgX1BpKAFQdVBD4LNgkXBPSFwSGDI9pC78w3nC+d3hYLQgNDtoffCjMOWhX0fjgkPC68JfxhhE1EQ0b+AumDJgpYFryK9Issi70SZREmieqMVoxOim6Nfx3jHlMdIY61iV8ZeitOIE8R1x2Pjo+Ob4qcX+izcuXA8wT6hOOH6IuNFeYsuLNZYnL74+BLFJZwlRxLRiTGJLYnvOaGcBs700oCltUunuGzuLu4TngdvB2+S78ov508kuSaVJz1Kdk3enjyZ4p5SkfJUwBZUC56n+qfWpb5OC03bn/YpPSa9PQOXkZhxVEgRpgn7MrUz8zKHs8yzirOky5yX7Vw2JQoSNWVD2Yuyu8U02c/UgMREsl4ymuOWU5PzJjc690iecp4wb2C52fJNyyfyffO/XoFawV3RW6BbsLZgdKXnyvpV0Kqlq3pX668uWj2+xm/NgbWEtWlrfyi0LiwvfLkuZl1PkVbRmqKx9X7rW4sVikXFNza4bKjbiNoo2Di4ae6mqk0fS3glF0utSytK32/mbr74lc1XlV992pK0ZbDMoWzPVsxW4dbr29y3HShXLs8vH9sesr1zB2NHyY6XO5fsvFBhV1G3i7BLsktaGVzZXWVQtbXqfXVK9UiNV017rWbtptrXu3m7r+zx2NNWp1VXWvdur2DvzXq/+s4Go4aKfZh9OfseNkY39n/N+rq5SaOptOnDfuF+6YGIA33Njs3NLZotZa1wq6R18mDCwcvfeH/T3cZsq2+nt5ceAockhx5/m/jt9cNBh3uPsI60fWf4XW0HtaOkE+pc3jnVldIl7Y7rHj4aeLS3x6Wn43vL7/cf0z1Wc1zleNkJwomiE59O5p+cPpV16unp5NNjvUt675yJPXOtL7xv8GzQ2fPnfM+d6ffsP3ne9fyxC84Xjl5kXey65HCpc8B+oOMH+x86Bh0GO4cch7ovO13uGZ43fOKK+5XTV72vnrsWcO3SyPyR4etR12/eSLghvcm7+ehW+q3nt3Nuz9xZcxd9t+Se0r2K+5r3G340/bFd6iA9Puo9OvBgwYM7Y9yxJz9l//R+vOgh+WHFhM5E8yPbR8cmfScvP174ePxJ1pOZp8U/K/9c+8zk2Xe/ePwyMBU7Nf5c9PzTr5tfqL/Y/9LuZe902PT9VxmvZl6XvFF/c+At623/u5h3EzO577HvKz+Yfuj5GPTx7qeMT59+A/eE8/tlbmRzdHJlYW0KZW5kb2JqCjkgMCBvYmoKPDwKL1R5cGUgL0VuY29kaW5nIC9CYXNlRW5jb2RpbmcgL1dpbkFuc2lFbmNvZGluZwovRGlmZmVyZW5jZXMgWyA0NS9taW51cyA5Ni9xdW90ZWxlZnQKMTQ0L2RvdGxlc3NpIC9ncmF2ZSAvYWN1dGUgL2NpcmN1bWZsZXggL3RpbGRlIC9tYWNyb24gL2JyZXZlIC9kb3RhY2NlbnQKL2RpZXJlc2lzIC8ubm90ZGVmIC9yaW5nIC9jZWRpbGxhIC8ubm90ZGVmIC9odW5nYXJ1bWxhdXQgL29nb25layAvY2Fyb24gL3NwYWNlXQo+PgplbmRvYmoKMTAgMCBvYmoKPDwgL1R5cGUgL0ZvbnQgL1N1YnR5cGUgL1R5cGUxIC9OYW1lIC9GMiAvQmFzZUZvbnQgL0hlbHZldGljYQovRW5jb2RpbmcgOSAwIFIgPj4KZW5kb2JqCjExIDAgb2JqCjw8Ci9UeXBlIC9FeHRHU3RhdGUKL0NBIDAuNzAyID4+CmVuZG9iagoxMiAwIG9iago8PAovVHlwZSAvRXh0R1N0YXRlCi9DQSAxLjAwMCA+PgplbmRvYmoKMTMgMCBvYmoKPDwKL1R5cGUgL0V4dEdTdGF0ZQovY2EgMS4wMDAKPj4KZW5kb2JqCnhyZWYKMCAxNAowMDAwMDAwMDAwIDY1NTM1IGYgCjAwMDAwMDAwMjEgMDAwMDAgbiAKMDAwMDAwMDE2MyAwMDAwMCBuIAowMDAwMDYwNDc4IDAwMDAwIG4gCjAwMDAwNjA1NjEgMDAwMDAgbiAKMDAwMDA2MDcxMSAwMDAwMCBuIAowMDAwMDYwNzQ0IDAwMDAwIG4gCjAwMDAwMDAyMTIgMDAwMDAgbiAKMDAwMDAwMDI5MiAwMDAwMCBuIAowMDAwMDYzNDM5IDAwMDAwIG4gCjAwMDAwNjM2OTYgMDAwMDAgbiAKMDAwMDA2Mzc5MyAwMDAwMCBuIAowMDAwMDYzODQyIDAwMDAwIG4gCjAwMDAwNjM4OTEgMDAwMDAgbiAKdHJhaWxlcgo8PCAvU2l6ZSAxNCAvSW5mbyAxIDAgUiAvUm9vdCAyIDAgUiA+PgpzdGFydHhyZWYKNjM5NDAKJSVFT0YK" style="display: block; margin: auto;" /></p>
+<p>The scatterplots show that there is a very small relation between V1 and the weighted sum scores. Furthermore, the relation between V2 and the weighted sum scores is very strong, meaning that a case’s value on V2 is very important in the generation of the weighted sum score. Actually, this is what causes the differences between the amputed and non-amputed data in the boxplots above. For V3 and the weighted sum scores, the relation is a bit weaker than for V2 but more present than for V1.</p>
+</div>
+</div>
+<div id="continuous" class="section level3">
+<h3>7. Continuous</h3>
+<p>As a default, <code>ampute()</code> creates continuous missingness. This means that logit probability functions are used to define a candidate’s probability of having missing values. The type of continuous amputation can be decided under <code>type</code>. A more thorough explanation of how the logit functions work will be given in part 8 of this vignette.</p>
+<p>Instead of using continuous formulas to specify the missingness probabilities, these probabilities can also be defined by hand. Thereto, the argument <code>cont</code> should be set to <code>FALSE</code>. The <code>odds</code> argument can be used to define the probabilities (see part 9).</p>
+</div>
+<div id="type" class="section level3">
+<h3>8. Type</h3>
+<div class="figure" style="text-align: center">
+<img src="data:application/pdf;base64,JVBERi0xLjQKJYHigeOBz4HTXHIKMSAwIG9iago8PAovQ3JlYXRpb25EYXRlIChEOjIwMTcwMjE4MjE0MTM2KQovTW9kRGF0ZSAoRDoyMDE3MDIxODIxNDEzNikKL1RpdGxlIChSIEdyYXBoaWNzIE91dHB1dCkKL1Byb2R1Y2VyIChSIDMuMy4yKQovQ3JlYXRvciAoUikKPj4KZW5kb2JqCjIgMCBvYmoKPDwgL1R5cGUgL0NhdGFsb2cgL1BhZ2VzIDMgMCBSID4+CmVuZG9iago3IDAgb2JqCjw8IC9UeXBlIC9QYWdlIC9QYXJlbnQgMyAwIFIgL0NvbnRlbnRzIDggMCBSIC9SZXNvdXJjZXMgNCAwIFIgPj4KZW5kb2JqCjggMCBvYmoKPDwKL0xlbmd0aCAxMjY3OSAvRmlsdGVyIC9GbGF0ZURlY29kZQo+PgpzdHJlYW0KeJyt3UuvdGdxhuH5/hU9tAc063wYBgIEC1DAn5QBYsAxsWWDsIlQ8utTVc9dz9s2IPkLHthxsffuXr16rXoP60rV/PjoMT8+ffz57ecv/3zv3dt3v/zFj773+O2Xb9NzmqbH67+//O0f3777wyX+7t0fHvPy5Af6l+L7ek4b//3u88cvP/j4L7/+4+9+/cXvPvnfDx/z/vjg9797/DX+a4r/+uQ//+svEX7535/HK//pi99/+eGvHu8+evvBu/c9lJf3/87LYc3b84jf2I/nWgfzwb9/8aff/Po3n3z2yV/+58PHu0/7nV7+eezzc18e+/S8psdy3s/tfCzHma/2xe8f//H4o39Zx/b9j//OsX38/Z/F/3ruj7++/fJXj+nxu7f58VH88+nbXMf107fjeh7XY53PfJvPH4TLmm/32ePj+L37uW/jFzp++Y04xG16+Q3il9+45+dyvPwG8fiNZV2e8zJ+o+OX3ziX532+/Abx+I11Xp/XOn6j4/Eb38oJ42vZnvcab7Ltz2snyrfQT+fpyNPYPyZ8+fl+Pbfx54Tj50u82Tz+nvDl58f8+vaE4+f50V/enzB//j531fS1u6r+vRzP5Y7/Xp/TXVfy9Fz6Cs4X/0Z/Hefr2vjr7X3/eomzufd7H+/913Gu137v6+v33rdwK+mG7TspvoB5fb2R+seELz/XbeOfK3z5uW4a/1zh+Dm3TP+c8OXnumH8c4Xj59wu/XPC8fN/+so54g0zteS3kKf/O+s3/+7yeru21z9+j4tu3rbnOb3+8fwef3zFvfl62NN7XHHLndfa+Nv3eN/ljHv+fvnb9/jA6zw/p/3lb32m13V63rez17pGYjpe0hc/d/7iF14SWP9GZ7D+jZHC+A3nMH7jJYn1b3QW698YaYzfcB7jN14S2TceJb+N0XGan9v8+PztuDPrZRgn9rMM96nC+VR4zxXGyf/sLb7ANVLxNNWHyvBcK7zmDOOPtgqPW+GucD8U3nuF25bh8lyPCtdZ4XlWONffrnliM5wOhZEel/vmfbe6nCKMM1ThpvA4FcbhZLjXL+/PZalwmxQea4VLvfKRM6oM51XhFoNPzLPuW+F1VHjVxz/zjzI8Z4Xxhhnu9b4xObsq3BaF213hcim8pwr1Rnd+7uU+eaP7eS4VXnlyrikTXYZ1JiPc1wp3fnpvFa710/m57hUuq8LzqHDK972W/CaX+3jei8L9qvA8FN4Kj/xE15ovmeG2K8xLMML6CNf2XOYK50XhkQe5P+96qf05rRWet8Jtq/BYFF4Kt/rleMm9wrrqLt0sEc51GHHsecxbfs4Kt6vC81R43RXu9bdXTkAz3GaFp0KdjTtfMsO6gCPMucYdH+xUeK8V1nm+p8xtGe6TwnOvsC7RGJ3mo8L6BiPcM1x0kBHeZ4VnhXF5XxXuu8LzrnDNjx+vsUwVzoRHHuSsM5kHu1R4Em4Kd8JrrVAvFadwq3DeFR55zFPebBEeeQNlqKM6Kpnck26NCK+rwjW/o7yCFM6TwjgrS5yjq07Olf9zhnWX5VU/V1iXSt4xS4V12uN+WtcKp1lhvP+S301eSHPe5orrI2UcpynjdSWOM5FxHckc+WeN485v/iSOF8r42CpeMm1kvE3Ex1TxrNdfK2HEZXavxNtc8XERX0vFm16vrp6Ml4n4yOPddVbnac/LKeNzIt6Oirf++aWYv48XyuPngmbsybiuu3k6MwlnvK3E+1TxfBLfebxr/p+Mr/zGMubzX5U+8vbV56l0lvE8E+95/IvSS8b3XrHOf4wN61Fx3Y4Zn2fF9fXNMfjOebxz5nvFmY8j1ueN+Fas441lYmbkSFTXRZwpOeKjzkeMeZmTL5J/xpmUI+b9tsrKyoqKMy3nWNjxpXjW8eyVmCPHXh1nZo541+8flZojXjrO3HyenM+IMzlnQtfxnZWdM9/fxGfGR2bLjK/Kz2elLcWZoCNeN+LM0Dm46P3uStFnXy8RZ46OeK3ztUyVpM9dWSrjPeONzx9xpumI9f0uc+Xpc+vfnzVXWDUwzctSmTpiXn+pVB3xVOdnqf/I+bKuv1xPKtbxLzU1Xc5Zo9O8bJWuI9b1FnHm65NJw7zslbBP5gUZZ8aOeL+IM2VHrPPPuiVmF9dOnEk74k2vd1bWjnheiGuJeGVCVpx5O2LORy2AMp4m4szcMWk69Pd3ZseMl404c/dRw7viTN4Rb/V6MVXL7B3xdBNn+j76+1vnyt8R6/qNOBP4sXE9rXXjZKzrL+JM4RHPHWcOP1a+33WtJH6s/XprZfFcXuj9tkrjEe8d16Rw0Rif8XXWZLNy87zulckjXnbiTOXHxP0RU8/M5RFvM3Em8/3m+15rtpCx8sN6Vjrf+36L+Fxr3cn5uCqfR7wcxJnP97Pf76p8vjNjmde78vl+kE8jznwesT7fVtPAjGv6l3Hmm33XNGXe5srnESu/bzWZXfaN44k483nE+r63pfL5vmpuknHm84hr4Ju3tfL5vnA9RLwp1vFGnPk8Jua3fn+rfL53/os48/k+kR9iiZn5PGI+z175PGLlg4gzn2+3JnTzdlS+iZjPe1Q+35hZzttZ+TxiXY9bzQSX/D8dZz7PX9P7XZXPt6PP11X5PGKNB/FGmW82n8+7ZoW5Mp6IM5/nx6pYC/eM9f57zfiXOC26v+NEZD7P03gSZz7fmP3McSInxdNGnJPDbeb+yBO/V6z7N76YzOfxtW8ncebz9eZ6iS828/na40HEmc/jMrtu4ktxzZHmuFByjhiX7bUQZz5fT01scxMz83lc9udGnPl87fE/L9Q43ryN9Hpn5fOV+WrGmW/iNtT9EjdCThXztp2JM5/Hbb31zzOfRxpQvogbK/N5xOtOnPk80oqu17hRM59n2lmJM99EWtL9Hjd6zhhXZm4ZZz5f+vqKOPN5pMVbv79UPo9Y86WIM58vfX6O+iIzVv44ar9xiTTN+601cVw6P0Ziy3weaX6fiTOfLxvjwVEnKmN9vogzn8cwUzPcjDOfR6z5QyTezDfLwvV11BezLD0eRSLPfB4xx39WPl9YiGac+Xyp05ZxDRRLDLtHx5nPZ6ancw40GV/kw4hz/pjbrhWfNTHJWNdDxJnPY9pwdJz5PKYdOr4cGLeKNT7lwJl7nqxg5hhoJ8XKXxHn/DGmQbpfIs58HtMmnb8YuDOfR6x8ddaCZYlpl/JdTAQyn+ceyUWc+TymcbrezhqYlpj2af6XE4+lYo3HOTGJ449ppPJJTFwyn08n10vEmc8j1vwgJ0JH7Vpq/IqJUubzqa+HiDPfTHu//1Xzx2ljPDjrjTLmfN6Vz2MarnyXE708Xn/+u/J5xGv9fkwUM5/HMkD3Y04sFWt+ExPRnD/m5sJNHIl6vm+ut4gjn2es8TgnvmfEF+N/xJHP516Oz1dtDWes4414y/jgfs+J+RTxzvgQE/fI5xkvJ3GcqDmWboeOr7Yg51j36XqJOG7UjHV/aKEx56pR73dkIstY48NVy/fcL9X1mgudPP6J6yvi/aqYz1fbDHMu1vT56sbP/6PvI/9jrnjWz+vCqJfZiPNZT7yt8mu8cJzojDW+3rWpk4et+yHifAaQ6536PNrYrdMyEUciydOm7++uiUyd5pl4y5jlcsZXHv/M9ZYnaqpY481dE9+8DDQe3DXRystG683cK1gr1vxFOwuztmgy3vPCzstW33duYuwV6/vOLY84ft0GiuNCzdtG+fuuhUHGmv9oayZvO80/73p+k7et5ge5KaRY692IIzHNno/HhTktD9KE4i2Pv7/vu27kTDv1feeFvuwV1+fLODcwez5dN0bG7GNlHPk847r/M458Xmn0qrgWgpl2a72acVyIlZbnimthmWn7OInzEVDE00Z8Z8yeTN7o8UFz2Dgv4sjnGc86nj3/I4ehfSHe83hnXW8Z32fFdX4z0ax5vJPWI5WIFE96vzPzOcOq4rgwc9jlfF35izVM78RbPsI6tS+ScdwYNezr9e680DNebuIj4137B5lop73iuj9JvDUt2Ykjn+c0pq6vTNSRz2uasxIfebyLrpdM9PNUsT7PXBP/nFbVeFcDw1zPUy7FNZHNeOk48nlO4w7FW+bzjKeO40LOaeHWceTznEbyenvlm4iXmThO3NzzyRz4IlFkPC3Ekc9zWrvp85z9kELXW8RxIdS0+SCOfJ7Tas5fXYg1Db+Jjzz+RfOJGqjz+Geux7l2nTJeD+LM5zFf1PWVA/9ZsY4/4szn6831stRAmXHlj5pIxPGvF++XE404/pgf6v1iIpL5PJdBF3Hm85gf1nypJi5rxfp8EWc+X1kvZnwr1vWmiVAu22q8zTjz+bpx/8REKvP5ykZkTazyeBfl04wzn+eyUsd7VD5fZ61fMr4UV36piVwe/6T5ZMaZz9dJ87ucCGY+X9hvqYnhVvF8E2c+j/9z6PVr9zxj5ZuIM9/ky9bxxAvHic1Y32fEmc+XQ+N7xpnPc/5Y758HmsZg13hTE9+54hrPefCX2w7KD2sliox1f6w1UchtC52vOHGZz5eV6z3izOfL0j+viVfGU8eZz+Nr1/cfcebzvEwU10SutmUW4vOumOOrhUJu6+w7cebzmfVcLjQyn+c20UWc+Xxmf7MWJnG8cVscer2r8s18cr1EHPPH3KbS/bLWC2es63uth0S57XXuxJnP513rm1xIZT7PbbOFOPN5xLp/4kbKfDOzv1gLs7li5a+tFr4Z63zFjZn5fGZ9l3Hmc6WtjCux57agrpdcKB4Va7yJOPPN3PdrJIb1rLjmlxlnPp/uPp698vnE/KUWrlPFun4yEcXxRtpW/ow48/l0kQ+3ulFzG1X5f6tnJRnz+WsjObdldb/nQlvGQd93Jko9Mpxn4sznU9/fkVgzn0+75jcZZ76ZNsavXPjfFW8dZz6fWE/XxsFcT4QPxXPl82nl9fbaeM1tbZ2PGBgyn089Xka8K9b9uFeiqG3yOj+50XFUrM+bGyF5/OxX5EZJ5vNp4v7dKzFlrPEpB7bpcd+klwi3Cvk0e84eezKduzbxLedDsoMwLuoINRTHGBs57r64cyKMS+w+mUjkjtGR4aqXujKP5+zqJDwq5CjvzOL3oUl2hnE8PQevzawpQ91yR+0154x8JYxUl/PAOsExs4gzd7N+z3CvUJfrUeNOPjSqj3DUMv1e+5eX/KR3j+VHLWLv/qqO2iPJ50A3YWTue+GYY4YUp+WeyesRRt6+Z9JAzKfi/r5nzsZRz9LuTkq5OxkHOXENHvXw4mbJU3ube4aTPn4t5S8mxLUzejx6PVAbp2eGc4fxv19Xf976j+vqj3DnVanHbgojV18XR5Vz0AhPRpKzUmY+mNkII1H3c5ncQI4bPpcVJ2Fcrxer6tyOjl/Ltc9CGEn6OhgjhT2unVv6rGcf106GP2ur7+qv+6yVZq5HTsK4hC62C2vffcmQg6xpzLVxNiKMyeC1cl2dtejppUs9A9gz1EgcS4bIzPng5SCMxHz1xZALjCtD/vbKtHz1KB7hUeGsg7wzm15zv++dOTlCDQERxv+eC9s65nyUsmaoAeGqB375oLhe6qqngxdPATPcK9Rod9Vzx1xT1yvnquvMULk1wrhmtALPcM1UfPbMMs/DlKEmRleNyHnkB2F8tPMirV41/pwX14a+nbMnXbl63B46JxnW5EAP1RVGCj55ArjomjlPzmRcUUuFW4dxlk62r/I5YuTZ/Go6jIvkPJicRhjfjr7HDO+83k4egWcYqfc8eKm7llgnG9P1JDWOeScx6rHr2csiPaM9d+6yfKB7ZqgPmE9/rww1pihF5E7NQnhXqK8s0kuk3LMTVOaiOcNVb1SZ6mQ7ZdE+w7kxO79rWXb24uOup5Tn2gdZnu5cSeZ3zWFPdsZLBpwZaiIiVXAujBsRxl/lbtVCGOk0V7H65StTbu5t3YRnhbxyjRcnj8DhGmfPyJJ6xDHPOuZiInuGNT5mGCn3nLVcQ6ucs85GhnuFlb0zjKM92StYp9rUz0S0EEbK7ZX0GkNu3EERHgth/MfJPvSaA/aa4boSbhVWosgwjjb3CnXMe14zx60hJsO4Vg+2oNbcKzsz5I3q0dNBQs4wUu5xaz9onepBZIR1d2cYieu4dWusMc2JS+jgLsswUu5xae8yw0i5Uj8Zlt86Ls3cMoyUe2BW1gRNFdYlmmFcbxFWRsow8slx8QFjOhd3fe61LoSRcg/WkGtMBuNqPBjZM4yUmzsM9b5zbfUcpxaMGcYBHIz7QL2D7ZePLZoetW+dk3nZJn0qJaOmTJ2pJJk6jQkydY6TY+oEKMbU2VGKqVOnEFPnVRmmTroiTJ2RJZg6XQswdS6XX+pEL77Uo4D0Ug8Rwks9fsgu9eAiutQjj+RSD0vKVz1myS31gCa21KOd1FIPhcqvPU5qQ6wHUZGlHmEllnr41aP5HpvllXrgFlfqUV1aqYd8YaWeD8gq9WRBZ6tnEpJKPc0QVOo5iJxST1DElHr2IqXUUxshpZ73yCj1pEhEqWdMEko9nRJQ6rmWfFJPxMSTepYmndRTOOGknt/p6HvyJ5rUM0PJpJ42Cib1nFIuqSecYkk9G5VK6qmqUFLPY2WEepIrktQzYImknh4LJPXcWR6pJ9biSD3rlkbqKbkwUs/XZZF6Mi+K1DN9SaReBggi9RpBDqkXEGJIvbqQQvLaQwrJSxMpJK9cpJC8sJFC8rpHCsnLIikkr5pQSF5VoZC86kIheVWGQvKqDYXkVR0Kyas+FJJXhSgkrxpRSF5VopC86kQheVWKQvKqFYXkVS0KyateFJJXxSgkr5pRSF5Vo5C86kYheVWOQvKqHYXkVT0Kyat+FJJ3BVBI3jVAIXlXAYXkXQcUknclUEjetUAheVcDheRdDxSSd0VQSN41QSF5VwWF5F0XFJJ3ZVBI3rVBIXlXB4XkXR8UkneFUEjeNUIheVcJheRdJxSSd6VQSN61QiF5VwuF5F0vFJJ3xVBI3jVDIXlXDYXkXTcUknflUEjetUMheVcPheRdPxSSdwVRSN41RCF5VxGF5F1HFJJ3JVFI3rVEIXlXE4XkXU8UkndFUUjeNUUheVcVheRdVxSSd2VRSN61RSF5VxeF5F1fFJJ3hVFI3jVGIXlXGYXkXWcUknel+aDetUYheVcbheRdbxSSd8VRSN41RyF5Vx2F5F13FJJ35VFI3rVHIXlXH4XkXX8Ukp8KoJD81ACF5KcKKCQ/dUAh+akECslPLVBIfqqBQvJTDxSSn4qgkPzUBIXkpyooJD91QSH5qQwKyU9tUEh+qoNC8lMfFJKfCqGQ/NQIheSnSigkP3VCIfmpFArJT61QSH6qhULyUy8Ukp+KoZD81AyF5KdqKCQ/dUMh+akcCslP7VBIfqqHQvJTPxSSnwqikPzUEIXkp4ooJD91RCH5qSQKyU8tUUh+qolC8lNPFJKfiqKQ/NQUhTSeqkohjaeuUkjjqawU0nhqK4U0nupKIY2nvlJI46mwFNJ4aiyFNJ4qSyGNp85SSOOptBTSeGothTSeakshjafeUkjjqbgU0nhqLoU0nqrrwhlP3aWQxlN5KaTx1F4KaTzVl0IaT/2lkIYKkEIaakAKaagCKaShDqSQhkqQQhpqQQppqAYppKEepJCGipBCGmpCCmmoCimkoS6kkIbKkEIaakMKaagOKaShPqSQhgqRQhpqRAppqBIppKFOpJCGSpFCGmpFCmmoFhSS1QsKySoGhWQ1g0KyqkEhDXUjhTRUjhTSUDtSSEP1SCEN9SOFNFQQCslqCIVkVYRCelFHpZBeVFIpJKslFJJVkxTSUE9SSENFSSENNSWFNFSVFNL8oo5SIQ2VJYVktYVCsupCIVl9oZCswqSQhhqTQhqqTAppqDMppKHSpJCGWpNCGqpNCmmoNymkoeKkkIaak0Iaqk4Kaag7KaSh8qSQhtqTQhqqTwppqD8ppKECpZCGGpRCGqpQCmmoQymkoRKlkIZalEIaqlEKaahHKaShIqWQhpqUQnr5eSmkl78vhfTy+qWQXt6/Forj+KSQxvFLIY3PJ4U0Pr8U0jg/Ukjj/EkhjfMrhTTOvxTS+H6kkMb3J4U0vl8ppPH9SyGN60MKaVw/Ukjj+pJCGtefFJKvTxSSr18Ukq9vFJKvfxSS7w8Uku8fFJLvLxSS7z8Uku9PFJLvXxSS728Uku9/FJLzAwrJ+QOF5PyCQnL+QSE5P6GQnL9QSM5vKCTnPxSS8yMKyfkTheT8ikJy/kUhOT+jkJy/+SDO7ygk538UkscHFJLHj1ZIPb60QvKDXhRSj0+tkHr8aoXU41srpB7/WiH5iS0KqcfPVkg9vrZC6vG3FVKPz62QevxuhdTjeyukHv9bIfX8oBVSzx9aIfkpKQqp5x+tkHp+0gqp5y+tkHp+0wqp5z+tkHp+1Aqp50+tkHp+1QrJjx5RSD0/a4XU87dWSD2/a4XU879WSD0/bIXU88dWSD2/bIXU889WSD0/bYXU89dWSD2/bYXU899WSD0/boXU8+dWSD2/boXU8+9WSD0/b4XU8/dWSD2/b4VkNYlCsppEIVlNopCsJlFIVpMoJKtJFJLVJArJahKFZDWJQrKaRCFZTaKQrCZRSFaTKCSrSRSS1SQKyWoShWQ1iUKymkQhWU2ikKwmUUhWkygkq0kUktUkCslqEoVkNYlCsppEIVlNopCsJlFIVpMoJKtJFJLVJArJahKFZDWJQrKaRCFZTaKQrCZRSFaTKCSrSRSS1SQKyWoShWQ1iUKymkQhWU2ikKwmUUhWkygkq0kUktUkCslqEoVkNYlCsppEIVlNopCsJlFIVpMoJKtJFJLVJArJahKFZDWJQrKaRCFZTaKQrCalkIaaFEMaalIOaahJQaShJiWRhpoURRpqUhZpqElhpKEmpZGGmhRHGmpSHmmoSYGkoSYlkoaaFEkaalImaahJoaShJqWShpoUSxpqUi5pqEnBpKEmJZOGmhRNGmpSNmmoSeGkoSalk4aaFE8aalI+aahJAaWhJiWUhpoUURpqUkZpqEkhpaEmpZSGmhRTGmpSTmmoSUGloSYllYaaFFUaalJWaahJYaWhJqWVhpoUVxpqUpZhqEmBpaEmJZaGmhRZGmpSZmmoSXmOoSalloaaFFsaalJuaahJwaWhJiWXhpoUeRlqUnZpqEnhpaEmpZeGmhTVGWpSfmmoSQGmoSYlmIaaFGEaalKGaahJPZEfalKKaahJMaahJuWYhpoUZBpqUpJpqElRpqEmZZmGmhRmGmpSmmmoSXGmoSb1FH2oSYEmq0mBJqtJgSZPpvW43GpSoMlqUqDJalKgyWpSoMlqUqDJalKgyWpSoMlqUqDJc3CBJqtJgSarSYEmq0mBJqtJgSarST32tpoUaLKaFGiymhRosprUi1hNaglgNSnQZDUp0GQ1KdBkNSnQZDUp0GQ1KdBkNSnQZDUp0GQ1KdDk9YBAk9WkvkqrSYEmq0mBpuYMgKa2DoCmhhCAplYSgKYmFICm9hWApsYXgKaWGYCmZhuApjYdgKYGH4Cm1iCApqYigKZ2JICmRiaAphYogKbmKYCmXroAmhq2AJpavQCamsQAmtrLAJoa0wCaWtoAmprhAJra6ACaGvAAmlr3AJqa/gCa2gUBmhoNAZpaFAGamhsBmtoiAZpaTb6AJhW3in+9gibBpwZNraIEmppMCTS1pxJoamwl0NQSS6CpmZZAUxsugaYGXgJNrb8EmpqGCTS1GxNoalQm0NTiTKCpOZpAU1s1gaaGbAJNrdwEmprACTS1jxNoajwn0NSyTqCp2Z1AU5s8rVUb7Ak0teYTaGrqJ9DUa0OBpkaCAk0tCAWamhcKNLU9FGhqmKiLstWiQFOTRoGm9o4CTY0hBZpaSgo0NaMUaGpjKdDUAFOgqXWmQFPTTYGmdp0CTY0+BZpahAo0NRcVaGpLqvzV0FSgqRWqQFMTVYGm9qsCTY1bBZpavgo0NYsVaGozK9DUoFagqbWtQFNTXIGmdroCTY14BZpa+Ao0Nf8VaGobLNDUcFigqVWxQFOTY4Gm9sgCTY2VBZpaMgs0NXOWZ2oDLc7UQFqaqfW0MFPTalmmziCiTJ1ekEydfIBMnZpwTJ24YEyd1lBMnfRATJ0SMUydMCFMnU4RTJ1sAUydivFLnajhS53G0UuX8VXtevYQgF3qAQK65CePkks9uACXeujBLfXABFvqYQu11IMaaKmHPMxSD4iQpR4uEUs9mAKWeqjFK/VADFfqYRqt5JJUwko9xGOVegIAVerpAVKpJw9ApZ5a4JR64gFT6mkJSskPSYWUekqDUeoJD0Spp0MIpZ4sAZTur/qknmjBk3oahk7qSRo4qadw2KSe4EGTevqHTOrJITCpp464pJ5YwpJ62olK6kkpKKmnrJikntBCknq6i0jyA1uBpJ4q45F6Ig1H6mk2Gqkn4WCknqJjkXoCD0Xq6T0SqSf/QCQ/55VDul+KIyUVvVs1SSH1qqMVUq9KWiH1qqUVUq9qWiH1qqcVUq+KWiFZTaKQrCZRSFaTKCSrSRSS1SQKyWoShWQ1iUKymkQhWU2ikKwmUUhWkygkq0kUktUkCslqEoVkNYlCsppEIVlNopCsJlFIVpMoJKtJFJLVJArJahKFZDWJQrKaRCFZTaKQrCZRSFaTKCSrSRSS1SQKyWoShWQ1iUKymkQhWU2ikKwmUUhWkygkq0kUktUkCslqEoU0v9Q+WucXNYlCsppEIVlNopCsJlFIVpMoJKtJFJLVJArJahKFZDWJQrKaRCFZTaKQrCZRSFaTKCSrSRSS1SQKyWoShWQ1iUKymkQhWU2ikKwmUUhWkygkq0kUktUkCslqEoVkNYlCsppEIVlNopCsJlFIVpMoJKtJFJLVJArJahKFZDWJQrKaRCFZTaKQrCZRSFaTKCSrSRSS1SQKyWoShWQ1iUKymkQhWU2ikKwmUUhWkygkq0kUktUkCslqEoVkNYlCsppEIVlNopCsJlFIVpMoJKtJFJLVJArJahKFZDWJQrKaRCFZTaKQrCalkIaalEIaalIKaahJPa4balIKaahJKaShJqWQhpqUQhpqUgppqEkppKEmpZCGmpRCGmpSCmmoSSmkoSb1OHOoSSmkoSalkIaalEIaalIKaahJKaShJqWQhpqUQhpqUpP+oSalkIaalEIaalIKaahJaiFZTVILyWqSWkhWk9RCspqkFpLVJLWQrCaphWQ1SS0kq0lqIVlNUgvJapJaSFaT1EKymqQWktUktZCsJqmFZDVJLSSrSWohWU1SC8lqsmshtZrsWkitJrsWkmsRUQvJtYqoheRaRtRCcq2jf1ALybWSlq+oANdCcq0laiG5FhO1kFpNdi2kVpPUQrKapBaSFwTUQrKapBaS1SS1kKwmqYVkNUktJKtJaiFZTVILyWqSWkhWk9RCspqkFpIn4dRCspqkFpLVJLWQrE6ohWSVQi0kb7RTC8mqBYVk9YJCsopBIVnNoJCsalBI04s6SoVklYNCGmpHCmmoHimkoX6kkIYKQiFZDaGQrIpQSFZHKCSrJBSS1RIKyapJCmmoJymkoaKkkIaakkIaqkoKaX5RR1XbrlUWCslqC4Vk1YVCsvpCIVmFaSI81JgU0lBlUkhDnUkhDZUmhWS1hkKyakMhWb2hkKziUEhWcygkqzoUktUdCskqD4VktYdCsupDIVn9oZCsAlFIVoMoJKtCFJLVIQrJKhGFZLWIQrJqRCFZPaKQrCJRSFaTKCTXokQhuVYlCsm1LFFIrnWJQnItTE6Ea2WikFxLE4XkWpsoJNfiRCG5VicKybU8UUiu9YlCci1QFJJrhaKQXEsUheRaoygk1yJFIblWKQrJtUxRSK51ikJyLVQUkmulopBcSxWF5FqrKCTXYkUhuVYrCsm1XFFIrvWKQnItWBSSa8WikFxLFoXkWrMoJNeiRSG5Vi1fhGvZopBc6xaF5Fq4KCTXykUhuZYuCsm1dlFIrsWLQnKtXhSSa/mikFzrF4XkWsAoJNcKRiG5ljAKybWGUUiuRYxCcq1iFJJrGaOQXOsYheRayCgk10pGIbmWMgrJtZZRSK7FjEJyrWYUkms5o5Bc6xmF5FrQKCTXikYhuZY0Csm1plFIrkWNQnKtahSSa1mjkFzrGoXkWth88a6VjUJyLW0Ukmtto5BcixuF5FrdKCTX8kYhudY3Csm1wFFIrhWOQnItcRSSa42jkFyLHIXkWuUoJNcyRyG51jkKybXQUUiulY5Cci11FJJrraOQXIsdheRa7Sgk13JHIbnWOwrJteBRSK4Vj0JyLXkUkmvNo5Bcix6F5Fr1KCTXskchudY9Csm18FFIrpWPQnItfRSSa+2jkFyLH4XkWv0oJNfyRyG51j8Kyb0AUEjuFYBCci8BFJJ7DaCQ3IsAheReBSgk9zJAIbnXAQrJvRBQSO6VgEJyLwUuBPdaQCG5FwMKyb0aUEju5YBCcq8HFJJ7QaCQ3CsCheReEigk95pAIbkXBQrJvSpQSO5lgUJyrwsUknthoJDcKwOF5F4aKCT32kAhuRcHCsm9OlBI7uWBQnKvDxSSe4GgkNwrBIXkXiIoJPcaQSG5FwkKyb1KUEjuZYJCcq8TFJJ7oaCQ3CoFheROKigkN1pBIbkPCwrJbVpQSO7igkJykxcYknvA4JDcIgaI5A4ySCQ3mIEiuf8MFsntacBI7l6DRnJzGziSe9/gkdwaB5DkzjmIJDfW4cDcd4cDcVseUJK79qCS3NQHluSeP7gktwQCJrljEDLJDYWgSe43hE1yOyJwkrsVoZPczAie5F5H+CS3QgIouVMSQsmNlCBK7rOEUXIbJpCSuzShlNzECabkHk84JbeAAiq5QxRSyQ2koEruL4VVcvspsJK7U6GV3LwKruTeVnglt74CLLkzFmLJjbMgS+6rhVly2y3QkrtyoZbctAu25J5euCW3/AIuuSMYcskNw6BL7ieGXXK7MfCSu5Ghl9ysDL7kXmb4Jbc6AzC5ExqCyY3SIEzuo4Zhcps1EJO7sKGY3KQNxuQebjgmt3gDMrkDHJLJDeK6BenEftDfs0xdpumrqokU16zJGVCuyQlSsMn5U7LJ6VW0ydlXtsnJWbjJuVu6yaldvMmZX77JA4OAk8cNWs71sELLuR51aDnXgxIt53rMouVcD2m0nOsRj5ZzPSDScq7HS1rO9XBKy7kebWk514MxLed6rKblXA/ltJzrkZ6Wcz0RoOVczxNoOdfTCFrO9SyDlnM9CaHlXM9RaDnXUxhazvUMh5ZzPQGi5VzPj2g519MnWs717IqWcz35ouVcz81oOddTN1rO9cyOlnM98aPlXM8LaTnX00ZazvWskpZzPemk5VzPSWk511NWWs71jJaWcz3hpeVcz4dpOdfTZVrO9WyalnM92ablXM/FaTnXU3VazvVMnpZzPdGn5VyvA2g518sEWs71KoKWc73IoOVcr0FoOddLFFrO9QqGlnO9wKHl3DGKO1WrolH56brG6omWc724ouVcr71oOddLM1rO9cqNlnO9sKPlXK/7aDnnFk60nHMLJ1rOuYUTLefcwomWc27hRMs5t3Ci5ZxbONFyzi2caDnnFk60nHMLJ1rOuYUTLefcwomWc27hRMs5t3Ci5ZxbONFyzi2caDnnFk60nHMLJ1rOuYUTLefcwomWc27hRMs5t3Ci5ZxbONFyzi2caDnnFk60nHMLJ1rOuYUTLefcwomWc27hRMs5t3Ci5ZxbONFyzi2caDnnFk60nHMLJ1rOuYUTLefcwomWc27hRMs5t3Ci5ZxbONFyzi2caDnnFk60nHMLJ1rOuYUTLefcwomWc37MS8s5t3Ci5ZxbONFyzi2caDnnFk60nHMLJ1rOuYUTLefcwomWc27hRMs5t3Ci5ZxbONFyzi2caDnnFk60nHMLJ1rOuYUTLefcwomWc27hRMs5t3Ci5ZxbONFyzi2caDnnFk60nHMLJ1rOuYUTLefcwomWc27hRMs5t3Ci5ZxbONFyzi2caDnnFk60nHMLJ1rOuRgBLedcjICWcy5GQMs5FyOg5ZyLEdByzsUIaDnnYgS0nHMxAlrOuRgBLedcjICWcy5GQMs5FyOg5ZyLEdByzsUIaDnnYgS0nHMxAlrOuRgBLedcjICWcy5GQMs5FyOg5ZyLEdByzsUyaDnnYhq0nHOxDVrOuRgHLedcrIOWcy7mQcs5F/ug5ZyLgdByzsVCaDnnYiK0nHOxEVrOuRgJLedcrISWcy5mQss5Fzuh5ZyLodByzsVSaDnnYiq0nHOxFVrOuRgLLedcrIWWcy7mQss5F3uh5ZyLwdByzsViaDnnYjK0nHOxGVrOuRgNLedcrIaWcy5mA7NysRuYlZEkzMrFcmBWLqYDs/JjY5iVHyvDrPzYGWblx9IwKz+2hln5sTbMyo+9YVZ+LA6z8mNzmJUfq8Os/NgdZuXH8jArP7aHWfmxfhd76sf+XeypWUAXe2o20MWemhV0sScXa6LYk4s5/YNiTy4GRbEnF4ui2FOziC721Gyiiz01q+hiT80uYFZmGTArsw2YlVkHzMrsA2ZlFgKzMhuBWZmVwKzMTmBWZikwK7MVmJVZC8zK7AVmZRYDszKbgVmZ1cCszG5gVmY5MCuzHZiVWQ/MyuwHZmUWBLMyG4JZDVYkZjXYkZjVYEliVoMtiVkN1iRmNdjT1sXlrmZVyawGmzKzMquCWZldVfE+sywxq8G2xKwG6xKzGuxLzGqwMDGrwcbErAYrE7Ma7EzMyiwNZmW2BrMya4NZmb3BrMziYFZmczArszqYldkdzMosD2ZltgezMuuDWZn9wazMAmFWnk/CrMwKYVZmhzArs0SYldkizMqsEWZl9gizMouEWZlNwqzMKmFWZpcwK7NMmJXZJszKrBNmZfYJszILhVmNny9faQHVzGq8vpjVeH8xKx8fzMrHD7Py54NZ+fPDrHx+YFY+fzArn1+Ylc8/zMrfD8zK3x/Myt8vzMrfP8zK1wfMytcPzMrXF8zK1x/MysUyYFYupgGzcrENmJWLcdByzsU6aDnnYh60nHOxD1rOuRgILedcLISWcy4mQsu50aJNLedGCze1nBst3tRybrSAU8u50SJOLedGCzm3nOPzuOXc0cWdMp+PFnVqOTda2Knl3Ghxp5ZzowWeWs6NFnlqOTda6KnlnIvF0HLOxWRoOediM7ScczEaWs65WA0t51zMhmJPLnZDsSc/xqbYk4vlUOzJxXQo9uRiOxR7cjEeij35MTTFnlzMh2JPLvZDsScXA6LYk4sFUezJxYQo9uRiQxR7cjEiij25WBHFnlzMiGJPfsxLsScXQ+piT10sqYs9uZgSxZ5cbIliTy7GNH+lxaWLPbmY0z8o9uRiUBR7crEoij25mBTFnlxsimJPLkZFsacuVkWxJxezotiT/5/bKfbkYlgUe3KxLIo9uZgWxZ5cbItiTy7GRbEnF+ui2JOLeVHsycW+KPbkYmAUe3KhAoo9uZgYxZ5cbIxiT2ahFHsyC6XYk1koxZ7MQmFWZqEwK7NQmJVZKMzKLBRmZRYKszILhVmZhcKszEJhVmahMCuzUJiVWSjMyiwUZmUWCrMyC4VZmYXCrMxCYVZmoTArs1CYlVkozMosFGZlFgqzMguFWZmFwqzMQmFWZqEwK7NQmJVZKMzKLBRmZRYKszILhVmZhcKszEJhVmahMCuzUJiVWSjMyiwUZmUWCrMyC4VZmYXCrMxCYVZmoTArs1CYlVkozMosFGZlFgqzMguFWZmFwqzMQmFWZqEwK7NQmJVZKMzKLBRmZRYKszILhVmZhcKszEJhVmahMCuzUJiVWSjMyiwUZmUWCrMyC4VZmYXCrMxCYVZmoTArs1CYlVkozMosFGZlFgqzMguFWZmFwqzMQmFWZqEwK7NQmJVZKMzKLBRmZRYKszILhVmZhcKszEJhVmahMCuzUJiVWSjMyiwUZmUWCrPaXoo7LfsLC4VZmYXCrMxCYVZmoTArs1CYlVkozMosFGZlFgqzMguFWZmFwqzMQmFWZqEwK7NQmJVZKMzKLBRmZRYKszILhVmZhcKszEJhVmahMCuzUJiVWSjMyiwUZmUWCrMyC4VZmYXCrMxCYVZmoTArs1CYlVkozMosFGZlFgqzMguFWZmFwqzMQmFWZqEwK7NQmJVZKMzKLBRmZRYKszILhVmZhcKszEJhVmahMCuzUJiVWSjMyiwUZnW8lH+6zhcWCrMyC4VZmYXCrMxCYVZmoTArs1CYlVkozMosFGbl+TjMyiwUZmUWCrMyC4VZmYXCrMxCYVZmoTArs1CYlVkozMosFGZlFgqzMguFWZmFwqzMQmFWZqEwK7NQmJVZKMzKLBRmZRYKszILhVl5vQCzMguFWZmFwqzMQmFWrSKaWTWaaGbVpqKZVZOLZlYtMppZNdhoZtWeo5lVc49mVq1Bmlk1Fmlm1ZakmVVTk2ZWLVGaWTVUaWbVjqWZVTOXZlatYJpZNZJpZtWGpplVE5tmVi1wmlk10Glm1X4HZmXeA7Oy/oFZGQfBrGyHYFamRTAryyOYlWESzMpuCWZl1gSzsnqCWRlFwazMQj9++/njz/XPd7/8xY++9/h+uqspUtHrvz/+/s+ssSSv5sdH8c+nb3PZrJ++7TXd0KZNXauS7/GzL37/+JbeYy75tm6VQD9/2yujEPYH+YZv8PV+f3/zVnM5LL9Xbm/FXfP/fLOv1eL6+puxFvOb1Vxw+aff7OtY7utvm3dajFx+23Wtml9fe9vvveOdf/vl33nnL3/7x7fv/jCW3493f3gcT/53/avC3DbK76yO5d3njw9+8oMfvvvw8e7Ttx+8+zZeP/fB4nZ9eYOf/vhfv8XXr+XJVz7AL378o3/7Nj/BmjPP6eUdfvlBvPwc9/gH//Ljn3z4q8e7j/qd/uaft/8D+UkmemVuZHN0cmVhbQplbmRvYmoKMyAwIG9iago8PCAvVHlwZSAvUGFnZXMgL0tpZHMgWyA3IDAgUiBdIC9Db3VudCAxIC9NZWRpYUJveCBbMCAwIDM2MCAzNjBdID4+CmVuZG9iago0IDAgb2JqCjw8Ci9Qcm9jU2V0IFsvUERGIC9UZXh0XQovRm9udCA8PC9GMiAxMCAwIFIgPj4KL0V4dEdTdGF0ZSA8PCA+PgovQ29sb3JTcGFjZSA8PCAvc1JHQiA1IDAgUiA+Pgo+PgplbmRvYmoKNSAwIG9iagpbL0lDQ0Jhc2VkIDYgMCBSXQplbmRvYmoKNiAwIG9iago8PCAvQWx0ZXJuYXRlIC9EZXZpY2VSR0IgL04gMyAvTGVuZ3RoIDI1OTYgL0ZpbHRlciAvRmxhdGVEZWNvZGUgPj4Kc3RyZWFtCnicnZZ3VFPZFofPvTe9UJIQipTQa2hSAkgNvUiRLioxCRBKwJAAIjZEVHBEUZGmCDIo4ICjQ5GxIoqFAVGx6wQZRNRxcBQblklkrRnfvHnvzZvfH/d+a5+9z91n733WugCQ/IMFwkxYCYAMoVgU4efFiI2LZ2AHAQzwAANsAOBws7NCFvhGApkCfNiMbJkT+Be9ug4g+fsq0z+MwQD/n5S5WSIxAFCYjOfy+NlcGRfJOD1XnCW3T8mYtjRNzjBKziJZgjJWk3PyLFt89pllDznzMoQ8GctzzuJl8OTcJ+ONORK+jJFgGRfnCPi5Mr4mY4N0SYZAxm/ksRl8TjYAKJLcLuZzU2RsLWOSKDKCLeN5AOBIyV/w0i9YzM8Tyw/FzsxaLhIkp4gZJlxTho2TE4vhz89N54vFzDAON40j4jHYmRlZHOFyAGbP/FkUeW0ZsiI72Dg5ODBtLW2+KNR/Xfybkvd2ll6Ef+4ZRB/4w/ZXfpkNALCmZbXZ+odtaRUAXesBULv9h81gLwCKsr51Dn1xHrp8XlLE4ixnK6vc3FxLAZ9rKS/o7/qfDn9DX3zPUr7d7+VhePOTOJJ0MUNeN25meqZExMjO4nD5DOafh/gfB/51HhYR/CS+iC+URUTLpkwgTJa1W8gTiAWZQoZA+J+a+A/D/qTZuZaJ2vgR0JZYAqUhGkB+HgAoKhEgCXtkK9DvfQvGRwP5zYvRmZid+8+C/n1XuEz+yBYkf45jR0QyuBJRzuya/FoCNCAARUAD6kAb6AMTwAS2wBG4AA/gAwJBKIgEcWAx4IIUkAFEIBcUgLWgGJSCrWAnqAZ1oBE0gzZwGHSBY+A0OAcugctgBNwBUjAOnoAp8ArMQBCEhcgQFVKHdCBDyByyhViQG+QDBUMRUByUCCVDQkgCFUDroFKoHKqG6qFm6FvoKHQaugANQ7egUWgS+hV6ByMwCabBWrARbAWzYE84CI6EF8HJ8DI4Hy6Ct8CVcAN8EO6ET8OX4BFYCj+BpxGAEBE6ooswERbCRkKReCQJESGrkBKkAmlA2pAepB+5ikiRp8hbFAZFRTFQTJQLyh8VheKilqFWoTajqlEHUJ2oPtRV1ChqCvURTUZros3RzugAdCw6GZ2LLkZXoJvQHeiz6BH0OPoVBoOhY4wxjhh/TBwmFbMCsxmzG9OOOYUZxoxhprFYrDrWHOuKDcVysGJsMbYKexB7EnsFO459gyPidHC2OF9cPE6IK8RV4FpwJ3BXcBO4GbwS3hDvjA/F8/DL8WX4RnwPfgg/jp8hKBOMCa6ESEIqYS2hktBGOEu4S3hBJBL1iE7EcKKAuIZYSTxEPE8cJb4lUUhmJDYpgSQhbSHtJ50i3SK9IJPJRmQPcjxZTN5CbiafId8nv1GgKlgqBCjwFFYr1Ch0KlxReKaIVzRU9FRcrJivWKF4RHFI8akSXslIia3EUVqlVKN0VOmG0rQyVdlGOVQ5Q3mzcovyBeVHFCzFiOJD4VGKKPsoZyhjVISqT2VTudR11EbqWeo4DUMzpgXQUmmltG9og7QpFYqKnUq0Sp5KjcpxFSkdoRvRA+jp9DL6Yfp1+jtVLVVPVb7qJtU21Suqr9XmqHmo8dVK1NrVRtTeqTPUfdTT1Lepd6nf00BpmGmEa+Rq7NE4q/F0Dm2OyxzunJI5h+fc1oQ1zTQjNFdo7tMc0JzW0tby08rSqtI6o/VUm67toZ2qvUP7hPakDlXHTUegs0PnpM5jhgrDk5HOqGT0MaZ0NXX9dSW69bqDujN6xnpReoV67Xr39An6LP0k/R36vfpTBjoGIQYFBq0Gtw3xhizDFMNdhv2Gr42MjWKMNhh1GT0yVjMOMM43bjW+a0I2cTdZZtJgcs0UY8oyTTPdbXrZDDazN0sxqzEbMofNHcwF5rvNhy3QFk4WQosGixtMEtOTmcNsZY5a0i2DLQstuyyfWRlYxVtts+q3+mhtb51u3Wh9x4ZiE2hTaNNj86utmS3Xtsb22lzyXN+5q+d2z31uZ27Ht9tjd9Oeah9iv8G+1/6Dg6ODyKHNYdLRwDHRsdbxBovGCmNtZp13Qjt5Oa12Oub01tnBWex82PkXF6ZLmkuLy6N5xvP48xrnjbnquXJc612lbgy3RLe9blJ3XXeOe4P7Aw99D55Hk8eEp6lnqudBz2de1l4irw6v12xn9kr2KW/E28+7xHvQh+IT5VPtc99XzzfZt9V3ys/eb4XfKX+0f5D/Nv8bAVoB3IDmgKlAx8CVgX1BpKAFQdVBD4LNgkXBPSFwSGDI9pC78w3nC+d3hYLQgNDtoffCjMOWhX0fjgkPC68JfxhhE1EQ0b+AumDJgpYFryK9Issi70SZREmieqMVoxOim6Nfx3jHlMdIY61iV8ZeitOIE8R1x2Pjo+Ob4qcX+izcuXA8wT6hOOH6IuNFeYsuLNZYnL74+BLFJZwlRxLRiTGJLYnvOaGcBs700oCltUunuGzuLu4TngdvB2+S78ov508kuSaVJz1Kdk3enjyZ4p5SkfJUwBZUC56n+qfWpb5OC03bn/YpPSa9PQOXkZhxVEgRpgn7MrUz8zKHs8yzirOky5yX7Vw2JQoSNWVD2Yuyu8U02c/UgMREsl4ymuOWU5PzJjc690iecp4wb2C52fJNyyfyffO/XoFawV3RW6BbsLZgdKXnyvpV0Kqlq3pX668uWj2+xm/NgbWEtWlrfyi0LiwvfLkuZl1PkVbRmqKx9X7rW4sVikXFNza4bKjbiNoo2Di4ae6mqk0fS3glF0utSytK32/mbr74lc1XlV992pK0ZbDMoWzPVsxW4dbr29y3HShXLs8vH9sesr1zB2NHyY6XO5fsvFBhV1G3i7BLsktaGVzZXWVQtbXqfXVK9UiNV017rWbtptrXu3m7r+zx2NNWp1VXWvdur2DvzXq/+s4Go4aKfZh9OfseNkY39n/N+rq5SaOptOnDfuF+6YGIA33Njs3NLZotZa1wq6R18mDCwcvfeH/T3cZsq2+nt5ceAockhx5/m/jt9cNBh3uPsI60fWf4XW0HtaOkE+pc3jnVldIl7Y7rHj4aeLS3x6Wn43vL7/cf0z1Wc1zleNkJwomiE59O5p+cPpV16unp5NNjvUt675yJPXOtL7xv8GzQ2fPnfM+d6ffsP3ne9fyxC84Xjl5kXey65HCpc8B+oOMH+x86Bh0GO4cch7ovO13uGZ43fOKK+5XTV72vnrsWcO3SyPyR4etR12/eSLghvcm7+ehW+q3nt3Nuz9xZcxd9t+Se0r2K+5r3G340/bFd6iA9Puo9OvBgwYM7Y9yxJz9l//R+vOgh+WHFhM5E8yPbR8cmfScvP174ePxJ1pOZp8U/K/9c+8zk2Xe/ePwyMBU7Nf5c9PzTr5tfqL/Y/9LuZe902PT9VxmvZl6XvFF/c+At623/u5h3EzO577HvKz+Yfuj5GPTx7qeMT59+A/eE8/tlbmRzdHJlYW0KZW5kb2JqCjkgMCBvYmoKPDwKL1R5cGUgL0VuY29kaW5nIC9CYXNlRW5jb2RpbmcgL1dpbkFuc2lFbmNvZGluZwovRGlmZmVyZW5jZXMgWyA0NS9taW51cyA5Ni9xdW90ZWxlZnQKMTQ0L2RvdGxlc3NpIC9ncmF2ZSAvYWN1dGUgL2NpcmN1bWZsZXggL3RpbGRlIC9tYWNyb24gL2JyZXZlIC9kb3RhY2NlbnQKL2RpZXJlc2lzIC8ubm90ZGVmIC9yaW5nIC9jZWRpbGxhIC8ubm90ZGVmIC9odW5nYXJ1bWxhdXQgL29nb25layAvY2Fyb24gL3NwYWNlXQo+PgplbmRvYmoKMTAgMCBvYmoKPDwgL1R5cGUgL0ZvbnQgL1N1YnR5cGUgL1R5cGUxIC9OYW1lIC9GMiAvQmFzZUZvbnQgL0hlbHZldGljYQovRW5jb2RpbmcgOSAwIFIgPj4KZW5kb2JqCnhyZWYKMCAxMQowMDAwMDAwMDAwIDY1NTM1IGYgCjAwMDAwMDAwMjEgMDAwMDAgbiAKMDAwMDAwMDE2MyAwMDAwMCBuIAowMDAwMDEzMDQ0IDAwMDAwIG4gCjAwMDAwMTMxMjcgMDAwMDAgbiAKMDAwMDAxMzIzOSAwMDAwMCBuIAowMDAwMDEzMjcyIDAwMDAwIG4gCjAwMDAwMDAyMTIgMDAwMDAgbiAKMDAwMDAwMDI5MiAwMDAwMCBuIAowMDAwMDE1OTY3IDAwMDAwIG4gCjAwMDAwMTYyMjQgMDAwMDAgbiAKdHJhaWxlcgo8PCAvU2l6ZSAxMSAvSW5mbyAxIDAgUiAvUm9vdCAyIDAgUiA+PgpzdGFydHhyZWYKMTYzMjEKJSVFT0YK" alt="Figure 2: Adaptations of continuous logit functions" />
+<p class="caption">
+Figure 2: Adaptations of continuous logit functions
+</p>
+</div>
+<p>The logit functions are more thoroughly explained by Van Buuren (2012, pp. 63, 64), but a quick overview will be given here. Four missingness functions are known: RIGHT, MID, TAIL and LEFT missingness. Figure 2 shows the course of the probabilities for standardized values.</p>
+<p>In <code>ampute()</code>, the logit functions will be applied to the weighted sum scores. Consequently, in the situation of RIGHT missingness, cases with high weighted sum scores will have a higher probability to have missing values, compared to cases with low weighted sum scores. For MID missingness, the higher probabilities are given to the cases with weighted sum scores around the average.</p>
+<p>For each pattern, a different missingness type can be chosen. In our example, we have four patterns, so four type specifications are required. It is advised to inspect the result with <code>bwplot()</code> (below this is done for pattern 2), although the scatterplots give insight as well (as an example, a plot for pattern 4 is shown).</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">result &lt;-<span class="st"> </span><span class="kw">ampute</span>(testdata, <span class="dt">prop =</span> <span class="fl">0.3</span>, <span class="dt">patterns =</span> mypatterns, 
+                 <span class="dt">freq =</span> <span class="kw">c</span>(<span class="fl">0.7</span>, <span class="fl">0.1</span>, <span class="fl">0.1</span>, <span class="fl">0.1</span>), <span class="dt">weights =</span> myweights,
+                 <span class="dt">type =</span> <span class="kw">c</span>(<span class="st">&quot;RIGHT&quot;</span>, <span class="st">&quot;TAIL&quot;</span>, <span class="st">&quot;MID&quot;</span>, <span class="st">&quot;LEFT&quot;</span>))</code></pre></div>
+<pre><code>## $`Boxplot pattern 2`</code></pre>
+<p><img src="data:application/pdf;base64,JVBERi0xLjQKJYHigeOBz4HTXHIKMSAwIG9iago8PAovQ3JlYXRpb25EYXRlIChEOjIwMTcwMjE4MjE0MTM2KQovTW9kRGF0ZSAoRDoyMDE3MDIxODIxNDEzNikKL1RpdGxlIChSIEdyYXBoaWNzIE91dHB1dCkKL1Byb2R1Y2VyIChSIDMuMy4yKQovQ3JlYXRvciAoUikKPj4KZW5kb2JqCjIgMCBvYmoKPDwgL1R5cGUgL0NhdGFsb2cgL1BhZ2VzIDMgMCBSID4+CmVuZG9iago3IDAgb2JqCjw8IC9UeXBlIC9QYWdlIC9QYXJlbnQgMyAwIFIgL0NvbnRlbnRzIDggMCBSIC9SZXNvdXJjZXMgNCAwIFIgPj4KZW5kb2JqCjggMCBvYmoKPDwKL0xlbmd0aCAxMjA0IC9GaWx0ZXIgL0ZsYXRlRGVjb2RlCj4+CnN0cmVhbQp4nMVYS28bNxC+76/g0T6Y4Qyfe6zTB2CgAVIJ7SHIwc0DsGEpqe2if79DDpekVmutXoEPEvSJnG+GM+R83AVxI0Dci3+69/S5XnZvnv747Vp8euqUVEqJ9vvp07p78yvS/OVXASjzAH8xBuWlNRksV+LDxc+3z7fi893T8+OluAIrLu7+vhSoxMW/z3ff1k/ibi2+3z4/f4nDSMNrgZcfxfKm+2WZQmo+wihpQBgrQYveyeAEeojg8Yv4S6zH8/Na3i4m1rJ4+47+9Vb81334KJT43IG4oc99B2k5v3fszLuIVkIb6U1GD2KRRwHpbyzDGTbjXktj6jjDOo6IElwZz7AZ90oGX8cZxvFDKqVGleJvL50XHqMbKtTFFV6K5X3MeqTexxYw5T4Zw/7GqKWlzLheBpuM1aG2CEFan2wP9ovOSwzJtiz4/RG7f9KFdXHza5TYJw8/rb7vH18I0oTG+N239VVDsO8ZOGnPWysD0ukEaWlXDxBo19OuHUPvZdBzkKkGGA+A8tuQmXfDQjWCi65PWwl8L3s6SxmiCtL3ND6CcdfGpM3gzFYxnUA3hbPz3XAgG8FFKYegsluhCXFhnGsysBIZ6jghHX+gilU/K5GxA+lDmsAWuRoDAVLaHbQEedmFAK2WjjtcLgL7XIlcsRoCr4U9rkROSw0gV4k9DuZNALks7K/YN/5njmI6UMAHiqTmUQSpgX4p/uHotFO4fZCOW9RDPEhpZjmOL1snGYubwMf8b5tvnqKWDCKZk84msvTDGQm96H202R3Ji8ZI1homrM+odNMtZTEhwJp2Fbo8FYw0arP5pJr1phftd2qfNcrx8L5RTvu+jmk86sISqIsoYu0lcHX+hLEsnCG301Fv5hY0KZM/4HZzNtkCOnQxyON0C4KV2swL1+z6TsozWJQu0LXCpwtTwaHPbXuMPXXOfh4zX8XGpwa3jTP/HC58I0wdmXLiIYmDDXEFjJHuLSZFNMLxFkSXzTmc+So2RvZqAg/+5/DAN8YvixlQM665ol7PmHqz4cssUrutrlYiY3KgecLAwNUpDGhcvBY3FHn1hQKj1PKNPGecvRIFF7AGkdfDTlcip6eJge2zz0LQxDBUiH0WiiaG0zQNnIqdA0gT+v5wUUNFjSduCIpSnSpqQEqvon4T55SsnaV57mwZk93zdaRpp/PjtQk81c1tiNPWM8s58ruPOiHdNCnvr6BOaFUK8jh1wkB28LI6nZQ/rVU8ieUdgXaxPdWXBHm8viXgCc1rgmFGeU+QZ9QXBXlGfVPAM5pXBcOM8q4gz6gvC/Yu4knZQNPHx19EJTU9UhRs0i5+2Mbk2tp5zHwFg9Fp5duY+edw5RthEpFexxcLEFx6KBkwKswMI6zBRu2bw5mvYpeUYxsP/ufwwDfGL0swknTUXJE0MaaHMJs3IolDDYU2UcaxHWhWWDbJ5SkU6FPDaDjy8gsHRqfsJaec3a5ErmCNYlgQeyWGnKAmilw09loomiiGIrHXwtFEcZoKo/WxWyL4+ORwsAprBfEFFAQd7wonqnAk62mLKx2f4n+QCu/sGpMq8ToqvNP58SqM3krEDRXWZ1XhnXEvtkW1+x+HuteTZW5kc3RyZWFtCmVuZG9iagozIDAgb2JqCjw8IC9UeXBlIC9QYWdlcyAvS2lkcyBbIDcgMCBSIF0gL0NvdW50IDEgL01lZGlhQm94IFswIDAgMzYwIDM2MF0gPj4KZW5kb2JqCjQgMCBvYmoKPDwKL1Byb2NTZXQgWy9QREYgL1RleHRdCi9Gb250IDw8IC9GMSAxMCAwIFIgL0YyIDExIDAgUiA+PgovRXh0R1N0YXRlIDw8ID4+Ci9Db2xvclNwYWNlIDw8IC9zUkdCIDUgMCBSID4+Cj4+CmVuZG9iago1IDAgb2JqClsvSUNDQmFzZWQgNiAwIFJdCmVuZG9iago2IDAgb2JqCjw8IC9BbHRlcm5hdGUgL0RldmljZVJHQiAvTiAzIC9MZW5ndGggMjU5NiAvRmlsdGVyIC9GbGF0ZURlY29kZSA+PgpzdHJlYW0KeJydlndUU9kWh8+9N71QkhCKlNBraFICSA29SJEuKjEJEErAkAAiNkRUcERRkaYIMijggKNDkbEiioUBUbHrBBlE1HFwFBuWSWStGd+8ee/Nm98f935rn73P3Wfvfda6AJD8gwXCTFgJgAyhWBTh58WIjYtnYAcBDPAAA2wA4HCzs0IW+EYCmQJ82IxsmRP4F726DiD5+yrTP4zBAP+flLlZIjEAUJiM5/L42VwZF8k4PVecJbdPyZi2NE3OMErOIlmCMlaTc/IsW3z2mWUPOfMyhDwZy3PO4mXw5Nwn4405Er6MkWAZF+cI+LkyviZjg3RJhkDGb+SxGXxONgAoktwu5nNTZGwtY5IoMoIt43kA4EjJX/DSL1jMzxPLD8XOzFouEiSniBkmXFOGjZMTi+HPz03ni8XMMA43jSPiMdiZGVkc4XIAZs/8WRR5bRmyIjvYODk4MG0tbb4o1H9d/JuS93aWXoR/7hlEH/jD9ld+mQ0AsKZltdn6h21pFQBd6wFQu/2HzWAvAIqyvnUOfXEeunxeUsTiLGcrq9zcXEsBn2spL+jv+p8Of0NffM9Svt3v5WF485M4knQxQ143bmZ6pkTEyM7icPkM5p+H+B8H/nUeFhH8JL6IL5RFRMumTCBMlrVbyBOIBZlChkD4n5r4D8P+pNm5lona+BHQllgCpSEaQH4eACgqESAJe2Qr0O99C8ZHA/nNi9GZmJ37z4L+fVe4TP7IFiR/jmNHRDK4ElHO7Jr8WgI0IABFQAPqQBvoAxPABLbAEbgAD+ADAkEoiARxYDHgghSQAUQgFxSAtaAYlIKtYCeoBnWgETSDNnAYdIFj4DQ4By6By2AE3AFSMA6egCnwCsxAEISFyBAVUod0IEPIHLKFWJAb5AMFQxFQHJQIJUNCSAIVQOugUqgcqobqoWboW+godBq6AA1Dt6BRaBL6FXoHIzAJpsFasBFsBbNgTzgIjoQXwcnwMjgfLoK3wJVwA3wQ7oRPw5fgEVgKP4GnEYAQETqiizARFsJGQpF4JAkRIauQEqQCaUDakB6kH7mKSJGnyFsUBkVFMVBMlAvKHxWF4qKWoVahNqOqUQdQnag+1FXUKGoK9RFNRmuizdHO6AB0LDoZnYsuRlegm9Ad6LPoEfQ4+hUGg6FjjDGOGH9MHCYVswKzGbMb0445hRnGjGGmsVisOtYc64oNxXKwYmwxtgp7EHsSewU7jn2DI+J0cLY4X1w8TogrxFXgWnAncFdwE7gZvBLeEO+MD8Xz8MvxZfhGfA9+CD+OnyEoE4wJroRIQiphLaGS0EY4S7hLeEEkEvWITsRwooC4hlhJPEQ8TxwlviVRSGYkNimBJCFtIe0nnSLdIr0gk8lGZA9yPFlM3kJuJp8h3ye/UaAqWCoEKPAUVivUKHQqXFF4pohXNFT0VFysmK9YoXhEcUjxqRJeyUiJrcRRWqVUo3RU6YbStDJV2UY5VDlDebNyi/IF5UcULMWI4kPhUYoo+yhnKGNUhKpPZVO51HXURupZ6jgNQzOmBdBSaaW0b2iDtCkVioqdSrRKnkqNynEVKR2hG9ED6On0Mvph+nX6O1UtVU9Vvuom1TbVK6qv1eaoeajx1UrU2tVG1N6pM9R91NPUt6l3qd/TQGmYaYRr5Grs0Tir8XQObY7LHO6ckjmH59zWhDXNNCM0V2ju0xzQnNbS1vLTytKq0jqj9VSbru2hnaq9Q/uE9qQOVcdNR6CzQ+ekzmOGCsOTkc6oZPQxpnQ1df11Jbr1uoO6M3rGelF6hXrtevf0Cfos/ST9Hfq9+lMGOgYhBgUGrQa3DfGGLMMUw12G/YavjYyNYow2GHUZPTJWMw4wzjduNb5rQjZxN1lm0mByzRRjyjJNM91tetkMNrM3SzGrMRsyh80dzAXmu82HLdAWThZCiwaLG0wS05OZw2xljlrSLYMtCy27LJ9ZGVjFW22z6rf6aG1vnW7daH3HhmITaFNo02Pzq62ZLde2xvbaXPJc37mr53bPfW5nbse322N3055qH2K/wb7X/oODo4PIoc1h0tHAMdGx1vEGi8YKY21mnXdCO3k5rXY65vTW2cFZ7HzY+RcXpkuaS4vLo3nG8/jzGueNueq5clzrXaVuDLdEt71uUnddd457g/sDD30PnkeTx4SnqWeq50HPZ17WXiKvDq/XbGf2SvYpb8Tbz7vEe9CH4hPlU+1z31fPN9m31XfKz95vhd8pf7R/kP82/xsBWgHcgOaAqUDHwJWBfUGkoAVB1UEPgs2CRcE9IXBIYMj2kLvzDecL53eFgtCA0O2h98KMw5aFfR+OCQ8Lrwl/GGETURDRv4C6YMmClgWvIr0iyyLvRJlESaJ6oxWjE6Kbo1/HeMeUx0hjrWJXxl6K04gTxHXHY+Oj45vipxf6LNy5cDzBPqE44foi40V5iy4s1licvvj4EsUlnCVHEtGJMYktie85oZwGzvTSgKW1S6e4bO4u7hOeB28Hb5Lvyi/nTyS5JpUnPUp2Td6ePJninlKR8lTAFlQLnqf6p9alvk4LTduf9ik9Jr09A5eRmHFUSBGmCfsytTPzMoezzLOKs6TLnJftXDYlChI1ZUPZi7K7xTTZz9SAxESyXjKa45ZTk/MmNzr3SJ5ynjBvYLnZ8k3LJ/J9879egVrBXdFboFuwtmB0pefK+lXQqqWrelfrry5aPb7Gb82BtYS1aWt/KLQuLC98uS5mXU+RVtGaorH1futbixWKRcU3NrhsqNuI2ijYOLhp7qaqTR9LeCUXS61LK0rfb+ZuvviVzVeVX33akrRlsMyhbM9WzFbh1uvb3LcdKFcuzy8f2x6yvXMHY0fJjpc7l+y8UGFXUbeLsEuyS1oZXNldZVC1tep9dUr1SI1XTXutZu2m2te7ebuv7PHY01anVVda926vYO/Ner/6zgajhop9mH05+x42Rjf2f836urlJo6m06cN+4X7pgYgDfc2Ozc0tmi1lrXCrpHXyYMLBy994f9Pdxmyrb6e3lx4ChySHHn+b+O31w0GHe4+wjrR9Z/hdbQe1o6QT6lzeOdWV0iXtjusePhp4tLfHpafje8vv9x/TPVZzXOV42QnCiaITn07mn5w+lXXq6enk02O9S3rvnIk9c60vvG/wbNDZ8+d8z53p9+w/ed71/LELzheOXmRd7LrkcKlzwH6g4wf7HzoGHQY7hxyHui87Xe4Znjd84or7ldNXva+euxZw7dLI/JHh61HXb95IuCG9ybv56Fb6ree3c27P3FlzF3235J7SvYr7mvcbfjT9sV3qID0+6j068GDBgztj3LEnP2X/9H686CH5YcWEzkTzI9tHxyZ9Jy8/Xvh4/EnWk5mnxT8r/1z7zOTZd794/DIwFTs1/lz0/NOvm1+ov9j/0u5l73TY9P1XGa9mXpe8UX9z4C3rbf+7mHcTM7nvse8rP5h+6PkY9PHup4xPn34D94Tz+2VuZHN0cmVhbQplbmRvYmoKOSAwIG9iago8PAovVHlwZSAvRW5jb2RpbmcgL0Jhc2VFbmNvZGluZyAvV2luQW5zaUVuY29kaW5nCi9EaWZmZXJlbmNlcyBbIDQ1L21pbnVzIDk2L3F1b3RlbGVmdAoxNDQvZG90bGVzc2kgL2dyYXZlIC9hY3V0ZSAvY2lyY3VtZmxleCAvdGlsZGUgL21hY3JvbiAvYnJldmUgL2RvdGFjY2VudAovZGllcmVzaXMgLy5ub3RkZWYgL3JpbmcgL2NlZGlsbGEgLy5ub3RkZWYgL2h1bmdhcnVtbGF1dCAvb2dvbmVrIC9jYXJvbiAvc3BhY2VdCj4+CmVuZG9iagoxMCAwIG9iago8PCAvVHlwZSAvRm9udCAvU3VidHlwZSAvVHlwZTEgL05hbWUgL0YxIC9CYXNlRm9udCAvWmFwZkRpbmdiYXRzID4+CmVuZG9iagoxMSAwIG9iago8PCAvVHlwZSAvRm9udCAvU3VidHlwZSAvVHlwZTEgL05hbWUgL0YyIC9CYXNlRm9udCAvSGVsdmV0aWNhCi9FbmNvZGluZyA5IDAgUiA+PgplbmRvYmoKeHJlZgowIDEyCjAwMDAwMDAwMDAgNjU1MzUgZiAKMDAwMDAwMDAyMSAwMDAwMCBuIAowMDAwMDAwMTYzIDAwMDAwIG4gCjAwMDAwMDE1NjggMDAwMDAgbiAKMDAwMDAwMTY1MSAwMDAwMCBuIAowMDAwMDAxNzc1IDAwMDAwIG4gCjAwMDAwMDE4MDggMDAwMDAgbiAKMDAwMDAwMDIxMiAwMDAwMCBuIAowMDAwMDAwMjkyIDAwMDAwIG4gCjAwMDAwMDQ1MDMgMDAwMDAgbiAKMDAwMDAwNDc2MCAwMDAwMCBuIAowMDAwMDA0ODQ0IDAwMDAwIG4gCnRyYWlsZXIKPDwgL1NpemUgMTIgL0luZm8gMSAwIFIgL1Jvb3QgMiAwIFIgPj4Kc3RhcnR4cmVmCjQ5NDEKJSVFT0YK" style="display: block; margin: auto;" /></p>
+<p>From the boxplots of pattern 2, it becomes visible that the interquartile range (IQR) is much larger for the amputed V3 values compared to the non-amputed data. This is due to the fact that in pattern 2 only V3 defines the missingness. Besides, we requested a TAIL missingness type, which means that all the cases with values at the tails of the distribution of the weighted sum scores (based on merely V3), will be made missing.</p>
+<pre><code>## $`Scatterplot Pattern 4`</code></pre>
+<p><img src="data:application/pdf;base64,JVBERi0xLjQKJYHigeOBz4HTXHIKMSAwIG9iago8PAovQ3JlYXRpb25EYXRlIChEOjIwMTcwMjE4MjE0MTM2KQovTW9kRGF0ZSAoRDoyMDE3MDIxODIxNDEzNikKL1RpdGxlIChSIEdyYXBoaWNzIE91dHB1dCkKL1Byb2R1Y2VyIChSIDMuMy4yKQovQ3JlYXRvciAoUikKPj4KZW5kb2JqCjIgMCBvYmoKPDwgL1R5cGUgL0NhdGFsb2cgL1BhZ2VzIDMgMCBSID4+CmVuZG9iago3IDAgb2JqCjw8IC9UeXBlIC9QYWdlIC9QYXJlbnQgMyAwIFIgL0NvbnRlbnRzIDggMCBSIC9SZXNvdXJjZXMgNCAwIFIgPj4KZW5kb2JqCjggMCBvYmoKPDwKL0xlbmd0aCAxMDcwOCAvRmlsdGVyIC9GbGF0ZURlY29kZQo+PgpzdHJlYW0KeJzNfUvPJTdy5b5+xV22Fn07+cjX0u2ZaaABG5gpwV4YXggl2dMNf7LdUs8A8+uHcR5BXqnUVrWrAS9U+iIiDxmZN0kGg4fM8vjtozx+//j3d/9z+e/XX7771Xf/6ze/fnz47t323Lbtsf773Ydv3/3qf9SB+/KfHqU+ZeA/lO/r2Xb9/eXb4x9+8f77r779+qs/fP27//fFo+yPX3zz9eP/fPGo46+v/uWP33z3+N23j3/76vvvv/nDF49fhvbbR//iHx9f/vbdf//yUz1a3Pjl4l3pz2NcUdrzOujT33/xaNtw5Xf//L+/H/5898e3UdC//uGb715qXv579Pu51ce+Pa9RXtuf9UKB7Xj84ZvH3z++/SFAPv/1+4/4/P6v/3Zoz/3xf9/9wz8+tsfX78rjt+O/378r8Pdv3qm283m2x9ujt3iklP7l8V7Wqz6vPa2UprVs5/O+0ixxsbf2LNu0U1zs+/Wsddophv1T3pDtB28I/q3Hs96PvT9Lj1/jF7+sXzy+/H089Cj652DP+1kPYsvPx7b6LG383Z/tBnj7ZGy9n3sB9tPrHTd8NGDzfj/Lu3LU5+038+1Bqe9RZfxa473Yj7RSmtayDd/uNEtc7LU8r1m4xMXey7PP4iUu9qM8t6V8iov9Gve2lE9x2v/T79poNOO1Hb9AvT/5XTuP6C8W7Cf85vf97GXBfsKrVspogH3BfkK1pV3P41qwn3C70cTb6nP7BOw5upfV5/6DV/w/7j9/9Zv35fHP3/24LfTax7/nUX5GW3gMf1qUfbF3WxR9FMTGfzyu/bmH63s8LAofcOkZxdh6PbeJo4BSeSkV5XleiRu+zVIh8FLWKSu9EW7x9cO79+PiMXruozO/oxm9pXxvcfl4p0YHcpd4K8u2Pe9dAmsZz/5MKzptwiSwzA96IqG4ogMW7hp3kKVSiEtZJWW5BtTqphxvz3uLGvtOxymP+xxO9Rh7boxQ9/EcIy//Rg1njM2yXfGIhOHfKO8DH8SQR42jZyBmeLK5PP6N61CXbPBBmMU/elxGhNDj8ZTnzYedmubXcz/885URRFyXJTzGMsaibdpPgIyVhLJ5tTTb8+jGjse7Z9EUeC1qtlVOCbg67Rspcbelnc9WdSPSXMbEANTu6Fyj8L5bYnU9nnja9/gtEisJZfNqaQ52VsL2GHaybEgf9EhRt+zyS9jVb91LveJ1jIHmVPu1piEsGSMwwssebaa08VBOS6ivjQdzT/sATaylkk3Tmu3ZrsSO/rfNsinhatUtu/0i9sVv3cv4ybaC3/q41RdJc+F/G0ZD9Pc3GmIvltxOR8SX9vGWLFhJKNvdDDT7s50T26NHzrIh8WrVLbv8Enb1m/dybnwXRzffcCtWjEhsf5wF70o8ivY4a7yaEqKus+PNl3VnayFud9O5dakUo+Zi3HBqz1Ip4NLi9zOs8oa41Vf9FGd7Hht+4UNt3Zoa/UUZdR0XXtPoBk++n5TwuE68o2m/nn3BSkLZvFqaccc9sRVBq8umxKtZt+3yS9jVbzf3jT/duPNLzV2aI/q4aFbl5P1f7DBuS+5d8KLIPl6bBSsJZbtzuPSiHBM7hqylbEgf1PGgbtm3fMmOH/jNexkjy1Ewfl4dt2LF6LOP6MWPG7gRAtx6KSGgpy/xPtnKF5w4CygVl0pxPPdq3Bime5ZKIS5VnVTYG+BefHULH/WNHmEErLtbuDTjccrbUVc/2bGUGDUluXe8zmlvMfomVhLK9g8HTUdXY2yLkD3LhvRBLwXqpt1+Efvit+5l9IXxPtQaN/u2alrccQRt8e5X9uSjC0e3N3v60Y1HgGP7hdjDWEkom1dLUzCGGrs9y1I2JF6tumWXX8KufisYGT1m4/jCFmJFRbsc/VvhA9ZQ2pslh1LnPu3jFhasJBTtXjo045GeR2I3xOEum9IHjQBRNzVyi9AXp/1+tXgNQ3fVjGahaQzeetw0GljFSxsPm5ID2nJM+xVNJbGSULZjWmg2xr/EDuf6LJuSx5uo23b5Jezqt7utAw2uROz2tihqzByiN4q22TFQjzFuVEaBI++Gdk1r/O6Jk4BSeWlRb9E240YEWLNUCg7Jol3Leqg/CNzq6/wp4ueJ0GX+FNCc6KnH44gfdrzXelzxw1Pi4zrwYth+4qUxVtKRN2xN56RB2IY8lstuec+uW3b51T3h2Jay3zu+3GJq48FQit0jwuigNSMYvXXE0DkjQBxb03oh+haOQs9hUIqGexSucihgqTXHQNVZPcjsE7f46hhxtKozIoK9K0SkAvk9dAR7BA94PVp0khT4euzRHdp6RG9oHAWUykupKHg9hNvQdFQqBF7KOmWlN8Itvtr9mw2rx429rZo9mksM/dEMN47IY+jHLAQSO8PKmYjsDYGRsZJ6zmmt4YhsbGV4rLLrDJ9VN+32i9gXvzV+HwgHYsrLW7HiiEFgvCQROsRUGdOwWixgUN4icpMimlriLKBUDfUHY94REBrXovd3qRA+MIBAnbTKG+BefFVUy146shJ8k6yocacne/S9xSO50C1LQEUcD2TlUEGchc3hhxT9RndDXL8QYLBUCohqWScV8oa4F1/9JlV2XfV57HqTpBk/Ouc96M12zLOq0uC758rxUt992k92vsJKQtm8WhrGT8ZuEchn2ZB4teqWXX4Ju/o9+6SY9mMwfVsUOyKViEIx2Y+QZvTOI8ik4D5pxKG2Xs994iigVPdJoaiRxzVOAQBLhZCR755WeiPc4mvmbSJRsiNnPuUjmv0Y2M+C8LFy3tUkONhoe1pbVEaYhX2O5lQgk2FcRbNXqdVDuaqELFeY/1jcpON7j1lSRKBj5ve2KBAH7wfC4/EGjvvdT/x4FKKW/Yrfz9YbE07hJKBUXCrFEW+acT1eNJcKAZeqTlrlDXGrr24CByZXked1ZyrNhfBkvLRopjfmUWOWHikOSu7wtp720SGWibV0unNJzY5e1NiOpKbLhuQGg7pll1/Evvjte9mQSxmmTbMJa07MXyL7vqOimHWNBhZTLUqsr9Mg+x5vemIlHZldsIYJHGMbpj8uu2V2wXXLvhl0nj/wWwPDznnVEZP0t0Vxxmh0HcxoINF9nZ66bTkFO1tab/baxN0eXQ5dertPbzVxHT2ySu3ZXx/OooR197QvcKuvM6V2MwecIZI0t2fV+F9hGNTZ15UZJe3sD2U/GIoJK+magZI0jAaFHf7UWTYlTxrva9rll7Cr3/opGACOzmOMoW+LAq3pYui4odFdjCwp6KFhNkMrY1LhJKBUD7wN3VK9E1didHapEHCp6qRV3hC3+uqf4o5liUiEONtBxc48yhareZFU4YxwdHsUPAiN8mxFtcZRaDkxk6IiASVcYeKKpULwbCTqpFXeVKe12iz1vadJSJtrKmrFzenkjpz+xpnmgZz+NieiSCraejuNv6VwzVkoFQcnocBdO+egKJUCL901CBxXeiPc4quf/sX36nDiLzUXBvbC6V/ceGNP0C05Mt6OaefUU1hLh9N/qdkR7xnbEfC57O4MYNZNu/0i9sVvjdGFHfQeD+dtURyRBYkliA0d8oEVC/X8BwelG/kgW5EPMk4CSsWlUiBZYxxyNS4VgvJSqJNWedO0sHMupbohaJbgeY81Bycwit1PT4wR259z6qPY//TM6F6wOYvI2U/OJDCNEbZ5hrMfltwkak97yZlCrT/wm/dyoLeKsJ6/hOQaabADM+SY65+P447fnH8r6bsdkkeTK8bo7+KfS/IWbYKYmCi4PP4d17Eu2egDMKt/GeDdyCweuTAXMnNPGwKBm0mq0a2NroCCI7zI9cjakOsRjkLNgUCKwqwAcRu6eZW65SigOqGQM4Ctjsr1jYmlFvf+tijg0UAVJvv5NB0KK3PamAqjtTP3tetHuLJUrbw5T1YTV/S79mZB8znUWfTEt4lbfdX4xbn6uFjN1ooaze86PGk5sIqplIHegwvjoK03OxDiJBS/ClLEGL0bN/rRK0ul4FCippXeCLf66ma7I7nblh5UGvWgJ9agGnvI6LduS+7lzpL26AUn1tLSg0qjXlDY2UPeljxx2s5pl1/Crn7HvXiFftRQYkl+vKDj31YuLMxjRjxe0RgJOQeS3CKsupAQPHv0auMhjZecf/txXrYh6SgM/65eeZRckE0AZjTn2+Xxb0+3u230gZjFv7naSLLG7vnzRVLDhtx6vRE4xGLrjnAfQy8kTwfOOu3szYWlxKIzbYMZWExSibxPTFJZMAUvNI56ZZWPxK0OzwCjYRp1HhlgNMzH4PseK7LH5oFiBOoUksVwp/WOoN84CijVAUYokBgVbudqHUul4ABj1GkrvRFu8VWtu2AWUpDse1sUSPhdyBDEq3jiHYrEBIUPnFPUO60H1i6Fk9Dc41hRwZwTbovG6lI3j5Ouk1Z5Q9zqq98gDvB9i6fztmoKJ1SMBnr1ZCyy6JT8U8ezl13pN2Etoew1PTdaPyZjxMbiySybkhOYmMbKTr+MXf3OIa5x3qWOSorozXYxmuJJ4KKNy8s1u6kxWkUSyfaGZX9CLbFkD3RFCyMlsSMy2WfZlJTN0HreUNhLIF9c1gtVTf243AttiMOYig4qCJaXgtiz62+9TOdp24HMDzH8u3n5VDLGV2EKctcsr3jhVHUV5bW3xCz+KRjCDO+8Yjx/m/IdzefY4c+GHg2zRP6t4CVeyk29XUkM/748n5Z8RI9DzJgDHS6Pf+M61CUbfSBm8U95U6xXRkNR2pQyIsbhw4a5R0zeMVHi3x/Yts9iW42Bihj9XXNaT7lgdk4MXnyVl0vAqguyfABm9c+jcI/8/T2bqRRsaQVx9s1GWDwfcBuNlfKS1ivKNo7CbKBUXGxjxF1sfiz1mq2TddoKb4xbfFXTPCI9NR7cpZkL5RPXneCbcap4Y6C7HNREW2JmBKu+JcYZoizsDmqswBTQuBaLFyoUf6M5skLa6AhAq5Ny+3TSZ1fULMUFwtPlLNB9ZBu/kzDlbuDmPKQw03NxHlKcFTJlypqD8xBhdywbqujdw54rpvV09ieWDVeHM31ygYvSNmdPLmQRDkQeF5IPJ/qJWvS3opW92YbOSphL3BaxiiQjpyMMcjgqr3jZR3XRRh+IWfwLj5NT/Jv39aN8yj+Dh/5x1ub7jxDky+gsMCbx2h6v1CR41tGA0iVQeu/RitZ/Qen9sec/vOznev4T7vwalNb058/a54CMy3jHxlRx9OfBef278iNe9+f7DX7iTl5/gzJeklY+ZZfCZ/W0RJBaJpub4mRz14IQxXaJi31EKqNPSTvFxT4CxzLLl7jYo7Ut5VNc7DeiwLRTnPZWkOe0XeJqv6MP97aMNmKoMfme+zJk98YM2efODNlza4YuWPZm+ApvzvAVc3eGr/D2DF8x92f8/JfhM1Gua9k1xRPl2gpQp2tBEEFSdS2IIiblupZ7ErJrRSwjnISkXFsB6rRxIFW71KRcu05Z6Y1wi6/s4KPccaeTcy0F2dO1lljxIK+6Rl64LKzrWnt0ArbuMdAYB2Gyrq0Af1o4sihU6uRYqE5b6Z5wi692v0TYNpnXVoBGXWuNS8mvjorOayFfh09lS+sRy/zGUUj+tRQkUwtHlrVKnRRs1WkrvDFu8VXuB9GRsYlY2KkBk7qOmXJQismyrmMSHeHSZGHXoGTe075j4cpYScnCTg3I1MKSZ62iJwtbNdu6mRoL4Oq0bmRn6mCysFMDJnXVxJos63owmTBZ2PVgMsF2JhOEtZQs7NQc3BUlLLh3WXZy87Ju2u0XsS9+615Gn4cly2RhpwZM6toPLmKCZV37BSLeZGFXUhZsH13QMbGWkoWdGjCpjSXL2mVPFrbrtl1+Cbv67XspvD5Z2KkBk7p2MYvBsq69e1VH66RR5rFN+4FlE2MlJQs7NWBSJxYs6yw7WdhZt+zyS9jVb99LRbZ+0rBTAz517Y25fVCto/b6wsQO7/Zr2k9mR4WVlGTs1IBVbSwJ1y578rFdt+3yS9jVb7eXxqEuKdmpQVxbY7/cacp13ZWNTEp2jP6tTLtym8JKSkp2akCrNpaUa5c9Kdmu23b5Jezq93zHNlJrRMlODUhacf/BpyLlOp4U1q2Skh1vxtmnnVwuYyUlJTs1oFUnFiStLDsp2Vm37PJL2NVvd8idE67kZKcG6aYa3YaIPx0xWjseCy27cgta2kWLFVZSMrNTg1SVsWRfu+xJznbdtncvYQG7+q17GUFzP1d+dmrAsa7HvjCy63EsbGz2shfmyrZjnSixkpKfnRpwrBML/nWWnfzsrFt2+SXs6rffMaZQJz87NeBYR2tVnxt9fAfZdeFnRy9bkr9dd9BkjbWU/OzUgGOdWPCvs+zkZ2fdsssvYl/89jt2giY8CdqpATsu3oOd0Wq/8I7c22NhaMd7K5pb2Mcb3ibWUjK0rSHN2lgysF32ZGi7btvpl7AvfvteLqyhTI52arAYGjWIwVbj2Wz4ZSdHO/w572knq19YS8nRTg141saSg+2yJ0fbdctuv4h98duxJFgYk6NtBbjWEei1UyzsiGAjLk6OdgSIERvLeiKyEo5CcrStANdaOLKwVerkaKtOW+mNcIuvHlIOL1ltDsGkOdl185bJwY6gqN0rRzsCpzM53AiqJtZScrRTA551YsHBzrKTo511y354OAvsi9+6l4KF+cnRtgJc65g6390zhIJhap0/bJPBjclE4iQkR9sKLGkYBxa2S02OtuuUld4Qt/oq94OPdC0cbSvAta6jcfVDLOwabetaONo1NhFttsYGwsRJSI62FWjSxoGF7VKTo+06ZaU3xK2+ulFXL16Jo50ajL21cYMDOdgx9JwvHG0MVNe0nwu/O6XkaKeGQ7SxGLez7ORoZ92yyy9hV799L827Qw7fizRgW0cNTfudN8yQjvpYeNrhz92n/eLit7CSkqqdms4ZmLCgY2fZydbOumWXX8KufntAB313YWynBtTrGIJj8Y6s7Dp+7Fjbm6TteqLTSDs6F2MtJW/bGs5IjCU322VP6rbrll1+Cfvi9xw4tIYm9nZqsCQZnbc2dMY8enT1pT0W9nYMBX2f9sY1fGItJXs7NYWhv7AbQ3+VneztrJt2+0Xsi98eONDtT/a2FWBhO80Afnb090H0SPZ2jAZB8pH1AmdZOArJ3rYCLGzjwM92qcnedp2y0hvhFl/d2Z5gHyZ92woQsSO91E5RtKNbZG4mB7Oi7M3BEWpLnIR9DmZUgIptHDjaLjUJ3K5T1lPkyMCtvrpV7JheTRJ3asDGjuAzWiGJ2vEuxtRt8rjjzd2vtI83+5hYS0nlTg042YkFXTvLTjZ31i27/BJ29Vv3Mtrc3ldCd2outkLuNCBhu57chTAJ3fU8mQ+VnTRAYyUloTs1IGUnFoTtLDsJ3Vm37PJL2NVvh+w3SRtJ6E4N2MkRVmMaCsJ2hNxHWwnddXRM9z7tHdwoYyUloTs1IGUnFoTtLDsJ3Vk37faL2Be/57RwIzf4mNPCjev0tzJvSeOOfr8nh9tj3LlP+0W2sLCSktedGhC0E9s5pVTZfU45Vbfs8kvY1W/fCxlOk92dGjC0o4aDe2o3ereVx8LuruZq0R5h98RaSnZ3ahhHCkv2tsue7G7XbfvuTcfArn77XkBSXOjdqQFPG2nNpHDjaZyPheEdZbZ72g9OIYSVlCTv1GAoTCyI3Fl28ryzbtnll7Cr3w4aL+3HE9XbClC2KynOJHPXgtMZJtU7gr/7TivOdRBOQlK9rUCoZBzI3C41qd6uk1Z5Q9zqq0eRO4bYSfW2ApTtuarQGYffbaF6xzyn7mnl6oBwFJLqbQUo28KRzK1SJ9XbywW0yhviVl9ncnFjwnFJLm5Mdiq5WJLKHWmnfj0WqreTr7YfTrICeziZec9UpJKdSBAK25k8VNl9TS6WY9rl1+7k4raU/V5xXrT6yfVODWgY0VtHj0E+d/Tr0aNMunf0/fHm2n6gNzJWUjK+UwPqdmIxU8+yk/Sddcsuv4Rd/Z7xO9YskvedGky7ot1VnfDGPiIizcn7jjZ73dN+Im41VlLyvlPDdISxSmWo7OR9Z92yyy9hV79ngoHrZSJ+WwEWd7zMvYjeHa/5CDMn9xuJgj2tJ+hVwp3iWvnnkwJcbuFI8lapkwGuOm2lN8Itvtr9pvUyjxtSNE6uO9bMdk67saQ5aeDhBiNbWE9sxxOOQp2T8lOHJ2FSThyI3i41aeCuU9ammLf1V1/9Jt1Oq51+k24n9TWSKeGP5FPxdiX/2r15dzzsHcc0GCsp+eCpqUxONafl2lJ2UsKz7uJRcp/YF79nCvEgw9wt3Brwu5e5VLTgUfq2PxZmeHggiijsmg8RaynJ4daQ5W0sCeAue/LDXbfs8kvYF7+dt+LxF5Minhr2njsPy2DoEJmmsq0U8chE9TrtFUlKYS3Nntca9p7Gsmd12bPndd202y9iX/z+ORTxSLXUsnDErQDhG2PqLSZ4DL0kSnmBNBi5zdYg4SROQjLFrSgc/4EjH1ylTrK46rT1FOkK8cbiq9s/IvHJF5dCnO8ax0NqWXjHIvF1Pxa+eMRDtUx789lLeEsgTb64FeB9C0lGuAqefHHVK6t8vDyd7vcrX/zGSR4LX1wKLhHfyOuIEX7jQJCFL87FcCoq18KJs5B8cSuY/CdOjHCWuvDFWaet9Ea4xdfZh9UXwnhqkH6M1tiSMh4t9XjhjGPJ9Z52xqzGdifu2+zDtuR/JxbU8Cw7meNZN+32i9gXvz1v1xE9yUpNDeil0TZjjkZyeLTbmMNN8ng9dCCQ7DtiB2MlJTfVGhLAjSU53GVP8rjrtp1+Gbv67d8F7M+FPW4NOeDo99ijI4d08wS4OqNHME5t7yCjGitp8sdTczECJJYEcZc9+eOu23Z5SuyL3zObpSMDr8xmhWLnwsOOtgimeIzOe1to5DF2X3taL4T5wlFIJrkVGKGNA1/cpSaZ3HXK2hX7ALf46nlIidudhHIrbk54arQm0sbrePG3a+GUBz+qb2k9Ig43jkLSyq042B8DR/K4Sp3MctVpK70RbvHV7pMYnexyK0AVj1rbLg555MKOcyGYV/GvaR2zny1xEpJjbgUI48ZxzVqlziVt1SkrvRFu8XXyscqxMM2tYLOMVasuLnmEaPuxMM3jx7yutO7a1QcchdmaqSBjXDhyyVXqZJqrTluLjla79ldfZyr0WqnmVoA1Hs/pMtk8nmBd2eZR3F7TWidH3UKyza0Acdw4MMpdatLNXSet8oa41deZpjr3x0I5Tw1KiSnMlaxyLLzsj4V1HqGb1lBv8hX2BSvpnBQxaQ4mnoTdyXVQ2Uk7z7pl707MKGl1LmU7HcKNcqKeW4FVlIhkxthIgjmWvo6FfV55TqiteCOEk5AEdCvInBGuMNVctOPOy1qqk1Z5Q9zq62enof9pKutHOdD/ZYjof9qfz8FEjyAl0oILE/3HJ4x/xp/hZ1HRxVofHft+/PgnW6non8U1HnveNpyq4lPQG3N78xj0tEucdp18nhdYXq7g2efzCsnLFTz9fF4hebmC55/PKyQvV/AE9HmF5HnFX2JvQZzQsXwrgOL8FgDSoiXtEhf7+HmXDxVIXOwjXryOaae42ElOSDvFz36zfn19t+XieSzzdnVF3q+uWG7YV/iOfcW8ZV/he/YV86Z9he/aV8zbfukT/nMH4McUKvINI165Pv0IfKFjKjx+p089BN/oVv2ph085Bl/gWFA7P/kcfIFjy/f90W8u/IwO6nOdSF9w3FW8RJfPEpKm8pRcnI0VwzDYujgUWxKmx5GHPKcdR2wba2nLc+ClGSP13hNL7ovLpoSrVbfs8kvYF7/nKZhVC9LzFMzKAHrXBu+Ny9miblRLqG87SOq5k2SyYCWd88AzaXZy9ITtPPJMZfd5fKnqll1+Cbv6rU2s3JJQsEnpbVFwZWTDmpUWUAomjhSirks7JmhtWCwTTsKVhx1JgUS6cHGEepZKAZeyTirsDXAvvs7TwmLltmK/wNuiaQUk2cqNHNH4Ksn3tyW+KB3ryLbvmGYYS6nOM+Kt4cnWwladbM2y6zwjXnXbLk+FXf2epwx18gG2M5sINAdWGPls64ENYVECshCnpwjxmpdz2hszn8Ra2r2QkBqeUWJsJeVbZVcnirNu2u2XzjdZ/XYTObhGlfuJrNk3fywCuVN9qQE5AEmsj5wb2cW5EdbsnfktB2v4MQfzefQ1B5bd5+Gtqtt2eaoPQax+a/+uqEU9sgFvi2LHMTUHXspYyMPO2b5biLrigw1nWm88VeEkdCcdrGjxJhpXcbyNSq2e4LvO6gN3Jm71Ve7jhGJswiD9wgrs8r3BK4u733CKk1jTYlMwSWnrjcm+cBJ2UymswNkWxjF5q1KbN3y4TlrlTRerdl9K1XkM8WLuIO++TcWBg7Bu7to4Cnu7jSnA5TBnDPhpr6Tf8AwtSftymLM0F9L/wu488FNlU9IN190Kewnki8vqZnHsKpZ/dFiAFEi5njiuFS9Gx2edigV1iNprcmID35E4C/OAj5JrwTVxyMO61EzTuk5a5Q1wL77ObhYJ+HnEuzU8pr0WBoQ8wr0ijyrJnY2WfW4eyrgtWEnziHdrur95oYWCspQ9j3h33bLLr+7vUtSlbJ22v5G31Haftg8FdruQC6DVa3EPKOA3xzxEitjvmDgLKBWXSoGlbOP4YRmVunlFxHXmZ2cS9+Jr7sQ/2RXWy1vxT/adTCXFb7fj0KyL3QSFD7zT6EhkvdgfE3e5cxbnQ4qOc7SEGy3/ylIp4FLWKSu9EW71dQ4Ml8hOPQeGi0sWJY9qw/4EHiilHTrKQoK3f6W9FC93lCMllu2B4dCOhZrYpmN4WDYlDwx3n/YkB+z1B37nwQ6RV2pYd3qbis6VKSwZYo2XWybLZsldE1aEZa/cyqDVMkos2V2TtivUPbGRXJtlU/Koc1lhL4F8cTkPBCwMT1seCFi48/jA5oVKmibP+o3umcIHDiWxcUbWHf28cBRYqjr9m1Eu6QsXM+t3lkoBl7JOWeUecauvfqEKNyLhNOK3VbP7izLa1iRWBualRx5WwoMg037EBobESmp5Xok1WgkXVivhKrv4nrPukhtlF+zqd36xIYJCrve/LYrGAQsnzGZoDxrtS+gPEkfacZZtYiXV9csF0BQOdsJuHOxU9jaP4lfd0NgtQF+cnmfTx086QNXDhTTFZ1pGBBBn+zE2xbJznefs7ogfbEcaKLGStvyKj04RjjP/TmPLzSPQWbYkR8mx1GU7/Ers6rfuJQJDrT0rkrWmmS8s3l8wN3YOum2e/7/jzOC0V3IKibU0PwFgzUbWLbFjlnDNsinhatUtu/0i9sXveYggF9k99EnBoY905MahD2xkCRoQjjut5EgLJyGHPis4hAnnwQ2lzqFPdW4+N3DiVl+zeWCHwuUtHFaAthCvaLw0V2EGBKdzSnJjjPUL27kgZqykK4/EtkYfLCP21MfOWDYlNw9spfAHzUpCX5zOc4y2Ykbs26Io4Hqd3GJdY1Qd72UvFhR1ns0KsCYSmBLKtVuhabfi95MbF7YsmMIHjl3bnVbxYG/NCral2PfKSdxasvInf6Sp/uRPRHDR+kghbrsljsuYR6Yd88jESirrJ39OJhpEJQhsHKg6y6bkCGFrabdfxL74rUbBOJ7nSb8tCiRSbm4SL7tOkzh2Cxqp4iWVtTNnRZyE6nVuKxCQGId4xKVuXud2ndyHJm+4Q231dR7JypC05PwICgUxGyNIBTFcr6XkRhGr0bY3xqnCNke7ZY4w0DSe8Shs9fmPrVry26dQ9qzpVtP5j/dSss+wj6Dl6vkhQmsOHkB9IgC7uB06Tv27LKG2xg2dsjeSBIS11PNcLWtAnUosFkSy7Jrnarlu2eUXsS9+Z0eFmWPDETiLIs/dwDTzYCxHJjglP2XkRmTv3LuwO345smiP49BUfxBEeZW+lF18gEnW7VM9roS+OO2xr+XeODVza3bs8+zklo+AOfaAdo7MlDg+nTwoRHZ8GyCxklD2B42rJxmz2zmx/Byhyy7Zhbhu2eWXsKvfmejcFdtXJzp3MoFPnJpzcCPfhcP27m5B2UttU7hw3FmbOAmHwyoreDSMcF3nZt7dgub1R7XC3uw6wXBfStUJoYW7BxSlW1G1ZSr4BQ2x5Kh1LxY8QWtp3RF2CichI1YrQOYUriI2UqkUlP0td1rlDXGrr/n0N4Zwvfnpb4z5TnBKYgLDb4hdnNtsud8tzkHsaW3YCyachNzvZgU+L0Zc4RfFWKoEPf2Ie6mwN8C9+DpnrVVZ6jlrheb0rBVLZvx22IYPjEhisyPtteTXxraJtbSvs1Zo8ttiN9dC+lJ2W2etqDs349YFu/qtzomhTO+ZD5SCO9cZ9nTuTcd6kAQlHpG5oxV8MuMk9MwHSsHd8sJxs7pKrZkPVJ3eZX9N3OrrzJLH68CPJLytmu4Pk15cTY0dB8Ht6ZYc//dj2rFhzVhLzW9JanD+ZmI37iNT2ZCcJUfdtNsvYl/8ztBDnZaPVbzdbx3YxqmtyCcY7K1a0EM7elq7+9KjptDMbbECbHPjNrHtUepmbovr3PTN4DtxL77OKDCI4iVzs9boKwVBMybZ6mL2BdsUZnY2aI5l2lv01sZKKjM7aw2zs8IWfY6JZZdzTlhZt+z2VJnd1W/9FOyMa8bkViC0vnCUUgSoF7/VUS0sfb6sO89tI27PQ9yK+9fOBEZsgSWOpyip1JIBueqUdfMa4na/+ppJfp2WpJ36VlRtt+g6FwkbkM/TgrJFmHDQigOujZNQvEffig3bLYhrt7Y1n6cF5XuiTlnlDXGrrzr8F9w7zDfYpqUglfiY/NcWpJb9tBAVHY2JbFo5axSuewe5WrMVZzRI4YL5mqVSwKXi69Iq94hbfZ05KCxD9Pw8izX8zu1GPm9wk/jBg2O35BjuPqdd+4KFldTnp0ukaT7l4ObKXV3KrvmdFtdd/S3uumBXv3/O1oWbC4MR2V/+igIUYCLf2HkXg3NHRxNlU1A3FM9YVlEqiJOw+YGIrnGDTkdc4YDCUiWox4rPYckKb4xbfdUPFR0bD2ZRj5uaC2vxjVyyWJblVwWje6TEaUNH72n7jo7VWElnfirbGn4Z0tjuLxai7L5+0XDbpl1+Cbv6rTZD1mUcGsnO1wqsNZ4cgsZsaOBOHs1PAYs/DbNhWTn2CddNftIM0YoemQ3jsNboUpunh64TCnsD3IuvigixIQ6HLvCXsAJ5xDEDPbhmOPqIU0sCzd3QqVUBfhSTB5IRZ6G4G5Ki8RyU23H8maVSQKmH5wA8EHyfuNXXeUx8RYtdjomvPP2Kx8RzicfHxFdLbpNbn3Y8MEFTyhPoUnPkMfGdB2fNso88gU5VU2GnDh8TvxTsTz9y5UCxoBU3dg7dDOHwxWqmzSQoLMeC76bTHHriLJyOBa04dJqDIpmapVLQT3tcVtgb4F58nR8oa4cH27dV03wOf+/eHYA0Uu4VYEixY+XN9gOpOmMloWxeLQ13sgurbzqp7OWbT6q75C75tmBXv5NlEDHJhi3Ab4vixLr+gWhmwzmQNw9io+C192IFTi1PYEp7fpDPGmwvNrTp4xsoGILj/TOtcqir/96XYh2Za/u4swXWKAKeWy+4UHtclhyZY6ea7I3PV5F384b3NpeUseUKp98bu2mBmWVvyzfGWbfs8kvYF789UDDun2dMpoatlKF25RmS0dHf3RI785N7UWW/GOkJK2m2cGvYwoXlGZIue54x6bptl1/Crn7ntyCgatE7vy2KjqQ7j+KKU56bvtwjQfl5nXPF1eg2cRKaIyYrEJcbV2L66VKLD7txnbTKG+JWX/PDTVp4aMUhx5GBmw7qZWh2i94FQSFHL2kVuYs4CSjV8SpTKPedOCSk7ySN3cUhh9Y37pLeNH0D4VhK1Xp94VLXdni9XskOfn8jUo3RpvL8Zwp6+khn0HpyvwFxEqpJTVZs+grMxWTH4VIlaLoSpElZ5c2mb8uUpdS/DM36J7imHyPO1wju6n+B7Qt/0p3PeI5+vcGlwO6F9hc8R/8n7uT9D0/D/xzM3x3nz7fI7jAZbgXmmzsmkS0O0t3xfdxuQbOwltajLjgLNS+VAqcoC9fupVQKcanqlPVYcC++ugF85Dl8bHL0HzKg2SqXB5Eafsv4Am1MNxt0eNjyWZQbH1G3/a4r1lKdV0vDU6WF5S277PlEXLftx4p98dsP5c8j53/03T+R5m4N8Xi8+n/19m9//P6brx//7avvv1obwWesswbPc1sr/dt//faXP1Xxj/579/8Bhs8ES2VuZHN0cmVhbQplbmRvYmoKMyAwIG9iago8PCAvVHlwZSAvUGFnZXMgL0tpZHMgWyA3IDAgUiBdIC9Db3VudCAxIC9NZWRpYUJveCBbMCAwIDM2MCAzNjBdID4+CmVuZG9iago0IDAgb2JqCjw8Ci9Qcm9jU2V0IFsvUERGIC9UZXh0XQovRm9udCA8PC9GMiAxMCAwIFIgPj4KL0V4dEdTdGF0ZSA8PCAvR1MxIDExIDAgUiAvR1MyIDEyIDAgUiAvR1MyNTcgMTMgMCBSID4+Ci9Db2xvclNwYWNlIDw8IC9zUkdCIDUgMCBSID4+Cj4+CmVuZG9iago1IDAgb2JqClsvSUNDQmFzZWQgNiAwIFJdCmVuZG9iago2IDAgb2JqCjw8IC9BbHRlcm5hdGUgL0RldmljZVJHQiAvTiAzIC9MZW5ndGggMjU5NiAvRmlsdGVyIC9GbGF0ZURlY29kZSA+PgpzdHJlYW0KeJydlndUU9kWh8+9N71QkhCKlNBraFICSA29SJEuKjEJEErAkAAiNkRUcERRkaYIMijggKNDkbEiioUBUbHrBBlE1HFwFBuWSWStGd+8ee/Nm98f935rn73P3Wfvfda6AJD8gwXCTFgJgAyhWBTh58WIjYtnYAcBDPAAA2wA4HCzs0IW+EYCmQJ82IxsmRP4F726DiD5+yrTP4zBAP+flLlZIjEAUJiM5/L42VwZF8k4PVecJbdPyZi2NE3OMErOIlmCMlaTc/IsW3z2mWUPOfMyhDwZy3PO4mXw5Nwn4405Er6MkWAZF+cI+LkyviZjg3RJhkDGb+SxGXxONgAoktwu5nNTZGwtY5IoMoIt43kA4EjJX/DSL1jMzxPLD8XOzFouEiSniBkmXFOGjZMTi+HPz03ni8XMMA43jSPiMdiZGVkc4XIAZs/8WRR5bRmyIjvYODk4MG0tbb4o1H9d/JuS93aWXoR/7hlEH/jD9ld+mQ0AsKZltdn6h21pFQBd6wFQu/2HzWAvAIqyvnUOfXEeunxeUsTiLGcrq9zcXEsBn2spL+jv+p8Of0NffM9Svt3v5WF485M4knQxQ143bmZ6pkTEyM7icPkM5p+H+B8H/nUeFhH8JL6IL5RFRMumTCBMlrVbyBOIBZlChkD4n5r4D8P+pNm5lona+BHQllgCpSEaQH4eACgqESAJe2Qr0O99C8ZHA/nNi9GZmJ37z4L+fVe4TP7IFiR/jmNHRDK4ElHO7Jr8WgI0IABFQAPqQBvoAxPABLbAEbgAD+ADAkEoiARxYDHgghSQAUQgFxSAtaAYlIKtYCeoBnWgETSDNnAYdIFj4DQ4By6By2AE3AFSMA6egCnwCsxAEISFyBAVUod0IEPIHLKFWJAb5AMFQxFQHJQIJUNCSAIVQOugUqgcqobqoWboW+godBq6AA1Dt6BRaBL6FXoHIzAJpsFasBFsBbNgTzgIjoQXwcnwMjgfLoK3wJVwA3wQ7oRPw5fgEVgKP4GnEYAQETqiizARFsJGQpF4JAkRIauQEqQCaUDakB6kH7mKSJGnyFsUBkVFMVBMlAvKHxWF4qKWoVahNqOqUQdQnag+1FXUKGoK9RFNRmuizdHO6AB0LDoZnYsuRlegm9Ad6LPoEfQ4+hUGg6FjjDGOGH9MHCYVswKzGbMb0445hRnGjGGmsVisOtYc64oNxXKwYmwxtgp7EHsSewU7jn2DI+J0cLY4X1w8TogrxFXgWnAncFdwE7gZvBLeEO+MD8Xz8MvxZfhGfA9+CD+OnyEoE4wJroRIQiphLaGS0EY4S7hLeEEkEvWITsRwooC4hlhJPEQ8TxwlviVRSGYkNimBJCFtIe0nnSLdIr0gk8lGZA9yPFlM3kJuJp8h3ye/UaAqWCoEKPAUVivUKHQqXFF4pohXNFT0VFysmK9YoXhEcUjxqRJeyUiJrcRRWqVUo3RU6YbStDJV2UY5VDlDebNyi/IF5UcULMWI4kPhUYoo+yhnKGNUhKpPZVO51HXURupZ6jgNQzOmBdBSaaW0b2iDtCkVioqdSrRKnkqNynEVKR2hG9ED6On0Mvph+nX6O1UtVU9Vvuom1TbVK6qv1eaoeajx1UrU2tVG1N6pM9R91NPUt6l3qd/TQGmYaYRr5Grs0Tir8XQObY7LHO6ckjmH59zWhDXNNCM0V2ju0xzQnNbS1vLTytKq0jqj9VSbru2hnaq9Q/uE9qQOVcdNR6CzQ+ekzmOGCsOTkc6oZPQxpnQ1df11Jbr1uoO6M3rGelF6hXrtevf0Cfos/ST9Hfq9+lMGOgYhBgUGrQa3DfGGLMMUw12G/YavjYyNYow2GHUZPTJWMw4wzjduNb5rQjZxN1lm0mByzRRjyjJNM91tetkMNrM3SzGrMRsyh80dzAXmu82HLdAWThZCiwaLG0wS05OZw2xljlrSLYMtCy27LJ9ZGVjFW22z6rf6aG1vnW7daH3HhmITaFNo02Pzq62ZLde2xvbaXPJc37mr53bPfW5nbse322N3055qH2K/wb7X/oODo4PIoc1h0tHAMdGx1vEGi8YKY21mnXdCO3k5rXY65vTW2cFZ7HzY+RcXpkuaS4vLo3nG8/jzGueNueq5clzrXaVuDLdEt71uUnddd457g/sDD30PnkeTx4SnqWeq50HPZ17WXiKvDq/XbGf2SvYpb8Tbz7vEe9CH4hPlU+1z31fPN9m31XfKz95vhd8pf7R/kP82/xsBWgHcgOaAqUDHwJWBfUGkoAVB1UEPgs2CRcE9IXBIYMj2kLvzDecL53eFgtCA0O2h98KMw5aFfR+OCQ8Lrwl/GGETURDRv4C6YMmClgWvIr0iyyLvRJlESaJ6oxWjE6Kbo1/HeMeUx0hjrWJXxl6K04gTxHXHY+Oj45vipxf6LNy5cDzBPqE44foi40V5iy4s1licvvj4EsUlnCVHEtGJMYktie85oZwGzvTSgKW1S6e4bO4u7hOeB28Hb5Lvyi/nTyS5JpUnPUp2Td6ePJninlKR8lTAFlQLnqf6p9alvk4LTduf9ik9Jr09A5eRmHFUSBGmCfsytTPzMoezzLOKs6TLnJftXDYlChI1ZUPZi7K7xTTZz9SAxESyXjKa45ZTk/MmNzr3SJ5ynjBvYLnZ8k3LJ/J9879egVrBXdFboFuwtmB0pefK+lXQqqWrelfrry5aPb7Gb82BtYS1aWt/KLQuLC98uS5mXU+RVtGaorH1futbixWKRcU3NrhsqNuI2ijYOLhp7qaqTR9LeCUXS61LK0rfb+ZuvviVzVeVX33akrRlsMyhbM9WzFbh1uvb3LcdKFcuzy8f2x6yvXMHY0fJjpc7l+y8UGFXUbeLsEuyS1oZXNldZVC1tep9dUr1SI1XTXutZu2m2te7ebuv7PHY01anVVda926vYO/Ner/6zgajhop9mH05+x42Rjf2f836urlJo6m06cN+4X7pgYgDfc2Ozc0tmi1lrXCrpHXyYMLBy994f9Pdxmyrb6e3lx4ChySHHn+b+O31w0GHe4+wjrR9Z/hdbQe1o6QT6lzeOdWV0iXtjusePhp4tLfHpafje8vv9x/TPVZzXOV42QnCiaITn07mn5w+lXXq6enk02O9S3rvnIk9c60vvG/wbNDZ8+d8z53p9+w/ed71/LELzheOXmRd7LrkcKlzwH6g4wf7HzoGHQY7hxyHui87Xe4Znjd84or7ldNXva+euxZw7dLI/JHh61HXb95IuCG9ybv56Fb6ree3c27P3FlzF3235J7SvYr7mvcbfjT9sV3qID0+6j068GDBgztj3LEnP2X/9H686CH5YcWEzkTzI9tHxyZ9Jy8/Xvh4/EnWk5mnxT8r/1z7zOTZd794/DIwFTs1/lz0/NOvm1+ov9j/0u5l73TY9P1XGa9mXpe8UX9z4C3rbf+7mHcTM7nvse8rP5h+6PkY9PHup4xPn34D94Tz+2VuZHN0cmVhbQplbmRvYmoKOSAwIG9iago8PAovVHlwZSAvRW5jb2RpbmcgL0Jhc2VFbmNvZGluZyAvV2luQW5zaUVuY29kaW5nCi9EaWZmZXJlbmNlcyBbIDQ1L21pbnVzIDk2L3F1b3RlbGVmdAoxNDQvZG90bGVzc2kgL2dyYXZlIC9hY3V0ZSAvY2lyY3VtZmxleCAvdGlsZGUgL21hY3JvbiAvYnJldmUgL2RvdGFjY2VudAovZGllcmVzaXMgLy5ub3RkZWYgL3JpbmcgL2NlZGlsbGEgLy5ub3RkZWYgL2h1bmdhcnVtbGF1dCAvb2dvbmVrIC9jYXJvbiAvc3BhY2VdCj4+CmVuZG9iagoxMCAwIG9iago8PCAvVHlwZSAvRm9udCAvU3VidHlwZSAvVHlwZTEgL05hbWUgL0YyIC9CYXNlRm9udCAvSGVsdmV0aWNhCi9FbmNvZGluZyA5IDAgUiA+PgplbmRvYmoKMTEgMCBvYmoKPDwKL1R5cGUgL0V4dEdTdGF0ZQovQ0EgMC43MDIgPj4KZW5kb2JqCjEyIDAgb2JqCjw8Ci9UeXBlIC9FeHRHU3RhdGUKL0NBIDEuMDAwID4+CmVuZG9iagoxMyAwIG9iago8PAovVHlwZSAvRXh0R1N0YXRlCi9jYSAxLjAwMAo+PgplbmRvYmoKeHJlZgowIDE0CjAwMDAwMDAwMDAgNjU1MzUgZiAKMDAwMDAwMDAyMSAwMDAwMCBuIAowMDAwMDAwMTYzIDAwMDAwIG4gCjAwMDAwMTEwNzMgMDAwMDAgbiAKMDAwMDAxMTE1NiAwMDAwMCBuIAowMDAwMDExMzA2IDAwMDAwIG4gCjAwMDAwMTEzMzkgMDAwMDAgbiAKMDAwMDAwMDIxMiAwMDAwMCBuIAowMDAwMDAwMjkyIDAwMDAwIG4gCjAwMDAwMTQwMzQgMDAwMDAgbiAKMDAwMDAxNDI5MSAwMDAwMCBuIAowMDAwMDE0Mzg4IDAwMDAwIG4gCjAwMDAwMTQ0MzcgMDAwMDAgbiAKMDAwMDAxNDQ4NiAwMDAwMCBuIAp0cmFpbGVyCjw8IC9TaXplIDE0IC9JbmZvIDEgMCBSIC9Sb290IDIgMCBSID4+CnN0YXJ0eHJlZgoxNDUzNQolJUVPRgo=" style="display: block; margin: auto;" /></p>
+<p>First, notice that there are much fewer dots in these scatterplots compared to the scatterplots we saw earlier. This is due to the <code>freq</code> setting: we specified that only 10 percent of the cases with missing values should have missingness pattern 4. Second, the scatterplots show that all the amputed data are at the left hand side of the weighted sum scores due to the <code>&quot;LEFT&quot;</code> setting in the <code>type</code> argument. Third, these figures show that there is a perfect relation between variable V2 and the weighted sum scores. Clearly, pattern 4 depends on variable V2 only, which we can remember from the <code>weights</code> matrix we used.</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">result$weights</code></pre></div>
+<pre><code>##   V1  V2  V3
+## 1  0 0.8 0.4
+## 2  0 0.0 1.0
+## 3  3 1.0 0.0
+## 4  0 1.0 0.0</code></pre>
+</div>
+<div id="odds" class="section level3">
+<h3>9. Odds</h3>
+<p>If the missingness probabilities should not depend on a continuous probability function, you will have to define the probabilities to be missing yourself. This method was first described by Brand (1999) and consists of two steps. First, one has to decide in how many groups the weighted sum scores should be divided. Second, for each group, an odds value defines the relative probability of having missing values. In other words, each candidate case will be assigned to a group based on his weighted sum score.</p>
+<p>Let us first have a look at the working of the odds values. The default <code>odds</code> matrix is as follows:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">myodds &lt;-<span class="st"> </span>result$odds
+myodds</code></pre></div>
+<pre><code>##      [,1] [,2] [,3] [,4]
+## [1,]    1    2    3    4
+## [2,]    1    2    3    4
+## [3,]    1    2    3    4
+## [4,]    1    2    3    4</code></pre>
+<p>This matrix means that for each pattern, the candidates will be divided into four groups. This division occurs based on quantiles, in order to obtain equally sized groups. The values <code>c(1, 2, 3, 4)</code> mean that a case with a weighted sum score in the highest quantile will have a probability of having missing values that is four times higher than a candidate with a weighted sum score in the lowest quantile. In Figure 3 the different probabilities that belong to this setting are shown for 100 candidates of pattern 1.</p>
+<div class="figure" style="text-align: center">
+<img src="data:application/pdf;base64,JVBERi0xLjQKJYHigeOBz4HTXHIKMSAwIG9iago8PAovQ3JlYXRpb25EYXRlIChEOjIwMTcwMjE4MjE0MTM2KQovTW9kRGF0ZSAoRDoyMDE3MDIxODIxNDEzNikKL1RpdGxlIChSIEdyYXBoaWNzIE91dHB1dCkKL1Byb2R1Y2VyIChSIDMuMy4yKQovQ3JlYXRvciAoUikKPj4KZW5kb2JqCjIgMCBvYmoKPDwgL1R5cGUgL0NhdGFsb2cgL1BhZ2VzIDMgMCBSID4+CmVuZG9iago3IDAgb2JqCjw8IC9UeXBlIC9QYWdlIC9QYXJlbnQgMyAwIFIgL0NvbnRlbnRzIDggMCBSIC9SZXNvdXJjZXMgNCAwIFIgPj4KZW5kb2JqCjggMCBvYmoKPDwKL0xlbmd0aCAyMDcwIC9GaWx0ZXIgL0ZsYXRlRGVjb2RlCj4+CnN0cmVhbQp4nK1aS49VNwze319xlrAg5B1nC2qRkFq1nZG6QCx4tQUN0M6AUPvra+dp59CKOXcW9871zRfHsT87zrljtqeb2d5tf51+Zq9Hl6eHN788ebS9ujlppbXe+PvNqw+nh99bnHf522asagP1rcoZlPbt8+X77dm9i08vPrx+cf367T/3NxO2e29eb1/wk8ZPb3//4xOKN5/fo+aP129u7j/fLp+evru8rSls/QfMLONVRIR3yiUy5t5P1x9fvnj59urtp7/vb5fv+krstQWjgt2CVqA3m7LyabPeKLT8+s326/ZhgKttjy++YtvF4x/x2xS2L6dnzze9vT6Z7Sm+3p1MseuHEyq2ebPZqBy391sXk4puu9ouTsbiN3EChjwRNMcxRJcHwtIcMxFDngicY4AhujwQDucYZseQB+JO3NGc7hTQIj4oCE2iJeqowcBiNPtwE9l4MsrBHK/iHLdOK+PHeBPZOIDKeo5XkcZvkxN6yYnybiOF1+istCs81Mp2/pHyb5odk0q5zXa3nW3xTwhttl+5fwdUrgnTmYwuNILIfbiJbLzSdoxXcY430vbxJrLxStkxXsU53gjbx5s4x8+ObXIqZNRL2yb3PrhFZI3FyZFPNreYnKLygU3WtyAF0sE7NvcW61paV7O5Y8MOUyrnkcbORRUjy+M2PhK5AVgmd0RP5Y6YudwQI5kbgmVzR/R07oiZz99c6s/Ki+JJ0zy5XV5vnpiH8+sHYwKV1IhCPZuuyI04enk94vA/s51XwR+fjXuGw7Otpxw8PBtjmY9bHoj0R2cbbE4O+zwHItDByVi99Rnxiiql4x7PKh1nmsXsPLzt7JW2x8Nl6NA6OlsH6lEObxs7nOMpgpabwy7HSuWOG47drj5j26DgeMAcdjjHc9uWxusMy/UZNS2odJjlRvtzImYS9Sz/NduERAeFcaA8HqsoZ5WhnAD49RXKWJc8lzn+6oQ9VjQKHNMQXemQ54yswDBZ4IsGn8o5PDT4TNkxZ2BDFbkNAl80hOIitouonLDBKsdtEPhqQ+l3mA1AJzZb01NPw2SOr35Aqw3TgG1F5DOwSGMvx2SOrxrK5ZJ5stQ34UkRG4GvflhiEZZY+CUWYRcL1JmytEFGT9NhIWyY+GoD3gG4H9D30nNARzSzgeOrDbpcuaYNltoRNgNU0NKmiS8akqWGjcVi9DV1RsKGjntW4OsuAl3r2S7SYrVbGMbxdRdA5wuzAa0UnsNLk+AHx1cbkvIgc1PsG9f0fFcC3/PCi+yOFcHywgvPcnz1pKm5OHbhqJRJFgvPcnznZOKxQM8lPgM5mQTLOb5nlohFMjIWmFnOS5uWWGB8rZV8sF7ywWrJB2tXTwaQnoxaejJE6ckg/RCxkoo6iZWUMwjrZhaZxvGjRvHMoholMstLvwj8yAsj/WCc9IPO0g9m0YANgNAQqCEQGrLQwPHdkylJT6YsPZmC9GSS0YR659KRjgW81mdNvXOTy70fm5wE+A0GwRCiy0DUq4hAJ8DUAZniJXQkWpDpaPLUkYE4MHRYbRV4rsNqTdweOobMdBhqidheotJJ2JEdncDTji5PHRilzP2RErGZ66AocX90mfmjPgKcdjiqNcKOck1mdjSZ2VGuT8wOrA1Z2pGoBjI7mszssOUx4oxLZDorwtfIjbg0mfnUMh9Wnzor9+Krh8Zemjx0UKR85rFFFjoZW0vnN4ttkwXHtN8Ex+yOY2bhmJEcA0OViOkIlYVMh6Pqx3Q0WfAjZh6XSJVFxKWc8iwuTWZ2oD+EHZ7lYI9cEHY0mcUlVfYPnxrG24rINYNGXJrM7EjSDmThakde7MirHbi7KHiK15KFp+VKzPzRZLaXKOJS+LLsBWRcuiz8YYL0h9erP2yS/rBpja0OMrY2r7E1ScbWLDkXqAsU9VTveJoXnmbJU3o0yu0gFko7iMncji4zO4DOUGaHLQ/PuD80dRfMH01mOjzzYa380Us7YnkgP+1osqjJjtegHKgzW2qy5zWoy4Jjoq6jf5a6TlkYJMeKPGuQq1UayyrSFfnhoMpAskDAgggDYaDk+tBhTZVhh4AFMXQ4Y0uF7TqcqWfn1DEQsCCYHciYxO3QVYYdAhbE1KEDPVicOtBVIP3REbAgpg5vSr4MHdgzFRl2CFgQUwd2sNEyHdQLWqGjI2BBsL2kUpOHDqOrDDsELIipw+bC08kPW2XYIWBBCDuclXY4u9rhrLTDyb3QnYDHtlVLpqMjYEFMHdjtArcjQpVhh4AFMXXg7iLnugtVhh0CFgTbiynd1dyLrzLsELAgGNcXf5idP8ziD7PzB2YyVdjJ03pW8r0A+4YhGNdjqclTR63RnOuRfcMQjOuxdAKT67nKsEPAgmCxNaX7nrH1VYYdAhaErGOifphd/YClfpi1flBWcn9QVkp/dAQsCGaHLfeEGdtQZdghYEEIHZCkDkirDkhSB4i9OO3KaTFqsq6nB6vJHQELgtUPvN1p7tNQZdghYEEwjgV6RsU4BlWGHQIWxNBxlz/yf/3ntgvxjxh3+8MbUEWlx63lAxIZry90/sWvPW49e3njEvWqzjpqP+kZQDmtHRYQ6+i27MoTPyZzPN2ezzaBDgRNS5ZurRHcdrnSt7R2zng6KQhRZVv6uR7y84yA0veTo6sRUJ4JO0z6bkRD1G8mos7oRtziF/oof68uIq5hoHjbl39Iuvfk+uPnP8fv3XewQnmQlHZL2DtcwtryJGpdwt3hEg6vNnj5WZfY/a+IeJ3+BfD6vYtlbmRzdHJlYW0KZW5kb2JqCjMgMCBvYmoKPDwgL1R5cGUgL1BhZ2VzIC9LaWRzIFsgNyAwIFIgXSAvQ291bnQgMSAvTWVkaWFCb3ggWzAgMCAzNjAgMzYwXSA+PgplbmRvYmoKNCAwIG9iago8PAovUHJvY1NldCBbL1BERiAvVGV4dF0KL0ZvbnQgPDwgL0YxIDEwIDAgUiAvRjIgMTEgMCBSID4+Ci9FeHRHU3RhdGUgPDwgPj4KL0NvbG9yU3BhY2UgPDwgL3NSR0IgNSAwIFIgPj4KPj4KZW5kb2JqCjUgMCBvYmoKWy9JQ0NCYXNlZCA2IDAgUl0KZW5kb2JqCjYgMCBvYmoKPDwgL0FsdGVybmF0ZSAvRGV2aWNlUkdCIC9OIDMgL0xlbmd0aCAyNTk2IC9GaWx0ZXIgL0ZsYXRlRGVjb2RlID4+CnN0cmVhbQp4nJ2Wd1RT2RaHz703vVCSEIqU0GtoUgJIDb1IkS4qMQkQSsCQACI2RFRwRFGRpggyKOCAo0ORsSKKhQFRsesEGUTUcXAUG5ZJZK0Z37x5782b3x/3fmufvc/dZ+991roAkPyDBcJMWAmADKFYFOHnxYiNi2dgBwEM8AADbADgcLOzQhb4RgKZAnzYjGyZE/gXvboOIPn7KtM/jMEA/5+UuVkiMQBQmIzn8vjZXBkXyTg9V5wlt0/JmLY0Tc4wSs4iWYIyVpNz8ixbfPaZZQ858zKEPBnLc87iZfDk3CfjjTkSvoyRYBkX5wj4uTK+JmODdEmGQMZv5LEZfE42ACiS3C7mc1NkbC1jkigygi3jeQDgSMlf8NIvWMzPE8sPxc7MWi4SJKeIGSZcU4aNkxOL4c/PTeeLxcwwDjeNI+Ix2JkZWRzhcgBmz/xZFHltGbIiO9g4OTgwbS1tvijUf138m5L3dpZehH/uGUQf+MP2V36ZDQCwpmW12fqHbWkVAF3rAVC7/YfNYC8AirK+dQ59cR66fF5SxOIsZyur3NxcSwGfaykv6O/6nw5/Q198z1K+3e/lYXjzkziSdDFDXjduZnqmRMTIzuJw+Qzmn4f4Hwf+dR4WEfwkvogvlEVEy6ZMIEyWtVvIE4gFmUKGQPifmvgPw/6k2bmWidr4EdCWWAKlIRpAfh4AKCoRIAl7ZCvQ730LxkcD+c2L0ZmYnfvPgv59V7hM/sgWJH+OY0dEMrgSUc7smvxaAjQgAEVAA+pAG+gDE8AEtsARuAAP4AMCQSiIBHFgMeCCFJABRCAXFIC1oBiUgq1gJ6gGdaARNIM2cBh0gWPgNDgHLoHLYATcAVIwDp6AKfAKzEAQhIXIEBVSh3QgQ8gcsoVYkBvkAwVDEVAclAglQ0JIAhVA66BSqByqhuqhZuhb6Ch0GroADUO3oFFoEvoVegcjMAmmwVqwEWwFs2BPOAiOhBfByfAyOB8ugrfAlXADfBDuhE/Dl+ARWAo/gacRgBAROqKLMBEWwkZCkXgkCREhq5ASpAJpQNqQHqQfuYpIkafIWxQGRUUxUEyUC8ofFYXiopahVqE2o6pRB1CdqD7UVdQoagr1EU1Ga6LN0c7oAHQsOhmdiy5GV6Cb0B3os+gR9Dj6FQaDoWOMMY4Yf0wcJhWzArMZsxvTjjmFGcaMYaaxWKw61hzrig3FcrBibDG2CnsQexJ7BTuOfYMj4nRwtjhfXDxOiCvEVeBacCdwV3ATuBm8Et4Q74wPxfPwy/Fl+EZ8D34IP46fISgTjAmuhEhCKmEtoZLQRjhLuEt4QSQS9YhOxHCigLiGWEk8RDxPHCW+JVFIZiQ2KYEkIW0h7SedIt0ivSCTyUZkD3I8WUzeQm4mnyHfJ79RoCpYKgQo8BRWK9QodCpcUXimiFc0VPRUXKyYr1iheERxSPGpEl7JSImtxFFapVSjdFTphtK0MlXZRjlUOUN5s3KL8gXlRxQsxYjiQ+FRiij7KGcoY1SEqk9lU7nUddRG6lnqOA1DM6YF0FJppbRvaIO0KRWKip1KtEqeSo3KcRUpHaEb0QPo6fQy+mH6dfo7VS1VT1W+6ibVNtUrqq/V5qh5qPHVStTa1UbU3qkz1H3U09S3qXep39NAaZhphGvkauzROKvxdA5tjssc7pySOYfn3NaENc00IzRXaO7THNCc1tLW8tPK0qrSOqP1VJuu7aGdqr1D+4T2pA5Vx01HoLND56TOY4YKw5ORzqhk9DGmdDV1/XUluvW6g7ozesZ6UXqFeu169/QJ+iz9JP0d+r36UwY6BiEGBQatBrcN8YYswxTDXYb9hq+NjI1ijDYYdRk9MlYzDjDON241vmtCNnE3WWbSYHLNFGPKMk0z3W162Qw2szdLMasxGzKHzR3MBea7zYct0BZOFkKLBosbTBLTk5nDbGWOWtItgy0LLbssn1kZWMVbbbPqt/pobW+dbt1ofceGYhNoU2jTY/OrrZkt17bG9tpc8lzfuavnds99bmdux7fbY3fTnmofYr/Bvtf+g4Ojg8ihzWHS0cAx0bHW8QaLxgpjbWadd0I7eTmtdjrm9NbZwVnsfNj5FxemS5pLi8ujecbz+PMa54256rlyXOtdpW4Mt0S3vW5Sd113jnuD+wMPfQ+eR5PHhKepZ6rnQc9nXtZeIq8Or9dsZ/ZK9ilvxNvPu8R70IfiE+VT7XPfV8832bfVd8rP3m+F3yl/tH+Q/zb/GwFaAdyA5oCpQMfAlYF9QaSgBUHVQQ+CzYJFwT0hcEhgyPaQu/MN5wvnd4WC0IDQ7aH3wozDloV9H44JDwuvCX8YYRNRENG/gLpgyYKWBa8ivSLLIu9EmURJonqjFaMTopujX8d4x5THSGOtYlfGXorTiBPEdcdj46Pjm+KnF/os3LlwPME+oTjh+iLjRXmLLizWWJy++PgSxSWcJUcS0YkxiS2J7zmhnAbO9NKApbVLp7hs7i7uE54Hbwdvku/KL+dPJLkmlSc9SnZN3p48meKeUpHyVMAWVAuep/qn1qW+TgtN25/2KT0mvT0Dl5GYcVRIEaYJ+zK1M/Myh7PMs4qzpMucl+1cNiUKEjVlQ9mLsrvFNNnP1IDERLJeMprjllOT8yY3OvdInnKeMG9gudnyTcsn8n3zv16BWsFd0VugW7C2YHSl58r6VdCqpat6V+uvLlo9vsZvzYG1hLVpa38otC4sL3y5LmZdT5FW0ZqisfV+61uLFYpFxTc2uGyo24jaKNg4uGnupqpNH0t4JRdLrUsrSt9v5m6++JXNV5VffdqStGWwzKFsz1bMVuHW69vctx0oVy7PLx/bHrK9cwdjR8mOlzuX7LxQYVdRt4uwS7JLWhlc2V1lULW16n11SvVIjVdNe61m7aba17t5u6/s8djTVqdVV1r3bq9g7816v/rOBqOGin2YfTn7HjZGN/Z/zfq6uUmjqbTpw37hfumBiAN9zY7NzS2aLWWtcKukdfJgwsHL33h/093GbKtvp7eXHgKHJIcef5v47fXDQYd7j7COtH1n+F1tB7WjpBPqXN451ZXSJe2O6x4+Gni0t8elp+N7y+/3H9M9VnNc5XjZCcKJohOfTuafnD6Vderp6eTTY71Leu+ciT1zrS+8b/Bs0Nnz53zPnen37D953vX8sQvOF45eZF3suuRwqXPAfqDjB/sfOgYdBjuHHIe6Lztd7hmeN3ziivuV01e9r567FnDt0sj8keHrUddv3ki4Ib3Ju/noVvqt57dzbs/cWXMXfbfkntK9ivua9xt+NP2xXeogPT7qPTrwYMGDO2PcsSc/Zf/0frzoIflhxYTORPMj20fHJn0nLz9e+Hj8SdaTmafFPyv/XPvM5Nl3v3j8MjAVOzX+XPT806+bX6i/2P/S7mXvdNj0/VcZr2Zel7xRf3PgLett/7uYdxMzue+x7ys/mH7o+Rj08e6njE+ffgP3hPP7ZW5kc3RyZWFtCmVuZG9iago5IDAgb2JqCjw8Ci9UeXBlIC9FbmNvZGluZyAvQmFzZUVuY29kaW5nIC9XaW5BbnNpRW5jb2RpbmcKL0RpZmZlcmVuY2VzIFsgNDUvbWludXMgOTYvcXVvdGVsZWZ0CjE0NC9kb3RsZXNzaSAvZ3JhdmUgL2FjdXRlIC9jaXJjdW1mbGV4IC90aWxkZSAvbWFjcm9uIC9icmV2ZSAvZG90YWNjZW50Ci9kaWVyZXNpcyAvLm5vdGRlZiAvcmluZyAvY2VkaWxsYSAvLm5vdGRlZiAvaHVuZ2FydW1sYXV0IC9vZ29uZWsgL2Nhcm9uIC9zcGFjZV0KPj4KZW5kb2JqCjEwIDAgb2JqCjw8IC9UeXBlIC9Gb250IC9TdWJ0eXBlIC9UeXBlMSAvTmFtZSAvRjEgL0Jhc2VGb250IC9aYXBmRGluZ2JhdHMgPj4KZW5kb2JqCjExIDAgb2JqCjw8IC9UeXBlIC9Gb250IC9TdWJ0eXBlIC9UeXBlMSAvTmFtZSAvRjIgL0Jhc2VGb250IC9IZWx2ZXRpY2EKL0VuY29kaW5nIDkgMCBSID4+CmVuZG9iagp4cmVmCjAgMTIKMDAwMDAwMDAwMCA2NTUzNSBmIAowMDAwMDAwMDIxIDAwMDAwIG4gCjAwMDAwMDAxNjMgMDAwMDAgbiAKMDAwMDAwMjQzNCAwMDAwMCBuIAowMDAwMDAyNTE3IDAwMDAwIG4gCjAwMDAwMDI2NDEgMDAwMDAgbiAKMDAwMDAwMjY3NCAwMDAwMCBuIAowMDAwMDAwMjEyIDAwMDAwIG4gCjAwMDAwMDAyOTIgMDAwMDAgbiAKMDAwMDAwNTM2OSAwMDAwMCBuIAowMDAwMDA1NjI2IDAwMDAwIG4gCjAwMDAwMDU3MTAgMDAwMDAgbiAKdHJhaWxlcgo8PCAvU2l6ZSAxMiAvSW5mbyAxIDAgUiAvUm9vdCAyIDAgUiA+PgpzdGFydHhyZWYKNTgwNwolJUVPRgo=" alt="Figure 3: Probabilities to have missing values for the four groups in pattern 1 and the relation between the groups and the weighted sum scores" />
+<p class="caption">
+Figure 3: Probabilities to have missing values for the four groups in pattern 1 and the relation between the groups and the weighted sum scores
+</p>
+</div>
+<p>As can be seen, there are indeed four groups in pattern 1. The groups have an approximately equal size, with each a certain probability to obtain missing values. The probability of group 4 is indeed four times as large as the probability of group 1.</p>
+<div class="figure" style="text-align: center">
+<img src="data:application/pdf;base64,JVBERi0xLjQKJYHigeOBz4HTXHIKMSAwIG9iago8PAovQ3JlYXRpb25EYXRlIChEOjIwMTcwMjE4MjE0MTM2KQovTW9kRGF0ZSAoRDoyMDE3MDIxODIxNDEzNikKL1RpdGxlIChSIEdyYXBoaWNzIE91dHB1dCkKL1Byb2R1Y2VyIChSIDMuMy4yKQovQ3JlYXRvciAoUikKPj4KZW5kb2JqCjIgMCBvYmoKPDwgL1R5cGUgL0NhdGFsb2cgL1BhZ2VzIDMgMCBSID4+CmVuZG9iago3IDAgb2JqCjw8IC9UeXBlIC9QYWdlIC9QYXJlbnQgMyAwIFIgL0NvbnRlbnRzIDggMCBSIC9SZXNvdXJjZXMgNCAwIFIgPj4KZW5kb2JqCjggMCBvYmoKPDwKL0xlbmd0aCAyODExIC9GaWx0ZXIgL0ZsYXRlRGVjb2RlCj4+CnN0cmVhbQp4nK1ay44cxxG8z1f0kTywVe/HVYItQIAN2FzIB0EHWZYBCzuyTcLw7zsisqq7hiQMznAPS25WRdYjKzMyq3r99t3mt1+3f1/+tPx8/XT56v2fv/16+/n9xe3OuW399/3Pv12++n2A3tPfNx/20WH/mOxz31MawtN1++HV96+36rZXP717vb3xeXv1j5/++noLaHn+Zfs+vP5xe/ru8rune2dfpnyzrMSnvQCR3N7CZ0wfb6ZffrbUdxe2jHHcFprfe91C8jtGePfL9pfttwNsC/7m7ScW/PabP6K15u2/lx9+3Nz2t4vfvsPPrxevxf7hUtre+hY6xi/bdZti3Uvcnre3F+/bnv0JOOQTAR2fFsSUD0Twda/1RBzyiSh1T25BTPlAROjAHAfikA/Ei5hjGL3trmOSFPeYh8QprLdjf2evSWevj20PZ/cQl/7a9rj0m3j2Bxg4nf1DXPqxnLz0m8j+eyLHfRA5+jcULjWnPStwXr2Jr7enX+mbHPpzdDucf+iGe3V9THsdyv7zlWPYfYQZE+OEyu5e3YCQ7aZ797wh50Ezr44Nv2BcWvTPsEyZUy5RObuHuPRbDB79Jp79IwJn/xCXfou/o9/Es39E3+wf4tn/xa5Yyu49bQzHoHHv8ETv817jopvu0C15j2XRzXd4Md2oL7rlnghQ1jh16x2OiHlDWnTb1I3RcUWTzWIseykLnY3+yWej/yS00X8w2gAslDYRk9Mm4iS1gThYbSAWWpuIyWsTcRLbZ2fEL4o4WdoPS29P7zYsIwPp7JdeqO1LYP6hmZ9pZvQ+vTvO6f9ot72iF9kq9vu1fYx7puH9HsMDk4/Ek0ki90/uQM+YnH7jH1k7Qrnpv+AeWHvcA3prpFPeP7lXQuqIjQfsVv1esXKXZ166c+64N6jXQu68Xx0VJLMiqTk+oB5wXKyC46hD7z10b1zqJ6vcqY6yrOLQM6UH1B05ij7zULhg0wGzJ6ToB2K1RMZqcMi5Dxi+pT3h1EPdc3okWhDidoepDxHFYGy/pwd27osTTbmwx0dCHR6f0M2a6BGfQx2YuYfK+9v96rRZ2xBu9YG1I/F3hAuuF48wBepeGMyXvuf6CW2fEU1wSHhWz9sVsuFBqag2ni8+1b2lRb7BP19Q0CGgkAFCkmkxArIWHCRE3HUjNVxialjkFa8RQtZ9oyGmIkcAQWQ4anPkF2gEREtY5RVvIyTetQKpoWgErBqJoWc6GzU8mW6RV7xGyGGvRSdcNQI8Re6qQKUdYMC4yDd4jQBWrNgnONlpF0km8n3um87TF/kGrxFw0igtfWoM0KtK5ZhEFnAAaBQv2j7lFW9r0A2JpQBO+6rTg8l8LqxIOKcX/Zzyirc1oFTk+bs91bEGT8rHJaaONZS2yiteIyDUAq8ugXRBfyjsCsjVyFXP8g/Wlae84u00K289pDkvnwRn8EKD2M95nl5d5RVvu4DlzEuLzgL5sjgrFOK0XFrlFW+WBNUCAUWns0gyGRVTGqeX/SqvePMorCqoPuiKC1gOrqOpgjwIu+irvOJtBFSiWba10zxtb6cHHw1hlVe8RsDFlZm6Ybs6C/hg5hydx/4sy7qyyive7ID7E+ZElZi1CwyO5XrULT2Ofbe8yit+xibnYJVaR2wyj4DPvFYdHLPZIq94W0PfC2zbOk1+VezB+XyLdL1nnQ3J/ZRXvEbgHRyrhqKxHG4Bjl5dB6vh2FDRL/KKN49ymhPHXuw0E03EMsLN0+Och3yD1wggH54/4r2LYWAichIKCpuT70dxlVf85MlOXgx0NVqyWwVa6czGk/LBQ17xZofGGwoNZlyNLpZiWGXSqlGI57rKK952EcQYQY8aV62SDOM7a2howOhkmEO+wRs/dLpGAA2A5K+26ozoTVzss/gCPrjIK978IasFSRmrvOqYkLOGrEcGUGJnS9Q+t0Pue/OGQDnCMdihp0FEBscw2RByJ+apbAiTOVk2RNXbhg4qEoGwiW7KQvAq6OXbPLHtkBuTiRCwjyqESoK6WnpIUzZE0RmBLnDY123KRWWwITqplIkV4X8VtTLTmKxHExdVtTqFFhEmw6Zt7KWYL2GlTRZDseLclG23WCmjrDF/EWEydhv8sdti+amZPRqZf8iGyKoerBYwi1GGf4UxC+KqButomsXLxiYfD0h+G5ONFyQ/J7NZqnbHp6Eqi9l1x2SzmFMpjMmcIUyujmWDjWEZAQGi5wMdap6yjeFVAcAJuiFMxkrrXGmV76NO8Tr9OthVstnU8eKrCM1CDLkro2sdkXdbubj8A12MSJMNoVvccPHrNuWsu6FFQ9fKsMkuqyP95zRlIXK03VX6JREmd5VuNkaiTwWfh01RB4Y2ZUNUWpl53E5uyu2wKXyss+Kpp49VN2WzR1QUwk8tsofMu97pY2mc7fSx0KZsiCQb8mwNYXJ1xywod2LT4EV7wbqQeoZsCB0idYIhhlxVL2qlWR9T6BZC4AiTn7Ih7G2j66p+3Q65KTsPTw7cf2cdY/7B5yaTbQzlJQa0LzMaumzcBwL0pOebQtowLqTPmTxPn5kKQeA0y5T7jEoNl3Sjjl5vrt04XbIhVGqTUVjLbFP26fCxajkXjmOeTC+MUz48Oak6idrLlKuqNs7C7waN952iZQAJW5po/YWmLHoyQf8QOwNkcgfjvltmsSOvU54RyTiHn+tdccqwTZ/MAB5kZaCbgnGpMqTdHMSlQTsFqw0uHXJbuZRnAoaubvi5fNaf1oo6A96q/PBzb2+84wE0BBX1w0iYBdmHd4Gm69gNQi0LQhpCIMchBHQJMERSpUUXuUVYy4kwDSGwdiQiPnl25Zamm1Qox7lORBknPxGmMXMcb3z2bHG1t0Y+tMbjQ91AWMuJMI3J2MFZuNfBx254db1BWMuJMA2tlHe2rkzKeyaWWFX14XY+Py5MRLeMfiCkYYgoBFjfNyH0Fszw7+0GYS0nwjRmfiKiK8VeVTwryvV8vCBGy4EYGnZy2SrUPrzQCk3eYAbbToS1nAjTMItF3WmRsbJlsKaohiGPHGcIazkRpmGzGIeT7GUx3DCzU5U0P6AOhLWcCNOYK+X9DQ7s4lgpNeLHiGOWgZCGMVTkpwYWNrWLofTISA+aK52I8Zh/IKRhs3TyRYhNbwCYxe6ZSU/cK8JaToRpzJoQ7hZQ78Y0Wa6q8jxy/kD0URVMhDSmxbLV9fowQYvxTaaF+XFjIqzlRJjG9CBwaUBKMT6GB3nKZ26ZiJl9JiIdkY3bIaMSBboyB2dlVKLObh8g1LIgpGGcnWga5rRuJ9ct0pPechaEtZwI0zAvtBcjEK1yHH8RO1Qe6A1CLQsizCxIC5HHQe/FLJZJm6o0+ooYLQdiaExeR2lDL4xtsDYrnBSOyB4IazkRpjFzVKwa3Ko1qz2Y66q/QVjLiTAN+8Sp2ouOo0QZkY1552YF/AFCLQsiHrkU10rVgJmTXXW9ikmMM+qXgRgtB2JomMUakyIXaDYF8/FzTF1saog6bToQ5bDpS/5pxKe/vr29+fOVl/0Op/TNp1b9AmbF3TGiJC6femr94un50aHwc2pUAaQ3KFyBeLjBXhgDM/Eir3jenL94CXSKyinbIEB+4a1TNpp1PAx++o1huA1lUMJIbl++iObo1jS0LaLp/ScGfyxiIKzlRJjGXMQdfwpQbj9vS6wiKFp7fET79t0///Ov4+80XmAGVs8xfDRFeMEpSN3VfTRFfMEpon0y+3CKtE7x0c/lf8ol825lbmRzdHJlYW0KZW5kb2JqCjMgMCBvYmoKPDwgL1R5cGUgL1BhZ2VzIC9LaWRzIFsgNyAwIFIgXSAvQ291bnQgMSAvTWVkaWFCb3ggWzAgMCAzNjAgMzYwXSA+PgplbmRvYmoKNCAwIG9iago8PAovUHJvY1NldCBbL1BERiAvVGV4dF0KL0ZvbnQgPDwgL0YxIDEwIDAgUiAvRjIgMTEgMCBSID4+Ci9FeHRHU3RhdGUgPDwgPj4KL0NvbG9yU3BhY2UgPDwgL3NSR0IgNSAwIFIgPj4KPj4KZW5kb2JqCjUgMCBvYmoKWy9JQ0NCYXNlZCA2IDAgUl0KZW5kb2JqCjYgMCBvYmoKPDwgL0FsdGVybmF0ZSAvRGV2aWNlUkdCIC9OIDMgL0xlbmd0aCAyNTk2IC9GaWx0ZXIgL0ZsYXRlRGVjb2RlID4+CnN0cmVhbQp4nJ2Wd1RT2RaHz703vVCSEIqU0GtoUgJIDb1IkS4qMQkQSsCQACI2RFRwRFGRpggyKOCAo0ORsSKKhQFRsesEGUTUcXAUG5ZJZK0Z37x5782b3x/3fmufvc/dZ+991roAkPyDBcJMWAmADKFYFOHnxYiNi2dgBwEM8AADbADgcLOzQhb4RgKZAnzYjGyZE/gXvboOIPn7KtM/jMEA/5+UuVkiMQBQmIzn8vjZXBkXyTg9V5wlt0/JmLY0Tc4wSs4iWYIyVpNz8ixbfPaZZQ858zKEPBnLc87iZfDk3CfjjTkSvoyRYBkX5wj4uTK+JmODdEmGQMZv5LEZfE42ACiS3C7mc1NkbC1jkigygi3jeQDgSMlf8NIvWMzPE8sPxc7MWi4SJKeIGSZcU4aNkxOL4c/PTeeLxcwwDjeNI+Ix2JkZWRzhcgBmz/xZFHltGbIiO9g4OTgwbS1tvijUf138m5L3dpZehH/uGUQf+MP2V36ZDQCwpmW12fqHbWkVAF3rAVC7/YfNYC8AirK+dQ59cR66fF5SxOIsZyur3NxcSwGfaykv6O/6nw5/Q198z1K+3e/lYXjzkziSdDFDXjduZnqmRMTIzuJw+Qzmn4f4Hwf+dR4WEfwkvogvlEVEy6ZMIEyWtVvIE4gFmUKGQPifmvgPw/6k2bmWidr4EdCWWAKlIRpAfh4AKCoRIAl7ZCvQ730LxkcD+c2L0ZmYnfvPgv59V7hM/sgWJH+OY0dEMrgSUc7smvxaAjQgAEVAA+pAG+gDE8AEtsARuAAP4AMCQSiIBHFgMeCCFJABRCAXFIC1oBiUgq1gJ6gGdaARNIM2cBh0gWPgNDgHLoHLYATcAVIwDp6AKfAKzEAQhIXIEBVSh3QgQ8gcsoVYkBvkAwVDEVAclAglQ0JIAhVA66BSqByqhuqhZuhb6Ch0GroADUO3oFFoEvoVegcjMAmmwVqwEWwFs2BPOAiOhBfByfAyOB8ugrfAlXADfBDuhE/Dl+ARWAo/gacRgBAROqKLMBEWwkZCkXgkCREhq5ASpAJpQNqQHqQfuYpIkafIWxQGRUUxUEyUC8ofFYXiopahVqE2o6pRB1CdqD7UVdQoagr1EU1Ga6LN0c7oAHQsOhmdiy5GV6Cb0B3os+gR9Dj6FQaDoWOMMY4Yf0wcJhWzArMZsxvTjjmFGcaMYaaxWKw61hzrig3FcrBibDG2CnsQexJ7BTuOfYMj4nRwtjhfXDxOiCvEVeBacCdwV3ATuBm8Et4Q74wPxfPwy/Fl+EZ8D34IP46fISgTjAmuhEhCKmEtoZLQRjhLuEt4QSQS9YhOxHCigLiGWEk8RDxPHCW+JVFIZiQ2KYEkIW0h7SedIt0ivSCTyUZkD3I8WUzeQm4mnyHfJ79RoCpYKgQo8BRWK9QodCpcUXimiFc0VPRUXKyYr1iheERxSPGpEl7JSImtxFFapVSjdFTphtK0MlXZRjlUOUN5s3KL8gXlRxQsxYjiQ+FRiij7KGcoY1SEqk9lU7nUddRG6lnqOA1DM6YF0FJppbRvaIO0KRWKip1KtEqeSo3KcRUpHaEb0QPo6fQy+mH6dfo7VS1VT1W+6ibVNtUrqq/V5qh5qPHVStTa1UbU3qkz1H3U09S3qXep39NAaZhphGvkauzROKvxdA5tjssc7pySOYfn3NaENc00IzRXaO7THNCc1tLW8tPK0qrSOqP1VJuu7aGdqr1D+4T2pA5Vx01HoLND56TOY4YKw5ORzqhk9DGmdDV1/XUluvW6g7ozesZ6UXqFeu169/QJ+iz9JP0d+r36UwY6BiEGBQatBrcN8YYswxTDXYb9hq+NjI1ijDYYdRk9MlYzDjDON241vmtCNnE3WWbSYHLNFGPKMk0z3W162Qw2szdLMasxGzKHzR3MBea7zYct0BZOFkKLBosbTBLTk5nDbGWOWtItgy0LLbssn1kZWMVbbbPqt/pobW+dbt1ofceGYhNoU2jTY/OrrZkt17bG9tpc8lzfuavnds99bmdux7fbY3fTnmofYr/Bvtf+g4Ojg8ihzWHS0cAx0bHW8QaLxgpjbWadd0I7eTmtdjrm9NbZwVnsfNj5FxemS5pLi8ujecbz+PMa54256rlyXOtdpW4Mt0S3vW5Sd113jnuD+wMPfQ+eR5PHhKepZ6rnQc9nXtZeIq8Or9dsZ/ZK9ilvxNvPu8R70IfiE+VT7XPfV8832bfVd8rP3m+F3yl/tH+Q/zb/GwFaAdyA5oCpQMfAlYF9QaSgBUHVQQ+CzYJFwT0hcEhgyPaQu/MN5wvnd4WC0IDQ7aH3wozDloV9H44JDwuvCX8YYRNRENG/gLpgyYKWBa8ivSLLIu9EmURJonqjFaMTopujX8d4x5THSGOtYlfGXorTiBPEdcdj46Pjm+KnF/os3LlwPME+oTjh+iLjRXmLLizWWJy++PgSxSWcJUcS0YkxiS2J7zmhnAbO9NKApbVLp7hs7i7uE54Hbwdvku/KL+dPJLkmlSc9SnZN3p48meKeUpHyVMAWVAuep/qn1qW+TgtN25/2KT0mvT0Dl5GYcVRIEaYJ+zK1M/Myh7PMs4qzpMucl+1cNiUKEjVlQ9mLsrvFNNnP1IDERLJeMprjllOT8yY3OvdInnKeMG9gudnyTcsn8n3zv16BWsFd0VugW7C2YHSl58r6VdCqpat6V+uvLlo9vsZvzYG1hLVpa38otC4sL3y5LmZdT5FW0ZqisfV+61uLFYpFxTc2uGyo24jaKNg4uGnupqpNH0t4JRdLrUsrSt9v5m6++JXNV5VffdqStGWwzKFsz1bMVuHW69vctx0oVy7PLx/bHrK9cwdjR8mOlzuX7LxQYVdRt4uwS7JLWhlc2V1lULW16n11SvVIjVdNe61m7aba17t5u6/s8djTVqdVV1r3bq9g7816v/rOBqOGin2YfTn7HjZGN/Z/zfq6uUmjqbTpw37hfumBiAN9zY7NzS2aLWWtcKukdfJgwsHL33h/093GbKtvp7eXHgKHJIcef5v47fXDQYd7j7COtH1n+F1tB7WjpBPqXN451ZXSJe2O6x4+Gni0t8elp+N7y+/3H9M9VnNc5XjZCcKJohOfTuafnD6Vderp6eTTY71Leu+ciT1zrS+8b/Bs0Nnz53zPnen37D953vX8sQvOF45eZF3suuRwqXPAfqDjB/sfOgYdBjuHHIe6Lztd7hmeN3ziivuV01e9r567FnDt0sj8keHrUddv3ki4Ib3Ju/noVvqt57dzbs/cWXMXfbfkntK9ivua9xt+NP2xXeogPT7qPTrwYMGDO2PcsSc/Zf/0frzoIflhxYTORPMj20fHJn0nLz9e+Hj8SdaTmafFPyv/XPvM5Nl3v3j8MjAVOzX+XPT806+bX6i/2P/S7mXvdNj0/VcZr2Zel7xRf3PgLett/7uYdxMzue+x7ys/mH7o+Rj08e6njE+ffgP3hPP7ZW5kc3RyZWFtCmVuZG9iago5IDAgb2JqCjw8Ci9UeXBlIC9FbmNvZGluZyAvQmFzZUVuY29kaW5nIC9XaW5BbnNpRW5jb2RpbmcKL0RpZmZlcmVuY2VzIFsgNDUvbWludXMgOTYvcXVvdGVsZWZ0CjE0NC9kb3RsZXNzaSAvZ3JhdmUgL2FjdXRlIC9jaXJjdW1mbGV4IC90aWxkZSAvbWFjcm9uIC9icmV2ZSAvZG90YWNjZW50Ci9kaWVyZXNpcyAvLm5vdGRlZiAvcmluZyAvY2VkaWxsYSAvLm5vdGRlZiAvaHVuZ2FydW1sYXV0IC9vZ29uZWsgL2Nhcm9uIC9zcGFjZV0KPj4KZW5kb2JqCjEwIDAgb2JqCjw8IC9UeXBlIC9Gb250IC9TdWJ0eXBlIC9UeXBlMSAvTmFtZSAvRjEgL0Jhc2VGb250IC9aYXBmRGluZ2JhdHMgPj4KZW5kb2JqCjExIDAgb2JqCjw8IC9UeXBlIC9Gb250IC9TdWJ0eXBlIC9UeXBlMSAvTmFtZSAvRjIgL0Jhc2VGb250IC9IZWx2ZXRpY2EKL0VuY29kaW5nIDkgMCBSID4+CmVuZG9iagp4cmVmCjAgMTIKMDAwMDAwMDAwMCA2NTUzNSBmIAowMDAwMDAwMDIxIDAwMDAwIG4gCjAwMDAwMDAxNjMgMDAwMDAgbiAKMDAwMDAwMzE3NSAwMDAwMCBuIAowMDAwMDAzMjU4IDAwMDAwIG4gCjAwMDAwMDMzODIgMDAwMDAgbiAKMDAwMDAwMzQxNSAwMDAwMCBuIAowMDAwMDAwMjEyIDAwMDAwIG4gCjAwMDAwMDAyOTIgMDAwMDAgbiAKMDAwMDAwNjExMCAwMDAwMCBuIAowMDAwMDA2MzY3IDAwMDAwIG4gCjAwMDAwMDY0NTEgMDAwMDAgbiAKdHJhaWxlcgo8PCAvU2l6ZSAxMiAvSW5mbyAxIDAgUiAvUm9vdCAyIDAgUiA+PgpzdGFydHhyZWYKNjU0OAolJUVPRgo=" alt="Figure 4: Division of odds groups over variables $V_2$ and $V_3$" />
+<p class="caption">
+Figure 4: Division of odds groups over variables <span class="math inline">\(V_2\)</span> and <span class="math inline">\(V_3\)</span>
+</p>
+</div>
+<p>The relation between the groups and the variable values is shown in Figure 4. Because the relationship between variable V2 and the weighted sum scores is high (due to the <code>weights</code> setting), the groups can be distinguished very well. Besides, for higher values of V2, the weighted sum scores are higher. These are the cases that are placed in group 4. Therefore, they are at the right hand side of the V2 scale. For variable V3, the relation between the values and the group allocation is small. This again is due to the <code>weights</code> setting. Still, because of the odds values, group 4 is much more to the right of the V3 scale than group 1, 2 and 3.</p>
+<p>Let us now dig deeper into the contents of the <code>odds</code> matrix. The #rows of this matrix is equal to #patterns. The #columns can be defined by the user and depends on the desired amputation procedure.</p>
+<p>The amount of values in each row defines the number of groups that will be created from the weighted sum scores in that specific pattern. This number can be different for the different patterns. The values themselves define the odds probabilities of having missing values. Note that the values are relative values. For instance, a setting of <code>c(2, 6)</code> is similar to <code>c(3, 9)</code>.</p>
+<p>The cells in the <code>odds</code> matrix that are not used, should be filled with NAs. Let us define the matrix as follows.</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">myodds[<span class="dv">3</span>, ] &lt;-<span class="st"> </span><span class="kw">c</span>(<span class="dv">1</span>, <span class="dv">0</span>, <span class="dv">0</span>, <span class="dv">1</span>)
+myodds[<span class="dv">4</span>, ] &lt;-<span class="st"> </span><span class="kw">c</span>(<span class="dv">1</span>, <span class="dv">1</span>, <span class="dv">2</span>, <span class="dv">2</span>)
+myodds &lt;-<span class="st"> </span><span class="kw">cbind</span>(myodds, <span class="kw">matrix</span>(<span class="kw">c</span>(<span class="ot">NA</span>, <span class="ot">NA</span>, <span class="ot">NA</span>, <span class="dv">1</span>, <span class="ot">NA</span>, <span class="ot">NA</span>, <span class="ot">NA</span>, <span class="dv">1</span>), <span class="dt">nrow =</span> <span class="dv">4</span>, <span class="dt">byrow =</span> F))
+myodds</code></pre></div>
+<pre><code>##      [,1] [,2] [,3] [,4] [,5] [,6]
+## [1,]    1    2    3    4   NA   NA
+## [2,]    1    2    3    4   NA   NA
+## [3,]    1    0    0    1   NA   NA
+## [4,]    1    1    2    2    1    1</code></pre>
+<p>We keep the default setting of the first two patterns. Then, for pattern 3, the weighted sum scores will be divided into four groups. The odds values mean that candidates with low weighted sum scores will have a probability to have missing values that is equal to the probability of candidates with high weighted sum scores. However, candidates with weighted sum scores around average will not be made missing. Because pattern 3 depends on variable V1 with a weight of 3 and on variable V2 with a weight of 1, the effect will be most visible for variable V1.</p>
+<p>The weighted sum scores of the fourth pattern will be divided into six groups. All candidates will have a probability of having missing values, but this chance is larger for candidates with weighted sum scores around average.</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">result &lt;-<span class="st"> </span><span class="kw">ampute</span>(testdata, <span class="dt">prop =</span> <span class="fl">0.3</span>, <span class="dt">patterns =</span> mypatterns, 
+                 <span class="dt">freq =</span> <span class="kw">c</span>(<span class="fl">0.7</span>, <span class="fl">0.1</span>, <span class="fl">0.1</span>, <span class="fl">0.1</span>), <span class="dt">weights =</span> myweights,
+                 <span class="dt">cont =</span> <span class="ot">FALSE</span>, <span class="dt">odds =</span> myodds)</code></pre></div>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">bwplot</span>(result, <span class="dt">which.pat =</span> <span class="kw">c</span>(<span class="dv">3</span>, <span class="dv">4</span>), <span class="dt">descriptives =</span> <span class="ot">FALSE</span>)</code></pre></div>
+<pre><code>## $`Boxplot pattern 3`</code></pre>
+<p><img src="data:application/pdf;base64,JVBERi0xLjQKJYHigeOBz4HTXHIKMSAwIG9iago8PAovQ3JlYXRpb25EYXRlIChEOjIwMTcwMjE4MjE0MTM3KQovTW9kRGF0ZSAoRDoyMDE3MDIxODIxNDEzNykKL1RpdGxlIChSIEdyYXBoaWNzIE91dHB1dCkKL1Byb2R1Y2VyIChSIDMuMy4yKQovQ3JlYXRvciAoUikKPj4KZW5kb2JqCjIgMCBvYmoKPDwgL1R5cGUgL0NhdGFsb2cgL1BhZ2VzIDMgMCBSID4+CmVuZG9iago3IDAgb2JqCjw8IC9UeXBlIC9QYWdlIC9QYXJlbnQgMyAwIFIgL0NvbnRlbnRzIDggMCBSIC9SZXNvdXJjZXMgNCAwIFIgPj4KZW5kb2JqCjggMCBvYmoKPDwKL0xlbmd0aCAxMjI5IC9GaWx0ZXIgL0ZsYXRlRGVjb2RlCj4+CnN0cmVhbQp4nMVYS28bNxC+76+Yo30wwxk+91inD8BAA6QS0kOQg5ukgA2vktou+vc7fC3p1VqrF5CDVvpEzjfDGZIflwg3gHAP/3Tv+XO97t48/fHbNXx+6qSQUkL7fPq86d78Stx//TcgidyQHgmjdMLoDNYDfLz4+fb5Fr7cPT0/XsIVGri4++sSSMLFv8933zZPcLeB77fPz19DM3HzBtTlJ1jfdL+sY0jNB7QUGkEbgQp6K7wFchjA41f4EzbT/nksb1czY1m9fcf/OgP/dR8/gYQvHcINf+47jMP5vUvOPD8VDKC0cDqjB1jlVlTMUZszbNo9Ckm1PcHaTgqFqu0ZNu1sYJv2BEP7IZWSk0qlpxPWgeMs6lCoiyu6hPV9yHqg3scWyQnMxri/MSlhODPOhVQGY3moLbFjl2wP9kvOC5lsxwG/P2L2z7owNkx+RYL66OGn4fv+8XkvtG+M333bXDUE+66Bk+a8McITEKpQ2KHA4KyHhynkCnq1BBNVgai86NU2TMy74Ug1gauu74U3PKP4S3LUGfbswnP7BCJhSNoiTmwVm14onMGZfjcsZBO4GssBXHYDilEqjLVNBgYokITzcfkjV6z6GaBg3n771COZ5HIUBuJJFjw3DGncIwMZEn3qUaoQnQ5QSjbGkAeTXDJBTkwNIRcq+SwETQiJIHscCZoIFlZjXFOY1hSrzSP4kAzukX5YXvBhBkpBNq6oh7CWYs9xRb5uHZUszAMrepoxf7mQWjIMZFZYE8niD5ReEKeCM6LlQiyvm1sMO9ix1uTtciJ2m9s58zOK7fyutpo5AyiMg0ldUYesvtj/4pzpdQ/tM+7gNcpp875Rzvu+Dnk86szEom4ks/aCj0chvx9wqkxnyO181C9zi8oJcgccsM6mnGhUDPI46URvhNLL2rk4vpPyjLxxWR93DMUb4oh7FXfMbey0sP0yTnwVWxdoZnDmX8Ij3wSzJnBOXDi1+jCioWCSvdBB06eY0AtHizjzVWxNOOps4+J/CRe+KX5dT5HFoOaKtaZgZjZRa4j3++prgILDGrVJMbNNqs/IQcSC5lqOPP6Rg0z8ihylJtEvc5QajnGUMSW/zJFz1MSROLLfkaOJo9Qp+R05mjhOU1a0Muwf6FQY58HSSpK3H4qrFk+XVlZFaWJ+aCmWXeY+LIJjzYlPUeoIaSZphORSeh1Oacea8yFQz8V+FvXYuWfOyseP0eadzo8XZ+T3RWVfqPPWe+M58ruPPJPSIe8/QJ7JyBjkcfJMnu3wdXk+KX9K8Qzp6z2NisfUelGT2+tNTerQXNWUHuNdTe5RL2tyj3pbk3o01zWlx3hfk3vUC5u9i3hSNkj38f5N6/CqMBRMPKNseFnewuzamEWc+SpWJo58G2f/S3jkm2DWUJZX4zj7UmA4gxTc+6hdW1ihEcYv48RXMZ+KrZvBhX8JF74pfv0MQqyaNVesyhlLGa85wixiYayx8CxKmJdPn2Q7m+TyjBTExwflX1Ck4Y8UIc9aJ46c8uR2gFLCGkYeUnLLFClDTRR5EiWvI0MTRWbIXkeKJorTDiDhJENhn+TlpQ4/gCiJgny8g6Q51T7Lxr5zoc9u7D9GOHc6P144yZlwbdAKpzqrcO6Me7Wtg93/TbMYf2VuZHN0cmVhbQplbmRvYmoKMyAwIG9iago8PCAvVHlwZSAvUGFnZXMgL0tpZHMgWyA3IDAgUiBdIC9Db3VudCAxIC9NZWRpYUJveCBbMCAwIDM2MCAzNjBdID4+CmVuZG9iago0IDAgb2JqCjw8Ci9Qcm9jU2V0IFsvUERGIC9UZXh0XQovRm9udCA8PCAvRjEgMTAgMCBSIC9GMiAxMSAwIFIgPj4KL0V4dEdTdGF0ZSA8PCA+PgovQ29sb3JTcGFjZSA8PCAvc1JHQiA1IDAgUiA+Pgo+PgplbmRvYmoKNSAwIG9iagpbL0lDQ0Jhc2VkIDYgMCBSXQplbmRvYmoKNiAwIG9iago8PCAvQWx0ZXJuYXRlIC9EZXZpY2VSR0IgL04gMyAvTGVuZ3RoIDI1OTYgL0ZpbHRlciAvRmxhdGVEZWNvZGUgPj4Kc3RyZWFtCnicnZZ3VFPZFofPvTe9UJIQipTQa2hSAkgNvUiRLioxCRBKwJAAIjZEVHBEUZGmCDIo4ICjQ5GxIoqFAVGx6wQZRNRxcBQblklkrRnfvHnvzZvfH/d+a5+9z91n733WugCQ/IMFwkxYCYAMoVgU4efFiI2LZ2AHAQzwAANsAOBws7NCFvhGApkCfNiMbJkT+Be9ug4g+fsq0z+MwQD/n5S5WSIxAFCYjOfy+NlcGRfJOD1XnCW3T8mYtjRNzjBKziJZgjJWk3PyLFt89pllDznzMoQ8GctzzuJl8OTcJ+ONORK+jJFgGRfnCPi5Mr4mY4N0SYZAxm/ksRl8TjYAKJLcLuZzU2RsLWOSKDKCLeN5AOBIyV/w0i9YzM8Tyw/FzsxaLhIkp4gZJlxTho2TE4vhz89N54vFzDAON40j4jHYmRlZHOFyAGbP/FkUeW0ZsiI72Dg5ODBtLW2+KNR/Xfybkvd2ll6Ef+4ZRB/4w/ZXfpkNALCmZbXZ+odtaRUAXesBULv9h81gLwCKsr51Dn1xHrp8XlLE4ixnK6vc3FxLAZ9rKS/o7/qfDn9DX3zPUr7d7+VhePOTOJJ0MUNeN25meqZExMjO4nD5DOafh/gfB/51HhYR/CS+iC+URUTLpkwgTJa1W8gTiAWZQoZA+J+a+A/D/qTZuZaJ2vgR0JZYAqUhGkB+HgAoKhEgCXtkK9DvfQvGRwP5zYvRmZid+8+C/n1XuEz+yBYkf45jR0QyuBJRzuya/FoCNCAARUAD6kAb6AMTwAS2wBG4AA/gAwJBKIgEcWAx4IIUkAFEIBcUgLWgGJSCrWAnqAZ1oBE0gzZwGHSBY+A0OAcugctgBNwBUjAOnoAp8ArMQBCEhcgQFVKHdCBDyByyhViQG+QDBUMRUByUCCVDQkgCFUDroFKoHKqG6qFm6FvoKHQaugANQ7egUWgS+hV6ByMwCabBWrARbAWzYE84CI6EF8HJ8DI4Hy6Ct8CVcAN8EO6ET8OX4BFYCj+BpxGAEBE6ooswERbCRkKReCQJESGrkBKkAmlA2pAepB+5ikiRp8hbFAZFRTFQTJQLyh8VheKilqFWoTajqlEHUJ2oPtRV1ChqCvURTUZros3RzugAdCw6GZ2LLkZXoJvQHeiz6BH0OPoVBoOhY4wxjhh/TBwmFbMCsxmzG9OOOYUZxoxhprFYrDrWHOuKDcVysGJsMbYKexB7EnsFO459gyPidHC2OF9cPE6IK8RV4FpwJ3BXcBO4GbwS3hDvjA/F8/DL8WX4RnwPfgg/jp8hKBOMCa6ESEIqYS2hktBGOEu4S3hBJBL1iE7EcKKAuIZYSTxEPE8cJb4lUUhmJDYpgSQhbSHtJ50i3SK9IJPJRmQPcjxZTN5CbiafId8nv1GgKlgqBCjwFFYr1Ch0KlxReKaIVzRU9FRcrJivWKF4RHFI8akSXslIia3EUVqlVKN0VOmG0rQyVdlGOVQ5Q3mzcovyBeVHFCzFiOJD4VGKKPsoZyhjVISqT2VTudR11EbqWeo4DUMzpgXQUmmltG9og7QpFYqKnUq0Sp5KjcpxFSkdoRvRA+jp9DL6Yfp1+jtVLVVPVb7qJtU21Suqr9XmqHmo8dVK1NrVRtTeqTPUfdTT1Lepd6nf00BpmGmEa+Rq7NE4q/F0Dm2OyxzunJI5h+fc1oQ1zTQjNFdo7tMc0JzW0tby08rSqtI6o/VUm67toZ2qvUP7hPakDlXHTUegs0PnpM5jhgrDk5HOqGT0MaZ0NXX9dSW69bqDujN6xnpReoV67Xr39An6LP0k/R36vfpTBjoGIQYFBq0Gtw3xhizDFMNdhv2Gr42MjWKMNhh1GT0yVjMOMM43bjW+a0I2cTdZZtJgcs0UY8oyTTPdbXrZDDazN0sxqzEbMofNHcwF5rvNhy3QFk4WQosGixtMEtOTmcNsZY5a0i2DLQstuyyfWRlYxVtts+q3+mhtb51u3Wh9x4ZiE2hTaNNj86utmS3Xtsb22lzyXN+5q+d2z31uZ27Ht9tjd9Oeah9iv8G+1/6Dg6ODyKHNYdLRwDHRsdbxBovGCmNtZp13Qjt5Oa12Oub01tnBWex82PkXF6ZLmkuLy6N5xvP48xrnjbnquXJc612lbgy3RLe9blJ3XXeOe4P7Aw99D55Hk8eEp6lnqudBz2de1l4irw6v12xn9kr2KW/E28+7xHvQh+IT5VPtc99XzzfZt9V3ys/eb4XfKX+0f5D/Nv8bAVoB3IDmgKlAx8CVgX1BpKAFQdVBD4LNgkXBPSFwSGDI9pC78w3nC+d3hYLQgNDtoffCjMOWhX0fjgkPC68JfxhhE1EQ0b+AumDJgpYFryK9Issi70SZREmieqMVoxOim6Nfx3jHlMdIY61iV8ZeitOIE8R1x2Pjo+Ob4qcX+izcuXA8wT6hOOH6IuNFeYsuLNZYnL74+BLFJZwlRxLRiTGJLYnvOaGcBs700oCltUunuGzuLu4TngdvB2+S78ov508kuSaVJz1Kdk3enjyZ4p5SkfJUwBZUC56n+qfWpb5OC03bn/YpPSa9PQOXkZhxVEgRpgn7MrUz8zKHs8yzirOky5yX7Vw2JQoSNWVD2Yuyu8U02c/UgMREsl4ymuOWU5PzJjc690iecp4wb2C52fJNyyfyffO/XoFawV3RW6BbsLZgdKXnyvpV0Kqlq3pX668uWj2+xm/NgbWEtWlrfyi0LiwvfLkuZl1PkVbRmqKx9X7rW4sVikXFNza4bKjbiNoo2Di4ae6mqk0fS3glF0utSytK32/mbr74lc1XlV992pK0ZbDMoWzPVsxW4dbr29y3HShXLs8vH9sesr1zB2NHyY6XO5fsvFBhV1G3i7BLsktaGVzZXWVQtbXqfXVK9UiNV017rWbtptrXu3m7r+zx2NNWp1VXWvdur2DvzXq/+s4Go4aKfZh9OfseNkY39n/N+rq5SaOptOnDfuF+6YGIA33Njs3NLZotZa1wq6R18mDCwcvfeH/T3cZsq2+nt5ceAockhx5/m/jt9cNBh3uPsI60fWf4XW0HtaOkE+pc3jnVldIl7Y7rHj4aeLS3x6Wn43vL7/cf0z1Wc1zleNkJwomiE59O5p+cPpV16unp5NNjvUt675yJPXOtL7xv8GzQ2fPnfM+d6ffsP3ne9fyxC84Xjl5kXey65HCpc8B+oOMH+x86Bh0GO4cch7ovO13uGZ43fOKK+5XTV72vnrsWcO3SyPyR4etR12/eSLghvcm7+ehW+q3nt3Nuz9xZcxd9t+Se0r2K+5r3G340/bFd6iA9Puo9OvBgwYM7Y9yxJz9l//R+vOgh+WHFhM5E8yPbR8cmfScvP174ePxJ1pOZp8U/K/9c+8zk2Xe/ePwyMBU7Nf5c9PzTr5tfqL/Y/9LuZe902PT9VxmvZl6XvFF/c+At623/u5h3EzO577HvKz+Yfuj5GPTx7qeMT59+A/eE8/tlbmRzdHJlYW0KZW5kb2JqCjkgMCBvYmoKPDwKL1R5cGUgL0VuY29kaW5nIC9CYXNlRW5jb2RpbmcgL1dpbkFuc2lFbmNvZGluZwovRGlmZmVyZW5jZXMgWyA0NS9taW51cyA5Ni9xdW90ZWxlZnQKMTQ0L2RvdGxlc3NpIC9ncmF2ZSAvYWN1dGUgL2NpcmN1bWZsZXggL3RpbGRlIC9tYWNyb24gL2JyZXZlIC9kb3RhY2NlbnQKL2RpZXJlc2lzIC8ubm90ZGVmIC9yaW5nIC9jZWRpbGxhIC8ubm90ZGVmIC9odW5nYXJ1bWxhdXQgL29nb25layAvY2Fyb24gL3NwYWNlXQo+PgplbmRvYmoKMTAgMCBvYmoKPDwgL1R5cGUgL0ZvbnQgL1N1YnR5cGUgL1R5cGUxIC9OYW1lIC9GMSAvQmFzZUZvbnQgL1phcGZEaW5nYmF0cyA+PgplbmRvYmoKMTEgMCBvYmoKPDwgL1R5cGUgL0ZvbnQgL1N1YnR5cGUgL1R5cGUxIC9OYW1lIC9GMiAvQmFzZUZvbnQgL0hlbHZldGljYQovRW5jb2RpbmcgOSAwIFIgPj4KZW5kb2JqCnhyZWYKMCAxMgowMDAwMDAwMDAwIDY1NTM1IGYgCjAwMDAwMDAwMjEgMDAwMDAgbiAKMDAwMDAwMDE2MyAwMDAwMCBuIAowMDAwMDAxNTkzIDAwMDAwIG4gCjAwMDAwMDE2NzYgMDAwMDAgbiAKMDAwMDAwMTgwMCAwMDAwMCBuIAowMDAwMDAxODMzIDAwMDAwIG4gCjAwMDAwMDAyMTIgMDAwMDAgbiAKMDAwMDAwMDI5MiAwMDAwMCBuIAowMDAwMDA0NTI4IDAwMDAwIG4gCjAwMDAwMDQ3ODUgMDAwMDAgbiAKMDAwMDAwNDg2OSAwMDAwMCBuIAp0cmFpbGVyCjw8IC9TaXplIDEyIC9JbmZvIDEgMCBSIC9Sb290IDIgMCBSID4+CnN0YXJ0eHJlZgo0OTY2CiUlRU9GCg==" style="display: block; margin: auto;" /></p>
+<pre><code>## 
+## $`Boxplot pattern 4`</code></pre>
+<p><img src="data:application/pdf;base64,JVBERi0xLjQKJYHigeOBz4HTXHIKMSAwIG9iago8PAovQ3JlYXRpb25EYXRlIChEOjIwMTcwMjE4MjE0MTM3KQovTW9kRGF0ZSAoRDoyMDE3MDIxODIxNDEzNykKL1RpdGxlIChSIEdyYXBoaWNzIE91dHB1dCkKL1Byb2R1Y2VyIChSIDMuMy4yKQovQ3JlYXRvciAoUikKPj4KZW5kb2JqCjIgMCBvYmoKPDwgL1R5cGUgL0NhdGFsb2cgL1BhZ2VzIDMgMCBSID4+CmVuZG9iago3IDAgb2JqCjw8IC9UeXBlIC9QYWdlIC9QYXJlbnQgMyAwIFIgL0NvbnRlbnRzIDggMCBSIC9SZXNvdXJjZXMgNCAwIFIgPj4KZW5kb2JqCjggMCBvYmoKPDwKL0xlbmd0aCAxMjE4IC9GaWx0ZXIgL0ZsYXRlRGVjb2RlCj4+CnN0cmVhbQp4nMVYS28bNxC+76/g0T6YIYfvY50+AAMNkEpID0EObpICNiwltVz073eGwyVXq7VWDwc+SPZncr4ZDjn8ONbiRmhxL/7p3uPnetm92fzx27X4vOmUVEqJ4ffm87p78yvg/OXfQoMsA/zFWKsgnS1guRIfL36+fboVX+42T4+X4ko7cXH316UAJS7+fbr7tt6Iu7X4fvv09JWGAYfXwl5+Esub7pdlDmnwEVZJq4V1UhuRvIxeQNAEHr+KP8V6PL+s5e1iYi2Lt+/wr8GJ/7qPn4QSXzotbvBz3+m8nN87duZBQhArYawMtqAHsSijWmvpTB0ucDDulYyqjTNs40DOfB0vcDDukjTQxhm2caOidLGOF0jjx+ykGu0kfwfpg3BR+kgbeXEFl2J5T7tC1IfY0llIlo314cZgpMPMuSBBZ2N1rC0oL23Itkf7BedkMNn2iAWzrVFWppRtTW/7/oTKmnThPBWWwQPIHn5afT88vhiljQPjd9/WVwOCQ+vrrHrCxEYMEk9USGLVw5ikxxM/hiHIaOYgU1UIePjDLizM+2FPNYKLLiUZHR5oPBVYhwUC1lnCOh5DDTonbQYXtoapeuMELs73w55sBBd1OwRuuxMGEW+M94MMrATD4KXhm0njhjU3K1Ew8uLtTROKPW9Gbw8hyqiHBGXVlQCipUNIMzjL7HIleL9aALwQ9ofWnJPmno2Lv9564L7sCXur9gPvM3WYq0lzNaGGPYoojcbfFP/iDV3xGqNIfD09UBXlmbUWn7fO+kgnAGS0E+bbJTQk00TmpXeZLP/irdQJV+alChNcL6iC01fCYkKcjfYSfJmqMedq+/LIaU82ieF3vv5alOPhQ6Oc9n1NaTzpMRNRzRWyJjp6lN8Penytv0Bup6Pezq02gR4eh798Xkx2tDM5yNN0R0cnjZ0Xntn1nZVn7YBeMfSk8HhlVIx3CpCc7OBgpU/zmPkaBnydxSlc+Odw5RthvFIxJ4Gek1EqSysoGH+YLCQjDDqSCsxi5msYj2KCCdzzz+Geb4yfFyON92nLFV7XjL3OGodlAHhjNlcrUbAPVChZbgoD705lANSvBFsUvPpKAagUvkgWZ5y9IgVvYAuirIedIgGnZxAD2xeflWAQQ2EoPivFIIbzZIlaC0vlaon2aF0CfLpaOhBYgf5HacneKp+88F5HTfY6P11ONL5RjN/SE3hRPdkb93Z+6WRi3l9BUMCpHORpggIRqC18VlDOyp8xivq32vIbTy/c1vOX8db084RB19/PqG1/mdH6/jKjNf48Y9D59zNq619mtN6/zGjNP88YdP8Hb/NZ+QKb8j978OY1pKs9TkBX3cMuRtfOzWPma9ha1sEdXPjncOUbYVSGZKgJ0rjHlMkeg1K529jBRjuaOIcLX8OAz/0wgXv/c7jnG+PndRXwyLVcod4wpl6hHDO88VsoK1Ewi2dWzcLAu1MZ6IfdoiirrxSA0cUi3pxx9roSZQNbEGU97BQJOD2DGNi++KwEgxj6HWKflWIQw3m6CvR/KG7Y7Am6apSWQE+5REs6s9+jWLDpBHxc2Cmyw8z5TfaDJH7vhTMpQa8j8Xudny7xQI9Q2JL4nf8EvkR+D5B4/nT/A7y83x9lbmRzdHJlYW0KZW5kb2JqCjMgMCBvYmoKPDwgL1R5cGUgL1BhZ2VzIC9LaWRzIFsgNyAwIFIgXSAvQ291bnQgMSAvTWVkaWFCb3ggWzAgMCAzNjAgMzYwXSA+PgplbmRvYmoKNCAwIG9iago8PAovUHJvY1NldCBbL1BERiAvVGV4dF0KL0ZvbnQgPDwgL0YxIDEwIDAgUiAvRjIgMTEgMCBSID4+Ci9FeHRHU3RhdGUgPDwgPj4KL0NvbG9yU3BhY2UgPDwgL3NSR0IgNSAwIFIgPj4KPj4KZW5kb2JqCjUgMCBvYmoKWy9JQ0NCYXNlZCA2IDAgUl0KZW5kb2JqCjYgMCBvYmoKPDwgL0FsdGVybmF0ZSAvRGV2aWNlUkdCIC9OIDMgL0xlbmd0aCAyNTk2IC9GaWx0ZXIgL0ZsYXRlRGVjb2RlID4+CnN0cmVhbQp4nJ2Wd1RT2RaHz703vVCSEIqU0GtoUgJIDb1IkS4qMQkQSsCQACI2RFRwRFGRpggyKOCAo0ORsSKKhQFRsesEGUTUcXAUG5ZJZK0Z37x5782b3x/3fmufvc/dZ+991roAkPyDBcJMWAmADKFYFOHnxYiNi2dgBwEM8AADbADgcLOzQhb4RgKZAnzYjGyZE/gXvboOIPn7KtM/jMEA/5+UuVkiMQBQmIzn8vjZXBkXyTg9V5wlt0/JmLY0Tc4wSs4iWYIyVpNz8ixbfPaZZQ858zKEPBnLc87iZfDk3CfjjTkSvoyRYBkX5wj4uTK+JmODdEmGQMZv5LEZfE42ACiS3C7mc1NkbC1jkigygi3jeQDgSMlf8NIvWMzPE8sPxc7MWi4SJKeIGSZcU4aNkxOL4c/PTeeLxcwwDjeNI+Ix2JkZWRzhcgBmz/xZFHltGbIiO9g4OTgwbS1tvijUf138m5L3dpZehH/uGUQf+MP2V36ZDQCwpmW12fqHbWkVAF3rAVC7/YfNYC8AirK+dQ59cR66fF5SxOIsZyur3NxcSwGfaykv6O/6nw5/Q198z1K+3e/lYXjzkziSdDFDXjduZnqmRMTIzuJw+Qzmn4f4Hwf+dR4WEfwkvogvlEVEy6ZMIEyWtVvIE4gFmUKGQPifmvgPw/6k2bmWidr4EdCWWAKlIRpAfh4AKCoRIAl7ZCvQ730LxkcD+c2L0ZmYnfvPgv59V7hM/sgWJH+OY0dEMrgSUc7smvxaAjQgAEVAA+pAG+gDE8AEtsARuAAP4AMCQSiIBHFgMeCCFJABRCAXFIC1oBiUgq1gJ6gGdaARNIM2cBh0gWPgNDgHLoHLYATcAVIwDp6AKfAKzEAQhIXIEBVSh3QgQ8gcsoVYkBvkAwVDEVAclAglQ0JIAhVA66BSqByqhuqhZuhb6Ch0GroADUO3oFFoEvoVegcjMAmmwVqwEWwFs2BPOAiOhBfByfAyOB8ugrfAlXADfBDuhE/Dl+ARWAo/gacRgBAROqKLMBEWwkZCkXgkCREhq5ASpAJpQNqQHqQfuYpIkafIWxQGRUUxUEyUC8ofFYXiopahVqE2o6pRB1CdqD7UVdQoagr1EU1Ga6LN0c7oAHQsOhmdiy5GV6Cb0B3os+gR9Dj6FQaDoWOMMY4Yf0wcJhWzArMZsxvTjjmFGcaMYaaxWKw61hzrig3FcrBibDG2CnsQexJ7BTuOfYMj4nRwtjhfXDxOiCvEVeBacCdwV3ATuBm8Et4Q74wPxfPwy/Fl+EZ8D34IP46fISgTjAmuhEhCKmEtoZLQRjhLuEt4QSQS9YhOxHCigLiGWEk8RDxPHCW+JVFIZiQ2KYEkIW0h7SedIt0ivSCTyUZkD3I8WUzeQm4mnyHfJ79RoCpYKgQo8BRWK9QodCpcUXimiFc0VPRUXKyYr1iheERxSPGpEl7JSImtxFFapVSjdFTphtK0MlXZRjlUOUN5s3KL8gXlRxQsxYjiQ+FRiij7KGcoY1SEqk9lU7nUddRG6lnqOA1DM6YF0FJppbRvaIO0KRWKip1KtEqeSo3KcRUpHaEb0QPo6fQy+mH6dfo7VS1VT1W+6ibVNtUrqq/V5qh5qPHVStTa1UbU3qkz1H3U09S3qXep39NAaZhphGvkauzROKvxdA5tjssc7pySOYfn3NaENc00IzRXaO7THNCc1tLW8tPK0qrSOqP1VJuu7aGdqr1D+4T2pA5Vx01HoLND56TOY4YKw5ORzqhk9DGmdDV1/XUluvW6g7ozesZ6UXqFeu169/QJ+iz9JP0d+r36UwY6BiEGBQatBrcN8YYswxTDXYb9hq+NjI1ijDYYdRk9MlYzDjDON241vmtCNnE3WWbSYHLNFGPKMk0z3W162Qw2szdLMasxGzKHzR3MBea7zYct0BZOFkKLBosbTBLTk5nDbGWOWtItgy0LLbssn1kZWMVbbbPqt/pobW+dbt1ofceGYhNoU2jTY/OrrZkt17bG9tpc8lzfuavnds99bmdux7fbY3fTnmofYr/Bvtf+g4Ojg8ihzWHS0cAx0bHW8QaLxgpjbWadd0I7eTmtdjrm9NbZwVnsfNj5FxemS5pLi8ujecbz+PMa54256rlyXOtdpW4Mt0S3vW5Sd113jnuD+wMPfQ+eR5PHhKepZ6rnQc9nXtZeIq8Or9dsZ/ZK9ilvxNvPu8R70IfiE+VT7XPfV8832bfVd8rP3m+F3yl/tH+Q/zb/GwFaAdyA5oCpQMfAlYF9QaSgBUHVQQ+CzYJFwT0hcEhgyPaQu/MN5wvnd4WC0IDQ7aH3wozDloV9H44JDwuvCX8YYRNRENG/gLpgyYKWBa8ivSLLIu9EmURJonqjFaMTopujX8d4x5THSGOtYlfGXorTiBPEdcdj46Pjm+KnF/os3LlwPME+oTjh+iLjRXmLLizWWJy++PgSxSWcJUcS0YkxiS2J7zmhnAbO9NKApbVLp7hs7i7uE54Hbwdvku/KL+dPJLkmlSc9SnZN3p48meKeUpHyVMAWVAuep/qn1qW+TgtN25/2KT0mvT0Dl5GYcVRIEaYJ+zK1M/Myh7PMs4qzpMucl+1cNiUKEjVlQ9mLsrvFNNnP1IDERLJeMprjllOT8yY3OvdInnKeMG9gudnyTcsn8n3zv16BWsFd0VugW7C2YHSl58r6VdCqpat6V+uvLlo9vsZvzYG1hLVpa38otC4sL3y5LmZdT5FW0ZqisfV+61uLFYpFxTc2uGyo24jaKNg4uGnupqpNH0t4JRdLrUsrSt9v5m6++JXNV5VffdqStGWwzKFsz1bMVuHW69vctx0oVy7PLx/bHrK9cwdjR8mOlzuX7LxQYVdRt4uwS7JLWhlc2V1lULW16n11SvVIjVdNe61m7aba17t5u6/s8djTVqdVV1r3bq9g7816v/rOBqOGin2YfTn7HjZGN/Z/zfq6uUmjqbTpw37hfumBiAN9zY7NzS2aLWWtcKukdfJgwsHL33h/093GbKtvp7eXHgKHJIcef5v47fXDQYd7j7COtH1n+F1tB7WjpBPqXN451ZXSJe2O6x4+Gni0t8elp+N7y+/3H9M9VnNc5XjZCcKJohOfTuafnD6Vderp6eTTY71Leu+ciT1zrS+8b/Bs0Nnz53zPnen37D953vX8sQvOF45eZF3suuRwqXPAfqDjB/sfOgYdBjuHHIe6Lztd7hmeN3ziivuV01e9r567FnDt0sj8keHrUddv3ki4Ib3Ju/noVvqt57dzbs/cWXMXfbfkntK9ivua9xt+NP2xXeogPT7qPTrwYMGDO2PcsSc/Zf/0frzoIflhxYTORPMj20fHJn0nLz9e+Hj8SdaTmafFPyv/XPvM5Nl3v3j8MjAVOzX+XPT806+bX6i/2P/S7mXvdNj0/VcZr2Zel7xRf3PgLett/7uYdxMzue+x7ys/mH7o+Rj08e6njE+ffgP3hPP7ZW5kc3RyZWFtCmVuZG9iago5IDAgb2JqCjw8Ci9UeXBlIC9FbmNvZGluZyAvQmFzZUVuY29kaW5nIC9XaW5BbnNpRW5jb2RpbmcKL0RpZmZlcmVuY2VzIFsgNDUvbWludXMgOTYvcXVvdGVsZWZ0CjE0NC9kb3RsZXNzaSAvZ3JhdmUgL2FjdXRlIC9jaXJjdW1mbGV4IC90aWxkZSAvbWFjcm9uIC9icmV2ZSAvZG90YWNjZW50Ci9kaWVyZXNpcyAvLm5vdGRlZiAvcmluZyAvY2VkaWxsYSAvLm5vdGRlZiAvaHVuZ2FydW1sYXV0IC9vZ29uZWsgL2Nhcm9uIC9zcGFjZV0KPj4KZW5kb2JqCjEwIDAgb2JqCjw8IC9UeXBlIC9Gb250IC9TdWJ0eXBlIC9UeXBlMSAvTmFtZSAvRjEgL0Jhc2VGb250IC9aYXBmRGluZ2JhdHMgPj4KZW5kb2JqCjExIDAgb2JqCjw8IC9UeXBlIC9Gb250IC9TdWJ0eXBlIC9UeXBlMSAvTmFtZSAvRjIgL0Jhc2VGb250IC9IZWx2ZXRpY2EKL0VuY29kaW5nIDkgMCBSID4+CmVuZG9iagp4cmVmCjAgMTIKMDAwMDAwMDAwMCA2NTUzNSBmIAowMDAwMDAwMDIxIDAwMDAwIG4gCjAwMDAwMDAxNjMgMDAwMDAgbiAKMDAwMDAwMTU4MiAwMDAwMCBuIAowMDAwMDAxNjY1IDAwMDAwIG4gCjAwMDAwMDE3ODkgMDAwMDAgbiAKMDAwMDAwMTgyMiAwMDAwMCBuIAowMDAwMDAwMjEyIDAwMDAwIG4gCjAwMDAwMDAyOTIgMDAwMDAgbiAKMDAwMDAwNDUxNyAwMDAwMCBuIAowMDAwMDA0Nzc0IDAwMDAwIG4gCjAwMDAwMDQ4NTggMDAwMDAgbiAKdHJhaWxlcgo8PCAvU2l6ZSAxMiAvSW5mbyAxIDAgUiAvUm9vdCAyIDAgUiA+PgpzdGFydHhyZWYKNDk1NQolJUVPRgo=" style="display: block; margin: auto;" /></p>
+<p>In the boxplots of pattern 3, it is visible that the IQR of the amputed data is larger than the one of the non-amputed data. This is especially the case for variable V1, a bit less for variable V2 but almost not present for variable V3.</p>
+<p>In pattern 4, the effect of the specifications is only visible for variable V2, because the other variables will be made missing. In contrast to pattern 3, the amputation is performed in the center of the weighted sum scores, resulting to a MID-like missingness pattern.</p>
+</div>
+<div id="combining-missingness-mechanisms" class="section level3">
+<h3>10. Combining missingness mechanisms</h3>
+<p>Function <code>ampute()</code> imposes a certain missingness mechanism on all the patterns. If <code>mech == &quot;MAR&quot;</code>, for instance, all patterns specified under <code>patterns</code> are created with a <code>MAR</code> mechanism. Besides, all these patterns should be made missing based on either continuous (<code>cont == TRUE</code>) or discrete (<code>cont == FALSE</code>) probability distributions.</p>
+<p>In reality, you might want to generate multiple kinds of missingness mechanisms within the same data set. In order to do this, I advise to ampute one data set multiple times according the desired specifications. Thereafter, for each row of the original data set, a row can be sampled from the multiple amputed data sets. In case of three missingness mechanisms, 1/3 of the data set would be the result of amputation 1, 1/3 from amputation 2 and the last third from amputation 3. In total, all three amputation mechanisms will be generated in the data set.</p>
+<p>Below is an example of how this can be done.</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">ampdata1 &lt;-<span class="st"> </span><span class="kw">ampute</span>(testdata, <span class="dt">patterns =</span> <span class="kw">c</span>(<span class="dv">0</span>, <span class="dv">1</span>, <span class="dv">1</span>), <span class="dt">prop =</span> <span class="fl">0.2</span>, <span class="dt">mech =</span> <span class="st">&quot;MAR&quot;</span>)$amp
+ampdata2 &lt;-<span class="st"> </span><span class="kw">ampute</span>(testdata, <span class="dt">patterns =</span> <span class="kw">c</span>(<span class="dv">1</span>, <span class="dv">0</span>, <span class="dv">1</span>), <span class="dt">prop =</span> <span class="fl">0.5</span>, <span class="dt">mech =</span> <span class="st">&quot;MNAR&quot;</span>)$amp
+ampdata3 &lt;-<span class="st"> </span><span class="kw">ampute</span>(testdata, <span class="dt">patterns =</span> <span class="kw">c</span>(<span class="dv">1</span>, <span class="dv">1</span>, <span class="dv">0</span>), <span class="dt">prop =</span> <span class="fl">0.8</span>, <span class="dt">mech =</span> <span class="st">&quot;MCAR&quot;</span>)$amp
+
+indices &lt;-<span class="st"> </span><span class="kw">sample</span>(<span class="dt">x =</span> <span class="kw">c</span>(<span class="dv">1</span>, <span class="dv">2</span>, <span class="dv">3</span>), <span class="dt">size =</span> <span class="kw">nrow</span>(testdata), <span class="dt">replace =</span> <span class="ot">TRUE</span>, 
+                  <span class="dt">prob =</span> <span class="kw">c</span>(<span class="dv">1</span>/<span class="dv">3</span>, <span class="dv">1</span>/<span class="dv">3</span>, <span class="dv">1</span>/<span class="dv">3</span>))
+
+ampdata &lt;-<span class="st"> </span><span class="kw">matrix</span>(<span class="ot">NA</span>, <span class="dt">nrow =</span> <span class="kw">nrow</span>(testdata), <span class="dt">ncol =</span> <span class="kw">ncol</span>(testdata))
+ampdata[indices ==<span class="st"> </span><span class="dv">1</span>, ] &lt;-<span class="st"> </span><span class="kw">as.matrix</span>(ampdata1[indices ==<span class="st"> </span><span class="dv">1</span>, ])
+ampdata[indices ==<span class="st"> </span><span class="dv">2</span>, ] &lt;-<span class="st"> </span><span class="kw">as.matrix</span>(ampdata2[indices ==<span class="st"> </span><span class="dv">2</span>, ])
+ampdata[indices ==<span class="st"> </span><span class="dv">3</span>, ] &lt;-<span class="st"> </span><span class="kw">as.matrix</span>(ampdata3[indices ==<span class="st"> </span><span class="dv">3</span>, ])
+
+<span class="kw">md.pattern</span>(ampdata)</code></pre></div>
+<pre><code>##     [,1] [,2] [,3] [,4]
+## 245    1    1    1    0
+##  33    0    1    1    1
+##  90    1    0    1    1
+## 132    1    1    0    1
+##       33   90  132  255</code></pre>
+<p>The function <code>md.pattern()</code> does not show the different mechanisms (<code>bwplot()</code> or <code>xyplot()</code> are more useful for this), but the proportions show that the code above works.</p>
+<p>20% of cases is amputed according a MAR mechanism, 50% according a MNAR mechanism and 80 percent according a MCAR mechanism. For each mechanism, merely one missingness pattern is created to clearly see the difference between the three amputation rounds. These rounds are imposed on the data with equal probabilities (1/3 each). Consequently, 1/3 of 20% of the cases has a MAR missingness mechanism, 1/3 of 50% of the cases has a MNAR missingness mechanism and 1/3 of 80% of the cases has a MCAR missingness mechanism. In total, this results in 50% of the cases having missing values.</p>
+</div>
+<div id="other-specifications" class="section level3">
+<h3>11. Other specifications</h3>
+<div id="argument-run" class="section level4">
+<h4>Argument <code>run</code></h4>
+<p>For large data sets or slow computers, you might not want to perform the amputation right away. When the argument <code>run</code> is set to <code>FALSE</code>, all results will be stored in the <code>mads</code> object except for the amputed data set. Subsequently, the default settings for the <code>patterns</code>, <code>weights</code> or <code>odds</code> argument can be changed easily and entered into a new run thereafter (with <code>run == TRUE</code>).</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">emptyresult &lt;-<span class="st"> </span><span class="kw">ampute</span>(testdata, <span class="dt">run =</span> <span class="ot">FALSE</span>)
+emptyresult$amp</code></pre></div>
+<pre><code>## data frame with 0 columns and 0 rows</code></pre>
+</div>
+<div id="other-mads-contents" class="section level4">
+<h4>Other <code>mads</code> contents</h4>
+<p>The return object from <code>ampute()</code> is of class <code>mads</code>. <code>mads</code> contains the amputed data set, the function specifications and some extra objects that might be useful.</p>
+<p>The object <code>cand</code> is a vector that contains for every case the missing data pattern it was candidate for.</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">result$cand[<span class="dv">1</span>:<span class="dv">30</span>]</code></pre></div>
+<pre><code>##  [1] 1 2 1 3 4 3 1 2 1 1 1 1 1 2 3 3 1 1 4 4 1 1 1 3 2 1 1 4 1 1</code></pre>
+<p>The object <code>scores</code> is a list with, for each pattern, the weighted sum scores of the candidates.</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">result$scores[[<span class="dv">1</span>]][<span class="dv">1</span>:<span class="dv">10</span>]</code></pre></div>
+<pre><code>##            1            3            7            9           10 
+## -0.162947317 -0.407725421  0.193781874 -0.421864021  0.000874392 
+##           11           12           13           17           18 
+##  0.233675127 -0.348243110 -0.207855079  0.191098893 -0.978897020</code></pre>
+<p>Furthermore, the object <code>data</code> contains the original data.</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">head</span>(result$data)</code></pre></div>
+<pre><code>##          V1       V2         V3
+## 1 11.282560 3.986711  1.6053922
+## 2  8.995550 5.620620 -1.6681172
+## 3 10.140799 3.984980  0.9898536
+## 4  9.913233 5.477239 -0.9984129
+## 5 12.569587 7.685735  0.4654912
+## 6 11.376321 4.656118 -0.4529934</code></pre>
+</div>
+</div>
+<div id="go-ahead-and-ampute" class="section level2">
+<h2>Go ahead and <code>ampute</code>!</h2>
+<div id="references" class="section level3">
+<h3>References</h3>
+<p>Brand, J.P.L. (1999). Development, implementation and evaluation of multiple imputation strategies for the statistical analysis of incomplete data sets (pp. 110-113). Dissertation. Rotterdam: Erasmus University.</p>
+<p>Van Buuren, S. (2012). Flexible imputation of missing data. Boca Raton, FL.: Chapman &amp; Hall/CRC Press.</p>
+</div>
+</div>
+
+
+
+<!-- dynamically load mathjax for compatibility with self-contained -->
+<script>
+  (function () {
+    var script = document.createElement("script");
+    script.type = "text/javascript";
+    script.src  = "https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML";
+    document.getElementsByTagName("head")[0].appendChild(script);
+  })();
+</script>
+
+</body>
+</html>

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/doc/ampute.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/doc/fimd1.r
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/doc/fimd1.r	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/doc/fimd1.r	(revision 2477)
@@ -0,0 +1,233 @@
+### fimd1.R
+### R code from Van Buuren, S. (2012). 
+###		Flexible Imputation of Missing Data. 
+###		CRC/Chapman & Hall, Boca Raton, FL.
+### (c) 2012 Stef van Buuren, www.multiple-imputation.com
+### Version 1, 21mar2012
+### Version 2, 4nov2015
+### Tested with Mac OS X 10.7.3, R2.14-2, mice 2.12
+
+### Chapter 1 	Introduction
+### Section 1.1 The problem of missing data
+
+### calculate the mean of three numbers
+y <- c(1, 2, 4) 
+mean(y)
+
+### calculate the mean of three numbers, where one is missing
+y <- c(1, 2, NA)
+mean(y)
+
+### repeat, but with any missing data removed
+mean(y, na.rm=TRUE)
+
+### store your current options (safety measure)
+youroptions <- options()
+
+### demo regression that generates an error message using default na.fail
+options(na.action = na.fail)
+
+### uncomment to see the error
+### lm(Ozone ~ Wind, data=airquality)
+
+### remove incomplete observations by 'na.action = na.omit'
+fit <- lm(Ozone ~ Wind, data = airquality, na.action = na.omit)
+coef(fit)
+
+### set automatic na.action = na.omit
+options(na.action = na.omit)
+
+### find out how many rows were deleted
+deleted <- na.action(fit)
+naprint(deleted)
+
+### more incomplete rows if we add Solar.R as predictor
+fit2 <- lm(Ozone ~ Wind+Solar.R, data=airquality)
+naprint(na.action(fit2))
+
+### restore your original options, but set na.omit
+options(youroptions)
+options(na.action=na.omit)
+
+### Section 1.3.2 Pairwise deletion
+
+### note: mean(<data.frame>) is deprecated
+colMeans(airquality, na.rm=TRUE)
+cor(airquality, use="pair")
+cov(airquality, use="pair")
+
+
+### Section 1.3.3 Mean imputation
+
+### install the mice package from CRAN if you have not yet done so
+### by uncommenting and running the next line
+# install.packages("mice")
+
+library("mice")
+library("lattice")
+
+### impute the mean
+imp <- mice(airquality, method="mean", m=1, maxit=1)
+
+
+### Figure 1.1
+lwd <- 1.5
+par(mfrow=c(1,2))
+breaks <- seq(-20, 200, 10)
+nudge <- 1
+x <- matrix(c(breaks-nudge, breaks+nudge), ncol=2)
+obs <- airquality[,"Ozone"]
+mis  <- imp$imp$Ozone[,1]
+fobs <- c(hist(obs, breaks, plot=FALSE)$counts, 0)
+fmis <- c(hist(mis, breaks, plot=FALSE)$counts, 0)
+y <- matrix(c(fobs, fmis), ncol=2)
+matplot(x, y, type="s",
+        col=c(mdc(4),mdc(5)), lwd=2, lty=1,
+        xlim = c(0, 170), ylim = c(0,40), yaxs = "i",
+        xlab="Ozone (ppb)",
+        ylab="Frequency")
+box()
+
+tp <- xyplot(imp, Ozone~Solar.R, na.groups=ici(imp),
+       ylab="Ozone (ppb)", xlab="Solar Radiation (lang)",
+       cex = 0.75, lex=lwd,
+       ylim = c(-20, 180), xlim = c(0,350))
+print(tp, newpage = FALSE, position = c(0.48,0.08,1,0.92))
+
+### Section 1.3.4 Regression imputation
+
+fit <- lm(Ozone ~ Solar.R, data=airquality)
+pred <- predict(fit, newdata=ic(airquality))
+
+### alternative using mice
+imp <- mice(airquality[,1:2], method="norm.predict", m=1, maxit=3,seed=1)
+
+### Figure 1.2
+par(mfrow = c(1,2))
+fmis <- c(hist(pred, breaks, plot=FALSE)$counts, 0)
+y <- matrix(c(fobs, fmis), ncol=2)
+matplot(x, y, type="s",
+        col=c(mdc(4),mdc(5)), lwd=2, lty=1,
+        xlim = c(0, 170), ylim = c(0,40), yaxs = "i",
+        xlab="Ozone (ppb)",
+        ylab="Frequency")
+box()
+
+tp <- xyplot(imp, Ozone~Solar.R,
+       ylab="Ozone (ppb)", xlab="Solar Radiation (lang)",
+       cex = 0.75, lex=lwd,
+       ylim = c(-20, 180), xlim = c(0,350))
+print(tp, newpage = FALSE, position = c(0.48,0.08,1,0.92))
+
+
+### Section 1.3.5 Stochastic regression imputation
+
+imp <- mice(airquality[,1:2],method="norm.nob",m=1,maxit=1,seed=1)
+
+### Figure 1.3
+par(mfrow = c(1,2))
+mis  <- imp$imp$Ozone[,1]
+fmis <- c(hist(mis, breaks, plot=FALSE)$counts, 0)
+y <- matrix(c(fobs, fmis), ncol=2)
+matplot(x, y, type="s",
+        col=c(mdc(4),mdc(5)), lwd=2, lty=1,
+        xlim = c(0, 170), ylim = c(0,40), yaxs = "i",
+        xlab="Ozone (ppb)",
+        ylab="Frequency")
+box()
+
+tp <- xyplot(imp, Ozone~Solar.R, na.groups=ici(imp),
+       ylab="Ozone (ppb)", xlab="Solar Radiation (lang)",
+       cex = 0.75, lex=lwd,
+       ylim = c(-20, 180), xlim = c(0,350))
+print(tp, newpage = FALSE, position = c(0.48,0.08,1,0.92))
+
+
+### Section 1.3.6 LOCF and BOCF
+
+par(mfrow=c(1,1))
+Oz <- airquality$Ozone
+locf <- function(x) {
+  a <- x[1]
+  for (i in 2:length(x)) {
+    if (is.na(x[i])) x[i] <- a
+    else a <- x[i]
+  }
+  return(x)
+}
+Ozi <- locf(Oz)
+colvec <- ifelse(is.na(Oz),mdc(2),mdc(1))
+
+### Figure 1.4
+
+plot(Ozi[1:80],col=colvec,type="l",xlab="Day number",ylab="Ozone (ppb)")
+points(Ozi[1:80],col=colvec,pch=20,cex=1)
+
+
+### Section 1.4.3 Example of multiple imputation
+
+imp <- mice(airquality, seed=1, print=FALSE)
+fit <- with(imp, lm(Ozone ~ Wind + Temp + Solar.R))
+tab <- round(summary(pool(fit)),3)
+tab[,c(1:3,5)]
+
+fit <- lm(Ozone~Wind+Temp+Solar.R,data=airquality,na.action=na.omit)
+round(coef(summary(fit)),3)
+
+### Figure 1.6
+par(mfrow = c(1,2))
+mis  <- imp$imp$Ozone[,1]
+fmis <- c(hist(mis, breaks, plot=FALSE)$counts, 0)
+y <- matrix(c(fobs, fmis), ncol=2)
+matplot(x, y, type="s",
+        col=c(mdc(4),mdc(5)), lwd=2, lty=1,
+        xlim = c(0, 170), ylim = c(0,40), yaxs = "i",
+        xlab="Ozone (ppb)",
+        ylab="Frequency")
+box()
+
+tp <- xyplot(imp, Ozone~Solar.R, subset = .imp==1,
+       ylab="Ozone (ppb)", xlab="Solar Radiation (lang)",
+       cex = 0.75, lex=lwd,
+       ylim = c(-20, 180), xlim = c(0,350))
+print(tp, newpage = FALSE, position = c(0.48,0.08,1,0.92))
+
+### scatterplot of all imputed data sets (not in the book)
+xyplot(imp, Ozone~Solar.R | .imp,
+       ylab="Ozone (ppb)", xlab="Solar Radiation (lang)",
+       cex = 0.75, lex=lwd,
+       ylim = c(-20, 180), xlim = c(0,350))
+
+### Figure 1.7
+
+Oz <- airquality$Ozone
+colvec <- ifelse(is.na(Oz),mdc(2),mdc(1))
+par(mfrow=c(1,1))
+plot(Oz[1:80],col=mdc(1),type="l",xlab="Day number",ylab="Ozone (ppb)")
+points(Oz[1:80],col=mdc(1),pch=20,cex=1)
+
+idx <- ici(airquality$Ozone) & (1:153)<81 
+x   <- (1:153)[idx]
+points(x=x,y=complete(imp,1)$Ozone[idx],col=mdc(2),pch=20,cex=1)
+points(x=x,y=complete(imp,2)$Ozone[idx],col=mdc(2),pch=20,cex=1)
+points(x=x,y=complete(imp,3)$Ozone[idx],col=mdc(2),pch=20,cex=1)
+points(x=x,y=complete(imp,4)$Ozone[idx],col=mdc(2),pch=20,cex=1)
+points(x=x,y=complete(imp,5)$Ozone[idx],col=mdc(2),pch=20,cex=1)
+
+### figure of the autocorrelation function
+### (not in the book)
+
+par(mfrow=c(2,5))
+acf.ozone <- with(imp,acf(Ozone))
+model <- expression(acf(resid(lm(Ozone ~ Wind + Temp + Solar.R))))
+acf.resid <- with(imp,model)
+calcacf <- function(acf.list) {
+  k <- length(acf.list)
+  acc <- acf.list[[1]]$acf
+  for (i in 2:k) acc <- acc + acf.list[[i]]$acf
+  return(acc/k)
+ }
+oz <- round(calcacf(acf.ozone$analyses),2)
+re <- round(calcacf(acf.resid$analyses),2)
+
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/doc/fimd2.r
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/doc/fimd2.r	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/doc/fimd2.r	(revision 2477)
@@ -0,0 +1,109 @@
+### fimd2.R
+### R code from Van Buuren, S. (2012). 
+###		Flexible Imputation of Missing Data. 
+###		CRC/Chapman & Hall, Boca Raton, FL.
+### (c) 2012 Stef van Buuren, www.multiple-imputation.com
+### Version 1, 7mar2012
+### Version 2, 4nov2015
+### Tested with Mac OS X 10.7.3, R2.14-2, mice 2.11
+
+### Chapter 2 Multiple imputation
+
+library("mice")
+library("lattice")
+library("MASS")
+
+### Section 2.1.3 The expanding literature on multiple imputation
+### Figure 2.1
+
+cit  <- c(     2010, 37, 182, NA,
+               2009, 36, 129, NA,
+               2008, 27, 111, NA,
+               2007, 35, 136, NA,
+               2006, 18, 80, NA,
+               2005, 20, 76, NA,
+               2004,  6, 56, NA,
+               2003, 17, 42, NA,
+               2002, 14, 40, NA,
+               2001, 13, 36, 57,
+               2000,  8, 21, 33,
+               1999,  6, 25, 47,
+               1998, 6, 13, 22,
+               1997, 6, 18, 29,
+               1996, 4, 12, 28,
+               1995, 3, 5, 20,
+               1994, 2, 5, 34,
+               1993, 2, 6, 15,
+               1991, 2, 4, 19,
+               1990, 1, 2, 15,
+               1989, NA, NA, 11,
+               1988, 1, NA, 13,
+               1987, NA, NA, 10,
+               1986, NA, NA, 5,
+               1985, NA, NA, 1,
+               1984, NA, NA, 2,
+               1983, NA, NA, 5,
+               1982, NA, NA, 2,
+               1981, NA, NA, 1,
+               1980, NA, NA, 5,
+               1979, NA, NA, 2,
+               1978, NA, NA, 1,
+               1977, NA, NA, 2)
+cit <- matrix(cit, nr=2010-1977, nc=4, byrow=TRUE)
+cit <- as.data.frame(cit)
+names(cit) <- c("Year","Title","Abstract","All")
+par(mfrow=c(1,1))
+par(cex=0.7, lwd=0.5)
+plot(x=cit$Year, y=cit$Abstract, type="o",log="y",
+     xlim=c(1975,2010),ylim=c(1,200),
+     ylab="Number of publications (log)", xlab="Year", pch=2, 
+     axes=FALSE)
+axis(1, lwd=par("lwd"))
+axis(2, lwd=par("lwd"), las=1)
+# box(lwd=0.5)
+lines(x=cit$Year, y=cit$Title, pch=15, type="o")
+lines(x=cit$Year, y=cit$All, pch=16, type="o")
+legend(x=1975,y=200,legend=c("early publications",
+                            "'multiple imputation' in abstract",
+                            "'multiple imputation' in title"),
+       pch=c(16,2,15), bty="n")
+
+### Section 2.2.4 MCAR, MAR and MNAR again
+
+logistic <- function(x) exp(x)/(1+exp(x))
+set.seed(80122)
+n <- 300
+y <- mvrnorm(n=n,mu=c(0,0),Sigma=matrix(c(1,0.5,0.5,1),nrow=2))
+y1 <- y[,1]
+y2 <- y[,2]
+r2.mcar <- 1-rbinom(n, 1, 0.5)
+r2.mar  <- 1-rbinom(n, 1, logistic(y1))
+r2.mnar <- 1-rbinom(n, 1, logistic(y2))
+
+### Figure 2.2
+
+y3 <- rbind(y,y,y)
+r2 <- c(r2.mcar,r2.mar,r2.mnar)
+r2 <- factor(r2, labels=c("Ymis","Yobs"))
+typ <- factor(rep(3:1,each=n),labels=c("MNAR","MAR","MCAR"))
+d <- data.frame(y1=y3[,1],y2=y3[,2],r2=r2,typ=typ)
+trellis.par.set(box.rectangle=list(col=c(mdc(2),mdc(1)),lwd=1.2))
+trellis.par.set(box.umbrella=list(col=c(mdc(2),mdc(1)),lwd=1.2))
+trellis.par.set(plot.symbol=list(col=mdc(3),lwd=1))
+tp <- bwplot(r2~y2|typ, data=d,
+             horizontal=TRUE, layout=c(1,3),
+             xlab=expression(Y^2),
+             col=c(mdc(2),mdc(1)),strip=FALSE, xlim=c(-3,3),
+             strip.left = strip.custom(bg="grey95"))
+print(tp)
+
+### Section 2.3.7 Numerical example
+options(digits=3)
+imp <- mice(nhanes, print=FALSE, m=10, seed=24415)
+fit <- with(imp, lm(bmi~age))
+est <- pool(fit)
+names(est)
+attach(est)
+(r+2/(df+3))/(r+1)
+(df+1)/(df+3)*lambda+2/(df+3)
+detach(est)
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/doc/fimd3.r
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/doc/fimd3.r	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/doc/fimd3.r	(revision 2477)
@@ -0,0 +1,507 @@
+### fimd3.R
+### R code from Van Buuren, S. (2012). 
+###		Flexible Imputation of Missing Data. 
+###		CRC/Chapman & Hall, Boca Raton, FL.
+### (c) 2012 Stef van Buuren, www.multiple-imputation.com
+### Version 1, 7mar2012
+### Version 2, 4nov2015 tested with mice 2.23
+### Tested with Mac OS X 10.7.3, R2.14-2, mice 2.11
+
+library("mice")
+library("lattice")
+library("gamlss")
+library("rpart")
+
+### Section 3.1 How to generate multiple imputations
+
+### In order to draw figure 3.1, we define two tweaked
+### mice.impute.xxx functions that will store the coefficients
+### of the imputation models in the global environment.
+### Normally, we would not be so interested in the
+### parameter estimates of the imputation model, but here
+### we need them for Figure 3.1.
+mice.impute.normdump <- function (y, ry, x, ...) 
+{
+    x <- cbind(1, as.matrix(x))
+    parm <- .norm.draw(y, ry, x, ...)
+    betadump <<- c(betadump,parm$beta) 
+    return(x[!ry, ] %*% parm$beta + rnorm(sum(!ry)) * parm$sigma)
+}
+mice.impute.pmmdump <- function (y, ry, x, ...) 
+{
+    x <- cbind(1, as.matrix(x))
+    parm <- .norm.draw(y, ry, x, ...)
+    yhatobs <- x[ry, ] %*% parm$coef
+    yhatmis <- x[!ry, ] %*% parm$beta
+    betadump <<- c(betadump,parm$beta)
+    return(apply(as.array(yhatmis), 1, .pmm.match, yhat = yhatobs, 
+        y = y[ry], ...))
+}
+
+
+### Figure 3.1
+par(mfrow=c(3,2))
+data <- whiteside
+lwd <- 1.5
+plot(x=data$Temp, y=data$Gas, col=mdc(1), lwd=lwd, 
+     xlab=expression(paste("Temperature (", degree, "C)")), 
+     ylab="Gas consumption (cubic feet)")
+points(x=5, y=3.6, pch=4, cex=2, lwd=lwd, col=mdc(2))
+legend(x="bottomleft", legend="deleted observation", pch=4, col=mdc(2), 
+       pt.lwd=lwd, bty="n", pt.cex=2)
+text(x=9, y=6.5, label="a",cex=2)
+
+data[47,"Gas"] <- NA
+plot(x=data$Temp, y=data$Gas, col=mdc(1), lwd=lwd, 
+     xlab=expression(paste("Temperature (", degree, "C)")), 
+     ylab="Gas consumption (cubic feet)")
+abline(m1<-lm(Gas~Temp, data=data, na.action=na.omit), col=mdc(4))
+points(5,4.04, lwd=lwd, col=mdc(2),pch=19)
+text(x=9, y=6.5, label="b",cex=2)
+
+plot(x=data$Temp, y=data$Gas, col=mdc(1), lwd=lwd, 
+     xlab=expression(paste("Temperature (", degree, "C)")), 
+     ylab="Gas consumption (cubic feet)")
+imp <- mice(data, m=1, maxit=0)
+pred <- imp$pred
+pred["Gas","Insul"] <- 0
+imp <- mice(data, m=5, pred=pred, meth="norm.nob", maxit=1, print=FALSE, seed=45433)
+abline(m1<-lm(Gas~Temp, data=data, na.action=na.omit), col=mdc(4))
+points(rep(5,5),imp$imp$Gas, lwd=lwd, col=mdc(2),pch=19)
+text(x=9, y=6.5, label="c",cex=2)
+
+plot(x=data$Temp, y=data$Gas, col=mdc(1), lwd=lwd, 
+     xlab=expression(paste("Temperature (", degree, "C)")), 
+     ylab="Gas consumption (cubic feet)")
+imp <- mice(data, m=1, maxit=0)
+pred <- imp$pred
+pred["Gas","Insul"] <- 0
+betadump <- vector("list", 0) 
+imp <- mice(data, m=5, pred=pred, meth="normdump", maxit=1, print=FALSE, seed=83126)
+abline(m1<-lm(Gas~Temp, data=data, na.action=na.omit), col=mdc(4))
+betadump <- matrix(betadump, nc=2, byrow=TRUE)
+for (i in 1:5) abline(coef=unlist(betadump[i,]), col=mdc(5))
+points(rep(5,5),imp$imp$Gas, lwd=lwd, col=mdc(2),pch=19)
+text(x=9, y=6.5, label="d",cex=2)
+
+pch <- c(rep(3,26),rep(1,30))
+plot(x=data$Temp, y=data$Gas, col=mdc(1), lwd=lwd, pch=pch, 
+     xlab=expression(paste("Temperature (", degree, "C)")), 
+     ylab="Gas consumption (cubic feet)")
+imp <- mice(data, m=5, meth="norm", maxit=1, print=FALSE, seed=11727)
+abline(m1<-lm(Gas~Temp, data=data, na.action=na.omit, subset=Insul=="Before"), col=mdc(4))
+abline(m2<-lm(Gas~Temp, data=data, na.action=na.omit, subset=Insul=="After"), col=mdc(4))
+points(rep(5,5),imp$imp$Gas, lwd=lwd, col=mdc(2),pch=19)
+legend(x="bottomleft", legend=c("before insulation","after insulation"), pch=c(3,1),bty="n", pt.lwd=lwd)
+text(x=9, y=6.5, label="e",cex=2)
+
+pch <- c(rep(3,26),rep(1,30))
+plot(x=data$Temp, y=data$Gas, col=mdc(1), lwd=lwd, pch=pch, 
+     xlab=expression(paste("Temperature (", degree, "C)")), 
+     ylab="Gas consumption (cubic feet)")
+betadump <- vector("list", 0) 
+imp <- mice(data, m=5, meth="pmmdump", maxit=1, print=FALSE, seed=68006)
+betadump <- matrix(betadump, nc=3, byrow=TRUE)
+m1<-lm(Gas~Temp+Insul, data=data, na.action=na.omit)
+an <- coef(m1)[1]
+ai <- an + coef(m1)[3]
+b <- coef(m1)[2]
+abline(a=ai, b=b, col=mdc(4))
+abline(a=an, b=b, col=mdc(4))
+eta <- 0.6
+ylo <- ai+b*(5-eta)
+yhi <- ai+b*(5+eta)
+lines(x=c(5-eta,5+eta),y=c(ylo,yhi),lwd=3,col=mdc(5))
+xlo <- (ylo-an)/b
+xhi <- (yhi-an)/b
+lines(x=c(xlo,xhi),y=c(ylo,yhi),lwd=3,col=mdc(5))
+
+donors <- subset(data, (Insul=="After"&Temp>5-eta&Temp<5+eta) 
+                 |    (Insul=="Before"&Temp>xlo&Temp<xhi))
+points(x=donors$Temp, y=donors$Gas, cex=1.8, col=mdc(5), lwd=lwd)
+legend(x="bottomleft", legend=c("before insulation","after insulation"), pch=c(3,1),bty="n", pt.lwd=lwd)
+text(x=9, y=6.5, label="f",cex=2)
+
+
+### Section 3.2.3 Performance
+
+### number of simulations
+### use nsim <- 10 for testing
+###     nsim <- 10000 for the real stuff (TIME CONSUMING)
+nsim <- 10
+
+### create data
+createdata <- function(beta0=5.49, beta1=-0.29, sigma=0.86, n=50, mx=5, sdx=3) { 
+  x <- round(rnorm(n,mean=mx,sd=sdx),1)
+  eps <- rnorm(n,mean=0,sd=sigma)
+  y <- round(beta0 + x * beta1 + eps, 1)
+  return(data.frame(x=x, y=y))
+}
+
+### make 50% random missing data
+makemissing <- function(data, p=0.5){
+  rx <- rbinom(nrow(data), 1, p)
+  data[rx==0,"y"] <- NA
+  return(data)
+}
+
+### test function for three imputation functions
+test.impute <- function(data, m=5, method="norm", ...){
+  imp <- mice(data, method=method, m=m, print=FALSE, ridge=0, ...)
+  fit <- with(imp, lm(y~x))
+  est <- pool(fit)
+  tab <- summary(est)
+  return(tab["x",c("est","se","lo 95","hi 95","fmi","lambda")])
+}
+
+### put everything together
+simulate <- function(nsim=10, seed=41872){
+  set.seed(seed)
+  res <- array(NA,dim=c(4, nsim, 6))
+  dimnames(res) <- list(c("predict","pred + noise","Bayes MI","boot MI"),
+                      as.character(1:nsim),
+                      c("est","se","lo 95","hi 95","fmi","lambda"))
+  im <- c("norm.predict","norm.nob","norm","norm.boot")
+  for(i in 1:nsim){
+    data <- createdata()
+    data <- makemissing(data)
+    res[1,i,] <- test.impute(data, method=im[1], m=2)
+    res[2,i,] <- test.impute(data, method=im[2])
+    res[3,i,] <- test.impute(data, method=im[3])
+    res[4,i,] <- test.impute(data, method=im[4])
+  }
+  return(res)
+}
+
+summarize.results <- function(res) {
+  apply(res,c(1,3),mean,na.rm=TRUE)
+
+  ## bias of beta1
+  true <- -0.29
+  bias <- rowMeans(res[,,1] - true)
+
+  ## coverage
+  isin <- res[,,3] < true & true < res[,,4]
+  cov <- rowMeans(isin)
+
+  ## average width of 95 c.i.
+  intwidth <- res[,,4] - res[,,3]
+  aiw <- rowMeans(intwidth)
+
+  return(list(bias=bias, cov=cov, aiw=aiw))
+}
+
+### do the simulations - MAY BE TIME CONSUMING
+res <- simulate(nsim)
+summarize.results(res)
+
+### function to simulate performance of CCA
+simulate.cca <- function(nsim=10, seed=41872){
+
+  set.seed(seed)
+  res <- array(NA,dim=c(1, nsim, 6))
+  for(i in 1:nsim){
+    data <- createdata()
+    data <- makemissing(data)
+    fit <- lm(y~x, data=data, na.action=na.omit)
+    est <- coef(summary(fit))
+    lo95 <- est[,1] - qt(0.975,fit$df) * est[,2]
+    hi95 <- est[,1] + qt(0.975,fit$df) * est[,2]
+    est <- cbind(est, lo95, hi95)
+    res[1,i,] <- c(est["x",c(1:2,5:6)],NA,NA)
+  }
+  return(res)
+}
+
+### simulate - MAY BE TIME CONSUMING
+res.cca <- simulate.cca(nsim)
+### cannot be analysed by summarize.results() but it should
+### be obvious how to calculate bias, coverage and aiw
+
+### Section 3.2.4 Generating MAR missing data
+
+### script to create missing data according to MARRIGHT
+logistic <- function(x) exp(x)/(1+exp(x))
+set.seed(32881)
+n <- 10000
+y <- mvrnorm(n=n,mu=c(5,5),Sigma=matrix(c(1,0.6,0.6,1),nrow=2))
+p2.marright <- 1 - logistic(-5 + y[,1])
+r2.marright <- rbinom(n, 1, p2.marright)
+yobs <- y
+yobs[r2.marright==0, 2] <- NA
+
+### Figure 3.2
+
+grid <- seq(0,10,0.1)
+mr <- logistic(-5 + grid)
+mm <- logistic( 0.75-abs(grid-5))
+mt <- logistic(-0.75+abs(grid-5))
+
+par(mfrow=c(1,1))
+z <- data.frame(grid, mr, mm, mt) 
+matplot(x=z[,1],y=z[,2:4], type="l", lty=1:3, col=mdc(5) , lwd=2,
+        xlab="Y1", ylab="Missingness in Y2", las=1)
+legend(x="top", bty="n",
+       legend=c("MARRIGHT","MARMID","MARTAIL"), lty=1:3, lwd=2, col=mdc(5), cex=0.8)
+
+### Figure 3.3
+
+y3 <- rbind(y,y,y)
+p2.marmid <- 1 - logistic(0.75-abs(y[,1]-5))
+p2.martail <- 1 - logistic(0.75+abs(y[,1]-5))
+r2.marmid <- rbinom(n, 1, p2.marright)
+r2.martail <- rbinom(n, 1, p2.martail)
+r2 <- c(r2.marright,r2.marmid,r2.martail)
+r2 <- factor(r2, labels=c("Ymis","Yobs"))
+typ <- factor(rep(3:1,each=n),labels=c("MARTAIL","MARMID","MARRIGHT"))
+d <- data.frame(y1=y3[,1],y2=y3[,2],r2=r2,typ=typ)
+trellis.par.set(box.rectangle=list(col=c(mdc(2),mdc(1)),lwd=1.2))
+trellis.par.set(box.umbrella=list(col=c(mdc(2),mdc(1)),lwd=1.2))
+trellis.par.set(plot.symbol=list(col="transparent",lwd=1))
+tp <- bwplot(r2~y2|typ, data=d,
+             horizontal=TRUE, layout=c(1,3),
+             xlab=expression(Y2),
+             col=c(mdc(2),mdc(1)),strip=FALSE, xlim=c(2,8),
+             strip.left = strip.custom(bg="grey95"))
+print(tp)
+
+
+### Section 3.2.2 Imputation from the t-distribution
+
+mice.impute.TF <- function(y, ry, x, 
+                  gamlss.trace = FALSE, ...)
+{
+  require(gamlss)
+
+  # prepare data
+  xobs <- x[ry, , drop = FALSE]
+  xmis <- x[!ry, , drop = FALSE]
+  yobs <- y[ry]
+  n1 <- sum(ry)
+  n0 <- sum(!ry)
+
+  # draw bootstrap sample
+  s <- sample(n1, n1, replace = TRUE)
+  dotxobs <- xobs[s, , drop = FALSE]
+  dotyobs <- yobs[s]
+  dotxy <- data.frame(dotxobs, y = dotyobs)
+  
+  # fit the gamlss model
+  fit <- gamlss(y ~ ., data = dotxy, family = TF, 
+                trace = gamlss.trace, ...)
+  yhat <- predict(fit, data=dotxy, newdata = xmis)
+  sigma <- exp(coef(fit, "sigma"))
+  nu <- exp(coef(fit, "nu"))
+  
+  # draw the imputations
+  return(rTF(n0, yhat, sigma, nu))
+}
+
+
+### Section 3.3.3 Example
+data(db)
+
+### Figure 3.4
+
+par(mfrow=c(1,2))
+data <- subset(db, age>1&age<2, c("age","head"))
+names(data) <- c("age","hc")
+truehist(data$hc, col=mdc(1), border="white", 
+         xlab="Head circumference (cm)",
+         ylab="Density",
+         ylim=c(0,0.3), xlim=c(38,60),
+         nbins=44)
+
+mn <- gamlss(hc~1, data=na.omit(data), family=NO, trace=FALSE)
+mu <- coef(mn)
+sigma <- exp(coef(mn, "sigma"))
+cmfine <- seq(38,60,0.1)
+lines(cmfine, dNO(cmfine, mu, sigma), lwd=0.8, lty=2) 
+mt <- gamlss(hc~1, data=data, family=TF, trace=FALSE)
+mu <- coef(mt)
+sigma <- exp(coef(mt, "sigma"))
+nu <- exp(coef(mt, "nu"))
+lines(cmfine, dTF(cmfine, mu, sigma, nu), lwd=0.8, lty=1) 
+legend(x="right",legend=c("normal","t, df=6.7"), 
+       lwd=0.8, lty=c(2,1), bty="n", cex=0.7)
+
+plot(x=data$age, y=data$hc, col=mdc(1), cex=0.3,
+     xlab="Age (in years)",
+     ylab="Head circumference (cm)",
+     ylim=c(39,60))
+
+
+### create a synthetic data set
+data(db)
+data <- subset(db, age>1&age<2, c("age","head"))
+names(data) <- c("age","hc")
+synthetic <- rep(c(FALSE,TRUE), each=nrow(data))
+data2 <- rbind(data, data)
+data2[synthetic,"hc"] <- NA
+imp <- mice(data2, m=1, meth="TF", seed=36650, print=FALSE)
+syn <- subset(complete(imp), synthetic)
+
+### Figure 3.5
+
+data <- syn
+truehist(data$hc, col=mdc(2), border="white", 
+         xlab="Head circumference (cm)",
+         ylab="Density",
+         ylim=c(0,0.3), xlim=c(38,60),
+         nbins=44)
+
+mn <- gamlss(hc~1, data=na.omit(data), family=NO, trace=FALSE)
+mu <- coef(mn)
+sigma <- exp(coef(mn, "sigma"))
+cmfine <- seq(38,60,0.1)
+lines(cmfine, dNO(cmfine, mu, sigma), lwd=0.8, lty=2) 
+mt <- gamlss(hc~1, data=data, family=TF, trace=FALSE)
+mu <- coef(mt)
+sigma <- exp(coef(mt, "sigma"))
+nu <- exp(coef(mt, "nu"))
+lines(cmfine, dTF(cmfine, mu, sigma, nu), lwd=0.8, lty=1) 
+legend(x="right",legend=c("normal",paste("t, df=",round(nu,1),sep="")), 
+       lwd=0.8, lty=c(2,1), bty="n", cex=0.7)
+plot(x=data$age, y=data$hc, col=mdc(2), cex=0.3,
+     xlab="Age (in years)",
+     ylab="Head circumference (cm)",
+     ylim=c(39,60))
+
+### Section 3.4.1 PMM, Overview
+### Figure 3.6
+
+data <- boys[boys$age<=2,c("age","bmi")]
+set.seed(87120)
+data[sample(92:136,10),"bmi"] <- NA
+imp <- mice(data, meth="norm", m=1, seed=32212, print=FALSE)
+cd1 <- complete(imp)
+imp <- mice(data, m=1, seed=32212, print=FALSE)
+cd2 <- complete(imp)
+r <- !is.na(data$bmi)
+plot(data, col=mdc(1), xlab="Age", ylab="BMI")
+points(cd1[!r,], col=mdc(2), pch=19, cex=0.8)
+plot(data, col=mdc(1), xlab="Age", ylab="BMI")
+points(cd2[!r,], col=mdc(2), pch=19, cex=0.8)
+
+### Section 3.4.2 PMM, Computational details
+### Figure 3.7
+
+par(mfrow=c(1,1))
+data <- whiteside
+lwd <- 1.5
+data[47,"Gas"] <- NA
+
+pch <- c(rep(3,26),rep(1,30))
+plot(x=data$Temp, y=data$Gas, col=mdc(1), lwd=lwd, pch=pch, 
+     xlab=expression(paste("Temperature (", degree, "C)")), 
+     ylab="Gas consumption (cubic feet)")
+betadump <- vector("list", 0) 
+imp <- mice(data, m=5, meth="pmmdump", maxit=1, print=FALSE, seed=68006)
+betadump <- matrix(unlist(betadump), nc=3, byrow=TRUE)
+m1<-lm(Gas~Temp+Insul, data=data, na.action=na.omit)
+an <- coef(m1)[1]
+ai <- an + coef(m1)[3]
+b <- coef(m1)[2]
+abline(a=ai, b=b, col=mdc(4))
+abline(a=an, b=b, col=mdc(4))
+## for (i in 56:56) {
+##    abline(a=unlist(betadump[i,1]), b=unlist(betadump[i,2]), col=mdc(5))
+##    abline(a=unlist(betadump[i,1])+unlist(betadump[i,3]), b=unlist(betadump[i,2]), col=mdc(5))
+## }
+## points(rep(5,5),imp$imp$Gas, lwd=lwd, col=mdc(2), pch=20) 
+eta <- 0.6
+ylo <- ai+b*(5-eta)
+yhi <- ai+b*(5+eta)
+lines(x=c(5-eta,5+eta),y=c(ylo,yhi),lwd=3,col=mdc(4))
+an <- 7.05; ai<-an-1.7; b <- -0.38
+xlo1 <- (ylo-ai)/b
+xhi1 <- (yhi-ai)/b
+xlo2 <- (ylo-an)/b
+xhi2 <- (yhi-an)/b
+abline(a=an, b=b, col=mdc(5))
+abline(a=ai, b=b, col=mdc(5))
+lines(x=c(xlo1,xhi1),y=c(ylo,yhi),lwd=3,col=mdc(5))
+lines(x=c(xlo2,xhi2),y=c(ylo,yhi),lwd=3,col=mdc(5))
+abline(v=c(5-eta,5+eta),h=c(ylo,yhi),col=mdc(4),lty=3)
+rect(xlo1,0,xhi1,8,col=hcl(0,100,40,0.05),border=NA)
+rect(xlo2,0,xhi2,8,col=hcl(0,100,40,0.05),border=NA)
+# abline(v=c(xlo1,xhi1,xlo2,xhi2),col=mdc(5),lty=3)
+
+donors <- subset(data, (Insul=="After"&Temp>xlo1&Temp<xhi1) 
+                 |    (Insul=="Before"&Temp>xlo2&Temp<xhi2))
+points(x=donors$Temp, y=donors$Gas, cex=1.8, col=mdc(5), lwd=lwd)
+legend(x="bottomleft", legend=c("before insulation","after insulation"), pch=c(3,1),bty="n", pt.lwd=lwd)
+
+
+### Section 3.4.3 PMM, Algorithm 
+
+### simulate function used to calculate Table 3.3
+simulate <- function(nsim=10, seed=41872){
+  set.seed(seed)
+  res <- array(NA,dim=c(3, nsim, 6))
+  for(i in 1:nsim){
+    data <- createdata()
+    data <- makemissing(data)
+    res[1,i,] <- test.impute(data, m=5)
+    res[2,i,] <- test.impute(data, m=5, donors=1)
+    res[3,i,] <- test.impute(data, m=5, donors=10)
+  }
+  return(res)
+}
+
+### and perform simulations - MAY BE TIME CONSUMING
+res.pmm <- simulate(nsim)
+summarize.results(res.pmm)
+
+
+### Section 3.7.1
+### Figure 3.8
+
+par(mfrow=c(1,2))
+fit <- rpart(Gas ~ Temp + Insul, data=whiteside)
+plot(fit, branch=0, margin=0.15)
+text(fit, use=T,pretty=0,dig=3,cex=0.8)
+
+leaf <- row.names(fit$frame)[fit$where]
+label <- factor(leaf, labels=c(2,3,1,4,5))
+plot(x=whiteside$Temp, y=whiteside$Gas, type="n",
+     xlab=expression(paste("Temperature (", degree, "C)")), 
+     ylab="Gas consumption (cubic feet)")
+text(x=whiteside$Temp, y=whiteside$Gas, label=label, col=mdc(4), cex=0.6)
+
+
+
+### Section 3.9.4 Converting selection and pattern-mixture models
+### Figure 3.9
+
+par(mfrow=c(1,2))
+s <- c(
+       100, 0.015, 0.058, 0.02, 0.35,
+       110, 0.024, 0.074, 0.03, 0.30,
+       120, 0.043, 0.103, 0.05, 0.25,
+       130, 0.091, 0.164, 0.10, 0.20,
+       140, 0.145, 0.185, 0.15, 0.15,
+       150, 0.307, 0.247, 0.30, 0.10,
+       160, 0.157, 0.099, 0.15, 0.08,
+       170, 0.107, 0.049, 0.10, 0.06,
+       180, 0.055, 0.016, 0.05, 0.04,
+       190, 0.033, 0.005, 0.03, 0.02,
+       200, 0.023, 0.000, 0.02, 0.00,
+       210, 0.023, 0.000, 0.02, 0.00
+       )
+sm <- matrix(s, nr=12, nc=5, byrow=TRUE)
+snug <- 1.5
+xx <- cbind(sm[,1]-5+snug,
+        sm[,1]-5-snug,
+        sm[,1]-5)
+matplot(x=xx[,3], y=cbind(1-sm[,5]),
+        col=mdc(1), type="p", lwd=2, lty=1, pch=20,
+        xlab="Systolic BP (mmHg)",
+        ylab="Observation probability")
+matplot(x=xx, y=sm[,2:4], type="s",
+        col=c(mdc(4),mdc(5),mdc(6)), lwd=2, lty=1,
+        xlab="Systolic BP (mmHg)",
+        ylab="Density")
+
+
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/doc/fimd4.r
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/doc/fimd4.r	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/doc/fimd4.r	(revision 2477)
@@ -0,0 +1,178 @@
+### fimd4.R
+### R code from Van Buuren, S. (2012). 
+###		Flexible Imputation of Missing Data. 
+###		CRC/Chapman & Hall, Boca Raton, FL.
+### (c) 2012 Stef van Buuren, www.multiple-imputation.com
+### Version 1, 7mar2012
+### Version 2, 4nov2015 tested with mice 2.23
+### Tested with Mac OS X 10.7.3, R2.14-2, mice 2.12
+
+library("mice")
+library("lattice")
+
+
+### Chapter 4 Multivariate missing data
+
+### Section 4.1 Missing data patterns
+
+### define data sets pattern1-pattern4 with four patterns
+data <- matrix(sample(1:100,4*8*3,replace=TRUE),nrow=8*4,
+                dimnames=list(NULL,c("A","B","C")))
+data <- as.data.frame(data)
+data[c(31:32),"A"] <- NA
+data[c(15:16,22:24,30:32),"B"] <- NA
+data[c(6:8,12:16,17:21,27:29),"C"] <- NA
+mdpat <- cbind(expand.grid(rec = 8:1, pat = 1:4, var = 1:3), r=as.numeric(as.vector(is.na(data))))
+pattern1 <- data[1:8,]
+pattern2 <- data[9:16,]
+pattern3 <- data[17:24,]
+pattern4 <- data[25:32,]
+
+### Figure 4.1
+types <-  c("Univariate","Monotone","File matching","General")
+tp41 <- levelplot(r~var+rec|as.factor(pat), data=mdpat,
+          as.table=TRUE, aspect="iso",
+          shrink=c(0.9), 
+          col.regions = mdc(1:2),
+          colorkey=FALSE,
+          scales=list(draw=FALSE),
+          xlab="", ylab="",
+          between = list(x=1,y=0),
+          strip = strip.custom(bg = "grey95", style = 1,
+            factor.levels = types))
+print(tp41)
+
+md.pattern(pattern4)
+p <- md.pairs(pattern4)
+p
+
+
+### proportion of usable cases
+p$mr/(p$mr+p$mm)
+
+
+### outbound statistics
+p$rm/(p$rm+p$rr)
+
+### Figure 4.2
+par(mfrow=c(2,2))
+fluxplot(pattern1, main="", xlim=c(-0.1,1.1), ylim=c(-0.1,1.1))
+text(x=0.5,y=1,label="Univariate")
+fluxplot(pattern2, main="", xlim=c(-0.1,1.1), ylim=c(-0.1,1.1))
+text(x=0.5,y=1,label="Monotone")
+fluxplot(pattern3, main="", xlim=c(-0.1,1.1), ylim=c(-0.1,1.1))
+text(x=0.5,y=1,label="File matching")
+fluxplot(pattern4, main="", xlim=c(-0.1,1.1), ylim=c(-0.1,1.1))
+text(x=0.5,y=1,label="General")
+
+### calculate pobs, influx, outflux of general pattern
+flux(pattern4)[,1:3]
+
+### section 4.3 Monotone data imputation
+### monotone data imputation on three columns
+data <- nhanes2[,1:3]
+md.pattern(data)
+imp <- mice(data, visit="monotone", maxit=1, m=2)
+
+### Numerical example, approximate two-step
+ini <- mice(nhanes2, maxit=0)
+pred <- ini$pred
+pred["bmi","chl"] <- 0
+pred["hyp",c("chl","bmi")] <- 0
+imp <- mice(nhanes2, vis="monotone", pred=pred, maxit=1, m=2)
+
+### Section 4.5 Fully Conditional Specification
+
+### Example of slow convergence
+generate <- function(n = c(1000, 4500, 4500, 0),
+                     cor = matrix(c(1, 0.9, 0.9, 0.9, 1, 0.7, 0.9, 0.7, 1), nrow = 3)) {
+  require(MASS)
+  nt <- sum(n)
+  cs <- cumsum(n)
+  data <- mvrnorm(nt, mu = rep(0,3), Sigma = cor)
+  dimnames(data) <- list(1:nt, c("X", "Y1", "Y2"))
+  if (n[2] > 0) data[(cs[1]+1):cs[2],"Y1"] <- NA 
+  if (n[3] > 0) data[(cs[2]+1):cs[3],"Y2"] <- NA
+  if (n[4] > 0) data[(cs[3]+1):cs[4],c("Y1","Y2")] <- NA
+  return(data)
+}
+
+impute <- function(data, m = 5, method="norm", print=FALSE, maxit = 10, ...) {
+  statistic <- matrix(NA, nrow=maxit, ncol=m)
+  for (iter in 1:maxit) {
+    if (iter==1) imp <- mice(data, m = m, method = method, print=print, maxit = 1, ...)
+    else imp <- mice.mids(imp, maxit=1, print=print, ...)
+    statistic[iter,] <- unlist(with(imp, cor(Y1,Y2))$analyses)
+  }
+  return(list(imp=imp, statistic=statistic))
+}
+
+simulate <- function(ns=matrix(c(1000,500,250,100,50,0,
+                               rep(c(4500,4750,4875,4950,4975,5000),2),
+                       rep(0,6)), nrow=6), m = 5, maxit=10,
+                       seed=1, ...) {
+  if (!missing(seed)) set.seed(seed)
+  s <- cbind(rep(1:nrow(ns), each=maxit*m),
+             apply(ns, 2, rep, each=maxit*m),
+             rep(1:maxit,each=m), 1:m, NA)
+  colnames(s) <- c("k","n111","n101","n110","n100","iteration","m","rY1Y2")
+  for (k in 1:nrow(ns)){
+    data <- generate(ns[k,], ...)
+    r <- impute(data, m=m, maxit=maxit, ...)
+    s[s[,"k"]==k,"rY1Y2"] <- t(r$statistic) 
+  }
+  return(data.frame(s))
+}
+
+### perform simulation - TIME CONSUMING (10 minutes)
+slow.demo <- simulate(maxit=150, seed=62771)
+
+### Figure 4.3
+labels <- c("90% missing", "95% missing", "97.5% missing", 
+            "99% missing", "99.5% missing", "100% missing")
+tp43 <- xyplot(rY1Y2~iteration|as.factor(k), group=m,
+       data = slow.demo, layout=c(3,2),
+       type="l", as.table = TRUE,
+       ylab = "Correlation between Y1 and Y2",
+       xlab = "Iteration", col=mdc(3),
+       scales=list(y=list(alternating=1, tck=c(1,0))),
+       strip = strip.custom(bg="grey95", style=1,
+         factor.levels=labels))
+print(tp43)
+
+### Section 4.6.3 Illustration
+
+## boys data: select subset
+select <- with(boys, age>=8 & age<=21.0)
+
+### version with all numeric data for jm and pmm
+djm <- boys[select,-4]
+djm$gen <- as.integer(djm$gen)
+djm$phb <- as.integer(djm$phb)
+djm$reg <- as.integer(djm$reg)
+
+### version with categorical variables for fcs
+dfcs <- boys[select,-4]
+
+### impute according to joint multivariate normal
+jm.10 <- mice(djm, method="norm", seed=93005, m=10)
+
+### impute according to predictive mean matching
+pmm.10 <- mice(djm, seed=71332,m=10)
+
+### impute according to proportional odds model
+fcs.10 <- mice(dfcs, seed=81420, m=10)
+
+### Figure 4.4
+tp44 <- xyplot(jm.10, gen~age|.imp, subset=as.integer(.imp)<7, 
+       xlab="Age", ylab="Genital stage")
+print(tp44)
+
+### Figure 4.5
+tp45 <- xyplot(fcs.10, gen~age|.imp, subset=as.integer(.imp)<7,
+       xlab="Age", ylab="Genital stage")
+print(tp45)
+
+### Figure 4.6 is too complex, and will not be given here
+
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/doc/fimd5.r
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/doc/fimd5.r	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/doc/fimd5.r	(revision 2477)
@@ -0,0 +1,301 @@
+### fimd5.R
+### R code from Van Buuren, S. (2012). 
+###		Flexible Imputation of Missing Data. 
+###		CRC/Chapman & Hall, Boca Raton, FL.
+### (c) 2012 Stef van Buuren, www.multiple-imputation.com
+### Version 1, 21mar2012
+### Version 2, 4nov2015 tested with mice 2.23
+### Tested with Mac OS X 10.7.3, R2.14-2, mice 2.12
+
+if (packageVersion("mice")<'2.12') stop("This code requires mice 2.12.")
+
+library("mice")
+library("lattice")
+library("gamlss")
+library("AGD")
+
+### set Trellis layout parameters
+lhset <- trellis.par.get("layout.heights")
+lhset$top.padding <- 0
+lhset$bottom.padding <- 0
+trellis.par.set("layout.heights", lhset)
+lwset <- trellis.par.get("layout.widths")
+lwset$left.padding <- 0
+lwset$right.padding <- 0
+trellis.par.set("layout.widths", lwset)
+
+
+### Section 5.3.2 Predictors
+
+imp <- mice(nhanes, print=FALSE)
+imp$predictorMatrix
+imp <- mice(cbind(nhanes, chl2=2*nhanes$chl), print=FALSE)
+imp$loggedEvents
+
+
+### Section 5.4.1 Ratio of two variables
+
+imp1 <- mice(boys)
+long <- complete(imp1, "long", inc=TRUE)
+long$whr <- with(long, wgt/(hgt/100))
+# imp2 <- long2mids(long)
+
+### Just anothor varianble (JAV)
+boys$whr <- boys$wgt/(boys$hgt/100)
+imp.jav <- mice(boys, m=1, seed=32093, maxit=10)
+imp.jav$loggedEvents
+
+### Passive imputation
+ini <- mice(boys, m=1, maxit=0)
+meth <- ini$meth
+meth["whr"] <- "~I(wgt/(hgt/100))"
+meth["bmi"] <- "~I(wgt/(hgt/100)^2)"
+pred <- ini$pred
+pred[c("wgt","hgt","bmi"),"whr"] <- 0
+pred[c("wgt","hgt","whr"),"bmi"] <- 0
+pred
+imp.pas <- mice(boys, m=1, meth=meth, pred=pred, seed=32093, maxit=10)
+
+### passive imputation 2 
+pred[c("wgt","hgt","hc","reg"),"bmi"] <- 0
+pred[c("gen","phb","tv"),c("hgt","wgt","hc")] <- 0
+pred[,"whr"] <- 0
+imp.pas2 <- mice(boys, m=1, meth=meth, pred=pred, seed=32093, maxit=10)
+
+### Figure 5.1
+c1 <- cbind(model="JAV",complete(imp.jav))
+c2 <- cbind(model="passive",complete(imp.pas))
+c3 <- cbind(model="passive 2",complete(imp.pas2))
+cd <- rbind(c1,c2, c3)
+trellis.par.set(mice.theme())
+tp51 <- xyplot(whr~hgt|model,data=cd,layout=c(3,1),
+       groups=rep(is.na(imp.jav$data$whr),3), pch=c(1,20), cex=c(0.4,1),
+       xlab="Height (cm)", ylab="Weight/Height (kg/m)")
+print(tp51)
+
+### Section 5.4.3 Interaction terms
+rm(boys)
+expr <- expression((wgt-40)*(hc-50))
+boys$wgt.hc <- with(boys, eval(expr))
+ini <- mice(boys, max=0)
+meth <- ini$meth
+meth["wgt.hc"] <- paste("~I(",expr,")",sep="")
+meth["bmi"] <- ""
+pred <- ini$pred
+pred[c("wgt","hc"),"wgt.hc"] <- 0
+imp.int <- mice(boys, m=1, maxit=10, meth=meth, pred=pred, seed=62587)
+
+### Figure 5.2
+miss <- is.na(imp.int$data$wgt.hc)
+tp52a <- xyplot(imp.int, wgt~wgt.hc, na.groups = miss,
+       cex=c(0.8,1.2), pch=c(1,20),
+       ylab="Weight (kg)", xlab="Interaction")
+tp52b <- xyplot(imp.int, hc~wgt.hc, na.groups = miss,
+       cex=c(0.8,1.2), pch=c(1,20),
+       ylab="Head circumference (cm)", xlab="Interaction")
+print(tp52a)
+print(tp52b)
+
+### Section 5.4.4 Conditional imputation
+
+ini <- mice(airquality[,1:2],maxit=0)
+post <- ini$post
+post["Ozone"] <- "imp[[j]][,i] <- squeeze(imp[[j]][,i],c(1,200))"
+### Note: ifdo() not yet implemented
+### so for the moment use old form
+## post["Ozone"] <- "ifdo(c(Ozone<1, Ozone>200), c(1, 200))"
+imp <- mice(airquality[,1:2],method="norm.nob",m=1,maxit=1,seed=1,post=post)
+
+### Figure 5.3
+
+lwd <- 1.5
+par(mfrow=c(1,2))
+breaks <- seq(-20, 200, 10)
+nudge <- 1
+x <- matrix(c(breaks-nudge, breaks+nudge), ncol=2)
+obs <- airquality[,"Ozone"]
+mis  <- imp$imp$Ozone[,1]
+fobs <- c(hist(obs, breaks, plot=FALSE)$counts, 0)
+fmis <- c(hist(mis, breaks, plot=FALSE)$counts, 0)
+y <- matrix(c(fobs, fmis), ncol=2)
+matplot(x, y, type="s",
+        col=c(mdc(4),mdc(5)), lwd=2, lty=1,
+        xlim = c(0, 170), ylim = c(0,40), yaxs = "i",
+        xlab="Ozone (ppb)",
+        ylab="Frequency")
+box()
+
+tp <- xyplot(imp, Ozone~Solar.R, na.groups=ici(imp),
+       ylab="Ozone (ppb)", xlab="Solar Radiation (lang)",
+       cex = 0.75, lex=lwd,
+       ylim = c(-20, 180), xlim = c(0,350))
+print(tp, newpage = FALSE, position = c(0.48,0.08,1,0.92))
+
+
+
+### Post-processing on the boys data
+
+post <- mice(boys, m=1, maxit=0)$post
+post["gen"] <- "imp[[j]][p$data$age[!r[,j]]<8,i] <- levels(boys$gen)[1]"
+post["phb"] <- "imp[[j]][p$data$age[!r[,j]]<8,i] <- levels(boys$phb)[1]"
+post["tv"]  <- "imp[[j]][p$data$age[!r[,j]]<8,i] <- 1"
+free <- mice(boys, m=1, seed=85444, print=FALSE)
+restricted <- mice(boys, m=1, post=post, seed=85444, print=FALSE)
+
+### The following code using ifdo does not yet work
+### Use the form given above
+## post <- mice(boys, m=1, maxit=0)$post
+## post["gen"] <- "ifdo(age<8, levels(gen)[1])"
+## post["phb"] <- "ifdo(age<8, levels(phb)[1])"
+## post["tv"] <- "ifdo(age<8, 1)"
+## free <- mice(boys, m=1, seed=85444)
+## restricted <- mice(boys, m=1, post=post, seed=85444)
+
+
+### Figure 5.4
+
+imp3 <- rbind(free, restricted)  # ignore warning
+model <- rep(c("Free","Restricted"),each=nrow(boys))
+tp54 <- xyplot(imp3, gen~age|model, pch=c(3,1), cex=c(3,1.5),
+            ylab="Genital development", xlab="Age (years)")
+print(tp54)
+
+### Section 5.4.5 Compositional data
+
+set.seed(43112)
+n <- 400
+Y1 <- sample(1:10, size=n, replace=TRUE)
+Y2 <- sample(1:20, size=n, replace=TRUE)
+Y3 <- 10 + 2 * Y1 + 0.6 * Y2 + sample(-10:10, size=n, replace=TRUE)
+Y <- data.frame(Y1, Y2, Y3)
+Y[1:100, 1:2] <- NA
+md.pattern(Y)
+
+Y123 <- Y1+Y2+Y3
+Y12 <- Y123-Y[,3]
+P1 <- Y[,1]/Y12
+data <- data.frame(Y, Y123, Y12, P1)
+
+ini <- mice(data, maxit=0, m=10, print=FALSE, seed=21772)
+meth <- ini$meth
+meth["Y1"] <- "~I(P1*Y12)"
+meth["Y2"] <- "~I((1-P1)*Y12)"
+meth["Y12"] <- "~I(Y123-Y3)"
+pred <- ini$pred
+pred["P1",] <- 0
+pred[c("P1"),c("Y12","Y3")] <- 1
+imp1 <- mice(data, meth=meth, pred=pred, m=10, print=FALSE)
+
+round(summary(pool(with(imp1, lm(Y3~Y1+Y2))))[,1:2],2)
+
+### improved solution for Figure 5.5b
+ini <- mice(data, maxit=0, m=10, print=FALSE, seed=21772)
+meth <- ini$meth
+meth["Y1"] <- "~I(P1*Y12)"
+meth["Y2"] <- "~I((1-P1)*Y12)"
+meth["Y12"] <- "~I(Y123-Y3)"
+pred <- ini$pred
+pred["P1",] <- 0
+pred[c("P1"),c("Y12","Y3")] <- 1
+imp1 <- mice(data, meth=meth, pred=pred, m=1, print=FALSE)
+pred["P1","Y3"] <- 0
+imp2 <- mice(data, meth=meth, pred=pred, m=1, print=FALSE)
+
+### Figure 5.5
+imp <- rbind(imp1, imp2)  # ignore warning
+model <- rep(c("Y12 and Y3","Y12 only"),each=n)
+tp55 <- xyplot(imp, P1~Y12|model, pch=c(1,19), xlab="Y1 + Y2")
+print(tp55)
+
+### Section 5.5.1 Visit sequence
+
+### Continue from the imp.int object calculated in section 5.4.3 
+imp.int$vis
+vis <- c(2,3,5,10,6:9)
+rm(boys)  # refresh boys data
+expr <- expression((wgt-40)*(hc-50))
+boys$wgt.hc <- with(boys, eval(expr))
+imp.int2 <- mice(boys, m=1, max=1, vis=vis, meth=imp.int$meth, pred=imp.int$pred, seed=23390)
+
+### monotone sequence
+imp.int2 <- mice(boys, m=1, max=1, vis="monotone", meth=imp.int$meth, pred=imp.int$pred, seed=23390)
+
+### Section 5.5.2 Convergence
+
+### Figure 5.6 Default color version
+
+imp <- mice(nhanes, seed=62006, maxit=20, print=FALSE)
+tp56 <- plot(imp)
+print(tp56)
+
+### Figure 5.6 Book version
+
+tp56b <- plot(imp, col=mdc(5), lty=1:5)
+print(tp56b)
+
+### Example of pathological convergence
+rm(boys)
+ini <- mice(boys,max=0,print=FALSE)
+meth <- ini$meth
+meth["bmi"] <- "~I(wgt/(hgt/100)^2)"
+imp.bmi1 <- mice(boys, meth=meth, maxit=20, seed=60109)
+
+### Figure 5.7
+### Does not reproduce exactly, but the message is the same
+tp57 <- plot(imp.bmi1,c("hgt","wgt","bmi"), col=mdc(5), lty=1:5)
+print(tp57)
+
+### Breaking cyclic imputations for hgt and wgt
+pred <- ini$pred
+pred[c("hgt","wgt"),"bmi"] <- 0
+imp.bmi2 <- mice(boys, meth=meth, pred=pred, maxit=20, seed=60109)
+
+### Figure 5.8
+### Does not reproduce exactly, but the message is the same
+tp58 <- plot(imp.bmi2,c("hgt","wgt","bmi"), col=mdc(5), lty=1:5)
+print(tp58)
+
+### Section 5.6.2 Diagnostic graphs
+
+set.seed(24417)
+### create 50% missing data in wgt
+boys$wgt[sample(1:nrow(boys),nrow(boys)/2)] <- NA
+meth <- c("","pmm","pmm","","pmm","polr","polr","pmm","polyreg")
+imp <- mice(boys, m=1, meth=meth, seed=53882, print=FALSE)
+
+### Simple scatterplot wgt-age (not given in book)
+tp58b <- xyplot(imp, wgt~age|.imp)
+print(tp58b)
+
+### Fit separate regression models for wgt
+### for observed (n=372) and imputed (n=376) data
+cd <- complete(imp)[,-4]
+isobs <- !is.na(boys$wgt)
+cdobs <- cd[isobs,]
+cdmis <- cd[!isobs,]
+obs <- gamlss(wgt~age+hgt+hc+gen+phb+tv+reg, data=cdobs)
+mis <- gamlss(wgt~age+hgt+hc+gen+phb+tv+reg, data=cdmis)
+
+### Figure 5.9 worm plot
+wp.twin(obs, mis, xvar=NULL, xvar.column=2, n.inter=9, col1=mdc(4), col2=mdc(5), ylim=0.9, cex=1, pch=1)
+
+### Figure 5.10
+imp <- mice(nhanes, seed=29981)
+tp510 <- stripplot(imp, pch=c(1,20))
+print(tp510)
+
+### Figure 5.11
+tp511 <- densityplot(imp)
+print(tp511)
+
+### Calculate propensity scores
+fit <- with(imp, glm(ici(imp)~age+bmi+hyp+chl,family=binomial))
+ps <- rep(rowMeans(sapply(fit$analyses, fitted.values)),imp$m)
+
+### Figure 5.12
+tp512 <- xyplot(imp, bmi~ps|.imp, pch=c(1,19), 
+       xlab="Probability that record is incomplete", 
+       ylab="BMI")
+print(tp512)
+
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/doc/fimd6.r
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/doc/fimd6.r	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/doc/fimd6.r	(revision 2477)
@@ -0,0 +1,78 @@
+### fimd6.R
+### R code from Van Buuren, S. (2012). 
+###		Flexible Imputation of Missing Data. 
+###		CRC/Chapman & Hall, Boca Raton, FL.
+### (c) 2012 Stef van Buuren, www.multiple-imputation.com
+### Version 1, 14mar2012
+### Version 2, 4nov2015 tested with mice 2.23
+### Tested with Mac OS X 10.7.3, R2.14-2, mice 2.11
+
+library("mice")
+
+### Section 6.1.1 Averaging and stacking the data
+
+imp <- mice(nhanes, print=FALSE, seed=55152)
+stacked <- complete(imp, "long")
+fit <- lm(chl~bmi+age,data=stacked)
+coef(fit)
+
+### Section 6.1.2 Repeated analyses
+
+fit <- with(imp, lm(chl~bmi+age))
+coef(fit$analyses[[1]])
+coef(fit$analyses[[2]])
+
+est <- pool(fit)
+summary(est)
+
+expr <- expression(freq <- table(hyp), freq[1]-freq[2])
+fit <- with(imp, eval(expr))
+unlist(fit$an)
+
+
+### Section 6.3.5 Computation
+
+imp <- mice(nhanes2, seed=23210, print=FALSE)
+fit <- with(imp, lm(bmi~age+chl))
+fit.restrict <- with(imp, lm(bmi~1))
+res <- pool.compare(fit, fit.restrict)
+res$pvalue
+
+est <- pool(fit)
+summary(est)
+
+C <- matrix(c(c(0,1,-1,0),c(0,2,-1,0),c(0,0,0,1)),nrow=3,ncol=4,byrow=TRUE)
+c <- c(0,0,0.1)
+q <- C %*% est$qbar
+u <- diag(C %*% est$ubar %*% t(C))
+t <- diag(C %*% est$t %*% t(C))
+C1 <- C
+C1[C1!=0] <- 1
+df <- C1 %*% est$df    # this needs to change to compromise df
+d <- (q-c)^2/t
+pvalue <- 1-pf(d, 1, df)
+pvalue
+
+
+### Section 6.4.2 Computation
+
+data <- boys[boys$age>=8,-4]
+imp <- mice(data, seed=28382, m=10, print=FALSE)
+expr <- expression(
+    f1 <- lm(tv~1),
+    f2 <- step(f1, scope=list(upper=~age+hgt+wgt+hc+gen+phb+reg), lower=~1)) 
+fit <- with(imp, expr)
+formulas <- lapply(fit$an, formula)
+terms <- lapply(formulas, terms)
+vars <- unlist(lapply(terms, labels))
+table(vars)
+
+fit.without <- with(imp, lm(tv~age+gen+reg+phb))
+fit.with <- with(imp, lm(tv~age+gen+reg+phb+hgt))
+pool.compare(fit.with, fit.without)$pvalue
+
+fit.without <- with(imp, lm(tv~age+gen+reg))
+fit.with <- with(imp, lm(tv~age+gen+reg+phb))
+pool.compare(fit.with, fit.without)$pvalue
+
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/doc/fimd7.r
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/doc/fimd7.r	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/doc/fimd7.r	(revision 2477)
@@ -0,0 +1,414 @@
+### fimd7.R
+### R code from Van Buuren, S. (2012). 
+###		Flexible Imputation of Missing Data. 
+###		CRC/Chapman & Hall, Boca Raton, FL.
+### (c) 2012 Stef van Buuren, www.multiple-imputation.com
+### Version 1, 22mar2012
+### Version 2, 4nov2015 tested with mice 2.23
+### Tested with Mac OS X 10.7.3, R2.14-2, mice 2.12
+
+if (packageVersion("mice")<'2.12') stop("This code requires mice 2.12.")
+
+### Section 7.1 Too many columns
+
+library("mice")
+library("lattice")
+library("foreign")
+library("survival")
+
+### Section 7.1.3 Data exploration
+
+data <- leiden85   ## Note: the leiden85 data is not yet avialable in V2.12
+if (!is.data.frame(data)) warning("The code for section 7.1/7.2 requires access to the LEIDEN85 data.")
+
+ini <- mice(data, maxit=0)   # recommended 
+table(ini$nmis)
+
+table(data$beroep1, useNA="always")
+
+v1 <- names(ini$nmis[ini$nmis==0])
+outlist1 <- v1[c(1,3:5,7:10,16:47,51:60,62,64:65,69:72)]
+length(outlist1)
+
+### Section 7.1.4 Outflux
+
+fx <- fluxplot(data, main=NULL, cex=0.9)
+
+outlist2 <- row.names(fx)[fx$outflux<0.5]
+length(outlist2)
+
+data2 <- data[,!names(data) %in% outlist2]
+fx2 <- flux(data2)
+outlist3 <- row.names(fx2)[fx2$outflux<0.5]
+
+
+### Section 7.1.5 Logged events
+
+ini$log[1:3,]
+
+outlist4 <- as.character(ini$log[,"out"])
+
+
+### Section 7.1.6 Quick predictor selection for wide data
+
+outlist <- unique(c(outlist1, outlist2, outlist4))
+length(outlist)
+
+data2 <- data[,!names(data) %in% outlist]
+
+inlist <- c("sex","lftanam","rrsyst","rrdiast")
+pred <- quickpred(data2, minpuc=0.5, inc=inlist)
+
+table(rowSums(pred))
+
+rowSums(pred[c("rrsyst","rrdiast"),])
+
+names(data2)[pred["rrsyst",]==1]
+
+vname <- "rrsyst"
+y <- cbind(data2[vname], r=!is.na(data2[,vname]))
+vdata <- data2[,pred[vname,]==1]
+round(cor(y=y,x=vdata,use="pair"),2)
+
+
+### Section 7.1.7 Generating the imputations 
+
+### Smart imputation using quickpred - - TIME COMSUMING (30 MINUTES)
+imp.qp <- mice(data2, pred=pred, ridge = 0.0001, seed=29725)
+
+### Blind imputation - MUCH MORE TIME CONSUMING (10 HOURS)
+### Not recommended
+imp <- mice(data, ridge=0.01, seed=32417, maxit=2)
+
+vnames <- c("rrsyst","rrdiast")
+cd1 <- complete(imp)[,vnames]
+cd2 <- complete(imp.qp)[,vnames]
+typ <- factor(rep(c("blind imputation","quickpred"),each=nrow(cd1)))
+mis <- ici(data2[,vnames])
+mis <- is.na(imp$data$rrsyst)|is.na(imp$data$rrdiast)
+cd <- data.frame(typ=typ,mis=mis,rbind(cd1, cd2))
+tp72 <- xyplot(jitter(rrdiast,10) ~ jitter(rrsyst,10) | typ, data = cd, groups = mis, 
+             xlab = "Systolic BP (mmHg)", ylab = "Diastolic BP (mmHg)", 
+             col=c(mdc(1),mdc(2)), pch=c(1,19),type=c("g","p"), 
+             strip = strip.custom(bg="grey95"), 
+             scales = list(alternating=1, tck=c(1,0)))
+print(tp72)
+
+
+### Section 7.1.8 A further improvements: Survival as predictor variable
+
+dat <- cbind(data2, dead = 1 - data2$dwa)
+hazard <- nelsonaalen(dat, survda, dead)
+
+### calculate correlations between hazard, t and logt (not in  
+tmp <- data.frame(hazard, t=data2$survda, logt=log(data2$survda),
+                  SBP=data2$rrsyst, DBP=data2$rrdiast)
+round(cor(tmp, use="pair"),3)
+
+
+### Section 7.2 Sensitivity analysis
+
+### Figure 7.3
+
+fit <- survfit(Surv(survda/365, 1-dwa) ~ is.na(rrsyst), data = data2) 
+plot(fit, lty = 1, lwd=1.5, xlab="Years since intake",
+     ylab="K-M Survival probability", las=1, 
+     col=c(mdc(4),mdc(5)), mark.time=FALSE)
+text(4,0.7,"BP measured")
+text(2,0.3,"BP missing")
+
+
+### Section 7.2.3 Generating imputations under the delta-adjustment
+delta <- c(0,-5,-10,-15,-20)
+post <- imp.qp$post
+
+### undamped sensitivity analysis
+### TIME CONSUMING (SEVERAL HOURS)
+imp.all.undamped <- vector("list", length(delta))
+for (i in 1:length(delta)) {
+  d <- delta[i]
+  cmd <- paste("imp[[j]][,i] <- imp[[j]][,i] +",d)
+  post["rrsyst"] <- cmd
+  imp <- mice(data2, pred=pred, post=post, maxit=1, seed=i*22, ridge=0.0001)
+  imp.all.undamped[[i]] <- imp
+}
+
+
+### damped sensitivity analysis
+### TIME CONSUMING (SEVERAL HOURS)
+imp.all.damped <- vector("list", length(delta))
+for (i in 1:length(delta)) {
+  d <- delta[i]
+  cmd <- paste("fit <- lm(y ~ as.matrix(x)); 
+              damp <- sqrt(1 - summary(fit)$r.squared);
+              imp[[j]][, i] <- imp[[j]][, i] + damp * ", d)
+  post["rrsyst"] <- cmd
+  imp <- mice(data2, pred=pred, post=post, maxit=1, seed=i*22, ridge=0.0001)
+  imp.all.damped[[i]] <- imp
+}
+
+
+### Section 7.2.4 Complete data analysis
+
+cda <- expression(
+    sbpgp <- cut(rrsyst, breaks = c(50, 124, 
+          144, 164, 184, 200, 500)),
+    agegp <- cut(lftanam, breaks = c(85, 90, 
+          95, 110)),
+    dead  <- 1 - dwa,
+    coxph(Surv(survda, dead) 
+          ~ C(sbpgp, contr.treatment(6, base = 3)) 
+          + strata(sexe, agegp)))
+imp <- imp.all.damped[[1]]
+fit <- with(imp, cda)
+as.vector(exp(summary(pool(fit))[,1]))
+
+### Table 7.5
+
+fit1 <- with(imp.all.damped[[1]], cda)
+fit2 <- with(imp.all.damped[[2]], cda)
+fit3 <- with(imp.all.damped[[3]], cda)
+fit4 <- with(imp.all.damped[[4]], cda)
+fit5 <- with(imp.all.damped[[5]], cda)
+r1<-as.vector(t(exp(summary(pool(fit1))[,c(1,6:7)])))
+r2<-as.vector(t(exp(summary(pool(fit2))[,c(1,6:7)])))
+r3<-as.vector(t(exp(summary(pool(fit3))[,c(1,6:7)])))
+r4<-as.vector(t(exp(summary(pool(fit4))[,c(1,6:7)])))
+r5<-as.vector(t(exp(summary(pool(fit5))[,c(1,6:7)])))
+round(t(matrix(c(r1,r2,r3,r4,r5),nrow=15)),2)
+
+
+
+### Section 7.3 Correct prevalence estimates from self-reported data
+
+library("mice")
+krul <- selfreport[selfreport$src=="krul",]
+mgg <- selfreport[selfreport$src=="mgg",]
+
+### Figure 7.4
+
+xy <- xy.coords(krul$bm, krul$br-krul$bm)
+plot(xy,col=mdc(1),xlab="Measured BMI",ylab="Reported - Measured BMI",
+     xlim=c(17,45),ylim=c(-5,5), type="n",lwd=0.7)
+polygon(x=c(30,20,30),y=c(0,10,10),col="grey95",border=NA) 
+polygon(x=c(30,40,30),y=c(0,-10,-10),col="grey95",border=NA)
+abline(0,0,lty=2,lwd=0.7)
+points(xy, col=mdc(1),cex=0.7)
+lines(lowess(xy),lwd=2,col=mdc(4))
+text(1:4,x=c(40,28,20,32),y=c(4,4,-4,-4),cex=3)
+box(lwd=1)
+
+### Figure 7.5 Krul data - males
+males <- krul[krul$sex=="Male",]
+fit <- lm(bm~br,data=males)
+plot(x=males$br,y=males$bm,
+     xlim=c(26,34),ylim=c(26,34),
+     xlab="Self-reported BMI",ylab="Measured BMI",col=mdc(1),
+     cex.lab=1.5, cex.axis=1.3)
+abline(h=30,v=30,lty=2)
+abline(coef(fit),col=mdc(4))
+abline(v=(30-coef(fit)[1])/coef(fit)[2],col=mdc(4))
+text(1:4,x=c(33.8,33.8,26.2,26.2),y=c(33.8,26.2,26.2,33.8),cex=4)
+text(c("a","b"),x=c(29.1,29.7,29.1,29.7),y=c(34.1,34.1,26.4,26.4),cex=3,adj=c(0.5,1))
+
+
+### Section 7.3.4 Data
+
+md.pattern(selfreport[,c("age","sex","hm","hr","wm","wr")])
+
+
+### Section 7.3.5 Application
+
+bmi <- function(h,w){return(w/(h/100)^2)}
+init <- mice(selfreport,maxit=0)
+meth <- init$meth
+meth["bm"] <- "~bmi(hm,wm)"
+meth[c("prg", "edu", "etn")] <- ""
+pred <- init$pred
+pred[,c("src","id","pop","prg","edu","etn","web","bm","br")] <- 0
+imp <- mice(selfreport, pred=pred, meth=meth, seed=66573, maxit=20, m=10)
+
+
+### Figure 7.6 
+
+cd <- complete(imp, 1)
+xy <- xy.coords(cd$bm, cd$br-cd$bm)
+plot(xy,col=mdc(2),xlab="Measured BMI",ylab="Reported - Measured BMI",
+     xlim=c(17,45),ylim=c(-5,5), type="n",lwd=0.7)
+polygon(x=c(30,20,30),y=c(0,10,10),col="grey95",border=NA) 
+polygon(x=c(30,40,30),y=c(0,-10,-10),col="grey95",border=NA)
+abline(0,0,lty=2,lwd=0.7)
+
+idx <- cd$src=="krul"
+xyc <- xy; xyc$x <- xy$x[idx]; xyc$y <- xy$y[idx]
+xys <- xy; xys$x <- xy$x[!idx]; xys$y <- xy$y[!idx]
+points(xyc,col=mdc(1), cex=0.7)
+points(xys,col=mdc(2), cex=0.7)
+lines(lowess(xyc),col=mdc(4),lwd=2)
+lines(lowess(xys),col=mdc(5),lwd=2)
+text(1:4,x=c(40,28,20,32),y=c(4,4,-4,-4),cex=3)
+box(lwd=1)
+
+
+### Table 7.7
+### Not particularly elegant code, at the moment
+  prev <- matrix(NA,nr=15,nc=4)
+  prev[1,1:2] <- summary(pool(with(imp, lm(br>=30~1,subset=(src=="mgg")))))[1,1:2]
+  prev[1,3:4] <- summary(pool(with(imp, lm(bm>=30~1,subset=(src=="mgg")))))[1,1:2]
+  prev[2,1:2] <- summary(pool(with(imp, lm(br>=30~1,subset=(src=="mgg"&sex=="Male")))))[1,1:2]
+  prev[2,3:4] <- summary(pool(with(imp, lm(bm>=30~1,subset=(src=="mgg"&sex=="Male")))))[1,1:2]
+  prev[3,1:2] <- summary(pool(with(imp, lm(br>=30~1,subset=(src=="mgg"&sex=="Female")))))[1,1:2]
+  prev[3,3:4] <- summary(pool(with(imp, lm(bm>=30~1,subset=(src=="mgg"&sex=="Female")))))[1,1:2]
+  prev[4,1:2] <- summary(pool(with(imp, lm(br>=30~1,subset=(src=="mgg"&sex=="Male"&age>=18&age<30)))))[1,1:2]
+  prev[4,3:4] <- summary(pool(with(imp, lm(bm>=30~1,subset=(src=="mgg"&sex=="Male"&age>18&age<30)))))[1,1:2]
+  prev[5,1:2] <- summary(pool(with(imp, lm(br>=30~1,subset=(src=="mgg"&sex=="Male"&age>=30&age<40)))))[1,1:2]
+  prev[5,3:4] <- summary(pool(with(imp, lm(bm>=30~1,subset=(src=="mgg"&sex=="Male"&age>30&age<40)))))[1,1:2]
+  prev[6,1:2] <- summary(pool(with(imp, lm(br>=30~1,subset=(src=="mgg"&sex=="Male"&age>=40&age<50)))))[1,1:2]
+  prev[6,3:4] <- summary(pool(with(imp, lm(bm>=30~1,subset=(src=="mgg"&sex=="Male"&age>40&age<50)))))[1,1:2]
+  prev[7,1:2] <- summary(pool(with(imp, lm(br>=30~1,subset=(src=="mgg"&sex=="Male"&age>=50&age<60)))))[1,1:2]
+  prev[7,3:4] <- summary(pool(with(imp, lm(bm>=30~1,subset=(src=="mgg"&sex=="Male"&age>50&age<60)))))[1,1:2]
+  prev[8,1:2] <- summary(pool(with(imp, lm(br>=30~1,subset=(src=="mgg"&sex=="Male"&age>=60&age<80)))))[1,1:2]
+  prev[8,3:4] <- summary(pool(with(imp, lm(bm>=30~1,subset=(src=="mgg"&sex=="Male"&age>60&age<80)))))[1,1:2]
+  prev[10,1:2] <- summary(pool(with(imp, lm(br>=30~1,subset=(src=="mgg"&sex=="Female"&age>=18&age<30)))))[1,1:2]
+  prev[10,3:4] <- summary(pool(with(imp, lm(bm>=30~1,subset=(src=="mgg"&sex=="Female"&age>18&age<30)))))[1,1:2]
+  prev[11,1:2] <- summary(pool(with(imp, lm(br>=30~1,subset=(src=="mgg"&sex=="Female"&age>=30&age<40)))))[1,1:2]
+  prev[11,3:4] <- summary(pool(with(imp, lm(bm>=30~1,subset=(src=="mgg"&sex=="Female"&age>30&age<40)))))[1,1:2]
+  prev[12,1:2] <- summary(pool(with(imp, lm(br>=30~1,subset=(src=="mgg"&sex=="Female"&age>=40&age<50)))))[1,1:2]
+  prev[12,3:4] <- summary(pool(with(imp, lm(bm>=30~1,subset=(src=="mgg"&sex=="Female"&age>40&age<50)))))[1,1:2]
+  prev[13,1:2] <- summary(pool(with(imp, lm(br>=30~1,subset=(src=="mgg"&sex=="Female"&age>=50&age<60)))))[1,1:2]
+  prev[13,3:4] <- summary(pool(with(imp, lm(bm>=30~1,subset=(src=="mgg"&sex=="Female"&age>50&age<60)))))[1,1:2]
+  prev[14,1:2] <- summary(pool(with(imp, lm(br>=30~1,subset=(src=="mgg"&sex=="Female"&age>=60&age<80)))))[1,1:2]
+  prev[14,3:4] <- summary(pool(with(imp, lm(bm>=30~1,subset=(src=="mgg"&sex=="Female"&age>60&age<80)))))[1,1:2]
+ 
+### find group sizes
+table(mgg$sex,mgg$web)
+table(mgg$sex,mgg$web,mgg$age>55)
+
+
+### Section 7.4 Enhancing comparability
+
+library("mice")
+
+### Section 7.4.3 Independence: Imputation without a bridge study
+
+fA <- c(242, 43, 15, 0, 6)
+fB <- c(145, 110, 29, 8)
+YA <- rep(ordered(c(0:3,NA)), fA)
+YB <- rep(ordered(c(0:3)), fB)
+Y <- rbind(data.frame(YA,YB=ordered(NA)),
+           data.frame(YB,YA=ordered(NA)))
+
+md.pattern(Y)
+
+### simulation function
+### Warning: micemill() overwrites objects 'imp' and 'tau'
+###          in the global enviroment
+
+micemill <- function(n) {
+  for (i in 1:n) {
+    imp <<- mice.mids(imp) # global assignment 
+    cors <- with(imp, cor(as.numeric(YA),
+                         as.numeric(YB),
+                         method="kendall"))
+    tau <<- rbind(tau, getfit(cors, s=TRUE))  # global assignment
+  }
+}
+
+tau <- NULL
+imp <- mice(Y, max=0, m=10, seed=32662)
+micemill(50)
+
+### Figure 7.7
+plotit <- function()
+  matplot(x=1:nrow(tau),y=tau,
+        ylab=expression(paste("Kendall's ",tau)), 
+          xlab="Iteration", type="l", lwd=1,
+        lty=1:10,col="black")
+plotit()
+
+### Section 7.4.4 Fully dependent or independent?
+### Use the 'walking' dataset of the mice package
+
+## split walking: ab is sources A and B (598 records)
+ab <- walking[walking$src=="A"|walking$src=="B",]
+
+## split walking: euridiss is external source (292 records)
+external <- walking[walking$src=="E",]
+
+### create contingency tables: YA by YB (in ab)
+ftable(addmargins(table(ab[,c("YA","YB")],useNA="ifany")))
+
+### Table 7.8 contingency table YA by YB (in euridiss)
+ftable(addmargins(table(external[,c("YA","YB")],useNA="ifany")))
+
+### Section 7.4.5 Imputation using a bridge study
+md.pattern(walking)
+
+### Figure 7.8
+tau <- NULL
+imp <- mice(walking, max=0, m=10, seed=92786)
+pred <- imp$pred
+pred[,c("src","age","sex")] <- 0
+imp <- mice(walking, max=0, m=10, seed=92786, pred=pred)
+micemill(20)
+plotit()
+
+
+### impute without and with covariates
+
+thetaAB <- NULL
+props <- with(imp, mean(YB[src=="A"]=='0'))
+thetaAB <<- rbind(thetaAB, getfit(props, s=TRUE)) 
+
+micemill <- function(n) {
+  for (i in 1:n) {
+    imp <<- mice.mids(imp) # global assignment 
+    cors <- with(imp, cor(as.numeric(YA[src=="A"]),
+                         as.numeric(YB[src=="A"]),
+                         method="kendall"))
+    tau <<- rbind(tau, getfit(cors, s=TRUE))  # global assignment
+    means <- with(imp, mean(as.numeric(YA[src=="A"]), na.rm=TRUE))
+    thetaBA <<- rbind(thetaBA, getfit(means, s=TRUE)-1)
+    props <- with(imp, mean(YB[src=="A"]=='0'))
+    thetaAB <<- rbind(thetaAB, getfit(props, s=TRUE))    
+    tabs <- with(imp, ftable(addmargins(
+                      table(YA[src=="A"],YB[src=="A"],
+                            useNA="ifany", dnn=c("YA","YB")))))
+    print(getfit(tabs)[[2]])
+  }
+}
+
+
+tau <- NULL
+thetaBA <- NULL
+thetaAB <- NULL
+imp <- mice(walking, max=0, m=10, seed=99786)
+oldpred <- pred <- imp$pred
+pred[,c("src","age","sex")] <- 0
+imp <- mice(walking, max=0, m=10, seed=99786, pred=pred)
+micemill(20)
+pred <- oldpred
+pred[,c("src")] <- 0
+imp <- mice(walking, max=0, m=10, pred=pred)
+micemill(20)
+
+### Figure 7.9
+
+matplot(x=1:nrow(thetaAB),y=thetaAB,xlab="Iteration",
+        ylab = expression(hat(theta)[AB]),
+        type="l", lwd=1, lty=1:10,col="black",
+        ylim=c(0.4,0.7))
+abline(h=0.497, v=20, lty=2)
+text(x=5,y=0.488,expression(hat(theta)[BB]),adj=0)
+text(x=5,y=0.430,"Without covariates", adj=0)
+text(x=25,y=0.430,"With covariates", adj=0)
+arrows(x0=4.5,y0=0.488,x1=0,y1=0.495,length=0.1, angle=20)
+points(x=-0.4,y=0.497,pch=20)
+
+## file <- file.path("~/Documents/Sync/Impute/mice/V2.12/mice/data/walking.rda")
+## save(walking, file=file)
+
+## selfreport <- nl
+## file <- file.path("~/Documents/Sync/Impute/mice/V2.12/mice/data/selfreport.rda")
+## save(selfreport, file=file)
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/doc/fimd8.r
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/doc/fimd8.r	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/doc/fimd8.r	(revision 2477)
@@ -0,0 +1,148 @@
+### fimd8.R
+### R code from Van Buuren, S. (2012). 
+###		Flexible Imputation of Missing Data. 
+###		CRC/Chapman & Hall, Boca Raton, FL.
+### (c) 2012 Stef van Buuren, www.multiple-imputation.com
+### Version 1, 22mar2012
+### Version 2, 4nov2015 tested with mice 2.23
+### Tested with Mac OS X 10.7.3, R2.14-2, mice 2.12
+
+if (packageVersion("mice")<'2.12') stop("This code requires mice 2.12.")
+
+library("mice")
+library("lattice")
+
+### Section 8.1 Correcting for selective drop-out
+
+data <- pops
+pred <- pops.pred
+if (!is.data.frame(data)) stop("The code for section 8.1 requires access to the POPS data.")
+
+
+### Section 8.1.4 A degenerate solution (TIME CONSUMING (30 MINUTES))
+
+imp1 <- mice(data, pred=pred, maxit=20, seed=51121)
+
+### Figure 8.2
+
+tp82 <- plot(imp1, c("a10u","a10b","adhd"),col=mdc(5),lty=1:5)
+print(tp82)
+
+
+### Section 8.1.5 A better solution
+
+##  TIME CONSUMING (30 MINUTES)
+pred2 <- pred
+pred2[61:86,61:86] <- 0
+imp2 <- mice(data, pred=pred2, maxit=20, seed=51121)
+
+### Figure 8.3
+
+tp83 <- bwplot(imp2, iq+e_tot+l19_sd+b19_sd+coping+seffz~.imp,
+        layout=c(2,3))
+print(tp83)
+
+
+### Section 8.1.6 Results
+
+### Full responders
+summary(lm(as.numeric(a10u)~1,data,na.action=na.omit))
+summary(lm(as.numeric(a10b)~1,data,na.action=na.omit))
+summary(lm(as.numeric(adhd)~1,data,na.action=na.omit))
+
+### All children
+summary(pool(with(imp2,lm(as.numeric(a10u)~1))))
+summary(pool(with(imp2,lm(as.numeric(a10b)~1))))
+summary(pool(with(imp2,lm(as.numeric(adhd)~1))))
+
+
+### Section 8.2 Correcting for nonresponse
+
+library("mice")
+data <- fdgs
+
+### Section 8.2.4 Augmenting the sample
+
+nimp <- c(400, 600, 75, 300, 200, 400)
+regcat <- c("North","City","North","East","North","City")
+reg <- rep(regcat, nimp)
+
+nimp2 <- floor(rep(nimp, each=2)/2)
+nimp2[5:6] <- c(38,37)
+sex <- rep(rep(c("boy","girl"),6), nimp2)
+
+minage <- rep(c(0, 0, 10, 10, 14, 14), nimp)
+maxage <- rep(c(10, 10, 14, 14, 21, 21), nimp)
+set.seed(42444)
+age <- runif(length(minage), minage, maxage)
+
+id <- 600001:601975
+
+pad <- data.frame(id, reg, age, sex, hgt=NA, wgt=NA, hgt.z=NA, wgt.z=NA)
+data2 <- rbind(data, pad)
+
+
+### Figure 8.4
+
+## inspect the age by region pattern
+means <- aggregate(data$hgt.z, by=list(reg=data$reg, 
+             age=floor(data$age)), mean, na.rm=TRUE)
+tp84 <- xyplot(x~age, means, group=reg, type=c("g","l"),
+             lty=1:5,col=mdc(4), 
+             xlim=c(-1,22), ylim=c(-0.6, 0.8), 
+             ylab="Height (SDS)", xlab="Age (years)",
+             key=list(
+               text=list(levels(means$reg)), 
+               lines=list(lty=1:5, col=mdc(4)), 
+               x=0.1, y=0.98, background="white",
+               columns=3, between.columns=0),
+             scales=list(x=list(tck=c(1,0)), 
+               y=list(tck=c(1,0))))
+print(tp84)
+
+
+### Section 8.2.5 Imputation model
+
+## add interaction terms
+na.opt <- options(na.action=na.pass)
+int <- model.matrix(~I(age-10)*hgt.z+I(age-10)*wgt.z+age*reg, data=data2)[,-(1:9)]
+options(na.opt)
+data3 <- cbind(data2, int)
+
+### define the imputation model
+
+ini <- mice(data3, maxit=0)
+
+meth <- ini$meth
+meth["hgt"] <- ""
+meth["wgt"] <- ""
+meth["hgt.z"] <- "norm"
+meth["wgt.z"] <- "norm"
+meth["I(age - 10):hgt.z"] <- "~I(I(age-10)*hgt.z)"
+meth["I(age - 10):wgt.z"] <- "~I(I(age-10)*wgt.z)"
+
+pred <- ini$pred
+pred[,c("hgt","wgt")] <- 0
+pred["hgt.z", c("id","I(age - 10):hgt.z")] <- 0
+pred["wgt.z", c("id","I(age - 10):wgt.z")] <- 0
+
+vis <- ini$vis[c(3,5,4,6)]
+
+### run the imputation model
+
+imp <- mice(data3, meth=meth, pred=pred, vis=vis, m=10, maxit=20, seed=28107)
+
+### Figure 8.5
+
+cda <- complete(imp, "long", include=TRUE)
+means2 <- aggregate(cda$hgt.z, by=list(reg=cda$reg, age=floor(cda$age), imp=cda$.imp), mean, na.rm=TRUE)
+tp85 <- xyplot(x~age|reg,means2, group=imp, subset=(reg=="North"|reg=="City"),
+              type=c("g","l"),lwd=c(4,rep(1,imp$m)),
+              lty=1:5,col=c(mdc(4),rep(mdc(6),imp$m)), 
+              ylab="Height (SDS)", xlab="Age (years)",
+              ylim=c(-0.5,0.8), xlim=c(-2,23),
+              scales=list(x=list(alternating=FALSE, tck=c(1,0)),
+                y=list(tck=c(1,0))),
+                strip = strip.custom(bg="grey95"))
+print(tp85)
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/help/mice.rdb
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/help/mice.rdb
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/help/AnIndex
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/help/AnIndex	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/help/AnIndex	(revision 2477)
@@ -0,0 +1,150 @@
+.norm.draw	norm.draw
+.pmm.match	pmm.match
+2l.norm	mice.impute.2l.norm
+2l.pan	mice.impute.2l.pan
+2lonly.mean	mice.impute.2lonly.mean
+2lonly.norm	mice.impute.2lonly.norm
+2lonly.pmm	mice.impute.2lonly.pmm
+ampute	ampute
+ampute.continuous	ampute.continuous
+ampute.default.freq	ampute.default.freq
+ampute.default.odds	ampute.default.odds
+ampute.default.patterns	ampute.default.patterns
+ampute.default.type	ampute.default.type
+ampute.default.weights	ampute.default.weights
+ampute.discrete	ampute.discrete
+ampute.mcar	ampute.mcar
+appendbreak	appendbreak
+as.mids	as.mids
+as.mira	as.mira
+boys	boys
+bwplot	bwplot.mids
+bwplot.mads	bwplot.mads
+bwplot.mids	bwplot.mids
+cart	mice.impute.cart
+cbind.mids	cbind.mids
+cc	cc
+cci	cci
+complete	complete
+densityplot	densityplot.mids
+densityplot.mids	densityplot.mids
+extractBS	extractBS
+fastpmm	mice.impute.fastpmm
+fdd	fdd
+fdd.pred	fdd
+fdgs	fdgs
+fico	fico
+flux	flux
+fluxplot	fluxplot
+getfit	getfit
+glm.mids	glm.mids
+hazard	nelsonaalen
+ibind	ibind
+ic	ic
+ici	ici
+ici,data.frame-method	ici
+ici,matrix-method	ici
+ici,mids-method	ici
+ifdo	ifdo
+is.mads	is.mads
+is.mids	is.mids
+is.mipo	is.mipo
+is.mira	is.mira
+leiden85	leiden85
+lm.mids	lm.mids
+long2mids	long2mids
+mads-class	mads-class
+mammalsleep	mammalsleep
+md.pairs	md.pairs
+md.pattern	md.pattern
+mdc	mdc
+mgg	selfreport
+mice	mice
+mice.impute.2l.norm	mice.impute.2l.norm
+mice.impute.2l.pan	mice.impute.2l.pan
+mice.impute.2lonly.mean	mice.impute.2lonly.mean
+mice.impute.2lonly.norm	mice.impute.2lonly.norm
+mice.impute.2lonly.pmm	mice.impute.2lonly.pmm
+mice.impute.cart	mice.impute.cart
+mice.impute.fastpmm	mice.impute.fastpmm
+mice.impute.lda	mice.impute.lda
+mice.impute.logreg	mice.impute.logreg
+mice.impute.logreg.boot	mice.impute.logreg.boot
+mice.impute.mean	mice.impute.mean
+mice.impute.midastouch	mice.impute.midastouch
+mice.impute.norm	mice.impute.norm
+mice.impute.norm.boot	mice.impute.norm.boot
+mice.impute.norm.nob	mice.impute.norm.nob
+mice.impute.norm.predict	mice.impute.norm.predict
+mice.impute.passive	mice.impute.passive
+mice.impute.pmm	mice.impute.pmm
+mice.impute.polr	mice.impute.polr
+mice.impute.polyreg	mice.impute.polyreg
+mice.impute.quadratic	mice.impute.quadratic
+mice.impute.rf	mice.impute.rf
+mice.impute.ri	mice.impute.ri
+mice.impute.sample	mice.impute.sample
+mice.mids	mice.mids
+mice.theme	mice.theme
+mids	mids-class
+mids-class	mids-class
+mids2mplus	mids2mplus
+mids2spss	mids2spss
+mipo	mipo-class
+mipo-class	mipo-class
+mira	mira-class
+mira-class	mira-class
+ncc	ncc
+nelsonaalen	nelsonaalen
+nhanes	nhanes
+nhanes2	nhanes2
+nic	nic
+norm	mice.impute.norm
+norm.boot	mice.impute.norm.boot
+norm.draw	norm.draw
+norm.nob	mice.impute.norm.nob
+norm.predict	mice.impute.norm.predict
+pattern	pattern
+pattern1	pattern
+pattern2	pattern
+pattern3	pattern
+pattern4	pattern
+plot.mids	plot.mids
+pmm	mice.impute.pmm
+pool	pool
+pool.compare	pool.compare
+pool.r.squared	pool.r.squared
+pool.scalar	pool.scalar
+popmis	popmis
+pops	pops
+pops.pred	pops
+potthoffroy	potthoffroy
+print.mads	print.mads
+print.mids	print
+print.mipo	print
+print.mira	print
+quadratic	mice.impute.quadratic
+quickpred	quickpred
+rbind.mids	rbind.mids
+ri	mice.impute.ri
+selfreport	selfreport
+sleep	mammalsleep
+squeeze	squeeze
+stripplot	stripplot.mids
+stripplot.mids	stripplot.mids
+summary.mads	summary
+summary.mids	summary
+summary.mipo	summary
+summary.mira	summary
+supports.transparent	supports.transparent
+tbc	tbc
+tbc.target	tbc
+terneuzen	tbc
+transparent	supports.transparent
+version	version
+walking	walking
+windspeed	windspeed
+with.mids	with.mids
+xyplot	xyplot.mids
+xyplot.mads	xyplot.mads
+xyplot.mids	xyplot.mids
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/help/paths.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/help/paths.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/help/aliases.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/help/aliases.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/help/mice.rdx
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/help/mice.rdx
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/data/Rdata.rdx
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/data/Rdata.rdx
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/data/Rdata.rdb
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/data/Rdata.rdb
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/data/Rdata.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mice/data/Rdata.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/R/cluster.rdx
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/R/cluster.rdx
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/R/cluster
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/R/cluster	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/R/cluster	(revision 2477)
@@ -0,0 +1,27 @@
+#  File share/R/nspackloader.R
+#  Part of the R package, http://www.R-project.org
+#
+#  Copyright (C) 1995-2012 The R Core Team
+#
+#  This program is free software; you can redistribute it and/or modify
+#  it under the terms of the GNU General Public License as published by
+#  the Free Software Foundation; either version 2 of the License, or
+#  (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  A copy of the GNU General Public License is available at
+#  http://www.r-project.org/Licenses/
+
+local({
+    info <- loadingNamespaceInfo()
+    pkg <- info$pkgname
+    ns <- .getNamespace(as.name(pkg))
+    if (is.null(ns))
+        stop("cannot find namespace environment for ", pkg, domain = NA);
+    dbbase <- file.path(info$libname, pkg, "R", pkg)
+    lazyLoad(dbbase, ns, filter = function(n) n != ".__NAMESPACE__.")
+})
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/R/cluster.rdb
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/R/cluster.rdb
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/clara.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/clara.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/clara.R	(revision 2477)
@@ -0,0 +1,107 @@
+library(cluster)
+
+## generate 1500 objects, divided into 2 clusters.
+set.seed(144)
+x <- rbind(cbind(rnorm(700, 0,8), rnorm(700, 0,8)),
+           cbind(rnorm(800,50,8), rnorm(800,10,8)))
+
+isEq <- function(x,y, epsF = 100)
+    is.logical(r <- all.equal(x,y, tol = epsF * .Machine$double.eps)) && r
+
+.proctime00 <- proc.time()
+
+## full size sample {should be = pam()}:
+n0 <- length(iSml <- c(1:70, 701:720))
+summary(clara0 <- clara(x[iSml,], k = 2, sampsize = n0))
+          pam0 <- pam  (x[iSml,], k = 2)
+stopifnot(identical(clara0$clustering, pam0$clustering)
+        , isEq(clara0$objective, unname(pam0$objective[2]))
+          )
+
+summary(clara2 <- clara(x, 2))
+
+clInd <- c("objective", "i.med", "medoids", "clusinfo")
+clInS <- c(clInd, "sample")
+## clara() {as original code} always draws the *same* random samples !!!!
+clara(x, 2, samples = 50)[clInd]
+for(i in 1:20)
+    print(clara(x[sample(nrow(x)),], 2, samples = 50)[clInd])
+
+clara(x, 2, samples = 101)[clInd]
+clara(x, 2, samples = 149)[clInd]
+clara(x, 2, samples = 200)[clInd]
+## Note that this last one is practically identical to the slower  pam() one
+
+(ii <- sample(length(x), 20))
+## This was bogous (and lead to seg.faults); now properly gives error.
+## but for these, now see  ./clara-NAs.R
+if(FALSE) { ##		   ~~~~~~~~~~~~~
+    x[ii] <- NA
+    try( clara(x, 2, samples = 50) )
+}
+
+###-- Larger example: 2000 objects, divided into 5 clusters.
+x5 <- rbind(cbind(rnorm(400, 0,4), rnorm(400, 0,4)),
+            cbind(rnorm(400,10,8), rnorm(400,40,6)),
+            cbind(rnorm(400,30,4), rnorm(400, 0,4)),
+            cbind(rnorm(400,40,4), rnorm(400,20,2)),
+            cbind(rnorm(400,50,4), rnorm(400,50,4)))
+## plus 1 random dimension
+x5 <- cbind(x5, rnorm(nrow(x5)))
+
+clara(x5, 5)
+summary(clara(x5, 5, samples = 50))
+## 3 "half" samples:
+clara(x5, 5, samples = 999)
+clara(x5, 5, samples = 1000)
+clara(x5, 5, samples = 1001)
+
+clara(x5, 5, samples = 2000)#full sample
+
+###--- Start a version of  example(clara) -------
+
+## xclara : artificial data with 3 clusters of 1000 bivariate objects each.
+data(xclara)
+(clx3 <- clara(xclara, 3))
+## Plot similar to Figure 5 in Struyf et al (1996)
+plot(clx3)
+
+## The  rngR = TRUE case is currently in the non-strict tests
+## ./clara-ex.R
+## ~~~~~~~~~~~~
+
+###--- End version of example(clara) -------
+
+##  small example(s):
+data(ruspini)
+
+clara(ruspini,4)
+
+rus <- data.matrix(ruspini); storage.mode(rus) <- "double"
+ru2 <- rus[c(1:7,21:28, 45:51, 61:69),]
+ru3 <- rus[c(1:4,21:25, 45:48, 61:63),]
+ru4 <- rus[c(1:2,21:22, 45:47),]
+ru5 <- rus[c(1:2,21,    45),]
+daisy(ru5, "manhattan")
+## Dissimilarities :  11 118 143 107 132  89
+
+## no problem anymore, since 2002-12-28:
+## sampsize >= k+1 is now enforced:
+## clara(ru5, k=3, met="manhattan", sampsize=3,trace=2)[clInS]
+clara(ru5, k=3, met="manhattan", sampsize=4,trace=1)[clInS]
+
+daisy(ru4, "manhattan")
+## this one (k=3) gave problems, from ss = 6 on ___ still after 2002-12-28 ___ :
+for(ss in 4:nrow(ru4)){
+    cat("---\n\nsample size = ",ss,"\n")
+    print(clara(ru4,k=3,met="manhattan",sampsize=ss)[clInS])
+}
+for(ss in 5:nrow(ru3)){
+    cat("---\n\nsample size = ",ss,"\n")
+    print(clara(ru3,k=4,met="manhattan",sampsize=ss)[clInS])
+}
+
+## Last Line:
+cat('Time elapsed: ', proc.time() - .proctime00,'\n')
+## Lynne (P IV, 1.6 GHz): 18.81; then (no NA; R 1.9.0-alpha): 15.07
+## nb-mm (P III,700 MHz): 27.97
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/daisy-ex.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/daisy-ex.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/daisy-ex.R	(revision 2477)
@@ -0,0 +1,110 @@
+## For different cluster versions
+
+require(cluster)
+
+if(interactive()) {
+    (pkgPath <- .find.package("cluster", verbose = TRUE))
+    (verC <- readLines(Dfile <- file.path(pkgPath, "DESCRIPTION"), n = 2)[2])
+}
+
+## trivial cases should 'work':
+daisy(cbind(1))
+(d10 <- daisy(matrix(0., 1,0))); str(d10)
+d01 <- daisy(matrix(0., 0,1))
+if(paste(R.version$major, R.version$minor, sep=".") >= "2.1.0")
+    print(d01)
+str(d01)
+d32 <- data.frame(eins=c("A"=1,"B"=1,"C"=1), zwei=c(2,2,2))
+daisy(d32)
+daisy(d32, stand = TRUE)
+daisy(d32, type = list(ordratio="zwei"))
+
+
+str(d5 <- data.frame(a= c(0, 0, 0,1,0,0, 0,0,1, 0,NA),
+                     b= c(NA,0, 1,1,0,1, 0,1,0, 1,0),
+                     c= c(0, 1, 1,0,1,NA,1,0,1, 0,NA),
+                     d= c(1, 1, 0,1,0,0, 0,0,0, 1,0),
+                     e= c(1, NA,0,1,0,0, 0,0,NA,1,1)))
+(d0 <- daisy(d5))
+(d1 <- daisy(d5, type = list(asymm = 1:5)))
+(d2 <- daisy(d5, type = list(symm = 1:2, asymm= 3:5)))
+(d2.<- daisy(d5, type = list(     asymm= 3:5)))
+stopifnot(identical(c(d2), c(d2.)))
+(dS <- daisy(d5, stand = TRUE))# gave error in some versions
+stopifnot(all.equal(as.vector(summary(c(dS), digits=9)),
+                    c(0, 2.6142638, 3.4938562, 3.2933687, 4.0591077, 5.5580177),
+                    tol = 1e-7))# 7.88e-9
+
+d5[,4] <- 1 # binary with only one instead of two values
+(d0 <- daisy(d5))
+(d1 <- daisy(d5, type = list(asymm = 1:5)))# 2 NAs
+(d2 <- daisy(d5, type = list(symm = 1:2, asymm= 3:5)))
+(d2.<- daisy(d5, type = list(     asymm= 3:5)))
+## better leave away the constant variable: it has no effect:
+stopifnot(identical(c(d1), c(daisy(d5[,-4], type = list(asymm = 1:4)))))
+
+###---- Trivial "binary only" matrices (not data frames) did fail:
+
+x <- matrix(0, 2, 2)
+dimnames(x)[[2]] <- c("A", "B")## colnames<- is missing in S+
+daisy(x, type = list(symm= "B", asymm="A"))
+daisy(x, type = list(symm= "B"))# 0 too
+
+x2 <- x; x2[2,2] <- 1
+daisy(x2, type= list(symm = "B"))# |-> 0.5  (gives 1 in S+)
+daisy(x2, type= list(symm = "B", asymm="A"))# 1
+
+x3 <- x; x3[] <- diag(2)
+daisy(x3) # warning: both as interval scaled -> sqrt(2)
+daisy(x3, type= list(symm="B", asymm="A"))#  1
+daisy(x3, type= list(symm =c("B","A")))   #  1, S+: sqrt(2)
+daisy(x3, type= list(asymm=c("B","A")))   #  1, S+ : sqrt(2)
+
+x4 <- rbind(x3, 1)
+daisy(x4, type= list(symm="B", asymm="A"))# 1   0.5 0.5
+daisy(x4, type= list(symm=c("B","A")))    # dito;  S+ : 1.41  1   1
+daisy(x4, type= list(asymm=c("A","B")))   # dito,     dito
+
+
+
+## ----------- example(daisy) -----------------------
+
+data(flower)
+data(agriculture)
+
+## Example 1 in ref:
+##  Dissimilarities using Euclidean metric and without standardization
+(d.agr  <- daisy(agriculture, metric = "euclidean", stand = FALSE))
+(d.agr2 <- daisy(agriculture, metric = "manhattan"))
+
+
+## Example 2 in ref
+(dfl0 <- daisy(flower))
+stopifnot(identical(c(dfl0),
+                    c(daisy(flower, type = list(symm = 1)))) &&
+          identical(c(dfl0),
+                    c(daisy(flower, type = list(symm = 2)))) &&
+          identical(c(dfl0),
+                    c(daisy(flower, type = list(symm = 3)))) &&
+          identical(c(dfl0),
+                    c(daisy(flower, type = list(symm = c(1,3)))))
+         )
+
+(dfl1 <- daisy(flower, type = list(asymm = 3)))
+(dfl2 <- daisy(flower, type = list(asymm = c(1, 3), ordratio = 7)))
+(dfl3 <- daisy(flower, type = list(asymm = 1:3)))
+
+## --- animals
+data(animals)
+d0 <- daisy(animals)
+
+d1 <- daisy(animals - 1, type=list(asymm=c(2,4)))
+(d2 <- daisy(animals - 1, type=list(symm = c(1,3,5,6), asymm=c(2,4))))
+stopifnot(c(d1) == c(d2))
+
+d3 <- daisy(2 - animals, type=list(asymm=c(2,4)))
+(d4 <- daisy(2 - animals, type=list(symm = c(1,3,5,6), asymm=c(2,4))))
+stopifnot(c(d3) == c(d4))
+
+pairs(cbind(d0,d2,d4),
+      main = "Animals -- symmetric and asymm. dissimilarities")
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/ellipsoid-ex.Rout.save
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/ellipsoid-ex.Rout.save	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/ellipsoid-ex.Rout.save	(revision 2477)
@@ -0,0 +1,209 @@
+
+R version 3.1.0 alpha (2014-03-26 r65294)
+Copyright (C) 2014 The R Foundation for Statistical Computing
+Platform: x86_64-unknown-linux-gnu (64-bit)
+
+R is free software and comes with ABSOLUTELY NO WARRANTY.
+You are welcome to redistribute it under certain conditions.
+Type 'license()' or 'licence()' for distribution details.
+
+R is a collaborative project with many contributors.
+Type 'contributors()' for more information and
+'citation()' on how to cite R or R packages in publications.
+
+Type 'demo()' for some demos, 'help()' for on-line help, or
+'help.start()' for an HTML browser interface to help.
+Type 'q()' to quit R.
+
+> library(cluster)
+> 
+> eh <- ellipsoidhull(cbind(x=1:4, y = 1:4)) #singular
+Error in Fortran routine computing the spanning ellipsoid,
+ probably collinear data
+Warning message:
+In ellipsoidhull(cbind(x = 1:4, y = 1:4)) :
+  algorithm possibly not converged in 5000 iterations
+> eh ## center ok, shape "0 volume" --> Warning
+'ellipsoid' in 2 dimensions:
+ center = ( 2.5 2.5 ); squared ave.radius d^2 =  0 
+ and shape matrix =
+     x    y
+x 1.25 1.25
+y 1.25 1.25
+  hence, area  =  0 
+
+** Warning: ** the algorithm did not terminate reliably!
+   most probably because of collinear data 
+> 
+> set.seed(157)
+> for(n in 4:10) { ## n=2 and 3 still differ -- platform dependently!
++     cat("n = ",n,"\n")
++     x2 <- rnorm(n)
++     print(ellipsoidhull(cbind(1:n, x2)))
++     print(ellipsoidhull(cbind(1:n, x2, 4*x2 + rnorm(n))))
++ }
+n =  4 
+'ellipsoid' in 2 dimensions:
+ center = ( 2.66215 0.82086 ); squared ave.radius d^2 =  2 
+ and shape matrix =
+                x2
+   1.55901 0.91804
+x2 0.91804 0.67732
+  hence, area  =  2.9008 
+'ellipsoid' in 3 dimensions:
+ center = ( 2.50000 0.74629 2.95583 ); squared ave.radius d^2 =  3 
+ and shape matrix =
+                x2       
+   1.25000 0.72591 1.8427
+x2 0.72591 0.52562 1.5159
+   1.84268 1.51588 4.7918
+  hence, volume  =  1.3843 
+n =  5 
+'ellipsoid' in 2 dimensions:
+ center = ( 3.0726 1.2307 ); squared ave.radius d^2 =  2 
+ and shape matrix =
+                x2
+   2.21414 0.45527
+x2 0.45527 2.39853
+  hence, area  =  14.194 
+'ellipsoid' in 3 dimensions:
+ center = ( 2.7989 1.1654 4.6782 ); squared ave.radius d^2 =  3 
+ and shape matrix =
+                x2        
+   1.92664 0.40109  1.4317
+x2 0.40109 1.76625  6.9793
+   1.43170 6.97928 28.0530
+  hence, volume  =  11.532 
+n =  6 
+'ellipsoid' in 2 dimensions:
+ center = ( 3.04367 0.97016 ); squared ave.radius d^2 =  2 
+ and shape matrix =
+                x2
+   4.39182 0.30833
+x2 0.30833 0.59967
+  hence, area  =  10.011 
+'ellipsoid' in 3 dimensions:
+ center = ( 3.3190 0.7678 3.2037 ); squared ave.radius d^2 =  3 
+ and shape matrix =
+                    x2        
+    2.786928 -0.044373 -1.1467
+x2 -0.044373  0.559495  1.5496
+   -1.146728  1.549620  5.5025
+  hence, volume  =  10.741 
+n =  7 
+'ellipsoid' in 2 dimensions:
+ center = (  3.98294 -0.16567 ); squared ave.radius d^2 =  2 
+ and shape matrix =
+                  x2
+    4.62064 -0.83135
+x2 -0.83135  0.37030
+  hence, area  =  6.3453 
+'ellipsoid' in 3 dimensions:
+ center = (  4.24890 -0.25918 -0.76499 ); squared ave.radius d^2 =  3 
+ and shape matrix =
+                 x2        
+    4.6494 -0.93240 -4.0758
+x2 -0.9324  0.39866  1.9725
+   -4.0758  1.97253 10.4366
+  hence, volume  =  6.9939 
+n =  8 
+'ellipsoid' in 2 dimensions:
+ center = (  3.6699 -0.4532 ); squared ave.radius d^2 =  2 
+ and shape matrix =
+                x2
+    9.4327 -2.5269
+x2 -2.5269  3.7270
+  hence, area  =  33.702 
+'ellipsoid' in 3 dimensions:
+ center = (  4.22030 -0.37953 -1.53922 ); squared ave.radius d^2 =  3 
+ and shape matrix =
+                x2        
+    7.5211 -1.4804 -6.6587
+x2 -1.4804  2.6972 11.8198
+   -6.6587 11.8198 52.6243
+  hence, volume  =  36.383 
+n =  9 
+'ellipsoid' in 2 dimensions:
+ center = (  5.324396 -0.037779 ); squared ave.radius d^2 =  2 
+ and shape matrix =
+                x2
+   10.1098 -1.3708
+x2 -1.3708  2.1341
+  hence, area  =  27.885 
+'ellipsoid' in 3 dimensions:
+ center = (  5.44700 -0.12504 -1.13538 ); squared ave.radius d^2 =  3 
+ and shape matrix =
+                x2        
+    7.0364 -1.2424 -5.5741
+x2 -1.2424  1.7652  7.3654
+   -5.5741  7.3654 31.5558
+  hence, volume  =  27.782 
+n =  10 
+'ellipsoid' in 2 dimensions:
+ center = ( 4.85439 0.28401 ); squared ave.radius d^2 =  2 
+ and shape matrix =
+               x2
+   13.932 0.64900
+x2  0.649 0.95132
+  hence, area  =  22.508 
+'ellipsoid' in 3 dimensions:
+ center = ( 5.12537 0.25024 0.86441 ); squared ave.radius d^2 =  3 
+ and shape matrix =
+                x2       
+   9.29343 0.56973 1.4143
+x2 0.56973 0.76519 1.8941
+   1.41427 1.89409 6.3803
+  hence, volume  =  31.936 
+> 
+> set.seed(1)
+> x <- rt(100, df = 4)
+> y <- 100 + 5 * x + rnorm(100)
+> ellipsoidhull(cbind(x,y))
+'ellipsoid' in 2 dimensions:
+ center = ( -1.3874 93.0589 ); squared ave.radius d^2 =  2 
+ and shape matrix =
+        x      y
+x  32.924 160.54
+y 160.543 785.88
+  hence, area  =  62.993 
+> z <- 10  - 8 * x + y + rnorm(100)
+> (e3 <- ellipsoidhull(cbind(x,y,z)))
+'ellipsoid' in 3 dimensions:
+ center = (  -0.71678  96.09950 111.61029 ); squared ave.radius d^2 =  3 
+ and shape matrix =
+        x       y        z
+x  26.005  126.41  -80.284
+y 126.410  616.94 -387.459
+z -80.284 -387.46  254.006
+  hence, volume  =  130.45 
+> d3o <- cbind(x,y + rt(100,3), 2 * x^2 + rt(100, 2))
+> (e. <- ellipsoidhull(d3o, ret.sq = TRUE))
+'ellipsoid' in 3 dimensions:
+ center = (   0.32491 101.68998  39.48045 ); squared ave.radius d^2 =  3 
+ and shape matrix =
+       x                 
+x 19.655  94.364   48.739
+  94.364 490.860  181.022
+  48.739 181.022 1551.980
+  hence, volume  =  9463.8 
+> stopifnot(all.equal(e.$sqdist,
++ 		    with(e., mahalanobis(d3o, center=loc, cov=cov)),
++ 		    tol = 1e-13))
+> d5 <- cbind(d3o, 2*abs(y)^1.5 + rt(100,3), 3*x - sqrt(abs(y)))
+> (e5 <- ellipsoidhull(d5, ret.sq = TRUE))
+'ellipsoid' in 5 dimensions:
+ center = (   -0.32451   98.54780   37.33619 1973.88383  -10.81891 ); squared ave.radius d^2 =  5 
+ and shape matrix =
+          x                                       
+x   17.8372    87.0277    8.3389   2607.9   49.117
+    87.0277   446.9453   -2.0502  12745.4  239.470
+     8.3389    -2.0502 1192.8439   2447.8   24.458
+  2607.9264 12745.3826 2447.8006 384472.1 7179.239
+    49.1172   239.4703   24.4582   7179.2  135.260
+  hence, volume  =  10218 
+> tail(sort(e5$sqdist)) ## 4 values 5.00039 ... 5.0099
+[1] 4.999915 5.000005 5.000010 5.000088 5.001444 5.009849
+> 
+> proc.time()
+   user  system elapsed 
+  0.218   0.023   0.223 
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/fanny-ex.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/fanny-ex.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/fanny-ex.R	(revision 2477)
@@ -0,0 +1,72 @@
+.libPaths() # show full library tree {also as check of R CMD check!}
+library(cluster)
+
+####---------- Tests for FANNY  i.e., fanny() --------------------------
+####
+### -- thanks to ../.Rbuildignore , the output of this is
+### -- only compared to saved values for the maintainer
+
+###--- An extension of  example(fanny) : -------------------
+set.seed(21)
+## generate 10+15 objects in two clusters, plus 3 objects lying
+## between those clusters.
+x <- rbind(cbind(rnorm(10, 0, 0.5), rnorm(10, 0, 0.5)),
+           cbind(rnorm(15, 5, 0.5), rnorm(15, 5, 0.5)),
+           cbind(rnorm( 3,3.2,0.5), rnorm( 3,3.2,0.5)))
+
+.proctime00 <- proc.time()
+
+(fannyx <- fanny(x, 2))
+summary(fannyx)
+str(fannyx)
+## Different platforms differ (even gcc 3.0.1 vs 3.2 on same platform)!
+## {70 or 71 iterations}
+## ==> No "fanny-ex.Rout.save" is distributed !
+## --------------------------------------------
+summary(fanny(x,3))# one extra cluster
+
+(fanny(x,2, memb.exp = 1.5))
+(fanny(x,2, memb.exp = 1.2))
+(fanny(x,2, memb.exp = 1.1))
+(fanny(x,2, memb.exp = 3))
+
+data(ruspini) # < to run under R 1.9.1
+summary(fanny(ruspini, 3), digits = 9)
+summary(fanny(ruspini, 4), digits = 9)# 'correct' #{clusters}
+summary(fanny(ruspini, 5), digits = 9)
+
+cat('Time elapsed: ', proc.time() - .proctime00,'\n')
+data(chorSub)
+p4cl <- pam(chorSub, k = 4, cluster.only = TRUE)
+## The first two are "completely fuzzy" -- and now give a warnings
+f4.20 <- fanny(chorSub, k = 4, trace.lev = 1) ; f4.20$coef
+f4.18  <- fanny(chorSub, k = 4,   memb.exp = 1.8) # same problem
+f4.18. <- fanny(chorSub, k = 4,   memb.exp = 1.8,
+                iniMem.p = f4.20$membership) # very quick convergence
+stopifnot(all.equal(f4.18[-c(7,9)], f4.18.[-c(7,9)], tol = 5e-7))
+
+f4.16  <- fanny(chorSub, k = 4, memb.exp = 1.6) # now gives 4 crisp clusters
+f4.16. <- fanny(chorSub, k = 4, memb.exp = 1.6,
+                iniMem.p = f4.18$membership, trace.lev = 2)# "converges" immediately - WRONGLY!
+f4.16.2 <- fanny(chorSub, k = 4, memb.exp = 1.6,
+                 iniMem.p = cluster:::as.membership(p4cl),
+                 tol = 1e-10, trace.lev = 2)## looks much better:
+stopifnot(f4.16$clustering == f4.16.2$clustering,
+          all.equal(f4.16[-c(1,7,9)], f4.16.2[-c(1,7,9)], tol = 1e-7),
+          all.equal(f4.16$membership, f4.16.2$membership, tol = 0.001))
+## the memberships are quite close but have only converged to precision 0.000228
+
+f4.14 <- fanny(chorSub, k = 4,                memb.exp = 1.4)
+f4.12 <- fanny(chorSub, k = 4,                memb.exp = 1.2)
+
+table(f4.12$clustering, f4.14$clustering)# close but different
+table(f4.16$clustering, f4.14$clustering)# dito
+table(f4.12$clustering, f4.16$clustering)# hence differ even more
+
+symnum(cbind(f4.16$membership, 1, f4.12$membership),
+       cutpoints= c(0., 0.2, 0.6, 0.8, 0.9, 0.95, 1 -1e-7, 1 +1e-7),
+       symbols   = c(" ", ".", ",", "+",  "*", "B","1"))
+
+
+## Last Line:
+cat('Time elapsed: ', proc.time() - .proctime00,'\n')
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/clara-NAs.Rout.save
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/clara-NAs.Rout.save	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/clara-NAs.Rout.save	(revision 2477)
@@ -0,0 +1,655 @@
+
+R version 3.3.0 beta (2016-04-13 r70476) -- "Supposedly Educational"
+Copyright (C) 2016 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
+
+R is free software and comes with ABSOLUTELY NO WARRANTY.
+You are welcome to redistribute it under certain conditions.
+Type 'license()' or 'licence()' for distribution details.
+
+R is a collaborative project with many contributors.
+Type 'contributors()' for more information and
+'citation()' on how to cite R or R packages in publications.
+
+Type 'demo()' for some demos, 'help()' for on-line help, or
+'help.start()' for an HTML browser interface to help.
+Type 'q()' to quit R.
+
+> library(cluster)
+> 
+> x <- cbind(c(0, -4, -22, -14, 0, NA, -28, 1, 10, -1,
++              100 + c(13, 0, 2, 4, 7, 8, 1)),
++            c(-5, -14, NA, -35, -30, NA, 7, 2, -18, 13,
++              47, 64, 48, NA, NA, 44, 65))
+> x
+      [,1] [,2]
+ [1,]    0   -5
+ [2,]   -4  -14
+ [3,]  -22   NA
+ [4,]  -14  -35
+ [5,]    0  -30
+ [6,]   NA   NA
+ [7,]  -28    7
+ [8,]    1    2
+ [9,]   10  -18
+[10,]   -1   13
+[11,]  113   47
+[12,]  100   64
+[13,]  102   48
+[14,]  104   NA
+[15,]  107   NA
+[16,]  108   44
+[17,]  101   65
+> (d <- dist(x,'manhattan'))
+     1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16
+2   13                                                            
+3   44  36                                                        
+4   44  31  16                                                    
+5   25  20  44  19                                                
+6   NA  NA  NA  NA  NA                                            
+7   40  45  12  56  65  NA                                        
+8    8  21  46  52  33  NA  34                                    
+9   23  18  64  41  22  NA  63  29                                
+10  19  30  42  61  44  NA  33  13  42                            
+11 165 178 270 209 190  NA 181 157 168 148                        
+12 169 182 244 213 194  NA 185 161 172 152  30                    
+13 155 168 248 199 180  NA 171 147 158 138  12  18                
+14 208 216 252 236 208  NA 264 206 188 210  18   8   4            
+15 214 222 258 242 214  NA 270 212 194 216  12  14  10   6        
+16 157 170 260 201 182  NA 173 149 160 140   8  28  10   8   2    
+17 171 184 246 215 196  NA 187 163 174 154  30   2  18   6  12  28
+> summary(d, na.rm = TRUE) # max = 270
+   Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
+   2.00   27.25  147.50  114.60  188.50  270.00      16 
+> ## First call with "trace" (seg.fault typically later ...):
+> try( clara(x, k=2, metric="manhattan", sampsize=10, trace = 3) )
+C clara(): (nsam,nran,n) = (10,5,17); 'large_sample',
+C clara(): sample 1  finding 1st... new k{ran}:
+.. kall: FALSE, 
+... nrx [0:1]= 0 0 
+... nsel[0:0]= 1 
+ {295} [ntt=7, nunfs=0] .. nsel[1:10]= 6 7 8 9 10 12 13 14 16 17  -> dysta2()
+  dysta2() gave dyst_toomany_NA --> new sample
+C clara(): sample 2  finding 1st... new k{ran}:
+.. kall: FALSE, 
+... nrx [0:1]= 0 0 
+... nsel[0:0]= 3 
+ {295} [ntt=7, nunfs=1] .. nsel[1:10]= 1 4 7 9 11 12 13 15 16 17  -> dysta2()
+. clara(): s:= max dys[1..45] = 270;
+clara()'s bswap2(*, s=270):     new repr. 7
+    new repr. 1
+  after build: medoids are  1  7
+  and min.dist dysma[1:n] are
+      0     44     40     23     12     18      0     10     10     18
+ --> sky = sum_j D_j= 175
+   swp new 8 <-> 7 old; decreasing diss. by -18
+  Last swap: new 8 <-> 7 old; decreasing diss. by 1
+end{bswap2}: sky = 157
+ selec() -> 'NAfs' obj= 5.47059
+C clara(): sample 3  finding 1st... new k{ran}:
+.. kall: FALSE, 
+... nrx [0:1]= 0 0 
+... nsel[0:0]= 6 
+ {295} [ntt=7, nunfs=2] .. nsel[1:10]= 1 2 3 5 8 9 10 11 13 17  -> dysta2()
+. clara(): s:= max dys[1..45] = 270;
+clara()'s bswap2(*, s=270):     new repr. 5
+    new repr. 9
+  after build: medoids are  5  9
+  and min.dist dysma[1:n] are
+      8     21     46     33      0     29     13     12      0     18
+ --> sky = sum_j D_j= 180
+   swp new 1 <-> 5 old; decreasing diss. by -18
+  Last swap: new 1 <-> 5 old; decreasing diss. by 1
+end{bswap2}: sky = 162
+ selec() -> 'NAfs' obj= 5.47059
+C clara(): sample 4  finding 1st... new k{ran}:
+.. kall: FALSE, 
+... nrx [0:1]= 0 0 
+... nsel[0:0]= 5 
+ {295} [ntt=7, nunfs=3] .. nsel[1:10]= 1 2 3 4 7 8 9 10 13 14  -> dysta2()
+. clara(): s:= max dys[1..45] = 264;
+clara()'s bswap2(*, s=264):     new repr. 1
+    new repr. 10
+  after build: medoids are  1 10
+  and min.dist dysma[1:n] are
+      0     13     44     44     40      8     23     19      4      0
+ --> sky = sum_j D_j= 195
+  Last swap: new 9 <-> 10 old; decreasing diss. by 0
+end{bswap2}: sky = 195
+ selec() -> 'NAfs' obj= 5.47059
+C clara(): sample 5  finding 1st... new k{ran}:
+.. kall: FALSE, 
+... nrx [0:1]= 0 0 
+... nsel[0:0]= 16 
+ {295} [ntt=7, nunfs=4] .. nsel[1:10]= 2 3 4 6 7 8 9 10 11 17  -> dysta2()
+  dysta2() gave dyst_toomany_NA --> new sample
+Error in clara(x, k = 2, metric = "manhattan", sampsize = 10, trace = 3) : 
+  Observation 6 has *only* NAs --> omit it for clustering
+In addition: Warning message:
+In clara(x, k = 2, metric = "manhattan", sampsize = 10, trace = 3) :
+  Distance computations with NAs: using correct instead of pre-2016 wrong formula.
+Use  'correct.d=FALSE'  to get previous results or set 'correct.d=TRUE' explicitly
+to suppress this warning.
+> ## Originally:already shows the problem:  nbest[] = c(0,0,...,0) must be WRONG!!
+> ## Now: gives the proper error message.
+> 
+> ## S-plus 6.1.2 (rel.2 for Linux, 2002) gives
+> ##> cc <- clara(x, k=2, metric="manhattan", samples=2, sampsize=10)
+> ## Problem in .Fortran("clara",: Internal error: data for decrementing
+> ## ref.count didn't point to a valid arena (0x0), while calling subroutine clara
+> 
+> ## The large example from  clara.R -- made small enough to still provoke
+> ## the    "** dysta2() ...  OUT"  problem  {no longer!}
+> x <- matrix(c(0, 3, -4, 62, 1, 3, -7, 45, 36, 46, 45, 54, -10,
++               51, 49, -5, 13, -6, 49, 52, 57, 39, -1, 55, 68, -3, 51, 11, NA,
++               9, -3, 50, NA, 58, 9, 52, 12, NA, 47, -12, -6, -9, 5, 30, 38,
++               54, -5, 39, 50, 50, 54, 43, 7, 64, 55, 4, 0, 72, 54, 37, 59,
++               -1, 8, 43, 50, -2, 56, -8, 43, 6, 4, 48, -2, 14, 45, 49, 56,
++               51, 45, 11, 10, 42, 50, 2, -12, 3, 1, 2, 2, -14, -4, 8, 0, 3,
++               -11, 8, 5, 14, -1, 9, 0, 19, 10, -2, -9, 9, 2, 16, 10, 4, 1,
++               12, 7, -4, 27, -8, -9, -9, 2, 8, NA, 13, -23, -3, -5, 1, 15,
++               -3, 5, -9, -5, 14, 8, 7, -4, 26, 20, 10, 8, 17, 4, 14, 23, -2,
++               23, 2, 16, 5, 5, -3, 12, 5, 14, -2, 4, 2, -2, 7, 9, 1, -15, -1,
++               9, 23, 1, 7, 13, 2, -11, 16, 12, -11, -14, 2, 6, -8),
++             ncol = 2)
+> str(x) # 88 x 2
+ num [1:88, 1:2] 0 3 -4 62 1 3 -7 45 36 46 ...
+> try(clara(x, 2, samples = 20, trace = 3))# 2nd sample did show dysta2() problem
+C clara(): (nsam,nran,n) = (44,20,88);
+C clara(): sample 1  finding 1st... new k{ran}:
+.. kall: FALSE, 
+... nrx [0:1]= 0 0 
+... nsel[0:0]= 2 
+ {295} [ntt=44, nunfs=0] .. nsel[1:44]= 2 3 4 6 9 10 12 14 15 18 19 20 24 25 26 28 31 35 38 42 47 48 51 53 54 57 60 61 64 66 68 70 71 73 74 75 76 77 78 79 80 81 82 88  -> dysta2()
+. clara(): s:= max dys[1..946] = 78.6448;
+clara()'s bswap2(*, s=78.6448):     new repr. 19
+    new repr. 9
+  after build: medoids are  9 19
+  and min.dist dysma[1:n] are
+   21.2   7.07    9.9   2.83   5.66      5    5.1   9.22      0   11.3
+   1.41   6.71   6.32   8.49   7.07   12.7   1.41   33.9      0   14.1
+   7.07   18.9   5.39   4.24   15.5   31.1   5.66   5.66   5.66   4.24
+   1.41   8.49   11.3   22.6   2.83   4.12     13      0   3.61      5
+   1.41     17   9.22   12.7
+ --> sky = sum_j D_j= 385.677
+  Last swap: new 6 <-> 9 old; decreasing diss. by 0.939294
+end{bswap2}: sky = 385.677
+ selec() -> 'NAfs' obj= 1.64279
+C clara(): sample 2  finding 1st... new k{ran}:
+.. kall: FALSE, 
+... nrx [0:1]= 0 0 
+... nsel[0:0]= 12 
+ {295} [ntt=44, nunfs=1] .. nsel[1:44]= 1 2 3 5 6 7 9 12 17 19 26 27 28 29 30 38 39 42 43 45 47 50 52 54 55 56 58 59 60 61 62 64 67 68 71 74 75 76 77 79 80 81 83 84  -> dysta2()
+. clara(): s:= max dys[1..946] = 81.7435;
+clara()'s bswap2(*, s=81.7435):     new repr. 16
+    new repr. 43
+  after build: medoids are 16 43
+  and min.dist dysma[1:n] are
+   1.41   21.2   7.07   1.41   2.83     17   5.66      5   14.1   1.41
+   7.07     15   12.7   14.1   14.1      0   4.24   14.1   8.49    9.9
+   7.07      2    8.6   14.1   12.1   4.24   1.41   5.66   5.66   5.66
+   5.66   5.66   4.24   1.41   11.3   2.83   5.83     11      0    5.1
+   1.41     17      0     17
+ --> sky = sum_j D_j= 331.98
+  Last swap: new 17 <-> 43 old; decreasing diss. by 0.492109
+end{bswap2}: sky = 331.98
+ selec() -> 'NAfs' obj= 1.59799
+C clara(): sample 3  finding 1st... new k{ran}:
+.. kall: FALSE, 
+... nrx [0:1]= 0 0 
+... nsel[0:0]= 14 
+ {295} [ntt=44, nunfs=2] .. nsel[1:44]= 1 3 4 6 7 9 12 14 15 16 18 19 20 29 30 31 32 36 38 39 40 44 46 47 48 49 51 53 54 56 57 60 62 64 65 66 67 73 75 77 79 81 82 87  -> dysta2()
+. clara(): s:= max dys[1..946] = 77.8781;
+clara()'s bswap2(*, s=77.8781):     new repr. 19
+    new repr. 35
+  after build: medoids are 19 35
+  and min.dist dysma[1:n] are
+   1.41   7.07    9.9   2.83     17   5.66    6.4    5.1   4.12   4.24
+   11.3   1.41   2.83   14.1   14.1   1.41      6   5.66      0   3.16
+   5.66   18.4   8.06   7.07   16.3      6   7.21   4.24     14   4.24
+   31.1   5.66   5.66   5.66      0   4.24   4.24   22.6   7.07      0
+    5.1     17   8.25   7.07
+ --> sky = sum_j D_j= 338.587
+end{bswap2}: sky = 338.587
+ selec() -> 'NAfs' obj= 1.57294
+C clara(): sample 4  finding 1st... new k{ran}:
+.. kall: FALSE, 
+... nrx [0:1]= 0 0 
+... nsel[0:0]= 70 
+ {295} [ntt=44, nunfs=3] .. nsel[1:44]= 1 3 8 9 14 15 16 17 19 20 22 23 28 30 31 32 34 35 36 37 38 39 40 41 45 46 47 49 54 56 57 65 66 67 69 70 71 74 76 77 78 84 86 88  -> dysta2()
+. clara(): s:= max dys[1..946] = 77.8781;
+clara()'s bswap2(*, s=77.8781):     new repr. 21
+    new repr. 32
+  after build: medoids are 21 32
+  and min.dist dysma[1:n] are
+   1.41   7.07   7.81   5.66    5.1   4.12   4.24   14.1   1.41   2.83
+   4.24      0   12.7   14.1   1.41      6   8.06   33.9   5.66   8.49
+      0   3.16   5.66   5.66    9.9   8.06   7.07      6     14   4.24
+   31.1      0   4.24   4.24   4.24   8.49   11.3   2.83   9.06      0
+   7.07     17   1.41   12.7
+ --> sky = sum_j D_j= 325.933
+end{bswap2}: sky = 325.933
+ selec() -> 'NAfs' obj= 1.57294
+C clara(): sample 5  finding 1st... new k{ran}:
+.. kall: FALSE, 
+... nrx [0:1]= 0 0 
+... nsel[0:0]= 80 
+ {295} [ntt=44, nunfs=4] .. nsel[1:44]= 1 2 3 5 7 8 11 13 14 20 22 23 26 28 30 31 33 34 37 38 39 41 45 46 47 50 51 52 57 59 61 64 67 71 76 77 79 80 81 82 85 86 87 88  -> dysta2()
+  dysta2() gave dyst_toomany_NA --> new sample
+C clara(): sample 6  finding 1st... new k{ran}:
+.. kall: FALSE, 
+... nrx [0:1]= 0 0 
+... nsel[0:0]= 5 
+ {295} [ntt=44, nunfs=5] .. nsel[1:44]= 2 3 4 5 6 8 10 12 19 20 21 23 24 25 29 30 31 32 33 37 39 41 42 45 46 48 50 53 54 59 61 66 68 69 71 72 73 79 80 82 84 85 86 87  -> dysta2()
+  dysta2() gave dyst_toomany_NA --> new sample
+C clara(): sample 7  finding 1st... new k{ran}:
+.. kall: FALSE, 
+... nrx [0:1]= 0 0 
+... nsel[0:0]= 17 
+ {295} [ntt=44, nunfs=6] .. nsel[1:44]= 2 3 6 7 8 12 14 16 17 18 20 22 26 27 29 30 31 32 33 35 36 37 42 44 45 46 49 52 54 58 59 61 62 63 65 67 70 74 75 77 78 79 87 88  -> dysta2()
+  dysta2() gave dyst_toomany_NA --> new sample
+C clara(): sample 8  finding 1st... new k{ran}:
+.. kall: FALSE, 
+... nrx [0:1]= 0 0 
+... nsel[0:0]= 67 
+ {295} [ntt=44, nunfs=7] .. nsel[1:44]= 2 3 6 7 8 9 11 13 14 18 30 31 32 34 35 37 38 40 43 44 47 48 49 52 54 55 56 58 59 60 66 67 68 70 71 72 73 75 80 83 84 85 87 88  -> dysta2()
+. clara(): s:= max dys[1..946] = 85.5102;
+clara()'s bswap2(*, s=85.5102):     new repr. 17
+    new repr. 9
+  after build: medoids are  9 17
+  and min.dist dysma[1:n] are
+   21.2   7.07   2.83     17    9.9   5.66   2.83   1.41      0   11.3
+   14.1   1.41    9.9   9.22   33.9   8.49      0   5.66   8.49   18.4
+   7.07   13.9   1.41   8.25   13.9   5.66   4.24   1.41   4.24   5.66
+   4.24   4.24   1.41   8.49   11.3      0   22.6   11.3   1.41   7.07
+     17   21.2   7.07   12.7
+ --> sky = sum_j D_j= 384.698
+end{bswap2}: sky = 384.698
+ selec() -> 'NAfs' obj= 1.54909
+C clara(): sample 9  finding 1st... new k{ran}:
+.. kall: FALSE, 
+... nrx [0:1]= 0 0 
+... nsel[0:0]= 67 
+ {295} [ntt=44, nunfs=8] .. nsel[1:44]= 2 4 6 7 8 11 12 13 14 15 17 19 20 21 24 27 29 30 31 33 34 35 36 39 42 45 46 48 50 51 52 54 55 58 60 61 62 65 67 78 80 84 86 88  -> dysta2()
+  dysta2() gave dyst_toomany_NA --> new sample
+C clara(): sample 10  finding 1st... new k{ran}:
+.. kall: FALSE, 
+... nrx [0:1]= 0 0 
+... nsel[0:0]= 5 
+ {295} [ntt=44, nunfs=9] .. nsel[1:44]= 1 3 5 6 7 9 10 14 15 16 17 18 19 20 21 23 28 29 30 32 33 36 37 39 40 44 46 47 51 53 54 55 56 57 65 69 70 74 76 81 82 84 86 87  -> dysta2()
+  dysta2() gave dyst_toomany_NA --> new sample
+C clara(): sample 11  finding 1st... new k{ran}:
+.. kall: FALSE, 
+... nrx [0:1]= 0 0 
+... nsel[0:0]= 66 
+ {295} [ntt=44, nunfs=10] .. nsel[1:44]= 1 3 4 5 6 11 13 14 15 18 19 21 28 30 31 32 33 34 39 40 41 42 43 46 47 57 58 59 63 65 66 67 71 72 73 74 75 78 79 80 83 84 87 88  -> dysta2()
+  dysta2() gave dyst_toomany_NA --> new sample
+C clara(): sample 12  finding 1st... new k{ran}:
+.. kall: FALSE, 
+... nrx [0:1]= 0 0 
+... nsel[0:0]= 21 
+ {295} [ntt=44, nunfs=11] .. nsel[1:44]= 4 5 6 8 9 10 13 14 15 16 17 21 23 25 27 28 30 35 36 41 44 46 47 49 50 54 55 56 57 59 61 62 64 65 66 68 71 72 74 75 76 81 83 84  -> dysta2()
+. clara(): s:= max dys[1..946] = 78.3135;
+clara()'s bswap2(*, s=78.3135):     new repr. 5
+    new repr. 2
+  after build: medoids are  2  5
+  and min.dist dysma[1:n] are
+   26.2      0   3.61   9.49      0   13.5     11   20.5   13.9   6.32
+     15   21.6   2.24   32.1   26.6   12.8     12   24.4   17.9    8.6
+   10.8   18.1   7.21   20.5   14.9   29.4   26.2   3.61     23   21.1
+     23   3.61      7   16.6   3.61   9.22   9.49   12.6     13   9.85
+   22.2   14.2   15.7     11
+ --> sky = sum_j D_j= 623.732
+   swp new 43 <-> 5 old; decreasing diss. by -205.358
+  Last swap: new 43 <-> 5 old; decreasing diss. by 1
+end{bswap2}: sky = 418.375
+ selec() -> 'NAfs' obj= 3.10025
+C clara(): sample 13  finding 1st... new k{ran}:
+.. kall: FALSE, 
+... nrx [0:1]= 0 0 
+... nsel[0:0]= 4 
+ {295} [ntt=44, nunfs=12] .. nsel[1:44]= 3 4 5 14 15 16 17 19 20 21 24 25 26 29 30 31 34 35 38 40 41 43 47 49 50 52 55 57 58 60 61 63 64 65 66 68 72 73 74 79 81 83 86 88  -> dysta2()
+. clara(): s:= max dys[1..946] = 84.1487;
+clara()'s bswap2(*, s=84.1487):     new repr. 19
+    new repr. 34
+  after build: medoids are 19 34
+  and min.dist dysma[1:n] are
+   7.07    9.9   1.41    5.1   4.12   4.24   14.1   1.41   2.83   8.06
+   5.39   8.49   7.07   14.1   14.1   1.41   8.06   33.9      0   5.66
+   5.66   8.49   7.07      6      4   7.62   10.3   31.1   1.41   5.66
+   5.66   15.6   5.66      0   4.24   1.41      0   22.6   2.83    5.1
+     17      2   1.41   12.7
+ --> sky = sum_j D_j= 340.1
+end{bswap2}: sky = 340.1
+ selec() -> 'NAfs' obj= 1.57294
+C clara(): sample 14  finding 1st... new k{ran}:
+.. kall: FALSE, 
+... nrx [0:1]= 0 0 
+... nsel[0:0]= 78 
+ {295} [ntt=44, nunfs=13] .. nsel[1:44]= 5 7 8 9 10 11 12 18 19 21 23 27 28 29 31 32 33 35 36 38 39 46 50 51 52 56 57 58 59 60 64 65 66 68 72 73 75 77 78 80 84 86 87 88  -> dysta2()
+  dysta2() gave dyst_toomany_NA --> new sample
+C clara(): sample 15  finding 1st... new k{ran}:
+.. kall: FALSE, 
+... nrx [0:1]= 0 0 
+... nsel[0:0]= 73 
+ {295} [ntt=44, nunfs=14] .. nsel[1:44]= 2 3 8 10 18 25 26 27 29 31 33 34 35 41 42 43 44 46 47 48 49 53 54 56 57 58 59 60 63 69 70 71 72 73 75 76 77 79 81 84 85 86 87 88  -> dysta2()
+  dysta2() gave dyst_toomany_NA --> new sample
+C clara(): sample 16  finding 1st... new k{ran}:
+.. kall: FALSE, 
+... nrx [0:1]= 0 0 
+... nsel[0:0]= 43 
+ {295} [ntt=44, nunfs=15] .. nsel[1:44]= 5 6 7 8 9 12 14 16 18 22 23 24 27 28 29 30 34 35 36 39 40 41 43 45 56 57 59 60 62 64 65 67 69 70 71 73 74 75 79 81 83 85 86 87  -> dysta2()
+. clara(): s:= max dys[1..946] = 75.1665;
+clara()'s bswap2(*, s=75.1665):     new repr. 15
+    new repr. 41
+  after build: medoids are 15 41
+  and min.dist dysma[1:n] are
+   12.7     17   2.83    6.4   15.7      5   7.07    9.9   25.5   13.6
+   14.1      5     15   1.41      0      0   8.06   19.8   8.49   4.24
+   8.49   19.8   5.66   12.6    9.9   45.3   5.66   14.8   8.49    9.9
+      2     10    9.9   22.6   25.5   8.49   11.3   5.83    5.1   2.83
+      0   7.07   15.6   21.2
+ --> sky = sum_j D_j= 479.721
+end{bswap2}: sky = 479.721
+ selec() -> 'NAfs' obj= 2.17131
+C clara(): sample 17  finding 1st... new k{ran}:
+.. kall: FALSE, 
+... nrx [0:1]= 0 0 
+... nsel[0:0]= 22 
+ {295} [ntt=44, nunfs=16] .. nsel[1:44]= 4 6 9 10 11 12 13 16 19 22 26 27 29 30 33 34 37 38 39 42 43 48 51 54 55 57 60 61 62 63 64 66 69 72 73 75 76 77 78 81 82 85 86 87  -> dysta2()
+  dysta2() gave dyst_toomany_NA --> new sample
+C clara(): sample 18  finding 1st... new k{ran}:
+.. kall: FALSE, 
+... nrx [0:1]= 0 0 
+... nsel[0:0]= 39 
+ {295} [ntt=44, nunfs=17] .. nsel[1:44]= 1 4 8 13 15 19 20 23 25 26 27 28 30 31 33 34 36 37 39 41 42 43 44 45 46 47 50 54 55 57 59 60 62 64 65 66 67 72 73 78 79 81 82 85  -> dysta2()
+  dysta2() gave dyst_toomany_NA --> new sample
+C clara(): sample 19  finding 1st... new k{ran}:
+.. kall: FALSE, 
+... nrx [0:1]= 0 0 
+... nsel[0:0]= 72 
+ {295} [ntt=44, nunfs=18] .. nsel[1:44]= 1 4 5 6 10 12 13 14 17 18 19 22 23 25 27 30 31 32 33 38 39 40 41 42 44 45 46 48 55 57 58 59 60 61 66 67 69 70 72 74 83 84 85 86  -> dysta2()
+  dysta2() gave dyst_toomany_NA --> new sample
+C clara(): sample 20  finding 1st... new k{ran}:
+.. kall: FALSE, 
+... nrx [0:1]= 0 0 
+... nsel[0:0]= 48 
+ {295} [ntt=44, nunfs=19] .. nsel[1:44]= 1 3 4 5 7 10 11 13 14 20 22 23 31 32 33 34 35 36 37 40 41 42 43 44 48 50 52 53 55 56 62 63 68 71 72 73 74 75 81 82 83 84 86 88  -> dysta2()
+  dysta2() gave dyst_toomany_NA --> new sample
+Error in clara(x, 2, samples = 20, trace = 3) : 
+  Observation 33 has *only* NAs --> omit it for clustering
+In addition: Warning message:
+In clara(x, 2, samples = 20, trace = 3) :
+  Distance computations with NAs: using correct instead of pre-2016 wrong formula.
+Use  'correct.d=FALSE'  to get previous results or set 'correct.d=TRUE' explicitly
+to suppress this warning.
+> ## To see error message for > 1 missing:
+> try(clara(rbind(NA,x), 2))
+Error in clara(rbind(NA, x), 2) : 
+  Observations 1,34 have *only* NAs --> omit them for clustering!
+In addition: Warning message:
+In clara(rbind(NA, x), 2) :
+  Distance computations with NAs: using correct instead of pre-2016 wrong formula.
+Use  'correct.d=FALSE'  to get previous results or set 'correct.d=TRUE' explicitly
+to suppress this warning.
+> 
+> x <- x[-33,]
+> ## still had the ** dysta2() .. OUT" problem {no longer!}
+> clara(x, 2, samples = 12, trace = 3)
+C clara(): (nsam,nran,n) = (44,12,87); 'large_sample',
+C clara(): sample 1  finding 1st... new k{ran}:
+.. kall: FALSE, 
+... nrx [0:1]= 0 0 
+... nsel[0:0]= 2 
+ {295} [ntt=43, nunfs=0] .. nsel[1:44]= 1 7 8 11 14 16 17 21 22 26 29 30 32 33 34 36 37 39 40 41 43 44 45 46 48 49 51 52 54 55 56 58 62 64 66 68 69 71 74 82 83 84 85 86  -> dysta2()
+. clara(): s:= max dys[1..946] = 76.5376;
+clara()'s bswap2(*, s=76.5376):     new repr. 17
+    new repr. 40
+  after build: medoids are 17 40
+  and min.dist dysma[1:n] are
+   1.41     17    6.4   2.83   7.07   4.24   14.1   7.28   4.24   7.07
+   14.1   14.1      4   8.06   33.9   8.49      0   5.66   5.66   14.1
+   18.4    9.9    6.4   7.07      8      2    8.6   4.24   12.1   4.24
+   31.1   5.66   15.6      2   4.24   4.24   8.49      0   5.83      0
+     17   21.2   1.41   7.07
+ --> sky = sum_j D_j= 384.62
+end{bswap2}: sky = 384.62
+ 1st proper or new best: obj= 4.93331
+C clara(): sample 2  finding 1st... new k{ran}:
+.. kall: T, 
+... nrx [0:1]= 37 82 
+... nsel[0:0]= 70 
+ {295} [ntt=43, nunfs=0] .. nsel[1:44]= 4 8 10 11 13 15 16 18 20 21 22 23 24 25 31 32 33 34 35 36 37 40 41 43 45 46 48 50 52 55 62 64 65 68 69 71 72 77 81 82 84 85 86 87  -> dysta2()
+. clara(): s:= max dys[1..946] = 82.7103;
+clara()'s bswap2(*, s=82.7103):     new repr. 21
+    new repr. 40
+  after build: medoids are 21 40
+  and min.dist dysma[1:n] are
+    9.9    6.4   4.47   2.83   1.41   2.24   4.24   11.3   4.47   7.28
+   4.24      0      5   8.49   1.41      4   8.06   33.9   5.66   8.49
+      0   5.66   14.1   18.4    6.4   7.07      8   5.66   4.24   4.24
+   15.6      2   4.24   4.24   8.49      0   22.6    5.1   8.94      0
+   21.2   1.41   7.07   12.7
+ --> sky = sum_j D_j= 321.274
+end{bswap2}: sky = 321.274
+ obj= 4.93331
+C clara(): sample 3  finding 1st... new k{ran}:
+.. kall: T, 
+... nrx [0:1]= 37 82 
+... nsel[0:0]= 38 
+ {295} [ntt=43, nunfs=0] .. nsel[1:44]= 2 5 10 11 14 18 21 22 23 24 25 26 27 29 33 34 36 37 39 41 42 43 45 47 49 50 55 57 58 60 62 64 67 68 71 73 75 77 79 82 83 84 85 87  -> dysta2()
+. clara(): s:= max dys[1..946] = 85.5102;
+clara()'s bswap2(*, s=85.5102):     new repr. 18
+    new repr. 32
+  after build: medoids are 18 32
+  and min.dist dysma[1:n] are
+   21.2   1.41      4   2.83    5.1   11.3   8.06   4.24      0   5.39
+   8.49   7.07     13   14.1   8.06   33.9   8.49      0   5.66   14.1
+   8.49   18.4   8.06   16.3      4   7.21   4.24   1.41   4.47   5.66
+   15.6      0   1.41   4.24      0   2.83   9.06   7.07   1.41      2
+     17   21.2   1.41   12.7
+ --> sky = sum_j D_j= 350.699
+  Last swap: new 40 <-> 32 old; decreasing diss. by 0.7867
+end{bswap2}: sky = 350.699
+ 1st proper or new best: obj= 4.80308
+C clara(): sample 4  finding 1st... new k{ran}:
+.. kall: T, 
+... nrx [0:1]= 37 64 
+... nsel[0:0]= 85 
+ {295} [ntt=43, nunfs=0] .. nsel[1:44]= 2 4 5 6 8 10 11 12 15 18 21 24 25 26 28 31 33 37 40 42 43 47 49 50 52 54 55 57 58 59 60 61 62 63 64 71 72 73 74 78 79 81 82 86  -> dysta2()
+. clara(): s:= max dys[1..946] = 78.3135;
+clara()'s bswap2(*, s=78.3135):     new repr. 18
+    new repr. 43
+  after build: medoids are 18 43
+  and min.dist dysma[1:n] are
+   21.2    9.9   1.41   2.83    6.4   4.47   2.83      5   2.24   11.3
+   7.28      5   8.49   7.07   12.7   1.41   8.06      0   5.66   8.49
+   18.4   17.8      2   5.66   4.24   12.1   4.24   1.41   5.66   5.66
+   5.66   5.66   15.6   5.66      2      0   22.6   2.83   5.83    5.1
+   1.41   8.94      0   7.07
+ --> sky = sum_j D_j= 297.276
+end{bswap2}: sky = 297.276
+ obj= 4.93331
+C clara(): sample 5  finding 1st... new k{ran}:
+.. kall: T, 
+... nrx [0:1]= 37 64 
+... nsel[0:0]= 84 
+ {295} [ntt=43, nunfs=0] .. nsel[1:44]= 4 6 9 10 12 13 15 16 17 18 20 21 24 26 27 31 34 35 36 37 40 41 42 43 45 51 52 53 54 55 56 62 64 65 67 68 69 71 72 73 74 77 79 82  -> dysta2()
+. clara(): s:= max dys[1..946] = 76.5376;
+clara()'s bswap2(*, s=76.5376):     new repr. 20
+    new repr. 44
+  after build: medoids are 20 44
+  and min.dist dysma[1:n] are
+    9.9   2.83   5.66   4.47      5   1.41   2.24   4.24   14.1   11.3
+   4.47   7.28      5   7.07     15   1.41   33.9   5.66   8.49      0
+   5.66   14.1   8.49   18.4    6.4    8.6   4.24   14.1   12.1   4.24
+   31.1   15.6      2   4.24   1.41   4.24   8.49      0   22.6   2.83
+   5.83    5.1   1.41      0
+ --> sky = sum_j D_j= 350.799
+end{bswap2}: sky = 350.799
+ obj= 4.93331
+C clara(): sample 6  finding 1st... new k{ran}:
+.. kall: T, 
+... nrx [0:1]= 37 64 
+... nsel[0:0]= 33 
+ {295} [ntt=43, nunfs=0] .. nsel[1:44]= 1 5 7 9 11 13 14 15 17 18 22 26 27 28 34 35 36 37 38 43 46 47 48 50 51 54 55 56 57 61 63 64 66 69 71 73 74 75 76 77 78 80 81 82  -> dysta2()
+. clara(): s:= max dys[1..946] = 82.0244;
+clara()'s bswap2(*, s=82.0244):     new repr. 18
+    new repr. 19
+  after build: medoids are 18 19
+  and min.dist dysma[1:n] are
+   1.41   1.41     17   5.66   2.83   1.41   5.66   5.39   14.1   11.3
+   4.24   7.07   12.6   12.7   33.9   5.66   8.49      0      0     17
+   7.07   13.6   5.83    9.9   4.47   11.3   4.24   31.1   1.41   5.66
+   5.66   3.16   4.24   8.49      0   2.83   6.32   8.25      0   8.49
+   2.83     17    5.1   4.24
+ --> sky = sum_j D_j= 339.187
+end{bswap2}: sky = 339.187
+ 1st proper or new best: obj= 4.79624
+C clara(): sample 7  finding 1st... new k{ran}:
+.. kall: T, 
+... nrx [0:1]= 37 38 
+... nsel[0:0]= 26 
+ {295} [ntt=43, nunfs=0] .. nsel[1:44]= 1 3 4 5 9 10 11 18 19 21 23 24 25 30 37 38 39 40 46 47 50 54 55 56 59 62 65 66 67 68 70 71 72 74 75 76 79 80 81 82 83 84 85 86  -> dysta2()
+. clara(): s:= max dys[1..946] = 82.7103;
+clara()'s bswap2(*, s=82.7103):     new repr. 15
+    new repr. 16
+  after build: medoids are 15 16
+  and min.dist dysma[1:n] are
+   1.41   7.07    9.9   1.41   5.66   1.41   2.83   11.3   1.41   11.2
+      0   8.54   8.49   14.1      0      0   5.66   5.66   7.07   13.6
+    9.9   11.3   4.24   31.1   5.66   15.6   4.24   4.24   1.41   4.24
+   11.3      0   22.6   6.32   8.25      0   1.41     17    5.1   4.24
+     17   21.2   1.41   7.07
+ --> sky = sum_j D_j= 331.596
+end{bswap2}: sky = 331.596
+ obj= 4.79624
+C clara(): sample 8  finding 1st... new k{ran}:
+.. kall: T, 
+... nrx [0:1]= 37 38 
+... nsel[0:0]= 74 
+ {295} [ntt=43, nunfs=0] .. nsel[1:44]= 4 5 10 12 15 16 17 19 20 21 22 23 24 25 26 27 28 29 31 37 38 39 41 42 44 45 46 49 50 51 56 57 61 62 63 64 68 73 75 77 78 80 81 85  -> dysta2()
+. clara(): s:= max dys[1..946] = 84.1487;
+clara()'s bswap2(*, s=84.1487):     new repr. 20
+    new repr. 36
+  after build: medoids are 20 36
+  and min.dist dysma[1:n] are
+    9.9   1.41      4    6.4   4.12   4.24   14.1   1.41   2.83   8.06
+   4.24      0   5.39   8.49   7.07     13   12.7   14.1   1.41      0
+   3.16   5.66   14.1   8.49    9.9   8.06   7.07      4   7.21   7.62
+   31.1   1.41   5.66   15.6   5.66      0   4.24   2.83   9.06   7.07
+    5.1     17   8.25   1.41
+ --> sky = sum_j D_j= 312.667
+end{bswap2}: sky = 312.667
+ obj= 4.80308
+C clara(): sample 9  finding 1st... new k{ran}:
+.. kall: T, 
+... nrx [0:1]= 37 38 
+... nsel[0:0]= 67 
+ {295} [ntt=43, nunfs=0] .. nsel[1:44]= 1 3 5 9 11 13 17 22 23 25 29 31 32 34 37 38 40 42 43 44 47 49 53 55 56 58 62 63 66 68 69 70 71 72 73 74 75 76 78 81 82 84 85 86  -> dysta2()
+. clara(): s:= max dys[1..946] = 82.7103;
+clara()'s bswap2(*, s=82.7103):     new repr. 15
+    new repr. 16
+  after build: medoids are 15 16
+  and min.dist dysma[1:n] are
+   1.41   7.07   1.41   5.66   2.83   1.41   14.1   4.24      0   8.49
+   14.1   1.41   7.62   33.9      0      0   5.66   8.49     17    9.9
+   13.6   5.83     17   4.24   31.1   7.07   15.6   5.66   4.24   4.24
+   8.49   11.3      0   22.6   2.83   6.32   8.25      0   2.83    5.1
+   4.24   21.2   1.41   7.07
+ --> sky = sum_j D_j= 355.134
+end{bswap2}: sky = 355.134
+ obj= 4.79624
+C clara(): sample 10  finding 1st... new k{ran}:
+.. kall: T, 
+... nrx [0:1]= 37 38 
+... nsel[0:0]= 85 
+ {295} [ntt=43, nunfs=0] .. nsel[1:44]= 2 4 8 11 13 22 24 25 26 27 29 31 34 36 37 38 39 41 42 44 47 48 49 50 53 57 58 59 60 61 62 63 64 66 67 70 71 72 75 77 79 82 84 87  -> dysta2()
+. clara(): s:= max dys[1..946] = 85.5102;
+clara()'s bswap2(*, s=85.5102):     new repr. 15
+    new repr. 33
+  after build: medoids are 15 33
+  and min.dist dysma[1:n] are
+   21.2    9.9   7.81   2.83   1.41   4.24   5.39   8.49   7.07     13
+   14.1   1.41   33.9   8.49      0   3.16   5.66   14.1   8.49    9.9
+   16.3      6      4   7.21     14   1.41   4.47   5.66   5.66   5.66
+   15.6   5.66      0   4.24   1.41   11.3      0   22.6   9.06   7.07
+   1.41      2   21.2   12.7
+ --> sky = sum_j D_j= 365.357
+end{bswap2}: sky = 365.357
+ obj= 4.80308
+C clara(): sample 11  finding 1st... new k{ran}:
+.. kall: T, 
+... nrx [0:1]= 37 38 
+... nsel[0:0]= 87 
+ {295} [ntt=43, nunfs=0] .. nsel[1:44]= 2 7 8 9 10 12 16 17 20 22 23 24 26 27 29 34 35 36 37 38 41 44 47 48 49 50 51 52 53 54 59 60 61 63 67 68 69 75 76 78 80 81 84 85  -> dysta2()
+. clara(): s:= max dys[1..946] = 80.9938;
+clara()'s bswap2(*, s=80.9938):     new repr. 19
+    new repr. 20
+  after build: medoids are 19 20
+  and min.dist dysma[1:n] are
+   21.2     17   7.28   5.66   1.41   9.22   4.24   14.1    5.1   4.24
+      0   8.54   7.07   12.6   14.1   33.9   5.66   8.49      0      0
+   14.1    9.9   13.6   5.83   5.83    9.9   4.47   4.24     17   11.3
+   5.66   5.66   5.66   5.66   1.41   4.24   8.49   8.25      0   2.83
+     17    5.1   21.2   1.41
+ --> sky = sum_j D_j= 368.774
+end{bswap2}: sky = 368.774
+ obj= 4.79624
+C clara(): sample 12  finding 1st... new k{ran}:
+.. kall: T, 
+... nrx [0:1]= 37 38 
+... nsel[0:0]= 44 
+ {295} [ntt=43, nunfs=0] .. nsel[1:44]= 1 2 3 7 11 12 14 18 19 20 21 24 28 30 31 32 33 34 37 38 39 40 42 49 51 52 53 55 59 63 68 69 70 72 74 76 77 78 79 81 84 85 86 87  -> dysta2()
+. clara(): s:= max dys[1..946] = 80.9938;
+clara()'s bswap2(*, s=80.9938):     new repr. 19
+    new repr. 24
+  after build: medoids are 19 24
+  and min.dist dysma[1:n] are
+   1.41   21.2   7.07     17   2.83   4.12   9.06   11.3   1.41   6.32
+      7   5.39   12.7   14.1   1.41      2   8.54   33.9      0   5.83
+   5.66   5.66   8.49      0    9.9   4.24   14.6   4.24   5.66   5.66
+   4.24   8.49   11.3   22.6    5.1      0   3.16   5.83   1.41     10
+   21.2   1.41   7.07   12.7
+ --> sky = sum_j D_j= 351.374
+end{bswap2}: sky = 351.374
+ obj= 5.11334
+C clara(): best sample _found_ ; nbest[1:44] =
+ c(1,5,7,9,11,13,14,15,17,18,22,26,27,28,34,35,36,37,38,43,46,47,48,50,51,54,55,56,57,61,63,64,66,69,71,73,74,75,76,77,78,80,81,82)
+ --> dysta2(nbest), resul(), end
+Call:	 clara(x = x, k = 2, samples = 12, trace = 3) 
+Medoids:
+     [,1] [,2]
+[1,]   NA    1
+[2,]   47   15
+Objective function:	 4.79624
+Clustering vector: 	 int [1:87] 1 1 1 1 1 1 1 2 1 2 1 2 1 2 2 1 1 1 ...
+Cluster sizes:	    	 57 30 
+Best sample:
+ [1]  1  5  7  9 11 13 14 15 17 18 22 26 27 28 34 35 36 37 38 43 46 47 48 50 51
+[26] 54 55 56 57 61 63 64 66 69 71 73 74 75 76 77 78 80 81 82
+
+Available components:
+ [1] "sample"     "medoids"    "i.med"      "clustering" "objective" 
+ [6] "clusinfo"   "diss"       "call"       "silinfo"    "data"      
+Warning message:
+In clara(x, 2, samples = 12, trace = 3) :
+  Distance computations with NAs: using correct instead of pre-2016 wrong formula.
+Use  'correct.d=FALSE'  to get previous results or set 'correct.d=TRUE' explicitly
+to suppress this warning.
+> 
+> data(xclara)
+> set.seed(123)
+> xclara[sample(nrow(xclara), 50),] <- NA
+> try( clara(xclara, k = 3) ) #-> "nice" error message depicting first 12 missing obs
+Error in clara(xclara, k = 3) : 
+  50 observations (74,126,137,308,411,423,438,451,642,686,689,735 ...) have *only* NAs --> omit them for clustering!
+In addition: Warning message:
+In clara(xclara, k = 3) :
+  Distance computations with NAs: using correct instead of pre-2016 wrong formula.
+Use  'correct.d=FALSE'  to get previous results or set 'correct.d=TRUE' explicitly
+to suppress this warning.
+> 
+> proc.time()
+   user  system elapsed 
+  0.139   0.029   0.216 
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/diana-ex.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/diana-ex.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/diana-ex.R	(revision 2477)
@@ -0,0 +1,31 @@
+library(cluster)
+options(digits = 6)
+data(votes.repub)
+di.votes <- daisy(votes.repub)
+
+.p00 <- proc.time()
+summary(diana(votes.repub, metric = "manhattan", stand = TRUE))
+summary(diana(di.votes, keep.diss = FALSE))
+cat('Time elapsed: ', proc.time() - .p00,'\n')
+
+data(agriculture)
+data(ruspini)
+
+.p0 <- proc.time()
+dia.agr <- diana(agriculture)
+drusp0  <- diana(ruspini, keep.diss=FALSE, keep.data=FALSE)
+drusp1  <- diana(ruspini, metric = "manhattan")
+cat('Time elapsed: ', proc.time() - .p0,'\n')
+
+summary(dia.agr)
+summary(drusp0)
+summary(drusp1)
+str    (drusp1)
+
+## From system.file("scripts/ch11.R", package = "MASS")
+data(swiss)
+swiss.x <- as.matrix(swiss[,-1])
+.p1 <- proc.time()
+dCH <- diana(swiss.x)
+cat('Time elapsed: ', proc.time() - .p1,'\n')
+str(as.dendrogram(as.hclust(dCH)))# keep back-compatible
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/mona.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/mona.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/mona.R	(revision 2477)
@@ -0,0 +1,23 @@
+library(cluster)
+
+data(animals)
+(mani <- mona(animals))
+
+str(mani)
+
+if(require(MASS)) {
+
+    if(R.version$major != "1" || as.numeric(R.version$minor) >= 7)
+        RNGversion("1.6")
+    set.seed(253)
+    n <- 512; p <- 3
+    Sig <- diag(p); Sig[] <- 0.8 ^ abs(col(Sig) - row(Sig))
+    x3 <- mvrnorm(n, rep(0,p), Sig) >= 0
+    x <- cbind(x3, rbinom(n, size=1, prob = 1/2))
+
+    print(sapply(as.data.frame(x), table))
+
+    mx <- mona(x)
+    str(mx)
+    print(lapply(mx[c(1,3,4)], table))
+}
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/silhouette-default.Rout.save
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/silhouette-default.Rout.save	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/silhouette-default.Rout.save	(revision 2477)
@@ -0,0 +1,616 @@
+
+R Under development (unstable) (2011-08-28 r56813)
+Copyright (C) 2011 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+Platform: i686-pc-linux-gnu (32-bit)
+
+R is free software and comes with ABSOLUTELY NO WARRANTY.
+You are welcome to redistribute it under certain conditions.
+Type 'license()' or 'licence()' for distribution details.
+
+R is a collaborative project with many contributors.
+Type 'contributors()' for more information and
+'citation()' on how to cite R or R packages in publications.
+
+Type 'demo()' for some demos, 'help()' for on-line help, or
+'help.start()' for an HTML browser interface to help.
+Type 'q()' to quit R.
+
+> ## This came from a bug report on R-help by ge yreyt <tothri2000@yahoo.ca>
+> ## Date: Mon, 9 Jun 2003 16:06:53 -0400 (EDT)
+> library(cluster)
+> if(FALSE) # manual testing
++ library(cluster, lib="~/R/Pkgs/cluster.Rcheck")
+> 
+> data(iris)
+> 
+> .proctime00 <- proc.time()
+> 
+> mdist <- as.dist(1 - cor(t(iris[,1:4])))#dissimlarity
+> ## this is always the same:
+> hc <- diana(mdist, diss = TRUE, stand = FALSE)
+> 
+> maxk <- 15                # at most 15 clusters
+> silh.wid <- numeric(maxk)  # myind[k] := the silh.value for k clusters
+> silh.wid[1] <- NA # 1-cluster: silhouette not defined
+> 
+> op <- par(mfrow = c(4,4), mar = .1+ c(2,1,2,1), mgp=c(1.5, .6,0))
+> for(k in 2:maxk) {
++     cat("\n", k,":\n==\n")
++     k.gr <- cutree(as.hclust(hc), k = k)
++     cat("grouping table: "); print(table(k.gr))
++     si <- silhouette(k.gr, mdist)
++     cat("silhouette:\n"); print(summary(si))
++     plot(si, main = paste("k =",k),
++          col = 2:(k+1), do.n.k=FALSE, do.clus.stat=FALSE)
++     silh.wid[k] <- summary(si)$avg.width
++     ##      ===
++ }
+
+ 2 :
+==
+grouping table: k.gr
+  1   2 
+ 50 100 
+silhouette:
+Silhouette of 150 units in 2 clusters from silhouette.default(x = k.gr, dist = mdist) :
+ Cluster sizes and average silhouette widths:
+       50       100 
+0.9829965 0.9362626 
+Individual silhouette widths:
+   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
+ 0.5884  0.9437  0.9611  0.9518  0.9815  0.9918 
+
+ 3 :
+==
+grouping table: k.gr
+ 1  2  3 
+50 50 50 
+silhouette:
+Silhouette of 150 units in 3 clusters from silhouette.default(x = k.gr, dist = mdist) :
+ Cluster sizes and average silhouette widths:
+       50        50        50 
+0.9773277 0.6926798 0.7467236 
+Individual silhouette widths:
+   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
+0.03353 0.76940 0.86120 0.80560 0.97560 0.98920 
+
+ 4 :
+==
+grouping table: k.gr
+ 1  2  3  4 
+35 15 50 50 
+silhouette:
+Silhouette of 150 units in 4 clusters from silhouette.default(x = k.gr, dist = mdist) :
+ Cluster sizes and average silhouette widths:
+       35        15        50        50 
+0.5653722 0.5226372 0.6926798 0.7467236 
+Individual silhouette widths:
+   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
+0.03353 0.56620 0.75100 0.66400 0.84240 0.89390 
+
+ 5 :
+==
+grouping table: k.gr
+ 1  2  3  4  5 
+35 15 29 21 50 
+silhouette:
+Silhouette of 150 units in 5 clusters from silhouette.default(x = k.gr, dist = mdist) :
+ Cluster sizes and average silhouette widths:
+       35        15        29        21        50 
+0.5653722 0.5226372 0.5776362 0.4625437 0.5296735 
+Individual silhouette widths:
+   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
+-0.5404  0.3937  0.6252  0.5372  0.7392  0.8136 
+
+ 6 :
+==
+grouping table: k.gr
+ 1  2  3  4  5  6 
+35 15 29 21 29 21 
+silhouette:
+Silhouette of 150 units in 6 clusters from silhouette.default(x = k.gr, dist = mdist) :
+ Cluster sizes and average silhouette widths:
+       35        15        29        21        29        21 
+0.5653722 0.5226372 0.5776362 0.3732981 0.3383135 0.5945444 
+Individual silhouette widths:
+   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
+-0.1094  0.3351  0.5257  0.4968  0.6938  0.8136 
+
+ 7 :
+==
+grouping table: k.gr
+ 1  2  3  4  5  6  7 
+35 14  1 29 21 29 21 
+silhouette:
+Silhouette of 150 units in 7 clusters from silhouette.default(x = k.gr, dist = mdist) :
+ Cluster sizes and average silhouette widths:
+       35        14         1        29        21        29        21 
+0.4165289 0.6671435 0.0000000 0.5776362 0.3732981 0.3383135 0.5945444 
+Individual silhouette widths:
+   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
+-0.3264  0.3001  0.5234  0.4720  0.6970  0.8301 
+
+ 8 :
+==
+grouping table: k.gr
+ 1  2  3  4  5  6  7  8 
+35 14  1 29 10 11 29 21 
+silhouette:
+Silhouette of 150 units in 8 clusters from silhouette.default(x = k.gr, dist = mdist) :
+ Cluster sizes and average silhouette widths:
+       35        14         1        29        10        11        29        21 
+0.4165289 0.6671435 0.0000000 0.4209012 0.6943265 0.7262601 0.2053018 0.5945444 
+Individual silhouette widths:
+   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
+-0.6258  0.2576  0.5842  0.4633  0.7132  0.8887 
+
+ 9 :
+==
+grouping table: k.gr
+ 1  2  3  4  5  6  7  8  9 
+35 14  1 26 10 11  3 29 21 
+silhouette:
+Silhouette of 150 units in 9 clusters from silhouette.default(x = k.gr, dist = mdist) :
+ Cluster sizes and average silhouette widths:
+       35        14         1        26        10        11         3        29 
+0.4165289 0.6671435 0.0000000 0.5318152 0.6673269 0.6944652 0.7957279 0.2053018 
+       21 
+0.5945444 
+Individual silhouette widths:
+   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
+-0.6258  0.3150  0.5896  0.4859  0.7263  0.8870 
+
+ 10 :
+==
+grouping table: k.gr
+ 1  2  3  4  5  6  7  8  9 10 
+35 14  1 26 10 11  3 16 13 21 
+silhouette:
+Silhouette of 150 units in 10 clusters from silhouette.default(x = k.gr, dist = mdist) :
+ Cluster sizes and average silhouette widths:
+       35        14         1        26        10        11         3        16 
+0.4165289 0.6671435 0.0000000 0.5318152 0.6319149 0.6145837 0.7957279 0.4640123 
+       13        21 
+0.6615431 0.4228530 
+Individual silhouette widths:
+   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
+-0.5870  0.3535  0.6068  0.5208  0.7349  0.8803 
+
+ 11 :
+==
+grouping table: k.gr
+ 1  2  3  4  5  6  7  8  9 10 11 
+35 14  1 26 10 11  3 16 13 11 10 
+silhouette:
+Silhouette of 150 units in 11 clusters from silhouette.default(x = k.gr, dist = mdist) :
+ Cluster sizes and average silhouette widths:
+       35        14         1        26        10        11         3        16 
+0.4165289 0.6671435 0.0000000 0.5318152 0.6319149 0.6145837 0.7957279 0.4064279 
+       13        11        10 
+0.5866228 0.4297258 0.6590274 
+Individual silhouette widths:
+   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
+-0.3264  0.3730  0.5984  0.5244  0.7302  0.8505 
+
+ 12 :
+==
+grouping table: k.gr
+ 1  2  3  4  5  6  7  8  9 10 11 12 
+35 11  3  1 26 10 11  3 16 13 11 10 
+silhouette:
+Silhouette of 150 units in 12 clusters from silhouette.default(x = k.gr, dist = mdist) :
+ Cluster sizes and average silhouette widths:
+       35        11         3         1        26        10        11         3 
+0.2883758 0.7044155 0.4092330 0.0000000 0.5318152 0.6319149 0.6145837 0.7957279 
+       16        13        11        10 
+0.4064279 0.5866228 0.4297258 0.6590274 
+Individual silhouette widths:
+   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
+-0.6007  0.3395  0.5817  0.4921  0.7216  0.8700 
+
+ 13 :
+==
+grouping table: k.gr
+ 1  2  3  4  5  6  7  8  9 10 11 12 13 
+28 11  3  7  1 26 10 11  3 16 13 11 10 
+silhouette:
+Silhouette of 150 units in 13 clusters from silhouette.default(x = k.gr, dist = mdist) :
+ Cluster sizes and average silhouette widths:
+       28        11         3         7         1        26        10        11 
+0.3783869 0.6827810 0.4092330 0.4285753 0.0000000 0.5318152 0.6319149 0.6145837 
+        3        16        13        11        10 
+0.7957279 0.4064279 0.5866228 0.4297258 0.6590274 
+Individual silhouette widths:
+   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
+-0.4013  0.3314  0.5704  0.5138  0.7274  0.8531 
+
+ 14 :
+==
+grouping table: k.gr
+ 1  2  3  4  5  6  7  8  9 10 11 12 13 14 
+19 11  3  9  7  1 26 10 11  3 16 13 11 10 
+silhouette:
+Silhouette of 150 units in 14 clusters from silhouette.default(x = k.gr, dist = mdist) :
+ Cluster sizes and average silhouette widths:
+       19        11         3         9         7         1        26        10 
+0.5419530 0.6171802 0.3959926 0.4525348 0.1669077 0.0000000 0.5318152 0.6319149 
+       11         3        16        13        11        10 
+0.6145837 0.7957279 0.4064279 0.5866228 0.4297258 0.6590274 
+Individual silhouette widths:
+   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
+-0.5929  0.3795  0.5875  0.5217  0.7263  0.8505 
+
+ 15 :
+==
+grouping table: k.gr
+ 1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 
+19 11  3  9  7  1 18 10 11  8  3 16 13 11 10 
+silhouette:
+Silhouette of 150 units in 15 clusters from silhouette.default(x = k.gr, dist = mdist) :
+ Cluster sizes and average silhouette widths:
+       19        11         3         9         7         1        18        10 
+0.5419530 0.6171802 0.3959926 0.4525348 0.1669077 0.0000000 0.6616381 0.5871805 
+       11         8         3        16        13        11        10 
+0.5171407 0.6705138 0.7444822 0.4064279 0.5866228 0.4297258 0.6590274 
+Individual silhouette widths:
+   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
+-0.5929  0.3859  0.6211  0.5335  0.7478  0.8551 
+> par(op)
+> 
+> summary(si.p <- silhouette(50 - k.gr, mdist))
+Silhouette of 150 units in 15 clusters from silhouette.default(x = 50 - k.gr, dist = mdist) :
+ Cluster sizes, ids = (35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49), and average silhouette widths:
+       10        11        13        16         3         8        11        10 
+0.6590274 0.4297258 0.5866228 0.4064279 0.7444822 0.6705138 0.5171407 0.5871805 
+       18         1         7         9         3        11        19 
+0.6616381 0.0000000 0.1669077 0.4525348 0.3959926 0.6171802 0.5419530 
+Individual silhouette widths:
+   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
+-0.5929  0.3859  0.6211  0.5335  0.7478  0.8551 
+> stopifnot(identical(si.p[,3],         si[,3]),
++ 	  identical(si.p[, 1:2], 50 - si[, 1:2]))
+> 
+> # the widths:
+> silh.wid
+ [1]        NA 0.9518406 0.8055770 0.6639850 0.5371742 0.4967654 0.4720384
+ [8] 0.4633064 0.4858965 0.5207776 0.5243911 0.4920638 0.5138220 0.5217026
+[15] 0.5335255
+> #select the number of k clusters with the largest si value :
+> (myk <- which.min(silh.wid)) # -> 8 (here)
+[1] 8
+> 
+> postscript(file="silhouette-ex.ps")
+> ## MM:  plot to see how the decision is made
+> plot(silh.wid, type = 'b', col= "blue", xlab = "k")
+> axis(1, at=myk, col.axis= "red", font.axis= 2)
+> 
+> ##--- PAM()'s silhouette should give same as silh*.default()!
+> Eq <- function(x,y, tol = 1e-12) x == y | abs(x - y) < tol * abs((x+y)/2)
+> 
+> for(k in 2:40) {
++     cat("\n", k,":\n==\n")
++     p.k <- pam(mdist, k = k)
++     k.gr <- p.k$clustering
++     si.p <- silhouette(p.k)
++     si.g <- silhouette(k.gr, mdist)
++     ## since the obs.order may differ (within cluster):
++     si.g <- si.g[ as.integer(rownames(si.p)), ]
++     cat("grouping table: "); print(table(k.gr))
++     if(!isTRUE(all.equal(c(si.g), c(si.p)))) {
++ 	cat("silhouettes differ:")
++ 	if(any(neq <- !Eq(si.g[,3], si.p[,3]))) {
++ 	    cat("\n")
++ 	    print( cbind(si.p[], si.g[,2:3])[ neq, ] )
++ 	} else cat(" -- but not in col.3 !\n")
++     }
++ }
+
+ 2 :
+==
+grouping table: k.gr
+  1   2 
+ 50 100 
+
+ 3 :
+==
+grouping table: k.gr
+ 1  2  3 
+50 50 50 
+
+ 4 :
+==
+grouping table: k.gr
+ 1  2  3  4 
+50 43 37 20 
+
+ 5 :
+==
+grouping table: k.gr
+ 1  2  3  4  5 
+50 25 35 20 20 
+
+ 6 :
+==
+grouping table: k.gr
+ 1  2  3  4  5  6 
+33 17 25 35 20 20 
+
+ 7 :
+==
+grouping table: k.gr
+ 1  2  3  4  5  6  7 
+33 17 17 14 18 31 20 
+
+ 8 :
+==
+grouping table: k.gr
+ 1  2  3  4  5  6  7  8 
+21 13 16 17 14 18 31 20 
+
+ 9 :
+==
+grouping table: k.gr
+ 1  2  3  4  5  6  7  8  9 
+21 13 16 12 20 11 19 17 21 
+
+ 10 :
+==
+grouping table: k.gr
+ 1  2  3  4  5  6  7  8  9 10 
+21 13 16 18 10 15 14  7 16 20 
+
+ 11 :
+==
+grouping table: k.gr
+ 1  2  3  4  5  6  7  8  9 10 11 
+21 13 16 19 10 14  7  6 15 13 16 
+
+ 12 :
+==
+grouping table: k.gr
+ 1  2  3  4  5  6  7  8  9 10 11 12 
+21 13 16 17 10 12  9  3  5 15 13 16 
+
+ 13 :
+==
+grouping table: k.gr
+ 1  2  3  4  5  6  7  8  9 10 11 12 13 
+21 12 16  1 18 11 12  9  3 15 13  4 15 
+
+ 14 :
+==
+grouping table: k.gr
+ 1  2  3  4  5  6  7  8  9 10 11 12 13 14 
+20 10  7 13 18 10 12  9  3  7 10 13  4 14 
+
+ 15 :
+==
+grouping table: k.gr
+ 1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 
+20 11  5 13  1 18 10 12  9  3  7 10 13  4 14 
+
+ 16 :
+==
+grouping table: k.gr
+ 1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 
+20 11  5 13  1 12  8  9 11  9  3  7 10 13  4 14 
+
+ 17 :
+==
+grouping table: k.gr
+ 1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 
+20 11  5 13  1 12  8  7  9 10  3  3  9 13  4 13  9 
+
+ 18 :
+==
+grouping table: k.gr
+ 1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 
+20 11  5  9  4  1 12  8  7  9 10  3  3  9 13  4 13  9 
+
+ 19 :
+==
+grouping table: k.gr
+ 1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 
+20 11  5  9  4  1 10  8  8  9  8  3  3  9 13  3  4 13  9 
+
+ 20 :
+==
+grouping table: k.gr
+ 1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 
+20 11  5  9  4  1 10  8  8  9  8  3  3  9 12  3  4  6  9  8 
+
+ 21 :
+==
+grouping table: k.gr
+ 1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 
+20 11  5  9  4  1 10  8  8  7  8  3  3  7 11  3  4  6  9  8  5 
+
+ 22 :
+==
+grouping table: k.gr
+ 1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 
+ 9 11  5  9 11  4  1 10  8  8  7  8  3  3  7 11  3  4  6  9  8  5 
+
+ 23 :
+==
+grouping table: k.gr
+ 1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 
+ 9 11  5  9 11  4  1 10  8  8  7  8  3  3  7 11  3  4  6  8  8  5  1 
+
+ 24 :
+==
+grouping table: k.gr
+ 1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 
+15 10  5 10  3  3  3  1 10  8  8  7  8  3  3  7 11  3  4  6  8  8  5  1 
+
+ 25 :
+==
+grouping table: k.gr
+ 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 
+ 8  4  5  9 11  7  2  3  1 10  8  8  7  8  3  3  7 11  3  4  6  8  8  5  1 
+
+ 26 :
+==
+grouping table: k.gr
+ 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 
+ 8  4  5  9 11  7  2  3  1 10  8  8  7  8  3  3  7  7  3  4  6  8  8  4  5  1 
+
+ 27 :
+==
+grouping table: k.gr
+ 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 
+ 8  4  5  9 11  7  2  3  1 10  8  7  7  8  3  2  7  7  3  2  4  6  8  8  4  5 
+27 
+ 1 
+
+ 28 :
+==
+grouping table: k.gr
+ 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 
+ 8  4  4  9 11  7  2  3  1  1 10  8  7  7  8  3  2  7  7  3  2  4  6  8  8  4 
+27 28 
+ 5  1 
+
+ 29 :
+==
+grouping table: k.gr
+ 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 
+ 8  4  4  9 11  7  2  3  1  1 10  8  7  7  8  2  2  7  7  3  2  1  4  6  8  8 
+27 28 29 
+ 4  5  1 
+
+ 30 :
+==
+grouping table: k.gr
+ 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 
+ 8  4 11 10  6  3  2  3  1  1  1 10  8  7  7  8  2  2  7  7  3  2  1  4  6  8 
+27 28 29 30 
+ 8  4  5  1 
+
+ 31 :
+==
+grouping table: k.gr
+ 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 
+ 8  4 11 10  6  3  2  3  1  1  1 10  8  7  7  8  2  2  7  7  3  2  1  4  6  7 
+27 28 29 30 31 
+ 7  4  5  1  2 
+
+ 32 :
+==
+grouping table: k.gr
+ 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 
+ 7  4  3 10 10  6  2  2  3  1  1  1 10  8  7  7  8  2  2  7  7  3  2  1  4  6 
+27 28 29 30 31 32 
+ 7  7  4  5  1  2 
+
+ 33 :
+==
+grouping table: k.gr
+ 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 
+ 7  4  3 10 10  6  2  2  3  1  1  1 10  8  7  7  8  2  2  7  7  3  2  1  1  6 
+27 28 29 30 31 32 33 
+ 7  3  7  4  5  1  2 
+
+ 34 :
+==
+grouping table: k.gr
+ 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 
+ 7  4  3  8  9  6  2  3  3  1  1  2  1 10  8  7  7  8  2  2  7  7  3  2  1  1 
+27 28 29 30 31 32 33 34 
+ 6  7  3  7  4  5  1  2 
+
+ 35 :
+==
+grouping table: k.gr
+ 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 
+ 7  4  3  8  9  6  2  3  3  1  1  2  1 10  8  7  7  8  2  2  5  7  3  2  1  1 
+27 28 29 30 31 32 33 34 35 
+ 6  5  3  7  4  4  5  1  2 
+
+ 36 :
+==
+grouping table: k.gr
+ 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 
+ 7  4  3  8  9  6  2  3  3  1  1  2  1 10  8  7  6  8  2  2  5  7  1  3  2  1 
+27 28 29 30 31 32 33 34 35 36 
+ 1  6  5  3  7  4  4  5  1  2 
+
+ 37 :
+==
+grouping table: k.gr
+ 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 
+ 7  4  3  8  9  6  2  3  3  1  1  2  1 10  8  3  5  6  8  2  2  5  7  1  3  2 
+27 28 29 30 31 32 33 34 35 36 37 
+ 1  1  6  5  3  7  4  5  1  3  2 
+
+ 38 :
+==
+grouping table: k.gr
+ 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 
+ 7  4  3  8  9  6  2  3  3  1  1  2  1 10  8  3  5  6  5  2  2  5  3  7  1  3 
+27 28 29 30 31 32 33 34 35 36 37 38 
+ 2  1  1  6  5  3  7  4  5  1  3  2 
+
+ 39 :
+==
+grouping table: k.gr
+ 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 
+ 7  4  3  8  9  6  2  3  3  1  1  2  1  7  3  8  3  5  6  5  2  2  5  3  7  1 
+27 28 29 30 31 32 33 34 35 36 37 38 39 
+ 3  2  1  1  6  5  3  7  4  5  1  3  2 
+
+ 40 :
+==
+grouping table: k.gr
+ 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 
+ 5  4  3  7 10  6  2  2  3  3  1  1  2  1  7  3  8  3  5  6  5  2  2  5  3  7 
+27 28 29 30 31 32 33 34 35 36 37 38 39 40 
+ 1  3  2  1  1  6  5  3  7  4  5  1  3  2 
+> 
+> 
+> ## "pathological" case where a_i == b_i == 0 :
+> D6 <- structure(c(0, 0, 0, 0.4, 1, 0.05, 1, 1, 0, 1, 1, 0, 0.25, 1, 1),
++                 Labels = LETTERS[1:6], Size = 6, call = as.name("manually"),
++                 class = "dist", Diag = FALSE, Upper = FALSE)
+> D6
+     A    B    C    D    E
+B 0.00                    
+C 0.00 0.05               
+D 0.00 1.00 1.00          
+E 0.40 1.00 1.00 0.25     
+F 1.00 0.00 0.00 1.00 1.00
+> kl6 <- c(1,1, 2,2, 3,3)
+> silhouette(kl6, D6)# had one NaN
+     cluster neighbor sil_width
+[1,]       1        2     0.000
+[2,]       1        3     1.000
+[3,]       2        1    -0.975
+[4,]       2        1    -0.500
+[5,]       3        2    -0.375
+[6,]       3        1    -0.500
+attr(,"Ordered")
+[1] FALSE
+attr(,"call")
+silhouette.default(x = kl6, dist = D6)
+attr(,"class")
+[1] "silhouette"
+> summary(silhouette(kl6, D6))
+Silhouette of 6 units in 3 clusters from silhouette.default(x = kl6, dist = D6) :
+ Cluster sizes and average silhouette widths:
+      2       2       2 
+ 0.5000 -0.7375 -0.4375 
+Individual silhouette widths:
+    Min.  1st Qu.   Median     Mean  3rd Qu.     Max. 
+-0.97500 -0.50000 -0.43750 -0.22500 -0.09375  1.00000 
+> plot(silhouette(kl6, D6))# gives error in earlier cluster versions
+> 
+> dev.off()
+pdf 
+  2 
+> 
+> ## Last Line:
+> cat('Time elapsed: ', proc.time() - .proctime00,'\n')
+Time elapsed:  3.453 0.03 3.503 0 0 
+> 
+> 
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/agnes-ex.Rout.save
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/agnes-ex.Rout.save	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/agnes-ex.Rout.save	(revision 2477)
@@ -0,0 +1,787 @@
+
+R version 3.1.2 beta (2014-10-21 r66834) -- "Pumpkin Helmet"
+Copyright (C) 2014 The R Foundation for Statistical Computing
+Platform: x86_64-unknown-linux-gnu (64-bit)
+
+R is free software and comes with ABSOLUTELY NO WARRANTY.
+You are welcome to redistribute it under certain conditions.
+Type 'license()' or 'licence()' for distribution details.
+
+R is a collaborative project with many contributors.
+Type 'contributors()' for more information and
+'citation()' on how to cite R or R packages in publications.
+
+Type 'demo()' for some demos, 'help()' for on-line help, or
+'help.start()' for an HTML browser interface to help.
+Type 'q()' to quit R.
+
+> library(cluster)
+> options(digits = 6)
+> data(votes.repub)
+> 
+> ## From Matrix' test-tools-1.R :
+> showProc.time <- local({ ## function + 'pct' variable
++     pct <- proc.time()
++     function(final="\n") { ## CPU elapsed __since last called__
++ 	ot <- pct ; pct <<- proc.time()
++ 	## 'Time ..' *not* to be translated:  tools::Rdiff() skips its lines!
++ 	cat('Time elapsed: ', (pct - ot)[1:3], final)
++     }
++ })
+> 
+> agn1 <- agnes(votes.repub, metric = "manhattan", stand = TRUE)
+> summary(agn1)
+Object of class 'agnes' from call:
+ agnes(x = votes.repub, metric = "manhattan", stand = TRUE) 
+Agglomerative coefficient:  0.797756 
+Order of objects:
+ [1] Alabama        Georgia        Arkansas       Louisiana      Mississippi   
+ [6] South Carolina Alaska         Vermont        Arizona        Montana       
+[11] Nevada         Colorado       Idaho          Wyoming        Utah          
+[16] California     Oregon         Washington     Minnesota      Connecticut   
+[21] New York       New Jersey     Illinois       Ohio           Indiana       
+[26] Michigan       Pennsylvania   New Hampshire  Wisconsin      Delaware      
+[31] Kentucky       Maryland       Missouri       New Mexico     West Virginia 
+[36] Iowa           South Dakota   North Dakota   Kansas         Nebraska      
+[41] Maine          Massachusetts  Rhode Island   Florida        North Carolina
+[46] Tennessee      Virginia       Oklahoma       Hawaii         Texas         
+Merge:
+      [,1] [,2]
+ [1,]   -7  -32
+ [2,]  -13  -35
+ [3,]  -12  -50
+ [4,]    1  -30
+ [5,]    2  -14
+ [6,]  -26  -28
+ [7,]   -5  -37
+ [8,]  -15  -41
+ [9,]  -22  -38
+[10,]  -25  -31
+[11,]    7  -47
+[12,]  -21  -39
+[13,]  -16  -27
+[14,]    4    5
+[15,]  -42  -46
+[16,]  -20   10
+[17,]   14    9
+[18,]   -3    6
+[19,]   -6    3
+[20,]  -33   15
+[21,]   17  -29
+[22,]  -17   16
+[23,]    8  -34
+[24,]   21  -49
+[25,]   22  -48
+[26,]   -8   25
+[27,]   19  -44
+[28,]   11  -23
+[29,]   28   24
+[30,]  -11  -43
+[31,]   18   27
+[32,]   23   13
+[33,]   29   26
+[34,]   20  -36
+[35,]   -1  -10
+[36,]   32  -19
+[37,]   31   33
+[38,]   -9   34
+[39,]   37   36
+[40,]   35   -4
+[41,]   -2  -45
+[42,]   40  -18
+[43,]  -24  -40
+[44,]   39   12
+[45,]   44   38
+[46,]   41   45
+[47,]   42   43
+[48,]   46   30
+[49,]   47   48
+Height:
+ [1] 27.36345 31.15453 35.61832 51.44421 35.69152 87.45523 31.58222 47.53682
+ [9] 16.34184 11.49397 22.11426 16.35662 10.46294 19.03961 28.41137 11.70132
+[17] 12.72838 19.07671 20.90246  8.38200 11.10094 12.92659  9.23004 11.37867
+[25] 15.97442 12.70819 16.91515 17.74499 24.83533 18.78225 17.03525 15.77893
+[33] 12.71848 18.52818 30.74557 12.55524 17.14634 22.33846 12.80419 27.38835
+[41] 37.23685 12.79160 38.76377 29.38432 16.63215 14.75762 25.59605 53.03627
+[49] 21.07684
+
+1225 dissimilarities, summarized :
+   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
+  8.382  25.540  34.510  45.060  56.020 167.600 
+Metric :  manhattan 
+Number of objects : 50
+
+Available components:
+[1] "order"     "height"    "ac"        "merge"     "diss"      "call"     
+[7] "method"    "order.lab" "data"     
+> Dvr <- daisy(votes.repub)
+> agn2 <- agnes(Dvr, method = "complete")
+> summary(agn2)
+Object of class 'agnes' from call:
+ agnes(x = Dvr, method = "complete") 
+Agglomerative coefficient:  0.88084 
+Order of objects:
+ [1] Alabama        Georgia        Louisiana      Arkansas       Florida       
+ [6] Texas          Mississippi    South Carolina Alaska         Michigan      
+[11] Connecticut    New York       New Hampshire  Indiana        Ohio          
+[16] Illinois       New Jersey     Pennsylvania   Minnesota      North Dakota  
+[21] Wisconsin      Iowa           South Dakota   Kansas         Nebraska      
+[26] Arizona        Nevada         Montana        Oklahoma       Colorado      
+[31] Idaho          Wyoming        Utah           California     Oregon        
+[36] Washington     Missouri       New Mexico     West Virginia  Delaware      
+[41] Kentucky       Maryland       North Carolina Tennessee      Virginia      
+[46] Hawaii         Maine          Massachusetts  Rhode Island   Vermont       
+Merge:
+      [,1] [,2]
+ [1,]  -12  -50
+ [2,]   -7  -32
+ [3,]  -14  -35
+ [4,]  -13  -30
+ [5,]  -25  -31
+ [6,]  -37  -47
+ [7,]  -21  -39
+ [8,]   -3  -28
+ [9,]    4  -38
+[10,]  -16  -27
+[11,]  -15  -41
+[12,]    8  -26
+[13,]   -2  -22
+[14,]  -33  -42
+[15,]   14  -46
+[16,]    1  -44
+[17,]  -11  -19
+[18,]    2  -29
+[19,]   -5    6
+[20,]  -17  -20
+[21,]  -34  -49
+[22,]    5  -48
+[23,]   18    3
+[24,]   11   10
+[25,]   23    9
+[26,]  -23   21
+[27,]   -8   20
+[28,]   12  -36
+[29,]   -6   16
+[30,]   13   25
+[31,]   28   29
+[32,]   -1  -10
+[33,]   19   22
+[34,]   17    7
+[35,]   -4   -9
+[36,]   30   26
+[37,]   35  -43
+[38,]   32  -18
+[39,]  -24  -40
+[40,]   36   24
+[41,]   27   15
+[42,]   31   33
+[43,]   38   37
+[44,]   40   42
+[45,]   34  -45
+[46,]   43   39
+[47,]   44   41
+[48,]   47   45
+[49,]   46   48
+Height:
+ [1]  48.2397  60.8984  72.9221  56.1363  58.8227 116.7048  63.0951 281.9508
+ [9]  28.1437  47.1690  19.4218  32.9438  36.7643  20.2258  39.1728  20.8792
+[17]  25.3229  56.3813  42.2230  33.6978  64.5254  26.1547  37.4564  25.9221
+[25]  80.4894  23.4206  27.8273  43.4492  48.0483  43.7055  17.1992  31.1988
+[33]  70.4868  33.2328  22.1831  54.3057  21.1413  35.1129 121.4022  43.3829
+[41]  33.4744  66.7591  29.5099  30.1541 178.4119  32.7611  55.3633  22.6334
+[49]  83.1040
+
+1225 dissimilarities, summarized :
+   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
+  17.20   48.34   64.68   82.23  105.50  282.00 
+Metric :  euclidean 
+Number of objects : 50
+
+Available components:
+[1] "order"     "height"    "ac"        "merge"     "diss"      "call"     
+[7] "method"    "order.lab"
+> ## almost same:
+> (ag2. <- agnes(Dvr, method= "complete", keep.diss=FALSE))
+Call:	 agnes(x = Dvr, method = "complete", keep.diss = FALSE) 
+Agglomerative coefficient:  0.88084 
+Order of objects:
+ [1] Alabama        Georgia        Louisiana      Arkansas       Florida       
+ [6] Texas          Mississippi    South Carolina Alaska         Michigan      
+[11] Connecticut    New York       New Hampshire  Indiana        Ohio          
+[16] Illinois       New Jersey     Pennsylvania   Minnesota      North Dakota  
+[21] Wisconsin      Iowa           South Dakota   Kansas         Nebraska      
+[26] Arizona        Nevada         Montana        Oklahoma       Colorado      
+[31] Idaho          Wyoming        Utah           California     Oregon        
+[36] Washington     Missouri       New Mexico     West Virginia  Delaware      
+[41] Kentucky       Maryland       North Carolina Tennessee      Virginia      
+[46] Hawaii         Maine          Massachusetts  Rhode Island   Vermont       
+Height (summary):
+   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
+   17.2    28.1    39.2    52.3    58.8   282.0 
+
+Available components:
+[1] "order"     "height"    "ac"        "merge"     "diss"      "call"     
+[7] "method"    "order.lab"
+> ag22  <- agnes(votes.repub, method= "complete", keep.diss=FALSE,keep.data=FALSE)
+> stopifnot(identical(agn2[-5:-6], ag2.[-5:-6]),
++           identical(Dvr, daisy(votes.repub)), # DUP=FALSE (!)
++           identical(ag2.[-6], ag22[-6])
++          )
+> 
+> data(agriculture)
+> summary(agnes(agriculture))
+Object of class 'agnes' from call:
+ agnes(x = agriculture) 
+Agglomerative coefficient:  0.781893 
+Order of objects:
+ [1] B   NL  D   F   UK  DK  L   I   GR  P   E   IRL
+Merge:
+      [,1] [,2]
+ [1,]   -1  -10
+ [2,]   -2   -9
+ [3,]    1   -3
+ [4,]    3   -6
+ [5,]   -5   -7
+ [6,]    4  -12
+ [7,]    6    2
+ [8,]   -4  -11
+ [9,]    7   -8
+[10,]    8    5
+[11,]    9   10
+Height:
+ [1]  1.64924  2.24836  2.76918  4.02677  4.78835  2.22036  5.29409 14.77963
+ [9]  5.16236  8.55075  3.14006
+
+66 dissimilarities, summarized :
+   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
+  1.649   4.357   7.987   9.594  13.250  24.040 
+Metric :  euclidean 
+Number of objects : 12
+
+Available components:
+[1] "order"     "height"    "ac"        "merge"     "diss"      "call"     
+[7] "method"    "order.lab" "data"     
+> 
+> data(ruspini)
+> summary(ar0 <- agnes(ruspini, keep.diss=FALSE, keep.data=FALSE))
+Object of class 'agnes' from call:
+ agnes(x = ruspini, keep.diss = FALSE, keep.data = FALSE) 
+Agglomerative coefficient:  0.947954 
+Order of objects:
+ [1] 1  2  3  5  4  6  8  7  9  10 14 15 17 16 18 19 11 12 13 20 61 62 66 63 64
+[26] 68 65 67 69 70 71 72 75 73 74 21 22 23 24 27 28 29 30 25 26 32 35 31 36 39
+[51] 40 33 34 37 38 41 42 43 44 45 49 51 53 50 54 52 55 56 57 59 60 58 46 47 48
+Merge:
+      [,1] [,2]
+ [1,]  -18  -19
+ [2,]  -55  -56
+ [3,]  -27  -28
+ [4,]  -49  -51
+ [5,]  -33  -34
+ [6,]  -23  -24
+ [7,]  -67  -69
+ [8,]  -59  -60
+ [9,]  -29  -30
+[10,]  -36  -39
+[11,]  -32  -35
+[12,]  -50  -54
+[13,]  -25  -26
+[14,]  -16    1
+[15,]  -70  -71
+[16,]  -64  -68
+[17,]  -37  -38
+[18,]   12  -52
+[19,]  -62  -66
+[20,]  -12  -13
+[21,]   -9  -10
+[22,]  -42  -43
+[23,]  -15  -17
+[24,]  -47  -48
+[25,]  -21  -22
+[26,]    7   15
+[27,]    2  -57
+[28,]    4  -53
+[29,]   10  -40
+[30,]    3    9
+[31,]  -73  -74
+[32,]  -72  -75
+[33,]  -11   20
+[34,]   13   11
+[35,]   -6   -8
+[36,]  -14   23
+[37,]   -2   -3
+[38,]  -65   26
+[39,]    5   17
+[40,]   25    6
+[41,]   36   14
+[42,]   34  -31
+[43,]   -4   35
+[44,]   28   18
+[45,]   27    8
+[46,]   19  -63
+[47,]  -46   24
+[48,]   -1   37
+[49,]   16   38
+[50,]   40   30
+[51,]   42   29
+[52,]   33  -20
+[53,]   49   32
+[54,]   51   39
+[55,]   21   41
+[56,]   48   -5
+[57,]   45  -58
+[58,]   53   31
+[59,]   43   -7
+[60,]   50   54
+[61,]   44   57
+[62,]  -41   22
+[63,]  -61   46
+[64,]   55   52
+[65,]   63   58
+[66,]  -44  -45
+[67,]   59   64
+[68,]   56   67
+[69,]   66   61
+[70,]   60   62
+[71,]   69   47
+[72,]   70   71
+[73,]   68   65
+[74,]   73   72
+Height:
+ [1]   9.26758   6.40312  12.13789  22.37868   7.63441   6.32456  14.58991
+ [8]  21.63544   4.12311  12.07902   6.36396   4.24264   7.23741   3.56155
+[15]   1.41421  16.38921   5.85486   4.12311  10.69547  67.75052  15.48443
+[22]   4.12311   8.94386  17.00500   3.60555   9.53375   6.46443   2.82843
+[29]   4.48680   3.60555  10.91541   5.83095  14.34411   5.65685 101.14200
+[36]   4.47214   6.98022   2.23607   9.56136   2.00000   5.61339   2.82843
+[43]  14.95692   3.16228   6.19728   3.00000   7.28356   9.97147   3.00000
+[50]   5.47542  11.07404   2.23607   6.60456   3.60555  24.90532  15.45463
+[57]   4.24264  64.42555  17.02939  22.56493   2.23607   5.22383   8.28122
+[64]   3.16228   3.81721  15.20808   2.00000   5.19258   8.51123   2.82843
+[71]  12.62990  34.72475   9.14005   4.47214
+
+Available components:
+[1] "order"     "height"    "ac"        "merge"     "diss"      "call"     
+[7] "method"    "order.lab"
+> summary(ar1 <- agnes(ruspini, metric = "manhattan"))
+Object of class 'agnes' from call:
+ agnes(x = ruspini, metric = "manhattan") 
+Agglomerative coefficient:  0.946667 
+Order of objects:
+ [1] 1  2  3  5  4  6  8  7  9  10 14 16 18 19 15 17 11 12 13 20 61 62 66 63 73
+[26] 74 64 68 65 67 69 70 71 72 75 21 22 23 24 27 28 29 30 25 26 32 35 31 36 39
+[51] 40 33 34 37 38 41 42 43 44 45 49 51 53 50 54 52 55 56 57 59 60 58 46 47 48
+Merge:
+      [,1] [,2]
+ [1,]  -55  -56
+ [2,]  -27  -28
+ [3,]  -18  -19
+ [4,]  -49  -51
+ [5,]  -36  -39
+ [6,]  -33  -34
+ [7,]  -32  -35
+ [8,]  -23  -24
+ [9,]  -67  -69
+[10,]  -59  -60
+[11,]  -50  -54
+[12,]  -29  -30
+[13,]  -25  -26
+[14,]  -16    3
+[15,]  -70  -71
+[16,]  -64  -68
+[17,]  -62  -66
+[18,]   11  -52
+[19,]  -37  -38
+[20,]  -12  -13
+[21,]   -9  -10
+[22,]    9   15
+[23,]    1  -57
+[24,]  -47  -48
+[25,]  -42  -43
+[26,]  -21  -22
+[27,]  -15  -17
+[28,]    4  -53
+[29,]    2   12
+[30,]    5  -40
+[31,]    6   19
+[32,]   13    7
+[33,]  -11   20
+[34,]  -73  -74
+[35,]  -72  -75
+[36,]   -6   -8
+[37,]  -65   22
+[38,]  -14   14
+[39,]   -2   -3
+[40,]   32  -31
+[41,]   38   27
+[42,]   26    8
+[43,]   28   18
+[44,]  -46   24
+[45,]   -4   36
+[46,]   23   10
+[47,]   -1   39
+[48,]   42   29
+[49,]   33  -20
+[50,]   37   35
+[51,]   40   30
+[52,]   17  -63
+[53,]   16   50
+[54,]   51   31
+[55,]   46  -58
+[56,]   21   41
+[57,]   47   -5
+[58,]   45   -7
+[59,]   52   34
+[60,]  -44  -45
+[61,]   48   54
+[62,]   43   55
+[63,]   59   53
+[64,]   56   49
+[65,]  -41   25
+[66,]  -61   63
+[67,]   57   58
+[68,]   67   64
+[69,]   60   62
+[70,]   61   65
+[71,]   69   44
+[72,]   70   71
+[73,]   68   66
+[74,]   73   72
+Height:
+ [1]  11.50000   9.00000  16.00000  26.25000  10.00000   8.00000  16.66667
+ [8]  28.70833   5.00000  15.50000   8.66667   4.00000   2.00000   9.25000
+[15]   6.00000  20.50000   7.50000   5.00000  12.33333  94.33333  22.78571
+[22]   5.00000  12.50000  18.00000   8.00000  20.20000   5.00000  13.78571
+[29]   8.25000   4.00000   5.50000   5.00000  12.40000   8.00000 125.71357
+[36]   6.00000   9.50000   3.00000  11.87500   2.00000   7.00000   4.00000
+[43]  18.72917   4.00000   7.50000   3.00000   9.25000  12.40000   3.00000
+[50]   7.50000  14.43750   3.00000   7.50000   5.00000  32.38333  21.00000
+[57]   6.00000  85.49616  18.00000  28.75000   3.00000   6.50000   9.55556
+[64]   4.00000   5.00000  19.61111   2.00000   6.00000  11.00000   4.00000
+[71]  15.40000  47.02381  10.00000   6.00000
+
+2775 dissimilarities, summarized :
+   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
+   2.00   52.50   97.00   90.95  128.00  187.00 
+Metric :  manhattan 
+Number of objects : 75
+
+Available components:
+[1] "order"     "height"    "ac"        "merge"     "diss"      "call"     
+[7] "method"    "order.lab" "data"     
+> str(ar1)
+List of 9
+ $ order    : int [1:75] 1 2 3 5 4 6 8 7 9 10 ...
+ $ height   : num [1:74] 11.5 9 16 26.2 10 ...
+ $ ac       : num 0.947
+ $ merge    : int [1:74, 1:2] -55 -27 -18 -49 -36 -33 -32 -23 -67 -59 ...
+ $ diss     :Classes 'dissimilarity', 'dist'  atomic [1:2775] 11 12 29 13 25 43 33 22 27 39 ...
+  .. ..- attr(*, "Size")= int 75
+  .. ..- attr(*, "Metric")= chr "manhattan"
+  .. ..- attr(*, "Labels")= chr [1:75] "1" "2" "3" "4" ...
+ $ call     : language agnes(x = ruspini, metric = "manhattan")
+ $ method   : chr "average"
+ $ order.lab: chr [1:75] "1" "2" "3" "5" ...
+ $ data     : num [1:75, 1:2] 4 5 10 9 13 13 12 15 18 19 ...
+  ..- attr(*, "dimnames")=List of 2
+  .. ..$ : chr [1:75] "1" "2" "3" "4" ...
+  .. ..$ : chr [1:2] "x" "y"
+ - attr(*, "class")= chr [1:2] "agnes" "twins"
+> 
+> showProc.time()
+Time elapsed:  0.049 0.001 0.05 
+> 
+> summary(ar2 <- agnes(ruspini, metric="manhattan", method = "weighted"))
+Object of class 'agnes' from call:
+ agnes(x = ruspini, metric = "manhattan", method = "weighted") 
+Agglomerative coefficient:  0.942387 
+Order of objects:
+ [1] 1  2  3  5  9  10 14 16 18 19 15 17 4  6  8  7  11 12 13 20 61 64 68 65 67
+[26] 69 70 71 62 66 63 72 75 73 74 21 22 23 24 27 28 29 30 25 26 32 35 31 36 39
+[51] 40 33 34 37 38 41 42 43 44 45 49 51 53 50 54 52 55 56 57 59 60 58 46 47 48
+Merge:
+      [,1] [,2]
+ [1,]  -55  -56
+ [2,]  -27  -28
+ [3,]  -18  -19
+ [4,]  -49  -51
+ [5,]  -36  -39
+ [6,]  -33  -34
+ [7,]  -32  -35
+ [8,]  -23  -24
+ [9,]  -67  -69
+[10,]  -59  -60
+[11,]  -50  -54
+[12,]  -29  -30
+[13,]  -25  -26
+[14,]  -16    3
+[15,]  -70  -71
+[16,]  -64  -68
+[17,]  -62  -66
+[18,]   11  -52
+[19,]  -37  -38
+[20,]  -12  -13
+[21,]   -9  -10
+[22,]    9   15
+[23,]    1  -57
+[24,]  -47  -48
+[25,]  -42  -43
+[26,]  -21  -22
+[27,]  -15  -17
+[28,]    4  -53
+[29,]    2   12
+[30,]    5  -40
+[31,]    6   19
+[32,]   13    7
+[33,]  -11   20
+[34,]  -73  -74
+[35,]  -72  -75
+[36,]  -14   14
+[37,]   -6   -8
+[38,]  -65   22
+[39,]   36   27
+[40,]   -2   -3
+[41,]   32  -31
+[42,]   28   18
+[43,]   26    8
+[44,]  -46   24
+[45,]   -4   37
+[46,]   23   10
+[47,]   -1   40
+[48,]   16   38
+[49,]   43   29
+[50,]   17  -63
+[51,]   41   30
+[52,]   33  -20
+[53,]   35   34
+[54,]   46  -58
+[55,]   47   -5
+[56,]   51   31
+[57,]   21   39
+[58,]   45   -7
+[59,]  -44  -45
+[60,]  -61   48
+[61,]   42   54
+[62,]   49   56
+[63,]  -41   25
+[64,]   55   57
+[65,]   60   50
+[66,]   65   53
+[67,]   58   52
+[68,]   59   61
+[69,]   64   67
+[70,]   62   63
+[71,]   68   44
+[72,]   70   71
+[73,]   69   66
+[74,]   73   72
+Height:
+ [1]  11.5000   9.0000  15.2500  21.7734   5.0000  15.8750   8.0000   4.0000
+ [9]   2.0000   9.0000   6.0000  32.1172  10.0000   8.0000  16.0000  27.9062
+[17]   7.5000   5.0000  13.2500  97.9766  18.3125   5.0000  11.8750   8.2500
+[25]   4.0000   5.5000   5.0000  22.3438   5.0000  12.5000  23.7812   8.0000
+[33]  14.5000   8.0000 114.9764   6.0000   9.5000   3.0000  11.8750   2.0000
+[41]   7.0000   4.0000  20.2031   4.0000   7.5000   3.0000   9.2500  12.6250
+[49]   3.0000   7.5000  15.6875   3.0000   7.5000   5.0000  33.5469  21.0000
+[57]   6.0000  69.4453  18.0000  28.4375   3.0000   6.5000   9.5000   4.0000
+[65]   5.0000  19.1250   2.0000   6.0000  10.5000   4.0000  15.0000  41.5312
+[73]  10.0000   6.0000
+
+2775 dissimilarities, summarized :
+   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
+   2.00   52.50   97.00   90.95  128.00  187.00 
+Metric :  manhattan 
+Number of objects : 75
+
+Available components:
+[1] "order"     "height"    "ac"        "merge"     "diss"      "call"     
+[7] "method"    "order.lab" "data"     
+> print  (ar3 <- agnes(ruspini, metric="manhattan", method = "flexible",
++                      par.meth = 0.5))
+Call:	 agnes(x = ruspini, metric = "manhattan", method = "flexible",      par.method = 0.5) 
+Agglomerative coefficient:  0.942387 
+Order of objects:
+ [1] 1  2  3  5  9  10 14 16 18 19 15 17 4  6  8  7  11 12 13 20 61 64 68 65 67
+[26] 69 70 71 62 66 63 72 75 73 74 21 22 23 24 27 28 29 30 25 26 32 35 31 36 39
+[51] 40 33 34 37 38 41 42 43 44 45 49 51 53 50 54 52 55 56 57 59 60 58 46 47 48
+Height (summary):
+   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
+   2.00    5.00    8.12   14.20   15.60  115.00 
+
+Available components:
+[1] "order"     "height"    "ac"        "merge"     "diss"      "call"     
+[7] "method"    "order.lab" "data"     
+> stopifnot(all.equal(ar2[1:4], ar3[1:4], tol=1e-12))
+> 
+> showProc.time()
+Time elapsed:  0.006 0 0.006 
+> 
+> ## Small example, testing "flexible" vs "single"
+> i8 <- -c(1:2, 9:10)
+> dim(agr8 <- agriculture[i8, ])
+[1] 8 2
+> i5 <- -c(1:2, 8:12)
+> dim(agr5 <- agriculture[i5, ])
+[1] 5 2
+> 
+> 
+> chk <- function(d, method=c("single", "complete", "weighted"),
++                 trace.lev = 1,
++                 iC = -(6:7), # <- not using 'call' and 'method' for comparisons
++                 doplot = FALSE, tol = 1e-12)
++ {
++     if(!inherits(d, "dist")) d <- daisy(d, "manhattan")
++     method <- match.arg(method)
++     par.meth <- list("single" =  c(.5, .5, 0, -.5),
++                      "complete"= c(.5, .5, 0, +.5),
++                      "weighted"= c(0.5))
++     a.s <- agnes(d, method=method, trace.lev=trace.lev)
++     ## From theory, this should give the same, but it does not --- why ???
++     a.f <- agnes(d, method="flex", par.method = par.meth[[method]], trace.lev=trace.lev)
++ 
++     if(doplot) {
++ 	op <- par(mfrow = c(2,2), mgp = c(1.6, 0.6, 0), mar = .1 + c(4,4,2,1))
++         on.exit(par(op))
++         plot(a.s)
++         plot(a.f)
++     }
++     structure(all.equal(a.s[iC], a.f[iC], tolerance = tol),
++               fits = list(s = a.s, f = a.f))
++ }
+> 
+> chk(agr5, trace = 3)
+C agnes(n=5, method = 2, ..): 4 merging steps
+ nmerge=0, j=2, d_min = D(1,4) = 3.40000;  -> (-1,-4); last=4; upd(n,b);
+ old D(A, j), D(B, j), j=2  = (31.5,28.1);  new D(A', 2) = 28.1
+ old D(A, j), D(B, j), j=3  = (14.7,11.3);  new D(A', 3) = 11.3
+ old D(A, j), D(B, j), j=5  = (18.3,14.9);  new D(A', 5) = 14.9
+ -->  size(A_new)= 2
+ nmerge=1, j=2, d_min = D(3,5) = 3.60000;  -> (-3,-5); last=5;
+ old D(A, j), D(B, j), j=1  = (11.3,14.9);  new D(A', 1) = 11.3
+ old D(A, j), D(B, j), j=2  = (16.8,13.2);  new D(A', 2) = 13.2
+ -->  size(A_new)= 2
+ nmerge=2, j=2, d_min = D(1,3) = 11.3000;  -> (1,2); last=4; upd(n,b);
+ old D(A, j), D(B, j), j=2  = (28.1,13.2);  new D(A', 2) = 13.2
+ -->  size(A_new)= 4
+ nmerge=3, j=2, d_min = D(1,2) = 13.2000;  -> (3,-2); last=5;
+ -->  size(A_new)= 5
+C agnes(n=5, method = 6, ..): |par| = 4, alpha[1:4] = (0.5,0.5,0,-0.5); 4 merging steps
+ nmerge=0, j=2, d_min = D(1,4) = 3.40000;  -> (-1,-4); last=4; upd(n,b);
+ old D(A, j), D(B, j), j=2  = (31.5,28.1);  new D(A', 2) = 28.1
+ old D(A, j), D(B, j), j=3  = (14.7,11.3);  new D(A', 3) = 11.3
+ old D(A, j), D(B, j), j=5  = (18.3,14.9);  new D(A', 5) = 14.9
+ -->  size(A_new)= 2
+ nmerge=1, j=2, d_min = D(3,5) = 3.60000;  -> (-3,-5); last=5;
+ old D(A, j), D(B, j), j=1  = (11.3,14.9);  new D(A', 1) = 11.3
+ old D(A, j), D(B, j), j=2  = (16.8,13.2);  new D(A', 2) = 13.2
+ -->  size(A_new)= 2
+ nmerge=2, j=2, d_min = D(1,3) = 11.3000;  -> (1,2); last=4; upd(n,b);
+ old D(A, j), D(B, j), j=2  = (28.1,13.2);  new D(A', 2) = 13.2
+ -->  size(A_new)= 4
+ nmerge=3, j=2, d_min = D(1,2) = 13.2000;  -> (3,-2); last=5;
+ -->  size(A_new)= 5
+[1] TRUE
+attr(,"fits")
+attr(,"fits")$s
+Call:	 agnes(x = d, method = method, trace.lev = trace.lev) 
+Agglomerative coefficient:  0.587879 
+Order of objects:
+[1] D   F   E   IRL GR 
+Height (summary):
+   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
+   3.40    3.55    7.45    7.88   11.80   13.20 
+
+Available components:
+[1] "order"     "height"    "ac"        "merge"     "diss"      "call"     
+[7] "method"    "order.lab"
+
+attr(,"fits")$f
+Call:	 agnes(x = d, method = "flex", par.method = par.meth[[method]],      trace.lev = trace.lev) 
+Agglomerative coefficient:  0.587879 
+Order of objects:
+[1] D   F   E   IRL GR 
+Height (summary):
+   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
+   3.40    3.55    7.45    7.87   11.80   13.20 
+
+Available components:
+[1] "order"     "height"    "ac"        "merge"     "diss"      "call"     
+[7] "method"    "order.lab"
+
+> 
+> stopifnot(chk(agr5), chk(agr5, "complete", trace = 2), chk(agr5, "weighted"),
++           chk(agr8), chk(agr8, "complete"), chk(agr8, "weighted", trace.lev=2),
++           chk(agriculture), chk(agriculture, "complete"),
++           chk(ruspini), chk(ruspini, "complete"), chk(ruspini, "weighted"))
+C agnes(n=5, method = 2, ..): 4 merging steps
+C agnes(n=5, method = 6, ..): |par| = 4, alpha[1:4] = (0.5,0.5,0,-0.5); 4 merging steps
+C agnes(n=5, method = 3, ..): 4 merging steps
+ nmerge=0, j=2, d_min = D(1,4) = 3.40000; last=4; upd(n,b); size(A_new)= 2
+ nmerge=1, j=2, d_min = D(3,5) = 3.60000; last=5; size(A_new)= 2
+ nmerge=2, j=2, d_min = D(2,3) = 16.8000; last=4; size(A_new)= 3
+ nmerge=3, j=2, d_min = D(1,2) = 31.5000; last=3; size(A_new)= 5
+C agnes(n=5, method = 6, ..): |par| = 4, alpha[1:4] = (0.5,0.5,0,0.5); 4 merging steps
+ nmerge=0, j=2, d_min = D(1,4) = 3.40000; last=4; upd(n,b); size(A_new)= 2
+ nmerge=1, j=2, d_min = D(3,5) = 3.60000; last=5; size(A_new)= 2
+ nmerge=2, j=2, d_min = D(2,3) = 16.8000; last=4; size(A_new)= 3
+ nmerge=3, j=2, d_min = D(1,2) = 31.5000; last=3; size(A_new)= 5
+C agnes(n=5, method = 5, ..): 4 merging steps
+C agnes(n=5, method = 6, ..): 4 merging steps
+C agnes(n=8, method = 2, ..): 7 merging steps
+C agnes(n=8, method = 6, ..): |par| = 4, alpha[1:4] = (0.5,0.5,0,-0.5); 7 merging steps
+C agnes(n=8, method = 3, ..): 7 merging steps
+C agnes(n=8, method = 6, ..): |par| = 4, alpha[1:4] = (0.5,0.5,0,0.5); 7 merging steps
+C agnes(n=8, method = 5, ..): 7 merging steps
+ nmerge=0, j=2, d_min = D(1,4) = 3.40000; last=4; upd(n,b); size(A_new)= 2
+ nmerge=1, j=2, d_min = D(3,5) = 3.60000; last=5; size(A_new)= 2
+ nmerge=2, j=2, d_min = D(1,6) = 5.40000; last=6; upd(n,b); size(A_new)= 3
+ nmerge=3, j=2, d_min = D(2,7) = 6.70000; last=7; upd(n,b); size(A_new)= 2
+ nmerge=4, j=2, d_min = D(1,8) = 7.75000; last=8; upd(n,b); size(A_new)= 4
+ nmerge=5, j=2, d_min = D(2,3) = 11.6500; last=7; size(A_new)= 4
+ nmerge=6, j=2, d_min = D(1,2) = 18.3750; last=5; size(A_new)= 8
+C agnes(n=8, method = 6, ..): 7 merging steps
+ nmerge=0, j=2, d_min = D(1,4) = 3.40000; last=4; upd(n,b); size(A_new)= 2
+ nmerge=1, j=2, d_min = D(3,5) = 3.60000; last=5; size(A_new)= 2
+ nmerge=2, j=2, d_min = D(1,6) = 5.40000; last=6; upd(n,b); size(A_new)= 3
+ nmerge=3, j=2, d_min = D(2,7) = 6.70000; last=7; upd(n,b); size(A_new)= 2
+ nmerge=4, j=2, d_min = D(1,8) = 7.75000; last=8; upd(n,b); size(A_new)= 4
+ nmerge=5, j=2, d_min = D(2,3) = 11.6500; last=7; size(A_new)= 4
+ nmerge=6, j=2, d_min = D(1,2) = 18.3750; last=5; size(A_new)= 8
+C agnes(n=12, method = 2, ..): 11 merging steps
+C agnes(n=12, method = 6, ..): |par| = 4, alpha[1:4] = (0.5,0.5,0,-0.5); 11 merging steps
+C agnes(n=12, method = 3, ..): 11 merging steps
+C agnes(n=12, method = 6, ..): |par| = 4, alpha[1:4] = (0.5,0.5,0,0.5); 11 merging steps
+C agnes(n=75, method = 2, ..): 74 merging steps
+C agnes(n=75, method = 6, ..): |par| = 4, alpha[1:4] = (0.5,0.5,0,-0.5); 74 merging steps
+C agnes(n=75, method = 3, ..): 74 merging steps
+C agnes(n=75, method = 6, ..): |par| = 4, alpha[1:4] = (0.5,0.5,0,0.5); 74 merging steps
+C agnes(n=75, method = 5, ..): 74 merging steps
+C agnes(n=75, method = 6, ..): 74 merging steps
+> 
+> showProc.time()
+Time elapsed:  0.038 0.001 0.039 
+> 
+> ## an invalid "flexible" case - now must give error early:
+> x <- rbind(c( -6, -9), c(  0, 13),
++            c(-15,  6), c(-14,  0), c(12,-10))
+> (dx <- daisy(x, "manhattan"))
+Dissimilarities :
+   1  2  3  4
+2 28         
+3 24 22      
+4 17 27  7   
+5 19 35 43 36
+
+Metric :  manhattan 
+Number of objects : 5
+> a.x <- tryCatch(agnes(dx, method="flexible", par = -.2),
++                 error = function(e)e)
+> ##  agnes(method=6, par.method=*) lead to invalid merge; step 4, D(.,.)=-26.1216
+> if(!inherits(a.x, "error")) stop("invalid 'par' in \"flexible\" did not give error")
+> if(!all(vapply(c("par[.]method", "merge"), grepl, NA, x=a.x$message)))
++    stop("error message did not contain expected words")
+> 
+> 
+> proc.time()
+   user  system elapsed 
+  0.243   0.013   0.311 
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/clara-ex.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/clara-ex.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/clara-ex.R	(revision 2477)
@@ -0,0 +1,36 @@
+#### These are *NOT* compared with output in the released version of
+###  'cluster'  currently
+
+library(cluster)
+
+data(xclara)
+## Try 100 times *different* random samples -- for reliability:
+nSim <- 100
+nCl <- 3 # = no.classes
+## unknown problem: this is still platform dependent to some extent:
+
+set.seed(107)# (reproducibility; somewhat favorable with "small iDoubt")
+cl <- replicate(nSim, clara(xclara, nCl, rngR = TRUE)$cluster)
+tcl <- apply(cl,1, tabulate, nbins = nCl)
+## those that are not always in same cluster (5 out of 3000 for this seed):
+(iDoubt <- which(apply(tcl,2, function(n) all(n < nSim))))
+
+if(FALSE) {# doExtras --
+rrr <- lapply(1:128, function(iseed) {
+    set.seed(iseed)# (reproducibility; somewhat favorable with "small iDoubt")
+    cat(iseed, if(iseed %% 10 == 0)"\n")
+    cl <- replicate(nSim, clara(xclara, nCl, rngR = TRUE)$cluster)
+    tcl <- apply(cl,1, tabulate, nbins = nCl)
+    which(apply(tcl,2, function(n) all(n < nSim)))
+})
+## compare with "true" -- are the "changers" only those with small sil.width?
+
+print(system.time(px <- pam(xclara,3)))# 1.84 on lynne(2013)
+}## doExtras
+
+
+if(length(iDoubt)) { # (not for all seeds)
+  tabD <- tcl[,iDoubt, drop=FALSE]
+  dimnames(tabD) <- list(cluster = paste(1:nCl), obs = format(iDoubt))
+  t(tabD) # how many times in which clusters
+}
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/sweep-ex.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/sweep-ex.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/sweep-ex.R	(revision 2477)
@@ -0,0 +1,69 @@
+#### NOT part of the cluster package!
+
+#### Find out what exactly sweep() in ../src/spannel.f is doing
+#### in order to eventually replace it with BLAS calls !
+
+### subroutine sweep (cov,nord,ixlo,nel,deter)
+###            ===============================
+### is called only once as
+###	call sweep(cov,ndep,0,i,deter)
+### where  i in 0:ndep
+
+sweep1 <- function(cov, i, det = 1)
+{
+  ## Purpose:
+  ## -------------------------------------------------------------------------
+  ## Arguments:
+  ## -------------------------------------------------------------------------
+  ## Author: Martin Maechler, Date: 22 Jan 2002, 08:58
+    if(!is.matrix(cov) || 0 != diff(D <- dim(cov)))
+        stop("'cov' must be a square matrix")
+    if((nord <- as.integer(D[1] - 1)) < 1)## cov[0:nord, 0:nord]
+        stop("'cov' must be at least 2 x 2")
+    if(0 > (i <- as.integer(i)) || i > nord)
+        stop("'i' must be in 0:nord, where nord = nrow(cov)-1")
+    storage.mode(cov) <- "double"
+    .C(cluster:::cl_sweep,
+       cov,
+       nord,
+       ixlo = 0:0,
+       i = i,
+       deter=det)
+}
+
+sweepAll <- function(cov, det = 1)
+{
+  ## Purpose:
+  ## -------------------------------------------------------------------------
+  ## Arguments:
+  ## -------------------------------------------------------------------------
+  ## Author: Martin Maechler, Date: 22 Jan 2002, 08:58
+    if(!is.matrix(cov) || 0 != diff(D <- dim(cov)))
+        stop("'cov' must be a square matrix")
+    if((nord <- as.integer(D[1] - 1)) < 1)## cov[0:nord, 0:nord]
+        stop("'cov' must be at least 2 x 2")
+    storage.mode(cov) <- "double"
+    for(i in 0:nord) {
+	.C(cluster:::cl_sweep,
+	   cov,
+	   nord,
+	   ixlo = 0:0,
+	   i = i,
+	   deter = det,
+	   DUP = FALSE) # i.e. work on 'cov' and 'det' directly
+        if(det <= 0)
+            cat("** i = ", i, "; deter = ", format(det)," <= 0\n",sep="")
+    }
+    list(cov = cov, deter = det)
+}
+
+require(cluster)
+
+## Examples with errors
+m1 <- cov(cbind(1, 1:5))
+try(sweepAll(m1))# deter = 0; cov[2,2] = Inf
+
+## ok
+(m2 <- cov(cbind(1:5, c(2:5,1), c(4:2,2,6))))
+qr(m2, tol = .001)$rank
+sweepAll(m2) ## deter = 0
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/ellipsoid-ex.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/ellipsoid-ex.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/ellipsoid-ex.R	(revision 2477)
@@ -0,0 +1,27 @@
+library(cluster)
+
+eh <- ellipsoidhull(cbind(x=1:4, y = 1:4)) #singular
+eh ## center ok, shape "0 volume" --> Warning
+
+set.seed(157)
+for(n in 4:10) { ## n=2 and 3 still differ -- platform dependently!
+    cat("n = ",n,"\n")
+    x2 <- rnorm(n)
+    print(ellipsoidhull(cbind(1:n, x2)))
+    print(ellipsoidhull(cbind(1:n, x2, 4*x2 + rnorm(n))))
+}
+
+set.seed(1)
+x <- rt(100, df = 4)
+y <- 100 + 5 * x + rnorm(100)
+ellipsoidhull(cbind(x,y))
+z <- 10  - 8 * x + y + rnorm(100)
+(e3 <- ellipsoidhull(cbind(x,y,z)))
+d3o <- cbind(x,y + rt(100,3), 2 * x^2 + rt(100, 2))
+(e. <- ellipsoidhull(d3o, ret.sq = TRUE))
+stopifnot(all.equal(e.$sqdist,
+		    with(e., mahalanobis(d3o, center=loc, cov=cov)),
+		    tol = 1e-13))
+d5 <- cbind(d3o, 2*abs(y)^1.5 + rt(100,3), 3*x - sqrt(abs(y)))
+(e5 <- ellipsoidhull(d5, ret.sq = TRUE))
+tail(sort(e5$sqdist)) ## 4 values 5.00039 ... 5.0099
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/clusplot-out.Rout.save
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/clusplot-out.Rout.save	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/clusplot-out.Rout.save	(revision 2477)
@@ -0,0 +1,121 @@
+
+R version 2.12.0 Patched (2010-10-19 r53372)
+Copyright (C) 2010 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+Platform: i686-pc-linux-gnu (32-bit)
+
+R is free software and comes with ABSOLUTELY NO WARRANTY.
+You are welcome to redistribute it under certain conditions.
+Type 'license()' or 'licence()' for distribution details.
+
+R is a collaborative project with many contributors.
+Type 'contributors()' for more information and
+'citation()' on how to cite R or R packages in publications.
+
+Type 'demo()' for some demos, 'help()' for on-line help, or
+'help.start()' for an HTML browser interface to help.
+Type 'q()' to quit R.
+
+> library(cluster)
+> 
+> ### clusplot() & pam() RESULT checking ...
+> 
+> ## plotting votes.diss(dissimilarity) in a bivariate plot and
+> ## partitioning into 2 clusters
+> data(votes.repub)
+> votes.diss <- daisy(votes.repub)
+> for(k in 2:4) {
++     votes.clus <- pam(votes.diss, k, diss = TRUE)$clustering
++     print(clusplot(votes.diss, votes.clus, diss = TRUE, shade = TRUE))
++ }
+$Distances
+         [,1]     [,2]
+[1,]   0.0000 154.8601
+[2,] 154.8601   0.0000
+
+$Shading
+[1] 22.12103 20.87897
+
+$Distances
+         [,1] [,2]     [,3]
+[1,]   0.0000   NA 140.8008
+[2,]       NA    0       NA
+[3,] 140.8008   NA   0.0000
+
+$Shading
+[1] 25.602967  5.292663 15.104370
+
+$Distances
+         [,1] [,2]     [,3]     [,4]
+[1,]   0.0000   NA 117.2287 280.7259
+[2,]       NA    0       NA       NA
+[3,] 117.2287   NA   0.0000       NA
+[4,] 280.7259   NA       NA   0.0000
+
+$Shading
+[1] 15.431339  3.980743 10.145454 19.442464
+
+> 
+> ## plotting iris (dataframe) in a 2-dimensional plot and partitioning
+> ## into 3 clusters.
+> data(iris)
+> iris.x <- iris[, 1:4]
+> 
+> for(k in 2:5)
++     print(clusplot(iris.x, pam(iris.x, k)$clustering, diss = FALSE))
+$Distances
+          [,1]      [,2]
+[1,] 0.0000000 0.5452161
+[2,] 0.5452161 0.0000000
+
+$Shading
+[1] 18.93861 24.06139
+
+$Distances
+         [,1]     [,2]     [,3]
+[1,] 0.000000 1.433071 2.851715
+[2,] 1.433071 0.000000       NA
+[3,] 2.851715       NA 0.000000
+
+$Shading
+[1] 18.987588 17.166940  9.845472
+
+$Distances
+         [,1]    [,2]      [,3]      [,4]
+[1,] 0.000000 2.24157 1.6340329 3.0945887
+[2,] 2.241570 0.00000        NA        NA
+[3,] 1.634033      NA 0.0000000 0.9461858
+[4,] 3.094589      NA 0.9461858 0.0000000
+
+$Shading
+[1] 12.881766 14.912379 13.652381  7.553474
+
+$Distances
+         [,1]      [,2]     [,3]       [,4]       [,5]
+[1,] 0.000000 1.9899160 1.552387 3.11516148 3.96536391
+[2,] 1.989916 0.0000000       NA         NA 0.94713417
+[3,] 1.552387        NA 0.000000 1.17348334 2.22769309
+[4,] 3.115161        NA 1.173483 0.00000000 0.04539385
+[5,] 3.965364 0.9471342 2.227693 0.04539385 0.00000000
+
+$Shading
+[1] 10.369738 11.560147 10.088431 14.857590  5.124093
+
+> 
+> 
+> .Random.seed <- c(0L,rep(7654L,3))
+> ## generate 25 objects, divided into 2 clusters.
+> x <- rbind(cbind(rnorm(10,0,0.5), rnorm(10,0,0.5)),
++            cbind(rnorm(15,5,0.5), rnorm(15,5,0.5)))
+> print.default(clusplot(px2 <- pam(x, 2)))
+$Distances
+         [,1]     [,2]
+[1,] 0.000000 5.516876
+[2,] 5.516876 0.000000
+
+$Shading
+[1] 20.18314 22.81686
+
+> 
+> clusplot(px2, labels = 2, col.p = 1 + px2$clustering)
+> 
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/diana-boots.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/diana-boots.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/diana-boots.R	(revision 2477)
@@ -0,0 +1,31 @@
+library(cluster)
+
+## Kind of a bootstrap -- calling many diana()s
+dianaBoot <- function(data, B = 500, frac.sub = c(0.7, min = 0.2),
+                      digits = 4)
+{
+    stopifnot((n <- nrow(data)) >= 10, B >= 10, frac.sub > 0,
+              (m <- round(frac.sub[["min"]]*n)) >= 2,
+              (mm <- round(frac.sub[1]*n)) > m)
+    for(b in 1:B) {
+        d.r <- data[sample(n, max(m, min(n, rpois(1, lambda = mm)))) ,]
+        dia. <- diana(d.r, keep.diss=FALSE, keep.data=FALSE)
+        print(dia.[1:3], digits = digits)
+    }
+}
+
+.p0 <- proc.time()
+data(ruspini)
+set.seed(134)
+dianaBoot(ruspini)
+cat('Time elapsed: ', (.p1 <- proc.time()) - .p0,'\n')
+
+data(agriculture)
+set.seed(707)
+dianaBoot(agriculture)
+cat('Time elapsed: ', (.p2 <- proc.time()) - .p1,'\n')
+
+data(swiss); swiss.x <- as.matrix(swiss[,-1])
+set.seed(312)
+dianaBoot(swiss.x)
+cat('Time elapsed: ', (.p3 <- proc.time()) - .p2,'\n')
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/clara-NAs.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/clara-NAs.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/clara-NAs.R	(revision 2477)
@@ -0,0 +1,46 @@
+library(cluster)
+
+x <- cbind(c(0, -4, -22, -14, 0, NA, -28, 1, 10, -1,
+             100 + c(13, 0, 2, 4, 7, 8, 1)),
+           c(-5, -14, NA, -35, -30, NA, 7, 2, -18, 13,
+             47, 64, 48, NA, NA, 44, 65))
+x
+(d <- dist(x,'manhattan'))
+summary(d, na.rm = TRUE) # max = 270
+## First call with "trace" (seg.fault typically later ...):
+try( clara(x, k=2, metric="manhattan", sampsize=10, trace = 3) )
+## Originally:already shows the problem:  nbest[] = c(0,0,...,0) must be WRONG!!
+## Now: gives the proper error message.
+
+## S-plus 6.1.2 (rel.2 for Linux, 2002) gives
+##> cc <- clara(x, k=2, metric="manhattan", samples=2, sampsize=10)
+## Problem in .Fortran("clara",: Internal error: data for decrementing
+## ref.count didn't point to a valid arena (0x0), while calling subroutine clara
+
+## The large example from  clara.R -- made small enough to still provoke
+## the    "** dysta2() ...  OUT"  problem  {no longer!}
+x <- matrix(c(0, 3, -4, 62, 1, 3, -7, 45, 36, 46, 45, 54, -10,
+              51, 49, -5, 13, -6, 49, 52, 57, 39, -1, 55, 68, -3, 51, 11, NA,
+              9, -3, 50, NA, 58, 9, 52, 12, NA, 47, -12, -6, -9, 5, 30, 38,
+              54, -5, 39, 50, 50, 54, 43, 7, 64, 55, 4, 0, 72, 54, 37, 59,
+              -1, 8, 43, 50, -2, 56, -8, 43, 6, 4, 48, -2, 14, 45, 49, 56,
+              51, 45, 11, 10, 42, 50, 2, -12, 3, 1, 2, 2, -14, -4, 8, 0, 3,
+              -11, 8, 5, 14, -1, 9, 0, 19, 10, -2, -9, 9, 2, 16, 10, 4, 1,
+              12, 7, -4, 27, -8, -9, -9, 2, 8, NA, 13, -23, -3, -5, 1, 15,
+              -3, 5, -9, -5, 14, 8, 7, -4, 26, 20, 10, 8, 17, 4, 14, 23, -2,
+              23, 2, 16, 5, 5, -3, 12, 5, 14, -2, 4, 2, -2, 7, 9, 1, -15, -1,
+              9, 23, 1, 7, 13, 2, -11, 16, 12, -11, -14, 2, 6, -8),
+            ncol = 2)
+str(x) # 88 x 2
+try(clara(x, 2, samples = 20, trace = 3))# 2nd sample did show dysta2() problem
+## To see error message for > 1 missing:
+try(clara(rbind(NA,x), 2))
+
+x <- x[-33,]
+## still had the ** dysta2() .. OUT" problem {no longer!}
+clara(x, 2, samples = 12, trace = 3)
+
+data(xclara)
+set.seed(123)
+xclara[sample(nrow(xclara), 50),] <- NA
+try( clara(xclara, k = 3) ) #-> "nice" error message depicting first 12 missing obs
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/pam.Rout.save
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/pam.Rout.save	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/pam.Rout.save	(revision 2477)
@@ -0,0 +1,1359 @@
+
+R version 3.1.2 Patched (2015-01-31 r67684) -- "Pumpkin Helmet"
+Copyright (C) 2015 The R Foundation for Statistical Computing
+Platform: x86_64-unknown-linux-gnu (64-bit)
+
+R is free software and comes with ABSOLUTELY NO WARRANTY.
+You are welcome to redistribute it under certain conditions.
+Type 'license()' or 'licence()' for distribution details.
+
+R is a collaborative project with many contributors.
+Type 'contributors()' for more information and
+'citation()' on how to cite R or R packages in publications.
+
+Type 'demo()' for some demos, 'help()' for on-line help, or
+'help.start()' for an HTML browser interface to help.
+Type 'q()' to quit R.
+
+> library(cluster)
+> ## Compare on these:
+> nms <- c("clustering", "objective", "isolation", "clusinfo", "silinfo")
+> nm2 <- c("medoids", "id.med", nms)
+> nm3 <- nm2[- pmatch("obj", nm2)]
+> 
+> (x <- x0 <- cbind(V1 = (-3:4)^2, V2 = c(0:6,NA), V3 = c(1,2,NA,7,NA,8:9,8)))
+     V1 V2 V3
+[1,]  9  0  1
+[2,]  4  1  2
+[3,]  1  2 NA
+[4,]  0  3  7
+[5,]  1  4 NA
+[6,]  4  5  8
+[7,]  9  6  9
+[8,] 16 NA  8
+> (px <- pam(x,2, metric="manhattan"))
+Medoids:
+     ID V1 V2 V3
+[1,]  2  4  1  2
+[2,]  6  4  5  8
+Clustering vector:
+[1] 1 1 1 2 2 2 2 2
+Objective function:
+build  swap 
+6.375 6.375 
+
+Available components:
+ [1] "medoids"    "id.med"     "clustering" "objective"  "isolation" 
+ [6] "clusinfo"   "silinfo"    "diss"       "call"       "data"      
+> stopifnot(identical(x,x0))# DUP=FALSE ..
+> pd <-  pam(dist(x,"manhattan"), 2)
+> px2 <- pam(x,2, metric="manhattan", keep.diss=FALSE, keep.data=FALSE)
+> pdC <- pam(x,2, metric="manhattan", cluster.only = TRUE)
+> p1  <- pam(x,1, metric="manhattan")
+> 
+> stopifnot(identical(px[nms], pd[nms]),
++ 	  identical(px[nms], px2[nms]),
++ 	  identical(pdC, px2$clustering),
++ 	  ## and for default dist "euclidean":
++ 	  identical(pam(x,	2)[nms],
++ 		    pam(dist(x),2)[nms]),
++ 	  identical(p1[c("id.med", "objective", "clusinfo")],
++ 		    list(id.med = 6L, objective = c(build=9.25, swap=9.25),
++ 			 clusinfo = array(c(8, 18, 9.25, 45, 0), dim = c(1, 5),
++ 			 dimnames=list(NULL, c("size", "max_diss", "av_diss",
++ 			 "diameter", "separation"))))),
++ 	  p1$clustering == 1, is.null(p1$silinfo)
++ 	  )
+> 
+> set.seed(253)
+> ## generate 250 objects, divided into 2 clusters.
+> x <- rbind(cbind(rnorm(120, 0,8), rnorm(120, 0,8)),
++ 	   cbind(rnorm(130,50,8), rnorm(130,10,8)))
+> 
+> .proctime00 <- proc.time()
+> 
+> summary(px2 <- pam(x, 2))
+Medoids:
+      ID                      
+[1,]  61 -0.7697828 -0.2330187
+[2,] 163 49.1392167  9.4097259
+Clustering vector:
+  [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
+ [38] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
+ [75] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
+[112] 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
+[149] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
+[186] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
+[223] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
+Objective function:
+   build     swap 
+13.25843 10.20817 
+
+Numerical information per cluster:
+     size max_diss  av_diss diameter separation
+[1,]  120 31.04843 10.18584 53.22082   9.419035
+[2,]  130 26.94337 10.22878 47.86442   9.419035
+
+Isolated clusters:
+ L-clusters: character(0)
+ L*-clusters: character(0)
+
+Silhouette plot information:
+    cluster neighbor  sil_width
+117       1        2 0.80638966
+75        1        2 0.80600824
+81        1        2 0.80556624
+107       1        2 0.80535252
+6         1        2 0.80526675
+100       1        2 0.80385505
+68        1        2 0.80369702
+113       1        2 0.80331774
+61        1        2 0.80315322
+57        1        2 0.80313945
+12        1        2 0.80161573
+59        1        2 0.80047745
+82        1        2 0.79630964
+67        1        2 0.79559589
+63        1        2 0.79488886
+47        1        2 0.79458809
+21        1        2 0.79379540
+9         1        2 0.79343081
+95        1        2 0.79332153
+4         1        2 0.79136081
+3         1        2 0.79130879
+39        1        2 0.79052367
+120       1        2 0.78877423
+90        1        2 0.78767224
+85        1        2 0.78588359
+106       1        2 0.78504452
+92        1        2 0.78303000
+83        1        2 0.78245915
+19        1        2 0.78228359
+14        1        2 0.78139236
+10        1        2 0.77825678
+49        1        2 0.77597087
+64        1        2 0.77482761
+44        1        2 0.77397394
+89        1        2 0.77297318
+119       1        2 0.77238705
+108       1        2 0.77137189
+104       1        2 0.76871378
+32        1        2 0.76856251
+115       1        2 0.76843312
+27        1        2 0.76811698
+88        1        2 0.76810713
+109       1        2 0.76681303
+62        1        2 0.76655954
+36        1        2 0.76547988
+66        1        2 0.76535606
+74        1        2 0.76491406
+26        1        2 0.76441455
+24        1        2 0.76436188
+65        1        2 0.76381352
+40        1        2 0.76061109
+52        1        2 0.75748679
+54        1        2 0.75746436
+13        1        2 0.75594073
+56        1        2 0.75353784
+96        1        2 0.75268786
+116       1        2 0.75267215
+110       1        2 0.75266614
+112       1        2 0.75150872
+78        1        2 0.75083708
+7         1        2 0.74905187
+86        1        2 0.74190424
+18        1        2 0.74162144
+111       1        2 0.74085474
+69        1        2 0.74044653
+76        1        2 0.73911707
+50        1        2 0.73847075
+93        1        2 0.73616384
+31        1        2 0.73462007
+33        1        2 0.73455252
+43        1        2 0.73396232
+102       1        2 0.72930751
+118       1        2 0.72778023
+15        1        2 0.72588122
+53        1        2 0.72542363
+8         1        2 0.72535191
+77        1        2 0.72467809
+16        1        2 0.72446952
+48        1        2 0.72331213
+105       1        2 0.72325095
+37        1        2 0.72055248
+101       1        2 0.71783562
+22        1        2 0.71217552
+23        1        2 0.71078375
+84        1        2 0.70573352
+17        1        2 0.70221946
+38        1        2 0.69947240
+2         1        2 0.69718780
+98        1        2 0.69601237
+1         1        2 0.69373841
+35        1        2 0.69179546
+70        1        2 0.69074915
+28        1        2 0.68434091
+97        1        2 0.68351978
+5         1        2 0.67662675
+72        1        2 0.67420722
+34        1        2 0.67315267
+11        1        2 0.67226046
+103       1        2 0.67188668
+87        1        2 0.67172802
+58        1        2 0.67090513
+46        1        2 0.66835116
+60        1        2 0.66565445
+80        1        2 0.65983842
+73        1        2 0.65093947
+55        1        2 0.64709226
+20        1        2 0.64439401
+45        1        2 0.63403361
+51        1        2 0.63303101
+42        1        2 0.62906268
+94        1        2 0.60916406
+91        1        2 0.59905996
+41        1        2 0.57245485
+29        1        2 0.55594781
+99        1        2 0.55035955
+79        1        2 0.50808544
+71        1        2 0.46663954
+25        1        2 0.43797346
+114       1        2 0.16645003
+30        1        2 0.08928664
+121       2        1 0.80353953
+137       2        1 0.80253721
+146       2        1 0.80106653
+173       2        1 0.80039417
+216       2        1 0.79969919
+124       2        1 0.79964913
+163       2        1 0.79901674
+157       2        1 0.79779188
+242       2        1 0.79744315
+227       2        1 0.79708130
+207       2        1 0.79653829
+130       2        1 0.79574204
+188       2        1 0.79496670
+250       2        1 0.79302877
+145       2        1 0.79190501
+126       2        1 0.79156003
+166       2        1 0.79068795
+222       2        1 0.78986170
+232       2        1 0.78839216
+176       2        1 0.78819086
+198       2        1 0.78782877
+225       2        1 0.78747329
+230       2        1 0.78689375
+205       2        1 0.78683641
+160       2        1 0.78643596
+150       2        1 0.78484046
+136       2        1 0.78455577
+228       2        1 0.78198238
+206       2        1 0.78137390
+152       2        1 0.78044944
+200       2        1 0.77843458
+149       2        1 0.77822272
+221       2        1 0.77758324
+226       2        1 0.77611981
+129       2        1 0.77531368
+199       2        1 0.77491451
+154       2        1 0.77136276
+241       2        1 0.77076783
+179       2        1 0.77010597
+174       2        1 0.76893758
+214       2        1 0.76776510
+181       2        1 0.76763087
+213       2        1 0.76683151
+215       2        1 0.76639087
+236       2        1 0.76637552
+218       2        1 0.76563050
+182       2        1 0.76450873
+219       2        1 0.76370712
+208       2        1 0.76090426
+151       2        1 0.75957536
+164       2        1 0.75914844
+248       2        1 0.75849775
+224       2        1 0.75826151
+168       2        1 0.75782023
+189       2        1 0.75555083
+128       2        1 0.75550519
+125       2        1 0.75510766
+177       2        1 0.75128941
+147       2        1 0.75086382
+158       2        1 0.75029192
+245       2        1 0.74993652
+186       2        1 0.74741247
+165       2        1 0.74681005
+156       2        1 0.74478894
+122       2        1 0.74315425
+247       2        1 0.74107328
+220       2        1 0.74054057
+183       2        1 0.73818743
+184       2        1 0.73743259
+169       2        1 0.73712431
+180       2        1 0.73419669
+240       2        1 0.73390938
+134       2        1 0.73382823
+190       2        1 0.73379720
+217       2        1 0.73311931
+171       2        1 0.73110365
+143       2        1 0.72986022
+153       2        1 0.72891371
+223       2        1 0.72887340
+238       2        1 0.72789416
+175       2        1 0.72311665
+138       2        1 0.72290131
+235       2        1 0.72157157
+237       2        1 0.71591233
+132       2        1 0.71549875
+204       2        1 0.71381083
+201       2        1 0.71263881
+170       2        1 0.70812568
+191       2        1 0.70747428
+243       2        1 0.70588929
+193       2        1 0.70499170
+141       2        1 0.70489885
+161       2        1 0.70303117
+249       2        1 0.69300988
+229       2        1 0.69231982
+196       2        1 0.69162302
+211       2        1 0.69128644
+246       2        1 0.68757678
+159       2        1 0.68619850
+133       2        1 0.68605444
+194       2        1 0.68538064
+155       2        1 0.68278455
+234       2        1 0.68202095
+127       2        1 0.68111027
+144       2        1 0.67559517
+131       2        1 0.65959281
+139       2        1 0.65895024
+209       2        1 0.65844942
+148       2        1 0.65180336
+185       2        1 0.64989675
+212       2        1 0.63954685
+192       2        1 0.63470144
+123       2        1 0.63005333
+202       2        1 0.61735843
+135       2        1 0.61493992
+210       2        1 0.60680456
+140       2        1 0.58410004
+187       2        1 0.58193543
+239       2        1 0.57088679
+203       2        1 0.56761998
+244       2        1 0.55321123
+231       2        1 0.55043439
+197       2        1 0.52364031
+195       2        1 0.51955678
+142       2        1 0.47466260
+162       2        1 0.46155841
+172       2        1 0.45167576
+178       2        1 0.42686872
+233       2        1 0.37013099
+167       2        1 0.32442373
+Average silhouette width per cluster:
+[1] 0.7196104 0.7148520
+Average silhouette width of total data set:
+[1] 0.717136
+
+Available components:
+ [1] "medoids"    "id.med"     "clustering" "objective"  "isolation" 
+ [6] "clusinfo"   "silinfo"    "diss"       "call"       "data"      
+> pdx <- pam(dist(x), 2)
+> all.equal(px2[nms], pdx[nms], tol = 1e-12) ## TRUE
+[1] TRUE
+> pdxK <- pam(dist(x), 2, keep.diss = TRUE)
+> stopifnot(identical(pdx[nm2], pdxK[nm2]))
+> 
+> spdx <- silhouette(pdx)
+> summary(spdx)
+Silhouette of 250 units in 2 clusters from pam(x = dist(x), k = 2) :
+ Cluster sizes and average silhouette widths:
+      120       130 
+0.7196104 0.7148520 
+Individual silhouette widths:
+   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
+0.08929 0.69140 0.74400 0.71710 0.77810 0.80640 
+> spdx
+    cluster neighbor  sil_width
+117       1        2 0.80638966
+75        1        2 0.80600824
+81        1        2 0.80556624
+107       1        2 0.80535252
+6         1        2 0.80526675
+100       1        2 0.80385505
+68        1        2 0.80369702
+113       1        2 0.80331774
+61        1        2 0.80315322
+57        1        2 0.80313945
+12        1        2 0.80161573
+59        1        2 0.80047745
+82        1        2 0.79630964
+67        1        2 0.79559589
+63        1        2 0.79488886
+47        1        2 0.79458809
+21        1        2 0.79379540
+9         1        2 0.79343081
+95        1        2 0.79332153
+4         1        2 0.79136081
+3         1        2 0.79130879
+39        1        2 0.79052367
+120       1        2 0.78877423
+90        1        2 0.78767224
+85        1        2 0.78588359
+106       1        2 0.78504452
+92        1        2 0.78303000
+83        1        2 0.78245915
+19        1        2 0.78228359
+14        1        2 0.78139236
+10        1        2 0.77825678
+49        1        2 0.77597087
+64        1        2 0.77482761
+44        1        2 0.77397394
+89        1        2 0.77297318
+119       1        2 0.77238705
+108       1        2 0.77137189
+104       1        2 0.76871378
+32        1        2 0.76856251
+115       1        2 0.76843312
+27        1        2 0.76811698
+88        1        2 0.76810713
+109       1        2 0.76681303
+62        1        2 0.76655954
+36        1        2 0.76547988
+66        1        2 0.76535606
+74        1        2 0.76491406
+26        1        2 0.76441455
+24        1        2 0.76436188
+65        1        2 0.76381352
+40        1        2 0.76061109
+52        1        2 0.75748679
+54        1        2 0.75746436
+13        1        2 0.75594073
+56        1        2 0.75353784
+96        1        2 0.75268786
+116       1        2 0.75267215
+110       1        2 0.75266614
+112       1        2 0.75150872
+78        1        2 0.75083708
+7         1        2 0.74905187
+86        1        2 0.74190424
+18        1        2 0.74162144
+111       1        2 0.74085474
+69        1        2 0.74044653
+76        1        2 0.73911707
+50        1        2 0.73847075
+93        1        2 0.73616384
+31        1        2 0.73462007
+33        1        2 0.73455252
+43        1        2 0.73396232
+102       1        2 0.72930751
+118       1        2 0.72778023
+15        1        2 0.72588122
+53        1        2 0.72542363
+8         1        2 0.72535191
+77        1        2 0.72467809
+16        1        2 0.72446952
+48        1        2 0.72331213
+105       1        2 0.72325095
+37        1        2 0.72055248
+101       1        2 0.71783562
+22        1        2 0.71217552
+23        1        2 0.71078375
+84        1        2 0.70573352
+17        1        2 0.70221946
+38        1        2 0.69947240
+2         1        2 0.69718780
+98        1        2 0.69601237
+1         1        2 0.69373841
+35        1        2 0.69179546
+70        1        2 0.69074915
+28        1        2 0.68434091
+97        1        2 0.68351978
+5         1        2 0.67662675
+72        1        2 0.67420722
+34        1        2 0.67315267
+11        1        2 0.67226046
+103       1        2 0.67188668
+87        1        2 0.67172802
+58        1        2 0.67090513
+46        1        2 0.66835116
+60        1        2 0.66565445
+80        1        2 0.65983842
+73        1        2 0.65093947
+55        1        2 0.64709226
+20        1        2 0.64439401
+45        1        2 0.63403361
+51        1        2 0.63303101
+42        1        2 0.62906268
+94        1        2 0.60916406
+91        1        2 0.59905996
+41        1        2 0.57245485
+29        1        2 0.55594781
+99        1        2 0.55035955
+79        1        2 0.50808544
+71        1        2 0.46663954
+25        1        2 0.43797346
+114       1        2 0.16645003
+30        1        2 0.08928664
+121       2        1 0.80353953
+137       2        1 0.80253721
+146       2        1 0.80106653
+173       2        1 0.80039417
+216       2        1 0.79969919
+124       2        1 0.79964913
+163       2        1 0.79901674
+157       2        1 0.79779188
+242       2        1 0.79744315
+227       2        1 0.79708130
+207       2        1 0.79653829
+130       2        1 0.79574204
+188       2        1 0.79496670
+250       2        1 0.79302877
+145       2        1 0.79190501
+126       2        1 0.79156003
+166       2        1 0.79068795
+222       2        1 0.78986170
+232       2        1 0.78839216
+176       2        1 0.78819086
+198       2        1 0.78782877
+225       2        1 0.78747329
+230       2        1 0.78689375
+205       2        1 0.78683641
+160       2        1 0.78643596
+150       2        1 0.78484046
+136       2        1 0.78455577
+228       2        1 0.78198238
+206       2        1 0.78137390
+152       2        1 0.78044944
+200       2        1 0.77843458
+149       2        1 0.77822272
+221       2        1 0.77758324
+226       2        1 0.77611981
+129       2        1 0.77531368
+199       2        1 0.77491451
+154       2        1 0.77136276
+241       2        1 0.77076783
+179       2        1 0.77010597
+174       2        1 0.76893758
+214       2        1 0.76776510
+181       2        1 0.76763087
+213       2        1 0.76683151
+215       2        1 0.76639087
+236       2        1 0.76637552
+218       2        1 0.76563050
+182       2        1 0.76450873
+219       2        1 0.76370712
+208       2        1 0.76090426
+151       2        1 0.75957536
+164       2        1 0.75914844
+248       2        1 0.75849775
+224       2        1 0.75826151
+168       2        1 0.75782023
+189       2        1 0.75555083
+128       2        1 0.75550519
+125       2        1 0.75510766
+177       2        1 0.75128941
+147       2        1 0.75086382
+158       2        1 0.75029192
+245       2        1 0.74993652
+186       2        1 0.74741247
+165       2        1 0.74681005
+156       2        1 0.74478894
+122       2        1 0.74315425
+247       2        1 0.74107328
+220       2        1 0.74054057
+183       2        1 0.73818743
+184       2        1 0.73743259
+169       2        1 0.73712431
+180       2        1 0.73419669
+240       2        1 0.73390938
+134       2        1 0.73382823
+190       2        1 0.73379720
+217       2        1 0.73311931
+171       2        1 0.73110365
+143       2        1 0.72986022
+153       2        1 0.72891371
+223       2        1 0.72887340
+238       2        1 0.72789416
+175       2        1 0.72311665
+138       2        1 0.72290131
+235       2        1 0.72157157
+237       2        1 0.71591233
+132       2        1 0.71549875
+204       2        1 0.71381083
+201       2        1 0.71263881
+170       2        1 0.70812568
+191       2        1 0.70747428
+243       2        1 0.70588929
+193       2        1 0.70499170
+141       2        1 0.70489885
+161       2        1 0.70303117
+249       2        1 0.69300988
+229       2        1 0.69231982
+196       2        1 0.69162302
+211       2        1 0.69128644
+246       2        1 0.68757678
+159       2        1 0.68619850
+133       2        1 0.68605444
+194       2        1 0.68538064
+155       2        1 0.68278455
+234       2        1 0.68202095
+127       2        1 0.68111027
+144       2        1 0.67559517
+131       2        1 0.65959281
+139       2        1 0.65895024
+209       2        1 0.65844942
+148       2        1 0.65180336
+185       2        1 0.64989675
+212       2        1 0.63954685
+192       2        1 0.63470144
+123       2        1 0.63005333
+202       2        1 0.61735843
+135       2        1 0.61493992
+210       2        1 0.60680456
+140       2        1 0.58410004
+187       2        1 0.58193543
+239       2        1 0.57088679
+203       2        1 0.56761998
+244       2        1 0.55321123
+231       2        1 0.55043439
+197       2        1 0.52364031
+195       2        1 0.51955678
+142       2        1 0.47466260
+162       2        1 0.46155841
+172       2        1 0.45167576
+178       2        1 0.42686872
+233       2        1 0.37013099
+167       2        1 0.32442373
+attr(,"Ordered")
+[1] TRUE
+attr(,"call")
+pam(x = dist(x), k = 2)
+attr(,"class")
+[1] "silhouette"
+> postscript("pam-tst.ps")
+> if(FALSE)
++     plot(spdx)# the silhouette
+> ## is now identical :
+> plot(pdx)# failed in 1.7.0 -- now only does silhouette
+> 
+> par(mfrow = 2:1)
+> ## new 'dist' argument for clusplot():
+> plot(pdx, dist=dist(x))
+> ## but this should work automagically (via eval()) as well:
+> plot(pdx)
+> ## or this
+> clusplot(pdx)
+> 
+> data(ruspini)
+> summary(pr4 <- pam(ruspini, 4))
+Medoids:
+   ID  x   y
+10 10 19  65
+32 32 44 149
+52 52 99 119
+70 70 69  21
+Clustering vector:
+ 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 
+ 1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  2  2  2  2  2  2 
+27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 
+ 2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  3  3  3  3  3  3  3  3  3 
+53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 
+ 3  3  3  3  3  3  3  3  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4 
+Objective function:
+   build     swap 
+17.22898 11.48637 
+
+Numerical information per cluster:
+     size max_diss  av_diss diameter separation
+[1,]   20 24.04163 12.55362 40.24922   40.49691
+[2,]   23 26.92582 10.44238 36.61967   24.04163
+[3,]   17 33.97058 13.84800 47.63402   24.04163
+[4,]   15 17.02939  8.98767 27.07397   40.49691
+
+Isolated clusters:
+ L-clusters: character(0)
+ L*-clusters: [1] 1 4
+
+Silhouette plot information:
+   cluster neighbor sil_width
+10       1        4 0.8056096
+6        1        4 0.7954977
+9        1        4 0.7923048
+11       1        4 0.7831672
+8        1        2 0.7811793
+12       1        4 0.7658171
+3        1        4 0.7587961
+14       1        4 0.7569107
+2        1        4 0.7456150
+16       1        4 0.7436018
+13       1        4 0.7398841
+4        1        2 0.7361533
+18       1        4 0.7080079
+15       1        4 0.7006854
+19       1        4 0.7000938
+1        1        4 0.6798381
+5        1        4 0.6646571
+20       1        4 0.6619626
+17       1        4 0.6148541
+7        1        2 0.5900575
+26       2        3 0.8357433
+32       2        3 0.8332753
+27       2        3 0.8290271
+25       2        3 0.8285547
+28       2        3 0.8192636
+35       2        3 0.8186309
+33       2        3 0.8175087
+23       2        3 0.8089969
+22       2        3 0.8025389
+34       2        3 0.8013310
+31       2        3 0.7949677
+36       2        3 0.7943536
+24       2        3 0.7930770
+29       2        3 0.7897346
+30       2        3 0.7892027
+21       2        3 0.7698024
+37       2        3 0.7684502
+39       2        3 0.7631648
+38       2        3 0.7438848
+40       2        3 0.7083130
+42       2        3 0.5291270
+43       2        3 0.4931623
+41       2        3 0.4290814
+54       3        2 0.7741745
+57       3        2 0.7703455
+55       3        2 0.7641810
+50       3        2 0.7619943
+52       3        2 0.7616220
+56       3        2 0.7575313
+59       3        2 0.7327828
+49       3        2 0.7317002
+51       3        2 0.7209864
+60       3        2 0.7206840
+58       3        2 0.7019611
+53       3        2 0.6775322
+45       3        2 0.5974787
+46       3        2 0.5740823
+47       3        2 0.4835635
+48       3        2 0.4247331
+44       3        2 0.4196093
+70       4        1 0.8548947
+67       4        1 0.8527439
+65       4        1 0.8503105
+69       4        1 0.8391810
+71       4        1 0.8381065
+66       4        1 0.8229841
+62       4        1 0.8153092
+64       4        1 0.8061254
+73       4        1 0.7950213
+63       4        1 0.7795369
+72       4        1 0.7748121
+61       4        1 0.7701103
+68       4        1 0.7620559
+74       4        1 0.7596815
+75       4        1 0.7425538
+Average silhouette width per cluster:
+[1] 0.7262347 0.7548344 0.6691154 0.8042285
+Average silhouette width of total data set:
+[1] 0.737657
+
+2775 dissimilarities, summarized :
+    Min.  1st Qu.   Median     Mean  3rd Qu.     Max. 
+  1.4142  40.1060  75.5910  71.5380  99.1690 154.5000 
+Metric :  euclidean 
+Number of objects : 75
+
+Available components:
+ [1] "medoids"    "id.med"     "clustering" "objective"  "isolation" 
+ [6] "clusinfo"   "silinfo"    "diss"       "call"       "data"      
+> (pr3 <- pam(ruspini, 3))
+Medoids:
+   ID  x   y
+17 17 30  52
+32 32 44 149
+52 52 99 119
+Clustering vector:
+ 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 
+ 1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  2  2  2  2  2  2 
+27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 
+ 2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  3  3  3  3  3  3  3  3  3 
+53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 
+ 3  3  3  3  3  3  3  3  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1 
+Objective function:
+   build     swap 
+25.68229 21.59293 
+
+Available components:
+ [1] "medoids"    "id.med"     "clustering" "objective"  "isolation" 
+ [6] "clusinfo"   "silinfo"    "diss"       "call"       "data"      
+> (pr5 <- pam(ruspini, 5))
+Medoids:
+   ID  x   y
+10 10 19  65
+32 32 44 149
+52 52 99 119
+47 47 78  94
+70 70 69  21
+Clustering vector:
+ 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 
+ 1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  2  2  2  2  2  2 
+27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 
+ 2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  3  3  4  4  4  3  3  3  3 
+53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 
+ 3  3  3  3  3  3  3  3  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5 
+Objective function:
+   build     swap 
+12.09864 10.39579 
+
+Available components:
+ [1] "medoids"    "id.med"     "clustering" "objective"  "isolation" 
+ [6] "clusinfo"   "silinfo"    "diss"       "call"       "data"      
+> 
+> data(votes.repub)
+> summary(pv3 <- pam(votes.repub, 3))
+Medoids:
+           ID X1856 X1860 X1864 X1868 X1872 X1876 X1880 X1884 X1888 X1892 X1896
+Alabama     1    NA    NA    NA 51.44 53.19 40.02 36.98 38.44 32.28  3.95 28.13
+Alaska      2    NA    NA    NA    NA    NA    NA    NA    NA    NA    NA    NA
+New Mexico 31    NA    NA    NA    NA    NA    NA    NA    NA    NA    NA    NA
+           X1900 X1904 X1908 X1912 X1916 X1920 X1924 X1928 X1932 X1936 X1940
+Alabama    34.67 20.65 24.38  8.26 21.97 30.98 27.01 48.49 14.15 12.82 14.34
+Alaska        NA    NA    NA    NA    NA    NA    NA    NA    NA    NA    NA
+New Mexico    NA    NA    NA 35.91 46.53 54.68 48.52 59.01 35.76 36.50 43.28
+           X1944 X1948 X1952 X1956 X1960 X1964 X1968 X1972 X1976
+Alabama    18.20 19.04 35.02 39.39 41.75  69.5  14.0  72.4 43.48
+Alaska        NA    NA    NA    NA 50.94  34.1  45.3  58.1 62.91
+New Mexico 46.44 42.93 55.39 57.81 49.41  41.0  51.8  61.0 51.04
+Clustering vector:
+       Alabama         Alaska        Arizona       Arkansas     California 
+             1              2              3              1              2 
+      Colorado    Connecticut       Delaware        Florida        Georgia 
+             2              2              3              1              1 
+        Hawaii          Idaho       Illinois        Indiana           Iowa 
+             2              3              2              3              3 
+        Kansas       Kentucky      Louisiana          Maine       Maryland 
+             2              3              1              2              3 
+ Massachusetts       Michigan      Minnesota    Mississippi       Missouri 
+             3              2              3              1              3 
+       Montana       Nebraska         Nevada  New Hampshire     New Jersey 
+             3              3              2              2              2 
+    New Mexico       New York North Carolina   North Dakota           Ohio 
+             3              3              3              2              3 
+      Oklahoma         Oregon   Pennsylvania   Rhode Island South Carolina 
+             3              3              2              3              2 
+  South Dakota      Tennessee          Texas           Utah        Vermont 
+             3              3              2              3              2 
+      Virginia     Washington  West Virginia      Wisconsin        Wyoming 
+             2              3              3              3              3 
+Objective function:
+   build     swap 
+38.32548 38.32548 
+
+Numerical information per cluster:
+     size max_diss  av_diss diameter separation
+[1,]    6 78.92731 51.59134 116.7048   50.14189
+[2,]   18 86.54675 38.47068 271.2455   19.42184
+[3,]   26 60.03879 35.16361 124.8324   19.42184
+
+Isolated clusters:
+ L-clusters: character(0)
+ L*-clusters: character(0)
+
+Silhouette plot information:
+               cluster neighbor   sil_width
+Louisiana            1        3  0.54689535
+Alabama              1        3  0.52839272
+Georgia              1        3  0.52730253
+Mississippi          1        2  0.52454810
+Florida              1        3  0.25211631
+Arkansas             1        3  0.24131701
+Alaska               2        3  0.15699268
+Hawaii               2        3  0.08479842
+Vermont              2        3 -0.02620975
+Maine                2        3 -0.03284950
+Michigan             2        3 -0.11524982
+Pennsylvania         2        3 -0.15341477
+New Hampshire        2        3 -0.17099889
+Connecticut          2        3 -0.19095000
+New Jersey           2        3 -0.19281567
+Kansas               2        3 -0.19719316
+California           2        3 -0.24006293
+Illinois             2        3 -0.25236336
+North Dakota         2        3 -0.25464430
+Virginia             2        3 -0.26262534
+Nevada               2        3 -0.27016336
+Colorado             2        3 -0.27885043
+Texas                2        1 -0.47297583
+South Carolina       2        1 -0.50899710
+New Mexico           3        2  0.39555584
+Washington           3        2  0.32989454
+Oklahoma             3        2  0.30953823
+Wyoming              3        2  0.30163169
+Idaho                3        2  0.29915132
+Montana              3        2  0.29105494
+Missouri             3        2  0.29038462
+Oregon               3        2  0.27710695
+Maryland             3        2  0.27437520
+West Virginia        3        2  0.27089938
+Utah                 3        2  0.26964380
+Tennessee            3        2  0.26846440
+Arizona              3        2  0.25968564
+Delaware             3        2  0.25920434
+Kentucky             3        2  0.25868341
+South Dakota         3        2  0.25615670
+Indiana              3        2  0.25031548
+Wisconsin            3        2  0.21808013
+Ohio                 3        2  0.21477474
+Nebraska             3        2  0.20965953
+North Carolina       3        2  0.19201537
+Minnesota            3        2  0.18955165
+New York             3        2  0.18820394
+Iowa                 3        2  0.17296046
+Rhode Island         3        2  0.12599915
+Massachusetts        3        2  0.12106770
+Average silhouette width per cluster:
+[1]  0.4367620 -0.1876985  0.2497715
+Average silhouette width of total data set:
+[1] 0.1147212
+
+1225 dissimilarities, summarized :
+   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
+ 17.199  48.343  64.681  82.227 105.490 281.950 
+Metric :  euclidean 
+Number of objects : 50
+
+Available components:
+ [1] "medoids"    "id.med"     "clustering" "objective"  "isolation" 
+ [6] "clusinfo"   "silinfo"    "diss"       "call"       "data"      
+> (pv4 <- pam(votes.repub, 4))
+Medoids:
+           ID X1856 X1860 X1864 X1868 X1872 X1876 X1880 X1884 X1888 X1892 X1896
+Alabama     1    NA    NA    NA 51.44 53.19 40.02 36.98 38.44 32.28  3.95 28.13
+Alaska      2    NA    NA    NA    NA    NA    NA    NA    NA    NA    NA    NA
+New Mexico 31    NA    NA    NA    NA    NA    NA    NA    NA    NA    NA    NA
+Iowa       15 49.13 54.87 64.23 61.92 64.18 58.58 56.85 52.42 52.36 49.60 55.46
+           X1900 X1904 X1908 X1912 X1916 X1920 X1924 X1928 X1932 X1936 X1940
+Alabama    34.67 20.65 24.38  8.26 21.97 30.98 27.01 48.49 14.15 12.82 14.34
+Alaska        NA    NA    NA    NA    NA    NA    NA    NA    NA    NA    NA
+New Mexico    NA    NA    NA 35.91 46.53 54.68 48.52 59.01 35.76 36.50 43.28
+Iowa       57.99 63.37 55.62 24.30 54.06 70.91 55.06 61.80 39.98 42.70 52.03
+           X1944 X1948 X1952 X1956 X1960 X1964 X1968 X1972 X1976
+Alabama    18.20 19.04 35.02 39.39 41.75  69.5  14.0  72.4 43.48
+Alaska        NA    NA    NA    NA 50.94  34.1  45.3  58.1 62.91
+New Mexico 46.44 42.93 55.39 57.81 49.41  41.0  51.8  61.0 51.04
+Iowa       51.99 47.58 63.76 59.06 56.71  38.1  53.0  57.6 50.51
+Clustering vector:
+       Alabama         Alaska        Arizona       Arkansas     California 
+             1              2              3              1              2 
+      Colorado    Connecticut       Delaware        Florida        Georgia 
+             2              2              3              1              1 
+        Hawaii          Idaho       Illinois        Indiana           Iowa 
+             2              3              4              3              4 
+        Kansas       Kentucky      Louisiana          Maine       Maryland 
+             4              3              1              2              3 
+ Massachusetts       Michigan      Minnesota    Mississippi       Missouri 
+             4              2              4              1              3 
+       Montana       Nebraska         Nevada  New Hampshire     New Jersey 
+             3              4              2              2              2 
+    New Mexico       New York North Carolina   North Dakota           Ohio 
+             3              3              3              4              4 
+      Oklahoma         Oregon   Pennsylvania   Rhode Island South Carolina 
+             3              3              4              4              2 
+  South Dakota      Tennessee          Texas           Utah        Vermont 
+             4              3              2              3              2 
+      Virginia     Washington  West Virginia      Wisconsin        Wyoming 
+             2              3              3              4              3 
+Objective function:
+   build     swap 
+35.84182 35.84182 
+
+Available components:
+ [1] "medoids"    "id.med"     "clustering" "objective"  "isolation" 
+ [6] "clusinfo"   "silinfo"    "diss"       "call"       "data"      
+> (pv6 <- pam(votes.repub, 6, trace = 3))
+C pam(): computing 1226 dissimilarities from  50 x 31  matrix: [Ok]
+pam()'s bswap(*, s=281.951, pamonce=0): build 6 medoids:
+    new repr. 2
+    new repr. 1
+    new repr. 31
+    new repr. 15
+    new repr. 46
+    new repr. 40
+  after build: medoids are  1  2 15 31 40 46
+  and min.dist dysma[1:n] are
+      0      0   37.7     56   35.8   28.5   28.6   31.7   54.1   48.2
+   51.7   33.2   27.3   30.5      0   35.1   25.4   60.9   36.9   26.7
+   48.4   28.1   33.2   63.1   21.1   28.6   37.5   35.8   29.8   31.3
+      0     32   29.9   35.7   30.9   35.1   27.8   35.7   50.2      0
+   26.2   30.2   45.2   34.1   33.8      0   28.5   35.1   34.2   28.8
+   swp new 10 <->  1 old; decreasing diss. 1579.03 by -2.57067
+end{bswap()}, end{cstat()}
+Medoids:
+               ID X1856 X1860 X1864 X1868 X1872 X1876 X1880 X1884 X1888 X1892
+Georgia        10    NA    NA    NA 35.72 43.77 27.94 34.33 33.84 28.33 21.80
+Alaska          2    NA    NA    NA    NA    NA    NA    NA    NA    NA    NA
+Virginia       46  0.19  1.15    NA    NA 50.48 40.62 39.52 48.90 49.47 38.75
+New Mexico     31    NA    NA    NA    NA    NA    NA    NA    NA    NA    NA
+Iowa           15 49.13 54.87 64.23 61.92 64.18 58.58 56.85 52.42 52.36 49.60
+South Carolina 40    NA    NA    NA 57.93 75.95 50.26 33.97 23.72 17.27 18.99
+               X1896 X1900 X1904 X1908 X1912 X1916 X1920 X1924 X1928 X1932
+Georgia        36.82 28.56 18.32 31.40  4.27  7.07 28.57 18.19 43.37  7.77
+Alaska            NA    NA    NA    NA    NA    NA    NA    NA    NA    NA
+Virginia       45.90 43.81 36.67 38.36 17.00 32.05 37.85 32.79 53.91 30.09
+New Mexico        NA    NA    NA    NA 35.91 46.53 54.68 48.52 59.01 35.76
+Iowa           55.46 57.99 63.37 55.62 24.30 54.06 70.91 55.06 61.80 39.98
+South Carolina 13.51  7.04  4.63  5.97  1.06  2.43  3.90  2.21  8.54  1.89
+               X1936 X1940 X1944 X1948 X1952 X1956 X1960 X1964 X1968 X1972
+Georgia        12.60 14.84 18.25 18.31 30.34 33.22 37.44  54.1  30.4  75.0
+Alaska            NA    NA    NA    NA    NA    NA 50.94  34.1  45.3  58.1
+Virginia       29.39 31.55 37.39 41.04 56.32 55.37 52.44  46.5  41.4  67.8
+New Mexico     36.50 43.28 46.44 42.93 55.39 57.81 49.41  41.0  51.8  61.0
+Iowa           42.70 52.03 51.99 47.58 63.76 59.06 56.71  38.1  53.0  57.6
+South Carolina  1.43  4.37  4.46  3.78 49.28 25.18 48.76  58.9  38.1  70.8
+               X1976
+Georgia        33.02
+Alaska         62.91
+Virginia       50.73
+New Mexico     51.04
+Iowa           50.51
+South Carolina 43.54
+Clustering vector:
+       Alabama         Alaska        Arizona       Arkansas     California 
+             1              2              3              3              2 
+      Colorado    Connecticut       Delaware        Florida        Georgia 
+             2              2              4              3              1 
+        Hawaii          Idaho       Illinois        Indiana           Iowa 
+             2              4              5              4              5 
+        Kansas       Kentucky      Louisiana          Maine       Maryland 
+             5              4              1              2              4 
+ Massachusetts       Michigan      Minnesota    Mississippi       Missouri 
+             5              2              5              6              4 
+       Montana       Nebraska         Nevada  New Hampshire     New Jersey 
+             4              5              2              2              2 
+    New Mexico       New York North Carolina   North Dakota           Ohio 
+             4              4              3              5              5 
+      Oklahoma         Oregon   Pennsylvania   Rhode Island South Carolina 
+             4              4              5              5              6 
+  South Dakota      Tennessee          Texas           Utah        Vermont 
+             5              3              2              4              2 
+      Virginia     Washington  West Virginia      Wisconsin        Wyoming 
+             3              4              4              5              4 
+Objective function:
+   build     swap 
+31.58067 31.52926 
+
+Available components:
+ [1] "medoids"    "id.med"     "clustering" "objective"  "isolation" 
+ [6] "clusinfo"   "silinfo"    "diss"       "call"       "data"      
+> 
+> cat('Time elapsed: ', proc.time() - .proctime00,'\n')
+Time elapsed:  1.817 0.028 1.938 0 0 
+> 
+> ## re-starting with medoids from pv6  shouldn't change:
+> pv6. <- pam(votes.repub, 6, medoids = pv6$id.med, trace = 3)
+C pam(): computing 1226 dissimilarities from  50 x 31  matrix: [Ok]
+pam()'s bswap(*, s=281.951, pamonce=0): medoids given
+  after build: medoids are  2 10 15 31 40 46
+  and min.dist dysma[1:n] are
+   48.2      0   37.7     56   35.8   28.5   28.6   31.7   54.1      0
+   51.7   33.2   27.3   30.5      0   35.1   25.4   58.3   36.9   26.7
+   48.4   28.1   33.2   63.1   21.1   28.6   37.5   35.8   29.8   31.3
+      0     32   29.9   35.7   30.9   35.1   27.8   35.7   50.2      0
+   26.2   30.2   45.2   34.1   33.8      0   28.5   35.1   34.2   28.8
+end{bswap()}, end{cstat()}
+> identical(pv6[nm3], pv6.[nm3])
+[1] TRUE
+> 
+> ## This example seg.faulted at some point:
+> d.st <- data.frame(V1= c(9, 12, 12, 15, 9, 9, 13, 11, 15, 10, 13, 13,
++ 		       13, 15,  8, 13, 13, 10, 7, 9, 6, 11, 3),
++ 		   V2= c(5, 9, 3, 5, 1, 1, 2, NA, 10, 1, 4, 7,
++ 		       4, NA, NA, 5, 2, 4, 3, 3, 6, 1, 1),
++ 		   V3 = c(63, 41, 59, 50, 290, 226, 60, 36, 32, 121, 70, 51,
++ 		       79, 32, 42, 39, 76, 60, 56, 88, 57, 309, 254),
++ 		   V4 = c(146, 43, 78, 88, 314, 149, 78, NA, 238, 153, 159, 222,
++ 		       203, NA, NA, 74, 100, 111, 9, 180, 50, 256, 107))
+> dd <- daisy(d.st, stand = TRUE)
+> (r0 <- pam(dd, 5))# cluster 5 = { 23 } -- on single observation
+Medoids:
+     ID   
+[1,] 15 15
+[2,]  8  8
+[3,] 14 14
+[4,] 22 22
+[5,] 23 23
+Clustering vector:
+ [1] 1 2 2 3 4 4 2 2 3 2 2 2 2 3 1 2 2 2 1 1 1 4 5
+Objective function:
+    build      swap 
+0.9368049 0.8621860 
+
+Available components:
+[1] "medoids"    "id.med"     "clustering" "objective"  "isolation" 
+[6] "clusinfo"   "silinfo"    "diss"       "call"      
+> ## pam doing the "daisy" computation internally:
+> r0s <- pam(d.st, 5, stand=TRUE, keep.diss=FALSE, keep.data=FALSE)
+> (ii <- which(names(r0) %in% c("call","medoids")))
+[1] 1 9
+> stopifnot(all.equal(r0[-ii], r0s[-ii], tol=1e-14),
++           identical(r0s$medoids, data.matrix(d.st)[r0$medoids, ]))
+> 
+> ## This gave only 3 different medoids -> and seg.fault:
+> (r5 <- pam(dd, 5, medoids = c(1,3,20,2,5), trace = 2)) # now "fine"
+pam()'s bswap(*, s=8.51931, pamonce=0): medoids given
+  after build: medoids are  1  2  3  5 20
+   swp new 14 <->  2 old; decreasing diss. 29.8745 by -5.50096
+   swp new 15 <->  1 old; decreasing diss. 24.3735 by -2.20162
+   swp new  6 <-> 20 old; decreasing diss. 22.1719 by -2.12745
+   swp new  8 <->  3 old; decreasing diss. 20.0444 by -0.201608
+end{bswap()}, end{cstat()}
+Medoids:
+     ID   
+[1,] 15 15
+[2,]  8  8
+[3,] 14 14
+[4,]  5  5
+[5,]  6  6
+Clustering vector:
+ [1] 1 2 2 3 4 5 2 2 3 5 2 2 2 3 1 2 2 2 1 1 1 4 5
+Objective function:
+    build      swap 
+1.2988899 0.8627319 
+
+Available components:
+[1] "medoids"    "id.med"     "clustering" "objective"  "isolation" 
+[6] "clusinfo"   "silinfo"    "diss"       "call"      
+> 
+> dev.off()
+null device 
+          1 
+> 
+> ##------------------------ Testing pam() with new "pamonce" argument:
+> 
+> ## This is from "next version of Matrix" test-tools-1.R:
+> showSys.time <- function(expr) {
++     ## prepend 'Time' for R CMD Rdiff
++     st <- system.time(expr)
++     writeLines(paste("Time", capture.output(print(st))))
++     invisible(st)
++ }
+> show2Ratios <- function(...) {
++     stopifnot(length(rgs <- list(...)) == 2,
++               nchar(ns <- names(rgs)) > 0)
++     r <- round(cbind(..1, ..2)[c(1,3),], 3)
++     dimnames(r) <- list(paste("Time ", rownames(r)), ns)
++     r
++ }
+> 
+> 
+> n <- 1000
+> ## If not enough cases, all CPU times equals 0.
+> n <- 500 # for now, and automatic testing
+> 
+> sd <- 0.5
+> set.seed(13)
+> n2 <- as.integer(round(n * 1.5))
+> x <- rbind(cbind(rnorm( n,0,sd), rnorm( n,0,sd)),
++            cbind(rnorm(n2,5,sd), rnorm(n2,5,sd)),
++            cbind(rnorm(n2,7,sd), rnorm(n2,7,sd)),
++            cbind(rnorm(n2,9,sd), rnorm(n2,9,sd)))
+> 
+> 
+> ## original algorithm
+> st0 <- showSys.time(pamx      <- pam(x, 4,               trace.lev=2))# 8.157   0.024   8.233
+C pam(): computing 3779876 dissimilarities from  2750 x 2  matrix: [Ok]
+pam()'s bswap(*, s=15.7788, pamonce=0): build 4 medoids:
+    new repr. 1268
+    new repr. 414
+    new repr. 2153
+    new repr. 915
+  after build: medoids are  414  915 1268 2153
+   swp new 1793 <-> 1268 old; decreasing diss. 1862.37 by -129.13
+end{bswap()}, end{cstat()}
+Time    user  system elapsed 
+Time   1.832   0.032   1.893 
+>  ## bswapPamOnce  algorithm
+> st1 <- showSys.time(pamxonce  <- pam(x, 4, pamonce=TRUE, trace.lev=2))# 6.122   0.024   6.181
+C pam(): computing 3779876 dissimilarities from  2750 x 2  matrix: [Ok]
+pam()'s bswap(*, s=15.7788, pamonce=1): build 4 medoids:
+    new repr. 1268
+    new repr. 414
+    new repr. 2153
+    new repr. 915
+  after build: medoids are  414  915 1268 2153
+   swp new 1793 <-> 1268 old; decreasing diss. 1862.37 by -129.13
+end{bswap()}, end{cstat()}
+Time    user  system elapsed 
+Time   1.607   0.024   1.639 
+> ## bswapPamOnceDistIndice
+> st2 <- showSys.time(pamxonce2 <- pam(x, 4, pamonce = 2,  trace.lev=2))# 4.101   0.024   4.151
+C pam(): computing 3779876 dissimilarities from  2750 x 2  matrix: [Ok]
+pam()'s bswap(*, s=15.7788, pamonce=2): build 4 medoids:
+    new repr. 1268
+    new repr. 414
+    new repr. 2153
+    new repr. 915
+  after build: medoids are  414  915 1268 2153
+   swp new 1793 <-> 1268 old; decreasing diss. 1862.37 by -129.13
+end{bswap()}, end{cstat()}
+Time    user  system elapsed 
+Time   1.302   0.000   1.304 
+> show2Ratios('2:orig' = st2/st0, '1:orig' = st1/st0)
+                2:orig 1:orig
+Time  user.self  0.711  0.877
+Time  elapsed    0.689  0.866
+> 
+> ## only call element is not equal
+> (icall <- which(names(pamx) == "call"))
+[1] 9
+> pamx[[icall]]
+pam(x = x, k = 4, trace.lev = 2)
+> stopifnot(all.equal(pamx    [-icall],  pamxonce [-icall]),
++ 	  all.equal(pamxonce[-icall],  pamxonce2[-icall]))
+> 
+> ## Same using specified medoids
+> (med0 <- 1 + round(n* c(0,1, 2.5, 4)))#                                      lynne (~ 2010, AMD Phenom II X4 925)
+[1]    1  501 1251 2001
+> st0 <- showSys.time(pamxst      <- pam(x, 4, medoids = med0,               trace.lev=2))#  13.071   0.024  13.177
+C pam(): computing 3779876 dissimilarities from  2750 x 2  matrix: [Ok]
+pam()'s bswap(*, s=15.7788, pamonce=0): medoids given
+  after build: medoids are    1  501 1251 2001
+   swp new  915 <->  501 old; decreasing diss. 2126.83 by -197.507
+   swp new 1793 <-> 1251 old; decreasing diss. 1929.32 by -101.336
+   swp new  414 <->    1 old; decreasing diss. 1827.98 by -86.3404
+   swp new 2153 <-> 2001 old; decreasing diss. 1741.64 by -8.40201
+end{bswap()}, end{cstat()}
+Time    user  system elapsed 
+Time   2.574   0.004   2.579 
+> st1 <- showSys.time(pamxoncest  <- pam(x, 4, medoids = med0, pamonce=TRUE, trace.lev=2))#   8.503   0.024   8.578
+C pam(): computing 3779876 dissimilarities from  2750 x 2  matrix: [Ok]
+pam()'s bswap(*, s=15.7788, pamonce=1): medoids given
+  after build: medoids are    1  501 1251 2001
+   swp new  915 <->  501 old; decreasing diss. 2126.83 by -197.507
+   swp new 1793 <-> 1251 old; decreasing diss. 1929.32 by -101.336
+   swp new  414 <->    1 old; decreasing diss. 1827.98 by -86.3404
+   swp new 2153 <-> 2001 old; decreasing diss. 1741.64 by -8.40201
+end{bswap()}, end{cstat()}
+Time    user  system elapsed 
+Time   2.121   0.000   2.129 
+> st2 <- showSys.time(pamxonce2st <- pam(x, 4, medoids = med0, pamonce=2,    trace.lev=2))#   5.587   0.025   5.647
+C pam(): computing 3779876 dissimilarities from  2750 x 2  matrix: [Ok]
+pam()'s bswap(*, s=15.7788, pamonce=2): medoids given
+  after build: medoids are    1  501 1251 2001
+   swp new  915 <->  501 old; decreasing diss. 2126.83 by -197.507
+   swp new 1793 <-> 1251 old; decreasing diss. 1929.32 by -101.336
+   swp new  414 <->    1 old; decreasing diss. 1827.98 by -86.3404
+   swp new 2153 <-> 2001 old; decreasing diss. 1741.64 by -8.40201
+end{bswap()}, end{cstat()}
+Time    user  system elapsed 
+Time   1.305   0.004   1.310 
+> show2Ratios('2:orig' = st2/st0, '1:orig' = st1/st0)
+                2:orig 1:orig
+Time  user.self  0.507  0.824
+Time  elapsed    0.508  0.826
+> 
+> ## only call element is not equal
+> stopifnot(all.equal(pamxst    [-icall], pamxoncest [-icall]),
++           all.equal(pamxoncest[-icall], pamxonce2st[-icall]))
+> 
+> ## Different starting values
+> med0 <- 1:4 #                                                               lynne (~ 2010, AMD Phenom II X4 925)
+> st0 <- showSys.time(pamxst      <- pam(x, 4, medoids = med0,               trace.lev=2))# 13.416   0.023  13.529
+C pam(): computing 3779876 dissimilarities from  2750 x 2  matrix: [Ok]
+pam()'s bswap(*, s=15.7788, pamonce=0): medoids given
+  after build: medoids are    1    2    3    4
+   swp new 1421 <->    4 old; decreasing diss. 21009.4 by -15939.9
+   swp new 2153 <->    3 old; decreasing diss. 5069.52 by -1657.88
+   swp new  915 <->    2 old; decreasing diss. 3411.65 by -1592.06
+   swp new  414 <->    1 old; decreasing diss. 1819.59 by -86.3404
+   swp new 1793 <-> 1421 old; decreasing diss. 1733.25 by -0.00639415
+end{bswap()}, end{cstat()}
+Time    user  system elapsed 
+Time   3.087   0.000   3.087 
+> st1 <- showSys.time(pamxoncest  <- pam(x, 4, medoids = med0, pamonce=TRUE, trace.lev=2))#  8.384   0.024   8.459
+C pam(): computing 3779876 dissimilarities from  2750 x 2  matrix: [Ok]
+pam()'s bswap(*, s=15.7788, pamonce=1): medoids given
+  after build: medoids are    1    2    3    4
+   swp new 1421 <->    4 old; decreasing diss. 21009.4 by -15939.9
+   swp new 2153 <->    3 old; decreasing diss. 5069.52 by -1657.88
+   swp new  915 <->    2 old; decreasing diss. 3411.65 by -1592.06
+   swp new  414 <->    1 old; decreasing diss. 1819.59 by -86.3404
+   swp new 1793 <-> 1421 old; decreasing diss. 1733.25 by -0.00639415
+end{bswap()}, end{cstat()}
+Time    user  system elapsed 
+Time   2.487   0.000   2.488 
+> st2 <- showSys.time(pamxonce2st <- pam(x, 4, medoids = med0, pamonce=2,    trace.lev=2))#  5.455   0.030   5.520
+C pam(): computing 3779876 dissimilarities from  2750 x 2  matrix: [Ok]
+pam()'s bswap(*, s=15.7788, pamonce=2): medoids given
+  after build: medoids are    1    2    3    4
+   swp new 1421 <->    4 old; decreasing diss. 21009.4 by -15939.9
+   swp new 2153 <->    3 old; decreasing diss. 5069.52 by -1657.88
+   swp new  915 <->    2 old; decreasing diss. 3411.65 by -1592.06
+   swp new  414 <->    1 old; decreasing diss. 1819.59 by -86.3404
+   swp new 1793 <-> 1421 old; decreasing diss. 1733.25 by -0.00639415
+end{bswap()}, end{cstat()}
+Time    user  system elapsed 
+Time   1.566   0.000   1.568 
+> show2Ratios('2:orig' = st2/st0, '1:orig' = st1/st0)
+                2:orig 1:orig
+Time  user.self  0.507  0.806
+Time  elapsed    0.508  0.806
+> 
+> ## only call element is not equal
+> stopifnot(all.equal(pamxst    [-icall], pamxoncest [-icall]),
++           all.equal(pamxoncest[-icall], pamxonce2st[-icall]))
+> 
+> 
+> ## Medoid bug  --- MM: Fixed, well "0L+ hack", in my pam.q, on 2012-01-31
+> ## ----------
+> med0 <- (1:6)
+> st0 <- showSys.time(pamxst   <- pam(x, 6, medoids = med0 ,            trace.lev=2))
+C pam(): computing 3779876 dissimilarities from  2750 x 2  matrix: [Ok]
+pam()'s bswap(*, s=15.7788, pamonce=0): medoids given
+  after build: medoids are    1    2    3    4    5    6
+   swp new 1421 <->    6 old; decreasing diss. 20991.1 by -15949.5
+   swp new 2153 <->    4 old; decreasing diss. 5041.66 by -1676.25
+   swp new  915 <->    3 old; decreasing diss. 3365.41 by -1671.37
+   swp new  325 <->    2 old; decreasing diss. 1694.04 by -53.8582
+   swp new 2720 <->    5 old; decreasing diss. 1640.18 by -26.6572
+   swp new 2696 <-> 2153 old; decreasing diss. 1613.53 by -19.0531
+   swp new   52 <->    1 old; decreasing diss. 1594.47 by -13.965
+   swp new 2709 <-> 2720 old; decreasing diss. 1580.51 by -5.81848
+   swp new  199 <->  325 old; decreasing diss. 1574.69 by -2.65496
+   swp new  438 <->   52 old; decreasing diss. 1572.03 by -1.77054
+   swp new 2082 <-> 2696 old; decreasing diss. 1570.26 by -0.187256
+end{bswap()}, end{cstat()}
+Time    user  system elapsed 
+Time   9.981   0.004  10.018 
+> stopifnot(identical(med0, 1:6))
+> med0 <- (1:6)
+> st1 <- showSys.time(pamxst.1 <- pam(x, 6, medoids = med0 , pamonce=1, trace.lev=2))
+C pam(): computing 3779876 dissimilarities from  2750 x 2  matrix: [Ok]
+pam()'s bswap(*, s=15.7788, pamonce=1): medoids given
+  after build: medoids are    1    2    3    4    5    6
+   swp new 1421 <->    6 old; decreasing diss. 20991.1 by -15949.5
+   swp new 2153 <->    4 old; decreasing diss. 5041.66 by -1676.25
+   swp new  915 <->    3 old; decreasing diss. 3365.41 by -1671.37
+   swp new  325 <->    2 old; decreasing diss. 1694.04 by -53.8582
+   swp new 2720 <->    5 old; decreasing diss. 1640.18 by -26.6572
+   swp new 2696 <-> 2153 old; decreasing diss. 1613.53 by -19.0531
+   swp new   52 <->    1 old; decreasing diss. 1594.47 by -13.965
+   swp new 2709 <-> 2720 old; decreasing diss. 1580.51 by -5.81848
+   swp new  199 <->  325 old; decreasing diss. 1574.69 by -2.65496
+   swp new  438 <->   52 old; decreasing diss. 1572.03 by -1.77054
+   swp new 2082 <-> 2696 old; decreasing diss. 1570.26 by -0.187256
+end{bswap()}, end{cstat()}
+Time    user  system elapsed 
+Time   6.703   0.000   6.713 
+> stopifnot(identical(med0, 1:6))
+> stopifnot(all.equal(pamxst[-icall], pamxst.1 [-icall]))
+> 
+> 
+> ## Last Line:
+> cat('Time elapsed: ', proc.time() - .proctime00,'\n')
+Time elapsed:  36.876 0.112 37.177 0 0 
+> 
+> 
+> proc.time()
+   user  system elapsed 
+ 37.116   0.156  37.452 
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/clara.Rout.save
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/clara.Rout.save	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/clara.Rout.save	(revision 2477)
@@ -0,0 +1,1492 @@
+
+R Under development (unstable) (2015-01-20 r67564) -- "Unsuffered Consequences"
+Copyright (C) 2015 The R Foundation for Statistical Computing
+Platform: x86_64-unknown-linux-gnu (64-bit)
+
+R is free software and comes with ABSOLUTELY NO WARRANTY.
+You are welcome to redistribute it under certain conditions.
+Type 'license()' or 'licence()' for distribution details.
+
+R is a collaborative project with many contributors.
+Type 'contributors()' for more information and
+'citation()' on how to cite R or R packages in publications.
+
+Type 'demo()' for some demos, 'help()' for on-line help, or
+'help.start()' for an HTML browser interface to help.
+Type 'q()' to quit R.
+
+> library(cluster)
+> 
+> ## generate 1500 objects, divided into 2 clusters.
+> set.seed(144)
+> x <- rbind(cbind(rnorm(700, 0,8), rnorm(700, 0,8)),
++            cbind(rnorm(800,50,8), rnorm(800,10,8)))
+> 
+> isEq <- function(x,y, epsF = 100)
++     is.logical(r <- all.equal(x,y, tol = epsF * .Machine$double.eps)) && r
+> 
+> .proctime00 <- proc.time()
+> 
+> ## full size sample {should be = pam()}:
+> n0 <- length(iSml <- c(1:70, 701:720))
+> summary(clara0 <- clara(x[iSml,], k = 2, sampsize = n0))
+Object of class 'clara' from call:
+ clara(x = x[iSml, ], k = 2, sampsize = n0) 
+Medoids:
+          [,1]      [,2]
+[1,] -1.499522 -1.944452
+[2,] 48.629631 12.998515
+Objective function:	  10.23588 
+Numerical information per cluster:
+     size max_diss  av_diss isolation
+[1,]   70 24.81995 10.25745 0.4744879
+[2,]   20 19.07782 10.16040 0.3647145
+Average silhouette width per cluster:
+[1] 0.7144587 0.7090915
+Average silhouette width of best sample: 0.713266 
+
+Best sample:
+ [1]  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] 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
+[51] 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
+[76] 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
+Clustering vector:
+ [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
+[39] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2
+[77] 2 2 2 2 2 2 2 2 2 2 2 2 2 2
+
+Silhouette plot information for best sample:
+   cluster neighbor sil_width
+45       1        2 0.8033727
+60       1        2 0.8021017
+55       1        2 0.8005931
+66       1        2 0.8002776
+58       1        2 0.7991899
+11       1        2 0.7991773
+41       1        2 0.7973302
+26       1        2 0.7962397
+63       1        2 0.7962229
+13       1        2 0.7949705
+67       1        2 0.7942590
+54       1        2 0.7936184
+17       1        2 0.7916087
+16       1        2 0.7913570
+39       1        2 0.7912755
+6        1        2 0.7840455
+34       1        2 0.7833568
+49       1        2 0.7819733
+9        1        2 0.7789087
+23       1        2 0.7785009
+32       1        2 0.7757325
+22       1        2 0.7655369
+61       1        2 0.7639754
+12       1        2 0.7639644
+5        1        2 0.7606436
+18       1        2 0.7579145
+56       1        2 0.7566307
+3        1        2 0.7537894
+24       1        2 0.7531180
+50       1        2 0.7517817
+48       1        2 0.7501998
+25       1        2 0.7499655
+59       1        2 0.7472022
+19       1        2 0.7445038
+65       1        2 0.7398395
+28       1        2 0.7377377
+38       1        2 0.7370935
+7        1        2 0.7335940
+40       1        2 0.7310012
+14       1        2 0.7294895
+62       1        2 0.7254478
+70       1        2 0.7163214
+4        1        2 0.7157257
+21       1        2 0.7148663
+64       1        2 0.7108496
+2        1        2 0.7062831
+15       1        2 0.7015120
+52       1        2 0.6978313
+37       1        2 0.6954023
+31       1        2 0.6932905
+33       1        2 0.6888478
+10       1        2 0.6805028
+20       1        2 0.6766854
+43       1        2 0.6761461
+8        1        2 0.6749706
+27       1        2 0.6671817
+35       1        2 0.6632888
+68       1        2 0.6587599
+30       1        2 0.6554989
+36       1        2 0.6228481
+53       1        2 0.6203313
+57       1        2 0.6191666
+42       1        2 0.6142020
+47       1        2 0.6024151
+1        1        2 0.5814464
+69       1        2 0.5091186
+46       1        2 0.4961302
+44       1        2 0.4849961
+29       1        2 0.4569316
+51       1        2 0.4230181
+81       2        1 0.7965942
+71       2        1 0.7961971
+85       2        1 0.7919593
+74       2        1 0.7869047
+82       2        1 0.7795304
+78       2        1 0.7788873
+79       2        1 0.7729041
+72       2        1 0.7492980
+88       2        1 0.7447973
+87       2        1 0.7404399
+76       2        1 0.7352351
+77       2        1 0.7216838
+86       2        1 0.7165677
+84       2        1 0.6952406
+73       2        1 0.6942882
+83       2        1 0.6621568
+80       2        1 0.6368446
+90       2        1 0.5743228
+75       2        1 0.5597232
+89       2        1 0.4482549
+
+4005 dissimilarities, summarized :
+    Min.  1st Qu.   Median     Mean  3rd Qu.     Max. 
+ 0.18647 11.58500 20.05800 27.81500 45.57800 85.23200 
+Metric :  euclidean 
+Number of objects : 90
+
+Available components:
+ [1] "sample"     "medoids"    "i.med"      "clustering" "objective" 
+ [6] "clusinfo"   "diss"       "call"       "silinfo"    "data"      
+>           pam0 <- pam  (x[iSml,], k = 2)
+> stopifnot(identical(clara0$clustering, pam0$clustering)
++         , isEq(clara0$objective, unname(pam0$objective[2]))
++           )
+> 
+> summary(clara2 <- clara(x, 2))
+Object of class 'clara' from call:
+ clara(x = x, k = 2) 
+Medoids:
+          [,1]      [,2]
+[1,]  2.012828 -1.896095
+[2,] 51.494628 10.274769
+Objective function:	  10.23445 
+Numerical information per cluster:
+     size max_diss  av_diss isolation
+[1,]  700 36.84408 10.49814 0.7230478
+[2,]  800 30.89896 10.00373 0.6063775
+Average silhouette width per cluster:
+[1] 0.7562366 0.7203254
+Average silhouette width of best sample: 0.733384 
+
+Best sample:
+ [1]   21   23   50   97  142  168  191  192  197  224  325  328  433  458  471
+[16]  651  712  714  722  797  805  837  909  919  926  999 1006 1018 1019 1049
+[31] 1081 1084 1132 1144 1150 1201 1207 1250 1291 1307 1330 1374 1426 1428
+Clustering vector:
+   [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
+  [38] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
+  [75] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
+ [112] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
+ [149] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
+ [186] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
+ [223] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
+ [260] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
+ [297] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
+ [334] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
+ [371] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
+ [408] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
+ [445] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
+ [482] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
+ [519] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
+ [556] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
+ [593] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
+ [630] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
+ [667] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2
+ [704] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
+ [741] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
+ [778] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
+ [815] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
+ [852] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
+ [889] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
+ [926] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
+ [963] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
+[1000] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
+[1037] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
+[1074] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
+[1111] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
+[1148] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
+[1185] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
+[1222] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
+[1259] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
+[1296] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
+[1333] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
+[1370] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
+[1407] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
+[1444] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
+[1481] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
+
+Silhouette plot information for best sample:
+     cluster neighbor sil_width
+325        1        2 0.8261589
+191        1        2 0.8206687
+23         1        2 0.8149640
+97         1        2 0.8048084
+433        1        2 0.8017745
+458        1        2 0.8008324
+471        1        2 0.7958547
+328        1        2 0.7689099
+142        1        2 0.7619508
+21         1        2 0.7607528
+197        1        2 0.7606641
+50         1        2 0.7509131
+192        1        2 0.7098473
+651        1        2 0.7035969
+224        1        2 0.6843886
+168        1        2 0.5337006
+1084       2        1 0.8180447
+1081       2        1 0.8171686
+1201       2        1 0.8170847
+1291       2        1 0.8167148
+1307       2        1 0.8166841
+1144       2        1 0.8159947
+999        2        1 0.8135303
+1426       2        1 0.8023538
+1049       2        1 0.8022891
+1250       2        1 0.8014300
+712        2        1 0.7859324
+837        2        1 0.7792784
+1018       2        1 0.7764837
+919        2        1 0.7651939
+1374       2        1 0.7648534
+1428       2        1 0.7516819
+1330       2        1 0.7505861
+1006       2        1 0.7368113
+714        2        1 0.7237565
+1150       2        1 0.7046060
+1132       2        1 0.6940608
+909        2        1 0.6859682
+926        2        1 0.6725631
+722        2        1 0.6572791
+797        2        1 0.6395698
+1019       2        1 0.6083662
+805        2        1 0.2814164
+1207       2        1 0.2694097
+
+946 dissimilarities, summarized :
+    Min.  1st Qu.   Median     Mean  3rd Qu.     Max. 
+ 0.48462 12.32300 26.49900 32.21300 52.39100 77.17500 
+Metric :  euclidean 
+Number of objects : 44
+
+Available components:
+ [1] "sample"     "medoids"    "i.med"      "clustering" "objective" 
+ [6] "clusinfo"   "diss"       "call"       "silinfo"    "data"      
+> 
+> clInd <- c("objective", "i.med", "medoids", "clusinfo")
+> clInS <- c(clInd, "sample")
+> ## clara() {as original code} always draws the *same* random samples !!!!
+> clara(x, 2, samples = 50)[clInd]
+$objective
+[1] 10.06735
+
+$i.med
+[1]  177 1115
+
+$medoids
+           [,1]      [,2]
+[1,] -0.2538744 -1.209148
+[2,] 50.0372683  9.501125
+
+$clusinfo
+     size max_diss   av_diss isolation
+[1,]  700 34.67208 10.193945 0.6743054
+[2,]  800 29.51964  9.956571 0.5741003
+
+> for(i in 1:20)
++     print(clara(x[sample(nrow(x)),], 2, samples = 50)[clInd])
+$objective
+[1] 10.05727
+
+$i.med
+[1] 936 192
+
+$medoids
+            [,1]         [,2]
+[1,] 50.03726827  9.501124850
+[2,] -0.03900399 -0.009078886
+
+$clusinfo
+     size max_diss   av_diss isolation
+[1,]  800 29.51964  9.956571 0.5791419
+[2,]  700 34.06055 10.172348 0.6682295
+
+$objective
+[1] 10.05296
+
+$i.med
+[1]  468 1394
+
+$medoids
+           [,1]       [,2]
+[1,] -0.3292826 -0.2398794
+[2,] 50.0372683  9.5011249
+
+$clusinfo
+     size max_diss   av_diss isolation
+[1,]  700 33.98451 10.163128 0.6624677
+[2,]  800 29.51964  9.956571 0.5754330
+
+$objective
+[1] 10.05852
+
+$i.med
+[1] 1171  379
+
+$medoids
+           [,1]       [,2]
+[1,] 50.9444060  9.6723175
+[2,] -0.3292826 -0.2398794
+
+$clusinfo
+     size max_diss   av_diss isolation
+[1,]  800 30.10388  9.966988 0.5764486
+[2,]  700 33.98451 10.163128 0.6507574
+
+$objective
+[1] 10.07051
+
+$i.med
+[1]   75 1254
+
+$medoids
+           [,1]      [,2]
+[1,] -0.9493373 0.3552542
+[2,] 50.5455985 9.3904972
+
+$clusinfo
+     size max_diss   av_diss isolation
+[1,]  700 33.12704 10.191999 0.6336273
+[2,]  800 29.66384  9.964205 0.5673860
+
+$objective
+[1] 10.0613
+
+$i.med
+[1] 199 134
+
+$medoids
+            [,1]         [,2]
+[1,] -0.03900399 -0.009078886
+[2,] 49.59384120  9.792964832
+
+$clusinfo
+     size max_diss   av_diss isolation
+[1,]  700 34.06055 10.172348 0.6732466
+[2,]  800 29.57491  9.964138 0.5845827
+
+$objective
+[1] 10.06101
+
+$i.med
+[1] 1453 1122
+
+$medoids
+           [,1]       [,2]
+[1,] 50.0372683 9.50112485
+[2,] -0.9691441 0.03342515
+
+$clusinfo
+     size max_diss   av_diss isolation
+[1,]  800 29.51964  9.956571 0.5690241
+[2,]  700 33.31923 10.180359 0.6422655
+
+$objective
+[1] 10.08603
+
+$i.med
+[1] 613 318
+
+$medoids
+           [,1]     [,2]
+[1,] 50.0627056 9.478225
+[2,] -0.2902194 1.026496
+
+$clusinfo
+     size max_diss   av_diss isolation
+[1,]  800 29.51131  9.957225 0.5780037
+[2,]  700 33.21560 10.233240 0.6505552
+
+$objective
+[1] 10.07293
+
+$i.med
+[1] 618 406
+
+$medoids
+           [,1]       [,2]
+[1,] 50.3621263  9.0207185
+[2,] -0.2092816 -0.5916053
+
+$clusinfo
+     size max_diss   av_diss isolation
+[1,]  800 29.25143  9.990206 0.5682446
+[2,]  700 34.30301 10.167473 0.6663777
+
+$objective
+[1] 10.0592
+
+$i.med
+[1] 1279 1349
+
+$medoids
+           [,1]        [,2]
+[1,] 50.1502433 10.60358224
+[2,] -0.9691441  0.03342515
+
+$clusinfo
+     size max_diss   av_diss isolation
+[1,]  800 30.54975  9.953191 0.5852356
+[2,]  700 33.31923 10.180359 0.6382900
+
+$objective
+[1] 10.06241
+
+$i.med
+[1] 1293   21
+
+$medoids
+           [,1]      [,2]
+[1,] 50.5809098 9.7418386
+[2,] -0.9493373 0.3552542
+
+$clusinfo
+     size max_diss   av_diss isolation
+[1,]  800 29.98892  9.949013 0.5725461
+[2,]  700 33.12704 10.191999 0.6324587
+
+$objective
+[1] 10.0592
+
+$i.med
+[1] 337 675
+
+$medoids
+           [,1]        [,2]
+[1,] -0.9691441  0.03342515
+[2,] 50.1502433 10.60358224
+
+$clusinfo
+     size max_diss   av_diss isolation
+[1,]  700 33.31923 10.180359 0.6382900
+[2,]  800 30.54975  9.953191 0.5852356
+
+$objective
+[1] 10.05697
+
+$i.med
+[1]  22 574
+
+$medoids
+           [,1]       [,2]
+[1,] 50.5809098 9.74183863
+[2,] -0.9691441 0.03342515
+
+$clusinfo
+     size max_diss   av_diss isolation
+[1,]  800 29.98892  9.949013 0.5716937
+[2,]  700 33.31923 10.180359 0.6351809
+
+$objective
+[1] 10.05096
+
+$i.med
+[1] 739 808
+
+$medoids
+           [,1]       [,2]
+[1,] 50.5809098  9.7418386
+[2,] -0.2092816 -0.5916053
+
+$clusinfo
+     size max_diss   av_diss isolation
+[1,]  800 29.98892  9.949013 0.5785936
+[2,]  700 34.30301 10.167473 0.6618278
+
+$objective
+[1] 10.06135
+
+$i.med
+[1] 1431  485
+
+$medoids
+           [,1]       [,2]
+[1,] 50.0627056 9.47822525
+[2,] -0.9691441 0.03342515
+
+$clusinfo
+     size max_diss   av_diss isolation
+[1,]  800 29.51131  9.957225 0.5686352
+[2,]  700 33.31923 10.180359 0.6420076
+
+$objective
+[1] 10.05324
+
+$i.med
+[1]   10 1221
+
+$medoids
+            [,1]         [,2]
+[1,] 50.58090982  9.741838628
+[2,] -0.03900399 -0.009078886
+
+$clusinfo
+     size max_diss   av_diss isolation
+[1,]  800 29.98892  9.949013 0.5817385
+[2,]  700 34.06055 10.172348 0.6607218
+
+$objective
+[1] 10.06101
+
+$i.med
+[1] 1249 1411
+
+$medoids
+           [,1]       [,2]
+[1,] -0.9691441 0.03342515
+[2,] 50.0372683 9.50112485
+
+$clusinfo
+     size max_diss   av_diss isolation
+[1,]  700 33.31923 10.180359 0.6422655
+[2,]  800 29.51964  9.956571 0.5690241
+
+$objective
+[1] 10.05296
+
+$i.med
+[1] 610  21
+
+$medoids
+           [,1]       [,2]
+[1,] -0.3292826 -0.2398794
+[2,] 50.0372683  9.5011249
+
+$clusinfo
+     size max_diss   av_diss isolation
+[1,]  700 33.98451 10.163128 0.6624677
+[2,]  800 29.51964  9.956571 0.5754330
+
+$objective
+[1] 10.06486
+
+$i.med
+[1] 1101  397
+
+$medoids
+           [,1]       [,2]
+[1,] -0.9691441 0.03342515
+[2,] 50.1066826 9.35514422
+
+$clusinfo
+     size max_diss   av_diss isolation
+[1,]  700 33.31923 10.180359 0.6417479
+[2,]  800 29.42336  9.963794 0.5667111
+
+$objective
+[1] 10.07521
+
+$i.med
+[1] 838 356
+
+$medoids
+            [,1]         [,2]
+[1,] 50.36212634  9.020718482
+[2,] -0.03900399 -0.009078886
+
+$clusinfo
+     size max_diss   av_diss isolation
+[1,]  800 29.25143  9.990206 0.5712766
+[2,]  700 34.06055 10.172348 0.6651980
+
+$objective
+[1] 10.05906
+
+$i.med
+[1] 1270 1024
+
+$medoids
+           [,1]       [,2]
+[1,] 50.5455985  9.3904972
+[2,] -0.2092816 -0.5916053
+
+$clusinfo
+     size max_diss   av_diss isolation
+[1,]  800 29.66384  9.964205 0.5734673
+[2,]  700 34.30301 10.167473 0.6631526
+
+> 
+> clara(x, 2, samples = 101)[clInd]
+$objective
+[1] 10.05727
+
+$i.med
+[1]  286 1115
+
+$medoids
+            [,1]         [,2]
+[1,] -0.03900399 -0.009078886
+[2,] 50.03726827  9.501124850
+
+$clusinfo
+     size max_diss   av_diss isolation
+[1,]  700 34.06055 10.172348 0.6682295
+[2,]  800 29.51964  9.956571 0.5791419
+
+> clara(x, 2, samples = 149)[clInd]
+$objective
+[1] 10.05319
+
+$i.med
+[1]  238 1272
+
+$medoids
+           [,1]       [,2]
+[1,] -0.2092816 -0.5916053
+[2,] 50.1502433 10.6035822
+
+$clusinfo
+     size max_diss   av_diss isolation
+[1,]  700 34.30301 10.167473 0.6649301
+[2,]  800 30.54975  9.953191 0.5921768
+
+> clara(x, 2, samples = 200)[clInd]
+$objective
+[1] 10.05319
+
+$i.med
+[1]  238 1272
+
+$medoids
+           [,1]       [,2]
+[1,] -0.2092816 -0.5916053
+[2,] 50.1502433 10.6035822
+
+$clusinfo
+     size max_diss   av_diss isolation
+[1,]  700 34.30301 10.167473 0.6649301
+[2,]  800 30.54975  9.953191 0.5921768
+
+> ## Note that this last one is practically identical to the slower  pam() one
+> 
+> (ii <- sample(length(x), 20))
+ [1]  249  452 2663 2537 2235 2421 1004 1834 2602  397  717 2805 1575 1281  283
+[16] 1657 1749  820  269  519
+> ## This was bogous (and lead to seg.faults); now properly gives error.
+> ## but for these, now see  ./clara-NAs.R
+> if(FALSE) { ##		   ~~~~~~~~~~~~~
++     x[ii] <- NA
++     try( clara(x, 2, samples = 50) )
++ }
+> 
+> ###-- Larger example: 2000 objects, divided into 5 clusters.
+> x5 <- rbind(cbind(rnorm(400, 0,4), rnorm(400, 0,4)),
++             cbind(rnorm(400,10,8), rnorm(400,40,6)),
++             cbind(rnorm(400,30,4), rnorm(400, 0,4)),
++             cbind(rnorm(400,40,4), rnorm(400,20,2)),
++             cbind(rnorm(400,50,4), rnorm(400,50,4)))
+> ## plus 1 random dimension
+> x5 <- cbind(x5, rnorm(nrow(x5)))
+> 
+> clara(x5, 5)
+Call:	 clara(x = x5, k = 5) 
+Medoids:
+           [,1]      [,2]        [,3]
+[1,]  0.5850466 -2.222194 -0.63631241
+[2,]  8.0131143 42.708122 -0.31693240
+[3,] 42.6657812 21.123133 -0.62411426
+[4,] 50.6470292 48.480686 -0.09146223
+[5,] 28.6470950 -2.544131 -0.22186047
+Objective function:	 6.100721
+Clustering vector: 	 int [1:2000] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
+Cluster sizes:	    	 400 396 408 401 395 
+Best sample:
+ [1]   23  130  178  202  267  297  338  357  376  387  439  441  638  647  662
+[16]  719  723  802  874  880  994 1038 1056 1097 1184 1215 1225 1268 1271 1282
+[31] 1346 1442 1446 1474 1496 1515 1585 1590 1605 1641 1680 1687 1696 1728 1742
+[46] 1761 1857 1909 1951 1956
+
+Available components:
+ [1] "sample"     "medoids"    "i.med"      "clustering" "objective" 
+ [6] "clusinfo"   "diss"       "call"       "silinfo"    "data"      
+> summary(clara(x5, 5, samples = 50))
+Object of class 'clara' from call:
+ clara(x = x5, k = 5, samples = 50) 
+Medoids:
+           [,1]       [,2]        [,3]
+[1,] -0.8427864  0.1606105 -0.70362181
+[2,] 12.0389703 39.0303445  0.19158023
+[3,] 39.6341676 20.7182868  0.43978514
+[4,] 50.6470292 48.4806864 -0.09146223
+[5,] 30.6814242 -0.1072177 -0.25861548
+Objective function:	  5.743812 
+Numerical information per cluster:
+     size max_diss  av_diss isolation
+[1,]  400 15.20728 5.207177 0.4823345
+[2,]  397 24.25898 8.677062 0.7324727
+[3,]  406 18.39064 4.369617 0.8109074
+[4,]  401 18.28050 5.260543 0.6119680
+[5,]  396 12.69653 5.243478 0.5598344
+Average silhouette width per cluster:
+[1] 0.7433532 0.6956424 0.7315944 0.7336104 0.7079360
+Average silhouette width of best sample: 0.7188531 
+
+Best sample:
+ [1]  106  130  145  213  275  316  434  444  486  501  630  693  713  739  773
+[16]  804  808  821  823  899  914  948  961  972  980  987 1076 1114 1126 1127
+[31] 1169 1175 1203 1225 1228 1242 1269 1397 1405 1421 1595 1606 1658 1703 1777
+[46] 1834 1857 1881 1937 1999
+Clustering vector:
+   [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
+  [38] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
+  [75] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
+ [112] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
+ [149] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
+ [186] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
+ [223] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
+ [260] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
+ [297] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
+ [334] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
+ [371] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2
+ [408] 2 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
+ [445] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
+ [482] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
+ [519] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
+ [556] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
+ [593] 2 2 2 2 3 2 2 2 2 2 2 2 2 2 2 4 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
+ [630] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
+ [667] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
+ [704] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
+ [741] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
+ [778] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 5 5 5 5 5 5 5 5 5 5 5 5 5 5
+ [815] 5 3 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
+ [852] 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 3 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
+ [889] 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
+ [926] 5 5 5 5 5 5 5 5 5 3 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
+ [963] 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
+[1000] 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
+[1037] 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
+[1074] 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 3 5 5 5 5 5 5 5 5 5 5 5 5 5 5
+[1111] 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
+[1148] 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
+[1185] 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
+[1222] 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
+[1259] 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
+[1296] 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
+[1333] 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
+[1370] 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
+[1407] 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
+[1444] 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
+[1481] 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
+[1518] 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
+[1555] 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
+[1592] 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
+[1629] 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
+[1666] 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
+[1703] 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
+[1740] 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
+[1777] 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
+[1814] 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
+[1851] 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
+[1888] 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
+[1925] 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
+[1962] 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
+[1999] 4 4
+
+Silhouette plot information for best sample:
+     cluster neighbor sil_width
+130        1        5 0.8123353
+275        1        5 0.7945197
+316        1        5 0.7561799
+213        1        5 0.7459412
+106        1        5 0.6869957
+145        1        5 0.6641473
+630        2        3 0.7819320
+739        2        3 0.7774128
+486        2        3 0.7559683
+713        2        3 0.7316982
+444        2        3 0.7204625
+501        2        3 0.7091146
+773        2        1 0.6886472
+693        2        3 0.5855803
+434        2        3 0.5099654
+1225       3        5 0.8105776
+1203       3        5 0.7965773
+1595       3        5 0.7842711
+1269       3        5 0.7799931
+1242       3        5 0.7625442
+1397       3        5 0.7315512
+1228       3        5 0.7262025
+1421       3        5 0.6011616
+1405       3        5 0.5914707
+1999       4        3 0.8050046
+1857       4        3 0.8030709
+1658       4        3 0.7941141
+1777       4        3 0.7865209
+1937       4        3 0.7831996
+1881       4        3 0.7504779
+1834       4        3 0.6614223
+1606       4        3 0.6373808
+1703       4        3 0.5813025
+804        5        3 0.8021043
+987        5        3 0.7999064
+1076       5        3 0.7907769
+948        5        3 0.7905304
+961        5        3 0.7716289
+823        5        3 0.7657693
+808        5        3 0.7510670
+914        5        3 0.7358231
+1175       5        3 0.7337485
+1169       5        3 0.7254812
+972        5        3 0.7118795
+821        5        3 0.7101558
+899        5        1 0.6580927
+1114       5        3 0.6552887
+1127       5        3 0.6292428
+1126       5        3 0.5362475
+980        5        1 0.4671695
+
+1225 dissimilarities, summarized :
+    Min.  1st Qu.   Median     Mean  3rd Qu.     Max. 
+ 0.69682 19.31600 34.09200 33.07000 46.25400 92.25300 
+Metric :  euclidean 
+Number of objects : 50
+
+Available components:
+ [1] "sample"     "medoids"    "i.med"      "clustering" "objective" 
+ [6] "clusinfo"   "diss"       "call"       "silinfo"    "data"      
+> ## 3 "half" samples:
+> clara(x5, 5, samples = 999)
+Call:	 clara(x = x5, k = 5, samples = 999) 
+Medoids:
+           [,1]       [,2]        [,3]
+[1,]  0.2143499  0.3891695  0.45577894
+[2,] 10.9779485 39.6788652 -0.23487762
+[3,] 40.2944064 20.2221253  0.21417849
+[4,] 50.7170411 49.7645642 -0.43318939
+[5,] 29.7257398 -0.5981739 -0.05616701
+Objective function:	 5.659041
+Clustering vector: 	 int [1:2000] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
+Cluster sizes:	    	 400 397 407 401 395 
+Best sample:
+ [1]    1    2  103  147  155  176  179  247  262  288  365  369  372  470  486
+[16]  573  759  779  785  791  797  822  875  883  913  954 1107 1114 1154 1156
+[31] 1171 1175 1206 1213 1218 1233 1243 1394 1439 1444 1512 1741 1777 1798 1800
+[46] 1818 1845 1946 1948 1973
+
+Available components:
+ [1] "sample"     "medoids"    "i.med"      "clustering" "objective" 
+ [6] "clusinfo"   "diss"       "call"       "silinfo"    "data"      
+> clara(x5, 5, samples = 1000)
+Call:	 clara(x = x5, k = 5, samples = 1000) 
+Medoids:
+           [,1]       [,2]        [,3]
+[1,]  0.2143499  0.3891695  0.45577894
+[2,] 10.9779485 39.6788652 -0.23487762
+[3,] 40.2944064 20.2221253  0.21417849
+[4,] 50.7170411 49.7645642 -0.43318939
+[5,] 29.7257398 -0.5981739 -0.05616701
+Objective function:	 5.659041
+Clustering vector: 	 int [1:2000] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
+Cluster sizes:	    	 400 397 407 401 395 
+Best sample:
+ [1]    1    2  103  147  155  176  179  247  262  288  365  369  372  470  486
+[16]  573  759  779  785  791  797  822  875  883  913  954 1107 1114 1154 1156
+[31] 1171 1175 1206 1213 1218 1233 1243 1394 1439 1444 1512 1741 1777 1798 1800
+[46] 1818 1845 1946 1948 1973
+
+Available components:
+ [1] "sample"     "medoids"    "i.med"      "clustering" "objective" 
+ [6] "clusinfo"   "diss"       "call"       "silinfo"    "data"      
+> clara(x5, 5, samples = 1001)
+Call:	 clara(x = x5, k = 5, samples = 1001) 
+Medoids:
+           [,1]       [,2]        [,3]
+[1,]  0.2143499  0.3891695  0.45577894
+[2,] 10.9779485 39.6788652 -0.23487762
+[3,] 40.2944064 20.2221253  0.21417849
+[4,] 50.7170411 49.7645642 -0.43318939
+[5,] 29.7257398 -0.5981739 -0.05616701
+Objective function:	 5.659041
+Clustering vector: 	 int [1:2000] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
+Cluster sizes:	    	 400 397 407 401 395 
+Best sample:
+ [1]    1    2  103  147  155  176  179  247  262  288  365  369  372  470  486
+[16]  573  759  779  785  791  797  822  875  883  913  954 1107 1114 1154 1156
+[31] 1171 1175 1206 1213 1218 1233 1243 1394 1439 1444 1512 1741 1777 1798 1800
+[46] 1818 1845 1946 1948 1973
+
+Available components:
+ [1] "sample"     "medoids"    "i.med"      "clustering" "objective" 
+ [6] "clusinfo"   "diss"       "call"       "silinfo"    "data"      
+> 
+> clara(x5, 5, samples = 2000)#full sample
+Call:	 clara(x = x5, k = 5, samples = 2000) 
+Medoids:
+           [,1]       [,2]        [,3]
+[1,]  0.2143499  0.3891695  0.45577894
+[2,] 10.5993345 39.8970536 -0.39199265
+[3,] 40.3370139 20.3148331 -0.06033818
+[4,] 50.7170411 49.7645642 -0.43318939
+[5,] 29.7257398 -0.5981739 -0.05616701
+Objective function:	 5.65785
+Clustering vector: 	 int [1:2000] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
+Cluster sizes:	    	 400 397 407 401 395 
+Best sample:
+ [1]   84  106  164  226  284  288  329  423  430  450  469  593  603  654  742
+[16]  887  929  970  974 1035 1043 1096 1171 1187 1192 1302 1307 1327 1371 1431
+[31] 1433 1439 1440 1452 1513 1522 1525 1548 1565 1593 1620 1639 1654 1688 1740
+[46] 1761 1832 1845 1895 1899
+
+Available components:
+ [1] "sample"     "medoids"    "i.med"      "clustering" "objective" 
+ [6] "clusinfo"   "diss"       "call"       "silinfo"    "data"      
+> 
+> ###--- Start a version of  example(clara) -------
+> 
+> ## xclara : artificial data with 3 clusters of 1000 bivariate objects each.
+> data(xclara)
+> (clx3 <- clara(xclara, 3))
+Call:	 clara(x = xclara, k = 3) 
+Medoids:
+            V1        V2
+[1,]  5.553391 13.306260
+[2,] 43.198760 60.360720
+[3,] 74.591890 -6.969018
+Objective function:	 13.225
+Clustering vector: 	 int [1:3000] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
+Cluster sizes:	    	 900 1148 952 
+Best sample:
+ [1]   20   30   46   91   92  169  179  187  209  223  382  450  555  971 1004
+[16] 1025 1058 1277 1281 1302 1319 1361 1362 1513 1591 1623 1628 1729 1752 1791
+[31] 1907 1917 1946 2064 2089 2498 2527 2537 2545 2591 2672 2722 2729 2790 2797
+[46] 2852
+
+Available components:
+ [1] "sample"     "medoids"    "i.med"      "clustering" "objective" 
+ [6] "clusinfo"   "diss"       "call"       "silinfo"    "data"      
+> ## Plot similar to Figure 5 in Struyf et al (1996)
+> plot(clx3)
+> 
+> ## The  rngR = TRUE case is currently in the non-strict tests
+> ## ./clara-ex.R
+> ## ~~~~~~~~~~~~
+> 
+> ###--- End version of example(clara) -------
+> 
+> ##  small example(s):
+> data(ruspini)
+> 
+> clara(ruspini,4)
+Call:	 clara(x = ruspini, k = 4) 
+Medoids:
+    x   y
+10 19  65
+32 44 149
+52 99 119
+67 66  18
+Objective function:	 11.51066
+Clustering vector: 	 Named int [1:75] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
+ - attr(*, "names")= chr [1:75] "1" "2" "3" "4" "5" "6" "7" ...
+Cluster sizes:	    	 20 23 17 15 
+Best sample:
+ [1] 2  3  4  5  6  7  8  9  10 16 18 19 20 21 22 23 25 29 30 32 34 35 36 37 41
+[26] 42 43 44 46 47 49 50 52 53 54 58 59 60 61 63 65 66 67 69 71 72 73 75
+
+Available components:
+ [1] "sample"     "medoids"    "i.med"      "clustering" "objective" 
+ [6] "clusinfo"   "diss"       "call"       "silinfo"    "data"      
+> 
+> rus <- data.matrix(ruspini); storage.mode(rus) <- "double"
+> ru2 <- rus[c(1:7,21:28, 45:51, 61:69),]
+> ru3 <- rus[c(1:4,21:25, 45:48, 61:63),]
+> ru4 <- rus[c(1:2,21:22, 45:47),]
+> ru5 <- rus[c(1:2,21,    45),]
+> daisy(ru5, "manhattan")
+Dissimilarities :
+     1   2  21
+2   11        
+21 118 107    
+45 143 132  89
+
+Metric :  manhattan 
+Number of objects : 4
+> ## Dissimilarities :  11 118 143 107 132  89
+> 
+> ## no problem anymore, since 2002-12-28:
+> ## sampsize >= k+1 is now enforced:
+> ## clara(ru5, k=3, met="manhattan", sampsize=3,trace=2)[clInS]
+> clara(ru5, k=3, met="manhattan", sampsize=4,trace=1)[clInS]
+C clara(): (nsam,nran,n) = (4,5,4); 'full_sample',
+C clara(): sample 1 C clara(): best sample _found_  --> dysta2(nbest), resul(), end
+$objective
+[1] 2.75
+
+$i.med
+[1] 2 3 4
+
+$medoids
+    x   y
+2   5  63
+21 28 147
+45 85 115
+
+$clusinfo
+     size max_diss av_diss isolation
+[1,]    2       11     5.5 0.1028037
+[2,]    1        0     0.0 0.0000000
+[3,]    1        0     0.0 0.0000000
+
+$sample
+[1] "1"  "2"  "21" "45"
+
+> 
+> daisy(ru4, "manhattan")
+Dissimilarities :
+     1   2  21  22  45  46
+2   11                    
+21 118 107                
+22 124 113   6            
+45 143 132  89  87        
+46 124 113 108 106  19    
+47 115 104 103 101  28   9
+
+Metric :  manhattan 
+Number of objects : 7
+> ## this one (k=3) gave problems, from ss = 6 on ___ still after 2002-12-28 ___ :
+> for(ss in 4:nrow(ru4)){
++     cat("---\n\nsample size = ",ss,"\n")
++     print(clara(ru4,k=3,met="manhattan",sampsize=ss)[clInS])
++ }
+---
+
+sample size =  4 
+$objective
+[1] 7.714286
+
+$i.med
+[1] 1 4 7
+
+$medoids
+    x   y
+1   4  53
+22 32 149
+47 78  94
+
+$clusinfo
+     size max_diss  av_diss  isolation
+[1,]    2       11  5.50000 0.09565217
+[2,]    2        6  3.00000 0.05940594
+[3,]    3       28 12.33333 0.27722772
+
+$sample
+[1] "1"  "22" "45" "47"
+
+---
+
+sample size =  5 
+$objective
+[1] 7.714286
+
+$i.med
+[1] 2 3 7
+
+$medoids
+    x   y
+2   5  63
+21 28 147
+47 78  94
+
+$clusinfo
+     size max_diss  av_diss  isolation
+[1,]    2       11  5.50000 0.10576923
+[2,]    2        6  3.00000 0.05825243
+[3,]    3       28 12.33333 0.27184466
+
+$sample
+[1] "2"  "21" "22" "45" "47"
+
+---
+
+sample size =  6 
+$objective
+[1] 6.428571
+
+$i.med
+[1] 2 4 6
+
+$medoids
+    x   y
+2   5  63
+22 32 149
+46 85  96
+
+$clusinfo
+     size max_diss  av_diss  isolation
+[1,]    2       11 5.500000 0.09734513
+[2,]    2        6 3.000000 0.05660377
+[3,]    3       19 9.333333 0.17924528
+
+$sample
+[1] "2"  "21" "22" "45" "46" "47"
+
+---
+
+sample size =  7 
+$objective
+[1] 6.428571
+
+$i.med
+[1] 2 4 6
+
+$medoids
+    x   y
+2   5  63
+22 32 149
+46 85  96
+
+$clusinfo
+     size max_diss  av_diss  isolation
+[1,]    2       11 5.500000 0.09734513
+[2,]    2        6 3.000000 0.05660377
+[3,]    3       19 9.333333 0.17924528
+
+$sample
+[1] "1"  "2"  "21" "22" "45" "46" "47"
+
+> for(ss in 5:nrow(ru3)){
++     cat("---\n\nsample size = ",ss,"\n")
++     print(clara(ru3,k=4,met="manhattan",sampsize=ss)[clInS])
++ }
+---
+
+sample size =  5 
+$objective
+[1] 13.625
+
+$i.med
+[1]  4  5 10 15
+
+$medoids
+    x   y
+4   9  77
+21 28 147
+45 85 115
+62 77  12
+
+$clusinfo
+     size max_diss av_diss isolation
+[1,]    4       29   16.50 0.3258427
+[2,]    5       14    9.00 0.1573034
+[3,]    4       30   19.25 0.3370787
+[4,]    3       15   10.00 0.1351351
+
+$sample
+[1] "3"  "4"  "21" "45" "62"
+
+---
+
+sample size =  6 
+$objective
+[1] 9.0625
+
+$i.med
+[1]  3  7 13 15
+
+$medoids
+    x   y
+3  10  59
+23 35 153
+48 74  96
+62 77  12
+
+$clusinfo
+     size max_diss av_diss isolation
+[1,]    4       19   10.00 0.1881188
+[2,]    5       13    5.60 0.1354167
+[3,]    4       30   11.75 0.3448276
+[4,]    3       15   10.00 0.1724138
+
+$sample
+[1] "3"  "21" "23" "45" "48" "62"
+
+---
+
+sample size =  7 
+$objective
+[1] 9.0625
+
+$i.med
+[1]  3  7 13 15
+
+$medoids
+    x   y
+3  10  59
+23 35 153
+48 74  96
+62 77  12
+
+$clusinfo
+     size max_diss av_diss isolation
+[1,]    4       19   10.00 0.1881188
+[2,]    5       13    5.60 0.1354167
+[3,]    4       30   11.75 0.3448276
+[4,]    3       15   10.00 0.1724138
+
+$sample
+[1] "2"  "3"  "21" "23" "45" "48" "62"
+
+---
+
+sample size =  8 
+$objective
+[1] 8.8125
+
+$i.med
+[1]  3  7 12 15
+
+$medoids
+    x   y
+3  10  59
+23 35 153
+47 78  94
+62 77  12
+
+$clusinfo
+     size max_diss av_diss isolation
+[1,]    4       19   10.00 0.1844660
+[2,]    5       13    5.60 0.1274510
+[3,]    4       28   10.75 0.3373494
+[4,]    3       15   10.00 0.1807229
+
+$sample
+[1] "3"  "21" "23" "46" "47" "48" "61" "62"
+
+---
+
+sample size =  9 
+$objective
+[1] 9.3125
+
+$i.med
+[1]  2  6 11 16
+
+$medoids
+    x   y
+2   5  63
+22 32 149
+46 85  96
+63 83  21
+
+$clusinfo
+     size max_diss av_diss isolation
+[1,]    4       18    9.50 0.1592920
+[2,]    5        8    5.40 0.0754717
+[3,]    4       19    9.75 0.2467532
+[4,]    3       30   15.00 0.3896104
+
+$sample
+[1] "2"  "21" "22" "23" "45" "46" "47" "61" "63"
+
+---
+
+sample size =  10 
+$objective
+[1] 8.5625
+
+$i.med
+[1]  3  7 11 15
+
+$medoids
+    x   y
+3  10  59
+23 35 153
+46 85  96
+62 77  12
+
+$clusinfo
+     size max_diss av_diss isolation
+[1,]    4       19   10.00 0.1696429
+[2,]    5       13    5.60 0.1214953
+[3,]    4       19    9.75 0.2065217
+[4,]    3       15   10.00 0.1630435
+
+$sample
+ [1] "2"  "3"  "22" "23" "45" "46" "47" "61" "62" "63"
+
+---
+
+sample size =  11 
+$objective
+[1] 8.6875
+
+$i.med
+[1]  2  7 12 15
+
+$medoids
+    x   y
+2   5  63
+23 35 153
+47 78  94
+62 77  12
+
+$clusinfo
+     size max_diss av_diss isolation
+[1,]    4       18    9.50 0.1730769
+[2,]    5       13    5.60 0.1274510
+[3,]    4       28   10.75 0.3373494
+[4,]    3       15   10.00 0.1807229
+
+$sample
+ [1] "1"  "2"  "3"  "4"  "23" "24" "25" "45" "47" "48" "62"
+
+---
+
+sample size =  12 
+$objective
+[1] 8.8125
+
+$i.med
+[1]  3  7 12 15
+
+$medoids
+    x   y
+3  10  59
+23 35 153
+47 78  94
+62 77  12
+
+$clusinfo
+     size max_diss av_diss isolation
+[1,]    4       19   10.00 0.1844660
+[2,]    5       13    5.60 0.1274510
+[3,]    4       28   10.75 0.3373494
+[4,]    3       15   10.00 0.1807229
+
+$sample
+ [1] "2"  "3"  "22" "23" "24" "25" "46" "47" "48" "61" "62" "63"
+
+---
+
+sample size =  13 
+$objective
+[1] 8.4375
+
+$i.med
+[1]  2  7 11 15
+
+$medoids
+    x   y
+2   5  63
+23 35 153
+46 85  96
+62 77  12
+
+$clusinfo
+     size max_diss av_diss isolation
+[1,]    4       18    9.50 0.1592920
+[2,]    5       13    5.60 0.1214953
+[3,]    4       19    9.75 0.2065217
+[4,]    3       15   10.00 0.1630435
+
+$sample
+ [1] "1"  "2"  "4"  "22" "23" "24" "25" "45" "46" "47" "61" "62" "63"
+
+---
+
+sample size =  14 
+$objective
+[1] 8.4375
+
+$i.med
+[1]  2  7 11 15
+
+$medoids
+    x   y
+2   5  63
+23 35 153
+46 85  96
+62 77  12
+
+$clusinfo
+     size max_diss av_diss isolation
+[1,]    4       18    9.50 0.1592920
+[2,]    5       13    5.60 0.1214953
+[3,]    4       19    9.75 0.2065217
+[4,]    3       15   10.00 0.1630435
+
+$sample
+ [1] "2"  "3"  "4"  "22" "23" "24" "25" "45" "46" "47" "48" "61" "62" "63"
+
+---
+
+sample size =  15 
+$objective
+[1] 8.375
+
+$i.med
+[1]  2  6 11 15
+
+$medoids
+    x   y
+2   5  63
+22 32 149
+46 85  96
+62 77  12
+
+$clusinfo
+     size max_diss av_diss isolation
+[1,]    4       18    9.50 0.1592920
+[2,]    5        8    5.40 0.0754717
+[3,]    4       19    9.75 0.2065217
+[4,]    3       15   10.00 0.1630435
+
+$sample
+ [1] "2"  "3"  "4"  "21" "22" "23" "24" "25" "45" "46" "47" "48" "61" "62" "63"
+
+---
+
+sample size =  16 
+$objective
+[1] 8.375
+
+$i.med
+[1]  2  6 11 15
+
+$medoids
+    x   y
+2   5  63
+22 32 149
+46 85  96
+62 77  12
+
+$clusinfo
+     size max_diss av_diss isolation
+[1,]    4       18    9.50 0.1592920
+[2,]    5        8    5.40 0.0754717
+[3,]    4       19    9.75 0.2065217
+[4,]    3       15   10.00 0.1630435
+
+$sample
+ [1] "1"  "2"  "3"  "4"  "21" "22" "23" "24" "25" "45" "46" "47" "48" "61" "62"
+[16] "63"
+
+> 
+> ## Last Line:
+> cat('Time elapsed: ', proc.time() - .proctime00,'\n')
+Time elapsed:  2.121 0.013 2.146 0 0 
+> ## Lynne (P IV, 1.6 GHz): 18.81; then (no NA; R 1.9.0-alpha): 15.07
+> ## nb-mm (P III,700 MHz): 27.97
+> 
+> proc.time()
+   user  system elapsed 
+  2.248   0.037   2.343 
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/agnes-ex.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/agnes-ex.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/agnes-ex.R	(revision 2477)
@@ -0,0 +1,95 @@
+library(cluster)
+options(digits = 6)
+data(votes.repub)
+
+## From Matrix' test-tools-1.R :
+showProc.time <- local({ ## function + 'pct' variable
+    pct <- proc.time()
+    function(final="\n") { ## CPU elapsed __since last called__
+	ot <- pct ; pct <<- proc.time()
+	## 'Time ..' *not* to be translated:  tools::Rdiff() skips its lines!
+	cat('Time elapsed: ', (pct - ot)[1:3], final)
+    }
+})
+
+agn1 <- agnes(votes.repub, metric = "manhattan", stand = TRUE)
+summary(agn1)
+Dvr <- daisy(votes.repub)
+agn2 <- agnes(Dvr, method = "complete")
+summary(agn2)
+## almost same:
+(ag2. <- agnes(Dvr, method= "complete", keep.diss=FALSE))
+ag22  <- agnes(votes.repub, method= "complete", keep.diss=FALSE,keep.data=FALSE)
+stopifnot(identical(agn2[-5:-6], ag2.[-5:-6]),
+          identical(Dvr, daisy(votes.repub)), # DUP=FALSE (!)
+          identical(ag2.[-6], ag22[-6])
+         )
+
+data(agriculture)
+summary(agnes(agriculture))
+
+data(ruspini)
+summary(ar0 <- agnes(ruspini, keep.diss=FALSE, keep.data=FALSE))
+summary(ar1 <- agnes(ruspini, metric = "manhattan"))
+str(ar1)
+
+showProc.time()
+
+summary(ar2 <- agnes(ruspini, metric="manhattan", method = "weighted"))
+print  (ar3 <- agnes(ruspini, metric="manhattan", method = "flexible",
+                     par.meth = 0.5))
+stopifnot(all.equal(ar2[1:4], ar3[1:4], tol=1e-12))
+
+showProc.time()
+
+## Small example, testing "flexible" vs "single"
+i8 <- -c(1:2, 9:10)
+dim(agr8 <- agriculture[i8, ])
+i5 <- -c(1:2, 8:12)
+dim(agr5 <- agriculture[i5, ])
+
+
+chk <- function(d, method=c("single", "complete", "weighted"),
+                trace.lev = 1,
+                iC = -(6:7), # <- not using 'call' and 'method' for comparisons
+                doplot = FALSE, tol = 1e-12)
+{
+    if(!inherits(d, "dist")) d <- daisy(d, "manhattan")
+    method <- match.arg(method)
+    par.meth <- list("single" =  c(.5, .5, 0, -.5),
+                     "complete"= c(.5, .5, 0, +.5),
+                     "weighted"= c(0.5))
+    a.s <- agnes(d, method=method, trace.lev=trace.lev)
+    ## From theory, this should give the same, but it does not --- why ???
+    a.f <- agnes(d, method="flex", par.method = par.meth[[method]], trace.lev=trace.lev)
+
+    if(doplot) {
+	op <- par(mfrow = c(2,2), mgp = c(1.6, 0.6, 0), mar = .1 + c(4,4,2,1))
+        on.exit(par(op))
+        plot(a.s)
+        plot(a.f)
+    }
+    structure(all.equal(a.s[iC], a.f[iC], tolerance = tol),
+              fits = list(s = a.s, f = a.f))
+}
+
+chk(agr5, trace = 3)
+
+stopifnot(chk(agr5), chk(agr5, "complete", trace = 2), chk(agr5, "weighted"),
+          chk(agr8), chk(agr8, "complete"), chk(agr8, "weighted", trace.lev=2),
+          chk(agriculture), chk(agriculture, "complete"),
+          chk(ruspini), chk(ruspini, "complete"), chk(ruspini, "weighted"))
+
+showProc.time()
+
+## an invalid "flexible" case - now must give error early:
+x <- rbind(c( -6, -9), c(  0, 13),
+           c(-15,  6), c(-14,  0), c(12,-10))
+(dx <- daisy(x, "manhattan"))
+a.x <- tryCatch(agnes(dx, method="flexible", par = -.2),
+                error = function(e)e)
+##  agnes(method=6, par.method=*) lead to invalid merge; step 4, D(.,.)=-26.1216
+if(!inherits(a.x, "error")) stop("invalid 'par' in \"flexible\" did not give error")
+if(!all(vapply(c("par[.]method", "merge"), grepl, NA, x=a.x$message)))
+   stop("error message did not contain expected words")
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/silhouette-default.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/silhouette-default.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/silhouette-default.R	(revision 2477)
@@ -0,0 +1,83 @@
+## This came from a bug report on R-help by ge yreyt <tothri2000@yahoo.ca>
+## Date: Mon, 9 Jun 2003 16:06:53 -0400 (EDT)
+library(cluster)
+if(FALSE) # manual testing
+library(cluster, lib="~/R/Pkgs/cluster.Rcheck")
+
+data(iris)
+
+.proctime00 <- proc.time()
+
+mdist <- as.dist(1 - cor(t(iris[,1:4])))#dissimlarity
+## this is always the same:
+hc <- diana(mdist, diss = TRUE, stand = FALSE)
+
+maxk <- 15                # at most 15 clusters
+silh.wid <- numeric(maxk)  # myind[k] := the silh.value for k clusters
+silh.wid[1] <- NA # 1-cluster: silhouette not defined
+
+op <- par(mfrow = c(4,4), mar = .1+ c(2,1,2,1), mgp=c(1.5, .6,0))
+for(k in 2:maxk) {
+    cat("\n", k,":\n==\n")
+    k.gr <- cutree(as.hclust(hc), k = k)
+    cat("grouping table: "); print(table(k.gr))
+    si <- silhouette(k.gr, mdist)
+    cat("silhouette:\n"); print(summary(si))
+    plot(si, main = paste("k =",k),
+         col = 2:(k+1), do.n.k=FALSE, do.clus.stat=FALSE)
+    silh.wid[k] <- summary(si)$avg.width
+    ##      ===
+}
+par(op)
+
+summary(si.p <- silhouette(50 - k.gr, mdist))
+stopifnot(identical(si.p[,3],         si[,3]),
+	  identical(si.p[, 1:2], 50 - si[, 1:2]))
+
+# the widths:
+silh.wid
+#select the number of k clusters with the largest si value :
+(myk <- which.min(silh.wid)) # -> 8 (here)
+
+postscript(file="silhouette-ex.ps")
+## MM:  plot to see how the decision is made
+plot(silh.wid, type = 'b', col= "blue", xlab = "k")
+axis(1, at=myk, col.axis= "red", font.axis= 2)
+
+##--- PAM()'s silhouette should give same as silh*.default()!
+Eq <- function(x,y, tol = 1e-12) x == y | abs(x - y) < tol * abs((x+y)/2)
+
+for(k in 2:40) {
+    cat("\n", k,":\n==\n")
+    p.k <- pam(mdist, k = k)
+    k.gr <- p.k$clustering
+    si.p <- silhouette(p.k)
+    si.g <- silhouette(k.gr, mdist)
+    ## since the obs.order may differ (within cluster):
+    si.g <- si.g[ as.integer(rownames(si.p)), ]
+    cat("grouping table: "); print(table(k.gr))
+    if(!isTRUE(all.equal(c(si.g), c(si.p)))) {
+	cat("silhouettes differ:")
+	if(any(neq <- !Eq(si.g[,3], si.p[,3]))) {
+	    cat("\n")
+	    print( cbind(si.p[], si.g[,2:3])[ neq, ] )
+	} else cat(" -- but not in col.3 !\n")
+    }
+}
+
+
+## "pathological" case where a_i == b_i == 0 :
+D6 <- structure(c(0, 0, 0, 0.4, 1, 0.05, 1, 1, 0, 1, 1, 0, 0.25, 1, 1),
+                Labels = LETTERS[1:6], Size = 6, call = as.name("manually"),
+                class = "dist", Diag = FALSE, Upper = FALSE)
+D6
+kl6 <- c(1,1, 2,2, 3,3)
+silhouette(kl6, D6)# had one NaN
+summary(silhouette(kl6, D6))
+plot(silhouette(kl6, D6))# gives error in earlier cluster versions
+
+dev.off()
+
+## Last Line:
+cat('Time elapsed: ', proc.time() - .proctime00,'\n')
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/daisy-ex.Rout.save
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/daisy-ex.Rout.save	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/daisy-ex.Rout.save	(revision 2477)
@@ -0,0 +1,927 @@
+
+R version 2.14.0 alpha (2011-10-06 r57181)
+Copyright (C) 2011 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+Platform: x86_64-unknown-linux-gnu (64-bit)
+
+R is free software and comes with ABSOLUTELY NO WARRANTY.
+You are welcome to redistribute it under certain conditions.
+Type 'license()' or 'licence()' for distribution details.
+
+R is a collaborative project with many contributors.
+Type 'contributors()' for more information and
+'citation()' on how to cite R or R packages in publications.
+
+Type 'demo()' for some demos, 'help()' for on-line help, or
+'help.start()' for an HTML browser interface to help.
+Type 'q()' to quit R.
+
+> ## For different cluster versions
+> 
+> require(cluster)
+Loading required package: cluster
+> 
+> if(interactive()) {
++     (pkgPath <- .find.package("cluster", verbose = TRUE))
++     (verC <- readLines(Dfile <- file.path(pkgPath, "DESCRIPTION"), n = 2)[2])
++ }
+> 
+> ## trivial cases should 'work':
+> daisy(cbind(1))
+Dissimilarities :
+dissimilarity(0)
+
+Metric :  euclidean 
+Number of objects : 1
+> (d10 <- daisy(matrix(0., 1,0))); str(d10)
+Dissimilarities :
+dissimilarity(0)
+
+Metric :  euclidean 
+Number of objects : 1
+Classes 'dissimilarity', 'dist'  atomic (0) 
+  ..- attr(*, "Size")= int 1
+  ..- attr(*, "Metric")= chr "euclidean"
+> d01 <- daisy(matrix(0., 0,1))
+> if(paste(R.version$major, R.version$minor, sep=".") >= "2.1.0")
++     print(d01)
+Dissimilarities :
+dissimilarity(0)
+
+Metric :  euclidean 
+Number of objects : 0
+> str(d01)
+Classes 'dissimilarity', 'dist'  atomic (0) 
+  ..- attr(*, "Size")= int 0
+  ..- attr(*, "Metric")= chr "euclidean"
+> d32 <- data.frame(eins=c("A"=1,"B"=1,"C"=1), zwei=c(2,2,2))
+> daisy(d32)
+Dissimilarities :
+  A B
+B 0  
+C 0 0
+
+Metric :  euclidean 
+Number of objects : 3
+> daisy(d32, stand = TRUE)
+Dissimilarities :
+  A B
+B 0  
+C 0 0
+
+Metric :  euclidean 
+Number of objects : 3
+Warning message:
+In daisy(d32, stand = TRUE) :
+  'x' has constant columns 1, 2; these are standardized to 0
+> daisy(d32, type = list(ordratio="zwei"))
+Dissimilarities :
+  A B
+B 0  
+C 0 0
+
+Metric :  mixed ;  Types = I, T 
+Number of objects : 3
+> 
+> 
+> str(d5 <- data.frame(a= c(0, 0, 0,1,0,0, 0,0,1, 0,NA),
++                      b= c(NA,0, 1,1,0,1, 0,1,0, 1,0),
++                      c= c(0, 1, 1,0,1,NA,1,0,1, 0,NA),
++                      d= c(1, 1, 0,1,0,0, 0,0,0, 1,0),
++                      e= c(1, NA,0,1,0,0, 0,0,NA,1,1)))
+'data.frame':	11 obs. of  5 variables:
+ $ a: num  0 0 0 1 0 0 0 0 1 0 ...
+ $ b: num  NA 0 1 1 0 1 0 1 0 1 ...
+ $ c: num  0 1 1 0 1 NA 1 0 1 0 ...
+ $ d: num  1 1 0 1 0 0 0 0 0 1 ...
+ $ e: num  1 NA 0 1 0 0 0 0 NA 1 ...
+> (d0 <- daisy(d5))
+Dissimilarities :
+          1        2        3        4        5        6        7        8
+2  1.290994                                                               
+3  1.936492 1.581139                                                      
+4  1.118034 1.936492 2.000000                                             
+5  1.936492 1.118034 1.000000 2.236068                                    
+6  1.825742 1.825742 0.000000 1.936492 1.118034                           
+7  1.936492 1.118034 1.000000 2.236068 0.000000 1.118034                  
+8  1.581139 1.936492 1.000000 1.732051 1.414214 0.000000 1.414214         
+9  2.236068 1.581139 1.581139 1.936492 1.118034 1.825742 1.118034 1.936492
+10 0.000000 1.581139 1.732051 1.000000 2.000000 1.581139 2.000000 1.414214
+11 1.581139 1.581139 1.825742 1.825742 1.290994 1.825742 1.290994 1.825742
+          9       10
+2                   
+3                   
+4                   
+5                   
+6                   
+7                   
+8                   
+9                   
+10 2.236068         
+11 0.000000 1.825742
+
+Metric :  euclidean 
+Number of objects : 11
+Warning message:
+In daisy(d5) : binary variable(s) 1, 2, 3, 4, 5 treated as interval scaled
+> (d1 <- daisy(d5, type = list(asymm = 1:5)))
+Dissimilarities :
+           1         2         3         4         5         6         7
+2  0.5000000                                                            
+3  1.0000000 0.6666667                                                  
+4  0.3333333 0.7500000 0.8000000                                        
+5  1.0000000 0.5000000 0.5000000 1.0000000                              
+6  1.0000000 1.0000000 0.0000000 0.7500000 1.0000000                    
+7  1.0000000 0.5000000 0.5000000 1.0000000 0.0000000 1.0000000          
+8  1.0000000 1.0000000 0.5000000 0.7500000 1.0000000 0.0000000 1.0000000
+9  1.0000000 0.6666667 0.6666667 0.7500000 0.5000000 1.0000000 0.5000000
+10 0.0000000 0.6666667 0.7500000 0.2500000 1.0000000 0.6666667 1.0000000
+11 0.5000000 1.0000000 1.0000000 0.6666667 1.0000000 1.0000000 1.0000000
+           8         9        10
+2                               
+3                               
+4                               
+5                               
+6                               
+7                               
+8                               
+9  1.0000000                    
+10 0.6666667 1.0000000          
+11 1.0000000        NA 0.6666667
+
+Metric :  mixed ;  Types = A, A, A, A, A 
+Number of objects : 11
+> (d2 <- daisy(d5, type = list(symm = 1:2, asymm= 3:5)))
+Dissimilarities :
+           1         2         3         4         5         6         7
+2  0.3333333                                                            
+3  0.7500000 0.5000000                                                  
+4  0.3333333 0.7500000 0.8000000                                        
+5  0.7500000 0.2500000 0.3333333 1.0000000                              
+6  0.6666667 0.6666667 0.0000000 0.7500000 0.5000000                    
+7  0.7500000 0.2500000 0.3333333 1.0000000 0.0000000 0.5000000          
+8  0.6666667 0.7500000 0.3333333 0.7500000 0.6666667 0.0000000 0.6666667
+9  1.0000000 0.5000000 0.6666667 0.7500000 0.3333333 1.0000000 0.3333333
+10 0.0000000 0.5000000 0.6000000 0.2500000 0.8000000 0.5000000 0.8000000
+11 0.5000000 0.5000000 1.0000000 0.6666667 0.5000000 1.0000000 0.5000000
+           8         9        10
+2                               
+3                               
+4                               
+5                               
+6                               
+7                               
+8                               
+9  1.0000000                    
+10 0.5000000 1.0000000          
+11 1.0000000 0.0000000 0.6666667
+
+Metric :  mixed ;  Types = S, S, A, A, A 
+Number of objects : 11
+> (d2.<- daisy(d5, type = list(     asymm= 3:5)))
+Dissimilarities :
+           1         2         3         4         5         6         7
+2  0.3333333                                                            
+3  0.7500000 0.5000000                                                  
+4  0.3333333 0.7500000 0.8000000                                        
+5  0.7500000 0.2500000 0.3333333 1.0000000                              
+6  0.6666667 0.6666667 0.0000000 0.7500000 0.5000000                    
+7  0.7500000 0.2500000 0.3333333 1.0000000 0.0000000 0.5000000          
+8  0.6666667 0.7500000 0.3333333 0.7500000 0.6666667 0.0000000 0.6666667
+9  1.0000000 0.5000000 0.6666667 0.7500000 0.3333333 1.0000000 0.3333333
+10 0.0000000 0.5000000 0.6000000 0.2500000 0.8000000 0.5000000 0.8000000
+11 0.5000000 0.5000000 1.0000000 0.6666667 0.5000000 1.0000000 0.5000000
+           8         9        10
+2                               
+3                               
+4                               
+5                               
+6                               
+7                               
+8                               
+9  1.0000000                    
+10 0.5000000 1.0000000          
+11 1.0000000 0.0000000 0.6666667
+
+Metric :  mixed ;  Types = I, I, A, A, A 
+Number of objects : 11
+Warning message:
+In daisy(d5, type = list(asymm = 3:5)) :
+  binary variable(s) 1, 2 treated as interval scaled
+> stopifnot(identical(c(d2), c(d2.)))
+> (dS <- daisy(d5, stand = TRUE))# gave error in some versions
+Dissimilarities :
+          1        2        3        4        5        6        7        8
+2  2.614264                                                               
+3  4.010913 3.291786                                                      
+4  3.493856 4.725761 4.757684                                             
+5  4.010913 2.415752 2.000000 5.160965                                    
+6  3.823025 3.801028 0.000000 4.813384 2.236068                           
+7  4.010913 2.415752 2.000000 5.160965 0.000000 2.236068                  
+8  3.310837 3.995202 2.025000 4.305222 2.846160 0.000000 2.846160         
+9  5.558018 4.247692 4.148136 3.995202 3.493856 4.789855 3.493856 4.725761
+10 0.000000 3.182103 3.587469 3.125000 4.107303 3.310837 4.107303 2.961302
+11 3.416389 3.416389 3.674376 3.801028 2.614264 3.674376 2.614264 3.674376
+          9       10
+2                   
+3                   
+4                   
+5                   
+6                   
+7                   
+8                   
+9                   
+10 5.307417         
+11 0.000000 3.801028
+
+Metric :  euclidean 
+Number of objects : 11
+Warning message:
+In daisy(d5, stand = TRUE) :
+  binary variable(s) 1, 2, 3, 4, 5 treated as interval scaled
+> stopifnot(all.equal(as.vector(summary(c(dS), digits=9)),
++                     c(0, 2.6142638, 3.4938562, 3.2933687, 4.0591077, 5.5580177),
++                     tol = 1e-7))# 7.88e-9
+> 
+> d5[,4] <- 1 # binary with only one instead of two values
+> (d0 <- daisy(d5))
+Dissimilarities :
+          1        2        3        4        5        6        7        8
+2  1.290994                                                               
+3  1.581139 1.118034                                                      
+4  1.118034 1.936492 1.732051                                             
+5  1.581139 0.000000 1.000000 2.000000                                    
+6  1.290994 1.290994 0.000000 1.581139 1.118034                           
+7  1.581139 0.000000 1.000000 2.000000 0.000000 1.118034                  
+8  1.118034 1.581139 1.000000 1.414214 1.414214 0.000000 1.414214         
+9  1.825742 1.118034 1.581139 1.581139 1.118034 1.825742 1.118034 1.936492
+10 0.000000 1.581139 1.414214 1.000000 1.732051 1.118034 1.732051 1.000000
+11 0.000000 0.000000 1.825742 1.290994 1.290994 1.825742 1.290994 1.825742
+          9       10
+2                   
+3                   
+4                   
+5                   
+6                   
+7                   
+8                   
+9                   
+10 1.936492         
+11 0.000000 1.290994
+
+Metric :  euclidean 
+Number of objects : 11
+Warning message:
+In daisy(d5) : binary variable(s) 1, 2, 3, 5 treated as interval scaled
+> (d1 <- daisy(d5, type = list(asymm = 1:5)))# 2 NAs
+Dissimilarities :
+           1         2         3         4         5         6         7
+2  1.0000000                                                            
+3  1.0000000 0.5000000                                                  
+4  0.5000000 1.0000000 0.7500000                                        
+5  1.0000000 0.0000000 0.5000000 1.0000000                              
+6  1.0000000 1.0000000 0.0000000 0.6666667 1.0000000                    
+7  1.0000000 0.0000000 0.5000000 1.0000000 0.0000000 1.0000000          
+8  1.0000000 1.0000000 0.5000000 0.6666667 1.0000000 0.0000000 1.0000000
+9  1.0000000 0.5000000 0.6666667 0.6666667 0.5000000 1.0000000 0.5000000
+10 0.0000000 1.0000000 0.6666667 0.3333333 1.0000000 0.5000000 1.0000000
+11 0.0000000        NA 1.0000000 0.5000000 1.0000000 1.0000000 1.0000000
+           8         9        10
+2                               
+3                               
+4                               
+5                               
+6                               
+7                               
+8                               
+9  1.0000000                    
+10 0.5000000 1.0000000          
+11 1.0000000        NA 0.5000000
+
+Metric :  mixed ;  Types = A, A, A, A, A 
+Number of objects : 11
+Warning message:
+In daisy(d5, type = list(asymm = 1:5)) :
+  at least one binary variable has not 2 different levels.
+> (d2 <- daisy(d5, type = list(symm = 1:2, asymm= 3:5)))
+Dissimilarities :
+           1         2         3         4         5         6         7
+2  0.5000000                                                            
+3  0.6666667 0.3333333                                                  
+4  0.5000000 1.0000000 0.7500000                                        
+5  0.6666667 0.0000000 0.3333333 1.0000000                              
+6  0.5000000 0.5000000 0.0000000 0.6666667 0.5000000                    
+7  0.6666667 0.0000000 0.3333333 1.0000000 0.0000000 0.5000000          
+8  0.5000000 0.6666667 0.3333333 0.6666667 0.6666667 0.0000000 0.6666667
+9  1.0000000 0.3333333 0.6666667 0.6666667 0.3333333 1.0000000 0.3333333
+10 0.0000000 0.6666667 0.5000000 0.3333333 0.7500000 0.3333333 0.7500000
+11 0.0000000 0.0000000 1.0000000 0.5000000 0.5000000 1.0000000 0.5000000
+           8         9        10
+2                               
+3                               
+4                               
+5                               
+6                               
+7                               
+8                               
+9  1.0000000                    
+10 0.3333333 1.0000000          
+11 1.0000000 0.0000000 0.5000000
+
+Metric :  mixed ;  Types = S, S, A, A, A 
+Number of objects : 11
+Warning message:
+In daisy(d5, type = list(symm = 1:2, asymm = 3:5)) :
+  at least one binary variable has not 2 different levels.
+> (d2.<- daisy(d5, type = list(     asymm= 3:5)))
+Dissimilarities :
+           1         2         3         4         5         6         7
+2  0.5000000                                                            
+3  0.6666667 0.3333333                                                  
+4  0.5000000 1.0000000 0.7500000                                        
+5  0.6666667 0.0000000 0.3333333 1.0000000                              
+6  0.5000000 0.5000000 0.0000000 0.6666667 0.5000000                    
+7  0.6666667 0.0000000 0.3333333 1.0000000 0.0000000 0.5000000          
+8  0.5000000 0.6666667 0.3333333 0.6666667 0.6666667 0.0000000 0.6666667
+9  1.0000000 0.3333333 0.6666667 0.6666667 0.3333333 1.0000000 0.3333333
+10 0.0000000 0.6666667 0.5000000 0.3333333 0.7500000 0.3333333 0.7500000
+11 0.0000000 0.0000000 1.0000000 0.5000000 0.5000000 1.0000000 0.5000000
+           8         9        10
+2                               
+3                               
+4                               
+5                               
+6                               
+7                               
+8                               
+9  1.0000000                    
+10 0.3333333 1.0000000          
+11 1.0000000 0.0000000 0.5000000
+
+Metric :  mixed ;  Types = I, I, A, A, A 
+Number of objects : 11
+Warning messages:
+1: In daisy(d5, type = list(asymm = 3:5)) :
+  at least one binary variable has not 2 different levels.
+2: In daisy(d5, type = list(asymm = 3:5)) :
+  binary variable(s) 1, 2 treated as interval scaled
+> ## better leave away the constant variable: it has no effect:
+> stopifnot(identical(c(d1), c(daisy(d5[,-4], type = list(asymm = 1:4)))))
+> 
+> ###---- Trivial "binary only" matrices (not data frames) did fail:
+> 
+> x <- matrix(0, 2, 2)
+> dimnames(x)[[2]] <- c("A", "B")## colnames<- is missing in S+
+> daisy(x, type = list(symm= "B", asymm="A"))
+Dissimilarities :
+  1
+2 0
+
+Metric :  mixed ;  Types = A, S 
+Number of objects : 2
+Warning message:
+In daisy(x, type = list(symm = "B", asymm = "A")) :
+  at least one binary variable has not 2 different levels.
+> daisy(x, type = list(symm= "B"))# 0 too
+Dissimilarities :
+  1
+2 0
+
+Metric :  mixed ;  Types = I, S 
+Number of objects : 2
+Warning message:
+In daisy(x, type = list(symm = "B")) :
+  at least one binary variable has not 2 different levels.
+> 
+> x2 <- x; x2[2,2] <- 1
+> daisy(x2, type= list(symm = "B"))# |-> 0.5  (gives 1 in S+)
+Dissimilarities :
+    1
+2 0.5
+
+Metric :  mixed ;  Types = I, S 
+Number of objects : 2
+> daisy(x2, type= list(symm = "B", asymm="A"))# 1
+Dissimilarities :
+  1
+2 1
+
+Metric :  mixed ;  Types = A, S 
+Number of objects : 2
+Warning message:
+In daisy(x2, type = list(symm = "B", asymm = "A")) :
+  at least one binary variable has not 2 different levels.
+> 
+> x3 <- x; x3[] <- diag(2)
+> daisy(x3) # warning: both as interval scaled -> sqrt(2)
+Dissimilarities :
+         1
+2 1.414214
+
+Metric :  euclidean 
+Number of objects : 2
+> daisy(x3, type= list(symm="B", asymm="A"))#  1
+Dissimilarities :
+  1
+2 1
+
+Metric :  mixed ;  Types = A, S 
+Number of objects : 2
+> daisy(x3, type= list(symm =c("B","A")))   #  1, S+: sqrt(2)
+Dissimilarities :
+  1
+2 1
+
+Metric :  mixed ;  Types = S, S 
+Number of objects : 2
+> daisy(x3, type= list(asymm=c("B","A")))   #  1, S+ : sqrt(2)
+Dissimilarities :
+  1
+2 1
+
+Metric :  mixed ;  Types = A, A 
+Number of objects : 2
+> 
+> x4 <- rbind(x3, 1)
+> daisy(x4, type= list(symm="B", asymm="A"))# 1   0.5 0.5
+Dissimilarities :
+    1   2
+2 1.0    
+3 0.5 0.5
+
+Metric :  mixed ;  Types = A, S 
+Number of objects : 3
+> daisy(x4, type= list(symm=c("B","A")))    # dito;  S+ : 1.41  1   1
+Dissimilarities :
+    1   2
+2 1.0    
+3 0.5 0.5
+
+Metric :  mixed ;  Types = S, S 
+Number of objects : 3
+> daisy(x4, type= list(asymm=c("A","B")))   # dito,     dito
+Dissimilarities :
+    1   2
+2 1.0    
+3 0.5 0.5
+
+Metric :  mixed ;  Types = A, A 
+Number of objects : 3
+> 
+> 
+> 
+> ## ----------- example(daisy) -----------------------
+> 
+> data(flower)
+> data(agriculture)
+> 
+> ## Example 1 in ref:
+> ##  Dissimilarities using Euclidean metric and without standardization
+> (d.agr  <- daisy(agriculture, metric = "euclidean", stand = FALSE))
+Dissimilarities :
+            B        DK         D        GR         E         F       IRL
+DK   5.408327                                                            
+D    2.061553  3.405877                                                  
+GR  22.339651 22.570113 22.661200                                        
+E    9.818350 11.182576 10.394710 12.567418                              
+F    3.448188  3.512834  2.657066 20.100995  8.060397                    
+IRL 12.747549 13.306014 13.080138  9.604166  3.140064 10.564563          
+I    5.803447  5.470832  5.423099 17.383325  5.727128  2.773085  7.920859
+L    4.275512  2.220360  2.300000 24.035391 12.121056  4.060788 14.569145
+NL   1.649242  5.096077  2.435159 20.752349  8.280097  2.202272 11.150785
+P   17.236299 17.864490 17.664088  5.162364  7.430343 15.164432  4.601087
+UK   2.828427  8.052950  4.850773 21.485344  8.984431  5.303772 12.103718
+            I         L        NL         P
+DK                                         
+D                                          
+GR                                         
+E                                          
+F                                          
+IRL                                        
+I                                          
+L    6.660330                              
+NL   4.204759  4.669047                    
+P   12.515990 19.168985 15.670673          
+UK   6.723095  7.102112  3.124100 16.323296
+
+Metric :  euclidean 
+Number of objects : 12
+> (d.agr2 <- daisy(agriculture, metric = "manhattan"))
+Dissimilarities :
+       B   DK    D   GR    E    F  IRL    I    L   NL    P
+DK   7.5                                                  
+D    2.7  4.8                                             
+GR  30.4 31.9 31.5                                        
+E   13.6 15.1 14.7 16.8                                   
+F    4.3  3.8  3.4 28.1 11.3                              
+IRL 17.2 18.7 18.3 13.2  3.6 14.9                         
+I    6.0  7.5  7.1 24.4  7.6  3.7 11.2                    
+L    5.0  2.5  2.3 33.8 17.0  5.7 20.6  9.4               
+NL   2.0  6.3  3.1 28.4 11.6  3.1 15.2  4.4  5.4          
+P   23.7 25.2 24.8  6.7 10.1 21.4  6.5 17.7 27.1 21.7     
+UK   3.2 10.7  5.9 28.0 11.2  7.5 14.8  8.8  8.2  4.4 21.3
+
+Metric :  manhattan 
+Number of objects : 12
+> 
+> 
+> ## Example 2 in ref
+> (dfl0 <- daisy(flower))
+Dissimilarities :
+           1         2         3         4         5         6         7
+2  0.8875408                                                            
+3  0.5272467 0.5147059                                                  
+4  0.3517974 0.5504493 0.5651552                                        
+5  0.4115605 0.6226307 0.3726307 0.6383578                              
+6  0.2269199 0.6606209 0.3003268 0.4189951 0.3443627                    
+7  0.2876225 0.5999183 0.4896242 0.3435866 0.4197712 0.1892974          
+8  0.4234069 0.4641340 0.6038399 0.2960376 0.4673203 0.5714869 0.4107843
+9  0.5808824 0.4316585 0.4463644 0.8076797 0.3306781 0.5136846 0.5890931
+10 0.6094363 0.4531046 0.4678105 0.5570670 0.3812908 0.4119281 0.5865196
+11 0.3278595 0.7096814 0.5993873 0.6518791 0.3864788 0.4828840 0.5652369
+12 0.4267565 0.5857843 0.6004902 0.5132761 0.5000817 0.5248366 0.6391340
+13 0.5196487 0.5248366 0.5395425 0.7464461 0.2919118 0.4524510 0.5278595
+14 0.2926062 0.5949346 0.6096405 0.3680147 0.5203431 0.3656863 0.5049837
+15 0.6221814 0.3903595 0.5300654 0.5531454 0.4602124 0.5091503 0.3345588
+16 0.6935866 0.3575163 0.6222222 0.3417892 0.7301471 0.5107843 0.4353758
+17 0.7765114 0.1904412 0.5801471 0.4247141 0.6880719 0.5937092 0.5183007
+18 0.4610294 0.4515114 0.7162173 0.4378268 0.4755310 0.6438317 0.4692402
+           8         9        10        11        12        13        14
+2                                                                       
+3                                                                       
+4                                                                       
+5                                                                       
+6                                                                       
+7                                                                       
+8                                                                       
+9  0.6366422                                                            
+10 0.6639706 0.4256127                                                  
+11 0.4955474 0.4308007 0.3948121                                        
+12 0.4216503 0.4194036 0.3812092 0.2636029                              
+13 0.5754085 0.2181781 0.3643791 0.3445670 0.2331699                    
+14 0.4558007 0.4396650 0.3609477 0.2838644 0.1591503 0.3784314          
+15 0.4512255 0.2545343 0.4210784 0.4806781 0.4295752 0.3183007 0.4351307
+16 0.6378268 0.6494690 0.3488562 0.7436683 0.6050654 0.5882353 0.4598039
+17 0.4707516 0.6073938 0.3067810 0.7015931 0.5629902 0.5461601 0.5427288
+18 0.1417892 0.5198529 0.8057598 0.5359477 0.5495507 0.5733252 0.5698121
+          15        16        17
+2                               
+3                               
+4                               
+5                               
+6                               
+7                               
+8                               
+9                               
+10                              
+11                              
+12                              
+13                              
+14                              
+15                              
+16 0.3949346                    
+17 0.3528595 0.1670752          
+18 0.5096814 0.7796160 0.6125408
+
+Metric :  mixed ;  Types = N, N, N, N, O, O, I, I 
+Number of objects : 18
+> stopifnot(identical(c(dfl0),
++                     c(daisy(flower, type = list(symm = 1)))) &&
++           identical(c(dfl0),
++                     c(daisy(flower, type = list(symm = 2)))) &&
++           identical(c(dfl0),
++                     c(daisy(flower, type = list(symm = 3)))) &&
++           identical(c(dfl0),
++                     c(daisy(flower, type = list(symm = c(1,3)))))
++          )
+> 
+> (dfl1 <- daisy(flower, type = list(asymm = 3)))
+Dissimilarities :
+           1         2         3         4         5         6         7
+2  0.8875408                                                            
+3  0.5272467 0.5882353                                                  
+4  0.3517974 0.5504493 0.5651552                                        
+5  0.4115605 0.7115780 0.4258637 0.6383578                              
+6  0.2269199 0.7549953 0.3432306 0.4189951 0.3935574                    
+7  0.2876225 0.6856209 0.5595705 0.3435866 0.4797386 0.2163399          
+8  0.4234069 0.4641340 0.6038399 0.2960376 0.4673203 0.5714869 0.4107843
+9  0.5808824 0.4933240 0.5101307 0.8076797 0.3779178 0.5870682 0.6732493
+10 0.6094363 0.5178338 0.5346405 0.5570670 0.4357610 0.4707750 0.6703081
+11 0.3278595 0.7096814 0.5993873 0.6518791 0.3864788 0.4828840 0.5652369
+12 0.4267565 0.5857843 0.6004902 0.5132761 0.5000817 0.5248366 0.6391340
+13 0.5196487 0.5998133 0.6166200 0.7464461 0.3336134 0.5170868 0.6032680
+14 0.2926062 0.5949346 0.6096405 0.3680147 0.5203431 0.3656863 0.5049837
+15 0.6221814 0.4461251 0.6057890 0.5531454 0.5259570 0.5818861 0.3823529
+16 0.6935866 0.4085901 0.7111111 0.3417892 0.8344538 0.5837535 0.4975724
+17 0.7765114 0.2176471 0.6630252 0.4247141 0.7863679 0.6785247 0.5923436
+18 0.4610294 0.4515114 0.7162173 0.4378268 0.4755310 0.6438317 0.4692402
+           8         9        10        11        12        13        14
+2                                                                       
+3                                                                       
+4                                                                       
+5                                                                       
+6                                                                       
+7                                                                       
+8                                                                       
+9  0.6366422                                                            
+10 0.6639706 0.4864146                                                  
+11 0.4955474 0.4308007 0.3948121                                        
+12 0.4216503 0.4194036 0.3812092 0.2636029                              
+13 0.5754085 0.2493464 0.4164332 0.3445670 0.2331699                    
+14 0.4558007 0.4396650 0.3609477 0.2838644 0.1591503 0.3784314          
+15 0.4512255 0.2908964 0.4812325 0.4806781 0.4295752 0.3637722 0.4351307
+16 0.6378268 0.7422502 0.3986928 0.7436683 0.6050654 0.6722689 0.4598039
+17 0.4707516 0.6941643 0.3506069 0.7015931 0.5629902 0.6241830 0.5427288
+18 0.1417892 0.5198529 0.8057598 0.5359477 0.5495507 0.5733252 0.5698121
+          15        16        17
+2                               
+3                               
+4                               
+5                               
+6                               
+7                               
+8                               
+9                               
+10                              
+11                              
+12                              
+13                              
+14                              
+15                              
+16 0.4513539                    
+17 0.4032680 0.1909430          
+18 0.5096814 0.7796160 0.6125408
+
+Metric :  mixed ;  Types = N, N, A, N, O, O, I, I 
+Number of objects : 18
+> (dfl2 <- daisy(flower, type = list(asymm = c(1, 3), ordratio = 7)))
+Dissimilarities :
+           1         2         3         4         5         6         7
+2  0.9007353                                                            
+3  0.6176471 0.5882353                                                  
+4  0.4226891 0.5455882 0.6403361                                        
+5  0.4806723 0.7369748 0.5264706 0.7605042                              
+6  0.2823529 0.7470588 0.3911765 0.4764706 0.4980392                    
+7  0.3310924 0.6983193 0.6676471 0.4109244 0.5745098 0.2764706          
+8  0.5100840 0.4544118 0.6789916 0.3327731 0.5705882 0.6563025 0.4932773
+9  0.5808824 0.5084034 0.5252101 0.8257353 0.3882353 0.6100840 0.6756303
+10 0.6323529 0.5067227 0.5235294 0.5522059 0.4722689 0.4739496 0.6941176
+11 0.3389706 0.7117647 0.6014706 0.6588235 0.4066176 0.4919118 0.5742647
+12 0.4441176 0.5816176 0.5963235 0.5139706 0.5264706 0.5220588 0.6544118
+13 0.5286765 0.6252101 0.6420168 0.7735294 0.3336134 0.5504202 0.6159664
+14 0.3044118 0.5963235 0.6110294 0.3742647 0.5411765 0.3573529 0.5147059
+15 0.6242647 0.4588235 0.6184874 0.5691176 0.5386555 0.6025210 0.3823529
+16 0.6845588 0.3831933 0.6857143 0.3147059 0.8344538 0.5504202 0.4848739
+17 0.7897059 0.2176471 0.6630252 0.4198529 0.8117647 0.6705882 0.6050420
+18 0.5268908 0.4647059 0.8336134 0.5210084 0.5537815 0.7588235 0.5386555
+           8         9        10        11        12        13        14
+2                                                                       
+3                                                                       
+4                                                                       
+5                                                                       
+6                                                                       
+7                                                                       
+8                                                                       
+9  0.6595588                                                            
+10 0.6639706 0.5126050                                                  
+11 0.5073529 0.4419118 0.4066176                                        
+12 0.4272059 0.4367647 0.3867647 0.2698529                              
+13 0.6073529 0.2596639 0.4529412 0.3647059 0.2595588                    
+14 0.4669118 0.4514706 0.3720588 0.2845588 0.1647059 0.3992647          
+15 0.4720588 0.2932773 0.5050420 0.4897059 0.4448529 0.3764706 0.4448529
+16 0.6058824 0.7319328 0.3621849 0.7235294 0.5786765 0.6722689 0.4389706
+17 0.4610294 0.7092437 0.3394958 0.7036765 0.5588235 0.6495798 0.5441176
+18 0.1882353 0.5198529 0.8286765 0.5470588 0.5669118 0.5823529 0.5816176
+          15        16        17
+2                               
+3                               
+4                               
+5                               
+6                               
+7                               
+8                               
+9                               
+10                              
+11                              
+12                              
+13                              
+14                              
+15                              
+16 0.4386555                    
+17 0.4159664 0.1655462          
+18 0.5117647 0.7705882 0.6257353
+
+Metric :  mixed ;  Types = A, N, A, N, O, O, T, I 
+Number of objects : 18
+> (dfl3 <- daisy(flower, type = list(asymm = 1:3)))
+Dissimilarities :
+           1         2         3         4         5         6         7
+2  0.8875408                                                            
+3  0.6025677 0.5882353                                                  
+4  0.4020542 0.6290850 0.6458917                                        
+5  0.4703548 0.7115780 0.4968410 0.7295518                              
+6  0.2593371 0.7549953 0.4004357 0.4788515 0.4591503                    
+7  0.3287115 0.7998911 0.6528322 0.4581155 0.5596950 0.2523965          
+8  0.4838936 0.5304388 0.6901027 0.3947168 0.5340803 0.6531279 0.5477124
+9  0.5808824 0.4933240 0.5101307 0.8076797 0.3779178 0.5870682 0.6732493
+10 0.6094363 0.5178338 0.5346405 0.5570670 0.4357610 0.4707750 0.6703081
+11 0.3278595 0.7096814 0.5993873 0.6518791 0.3864788 0.4828840 0.5652369
+12 0.4267565 0.5857843 0.6004902 0.5132761 0.5000817 0.5248366 0.6391340
+13 0.5196487 0.5998133 0.6166200 0.7464461 0.3336134 0.5170868 0.6032680
+14 0.2926062 0.5949346 0.6096405 0.3680147 0.5203431 0.3656863 0.5049837
+15 0.6221814 0.5204793 0.6057890 0.6321662 0.5259570 0.5818861 0.4460784
+16 0.6935866 0.4766885 0.7111111 0.3906162 0.8344538 0.5837535 0.5805011
+17 0.7765114 0.2539216 0.6630252 0.4853875 0.7863679 0.6785247 0.6910675
+18 0.5268908 0.5160131 0.8185341 0.5837691 0.5434641 0.7358077 0.6256536
+           8         9        10        11        12        13        14
+2                                                                       
+3                                                                       
+4                                                                       
+5                                                                       
+6                                                                       
+7                                                                       
+8                                                                       
+9  0.6366422                                                            
+10 0.6639706 0.4864146                                                  
+11 0.4955474 0.4308007 0.3948121                                        
+12 0.4216503 0.4194036 0.3812092 0.2636029                              
+13 0.5754085 0.2493464 0.4164332 0.3445670 0.2331699                    
+14 0.4558007 0.4396650 0.3609477 0.2838644 0.1591503 0.3784314          
+15 0.5156863 0.2908964 0.4812325 0.4806781 0.4295752 0.3637722 0.4351307
+16 0.7289449 0.7422502 0.3986928 0.7436683 0.6050654 0.6722689 0.4598039
+17 0.5380019 0.6941643 0.3506069 0.7015931 0.5629902 0.6241830 0.5427288
+18 0.1890523 0.5198529 0.8057598 0.5359477 0.5495507 0.5733252 0.5698121
+          15        16        17
+2                               
+3                               
+4                               
+5                               
+6                               
+7                               
+8                               
+9                               
+10                              
+11                              
+12                              
+13                              
+14                              
+15                              
+16 0.5265795                    
+17 0.4704793 0.2227669          
+18 0.5824930 0.8909897 0.7000467
+
+Metric :  mixed ;  Types = A, A, A, N, O, O, I, I 
+Number of objects : 18
+> 
+> ## --- animals
+> data(animals)
+> d0 <- daisy(animals)
+Warning message:
+In daisy(animals) :
+  binary variable(s) 1, 2, 3, 4, 5, 6 treated as interval scaled
+> 
+> d1 <- daisy(animals - 1, type=list(asymm=c(2,4)))
+Warning message:
+In daisy(animals - 1, type = list(asymm = c(2, 4))) :
+  binary variable(s) 1, 3, 5, 6 treated as interval scaled
+> (d2 <- daisy(animals - 1, type=list(symm = c(1,3,5,6), asymm=c(2,4))))
+Dissimilarities :
+          ant       bee       cat       cpl       chi       cow       duc
+bee 0.4000000                                                            
+cat 1.0000000 0.8000000                                                  
+cpl 0.5000000 0.4000000 0.5000000                                        
+chi 0.8000000 0.6666667 0.4000000 0.8000000                              
+cow 0.7500000 0.6000000 0.2500000 0.7500000 0.2000000                    
+duc 0.6000000 0.6000000 0.6000000 1.0000000 0.5000000 0.4000000          
+eag 0.8333333 0.8333333 0.5000000 0.8333333 0.5000000 0.6666667 0.3333333
+ele 0.6000000 0.8333333 0.6000000 1.0000000 0.2000000 0.4000000 0.3333333
+fly 0.4000000 0.4000000 0.8000000 0.4000000 1.0000000 1.0000000 0.6000000
+fro 0.5000000 0.8000000 0.7500000 0.7500000 0.5000000 0.7500000 0.6000000
+her 0.2500000 0.6000000 0.7500000 0.7500000 0.6000000 0.5000000 0.4000000
+lio 0.7500000 0.6000000 0.2500000 0.7500000 0.0000000 0.0000000 0.4000000
+liz 0.5000000 0.8000000 0.5000000 0.5000000 0.8000000 0.7500000 0.6000000
+lob 0.0000000 0.5000000 1.0000000 0.3333333 1.0000000 1.0000000 0.7500000
+man 0.8000000 0.6666667 0.4000000 0.8000000 0.0000000 0.2000000 0.5000000
+rab 0.7500000 0.6000000 0.2500000 0.7500000 0.2000000 0.0000000 0.4000000
+sal 0.3333333 0.7500000 0.6666667 0.6666667 0.7500000 0.6666667 0.5000000
+spi 0.5000000 0.4000000 0.5000000 0.0000000 0.7500000 0.7500000 1.0000000
+wha 0.6000000 0.8333333 0.6000000 1.0000000 0.2000000 0.4000000 0.3333333
+          eag       ele       fly       fro       her       lio       liz
+bee                                                                      
+cat                                                                      
+cpl                                                                      
+chi                                                                      
+cow                                                                      
+duc                                                                      
+eag                                                                      
+ele 0.3333333                                                            
+fly 0.5000000 0.8333333                                                  
+fro 0.4000000 0.2500000 0.6000000                                        
+her 0.6666667 0.4000000 0.6000000 0.2500000                              
+lio 0.6000000 0.2500000 1.0000000 0.6666667 0.5000000                    
+liz 0.5000000 0.6000000 0.4000000 0.2500000 0.2500000 0.7500000          
+lob 0.8000000 0.7500000 0.2500000 0.5000000 0.3333333 1.0000000 0.3333333
+man 0.5000000 0.2000000 1.0000000 0.5000000 0.6000000 0.0000000 0.8000000
+rab 0.6666667 0.4000000 1.0000000 0.7500000 0.5000000 0.0000000 0.7500000
+sal 0.6000000 0.5000000 0.5000000 0.2500000 0.0000000 0.6666667 0.0000000
+spi 0.8000000 1.0000000 0.4000000 0.6666667 0.7500000 0.7500000 0.5000000
+wha 0.3333333 0.0000000 0.8333333 0.2500000 0.4000000 0.2500000 0.6000000
+          lob       man       rab       sal       spi
+bee                                                  
+cat                                                  
+cpl                                                  
+chi                                                  
+cow                                                  
+duc                                                  
+eag                                                  
+ele                                                  
+fly                                                  
+fro                                                  
+her                                                  
+lio                                                  
+liz                                                  
+lob                                                  
+man 1.0000000                                        
+rab 1.0000000 0.2000000                              
+sal 0.3333333 0.7500000 0.6666667                    
+spi 0.3333333 0.7500000 0.7500000 0.6666667          
+wha 0.7500000 0.2000000 0.4000000 0.5000000 1.0000000
+
+Metric :  mixed ;  Types = S, A, S, A, S, S 
+Number of objects : 20
+> stopifnot(c(d1) == c(d2))
+> 
+> d3 <- daisy(2 - animals, type=list(asymm=c(2,4)))
+Warning message:
+In daisy(2 - animals, type = list(asymm = c(2, 4))) :
+  binary variable(s) 1, 3, 5, 6 treated as interval scaled
+> (d4 <- daisy(2 - animals, type=list(symm = c(1,3,5,6), asymm=c(2,4))))
+Dissimilarities :
+          ant       bee       cat       cpl       chi       cow       duc
+bee 0.3333333                                                            
+cat 0.6666667 0.6666667                                                  
+cpl 0.3333333 0.3333333 0.3333333                                        
+chi 0.6666667 0.6666667 0.3333333 0.6666667                              
+cow 0.5000000 0.5000000 0.1666667 0.5000000 0.1666667                    
+duc 0.5000000 0.6000000 0.5000000 0.8333333 0.5000000 0.3333333          
+eag 0.8333333 1.0000000 0.5000000 0.8333333 0.6000000 0.6666667 0.4000000
+ele 0.5000000 0.8333333 0.5000000 0.8333333 0.2000000 0.3333333 0.3333333
+fly 0.3333333 0.4000000 0.6666667 0.3333333 1.0000000 0.8333333 0.6000000
+fro 0.4000000 0.8000000 0.6000000 0.6000000 0.5000000 0.6000000 0.6000000
+her 0.1666667 0.5000000 0.5000000 0.5000000 0.5000000 0.3333333 0.3333333
+lio 0.6000000 0.6000000 0.2000000 0.6000000 0.0000000 0.0000000 0.4000000
+liz 0.3333333 0.6666667 0.3333333 0.3333333 0.6666667 0.5000000 0.5000000
+lob 0.0000000 0.4000000 0.6000000 0.2000000 0.8000000 0.6000000 0.6000000
+man 0.6666667 0.6666667 0.3333333 0.6666667 0.0000000 0.1666667 0.5000000
+rab 0.5000000 0.5000000 0.1666667 0.5000000 0.1666667 0.0000000 0.3333333
+sal 0.2000000 0.6000000 0.4000000 0.4000000 0.6000000 0.4000000 0.4000000
+spi 0.4000000 0.4000000 0.4000000 0.0000000 0.6000000 0.6000000 1.0000000
+wha 0.5000000 0.8333333 0.5000000 0.8333333 0.2000000 0.3333333 0.3333333
+          eag       ele       fly       fro       her       lio       liz
+bee                                                                      
+cat                                                                      
+cpl                                                                      
+chi                                                                      
+cow                                                                      
+duc                                                                      
+eag                                                                      
+ele 0.4000000                                                            
+fly 0.6000000 0.8333333                                                  
+fro 0.5000000 0.2500000 0.6000000                                        
+her 0.6666667 0.3333333 0.5000000 0.2000000                              
+lio 0.6000000 0.2000000 1.0000000 0.5000000 0.4000000                    
+liz 0.5000000 0.5000000 0.3333333 0.2000000 0.1666667 0.6000000          
+lob 0.8000000 0.6000000 0.2000000 0.4000000 0.2000000 0.7500000 0.2000000
+man 0.6000000 0.2000000 1.0000000 0.5000000 0.5000000 0.0000000 0.6666667
+rab 0.6666667 0.3333333 0.8333333 0.6000000 0.3333333 0.0000000 0.5000000
+sal 0.6000000 0.4000000 0.4000000 0.2000000 0.0000000 0.5000000 0.0000000
+spi 0.8000000 0.8000000 0.4000000 0.5000000 0.6000000 0.6000000 0.4000000
+wha 0.4000000 0.0000000 0.8333333 0.2500000 0.3333333 0.2000000 0.5000000
+          lob       man       rab       sal       spi
+bee                                                  
+cat                                                  
+cpl                                                  
+chi                                                  
+cow                                                  
+duc                                                  
+eag                                                  
+ele                                                  
+fly                                                  
+fro                                                  
+her                                                  
+lio                                                  
+liz                                                  
+lob                                                  
+man 0.8000000                                        
+rab 0.6000000 0.1666667                              
+sal 0.2000000 0.6000000 0.4000000                    
+spi 0.2500000 0.6000000 0.6000000 0.5000000          
+wha 0.6000000 0.2000000 0.3333333 0.4000000 0.8000000
+
+Metric :  mixed ;  Types = S, A, S, A, S, S 
+Number of objects : 20
+> stopifnot(c(d3) == c(d4))
+> 
+> pairs(cbind(d0,d2,d4),
++       main = "Animals -- symmetric and asymm. dissimilarities")
+> 
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/clusplot-out.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/clusplot-out.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/clusplot-out.R	(revision 2477)
@@ -0,0 +1,29 @@
+library(cluster)
+
+### clusplot() & pam() RESULT checking ...
+
+## plotting votes.diss(dissimilarity) in a bivariate plot and
+## partitioning into 2 clusters
+data(votes.repub)
+votes.diss <- daisy(votes.repub)
+for(k in 2:4) {
+    votes.clus <- pam(votes.diss, k, diss = TRUE)$clustering
+    print(clusplot(votes.diss, votes.clus, diss = TRUE, shade = TRUE))
+}
+
+## plotting iris (dataframe) in a 2-dimensional plot and partitioning
+## into 3 clusters.
+data(iris)
+iris.x <- iris[, 1:4]
+
+for(k in 2:5)
+    print(clusplot(iris.x, pam(iris.x, k)$clustering, diss = FALSE))
+
+
+.Random.seed <- c(0L,rep(7654L,3))
+## generate 25 objects, divided into 2 clusters.
+x <- rbind(cbind(rnorm(10,0,0.5), rnorm(10,0,0.5)),
+           cbind(rnorm(15,5,0.5), rnorm(15,5,0.5)))
+print.default(clusplot(px2 <- pam(x, 2)))
+
+clusplot(px2, labels = 2, col.p = 1 + px2$clustering)
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/diana-ex.Rout.save
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/diana-ex.Rout.save	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/diana-ex.Rout.save	(revision 2477)
@@ -0,0 +1,545 @@
+
+R version 2.14.1 RC (2011-12-20 r57943)
+Copyright (C) 2011 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+Platform: x86_64-unknown-linux-gnu (64-bit)
+
+R is free software and comes with ABSOLUTELY NO WARRANTY.
+You are welcome to redistribute it under certain conditions.
+Type 'license()' or 'licence()' for distribution details.
+
+R is a collaborative project with many contributors.
+Type 'contributors()' for more information and
+'citation()' on how to cite R or R packages in publications.
+
+Type 'demo()' for some demos, 'help()' for on-line help, or
+'help.start()' for an HTML browser interface to help.
+Type 'q()' to quit R.
+
+> library(cluster)
+> options(digits = 6)
+> data(votes.repub)
+> di.votes <- daisy(votes.repub)
+> 
+> .p00 <- proc.time()
+> summary(diana(votes.repub, metric = "manhattan", stand = TRUE))
+Merge:
+      [,1] [,2]
+ [1,]   -7  -32
+ [2,]  -13  -35
+ [3,]  -12  -50
+ [4,]    1  -30
+ [5,]  -26  -28
+ [6,]   -5  -37
+ [7,]  -22  -38
+ [8,]  -21  -39
+ [9,]  -16  -27
+[10,]    4    2
+[11,]  -25  -48
+[12,]  -42  -46
+[13,]   -6  -14
+[14,]  -34  -41
+[15,]   -8  -20
+[16,]    5  -31
+[17,]   10    7
+[18,]  -17  -47
+[19,]   -3  -44
+[20,]  -33   12
+[21,]   15   18
+[22,]   17  -29
+[23,]   22  -49
+[24,]   21   11
+[25,]   23  -15
+[26,]  -11  -19
+[27,]    3    9
+[28,]    8  -23
+[29,]   19   16
+[30,]   27   14
+[31,]    6   25
+[32,]   -1  -10
+[33,]   31   13
+[34,]   29  -36
+[35,]   -2  -45
+[36,]   -9  -43
+[37,]   24   20
+[38,]   32   -4
+[39,]  -24  -40
+[40,]   38  -18
+[41,]   33   30
+[42,]   34   37
+[43,]   35   26
+[44,]   41   28
+[45,]   40   36
+[46,]   42   44
+[47,]   45   39
+[48,]   43   46
+[49,]   47   48
+Order of objects:
+ [1] Alabama        Georgia        Arkansas       Louisiana      Florida       
+ [6] Texas          Mississippi    South Carolina Alaska         Vermont       
+[11] Hawaii         Maine          Arizona        Utah           Montana       
+[16] Nevada         New Mexico     Oklahoma       Delaware       Maryland      
+[21] Kentucky       Washington     Missouri       West Virginia  North Carolina
+[26] Tennessee      Virginia       California     Oregon         Connecticut   
+[31] New York       New Jersey     Illinois       Ohio           Michigan      
+[36] Pennsylvania   New Hampshire  Wisconsin      Iowa           Colorado      
+[41] Indiana        Idaho          Wyoming        Kansas         Nebraska      
+[46] North Dakota   South Dakota   Massachusetts  Rhode Island   Minnesota     
+Height:
+ [1]  27.36345  33.96925  39.65826  48.53428  31.89965  72.59850  35.69152
+ [8] 167.58020  31.58222  43.84601  24.48796  85.55248  18.39339  25.67631
+[15]  11.49397  17.45552  28.62550  42.54480  16.48510  20.04450  17.87516
+[22]  21.98373  14.21808  33.61071  18.39733  14.75762  56.55675  11.70132
+[29]  27.05887   8.38200  11.36820  13.25237   9.23004  17.83484  12.70819
+[36]  20.66714  21.03997  23.66586  28.60541  15.31703  40.33905  10.46294
+[43]  24.83525  12.80419  26.36292  16.25192  47.25773  12.79160  24.87206
+Divisive coefficient:
+[1] 0.886918
+
+1225 dissimilarities, summarized :
+   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
+  8.382  25.540  34.510  45.060  56.020 167.600 
+Metric :  manhattan 
+Number of objects : 50
+
+Available components:
+[1] "order"     "height"    "dc"        "merge"     "diss"      "call"     
+[7] "order.lab" "data"     
+> summary(diana(di.votes, keep.diss = FALSE))
+Merge:
+      [,1] [,2]
+ [1,]  -12  -50
+ [2,]  -13  -32
+ [3,]  -14  -35
+ [4,]   -7  -29
+ [5,]  -21  -39
+ [6,]   -3  -28
+ [7,]  -25  -48
+ [8,]  -16  -27
+ [9,]  -15  -41
+[10,]    2  -30
+[11,]    6  -26
+[12,]  -33  -42
+[13,]   12  -46
+[14,]    1  -44
+[15,]   10    3
+[16,]  -22  -38
+[17,]  -11  -19
+[18,]   -5  -47
+[19,]  -17  -20
+[20,]   -2  -45
+[21,]   14  -31
+[22,]  -37  -49
+[23,]    9    8
+[24,]    4   15
+[25,]   -8   19
+[26,]   -6   21
+[27,]    5  -23
+[28,]   24   16
+[29,]   26  -36
+[30,]   11   29
+[31,]   -1  -10
+[32,]   28   22
+[33,]   23  -34
+[34,]    7   13
+[35,]   -4   -9
+[36,]   20   17
+[37,]  -24  -40
+[38,]   31  -43
+[39,]   32   33
+[40,]   25   34
+[41,]   30   18
+[42,]   35  -18
+[43,]   38   42
+[44,]   39   27
+[45,]   41   40
+[46,]   36   44
+[47,]   43   37
+[48,]   46   45
+[49,]   47   48
+Order of objects:
+ [1] Alabama        Georgia        Texas          Arkansas       Florida       
+ [6] Louisiana      Mississippi    South Carolina Alaska         Vermont       
+[11] Hawaii         Maine          Connecticut    New Hampshire  Illinois      
+[16] New York       New Jersey     Indiana        Ohio           Michigan      
+[21] Pennsylvania   Oregon         Wisconsin      Iowa           South Dakota  
+[26] Kansas         Nebraska       North Dakota   Massachusetts  Rhode Island  
+[31] Minnesota      Arizona        Nevada         Montana        Colorado      
+[36] Idaho          Wyoming        Utah           New Mexico     Oklahoma      
+[41] California     Washington     Delaware       Kentucky       Maryland      
+[46] Missouri       West Virginia  North Carolina Tennessee      Virginia      
+Height:
+ [1]  48.2397  63.1862  72.9221  56.1363  72.9221 116.7048  63.0951 281.9508
+ [9]  33.8330  58.0384  32.7611 106.7448  20.5216  39.1728  19.8436  27.0243
+[17]  31.4966  20.2258  47.1690  31.6595  49.2428  36.7667  64.4821  26.1547
+[25]  37.4564  25.9221  50.7201  77.1184  22.6334  44.4594 178.4119  23.4206
+[33]  27.8273  48.0483  43.7055  17.1992  31.1988  34.0510  48.0483  70.4868
+[41]  33.2328  81.0764  43.3829  33.4744  66.7591  25.3953  54.7306  29.5099
+[49]  30.1541
+Divisive coefficient:
+[1] 0.878225
+
+Available components:
+[1] "order"     "height"    "dc"        "merge"     "diss"      "call"     
+[7] "order.lab"
+> cat('Time elapsed: ', proc.time() - .p00,'\n')
+Time elapsed:  0.014 0.001 0.015 0 0 
+> 
+> data(agriculture)
+> data(ruspini)
+> 
+> .p0 <- proc.time()
+> dia.agr <- diana(agriculture)
+> drusp0  <- diana(ruspini, keep.diss=FALSE, keep.data=FALSE)
+> drusp1  <- diana(ruspini, metric = "manhattan")
+> cat('Time elapsed: ', proc.time() - .p0,'\n')
+Time elapsed:  0.006 0.001 0.006 0 0 
+> 
+> summary(dia.agr)
+Merge:
+      [,1] [,2]
+ [1,]   -1  -10
+ [2,]   -2   -9
+ [3,]    1   -3
+ [4,]   -6   -8
+ [5,]   -5   -7
+ [6,]    3  -12
+ [7,]   -4  -11
+ [8,]    6    4
+ [9,]    8    2
+[10,]    7    5
+[11,]    9   10
+Order of objects:
+ [1] B   NL  D   UK  F   I   DK  L   GR  P   E   IRL
+Height:
+ [1]  1.64924  2.43516  4.85077  6.72309  2.77308  8.05295  2.22036 24.03539
+ [9]  5.16236 12.56742  3.14006
+Divisive coefficient:
+[1] 0.871106
+
+66 dissimilarities, summarized :
+   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
+  1.649   4.357   7.987   9.594  13.250  24.040 
+Metric :  euclidean 
+Number of objects : 12
+
+Available components:
+[1] "order"     "height"    "dc"        "merge"     "diss"      "call"     
+[7] "order.lab" "data"     
+> summary(drusp0)
+Merge:
+      [,1] [,2]
+ [1,]  -18  -19
+ [2,]  -55  -56
+ [3,]  -27  -28
+ [4,]  -49  -51
+ [5,]  -33  -34
+ [6,]  -23  -24
+ [7,]  -59  -60
+ [8,]  -29  -30
+ [9,]  -67  -69
+[10,]  -36  -39
+[11,]  -32  -35
+[12,]  -50  -54
+[13,]  -37  -38
+[14,]  -70  -71
+[15,]  -64  -68
+[16,]  -62  -66
+[17,]  -12  -13
+[18,]  -16    1
+[19,]   -9  -10
+[20,]  -42  -43
+[21,]  -15  -17
+[22,]  -47  -48
+[23,]   12  -52
+[24,]  -21  -22
+[25,]    9   14
+[26,]    2  -57
+[27,]  -73  -74
+[28,]    6  -25
+[29,]  -26   11
+[30,]    4  -53
+[31,]    3    8
+[32,]  -11   17
+[33,]   -6   -8
+[34,]   -2   -3
+[35,]   10  -40
+[36,]  -14   21
+[37,]  -65   25
+[38,]   -4   33
+[39,]   36   18
+[40,]   29    5
+[41,]   26    7
+[42,]   -1   34
+[43,]   24   28
+[44,]   16  -63
+[45,]  -46   22
+[46,]  -31   35
+[47,]   27  -75
+[48,]   37  -72
+[49,]   43   31
+[50,]   30   23
+[51,]   13   20
+[52,]   15   48
+[53,]   32  -20
+[54,]   41  -58
+[55,]   42   -5
+[56,]   40   46
+[57,]  -44  -45
+[58,]   19   39
+[59,]   38   -7
+[60,]   51  -41
+[61,]  -61   44
+[62,]   50   54
+[63,]   52   47
+[64,]   61   63
+[65,]   49   56
+[66,]   59   53
+[67,]   55   58
+[68,]   57   62
+[69,]   65   60
+[70,]   67   66
+[71,]   68   45
+[72,]   69   71
+[73,]   70   64
+[74,]   73   72
+Order of objects:
+ [1] 1  2  3  5  9  10 14 15 17 16 18 19 4  6  8  7  11 12 13 20 61 62 66 63 64
+[26] 68 65 67 69 70 71 72 73 74 75 21 22 23 24 25 27 28 29 30 26 32 35 33 34 31
+[51] 36 39 40 37 38 42 43 41 44 45 49 51 53 50 54 52 55 56 57 59 60 58 46 47 48
+Height:
+ [1]  10.04988   6.40312  16.12452  29.12044   4.12311  17.02939   8.48528
+ [8]   4.24264   9.21954   4.12311   1.41421  40.24922   8.94427   6.32456
+[15]  19.02630  28.84441   6.32456   4.12311  14.14214 102.07840  21.40093
+[22]   4.12311  10.81665  27.07397   3.60555  13.60147   8.54400   2.82843
+[29]   5.09902   3.60555  12.80625  22.80351   5.65685  12.36932 154.49595
+[36]   4.47214  10.77033   2.23607   5.83095  13.03840   2.00000   6.32456
+[43]   2.82843  28.16026   6.08276   3.00000   9.43398   2.23607  16.27882
+[50]  11.04536   3.00000   6.70820  36.61967   3.60555  13.34166   4.24264
+[57]  20.02498  94.57801  17.02939  35.35534   2.23607   6.32456  13.15295
+[64]   3.16228   4.47214  22.20360   2.00000   5.38516   9.84886   2.82843
+[71]  15.29706  47.63402  11.00000   4.47214
+Divisive coefficient:
+[1] 0.960566
+
+Available components:
+[1] "order"     "height"    "dc"        "merge"     "diss"      "call"     
+[7] "order.lab"
+> summary(drusp1)
+Merge:
+      [,1] [,2]
+ [1,]  -55  -56
+ [2,]  -27  -28
+ [3,]  -18  -19
+ [4,]  -49  -51
+ [5,]  -33  -34
+ [6,]  -32  -35
+ [7,]  -23  -24
+ [8,]  -59  -60
+ [9,]  -50  -54
+[10,]  -29  -30
+[11,]  -67  -69
+[12,]  -37  -38
+[13,]   11  -71
+[14,]  -64  -68
+[15,]  -62  -66
+[16,]  -12  -13
+[17,]  -16    3
+[18,]   -9  -10
+[19,]  -47  -48
+[20,]    9  -52
+[21,]  -42  -43
+[22,]  -39  -40
+[23,]  -21  -22
+[24,]   13  -70
+[25,]  -15  -17
+[26,]    1  -57
+[27,]  -26    6
+[28,]    4  -53
+[29,]    7  -25
+[30,]    2   10
+[31,]  -11   16
+[32,]   -6   -8
+[33,]  -31  -36
+[34,]  -74  -75
+[35,]   -2   -3
+[36,]  -46   19
+[37,]  -65   24
+[38,]  -14   17
+[39,]   -4   32
+[40,]   38   25
+[41,]   -1   35
+[42,]   26    8
+[43,]   27    5
+[44,]   23   30
+[45,]   28   20
+[46,]   15  -63
+[47,]   43   33
+[48,]   44   29
+[49,]   46  -73
+[50,]   31  -20
+[51,]   42  -58
+[52,]  -44  -45
+[53,]   12   22
+[54,]   37  -72
+[55,]   14   54
+[56,]   39   -7
+[57,]   41   -5
+[58,]   53   21
+[59,]   18   40
+[60,]   48   47
+[61,]  -61   49
+[62,]   45   51
+[63,]   58  -41
+[64,]   55   34
+[65,]   61   64
+[66,]   57   59
+[67,]   56   50
+[68,]   52   62
+[69,]   60   63
+[70,]   66   67
+[71,]   68   36
+[72,]   69   71
+[73,]   70   65
+[74,]   73   72
+Order of objects:
+ [1] 1  2  3  5  9  10 14 16 18 19 15 17 4  6  8  7  11 12 13 20 61 62 66 63 73
+[26] 64 68 65 67 69 71 70 72 74 75 21 22 27 28 29 30 23 24 25 26 32 35 33 34 31
+[51] 36 37 38 39 40 42 43 41 44 45 49 51 53 50 54 52 55 56 57 59 60 58 46 47 48
+Height:
+ [1]  12   9  22  36   5  24  11   5   2  12   6  54  12   8  20  40   8   5  16
+[20] 142  30   5  15  16  33   5  19  11   4   5   6  18  32   9 187   6  14   2
+[39]   8   4  16   3   8  26   7   3  13   3  16   9  51   5  18   6  24   6  32
+[58] 123  18  48   3   8  15   4   6  31   2   7  13   4  18  67  11   6
+Divisive coefficient:
+[1] 0.958075
+
+2775 dissimilarities, summarized :
+   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
+   2.00   52.50   97.00   90.95  128.00  187.00 
+Metric :  manhattan 
+Number of objects : 75
+
+Available components:
+[1] "order"     "height"    "dc"        "merge"     "diss"      "call"     
+[7] "order.lab" "data"     
+> str    (drusp1)
+List of 8
+ $ order    : int [1:75] 1 2 3 5 9 10 14 16 18 19 ...
+ $ height   : num [1:74] 12 9 22 36 5 24 11 5 2 12 ...
+ $ dc       : num 0.958
+ $ merge    : int [1:74, 1:2] -55 -27 -18 -49 -33 -32 -23 -59 -50 -29 ...
+ $ diss     :Classes 'dissimilarity', 'dist'  atomic [1:2775] 11 12 29 13 25 43 33 22 27 39 ...
+  .. ..- attr(*, "Size")= int 75
+  .. ..- attr(*, "Metric")= chr "manhattan"
+  .. ..- attr(*, "Labels")= chr [1:75] "1" "2" "3" "4" ...
+ $ call     : language diana(x = ruspini, metric = "manhattan")
+ $ order.lab: chr [1:75] "1" "2" "3" "5" ...
+ $ data     : int [1:75, 1:2] 4 5 10 9 13 13 12 15 18 19 ...
+  ..- attr(*, "dimnames")=List of 2
+  .. ..$ : chr [1:75] "1" "2" "3" "4" ...
+  .. ..$ : chr [1:2] "x" "y"
+ - attr(*, "class")= chr [1:2] "diana" "twins"
+> 
+> ## From system.file("scripts/ch11.R", package = "MASS")
+> data(swiss)
+> swiss.x <- as.matrix(swiss[,-1])
+> .p1 <- proc.time()
+> dCH <- diana(swiss.x)
+> cat('Time elapsed: ', proc.time() - .p1,'\n')
+Time elapsed:  0.001 0 0.001 0 0 
+> str(as.dendrogram(as.hclust(dCH)))# keep back-compatible
+--[dendrogram w/ 2 branches and 47 members at h = 127]
+  |--[dendrogram w/ 2 branches and 31 members at h = 99.2]
+  |  |--[dendrogram w/ 2 branches and 11 members at h = 60.9]
+  |  |  |--[dendrogram w/ 2 branches and 8 members at h = 29.1]
+  |  |  |  |--[dendrogram w/ 2 branches and 5 members at h = 22.7]
+  |  |  |  |  |--[dendrogram w/ 2 branches and 4 members at h = 17.4]
+  |  |  |  |  |  |--[dendrogram w/ 2 branches and 3 members at h = 11.7]
+  |  |  |  |  |  |  |--leaf "Courtelary" 
+  |  |  |  |  |  |  `--[dendrogram w/ 2 branches and 2 members at h = 7.48]
+  |  |  |  |  |  |     |--leaf "Le Locle" 
+  |  |  |  |  |  |     `--leaf "ValdeTravers" 
+  |  |  |  |  |  `--leaf "La Chauxdfnd" 
+  |  |  |  |  `--leaf "La Vallee" 
+  |  |  |  `--[dendrogram w/ 2 branches and 3 members at h = 19]
+  |  |  |     |--[dendrogram w/ 2 branches and 2 members at h = 11.5]
+  |  |  |     |  |--leaf "Lausanne" 
+  |  |  |     |  `--leaf "Neuchatel" 
+  |  |  |     `--leaf "Vevey" 
+  |  |  `--[dendrogram w/ 2 branches and 3 members at h = 56.1]
+  |  |     |--leaf "V. De Geneve" 
+  |  |     `--[dendrogram w/ 2 branches and 2 members at h = 21.4]
+  |  |        |--leaf "Rive Droite" 
+  |  |        `--leaf "Rive Gauche" 
+  |  `--[dendrogram w/ 2 branches and 20 members at h = 48.4]
+  |     |--leaf "Moutier" 
+  |     `--[dendrogram w/ 2 branches and 19 members at h = 44.3]
+  |        |--[dendrogram w/ 2 branches and 18 members at h = 39.1]
+  |        |  |--[dendrogram w/ 2 branches and 6 members at h = 21.9]
+  |        |  |  |--[dendrogram w/ 2 branches and 4 members at h = 12.1]
+  |        |  |  |  |--[dendrogram w/ 2 branches and 2 members at h = 10.8]
+  |        |  |  |  |  |--leaf "Neuveville" 
+  |        |  |  |  |  `--leaf "Boudry" 
+  |        |  |  |  `--[dendrogram w/ 2 branches and 2 members at h = 4.56]
+  |        |  |  |     |--leaf "Grandson" 
+  |        |  |  |     `--leaf "Val de Ruz" 
+  |        |  |  `--[dendrogram w/ 2 branches and 2 members at h = 13.5]
+  |        |  |     |--leaf "Nyone" 
+  |        |  |     `--leaf "Yverdon" 
+  |        |  `--[dendrogram w/ 2 branches and 12 members at h = 20.4]
+  |        |     |--[dendrogram w/ 2 branches and 7 members at h = 15.1]
+  |        |     |  |--[dendrogram w/ 2 branches and 5 members at h = 11.6]
+  |        |     |  |  |--[dendrogram w/ 2 branches and 4 members at h = 8.05]
+  |        |     |  |  |  |--[dendrogram w/ 2 branches and 3 members at h = 6.79]
+  |        |     |  |  |  |  |--[dendrogram w/ 2 branches and 2 members at h = 4.79]
+  |        |     |  |  |  |  |  |--leaf "Aigle" 
+  |        |     |  |  |  |  |  `--leaf "Morges" 
+  |        |     |  |  |  |  `--leaf "Rolle" 
+  |        |     |  |  |  `--leaf "Avenches" 
+  |        |     |  |  `--leaf "Orbe" 
+  |        |     |  `--[dendrogram w/ 2 branches and 2 members at h = 6.04]
+  |        |     |     |--leaf "Moudon" 
+  |        |     |     `--leaf "Payerne" 
+  |        |     `--[dendrogram w/ 2 branches and 5 members at h = 17.3]
+  |        |        |--[dendrogram w/ 2 branches and 4 members at h = 11.2]
+  |        |        |  |--[dendrogram w/ 2 branches and 2 members at h = 7.57]
+  |        |        |  |  |--leaf "Aubonne" 
+  |        |        |  |  `--leaf "Oron" 
+  |        |        |  `--[dendrogram w/ 2 branches and 2 members at h = 6.35]
+  |        |        |     |--leaf "Cossonay" 
+  |        |        |     `--leaf "Lavaux" 
+  |        |        `--leaf "Paysd'enhaut" 
+  |        `--leaf "Echallens" 
+  `--[dendrogram w/ 2 branches and 16 members at h = 56.2]
+     |--[dendrogram w/ 2 branches and 5 members at h = 20.4]
+     |  |--[dendrogram w/ 2 branches and 3 members at h = 12.7]
+     |  |  |--leaf "Delemont" 
+     |  |  `--[dendrogram w/ 2 branches and 2 members at h = 9.4]
+     |  |     |--leaf "Franches-Mnt" 
+     |  |     `--leaf "Porrentruy" 
+     |  `--[dendrogram w/ 2 branches and 2 members at h = 13]
+     |     |--leaf "Gruyere" 
+     |     `--leaf "Sarine" 
+     `--[dendrogram w/ 2 branches and 11 members at h = 30]
+        |--[dendrogram w/ 2 branches and 5 members at h = 12.9]
+        |  |--[dendrogram w/ 2 branches and 4 members at h = 11.9]
+        |  |  |--[dendrogram w/ 2 branches and 3 members at h = 8.45]
+        |  |  |  |--leaf "Broye" 
+        |  |  |  `--[dendrogram w/ 2 branches and 2 members at h = 4.14]
+        |  |  |     |--leaf "Glane" 
+        |  |  |     `--leaf "Veveyse" 
+        |  |  `--leaf "Sion" 
+        |  `--leaf "Monthey" 
+        `--[dendrogram w/ 2 branches and 6 members at h = 16]
+           |--[dendrogram w/ 2 branches and 4 members at h = 7.42]
+           |  |--[dendrogram w/ 2 branches and 3 members at h = 5.94]
+           |  |  |--[dendrogram w/ 2 branches and 2 members at h = 2.05]
+           |  |  |  |--leaf "Conthey" 
+           |  |  |  `--leaf "Sierre" 
+           |  |  `--leaf "Herens" 
+           |  `--leaf "Entremont" 
+           `--[dendrogram w/ 2 branches and 2 members at h = 5.09]
+              |--leaf "Martigwy" 
+              `--leaf "St Maurice" 
+> 
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/pam.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/pam.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/pam.R	(revision 2477)
@@ -0,0 +1,178 @@
+library(cluster)
+## Compare on these:
+nms <- c("clustering", "objective", "isolation", "clusinfo", "silinfo")
+nm2 <- c("medoids", "id.med", nms)
+nm3 <- nm2[- pmatch("obj", nm2)]
+
+(x <- x0 <- cbind(V1 = (-3:4)^2, V2 = c(0:6,NA), V3 = c(1,2,NA,7,NA,8:9,8)))
+(px <- pam(x,2, metric="manhattan"))
+stopifnot(identical(x,x0))# DUP=FALSE ..
+pd <-  pam(dist(x,"manhattan"), 2)
+px2 <- pam(x,2, metric="manhattan", keep.diss=FALSE, keep.data=FALSE)
+pdC <- pam(x,2, metric="manhattan", cluster.only = TRUE)
+p1  <- pam(x,1, metric="manhattan")
+
+stopifnot(identical(px[nms], pd[nms]),
+	  identical(px[nms], px2[nms]),
+	  identical(pdC, px2$clustering),
+	  ## and for default dist "euclidean":
+	  identical(pam(x,	2)[nms],
+		    pam(dist(x),2)[nms]),
+	  identical(p1[c("id.med", "objective", "clusinfo")],
+		    list(id.med = 6L, objective = c(build=9.25, swap=9.25),
+			 clusinfo = array(c(8, 18, 9.25, 45, 0), dim = c(1, 5),
+			 dimnames=list(NULL, c("size", "max_diss", "av_diss",
+			 "diameter", "separation"))))),
+	  p1$clustering == 1, is.null(p1$silinfo)
+	  )
+
+set.seed(253)
+## generate 250 objects, divided into 2 clusters.
+x <- rbind(cbind(rnorm(120, 0,8), rnorm(120, 0,8)),
+	   cbind(rnorm(130,50,8), rnorm(130,10,8)))
+
+.proctime00 <- proc.time()
+
+summary(px2 <- pam(x, 2))
+pdx <- pam(dist(x), 2)
+all.equal(px2[nms], pdx[nms], tol = 1e-12) ## TRUE
+pdxK <- pam(dist(x), 2, keep.diss = TRUE)
+stopifnot(identical(pdx[nm2], pdxK[nm2]))
+
+spdx <- silhouette(pdx)
+summary(spdx)
+spdx
+postscript("pam-tst.ps")
+if(FALSE)
+    plot(spdx)# the silhouette
+## is now identical :
+plot(pdx)# failed in 1.7.0 -- now only does silhouette
+
+par(mfrow = 2:1)
+## new 'dist' argument for clusplot():
+plot(pdx, dist=dist(x))
+## but this should work automagically (via eval()) as well:
+plot(pdx)
+## or this
+clusplot(pdx)
+
+data(ruspini)
+summary(pr4 <- pam(ruspini, 4))
+(pr3 <- pam(ruspini, 3))
+(pr5 <- pam(ruspini, 5))
+
+data(votes.repub)
+summary(pv3 <- pam(votes.repub, 3))
+(pv4 <- pam(votes.repub, 4))
+(pv6 <- pam(votes.repub, 6, trace = 3))
+
+cat('Time elapsed: ', proc.time() - .proctime00,'\n')
+
+## re-starting with medoids from pv6  shouldn't change:
+pv6. <- pam(votes.repub, 6, medoids = pv6$id.med, trace = 3)
+identical(pv6[nm3], pv6.[nm3])
+
+## This example seg.faulted at some point:
+d.st <- data.frame(V1= c(9, 12, 12, 15, 9, 9, 13, 11, 15, 10, 13, 13,
+		       13, 15,  8, 13, 13, 10, 7, 9, 6, 11, 3),
+		   V2= c(5, 9, 3, 5, 1, 1, 2, NA, 10, 1, 4, 7,
+		       4, NA, NA, 5, 2, 4, 3, 3, 6, 1, 1),
+		   V3 = c(63, 41, 59, 50, 290, 226, 60, 36, 32, 121, 70, 51,
+		       79, 32, 42, 39, 76, 60, 56, 88, 57, 309, 254),
+		   V4 = c(146, 43, 78, 88, 314, 149, 78, NA, 238, 153, 159, 222,
+		       203, NA, NA, 74, 100, 111, 9, 180, 50, 256, 107))
+dd <- daisy(d.st, stand = TRUE)
+(r0 <- pam(dd, 5))# cluster 5 = { 23 } -- on single observation
+## pam doing the "daisy" computation internally:
+r0s <- pam(d.st, 5, stand=TRUE, keep.diss=FALSE, keep.data=FALSE)
+(ii <- which(names(r0) %in% c("call","medoids")))
+stopifnot(all.equal(r0[-ii], r0s[-ii], tol=1e-14),
+          identical(r0s$medoids, data.matrix(d.st)[r0$medoids, ]))
+
+## This gave only 3 different medoids -> and seg.fault:
+(r5 <- pam(dd, 5, medoids = c(1,3,20,2,5), trace = 2)) # now "fine"
+
+dev.off()
+
+##------------------------ Testing pam() with new "pamonce" argument:
+
+## This is from "next version of Matrix" test-tools-1.R:
+showSys.time <- function(expr) {
+    ## prepend 'Time' for R CMD Rdiff
+    st <- system.time(expr)
+    writeLines(paste("Time", capture.output(print(st))))
+    invisible(st)
+}
+show2Ratios <- function(...) {
+    stopifnot(length(rgs <- list(...)) == 2,
+              nchar(ns <- names(rgs)) > 0)
+    r <- round(cbind(..1, ..2)[c(1,3),], 3)
+    dimnames(r) <- list(paste("Time ", rownames(r)), ns)
+    r
+}
+
+
+n <- 1000
+## If not enough cases, all CPU times equals 0.
+n <- 500 # for now, and automatic testing
+
+sd <- 0.5
+set.seed(13)
+n2 <- as.integer(round(n * 1.5))
+x <- rbind(cbind(rnorm( n,0,sd), rnorm( n,0,sd)),
+           cbind(rnorm(n2,5,sd), rnorm(n2,5,sd)),
+           cbind(rnorm(n2,7,sd), rnorm(n2,7,sd)),
+           cbind(rnorm(n2,9,sd), rnorm(n2,9,sd)))
+
+
+## original algorithm
+st0 <- showSys.time(pamx      <- pam(x, 4,               trace.lev=2))# 8.157   0.024   8.233
+ ## bswapPamOnce  algorithm
+st1 <- showSys.time(pamxonce  <- pam(x, 4, pamonce=TRUE, trace.lev=2))# 6.122   0.024   6.181
+## bswapPamOnceDistIndice
+st2 <- showSys.time(pamxonce2 <- pam(x, 4, pamonce = 2,  trace.lev=2))# 4.101   0.024   4.151
+show2Ratios('2:orig' = st2/st0, '1:orig' = st1/st0)
+
+## only call element is not equal
+(icall <- which(names(pamx) == "call"))
+pamx[[icall]]
+stopifnot(all.equal(pamx    [-icall],  pamxonce [-icall]),
+	  all.equal(pamxonce[-icall],  pamxonce2[-icall]))
+
+## Same using specified medoids
+(med0 <- 1 + round(n* c(0,1, 2.5, 4)))#                                      lynne (~ 2010, AMD Phenom II X4 925)
+st0 <- showSys.time(pamxst      <- pam(x, 4, medoids = med0,               trace.lev=2))#  13.071   0.024  13.177
+st1 <- showSys.time(pamxoncest  <- pam(x, 4, medoids = med0, pamonce=TRUE, trace.lev=2))#   8.503   0.024   8.578
+st2 <- showSys.time(pamxonce2st <- pam(x, 4, medoids = med0, pamonce=2,    trace.lev=2))#   5.587   0.025   5.647
+show2Ratios('2:orig' = st2/st0, '1:orig' = st1/st0)
+
+## only call element is not equal
+stopifnot(all.equal(pamxst    [-icall], pamxoncest [-icall]),
+          all.equal(pamxoncest[-icall], pamxonce2st[-icall]))
+
+## Different starting values
+med0 <- 1:4 #                                                               lynne (~ 2010, AMD Phenom II X4 925)
+st0 <- showSys.time(pamxst      <- pam(x, 4, medoids = med0,               trace.lev=2))# 13.416   0.023  13.529
+st1 <- showSys.time(pamxoncest  <- pam(x, 4, medoids = med0, pamonce=TRUE, trace.lev=2))#  8.384   0.024   8.459
+st2 <- showSys.time(pamxonce2st <- pam(x, 4, medoids = med0, pamonce=2,    trace.lev=2))#  5.455   0.030   5.520
+show2Ratios('2:orig' = st2/st0, '1:orig' = st1/st0)
+
+## only call element is not equal
+stopifnot(all.equal(pamxst    [-icall], pamxoncest [-icall]),
+          all.equal(pamxoncest[-icall], pamxonce2st[-icall]))
+
+
+## Medoid bug  --- MM: Fixed, well "0L+ hack", in my pam.q, on 2012-01-31
+## ----------
+med0 <- (1:6)
+st0 <- showSys.time(pamxst   <- pam(x, 6, medoids = med0 ,            trace.lev=2))
+stopifnot(identical(med0, 1:6))
+med0 <- (1:6)
+st1 <- showSys.time(pamxst.1 <- pam(x, 6, medoids = med0 , pamonce=1, trace.lev=2))
+stopifnot(identical(med0, 1:6))
+stopifnot(all.equal(pamxst[-icall], pamxst.1 [-icall]))
+
+
+## Last Line:
+cat('Time elapsed: ', proc.time() - .proctime00,'\n')
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/mona.Rout.save
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/mona.Rout.save	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/tests/mona.Rout.save	(revision 2477)
@@ -0,0 +1,118 @@
+
+R version 3.0.0 beta (2013-03-25 r62402) -- "Masked Marvel"
+Copyright (C) 2013 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+Platform: x86_64-unknown-linux-gnu (64-bit)
+
+R is free software and comes with ABSOLUTELY NO WARRANTY.
+You are welcome to redistribute it under certain conditions.
+Type 'license()' or 'licence()' for distribution details.
+
+R is a collaborative project with many contributors.
+Type 'contributors()' for more information and
+'citation()' on how to cite R or R packages in publications.
+
+Type 'demo()' for some demos, 'help()' for on-line help, or
+'help.start()' for an HTML browser interface to help.
+Type 'q()' to quit R.
+
+> library(cluster)
+> 
+> data(animals)
+> (mani <- mona(animals))
+Revised data:
+    war fly ver end gro hai
+ant   0   0   0   0   1   0
+bee   0   1   0   0   1   1
+cat   1   0   1   0   0   1
+cpl   0   0   0   0   0   1
+chi   1   0   1   1   1   1
+cow   1   0   1   0   1   1
+duc   1   1   1   0   1   0
+eag   1   1   1   1   0   0
+ele   1   0   1   1   1   0
+fly   0   1   0   0   0   0
+fro   0   0   1   1   0   0
+her   0   0   1   0   1   0
+lio   1   0   1   1   1   1
+liz   0   0   1   0   0   0
+lob   0   0   0   0   0   0
+man   1   0   1   1   1   1
+rab   1   0   1   0   1   1
+sal   0   0   1   0   0   0
+spi   0   0   0   0   0   1
+wha   1   0   1   1   1   0
+Order of objects:
+ [1] ant cpl spi lob bee fly fro her liz sal cat cow rab chi lio man ele wha duc
+[20] eag
+Variable used:
+ [1] gro  NULL hai  fly  gro  ver  end  gro  NULL war  gro  NULL end  NULL NULL
+[16] hai  NULL fly  end 
+Separation step:
+ [1] 4 0 5 3 4 2 3 4 0 1 4 0 3 0 0 4 0 2 3
+
+Available components:
+[1] "data"      "order"     "variable"  "step"      "call"      "order.lab"
+> 
+> str(mani)
+List of 6
+ $ data     : int [1:20, 1:6] 0 0 1 0 1 1 1 1 1 0 ...
+  ..- attr(*, "dimnames")=List of 2
+  .. ..$ : chr [1:20] "ant" "bee" "cat" "cpl" ...
+  .. ..$ : chr [1:6] "war" "fly" "ver" "end" ...
+ $ order    : int [1:20] 1 4 19 15 2 10 11 12 14 18 ...
+ $ variable : chr [1:19] "gro" "NULL" "hai" "fly" ...
+ $ step     : int [1:19] 4 0 5 3 4 2 3 4 0 1 ...
+ $ call     : language mona(x = animals)
+ $ order.lab: chr [1:20] "ant" "cpl" "spi" "lob" ...
+ - attr(*, "class")= chr "mona"
+> 
+> if(require(MASS)) {
++ 
++     if(R.version$major != "1" || as.numeric(R.version$minor) >= 7)
++         RNGversion("1.6")
++     set.seed(253)
++     n <- 512; p <- 3
++     Sig <- diag(p); Sig[] <- 0.8 ^ abs(col(Sig) - row(Sig))
++     x3 <- mvrnorm(n, rep(0,p), Sig) >= 0
++     x <- cbind(x3, rbinom(n, size=1, prob = 1/2))
++ 
++     print(sapply(as.data.frame(x), table))
++ 
++     mx <- mona(x)
++     str(mx)
++     print(lapply(mx[c(1,3,4)], table))
++ }
+Loading required package: MASS
+   V1  V2  V3  V4
+0 244 245 261 238
+1 268 267 251 274
+List of 5
+ $ data    : int [1:512, 1:4] 0 0 0 0 1 1 1 0 1 0 ...
+ $ order   : int [1:512] 1 137 154 204 353 398 30 52 69 85 ...
+ $ variable: int [1:511] 0 0 0 0 0 3 0 0 0 0 ...
+ $ step    : int [1:511] 0 0 0 0 0 4 0 0 0 0 ...
+ $ call    : language mona(x = x)
+ - attr(*, "class")= chr "mona"
+$data
+
+   0    1 
+ 988 1060 
+
+$variable
+
+  0   1   2   3   4 
+496   4   1   5   5 
+
+$step
+
+  0   1   2   3   4 
+496   1   2   4   8 
+
+Warning message:
+In RNGkind("Marsaglia-Multicarry", "Buggy Kinderman-Ramage") :
+  buggy version of Kinderman-Ramage generator used
+> 
+> proc.time()
+   user  system elapsed 
+  0.350   0.054   0.504 
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/html/R.css
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/html/R.css	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/html/R.css	(revision 2477)
@@ -0,0 +1,97 @@
+body {
+    background: white;
+    color: black;
+}
+
+a:link {
+    background: white;
+    color: blue;
+}
+
+a:visited {
+    background: white;
+    color: rgb(50%, 0%, 50%);
+}
+
+h1 {
+    background: white;
+    color: rgb(55%, 55%, 55%);
+    font-family: monospace;
+    font-size: x-large;
+    text-align: center;
+}
+
+h2 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-size: large;
+    text-align: center;
+}
+
+h3 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-size: large;
+}
+
+h4 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-style: italic;
+    font-size: large;
+}
+
+h5 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+}
+
+h6 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-style: italic;
+}
+		
+img.toplogo {
+    width: 4em;
+    vertical-align: middle;
+}
+
+img.arrow {
+    width: 30px;
+    height: 30px;
+    border: 0;
+}
+
+span.acronym {
+    font-size: small;
+}
+
+span.env {
+    font-family: monospace;
+}
+
+span.file {
+    font-family: monospace;
+}
+
+span.option{
+    font-family: monospace;
+}
+
+span.pkg {
+    font-weight: bold;
+}
+
+span.samp{
+    font-family: monospace;
+}
+
+div.vignettes a:hover {
+    background: rgb(85%, 85%, 85%);
+}

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/html/R.css
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/html/00Index.html
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/html/00Index.html	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/html/00Index.html	(revision 2477)
@@ -0,0 +1,191 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title>R: "Finding Groups in Data": Cluster Analysis Extended Rousseeuw et
+al.</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<link rel="stylesheet" type="text/css" href="R.css" />
+</head><body>
+<h1> "Finding Groups in Data": Cluster Analysis Extended Rousseeuw et
+al.
+<img class="toplogo" src="../../../doc/html/Rlogo.svg" alt="[R logo]" />
+</h1>
+<hr/>
+<div style="text-align: center;">
+<a href="../../../doc/html/packages.html"><img class="arrow" src="../../../doc/html/left.jpg" alt="[Up]" /></a>
+<a href="../../../doc/html/index.html"><img class="arrow" src="../../../doc/html/up.jpg" alt="[Top]" /></a>
+</div><h2>Documentation for package &lsquo;cluster&rsquo; version 2.0.5</h2>
+
+<ul><li><a href="../DESCRIPTION">DESCRIPTION file</a>.</li>
+<li><a href="../NEWS">Package NEWS</a>.</li>
+</ul>
+
+<h2>Help Pages</h2>
+
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="agnes.html">agnes</a></td>
+<td>Agglomerative Nesting (Hierarchical Clustering)</td></tr>
+<tr><td style="width: 25%;"><a href="agnes.object.html">agnes.object</a></td>
+<td>Agglomerative Nesting (AGNES) Object</td></tr>
+<tr><td style="width: 25%;"><a href="agriculture.html">agriculture</a></td>
+<td>European Union Agricultural Workforces</td></tr>
+<tr><td style="width: 25%;"><a href="animals.html">animals</a></td>
+<td>Attributes of Animals</td></tr>
+<tr><td style="width: 25%;"><a href="bannerplot.html">bannerplot</a></td>
+<td>Plot Banner (of Hierarchical Clustering)</td></tr>
+<tr><td style="width: 25%;"><a href="chorSub.html">chorSub</a></td>
+<td>Subset of C-horizon of Kola Data</td></tr>
+<tr><td style="width: 25%;"><a href="clara.html">clara</a></td>
+<td>Clustering Large Applications</td></tr>
+<tr><td style="width: 25%;"><a href="clara.object.html">clara.object</a></td>
+<td>Clustering Large Applications (CLARA) Object</td></tr>
+<tr><td style="width: 25%;"><a href="clusGap.html">clusGap</a></td>
+<td>Gap Statistic for Estimating the Number of Clusters</td></tr>
+<tr><td style="width: 25%;"><a href="clusplot.partition.html">clusplot</a></td>
+<td>Bivariate Cluster Plot (of a Partitioning Object)</td></tr>
+<tr><td style="width: 25%;"><a href="clusplot.default.html">clusplot.default</a></td>
+<td>Bivariate Cluster Plot (clusplot) Default Method</td></tr>
+<tr><td style="width: 25%;"><a href="clusplot.partition.html">clusplot.partition</a></td>
+<td>Bivariate Cluster Plot (of a Partitioning Object)</td></tr>
+<tr><td style="width: 25%;"><a href="coef.hclust.html">coef.hclust</a></td>
+<td>Agglomerative / Divisive Coefficient for 'hclust' Objects</td></tr>
+<tr><td style="width: 25%;"><a href="coef.hclust.html">coef.twins</a></td>
+<td>Agglomerative / Divisive Coefficient for 'hclust' Objects</td></tr>
+<tr><td style="width: 25%;"><a href="coef.hclust.html">coefHier</a></td>
+<td>Agglomerative / Divisive Coefficient for 'hclust' Objects</td></tr>
+<tr><td style="width: 25%;"><a href="daisy.html">daisy</a></td>
+<td>Dissimilarity Matrix Calculation</td></tr>
+<tr><td style="width: 25%;"><a href="diana.html">diana</a></td>
+<td>DIvisive ANAlysis Clustering</td></tr>
+<tr><td style="width: 25%;"><a href="diana.html">diana.object</a></td>
+<td>DIvisive ANAlysis Clustering</td></tr>
+<tr><td style="width: 25%;"><a href="dissimilarity.object.html">dissimilarity.object</a></td>
+<td>Dissimilarity Matrix Object</td></tr>
+<tr><td style="width: 25%;"><a href="ellipsoidhull.html">ellipsoidhull</a></td>
+<td>Compute the Ellipsoid Hull or Spanning Ellipsoid of a Point Set</td></tr>
+<tr><td style="width: 25%;"><a href="predict.ellipsoid.html">ellipsoidPoints</a></td>
+<td>Predict Method for Ellipsoid Objects</td></tr>
+<tr><td style="width: 25%;"><a href="fanny.html">fanny</a></td>
+<td>Fuzzy Analysis Clustering</td></tr>
+<tr><td style="width: 25%;"><a href="fanny.object.html">fanny.object</a></td>
+<td>Fuzzy Analysis (FANNY) Object</td></tr>
+<tr><td style="width: 25%;"><a href="flower.html">flower</a></td>
+<td>Flower Characteristics</td></tr>
+<tr><td style="width: 25%;"><a href="lower.to.upper.tri.inds.html">lower.to.upper.tri.inds</a></td>
+<td>Permute Indices for Triangular Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="clusGap.html">maxSE</a></td>
+<td>Gap Statistic for Estimating the Number of Clusters</td></tr>
+<tr><td style="width: 25%;"><a href="mona.html">mona</a></td>
+<td>MONothetic Analysis Clustering of Binary Variables</td></tr>
+<tr><td style="width: 25%;"><a href="mona.object.html">mona.object</a></td>
+<td>Monothetic Analysis (MONA) Object</td></tr>
+<tr><td style="width: 25%;"><a href="pam.html">pam</a></td>
+<td>Partitioning Around Medoids</td></tr>
+<tr><td style="width: 25%;"><a href="pam.object.html">pam.object</a></td>
+<td>Partitioning Around Medoids (PAM) Object</td></tr>
+<tr><td style="width: 25%;"><a href="partition.object.html">partition</a></td>
+<td>Partitioning Object</td></tr>
+<tr><td style="width: 25%;"><a href="partition.object.html">partition.object</a></td>
+<td>Partitioning Object</td></tr>
+<tr><td style="width: 25%;"><a href="plantTraits.html">plantTraits</a></td>
+<td>Plant Species Traits Data</td></tr>
+<tr><td style="width: 25%;"><a href="plot.agnes.html">plot.agnes</a></td>
+<td>Plots of an Agglomerative Hierarchical Clustering</td></tr>
+<tr><td style="width: 25%;"><a href="clusGap.html">plot.clusGap</a></td>
+<td>Gap Statistic for Estimating the Number of Clusters</td></tr>
+<tr><td style="width: 25%;"><a href="plot.diana.html">plot.diana</a></td>
+<td>Plots of a Divisive Hierarchical Clustering</td></tr>
+<tr><td style="width: 25%;"><a href="plot.mona.html">plot.mona</a></td>
+<td>Banner of Monothetic Divisive Hierarchical Clusterings</td></tr>
+<tr><td style="width: 25%;"><a href="plot.partition.html">plot.partition</a></td>
+<td>Plot of a Partition of the Data Set</td></tr>
+<tr><td style="width: 25%;"><a href="silhouette.html">plot.silhouette</a></td>
+<td>Compute or Extract Silhouette Information from Clustering</td></tr>
+<tr><td style="width: 25%;"><a href="pltree.html">pltree</a></td>
+<td>Plot Clustering Tree of a Hierarchical Clustering</td></tr>
+<tr><td style="width: 25%;"><a href="pltree.html">pltree.twins</a></td>
+<td>Plot Clustering Tree of a Hierarchical Clustering</td></tr>
+<tr><td style="width: 25%;"><a href="pluton.html">pluton</a></td>
+<td>Isotopic Composition Plutonium Batches</td></tr>
+<tr><td style="width: 25%;"><a href="predict.ellipsoid.html">predict.ellipsoid</a></td>
+<td>Predict Method for Ellipsoid Objects</td></tr>
+<tr><td style="width: 25%;"><a href="print.agnes.html">print.agnes</a></td>
+<td>Print Method for AGNES Objects</td></tr>
+<tr><td style="width: 25%;"><a href="print.clara.html">print.clara</a></td>
+<td>Print Method for CLARA Objects</td></tr>
+<tr><td style="width: 25%;"><a href="clusGap.html">print.clusGap</a></td>
+<td>Gap Statistic for Estimating the Number of Clusters</td></tr>
+<tr><td style="width: 25%;"><a href="print.diana.html">print.diana</a></td>
+<td>Print Method for DIANA Objects</td></tr>
+<tr><td style="width: 25%;"><a href="print.dissimilarity.html">print.dissimilarity</a></td>
+<td>Print and Summary Methods for Dissimilarity Objects</td></tr>
+<tr><td style="width: 25%;"><a href="ellipsoidhull.html">print.ellipsoid</a></td>
+<td>Compute the Ellipsoid Hull or Spanning Ellipsoid of a Point Set</td></tr>
+<tr><td style="width: 25%;"><a href="print.fanny.html">print.fanny</a></td>
+<td>Print and Summary Methods for FANNY Objects</td></tr>
+<tr><td style="width: 25%;"><a href="print.mona.html">print.mona</a></td>
+<td>Print Method for MONA Objects</td></tr>
+<tr><td style="width: 25%;"><a href="print.pam.html">print.pam</a></td>
+<td>Print Method for PAM Objects</td></tr>
+<tr><td style="width: 25%;"><a href="summary.agnes.html">print.summary.agnes</a></td>
+<td>Summary Method for 'agnes' Objects</td></tr>
+<tr><td style="width: 25%;"><a href="summary.clara.html">print.summary.clara</a></td>
+<td>Summary Method for 'clara' Objects</td></tr>
+<tr><td style="width: 25%;"><a href="summary.diana.html">print.summary.diana</a></td>
+<td>Summary Method for 'diana' Objects</td></tr>
+<tr><td style="width: 25%;"><a href="print.dissimilarity.html">print.summary.dissimilarity</a></td>
+<td>Print and Summary Methods for Dissimilarity Objects</td></tr>
+<tr><td style="width: 25%;"><a href="print.fanny.html">print.summary.fanny</a></td>
+<td>Print and Summary Methods for FANNY Objects</td></tr>
+<tr><td style="width: 25%;"><a href="summary.mona.html">print.summary.mona</a></td>
+<td>Summary Method for 'mona' Objects</td></tr>
+<tr><td style="width: 25%;"><a href="summary.pam.html">print.summary.pam</a></td>
+<td>Summary Method for PAM Objects</td></tr>
+<tr><td style="width: 25%;"><a href="silhouette.html">print.summary.silhouette</a></td>
+<td>Compute or Extract Silhouette Information from Clustering</td></tr>
+<tr><td style="width: 25%;"><a href="ruspini.html">ruspini</a></td>
+<td>Ruspini Data</td></tr>
+<tr><td style="width: 25%;"><a href="silhouette.html">silhouette</a></td>
+<td>Compute or Extract Silhouette Information from Clustering</td></tr>
+<tr><td style="width: 25%;"><a href="silhouette.html">silhouette.clara</a></td>
+<td>Compute or Extract Silhouette Information from Clustering</td></tr>
+<tr><td style="width: 25%;"><a href="silhouette.html">silhouette.default</a></td>
+<td>Compute or Extract Silhouette Information from Clustering</td></tr>
+<tr><td style="width: 25%;"><a href="silhouette.html">silhouette.partition</a></td>
+<td>Compute or Extract Silhouette Information from Clustering</td></tr>
+<tr><td style="width: 25%;"><a href="sizeDiss.html">sizeDiss</a></td>
+<td>Sample Size of Dissimilarity Like Object</td></tr>
+<tr><td style="width: 25%;"><a href="silhouette.html">sortSilhouette</a></td>
+<td>Compute or Extract Silhouette Information from Clustering</td></tr>
+<tr><td style="width: 25%;"><a href="summary.agnes.html">summary.agnes</a></td>
+<td>Summary Method for 'agnes' Objects</td></tr>
+<tr><td style="width: 25%;"><a href="summary.clara.html">summary.clara</a></td>
+<td>Summary Method for 'clara' Objects</td></tr>
+<tr><td style="width: 25%;"><a href="summary.diana.html">summary.diana</a></td>
+<td>Summary Method for 'diana' Objects</td></tr>
+<tr><td style="width: 25%;"><a href="print.dissimilarity.html">summary.dissimilarity</a></td>
+<td>Print and Summary Methods for Dissimilarity Objects</td></tr>
+<tr><td style="width: 25%;"><a href="print.fanny.html">summary.fanny</a></td>
+<td>Print and Summary Methods for FANNY Objects</td></tr>
+<tr><td style="width: 25%;"><a href="summary.mona.html">summary.mona</a></td>
+<td>Summary Method for 'mona' Objects</td></tr>
+<tr><td style="width: 25%;"><a href="summary.pam.html">summary.pam</a></td>
+<td>Summary Method for PAM Objects</td></tr>
+<tr><td style="width: 25%;"><a href="silhouette.html">summary.silhouette</a></td>
+<td>Compute or Extract Silhouette Information from Clustering</td></tr>
+<tr><td style="width: 25%;"><a href="twins.object.html">twins</a></td>
+<td>Hierarchical Clustering Object</td></tr>
+<tr><td style="width: 25%;"><a href="twins.object.html">twins.object</a></td>
+<td>Hierarchical Clustering Object</td></tr>
+<tr><td style="width: 25%;"><a href="lower.to.upper.tri.inds.html">upper.to.lower.tri.inds</a></td>
+<td>Permute Indices for Triangular Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="volume.ellipsoid.html">volume</a></td>
+<td>Compute the Volume of Planar Object</td></tr>
+<tr><td style="width: 25%;"><a href="volume.ellipsoid.html">volume.ellipsoid</a></td>
+<td>Compute the Volume of Planar Object</td></tr>
+<tr><td style="width: 25%;"><a href="votes.repub.html">votes.repub</a></td>
+<td>Votes for Republican Candidate in Presidential Elections</td></tr>
+<tr><td style="width: 25%;"><a href="xclara.html">xclara</a></td>
+<td>Bivariate Data Set with 3 Clusters</td></tr>
+</table>
+</body></html>

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/html/00Index.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/help/cluster.rdx
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/help/cluster.rdx
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/help/AnIndex
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/help/AnIndex	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/help/AnIndex	(revision 2477)
@@ -0,0 +1,83 @@
+agnes	agnes
+agnes.object	agnes.object
+agriculture	agriculture
+animals	animals
+bannerplot	bannerplot
+chorSub	chorSub
+clara	clara
+clara.object	clara.object
+clusGap	clusGap
+clusplot	clusplot.partition
+clusplot.default	clusplot.default
+clusplot.partition	clusplot.partition
+coef.hclust	coef.hclust
+coef.twins	coef.hclust
+coefHier	coef.hclust
+daisy	daisy
+diana	diana
+diana.object	diana
+dissimilarity.object	dissimilarity.object
+ellipsoidhull	ellipsoidhull
+ellipsoidPoints	predict.ellipsoid
+fanny	fanny
+fanny.object	fanny.object
+flower	flower
+lower.to.upper.tri.inds	lower.to.upper.tri.inds
+maxSE	clusGap
+meanabsdev	cluster-internal
+mona	mona
+mona.object	mona.object
+pam	pam
+pam.object	pam.object
+partition	partition.object
+partition.object	partition.object
+plantTraits	plantTraits
+plot.agnes	plot.agnes
+plot.clusGap	clusGap
+plot.diana	plot.diana
+plot.mona	plot.mona
+plot.partition	plot.partition
+plot.silhouette	silhouette
+pltree	pltree
+pltree.twins	pltree
+pluton	pluton
+predict.ellipsoid	predict.ellipsoid
+print.agnes	print.agnes
+print.clara	print.clara
+print.clusGap	clusGap
+print.diana	print.diana
+print.dissimilarity	print.dissimilarity
+print.ellipsoid	ellipsoidhull
+print.fanny	print.fanny
+print.mona	print.mona
+print.pam	print.pam
+print.summary.agnes	summary.agnes
+print.summary.clara	summary.clara
+print.summary.diana	summary.diana
+print.summary.dissimilarity	print.dissimilarity
+print.summary.fanny	print.fanny
+print.summary.mona	summary.mona
+print.summary.pam	summary.pam
+print.summary.silhouette	silhouette
+ruspini	ruspini
+silhouette	silhouette
+silhouette.clara	silhouette
+silhouette.default	silhouette
+silhouette.partition	silhouette
+sizeDiss	sizeDiss
+sortSilhouette	silhouette
+summary.agnes	summary.agnes
+summary.clara	summary.clara
+summary.diana	summary.diana
+summary.dissimilarity	print.dissimilarity
+summary.fanny	print.fanny
+summary.mona	summary.mona
+summary.pam	summary.pam
+summary.silhouette	silhouette
+twins	twins.object
+twins.object	twins.object
+upper.to.lower.tri.inds	lower.to.upper.tri.inds
+volume	volume.ellipsoid
+volume.ellipsoid	volume.ellipsoid
+votes.repub	votes.repub
+xclara	xclara
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/help/paths.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/help/paths.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/help/cluster.rdb
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/help/cluster.rdb
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/help/aliases.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/cluster/help/aliases.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/markdown/doc/markdown-examples.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/markdown/doc/markdown-examples.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/markdown/doc/markdown-examples.R	(revision 2477)
@@ -0,0 +1,137 @@
+## ----read-code, include=FALSE--------------------------------------------
+library(knitr)
+opts_chunk$set(tidy = FALSE)  # otherwise \n will cause problems
+read_chunk(system.file('examples', 'markdownExtensions.R', package = 'markdown'),
+           labels = 'md-extensions')
+read_chunk(system.file('examples', 'HTMLOptions.R', package = 'markdown'),
+           labels = 'html-options')
+
+## ------------------------------------------------------------------------
+library(markdown)
+
+## ----md-extensions-------------------------------------------------------
+# The following examples are short, so we set the HTML option 'fragment_only'
+
+options(markdown.HTML.options = "fragment_only")
+
+# no_intra_emphasis example
+cat(markdownToHTML(text = "foo_bar_function", extensions = c()))
+cat(markdownToHTML(text = "foo_bar_function", extensions = c("no_intra_emphasis")))
+
+# tables example (need 4 spaces at beginning of line here)
+cat(markdownToHTML(text = "
+    First Header  | Second Header
+    ------------- | -------------
+    Content Cell  | Content Cell
+    Content Cell  | Content Cell
+", extensions = c()))
+
+# but not here
+cat(markdownToHTML(text = "
+First Header  | Second Header
+------------- | -------------
+Content Cell  | Content Cell
+Content Cell  | Content Cell
+", extensions = c("tables")))
+
+# fenced_code example (need at least three leading ~ or `)
+fenced_block <- function(text, x = "`", n = 3) {
+  fence <- paste(rep(x, n), collapse = "")
+  paste(fence, text, fence, sep = "")
+}
+cat(markdownToHTML(text = fenced_block("
+preformatted text here without having to indent
+first line.
+"), extensions = c()))
+
+cat(markdownToHTML(text = fenced_block("
+preformatted text here without having to indent
+first line.
+"), extensions = c("fenced_code")))
+
+# autolink example
+cat(markdownToHTML(text = "http://www.r-project.org/", extensions = c()))
+cat(markdownToHTML(text = "http://www.r-project.org/", extensions = c("autolink")))
+
+# strikethrough example
+cat(markdownToHTML(text = "~~awesome~~", extensions = c()))
+cat(markdownToHTML(text = "~~awesome~~", extensions = c("strikethrough")))
+
+# lax_spacing
+cat(markdownToHTML(text = "
+Embedding html without surrounding with empty newline.
+<div>_markdown_</div>
+extra text.
+", extensions = c("")))
+cat(markdownToHTML(text = "
+Embedding html without surrounding with empty newline.
+<div>_markdown_</div>
+extra text.
+", extensions = c("lax_spacing")))
+
+# space_headers example
+cat(markdownToHTML(text = "#A Header\neven though there is no space between # and A",
+                   extensions = c("")))
+cat(markdownToHTML(text = "#Not A Header\nbecause there is no space between # and N",
+                   extensions = c("space_headers")))
+
+# superscript example
+cat(markdownToHTML(text = "2^10", extensions = c()))
+cat(markdownToHTML(text = "2^10", extensions = c("superscript")))
+
+## ----html-options--------------------------------------------------------
+# HTML OPTIONS
+
+# The following examples are short, so we allways add the HTML option 'fragment_only'
+tOpt <- "fragment_only"
+
+# skip_html example
+mkd = '<style></style><img src="http://cran.rstudio.com/Rlogo.jpg"><a href="#">Hello</a>'
+cat(markdownToHTML(text = mkd, options = c(tOpt)))
+cat(markdownToHTML(text = mkd, options = c(tOpt, "skip_html")))
+
+# skip_style example
+cat(markdownToHTML(text = mkd, options = c(tOpt)))
+cat(markdownToHTML(text = mkd, options = c(tOpt, "skip_style")))
+
+# skip_images example
+cat(markdownToHTML(text = mkd, options = c(tOpt)))
+cat(markdownToHTML(text = mkd, options = c(tOpt, "skip_images")))
+
+# skip_links example
+cat(markdownToHTML(text = mkd, options = c(tOpt)))
+cat(markdownToHTML(text = mkd, options = c(tOpt, "skip_links")))
+
+# safelink example
+cat(markdownToHTML(text = '[foo](http://google.com "baz")', options = c(tOpt)))
+cat(markdownToHTML(text = '[foo](http://google.com "baz")', options = c(tOpt, "safelink")))
+
+# toc example
+mkd <- paste(c("# Header 1", "p1", "## Header 2", "p2"), collapse = "\n")
+
+cat(markdownToHTML(text = mkd, options = c(tOpt)))
+cat(markdownToHTML(text = mkd, options = c(tOpt, "toc")))
+
+# hard_wrap example
+cat(markdownToHTML(text = "foo\nbar\n", options = c(tOpt)))
+cat(markdownToHTML(text = "foo\nbar\n", options = c(tOpt, "hard_wrap")))
+
+# use_xhtml example
+cat(markdownToHTML(text = "foo\nbar\n", options = c(tOpt, "hard_wrap")))
+cat(markdownToHTML(text = "foo\nbar\n", options = c(tOpt, "hard_wrap", "use_xhtml")))
+
+# escape example
+mkd = '<style></style><img src="http://cran.rstudio.com/Rlogo.jpg"><a href="#">Hello</a>'
+cat(markdownToHTML(text = mkd, options = c(tOpt, "skip_html")))
+# overrides all 'skip_*' options
+cat(markdownToHTML(text = mkd, options = c(tOpt, "skip_html", "escape")))
+
+# smartypants example
+cat(markdownToHTML(text = "1/2 (c)", options = c(tOpt)))
+cat(markdownToHTML(text = "1/2 (c)", options = c(tOpt, "smartypants")))
+
+cat(smartypants(text = "1/2 (c)\n"))
+
+## ----include=FALSE-------------------------------------------------------
+options(markdown.HTML.options=markdownHTMLOptions(defaults=TRUE))
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/markdown/doc/markdown-examples.Rmd
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/markdown/doc/markdown-examples.Rmd	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/markdown/doc/markdown-examples.Rmd	(revision 2477)
@@ -0,0 +1,34 @@
+<!--
+%\VignetteEngine{knitr::knitr}
+%\VignetteIndexEntry{Some Markdown Examples}
+-->
+
+This vignette shows some examples for different Markdown extensions and HTML options.
+
+```{r read-code, include=FALSE}
+library(knitr)
+opts_chunk$set(tidy = FALSE)  # otherwise \n will cause problems
+read_chunk(system.file('examples', 'markdownExtensions.R', package = 'markdown'),
+           labels = 'md-extensions')
+read_chunk(system.file('examples', 'HTMLOptions.R', package = 'markdown'),
+           labels = 'html-options')
+```
+
+```{r}
+library(markdown)
+```
+
+# Markdown Extensions
+
+```{r md-extensions}
+```
+
+# HTML Options
+
+```{r html-options}
+```
+
+
+```{r include=FALSE}
+options(markdown.HTML.options=markdownHTMLOptions(defaults=TRUE))
+```
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/markdown/doc/markdown-output.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/markdown/doc/markdown-output.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/markdown/doc/markdown-output.R	(revision 2477)
@@ -0,0 +1,142 @@
+## ----read-code, include=FALSE--------------------------------------------
+library(knitr)
+opts_chunk$set(tidy = FALSE)  # otherwise \n will cause problems
+read_chunk(system.file('examples', 'markdownExtensions.R', package = 'markdown'),
+           labels = 'md-extensions')
+read_chunk(system.file('examples', 'HTMLOptions.R', package = 'markdown'),
+           labels = 'html-options')
+
+## ------------------------------------------------------------------------
+library(markdown)
+
+## ----md-extensions-------------------------------------------------------
+# The following examples are short, so we set the HTML option 'fragment_only'
+
+options(markdown.HTML.options = "fragment_only")
+
+# no_intra_emphasis example
+cat(markdownToHTML(text = "foo_bar_function", extensions = c()))
+cat(markdownToHTML(text = "foo_bar_function", extensions = c("no_intra_emphasis")))
+
+# tables example (need 4 spaces at beginning of line here)
+cat(markdownToHTML(text = "
+    First Header  | Second Header
+    ------------- | -------------
+    Content Cell  | Content Cell
+    Content Cell  | Content Cell
+", extensions = c()))
+
+# but not here
+cat(markdownToHTML(text = "
+First Header  | Second Header
+------------- | -------------
+Content Cell  | Content Cell
+Content Cell  | Content Cell
+", extensions = c("tables")))
+
+# fenced_code example (need at least three leading ~ or `)
+fenced_block <- function(text, x = "`", n = 3) {
+  fence <- paste(rep(x, n), collapse = "")
+  paste(fence, text, fence, sep = "")
+}
+cat(markdownToHTML(text = fenced_block("
+preformatted text here without having to indent
+first line.
+"), extensions = c()))
+
+cat(markdownToHTML(text = fenced_block("
+preformatted text here without having to indent
+first line.
+"), extensions = c("fenced_code")))
+
+# autolink example
+cat(markdownToHTML(text = "http://www.r-project.org/", extensions = c()))
+cat(markdownToHTML(text = "http://www.r-project.org/", extensions = c("autolink")))
+
+# strikethrough example
+cat(markdownToHTML(text = "~~awesome~~", extensions = c()))
+cat(markdownToHTML(text = "~~awesome~~", extensions = c("strikethrough")))
+
+# lax_spacing
+cat(markdownToHTML(text = "
+Embedding html without surrounding with empty newline.
+<div>_markdown_</div>
+extra text.
+", extensions = c("")))
+cat(markdownToHTML(text = "
+Embedding html without surrounding with empty newline.
+<div>_markdown_</div>
+extra text.
+", extensions = c("lax_spacing")))
+
+# space_headers example
+cat(markdownToHTML(text = "#A Header\neven though there is no space between # and A",
+                   extensions = c("")))
+cat(markdownToHTML(text = "#Not A Header\nbecause there is no space between # and N",
+                   extensions = c("space_headers")))
+
+# superscript example
+cat(markdownToHTML(text = "2^10", extensions = c()))
+cat(markdownToHTML(text = "2^10", extensions = c("superscript")))
+
+## ----html-options--------------------------------------------------------
+# HTML OPTIONS
+
+# The following examples are short, so we allways add the HTML option 'fragment_only'
+tOpt <- "fragment_only"
+
+# skip_html example
+mkd = '<style></style><img src="http://cran.rstudio.com/Rlogo.jpg"><a href="#">Hello</a>'
+cat(markdownToHTML(text = mkd, options = c(tOpt)))
+cat(markdownToHTML(text = mkd, options = c(tOpt, "skip_html")))
+
+# skip_style example
+cat(markdownToHTML(text = mkd, options = c(tOpt)))
+cat(markdownToHTML(text = mkd, options = c(tOpt, "skip_style")))
+
+# skip_images example
+cat(markdownToHTML(text = mkd, options = c(tOpt)))
+cat(markdownToHTML(text = mkd, options = c(tOpt, "skip_images")))
+
+# skip_links example
+cat(markdownToHTML(text = mkd, options = c(tOpt)))
+cat(markdownToHTML(text = mkd, options = c(tOpt, "skip_links")))
+
+# safelink example
+cat(markdownToHTML(text = '[foo](http://google.com "baz")', options = c(tOpt)))
+cat(markdownToHTML(text = '[foo](http://google.com "baz")', options = c(tOpt, "safelink")))
+
+# toc example
+mkd <- paste(c("# Header 1", "p1", "## Header 2", "p2"), collapse = "\n")
+
+cat(markdownToHTML(text = mkd, options = c(tOpt)))
+cat(markdownToHTML(text = mkd, options = c(tOpt, "toc")))
+
+# hard_wrap example
+cat(markdownToHTML(text = "foo\nbar\n", options = c(tOpt)))
+cat(markdownToHTML(text = "foo\nbar\n", options = c(tOpt, "hard_wrap")))
+
+# use_xhtml example
+cat(markdownToHTML(text = "foo\nbar\n", options = c(tOpt, "hard_wrap")))
+cat(markdownToHTML(text = "foo\nbar\n", options = c(tOpt, "hard_wrap", "use_xhtml")))
+
+# escape example
+mkd = '<style></style><img src="http://cran.rstudio.com/Rlogo.jpg"><a href="#">Hello</a>'
+cat(markdownToHTML(text = mkd, options = c(tOpt, "skip_html")))
+# overrides all 'skip_*' options
+cat(markdownToHTML(text = mkd, options = c(tOpt, "skip_html", "escape")))
+
+# smartypants example
+cat(markdownToHTML(text = "1/2 (c)", options = c(tOpt)))
+cat(markdownToHTML(text = "1/2 (c)", options = c(tOpt, "smartypants")))
+
+cat(smartypants(text = "1/2 (c)\n"))
+
+## ----include=FALSE-------------------------------------------------------
+options(markdown.HTML.options=markdownHTMLOptions(defaults=TRUE))
+
+## ----read, include=FALSE-------------------------------------------------
+library(knitr)
+opts_chunk$set(results = 'asis')
+out = knit_child(text = scan('markdown-examples.Rmd', what = 'character', skip = 7, sep = '\n'))
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/markdown/doc/markdown-examples.html
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/markdown/doc/markdown-examples.html	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/markdown/doc/markdown-examples.html	(revision 2477)
@@ -0,0 +1,568 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+
+<title>Markdown Extensions</title>
+
+<script type="text/javascript">
+window.onload = function() {
+  var imgs = document.getElementsByTagName('img'), i, img;
+  for (i = 0; i < imgs.length; i++) {
+    img = imgs[i];
+    // center an image if it is the only element of its parent
+    if (img.parentElement.childElementCount === 1)
+      img.parentElement.style.textAlign = 'center';
+  }
+};
+</script>
+
+<!-- Styles for R syntax highlighter -->
+<style type="text/css">
+   pre .operator,
+   pre .paren {
+     color: rgb(104, 118, 135)
+   }
+
+   pre .literal {
+     color: #990073
+   }
+
+   pre .number {
+     color: #099;
+   }
+
+   pre .comment {
+     color: #998;
+     font-style: italic
+   }
+
+   pre .keyword {
+     color: #900;
+     font-weight: bold
+   }
+
+   pre .identifier {
+     color: rgb(0, 0, 0);
+   }
+
+   pre .string {
+     color: #d14;
+   }
+</style>
+
+<!-- R syntax highlighter -->
+<script type="text/javascript">
+var hljs=new function(){function m(p){return p.replace(/&/gm,"&amp;").replace(/</gm,"&lt;")}function f(r,q,p){return RegExp(q,"m"+(r.cI?"i":"")+(p?"g":""))}function b(r){for(var p=0;p<r.childNodes.length;p++){var q=r.childNodes[p];if(q.nodeName=="CODE"){return q}if(!(q.nodeType==3&&q.nodeValue.match(/\s+/))){break}}}function h(t,s){var p="";for(var r=0;r<t.childNodes.length;r++){if(t.childNodes[r].nodeType==3){var q=t.childNodes[r].nodeValue;if(s){q=q.replace(/\n/g,"")}p+=q}else{if(t.childNodes[r].nodeName=="BR"){p+="\n"}else{p+=h(t.childNodes[r])}}}if(/MSIE [678]/.test(navigator.userAgent)){p=p.replace(/\r/g,"\n")}return p}function a(s){var r=s.className.split(/\s+/);r=r.concat(s.parentNode.className.split(/\s+/));for(var q=0;q<r.length;q++){var p=r[q].replace(/^language-/,"");if(e[p]){return p}}}function c(q){var p=[];(function(s,t){for(var r=0;r<s.childNodes.length;r++){if(s.childNodes[r].nodeType==3){t+=s.childNodes[r].nodeValue.length}else{if(s.childNodes[r].nodeName=="BR"){t+=1}else{if(s.childNodes[r].nodeType==1){p.push({event:"start",offset:t,node:s.childNodes[r]});t=arguments.callee(s.childNodes[r],t);p.push({event:"stop",offset:t,node:s.childNodes[r]})}}}}return t})(q,0);return p}function k(y,w,x){var q=0;var z="";var s=[];function u(){if(y.length&&w.length){if(y[0].offset!=w[0].offset){return(y[0].offset<w[0].offset)?y:w}else{return w[0].event=="start"?y:w}}else{return y.length?y:w}}function t(D){var A="<"+D.nodeName.toLowerCase();for(var B=0;B<D.attributes.length;B++){var C=D.attributes[B];A+=" "+C.nodeName.toLowerCase();if(C.value!==undefined&&C.value!==false&&C.value!==null){A+='="'+m(C.value)+'"'}}return A+">"}while(y.length||w.length){var v=u().splice(0,1)[0];z+=m(x.substr(q,v.offset-q));q=v.offset;if(v.event=="start"){z+=t(v.node);s.push(v.node)}else{if(v.event=="stop"){var p,r=s.length;do{r--;p=s[r];z+=("</"+p.nodeName.toLowerCase()+">")}while(p!=v.node);s.splice(r,1);while(r<s.length){z+=t(s[r]);r++}}}}return z+m(x.substr(q))}function j(){function q(x,y,v){if(x.compiled){return}var u;var s=[];if(x.k){x.lR=f(y,x.l||hljs.IR,true);for(var w in x.k){if(!x.k.hasOwnProperty(w)){continue}if(x.k[w] instanceof Object){u=x.k[w]}else{u=x.k;w="keyword"}for(var r in u){if(!u.hasOwnProperty(r)){continue}x.k[r]=[w,u[r]];s.push(r)}}}if(!v){if(x.bWK){x.b="\\b("+s.join("|")+")\\s"}x.bR=f(y,x.b?x.b:"\\B|\\b");if(!x.e&&!x.eW){x.e="\\B|\\b"}if(x.e){x.eR=f(y,x.e)}}if(x.i){x.iR=f(y,x.i)}if(x.r===undefined){x.r=1}if(!x.c){x.c=[]}x.compiled=true;for(var t=0;t<x.c.length;t++){if(x.c[t]=="self"){x.c[t]=x}q(x.c[t],y,false)}if(x.starts){q(x.starts,y,false)}}for(var p in e){if(!e.hasOwnProperty(p)){continue}q(e[p].dM,e[p],true)}}function d(B,C){if(!j.called){j();j.called=true}function q(r,M){for(var L=0;L<M.c.length;L++){if((M.c[L].bR.exec(r)||[null])[0]==r){return M.c[L]}}}function v(L,r){if(D[L].e&&D[L].eR.test(r)){return 1}if(D[L].eW){var M=v(L-1,r);return M?M+1:0}return 0}function w(r,L){return L.i&&L.iR.test(r)}function K(N,O){var M=[];for(var L=0;L<N.c.length;L++){M.push(N.c[L].b)}var r=D.length-1;do{if(D[r].e){M.push(D[r].e)}r--}while(D[r+1].eW);if(N.i){M.push(N.i)}return f(O,M.join("|"),true)}function p(M,L){var N=D[D.length-1];if(!N.t){N.t=K(N,E)}N.t.lastIndex=L;var r=N.t.exec(M);return r?[M.substr(L,r.index-L),r[0],false]:[M.substr(L),"",true]}function z(N,r){var L=E.cI?r[0].toLowerCase():r[0];var M=N.k[L];if(M&&M instanceof Array){return M}return false}function F(L,P){L=m(L);if(!P.k){return L}var r="";var O=0;P.lR.lastIndex=0;var M=P.lR.exec(L);while(M){r+=L.substr(O,M.index-O);var N=z(P,M);if(N){x+=N[1];r+='<span class="'+N[0]+'">'+M[0]+"</span>"}else{r+=M[0]}O=P.lR.lastIndex;M=P.lR.exec(L)}return r+L.substr(O,L.length-O)}function J(L,M){if(M.sL&&e[M.sL]){var r=d(M.sL,L);x+=r.keyword_count;return r.value}else{return F(L,M)}}function I(M,r){var L=M.cN?'<span class="'+M.cN+'">':"";if(M.rB){y+=L;M.buffer=""}else{if(M.eB){y+=m(r)+L;M.buffer=""}else{y+=L;M.buffer=r}}D.push(M);A+=M.r}function G(N,M,Q){var R=D[D.length-1];if(Q){y+=J(R.buffer+N,R);return false}var P=q(M,R);if(P){y+=J(R.buffer+N,R);I(P,M);return P.rB}var L=v(D.length-1,M);if(L){var O=R.cN?"</span>":"";if(R.rE){y+=J(R.buffer+N,R)+O}else{if(R.eE){y+=J(R.buffer+N,R)+O+m(M)}else{y+=J(R.buffer+N+M,R)+O}}while(L>1){O=D[D.length-2].cN?"</span>":"";y+=O;L--;D.length--}var r=D[D.length-1];D.length--;D[D.length-1].buffer="";if(r.starts){I(r.starts,"")}return R.rE}if(w(M,R)){throw"Illegal"}}var E=e[B];var D=[E.dM];var A=0;var x=0;var y="";try{var s,u=0;E.dM.buffer="";do{s=p(C,u);var t=G(s[0],s[1],s[2]);u+=s[0].length;if(!t){u+=s[1].length}}while(!s[2]);if(D.length>1){throw"Illegal"}return{r:A,keyword_count:x,value:y}}catch(H){if(H=="Illegal"){return{r:0,keyword_count:0,value:m(C)}}else{throw H}}}function g(t){var p={keyword_count:0,r:0,value:m(t)};var r=p;for(var q in e){if(!e.hasOwnProperty(q)){continue}var s=d(q,t);s.language=q;if(s.keyword_count+s.r>r.keyword_count+r.r){r=s}if(s.keyword_count+s.r>p.keyword_count+p.r){r=p;p=s}}if(r.language){p.second_best=r}return p}function i(r,q,p){if(q){r=r.replace(/^((<[^>]+>|\t)+)/gm,function(t,w,v,u){return w.replace(/\t/g,q)})}if(p){r=r.replace(/\n/g,"<br>")}return r}function n(t,w,r){var x=h(t,r);var v=a(t);var y,s;if(v){y=d(v,x)}else{return}var q=c(t);if(q.length){s=document.createElement("pre");s.innerHTML=y.value;y.value=k(q,c(s),x)}y.value=i(y.value,w,r);var u=t.className;if(!u.match("(\\s|^)(language-)?"+v+"(\\s|$)")){u=u?(u+" "+v):v}if(/MSIE [678]/.test(navigator.userAgent)&&t.tagName=="CODE"&&t.parentNode.tagName=="PRE"){s=t.parentNode;var p=document.createElement("div");p.innerHTML="<pre><code>"+y.value+"</code></pre>";t=p.firstChild.firstChild;p.firstChild.cN=s.cN;s.parentNode.replaceChild(p.firstChild,s)}else{t.innerHTML=y.value}t.className=u;t.result={language:v,kw:y.keyword_count,re:y.r};if(y.second_best){t.second_best={language:y.second_best.language,kw:y.second_best.keyword_count,re:y.second_best.r}}}function o(){if(o.called){return}o.called=true;var r=document.getElementsByTagName("pre");for(var p=0;p<r.length;p++){var q=b(r[p]);if(q){n(q,hljs.tabReplace)}}}function l(){if(window.addEventListener){window.addEventListener("DOMContentLoaded",o,false);window.addEventListener("load",o,false)}else{if(window.attachEvent){window.attachEvent("onload",o)}else{window.onload=o}}}var e={};this.LANGUAGES=e;this.highlight=d;this.highlightAuto=g;this.fixMarkup=i;this.highlightBlock=n;this.initHighlighting=o;this.initHighlightingOnLoad=l;this.IR="[a-zA-Z][a-zA-Z0-9_]*";this.UIR="[a-zA-Z_][a-zA-Z0-9_]*";this.NR="\\b\\d+(\\.\\d+)?";this.CNR="\\b(0[xX][a-fA-F0-9]+|(\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)";this.BNR="\\b(0b[01]+)";this.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|\\.|-|-=|/|/=|:|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~";this.ER="(?![\\s\\S])";this.BE={b:"\\\\.",r:0};this.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[this.BE],r:0};this.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[this.BE],r:0};this.CLCM={cN:"comment",b:"//",e:"$"};this.CBLCLM={cN:"comment",b:"/\\*",e:"\\*/"};this.HCM={cN:"comment",b:"#",e:"$"};this.NM={cN:"number",b:this.NR,r:0};this.CNM={cN:"number",b:this.CNR,r:0};this.BNM={cN:"number",b:this.BNR,r:0};this.inherit=function(r,s){var p={};for(var q in r){p[q]=r[q]}if(s){for(var q in s){p[q]=s[q]}}return p}}();hljs.LANGUAGES.cpp=function(){var a={keyword:{"false":1,"int":1,"float":1,"while":1,"private":1,"char":1,"catch":1,"export":1,virtual:1,operator:2,sizeof:2,dynamic_cast:2,typedef:2,const_cast:2,"const":1,struct:1,"for":1,static_cast:2,union:1,namespace:1,unsigned:1,"long":1,"throw":1,"volatile":2,"static":1,"protected":1,bool:1,template:1,mutable:1,"if":1,"public":1,friend:2,"do":1,"return":1,"goto":1,auto:1,"void":2,"enum":1,"else":1,"break":1,"new":1,extern:1,using:1,"true":1,"class":1,asm:1,"case":1,typeid:1,"short":1,reinterpret_cast:2,"default":1,"double":1,register:1,explicit:1,signed:1,typename:1,"try":1,"this":1,"switch":1,"continue":1,wchar_t:1,inline:1,"delete":1,alignof:1,char16_t:1,char32_t:1,constexpr:1,decltype:1,noexcept:1,nullptr:1,static_assert:1,thread_local:1,restrict:1,_Bool:1,complex:1},built_in:{std:1,string:1,cin:1,cout:1,cerr:1,clog:1,stringstream:1,istringstream:1,ostringstream:1,auto_ptr:1,deque:1,list:1,queue:1,stack:1,vector:1,map:1,set:1,bitset:1,multiset:1,multimap:1,unordered_set:1,unordered_map:1,unordered_multiset:1,unordered_multimap:1,array:1,shared_ptr:1}};return{dM:{k:a,i:"</",c:[hljs.CLCM,hljs.CBLCLM,hljs.QSM,{cN:"string",b:"'\\\\?.",e:"'",i:"."},{cN:"number",b:"\\b(\\d+(\\.\\d*)?|\\.\\d+)(u|U|l|L|ul|UL|f|F)"},hljs.CNM,{cN:"preprocessor",b:"#",e:"$"},{cN:"stl_container",b:"\\b(deque|list|queue|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<",e:">",k:a,r:10,c:["self"]}]}}}();hljs.LANGUAGES.r={dM:{c:[hljs.HCM,{cN:"number",b:"\\b0[xX][0-9a-fA-F]+[Li]?\\b",e:hljs.IMMEDIATE_RE,r:0},{cN:"number",b:"\\b\\d+(?:[eE][+\\-]?\\d*)?L\\b",e:hljs.IMMEDIATE_RE,r:0},{cN:"number",b:"\\b\\d+\\.(?!\\d)(?:i\\b)?",e:hljs.IMMEDIATE_RE,r:1},{cN:"number",b:"\\b\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b",e:hljs.IMMEDIATE_RE,r:0},{cN:"number",b:"\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b",e:hljs.IMMEDIATE_RE,r:1},{cN:"keyword",b:"(?:tryCatch|library|setGeneric|setGroupGeneric)\\b",e:hljs.IMMEDIATE_RE,r:10},{cN:"keyword",b:"\\.\\.\\.",e:hljs.IMMEDIATE_RE,r:10},{cN:"keyword",b:"\\.\\.\\d+(?![\\w.])",e:hljs.IMMEDIATE_RE,r:10},{cN:"keyword",b:"\\b(?:function)",e:hljs.IMMEDIATE_RE,r:2},{cN:"keyword",b:"(?:if|in|break|next|repeat|else|for|return|switch|while|try|stop|warning|require|attach|detach|source|setMethod|setClass)\\b",e:hljs.IMMEDIATE_RE,r:1},{cN:"literal",b:"(?:NA|NA_integer_|NA_real_|NA_character_|NA_complex_)\\b",e:hljs.IMMEDIATE_RE,r:10},{cN:"literal",b:"(?:NULL|TRUE|FALSE|T|F|Inf|NaN)\\b",e:hljs.IMMEDIATE_RE,r:1},{cN:"identifier",b:"[a-zA-Z.][a-zA-Z0-9._]*\\b",e:hljs.IMMEDIATE_RE,r:0},{cN:"operator",b:"<\\-(?!\\s*\\d)",e:hljs.IMMEDIATE_RE,r:2},{cN:"operator",b:"\\->|<\\-",e:hljs.IMMEDIATE_RE,r:1},{cN:"operator",b:"%%|~",e:hljs.IMMEDIATE_RE},{cN:"operator",b:">=|<=|==|!=|\\|\\||&&|=|\\+|\\-|\\*|/|\\^|>|<|!|&|\\||\\$|:",e:hljs.IMMEDIATE_RE,r:0},{cN:"operator",b:"%",e:"%",i:"\\n",r:1},{cN:"identifier",b:"`",e:"`",r:0},{cN:"string",b:'"',e:'"',c:[hljs.BE],r:0},{cN:"string",b:"'",e:"'",c:[hljs.BE],r:0},{cN:"paren",b:"[[({\\])}]",e:hljs.IMMEDIATE_RE,r:0}]}};
+hljs.initHighlightingOnLoad();
+</script>
+
+
+
+<style type="text/css">
+body, td {
+   font-family: sans-serif;
+   background-color: white;
+   font-size: 13px;
+}
+
+body {
+  max-width: 800px;
+  margin: auto;
+  padding: 1em;
+  line-height: 20px;
+}
+
+tt, code, pre {
+   font-family: 'DejaVu Sans Mono', 'Droid Sans Mono', 'Lucida Console', Consolas, Monaco, monospace;
+}
+
+h1 {
+   font-size:2.2em;
+}
+
+h2 {
+   font-size:1.8em;
+}
+
+h3 {
+   font-size:1.4em;
+}
+
+h4 {
+   font-size:1.0em;
+}
+
+h5 {
+   font-size:0.9em;
+}
+
+h6 {
+   font-size:0.8em;
+}
+
+a:visited {
+   color: rgb(50%, 0%, 50%);
+}
+
+pre, img {
+  max-width: 100%;
+}
+pre {
+  overflow-x: auto;
+}
+pre code {
+   display: block; padding: 0.5em;
+}
+
+code {
+  font-size: 92%;
+  border: 1px solid #ccc;
+}
+
+code[class] {
+  background-color: #F8F8F8;
+}
+
+table, td, th {
+  border: none;
+}
+
+blockquote {
+   color:#666666;
+   margin:0;
+   padding-left: 1em;
+   border-left: 0.5em #EEE solid;
+}
+
+hr {
+   height: 0px;
+   border-bottom: none;
+   border-top-width: thin;
+   border-top-style: dotted;
+   border-top-color: #999999;
+}
+
+@media print {
+   * {
+      background: transparent !important;
+      color: black !important;
+      filter:none !important;
+      -ms-filter: none !important;
+   }
+
+   body {
+      font-size:12pt;
+      max-width:100%;
+   }
+
+   a, a:visited {
+      text-decoration: underline;
+   }
+
+   hr {
+      visibility: hidden;
+      page-break-before: always;
+   }
+
+   pre, blockquote {
+      padding-right: 1em;
+      page-break-inside: avoid;
+   }
+
+   tr, img {
+      page-break-inside: avoid;
+   }
+
+   img {
+      max-width: 100% !important;
+   }
+
+   @page :left {
+      margin: 15mm 20mm 15mm 10mm;
+   }
+
+   @page :right {
+      margin: 15mm 10mm 15mm 20mm;
+   }
+
+   p, h2, h3 {
+      orphans: 3; widows: 3;
+   }
+
+   h2, h3 {
+      page-break-after: avoid;
+   }
+}
+</style>
+
+
+
+</head>
+
+<body>
+<!--
+%\VignetteEngine{knitr::knitr}
+%\VignetteIndexEntry{Some Markdown Examples}
+-->
+
+<p>This vignette shows some examples for different Markdown extensions and HTML options.</p>
+
+<pre><code class="r">library(markdown)
+</code></pre>
+
+<h1>Markdown Extensions</h1>
+
+<pre><code class="r"># The following examples are short, so we set the HTML option &#39;fragment_only&#39;
+
+options(markdown.HTML.options = &quot;fragment_only&quot;)
+
+# no_intra_emphasis example
+cat(markdownToHTML(text = &quot;foo_bar_function&quot;, extensions = c()))
+</code></pre>
+
+<pre><code>## &lt;p&gt;foo&lt;em&gt;bar&lt;/em&gt;function&lt;/p&gt;
+</code></pre>
+
+<pre><code class="r">cat(markdownToHTML(text = &quot;foo_bar_function&quot;, extensions = c(&quot;no_intra_emphasis&quot;)))
+</code></pre>
+
+<pre><code>## &lt;p&gt;foo_bar_function&lt;/p&gt;
+</code></pre>
+
+<pre><code class="r"># tables example (need 4 spaces at beginning of line here)
+cat(markdownToHTML(text = &quot;
+    First Header  | Second Header
+    ------------- | -------------
+    Content Cell  | Content Cell
+    Content Cell  | Content Cell
+&quot;, extensions = c()))
+</code></pre>
+
+<pre><code>## &lt;pre&gt;&lt;code&gt;First Header  | Second Header
+## ------------- | -------------
+## Content Cell  | Content Cell
+## Content Cell  | Content Cell
+## &lt;/code&gt;&lt;/pre&gt;
+</code></pre>
+
+<pre><code class="r"># but not here
+cat(markdownToHTML(text = &quot;
+First Header  | Second Header
+------------- | -------------
+Content Cell  | Content Cell
+Content Cell  | Content Cell
+&quot;, extensions = c(&quot;tables&quot;)))
+</code></pre>
+
+<pre><code>## &lt;table&gt;&lt;thead&gt;
+## &lt;tr&gt;
+## &lt;th&gt;First Header&lt;/th&gt;
+## &lt;th&gt;Second Header&lt;/th&gt;
+## &lt;/tr&gt;
+## &lt;/thead&gt;&lt;tbody&gt;
+## &lt;tr&gt;
+## &lt;td&gt;Content Cell&lt;/td&gt;
+## &lt;td&gt;Content Cell&lt;/td&gt;
+## &lt;/tr&gt;
+## &lt;tr&gt;
+## &lt;td&gt;Content Cell&lt;/td&gt;
+## &lt;td&gt;Content Cell&lt;/td&gt;
+## &lt;/tr&gt;
+## &lt;/tbody&gt;&lt;/table&gt;
+</code></pre>
+
+<pre><code class="r"># fenced_code example (need at least three leading ~ or `)
+fenced_block &lt;- function(text, x = &quot;`&quot;, n = 3) {
+  fence &lt;- paste(rep(x, n), collapse = &quot;&quot;)
+  paste(fence, text, fence, sep = &quot;&quot;)
+}
+cat(markdownToHTML(text = fenced_block(&quot;
+preformatted text here without having to indent
+first line.
+&quot;), extensions = c()))
+</code></pre>
+
+<pre><code>## &lt;p&gt;&lt;code&gt;
+## preformatted text here without having to indent
+## first line.
+## &lt;/code&gt;&lt;/p&gt;
+</code></pre>
+
+<pre><code class="r">cat(markdownToHTML(text = fenced_block(&quot;
+preformatted text here without having to indent
+first line.
+&quot;), extensions = c(&quot;fenced_code&quot;)))
+</code></pre>
+
+<pre><code>## &lt;pre&gt;&lt;code&gt;preformatted text here without having to indent
+## first line.
+## &lt;/code&gt;&lt;/pre&gt;
+</code></pre>
+
+<pre><code class="r"># autolink example
+cat(markdownToHTML(text = &quot;http://www.r-project.org/&quot;, extensions = c()))
+</code></pre>
+
+<pre><code>## &lt;p&gt;http://www.r-project.org/&lt;/p&gt;
+</code></pre>
+
+<pre><code class="r">cat(markdownToHTML(text = &quot;http://www.r-project.org/&quot;, extensions = c(&quot;autolink&quot;)))
+</code></pre>
+
+<pre><code>## &lt;p&gt;&lt;a href=&quot;http://www.r-project.org/&quot;&gt;http://www.r-project.org/&lt;/a&gt;&lt;/p&gt;
+</code></pre>
+
+<pre><code class="r"># strikethrough example
+cat(markdownToHTML(text = &quot;~~awesome~~&quot;, extensions = c()))
+</code></pre>
+
+<pre><code>## &lt;p&gt;~~awesome~~&lt;/p&gt;
+</code></pre>
+
+<pre><code class="r">cat(markdownToHTML(text = &quot;~~awesome~~&quot;, extensions = c(&quot;strikethrough&quot;)))
+</code></pre>
+
+<pre><code>## &lt;p&gt;&lt;del&gt;awesome&lt;/del&gt;&lt;/p&gt;
+</code></pre>
+
+<pre><code class="r"># lax_spacing
+cat(markdownToHTML(text = &quot;
+Embedding html without surrounding with empty newline.
+&lt;div&gt;_markdown_&lt;/div&gt;
+extra text.
+&quot;, extensions = c(&quot;&quot;)))
+</code></pre>
+
+<pre><code>## &lt;p&gt;Embedding html without surrounding with empty newline.
+## &lt;div&gt;&lt;em&gt;markdown&lt;/em&gt;&lt;/div&gt;
+## extra text.&lt;/p&gt;
+</code></pre>
+
+<pre><code class="r">cat(markdownToHTML(text = &quot;
+Embedding html without surrounding with empty newline.
+&lt;div&gt;_markdown_&lt;/div&gt;
+extra text.
+&quot;, extensions = c(&quot;lax_spacing&quot;)))
+</code></pre>
+
+<pre><code>## &lt;p&gt;Embedding html without surrounding with empty newline.&lt;/p&gt;
+## 
+## &lt;div&gt;_markdown_&lt;/div&gt;
+## 
+## &lt;p&gt;extra text.&lt;/p&gt;
+</code></pre>
+
+<pre><code class="r"># space_headers example
+cat(markdownToHTML(text = &quot;#A Header\neven though there is no space between # and A&quot;,
+                   extensions = c(&quot;&quot;)))
+</code></pre>
+
+<pre><code>## &lt;h1&gt;A Header&lt;/h1&gt;
+## 
+## &lt;p&gt;even though there is no space between # and A&lt;/p&gt;
+</code></pre>
+
+<pre><code class="r">cat(markdownToHTML(text = &quot;#Not A Header\nbecause there is no space between # and N&quot;,
+                   extensions = c(&quot;space_headers&quot;)))
+</code></pre>
+
+<pre><code>## &lt;p&gt;#Not A Header
+## because there is no space between # and N&lt;/p&gt;
+</code></pre>
+
+<pre><code class="r"># superscript example
+cat(markdownToHTML(text = &quot;2^10&quot;, extensions = c()))
+</code></pre>
+
+<pre><code>## &lt;p&gt;2^10&lt;/p&gt;
+</code></pre>
+
+<pre><code class="r">cat(markdownToHTML(text = &quot;2^10&quot;, extensions = c(&quot;superscript&quot;)))
+</code></pre>
+
+<pre><code>## &lt;p&gt;2&lt;sup&gt;10&lt;/sup&gt;&lt;/p&gt;
+</code></pre>
+
+<h1>HTML Options</h1>
+
+<pre><code class="r"># HTML OPTIONS
+
+# The following examples are short, so we allways add the HTML option &#39;fragment_only&#39;
+tOpt &lt;- &quot;fragment_only&quot;
+
+# skip_html example
+mkd = &#39;&lt;style&gt;&lt;/style&gt;&lt;img src=&quot;http://cran.rstudio.com/Rlogo.jpg&quot;&gt;&lt;a href=&quot;#&quot;&gt;Hello&lt;/a&gt;&#39;
+cat(markdownToHTML(text = mkd, options = c(tOpt)))
+</code></pre>
+
+<pre><code>## &lt;p&gt;&lt;style&gt;&lt;/style&gt;&lt;img src=&quot;http://cran.rstudio.com/Rlogo.jpg&quot;&gt;&lt;a href=&quot;#&quot;&gt;Hello&lt;/a&gt;&lt;/p&gt;
+</code></pre>
+
+<pre><code class="r">cat(markdownToHTML(text = mkd, options = c(tOpt, &quot;skip_html&quot;)))
+</code></pre>
+
+<pre><code>## &lt;p&gt;Hello&lt;/p&gt;
+</code></pre>
+
+<pre><code class="r"># skip_style example
+cat(markdownToHTML(text = mkd, options = c(tOpt)))
+</code></pre>
+
+<pre><code>## &lt;p&gt;&lt;style&gt;&lt;/style&gt;&lt;img src=&quot;http://cran.rstudio.com/Rlogo.jpg&quot;&gt;&lt;a href=&quot;#&quot;&gt;Hello&lt;/a&gt;&lt;/p&gt;
+</code></pre>
+
+<pre><code class="r">cat(markdownToHTML(text = mkd, options = c(tOpt, &quot;skip_style&quot;)))
+</code></pre>
+
+<pre><code>## &lt;p&gt;&lt;img src=&quot;http://cran.rstudio.com/Rlogo.jpg&quot;&gt;&lt;a href=&quot;#&quot;&gt;Hello&lt;/a&gt;&lt;/p&gt;
+</code></pre>
+
+<pre><code class="r"># skip_images example
+cat(markdownToHTML(text = mkd, options = c(tOpt)))
+</code></pre>
+
+<pre><code>## &lt;p&gt;&lt;style&gt;&lt;/style&gt;&lt;img src=&quot;http://cran.rstudio.com/Rlogo.jpg&quot;&gt;&lt;a href=&quot;#&quot;&gt;Hello&lt;/a&gt;&lt;/p&gt;
+</code></pre>
+
+<pre><code class="r">cat(markdownToHTML(text = mkd, options = c(tOpt, &quot;skip_images&quot;)))
+</code></pre>
+
+<pre><code>## &lt;p&gt;&lt;style&gt;&lt;/style&gt;&lt;a href=&quot;#&quot;&gt;Hello&lt;/a&gt;&lt;/p&gt;
+</code></pre>
+
+<pre><code class="r"># skip_links example
+cat(markdownToHTML(text = mkd, options = c(tOpt)))
+</code></pre>
+
+<pre><code>## &lt;p&gt;&lt;style&gt;&lt;/style&gt;&lt;img src=&quot;http://cran.rstudio.com/Rlogo.jpg&quot;&gt;&lt;a href=&quot;#&quot;&gt;Hello&lt;/a&gt;&lt;/p&gt;
+</code></pre>
+
+<pre><code class="r">cat(markdownToHTML(text = mkd, options = c(tOpt, &quot;skip_links&quot;)))
+</code></pre>
+
+<pre><code>## &lt;p&gt;&lt;style&gt;&lt;/style&gt;&lt;img src=&quot;http://cran.rstudio.com/Rlogo.jpg&quot;&gt;Hello&lt;/p&gt;
+</code></pre>
+
+<pre><code class="r"># safelink example
+cat(markdownToHTML(text = &#39;[foo](http://google.com &quot;baz&quot;)&#39;, options = c(tOpt)))
+</code></pre>
+
+<pre><code>## &lt;p&gt;&lt;a href=&quot;http://google.com&quot; title=&quot;baz&quot;&gt;foo&lt;/a&gt;&lt;/p&gt;
+</code></pre>
+
+<pre><code class="r">cat(markdownToHTML(text = &#39;[foo](http://google.com &quot;baz&quot;)&#39;, options = c(tOpt, &quot;safelink&quot;)))
+</code></pre>
+
+<pre><code>## &lt;p&gt;&lt;a href=&quot;http://google.com&quot; title=&quot;baz&quot;&gt;foo&lt;/a&gt;&lt;/p&gt;
+</code></pre>
+
+<pre><code class="r"># toc example
+mkd &lt;- paste(c(&quot;# Header 1&quot;, &quot;p1&quot;, &quot;## Header 2&quot;, &quot;p2&quot;), collapse = &quot;\n&quot;)
+
+cat(markdownToHTML(text = mkd, options = c(tOpt)))
+</code></pre>
+
+<pre><code>## &lt;h1&gt;Header 1&lt;/h1&gt;
+## 
+## &lt;p&gt;p1&lt;/p&gt;
+## 
+## &lt;h2&gt;Header 2&lt;/h2&gt;
+## 
+## &lt;p&gt;p2&lt;/p&gt;
+</code></pre>
+
+<pre><code class="r">cat(markdownToHTML(text = mkd, options = c(tOpt, &quot;toc&quot;)))
+</code></pre>
+
+<pre><code>## &lt;div id=&quot;toc&quot;&gt;
+## &lt;div id=&quot;toc_header&quot;&gt;Table of Contents&lt;/div&gt;
+## &lt;ul&gt;
+## &lt;li&gt;
+## &lt;a href=&quot;#toc_0&quot;&gt;Header 1&lt;/a&gt;
+## &lt;ul&gt;
+## &lt;li&gt;
+## &lt;a href=&quot;#toc_1&quot;&gt;Header 2&lt;/a&gt;
+## &lt;/li&gt;
+## &lt;/ul&gt;
+## &lt;/li&gt;
+## &lt;/ul&gt;
+## &lt;/div&gt;
+## 
+## 
+## &lt;h1 id=&quot;toc_0&quot;&gt;Header 1&lt;/h1&gt;
+## 
+## &lt;p&gt;p1&lt;/p&gt;
+## 
+## &lt;h2 id=&quot;toc_1&quot;&gt;Header 2&lt;/h2&gt;
+## 
+## &lt;p&gt;p2&lt;/p&gt;
+</code></pre>
+
+<pre><code class="r"># hard_wrap example
+cat(markdownToHTML(text = &quot;foo\nbar\n&quot;, options = c(tOpt)))
+</code></pre>
+
+<pre><code>## &lt;p&gt;foo
+## bar&lt;/p&gt;
+</code></pre>
+
+<pre><code class="r">cat(markdownToHTML(text = &quot;foo\nbar\n&quot;, options = c(tOpt, &quot;hard_wrap&quot;)))
+</code></pre>
+
+<pre><code>## &lt;p&gt;foo&lt;br&gt;
+## bar&lt;/p&gt;
+</code></pre>
+
+<pre><code class="r"># use_xhtml example
+cat(markdownToHTML(text = &quot;foo\nbar\n&quot;, options = c(tOpt, &quot;hard_wrap&quot;)))
+</code></pre>
+
+<pre><code>## &lt;p&gt;foo&lt;br&gt;
+## bar&lt;/p&gt;
+</code></pre>
+
+<pre><code class="r">cat(markdownToHTML(text = &quot;foo\nbar\n&quot;, options = c(tOpt, &quot;hard_wrap&quot;, &quot;use_xhtml&quot;)))
+</code></pre>
+
+<pre><code>## &lt;p&gt;foo&lt;br/&gt;
+## bar&lt;/p&gt;
+</code></pre>
+
+<pre><code class="r"># escape example
+mkd = &#39;&lt;style&gt;&lt;/style&gt;&lt;img src=&quot;http://cran.rstudio.com/Rlogo.jpg&quot;&gt;&lt;a href=&quot;#&quot;&gt;Hello&lt;/a&gt;&#39;
+cat(markdownToHTML(text = mkd, options = c(tOpt, &quot;skip_html&quot;)))
+</code></pre>
+
+<pre><code>## &lt;p&gt;Hello&lt;/p&gt;
+</code></pre>
+
+<pre><code class="r"># overrides all &#39;skip_*&#39; options
+cat(markdownToHTML(text = mkd, options = c(tOpt, &quot;skip_html&quot;, &quot;escape&quot;)))
+</code></pre>
+
+<pre><code>## &lt;p&gt;&amp;lt;style&amp;gt;&amp;lt;/style&amp;gt;&amp;lt;img src=&amp;quot;http://cran.rstudio.com/Rlogo.jpg&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;#&amp;quot;&amp;gt;Hello&amp;lt;/a&amp;gt;&lt;/p&gt;
+</code></pre>
+
+<pre><code class="r"># smartypants example
+cat(markdownToHTML(text = &quot;1/2 (c)&quot;, options = c(tOpt)))
+</code></pre>
+
+<pre><code>## &lt;p&gt;1/2 (c)&lt;/p&gt;
+</code></pre>
+
+<pre><code class="r">cat(markdownToHTML(text = &quot;1/2 (c)&quot;, options = c(tOpt, &quot;smartypants&quot;)))
+</code></pre>
+
+<pre><code>## &lt;p&gt;&amp;frac12; &amp;copy;&lt;/p&gt;
+</code></pre>
+
+<pre><code class="r">cat(smartypants(text = &quot;1/2 (c)\n&quot;))
+</code></pre>
+
+<pre><code>## &amp;frac12; &amp;copy;
+</code></pre>
+
+</body>
+
+</html>

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/markdown/doc/markdown-examples.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/markdown/doc/markdown-output.Rmd
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/markdown/doc/markdown-output.Rmd	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/markdown/doc/markdown-output.Rmd	(revision 2477)
@@ -0,0 +1,14 @@
+<!--
+%\VignetteEngine{knitr::knitr}
+%\VignetteIndexEntry{HTML Output from Markdown Examples}
+-->
+
+This vignette shows how the output looks like in HTML from the other vignette `markdown-examples.Rmd`, in which the literal HTML code was shown.
+
+```{r read, include=FALSE}
+library(knitr)
+opts_chunk$set(results = 'asis')
+out = knit_child(text = scan('markdown-examples.Rmd', what = 'character', skip = 7, sep = '\n'))
+```
+
+`r paste(out, collapse = '\n')`
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/markdown/doc/markdown-output.html
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/markdown/doc/markdown-output.html	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/markdown/doc/markdown-output.html	(revision 2477)
@@ -0,0 +1,530 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+
+<title>Markdown Extensions</title>
+
+<script type="text/javascript">
+window.onload = function() {
+  var imgs = document.getElementsByTagName('img'), i, img;
+  for (i = 0; i < imgs.length; i++) {
+    img = imgs[i];
+    // center an image if it is the only element of its parent
+    if (img.parentElement.childElementCount === 1)
+      img.parentElement.style.textAlign = 'center';
+  }
+};
+</script>
+
+<!-- Styles for R syntax highlighter -->
+<style type="text/css">
+   pre .operator,
+   pre .paren {
+     color: rgb(104, 118, 135)
+   }
+
+   pre .literal {
+     color: #990073
+   }
+
+   pre .number {
+     color: #099;
+   }
+
+   pre .comment {
+     color: #998;
+     font-style: italic
+   }
+
+   pre .keyword {
+     color: #900;
+     font-weight: bold
+   }
+
+   pre .identifier {
+     color: rgb(0, 0, 0);
+   }
+
+   pre .string {
+     color: #d14;
+   }
+</style>
+
+<!-- R syntax highlighter -->
+<script type="text/javascript">
+var hljs=new function(){function m(p){return p.replace(/&/gm,"&amp;").replace(/</gm,"&lt;")}function f(r,q,p){return RegExp(q,"m"+(r.cI?"i":"")+(p?"g":""))}function b(r){for(var p=0;p<r.childNodes.length;p++){var q=r.childNodes[p];if(q.nodeName=="CODE"){return q}if(!(q.nodeType==3&&q.nodeValue.match(/\s+/))){break}}}function h(t,s){var p="";for(var r=0;r<t.childNodes.length;r++){if(t.childNodes[r].nodeType==3){var q=t.childNodes[r].nodeValue;if(s){q=q.replace(/\n/g,"")}p+=q}else{if(t.childNodes[r].nodeName=="BR"){p+="\n"}else{p+=h(t.childNodes[r])}}}if(/MSIE [678]/.test(navigator.userAgent)){p=p.replace(/\r/g,"\n")}return p}function a(s){var r=s.className.split(/\s+/);r=r.concat(s.parentNode.className.split(/\s+/));for(var q=0;q<r.length;q++){var p=r[q].replace(/^language-/,"");if(e[p]){return p}}}function c(q){var p=[];(function(s,t){for(var r=0;r<s.childNodes.length;r++){if(s.childNodes[r].nodeType==3){t+=s.childNodes[r].nodeValue.length}else{if(s.childNodes[r].nodeName=="BR"){t+=1}else{if(s.childNodes[r].nodeType==1){p.push({event:"start",offset:t,node:s.childNodes[r]});t=arguments.callee(s.childNodes[r],t);p.push({event:"stop",offset:t,node:s.childNodes[r]})}}}}return t})(q,0);return p}function k(y,w,x){var q=0;var z="";var s=[];function u(){if(y.length&&w.length){if(y[0].offset!=w[0].offset){return(y[0].offset<w[0].offset)?y:w}else{return w[0].event=="start"?y:w}}else{return y.length?y:w}}function t(D){var A="<"+D.nodeName.toLowerCase();for(var B=0;B<D.attributes.length;B++){var C=D.attributes[B];A+=" "+C.nodeName.toLowerCase();if(C.value!==undefined&&C.value!==false&&C.value!==null){A+='="'+m(C.value)+'"'}}return A+">"}while(y.length||w.length){var v=u().splice(0,1)[0];z+=m(x.substr(q,v.offset-q));q=v.offset;if(v.event=="start"){z+=t(v.node);s.push(v.node)}else{if(v.event=="stop"){var p,r=s.length;do{r--;p=s[r];z+=("</"+p.nodeName.toLowerCase()+">")}while(p!=v.node);s.splice(r,1);while(r<s.length){z+=t(s[r]);r++}}}}return z+m(x.substr(q))}function j(){function q(x,y,v){if(x.compiled){return}var u;var s=[];if(x.k){x.lR=f(y,x.l||hljs.IR,true);for(var w in x.k){if(!x.k.hasOwnProperty(w)){continue}if(x.k[w] instanceof Object){u=x.k[w]}else{u=x.k;w="keyword"}for(var r in u){if(!u.hasOwnProperty(r)){continue}x.k[r]=[w,u[r]];s.push(r)}}}if(!v){if(x.bWK){x.b="\\b("+s.join("|")+")\\s"}x.bR=f(y,x.b?x.b:"\\B|\\b");if(!x.e&&!x.eW){x.e="\\B|\\b"}if(x.e){x.eR=f(y,x.e)}}if(x.i){x.iR=f(y,x.i)}if(x.r===undefined){x.r=1}if(!x.c){x.c=[]}x.compiled=true;for(var t=0;t<x.c.length;t++){if(x.c[t]=="self"){x.c[t]=x}q(x.c[t],y,false)}if(x.starts){q(x.starts,y,false)}}for(var p in e){if(!e.hasOwnProperty(p)){continue}q(e[p].dM,e[p],true)}}function d(B,C){if(!j.called){j();j.called=true}function q(r,M){for(var L=0;L<M.c.length;L++){if((M.c[L].bR.exec(r)||[null])[0]==r){return M.c[L]}}}function v(L,r){if(D[L].e&&D[L].eR.test(r)){return 1}if(D[L].eW){var M=v(L-1,r);return M?M+1:0}return 0}function w(r,L){return L.i&&L.iR.test(r)}function K(N,O){var M=[];for(var L=0;L<N.c.length;L++){M.push(N.c[L].b)}var r=D.length-1;do{if(D[r].e){M.push(D[r].e)}r--}while(D[r+1].eW);if(N.i){M.push(N.i)}return f(O,M.join("|"),true)}function p(M,L){var N=D[D.length-1];if(!N.t){N.t=K(N,E)}N.t.lastIndex=L;var r=N.t.exec(M);return r?[M.substr(L,r.index-L),r[0],false]:[M.substr(L),"",true]}function z(N,r){var L=E.cI?r[0].toLowerCase():r[0];var M=N.k[L];if(M&&M instanceof Array){return M}return false}function F(L,P){L=m(L);if(!P.k){return L}var r="";var O=0;P.lR.lastIndex=0;var M=P.lR.exec(L);while(M){r+=L.substr(O,M.index-O);var N=z(P,M);if(N){x+=N[1];r+='<span class="'+N[0]+'">'+M[0]+"</span>"}else{r+=M[0]}O=P.lR.lastIndex;M=P.lR.exec(L)}return r+L.substr(O,L.length-O)}function J(L,M){if(M.sL&&e[M.sL]){var r=d(M.sL,L);x+=r.keyword_count;return r.value}else{return F(L,M)}}function I(M,r){var L=M.cN?'<span class="'+M.cN+'">':"";if(M.rB){y+=L;M.buffer=""}else{if(M.eB){y+=m(r)+L;M.buffer=""}else{y+=L;M.buffer=r}}D.push(M);A+=M.r}function G(N,M,Q){var R=D[D.length-1];if(Q){y+=J(R.buffer+N,R);return false}var P=q(M,R);if(P){y+=J(R.buffer+N,R);I(P,M);return P.rB}var L=v(D.length-1,M);if(L){var O=R.cN?"</span>":"";if(R.rE){y+=J(R.buffer+N,R)+O}else{if(R.eE){y+=J(R.buffer+N,R)+O+m(M)}else{y+=J(R.buffer+N+M,R)+O}}while(L>1){O=D[D.length-2].cN?"</span>":"";y+=O;L--;D.length--}var r=D[D.length-1];D.length--;D[D.length-1].buffer="";if(r.starts){I(r.starts,"")}return R.rE}if(w(M,R)){throw"Illegal"}}var E=e[B];var D=[E.dM];var A=0;var x=0;var y="";try{var s,u=0;E.dM.buffer="";do{s=p(C,u);var t=G(s[0],s[1],s[2]);u+=s[0].length;if(!t){u+=s[1].length}}while(!s[2]);if(D.length>1){throw"Illegal"}return{r:A,keyword_count:x,value:y}}catch(H){if(H=="Illegal"){return{r:0,keyword_count:0,value:m(C)}}else{throw H}}}function g(t){var p={keyword_count:0,r:0,value:m(t)};var r=p;for(var q in e){if(!e.hasOwnProperty(q)){continue}var s=d(q,t);s.language=q;if(s.keyword_count+s.r>r.keyword_count+r.r){r=s}if(s.keyword_count+s.r>p.keyword_count+p.r){r=p;p=s}}if(r.language){p.second_best=r}return p}function i(r,q,p){if(q){r=r.replace(/^((<[^>]+>|\t)+)/gm,function(t,w,v,u){return w.replace(/\t/g,q)})}if(p){r=r.replace(/\n/g,"<br>")}return r}function n(t,w,r){var x=h(t,r);var v=a(t);var y,s;if(v){y=d(v,x)}else{return}var q=c(t);if(q.length){s=document.createElement("pre");s.innerHTML=y.value;y.value=k(q,c(s),x)}y.value=i(y.value,w,r);var u=t.className;if(!u.match("(\\s|^)(language-)?"+v+"(\\s|$)")){u=u?(u+" "+v):v}if(/MSIE [678]/.test(navigator.userAgent)&&t.tagName=="CODE"&&t.parentNode.tagName=="PRE"){s=t.parentNode;var p=document.createElement("div");p.innerHTML="<pre><code>"+y.value+"</code></pre>";t=p.firstChild.firstChild;p.firstChild.cN=s.cN;s.parentNode.replaceChild(p.firstChild,s)}else{t.innerHTML=y.value}t.className=u;t.result={language:v,kw:y.keyword_count,re:y.r};if(y.second_best){t.second_best={language:y.second_best.language,kw:y.second_best.keyword_count,re:y.second_best.r}}}function o(){if(o.called){return}o.called=true;var r=document.getElementsByTagName("pre");for(var p=0;p<r.length;p++){var q=b(r[p]);if(q){n(q,hljs.tabReplace)}}}function l(){if(window.addEventListener){window.addEventListener("DOMContentLoaded",o,false);window.addEventListener("load",o,false)}else{if(window.attachEvent){window.attachEvent("onload",o)}else{window.onload=o}}}var e={};this.LANGUAGES=e;this.highlight=d;this.highlightAuto=g;this.fixMarkup=i;this.highlightBlock=n;this.initHighlighting=o;this.initHighlightingOnLoad=l;this.IR="[a-zA-Z][a-zA-Z0-9_]*";this.UIR="[a-zA-Z_][a-zA-Z0-9_]*";this.NR="\\b\\d+(\\.\\d+)?";this.CNR="\\b(0[xX][a-fA-F0-9]+|(\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)";this.BNR="\\b(0b[01]+)";this.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|\\.|-|-=|/|/=|:|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~";this.ER="(?![\\s\\S])";this.BE={b:"\\\\.",r:0};this.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[this.BE],r:0};this.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[this.BE],r:0};this.CLCM={cN:"comment",b:"//",e:"$"};this.CBLCLM={cN:"comment",b:"/\\*",e:"\\*/"};this.HCM={cN:"comment",b:"#",e:"$"};this.NM={cN:"number",b:this.NR,r:0};this.CNM={cN:"number",b:this.CNR,r:0};this.BNM={cN:"number",b:this.BNR,r:0};this.inherit=function(r,s){var p={};for(var q in r){p[q]=r[q]}if(s){for(var q in s){p[q]=s[q]}}return p}}();hljs.LANGUAGES.cpp=function(){var a={keyword:{"false":1,"int":1,"float":1,"while":1,"private":1,"char":1,"catch":1,"export":1,virtual:1,operator:2,sizeof:2,dynamic_cast:2,typedef:2,const_cast:2,"const":1,struct:1,"for":1,static_cast:2,union:1,namespace:1,unsigned:1,"long":1,"throw":1,"volatile":2,"static":1,"protected":1,bool:1,template:1,mutable:1,"if":1,"public":1,friend:2,"do":1,"return":1,"goto":1,auto:1,"void":2,"enum":1,"else":1,"break":1,"new":1,extern:1,using:1,"true":1,"class":1,asm:1,"case":1,typeid:1,"short":1,reinterpret_cast:2,"default":1,"double":1,register:1,explicit:1,signed:1,typename:1,"try":1,"this":1,"switch":1,"continue":1,wchar_t:1,inline:1,"delete":1,alignof:1,char16_t:1,char32_t:1,constexpr:1,decltype:1,noexcept:1,nullptr:1,static_assert:1,thread_local:1,restrict:1,_Bool:1,complex:1},built_in:{std:1,string:1,cin:1,cout:1,cerr:1,clog:1,stringstream:1,istringstream:1,ostringstream:1,auto_ptr:1,deque:1,list:1,queue:1,stack:1,vector:1,map:1,set:1,bitset:1,multiset:1,multimap:1,unordered_set:1,unordered_map:1,unordered_multiset:1,unordered_multimap:1,array:1,shared_ptr:1}};return{dM:{k:a,i:"</",c:[hljs.CLCM,hljs.CBLCLM,hljs.QSM,{cN:"string",b:"'\\\\?.",e:"'",i:"."},{cN:"number",b:"\\b(\\d+(\\.\\d*)?|\\.\\d+)(u|U|l|L|ul|UL|f|F)"},hljs.CNM,{cN:"preprocessor",b:"#",e:"$"},{cN:"stl_container",b:"\\b(deque|list|queue|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<",e:">",k:a,r:10,c:["self"]}]}}}();hljs.LANGUAGES.r={dM:{c:[hljs.HCM,{cN:"number",b:"\\b0[xX][0-9a-fA-F]+[Li]?\\b",e:hljs.IMMEDIATE_RE,r:0},{cN:"number",b:"\\b\\d+(?:[eE][+\\-]?\\d*)?L\\b",e:hljs.IMMEDIATE_RE,r:0},{cN:"number",b:"\\b\\d+\\.(?!\\d)(?:i\\b)?",e:hljs.IMMEDIATE_RE,r:1},{cN:"number",b:"\\b\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b",e:hljs.IMMEDIATE_RE,r:0},{cN:"number",b:"\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b",e:hljs.IMMEDIATE_RE,r:1},{cN:"keyword",b:"(?:tryCatch|library|setGeneric|setGroupGeneric)\\b",e:hljs.IMMEDIATE_RE,r:10},{cN:"keyword",b:"\\.\\.\\.",e:hljs.IMMEDIATE_RE,r:10},{cN:"keyword",b:"\\.\\.\\d+(?![\\w.])",e:hljs.IMMEDIATE_RE,r:10},{cN:"keyword",b:"\\b(?:function)",e:hljs.IMMEDIATE_RE,r:2},{cN:"keyword",b:"(?:if|in|break|next|repeat|else|for|return|switch|while|try|stop|warning|require|attach|detach|source|setMethod|setClass)\\b",e:hljs.IMMEDIATE_RE,r:1},{cN:"literal",b:"(?:NA|NA_integer_|NA_real_|NA_character_|NA_complex_)\\b",e:hljs.IMMEDIATE_RE,r:10},{cN:"literal",b:"(?:NULL|TRUE|FALSE|T|F|Inf|NaN)\\b",e:hljs.IMMEDIATE_RE,r:1},{cN:"identifier",b:"[a-zA-Z.][a-zA-Z0-9._]*\\b",e:hljs.IMMEDIATE_RE,r:0},{cN:"operator",b:"<\\-(?!\\s*\\d)",e:hljs.IMMEDIATE_RE,r:2},{cN:"operator",b:"\\->|<\\-",e:hljs.IMMEDIATE_RE,r:1},{cN:"operator",b:"%%|~",e:hljs.IMMEDIATE_RE},{cN:"operator",b:">=|<=|==|!=|\\|\\||&&|=|\\+|\\-|\\*|/|\\^|>|<|!|&|\\||\\$|:",e:hljs.IMMEDIATE_RE,r:0},{cN:"operator",b:"%",e:"%",i:"\\n",r:1},{cN:"identifier",b:"`",e:"`",r:0},{cN:"string",b:'"',e:'"',c:[hljs.BE],r:0},{cN:"string",b:"'",e:"'",c:[hljs.BE],r:0},{cN:"paren",b:"[[({\\])}]",e:hljs.IMMEDIATE_RE,r:0}]}};
+hljs.initHighlightingOnLoad();
+</script>
+
+
+
+<style type="text/css">
+body, td {
+   font-family: sans-serif;
+   background-color: white;
+   font-size: 13px;
+}
+
+body {
+  max-width: 800px;
+  margin: auto;
+  padding: 1em;
+  line-height: 20px;
+}
+
+tt, code, pre {
+   font-family: 'DejaVu Sans Mono', 'Droid Sans Mono', 'Lucida Console', Consolas, Monaco, monospace;
+}
+
+h1 {
+   font-size:2.2em;
+}
+
+h2 {
+   font-size:1.8em;
+}
+
+h3 {
+   font-size:1.4em;
+}
+
+h4 {
+   font-size:1.0em;
+}
+
+h5 {
+   font-size:0.9em;
+}
+
+h6 {
+   font-size:0.8em;
+}
+
+a:visited {
+   color: rgb(50%, 0%, 50%);
+}
+
+pre, img {
+  max-width: 100%;
+}
+pre {
+  overflow-x: auto;
+}
+pre code {
+   display: block; padding: 0.5em;
+}
+
+code {
+  font-size: 92%;
+  border: 1px solid #ccc;
+}
+
+code[class] {
+  background-color: #F8F8F8;
+}
+
+table, td, th {
+  border: none;
+}
+
+blockquote {
+   color:#666666;
+   margin:0;
+   padding-left: 1em;
+   border-left: 0.5em #EEE solid;
+}
+
+hr {
+   height: 0px;
+   border-bottom: none;
+   border-top-width: thin;
+   border-top-style: dotted;
+   border-top-color: #999999;
+}
+
+@media print {
+   * {
+      background: transparent !important;
+      color: black !important;
+      filter:none !important;
+      -ms-filter: none !important;
+   }
+
+   body {
+      font-size:12pt;
+      max-width:100%;
+   }
+
+   a, a:visited {
+      text-decoration: underline;
+   }
+
+   hr {
+      visibility: hidden;
+      page-break-before: always;
+   }
+
+   pre, blockquote {
+      padding-right: 1em;
+      page-break-inside: avoid;
+   }
+
+   tr, img {
+      page-break-inside: avoid;
+   }
+
+   img {
+      max-width: 100% !important;
+   }
+
+   @page :left {
+      margin: 15mm 20mm 15mm 10mm;
+   }
+
+   @page :right {
+      margin: 15mm 10mm 15mm 20mm;
+   }
+
+   p, h2, h3 {
+      orphans: 3; widows: 3;
+   }
+
+   h2, h3 {
+      page-break-after: avoid;
+   }
+}
+</style>
+
+
+
+</head>
+
+<body>
+<!--
+%\VignetteEngine{knitr::knitr}
+%\VignetteIndexEntry{HTML Output from Markdown Examples}
+-->
+
+<p>This vignette shows how the output looks like in HTML from the other vignette <code>markdown-examples.Rmd</code>, in which the literal HTML code was shown.</p>
+
+<pre><code class="r">library(markdown)
+</code></pre>
+
+<h1>Markdown Extensions</h1>
+
+<pre><code class="r"># The following examples are short, so we set the HTML option &#39;fragment_only&#39;
+
+options(markdown.HTML.options = &quot;fragment_only&quot;)
+
+# no_intra_emphasis example
+cat(markdownToHTML(text = &quot;foo_bar_function&quot;, extensions = c()))
+</code></pre>
+
+<p>foo<em>bar</em>function</p>
+
+<pre><code class="r">cat(markdownToHTML(text = &quot;foo_bar_function&quot;, extensions = c(&quot;no_intra_emphasis&quot;)))
+</code></pre>
+
+<p>foo_bar_function</p>
+
+<pre><code class="r"># tables example (need 4 spaces at beginning of line here)
+cat(markdownToHTML(text = &quot;
+    First Header  | Second Header
+    ------------- | -------------
+    Content Cell  | Content Cell
+    Content Cell  | Content Cell
+&quot;, extensions = c()))
+</code></pre>
+
+<pre><code>First Header  | Second Header
+------------- | -------------
+Content Cell  | Content Cell
+Content Cell  | Content Cell
+</code></pre>
+
+<pre><code class="r"># but not here
+cat(markdownToHTML(text = &quot;
+First Header  | Second Header
+------------- | -------------
+Content Cell  | Content Cell
+Content Cell  | Content Cell
+&quot;, extensions = c(&quot;tables&quot;)))
+</code></pre>
+
+<table><thead>
+<tr>
+<th>First Header</th>
+<th>Second Header</th>
+</tr>
+</thead><tbody>
+<tr>
+<td>Content Cell</td>
+<td>Content Cell</td>
+</tr>
+<tr>
+<td>Content Cell</td>
+<td>Content Cell</td>
+</tr>
+</tbody></table>
+
+<pre><code class="r"># fenced_code example (need at least three leading ~ or `)
+fenced_block &lt;- function(text, x = &quot;`&quot;, n = 3) {
+  fence &lt;- paste(rep(x, n), collapse = &quot;&quot;)
+  paste(fence, text, fence, sep = &quot;&quot;)
+}
+cat(markdownToHTML(text = fenced_block(&quot;
+preformatted text here without having to indent
+first line.
+&quot;), extensions = c()))
+</code></pre>
+
+<p><code>
+preformatted text here without having to indent
+first line.
+</code></p>
+
+<pre><code class="r">cat(markdownToHTML(text = fenced_block(&quot;
+preformatted text here without having to indent
+first line.
+&quot;), extensions = c(&quot;fenced_code&quot;)))
+</code></pre>
+
+<pre><code>preformatted text here without having to indent
+first line.
+</code></pre>
+
+<pre><code class="r"># autolink example
+cat(markdownToHTML(text = &quot;http://www.r-project.org/&quot;, extensions = c()))
+</code></pre>
+
+<p>http://www.r-project.org/</p>
+
+<pre><code class="r">cat(markdownToHTML(text = &quot;http://www.r-project.org/&quot;, extensions = c(&quot;autolink&quot;)))
+</code></pre>
+
+<p><a href="http://www.r-project.org/">http://www.r-project.org/</a></p>
+
+<pre><code class="r"># strikethrough example
+cat(markdownToHTML(text = &quot;~~awesome~~&quot;, extensions = c()))
+</code></pre>
+
+<p>~~awesome~~</p>
+
+<pre><code class="r">cat(markdownToHTML(text = &quot;~~awesome~~&quot;, extensions = c(&quot;strikethrough&quot;)))
+</code></pre>
+
+<p><del>awesome</del></p>
+
+<pre><code class="r"># lax_spacing
+cat(markdownToHTML(text = &quot;
+Embedding html without surrounding with empty newline.
+&lt;div&gt;_markdown_&lt;/div&gt;
+extra text.
+&quot;, extensions = c(&quot;&quot;)))
+</code></pre>
+
+<p>Embedding html without surrounding with empty newline.
+<div><em>markdown</em></div>
+extra text.</p>
+
+<pre><code class="r">cat(markdownToHTML(text = &quot;
+Embedding html without surrounding with empty newline.
+&lt;div&gt;_markdown_&lt;/div&gt;
+extra text.
+&quot;, extensions = c(&quot;lax_spacing&quot;)))
+</code></pre>
+
+<p>Embedding html without surrounding with empty newline.</p>
+
+<div>_markdown_</div>
+
+<p>extra text.</p>
+
+<pre><code class="r"># space_headers example
+cat(markdownToHTML(text = &quot;#A Header\neven though there is no space between # and A&quot;,
+                   extensions = c(&quot;&quot;)))
+</code></pre>
+
+<h1>A Header</h1>
+
+<p>even though there is no space between # and A</p>
+
+<pre><code class="r">cat(markdownToHTML(text = &quot;#Not A Header\nbecause there is no space between # and N&quot;,
+                   extensions = c(&quot;space_headers&quot;)))
+</code></pre>
+
+<p>#Not A Header
+because there is no space between # and N</p>
+
+<pre><code class="r"># superscript example
+cat(markdownToHTML(text = &quot;2^10&quot;, extensions = c()))
+</code></pre>
+
+<p>2^10</p>
+
+<pre><code class="r">cat(markdownToHTML(text = &quot;2^10&quot;, extensions = c(&quot;superscript&quot;)))
+</code></pre>
+
+<p>2<sup>10</sup></p>
+
+<h1>HTML Options</h1>
+
+<pre><code class="r"># HTML OPTIONS
+
+# The following examples are short, so we allways add the HTML option &#39;fragment_only&#39;
+tOpt &lt;- &quot;fragment_only&quot;
+
+# skip_html example
+mkd = &#39;&lt;style&gt;&lt;/style&gt;&lt;img src=&quot;http://cran.rstudio.com/Rlogo.jpg&quot;&gt;&lt;a href=&quot;#&quot;&gt;Hello&lt;/a&gt;&#39;
+cat(markdownToHTML(text = mkd, options = c(tOpt)))
+</code></pre>
+
+<p><style></style><img src="http://cran.rstudio.com/Rlogo.jpg"><a href="#">Hello</a></p>
+
+<pre><code class="r">cat(markdownToHTML(text = mkd, options = c(tOpt, &quot;skip_html&quot;)))
+</code></pre>
+
+<p>Hello</p>
+
+<pre><code class="r"># skip_style example
+cat(markdownToHTML(text = mkd, options = c(tOpt)))
+</code></pre>
+
+<p><style></style><img src="http://cran.rstudio.com/Rlogo.jpg"><a href="#">Hello</a></p>
+
+<pre><code class="r">cat(markdownToHTML(text = mkd, options = c(tOpt, &quot;skip_style&quot;)))
+</code></pre>
+
+<p><img src="http://cran.rstudio.com/Rlogo.jpg"><a href="#">Hello</a></p>
+
+<pre><code class="r"># skip_images example
+cat(markdownToHTML(text = mkd, options = c(tOpt)))
+</code></pre>
+
+<p><style></style><img src="http://cran.rstudio.com/Rlogo.jpg"><a href="#">Hello</a></p>
+
+<pre><code class="r">cat(markdownToHTML(text = mkd, options = c(tOpt, &quot;skip_images&quot;)))
+</code></pre>
+
+<p><style></style><a href="#">Hello</a></p>
+
+<pre><code class="r"># skip_links example
+cat(markdownToHTML(text = mkd, options = c(tOpt)))
+</code></pre>
+
+<p><style></style><img src="http://cran.rstudio.com/Rlogo.jpg"><a href="#">Hello</a></p>
+
+<pre><code class="r">cat(markdownToHTML(text = mkd, options = c(tOpt, &quot;skip_links&quot;)))
+</code></pre>
+
+<p><style></style><img src="http://cran.rstudio.com/Rlogo.jpg">Hello</p>
+
+<pre><code class="r"># safelink example
+cat(markdownToHTML(text = &#39;[foo](http://google.com &quot;baz&quot;)&#39;, options = c(tOpt)))
+</code></pre>
+
+<p><a href="http://google.com" title="baz">foo</a></p>
+
+<pre><code class="r">cat(markdownToHTML(text = &#39;[foo](http://google.com &quot;baz&quot;)&#39;, options = c(tOpt, &quot;safelink&quot;)))
+</code></pre>
+
+<p><a href="http://google.com" title="baz">foo</a></p>
+
+<pre><code class="r"># toc example
+mkd &lt;- paste(c(&quot;# Header 1&quot;, &quot;p1&quot;, &quot;## Header 2&quot;, &quot;p2&quot;), collapse = &quot;\n&quot;)
+
+cat(markdownToHTML(text = mkd, options = c(tOpt)))
+</code></pre>
+
+<h1>Header 1</h1>
+
+<p>p1</p>
+
+<h2>Header 2</h2>
+
+<p>p2</p>
+
+<pre><code class="r">cat(markdownToHTML(text = mkd, options = c(tOpt, &quot;toc&quot;)))
+</code></pre>
+
+<div id="toc">
+<div id="toc_header">Table of Contents</div>
+<ul>
+<li>
+<a href="#toc_0">Header 1</a>
+<ul>
+<li>
+<a href="#toc_1">Header 2</a>
+</li>
+</ul>
+</li>
+</ul>
+</div>
+
+<h1 id="toc_0">Header 1</h1>
+
+<p>p1</p>
+
+<h2 id="toc_1">Header 2</h2>
+
+<p>p2</p>
+
+<pre><code class="r"># hard_wrap example
+cat(markdownToHTML(text = &quot;foo\nbar\n&quot;, options = c(tOpt)))
+</code></pre>
+
+<p>foo
+bar</p>
+
+<pre><code class="r">cat(markdownToHTML(text = &quot;foo\nbar\n&quot;, options = c(tOpt, &quot;hard_wrap&quot;)))
+</code></pre>
+
+<p>foo<br>
+bar</p>
+
+<pre><code class="r"># use_xhtml example
+cat(markdownToHTML(text = &quot;foo\nbar\n&quot;, options = c(tOpt, &quot;hard_wrap&quot;)))
+</code></pre>
+
+<p>foo<br>
+bar</p>
+
+<pre><code class="r">cat(markdownToHTML(text = &quot;foo\nbar\n&quot;, options = c(tOpt, &quot;hard_wrap&quot;, &quot;use_xhtml&quot;)))
+</code></pre>
+
+<p>foo<br/>
+bar</p>
+
+<pre><code class="r"># escape example
+mkd = &#39;&lt;style&gt;&lt;/style&gt;&lt;img src=&quot;http://cran.rstudio.com/Rlogo.jpg&quot;&gt;&lt;a href=&quot;#&quot;&gt;Hello&lt;/a&gt;&#39;
+cat(markdownToHTML(text = mkd, options = c(tOpt, &quot;skip_html&quot;)))
+</code></pre>
+
+<p>Hello</p>
+
+<pre><code class="r"># overrides all &#39;skip_*&#39; options
+cat(markdownToHTML(text = mkd, options = c(tOpt, &quot;skip_html&quot;, &quot;escape&quot;)))
+</code></pre>
+
+<p>&lt;style&gt;&lt;/style&gt;&lt;img src=&ldquo;http://cran.rstudio.com/Rlogo.jpg&rdquo;&gt;&lt;a href=&ldquo;#&rdquo;&gt;Hello&lt;/a&gt;</p>
+
+<pre><code class="r"># smartypants example
+cat(markdownToHTML(text = &quot;1/2 (c)&quot;, options = c(tOpt)))
+</code></pre>
+
+<p>&frac12; &copy;</p>
+
+<pre><code class="r">cat(markdownToHTML(text = &quot;1/2 (c)&quot;, options = c(tOpt, &quot;smartypants&quot;)))
+</code></pre>
+
+<p>&frac12; &copy;</p>
+
+<pre><code class="r">cat(smartypants(text = &quot;1/2 (c)\n&quot;))
+</code></pre>
+
+<p>&frac12; &copy;</p>
+
+</body>
+
+</html>

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/markdown/doc/markdown-output.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/markdown/doc/index.html
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/markdown/doc/index.html	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/markdown/doc/index.html	(revision 2477)
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title>R: Vignettes and other documentation</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<link rel="stylesheet" type="text/css" href="/doc/html/R.css" />
+</head><body>
+<h1> Vignettes and other documentation
+<img class="toplogo" src="/doc/html/Rlogo.svg" alt="[R logo]" />
+</h1>
+<hr/>
+<div style="text-align: center;">
+<a href="/doc/html/index.html"><img class="arrow" src="/doc/html/up.jpg" alt="[Top]" /></a>
+</div>
+<h2>Vignettes from package 'markdown'</h2>
+<table width="100%">
+<col style="width: 22%;" />
+<col style="width:  2%;" />
+<col style="width: 50%;" />
+<col style="width:  8%;" />
+<col style="width:  8%;" />
+<col style="width:  8%;" />
+<tr><td style="text-align: right; vertical-align: top;"><a href="../../../library/markdown/doc/markdown-examples.html">markdown::markdown-examples</a></td>
+<td></td><td valign="top">Some Markdown Examples</td>
+<td valign="top"><a href="../../../library/markdown/doc/markdown-examples.html">HTML</a></td>
+<td valign="top"><a href="../../../library/markdown/doc/markdown-examples.Rmd">source</a></td>
+<td valign="top" style="white-space: nowrap"><a href="../../../library/markdown/doc/markdown-examples.R">R code</a></td></tr>
+<tr><td style="text-align: right; vertical-align: top;"><a href="../../../library/markdown/doc/markdown-output.html">markdown::markdown-output</a></td>
+<td></td><td valign="top">HTML Output from Markdown Examples</td>
+<td valign="top"><a href="../../../library/markdown/doc/markdown-output.html">HTML</a></td>
+<td valign="top"><a href="../../../library/markdown/doc/markdown-output.Rmd">source</a></td>
+<td valign="top" style="white-space: nowrap"><a href="../../../library/markdown/doc/markdown-output.R">R code</a></td></tr>
+</table>
+</body></html>

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/markdown/doc/index.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/markdown/Meta/Rd.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/markdown/Meta/Rd.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/markdown/Meta/vignette.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/markdown/Meta/vignette.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/markdown/Meta/package.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/markdown/Meta/package.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/markdown/Meta/nsInfo.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/markdown/Meta/nsInfo.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/markdown/Meta/hsearch.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/markdown/Meta/hsearch.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/markdown/Meta/links.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/markdown/Meta/links.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/markdown/libs/markdown.so.dSYM/Contents/Info.plist
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/markdown/libs/markdown.so.dSYM/Contents/Info.plist	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/markdown/libs/markdown.so.dSYM/Contents/Info.plist	(revision 2477)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+	<dict>
+		<key>CFBundleDevelopmentRegion</key>
+		<string>English</string>
+		<key>CFBundleIdentifier</key>
+		<string>com.apple.xcode.dsym.markdown.so</string>
+		<key>CFBundleInfoDictionaryVersion</key>
+		<string>6.0</string>
+		<key>CFBundlePackageType</key>
+		<string>dSYM</string>
+		<key>CFBundleSignature</key>
+		<string>????</string>
+		<key>CFBundleShortVersionString</key>
+		<string>1.0</string>
+		<key>CFBundleVersion</key>
+		<string>1</string>
+	</dict>
+</plist>
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/markdown/libs/markdown.so.dSYM/Contents/Resources/DWARF/markdown.so
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/markdown/libs/markdown.so.dSYM/Contents/Resources/DWARF/markdown.so
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/markdown/resources/markdown.css
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/markdown/resources/markdown.css	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/markdown/resources/markdown.css	(revision 2477)
@@ -0,0 +1,134 @@
+body, td {
+   font-family: sans-serif;
+   background-color: white;
+   font-size: 13px;
+}
+
+body {
+  max-width: 800px;
+  margin: auto;
+  padding: 1em;
+  line-height: 20px;
+}
+
+tt, code, pre {
+   font-family: 'DejaVu Sans Mono', 'Droid Sans Mono', 'Lucida Console', Consolas, Monaco, monospace;
+}
+
+h1 {
+   font-size:2.2em;
+}
+
+h2 {
+   font-size:1.8em;
+}
+
+h3 {
+   font-size:1.4em;
+}
+
+h4 {
+   font-size:1.0em;
+}
+
+h5 {
+   font-size:0.9em;
+}
+
+h6 {
+   font-size:0.8em;
+}
+
+a:visited {
+   color: rgb(50%, 0%, 50%);
+}
+
+pre, img {
+  max-width: 100%;
+}
+pre {
+  overflow-x: auto;
+}
+pre code {
+   display: block; padding: 0.5em;
+}
+
+code {
+  font-size: 92%;
+  border: 1px solid #ccc;
+}
+
+code[class] {
+  background-color: #F8F8F8;
+}
+
+table, td, th {
+  border: none;
+}
+
+blockquote {
+   color:#666666;
+   margin:0;
+   padding-left: 1em;
+   border-left: 0.5em #EEE solid;
+}
+
+hr {
+   height: 0px;
+   border-bottom: none;
+   border-top-width: thin;
+   border-top-style: dotted;
+   border-top-color: #999999;
+}
+
+@media print {
+   * {
+      background: transparent !important;
+      color: black !important;
+      filter:none !important;
+      -ms-filter: none !important;
+   }
+
+   body {
+      font-size:12pt;
+      max-width:100%;
+   }
+
+   a, a:visited {
+      text-decoration: underline;
+   }
+
+   hr {
+      visibility: hidden;
+      page-break-before: always;
+   }
+
+   pre, blockquote {
+      padding-right: 1em;
+      page-break-inside: avoid;
+   }
+
+   tr, img {
+      page-break-inside: avoid;
+   }
+
+   img {
+      max-width: 100% !important;
+   }
+
+   @page :left {
+      margin: 15mm 20mm 15mm 10mm;
+   }
+
+   @page :right {
+      margin: 15mm 10mm 15mm 20mm;
+   }
+
+   p, h2, h3 {
+      orphans: 3; widows: 3;
+   }
+
+   h2, h3 {
+      page-break-after: avoid;
+   }
+}

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/markdown/resources/markdown.css
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/markdown/resources/r_highlight.html
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/markdown/resources/r_highlight.html	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/markdown/resources/r_highlight.html	(revision 2477)
@@ -0,0 +1,39 @@
+<!-- Styles for R syntax highlighter -->
+<style type="text/css">
+   pre .operator,
+   pre .paren {
+     color: rgb(104, 118, 135)
+   }
+
+   pre .literal {
+     color: #990073
+   }
+
+   pre .number {
+     color: #099;
+   }
+
+   pre .comment {
+     color: #998;
+     font-style: italic
+   }
+
+   pre .keyword {
+     color: #900;
+     font-weight: bold
+   }
+
+   pre .identifier {
+     color: rgb(0, 0, 0);
+   }
+
+   pre .string {
+     color: #d14;
+   }
+</style>
+
+<!-- R syntax highlighter -->
+<script type="text/javascript">
+var hljs=new function(){function m(p){return p.replace(/&/gm,"&amp;").replace(/</gm,"&lt;")}function f(r,q,p){return RegExp(q,"m"+(r.cI?"i":"")+(p?"g":""))}function b(r){for(var p=0;p<r.childNodes.length;p++){var q=r.childNodes[p];if(q.nodeName=="CODE"){return q}if(!(q.nodeType==3&&q.nodeValue.match(/\s+/))){break}}}function h(t,s){var p="";for(var r=0;r<t.childNodes.length;r++){if(t.childNodes[r].nodeType==3){var q=t.childNodes[r].nodeValue;if(s){q=q.replace(/\n/g,"")}p+=q}else{if(t.childNodes[r].nodeName=="BR"){p+="\n"}else{p+=h(t.childNodes[r])}}}if(/MSIE [678]/.test(navigator.userAgent)){p=p.replace(/\r/g,"\n")}return p}function a(s){var r=s.className.split(/\s+/);r=r.concat(s.parentNode.className.split(/\s+/));for(var q=0;q<r.length;q++){var p=r[q].replace(/^language-/,"");if(e[p]){return p}}}function c(q){var p=[];(function(s,t){for(var r=0;r<s.childNodes.length;r++){if(s.childNodes[r].nodeType==3){t+=s.childNodes[r].nodeValue.length}else{if(s.childNodes[r].nodeName=="BR"){t+=1}else{if(s.childNodes[r].nodeType==1){p.push({event:"start",offset:t,node:s.childNodes[r]});t=arguments.callee(s.childNodes[r],t);p.push({event:"stop",offset:t,node:s.childNodes[r]})}}}}return t})(q,0);return p}function k(y,w,x){var q=0;var z="";var s=[];function u(){if(y.length&&w.length){if(y[0].offset!=w[0].offset){return(y[0].offset<w[0].offset)?y:w}else{return w[0].event=="start"?y:w}}else{return y.length?y:w}}function t(D){var A="<"+D.nodeName.toLowerCase();for(var B=0;B<D.attributes.length;B++){var C=D.attributes[B];A+=" "+C.nodeName.toLowerCase();if(C.value!==undefined&&C.value!==false&&C.value!==null){A+='="'+m(C.value)+'"'}}return A+">"}while(y.length||w.length){var v=u().splice(0,1)[0];z+=m(x.substr(q,v.offset-q));q=v.offset;if(v.event=="start"){z+=t(v.node);s.push(v.node)}else{if(v.event=="stop"){var p,r=s.length;do{r--;p=s[r];z+=("</"+p.nodeName.toLowerCase()+">")}while(p!=v.node);s.splice(r,1);while(r<s.length){z+=t(s[r]);r++}}}}return z+m(x.substr(q))}function j(){function q(x,y,v){if(x.compiled){return}var u;var s=[];if(x.k){x.lR=f(y,x.l||hljs.IR,true);for(var w in x.k){if(!x.k.hasOwnProperty(w)){continue}if(x.k[w] instanceof Object){u=x.k[w]}else{u=x.k;w="keyword"}for(var r in u){if(!u.hasOwnProperty(r)){continue}x.k[r]=[w,u[r]];s.push(r)}}}if(!v){if(x.bWK){x.b="\\b("+s.join("|")+")\\s"}x.bR=f(y,x.b?x.b:"\\B|\\b");if(!x.e&&!x.eW){x.e="\\B|\\b"}if(x.e){x.eR=f(y,x.e)}}if(x.i){x.iR=f(y,x.i)}if(x.r===undefined){x.r=1}if(!x.c){x.c=[]}x.compiled=true;for(var t=0;t<x.c.length;t++){if(x.c[t]=="self"){x.c[t]=x}q(x.c[t],y,false)}if(x.starts){q(x.starts,y,false)}}for(var p in e){if(!e.hasOwnProperty(p)){continue}q(e[p].dM,e[p],true)}}function d(B,C){if(!j.called){j();j.called=true}function q(r,M){for(var L=0;L<M.c.length;L++){if((M.c[L].bR.exec(r)||[null])[0]==r){return M.c[L]}}}function v(L,r){if(D[L].e&&D[L].eR.test(r)){return 1}if(D[L].eW){var M=v(L-1,r);return M?M+1:0}return 0}function w(r,L){return L.i&&L.iR.test(r)}function K(N,O){var M=[];for(var L=0;L<N.c.length;L++){M.push(N.c[L].b)}var r=D.length-1;do{if(D[r].e){M.push(D[r].e)}r--}while(D[r+1].eW);if(N.i){M.push(N.i)}return f(O,M.join("|"),true)}function p(M,L){var N=D[D.length-1];if(!N.t){N.t=K(N,E)}N.t.lastIndex=L;var r=N.t.exec(M);return r?[M.substr(L,r.index-L),r[0],false]:[M.substr(L),"",true]}function z(N,r){var L=E.cI?r[0].toLowerCase():r[0];var M=N.k[L];if(M&&M instanceof Array){return M}return false}function F(L,P){L=m(L);if(!P.k){return L}var r="";var O=0;P.lR.lastIndex=0;var M=P.lR.exec(L);while(M){r+=L.substr(O,M.index-O);var N=z(P,M);if(N){x+=N[1];r+='<span class="'+N[0]+'">'+M[0]+"</span>"}else{r+=M[0]}O=P.lR.lastIndex;M=P.lR.exec(L)}return r+L.substr(O,L.length-O)}function J(L,M){if(M.sL&&e[M.sL]){var r=d(M.sL,L);x+=r.keyword_count;return r.value}else{return F(L,M)}}function I(M,r){var L=M.cN?'<span class="'+M.cN+'">':"";if(M.rB){y+=L;M.buffer=""}else{if(M.eB){y+=m(r)+L;M.buffer=""}else{y+=L;M.buffer=r}}D.push(M);A+=M.r}function G(N,M,Q){var R=D[D.length-1];if(Q){y+=J(R.buffer+N,R);return false}var P=q(M,R);if(P){y+=J(R.buffer+N,R);I(P,M);return P.rB}var L=v(D.length-1,M);if(L){var O=R.cN?"</span>":"";if(R.rE){y+=J(R.buffer+N,R)+O}else{if(R.eE){y+=J(R.buffer+N,R)+O+m(M)}else{y+=J(R.buffer+N+M,R)+O}}while(L>1){O=D[D.length-2].cN?"</span>":"";y+=O;L--;D.length--}var r=D[D.length-1];D.length--;D[D.length-1].buffer="";if(r.starts){I(r.starts,"")}return R.rE}if(w(M,R)){throw"Illegal"}}var E=e[B];var D=[E.dM];var A=0;var x=0;var y="";try{var s,u=0;E.dM.buffer="";do{s=p(C,u);var t=G(s[0],s[1],s[2]);u+=s[0].length;if(!t){u+=s[1].length}}while(!s[2]);if(D.length>1){throw"Illegal"}return{r:A,keyword_count:x,value:y}}catch(H){if(H=="Illegal"){return{r:0,keyword_count:0,value:m(C)}}else{throw H}}}function g(t){var p={keyword_count:0,r:0,value:m(t)};var r=p;for(var q in e){if(!e.hasOwnProperty(q)){continue}var s=d(q,t);s.language=q;if(s.keyword_count+s.r>r.keyword_count+r.r){r=s}if(s.keyword_count+s.r>p.keyword_count+p.r){r=p;p=s}}if(r.language){p.second_best=r}return p}function i(r,q,p){if(q){r=r.replace(/^((<[^>]+>|\t)+)/gm,function(t,w,v,u){return w.replace(/\t/g,q)})}if(p){r=r.replace(/\n/g,"<br>")}return r}function n(t,w,r){var x=h(t,r);var v=a(t);var y,s;if(v){y=d(v,x)}else{return}var q=c(t);if(q.length){s=document.createElement("pre");s.innerHTML=y.value;y.value=k(q,c(s),x)}y.value=i(y.value,w,r);var u=t.className;if(!u.match("(\\s|^)(language-)?"+v+"(\\s|$)")){u=u?(u+" "+v):v}if(/MSIE [678]/.test(navigator.userAgent)&&t.tagName=="CODE"&&t.parentNode.tagName=="PRE"){s=t.parentNode;var p=document.createElement("div");p.innerHTML="<pre><code>"+y.value+"</code></pre>";t=p.firstChild.firstChild;p.firstChild.cN=s.cN;s.parentNode.replaceChild(p.firstChild,s)}else{t.innerHTML=y.value}t.className=u;t.result={language:v,kw:y.keyword_count,re:y.r};if(y.second_best){t.second_best={language:y.second_best.language,kw:y.second_best.keyword_count,re:y.second_best.r}}}function o(){if(o.called){return}o.called=true;var r=document.getElementsByTagName("pre");for(var p=0;p<r.length;p++){var q=b(r[p]);if(q){n(q,hljs.tabReplace)}}}function l(){if(window.addEventListener){window.addEventListener("DOMContentLoaded",o,false);window.addEventListener("load",o,false)}else{if(window.attachEvent){window.attachEvent("onload",o)}else{window.onload=o}}}var e={};this.LANGUAGES=e;this.highlight=d;this.highlightAuto=g;this.fixMarkup=i;this.highlightBlock=n;this.initHighlighting=o;this.initHighlightingOnLoad=l;this.IR="[a-zA-Z][a-zA-Z0-9_]*";this.UIR="[a-zA-Z_][a-zA-Z0-9_]*";this.NR="\\b\\d+(\\.\\d+)?";this.CNR="\\b(0[xX][a-fA-F0-9]+|(\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)";this.BNR="\\b(0b[01]+)";this.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|\\.|-|-=|/|/=|:|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~";this.ER="(?![\\s\\S])";this.BE={b:"\\\\.",r:0};this.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[this.BE],r:0};this.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[this.BE],r:0};this.CLCM={cN:"comment",b:"//",e:"$"};this.CBLCLM={cN:"comment",b:"/\\*",e:"\\*/"};this.HCM={cN:"comment",b:"#",e:"$"};this.NM={cN:"number",b:this.NR,r:0};this.CNM={cN:"number",b:this.CNR,r:0};this.BNM={cN:"number",b:this.BNR,r:0};this.inherit=function(r,s){var p={};for(var q in r){p[q]=r[q]}if(s){for(var q in s){p[q]=s[q]}}return p}}();hljs.LANGUAGES.cpp=function(){var a={keyword:{"false":1,"int":1,"float":1,"while":1,"private":1,"char":1,"catch":1,"export":1,virtual:1,operator:2,sizeof:2,dynamic_cast:2,typedef:2,const_cast:2,"const":1,struct:1,"for":1,static_cast:2,union:1,namespace:1,unsigned:1,"long":1,"throw":1,"volatile":2,"static":1,"protected":1,bool:1,template:1,mutable:1,"if":1,"public":1,friend:2,"do":1,"return":1,"goto":1,auto:1,"void":2,"enum":1,"else":1,"break":1,"new":1,extern:1,using:1,"true":1,"class":1,asm:1,"case":1,typeid:1,"short":1,reinterpret_cast:2,"default":1,"double":1,register:1,explicit:1,signed:1,typename:1,"try":1,"this":1,"switch":1,"continue":1,wchar_t:1,inline:1,"delete":1,alignof:1,char16_t:1,char32_t:1,constexpr:1,decltype:1,noexcept:1,nullptr:1,static_assert:1,thread_local:1,restrict:1,_Bool:1,complex:1},built_in:{std:1,string:1,cin:1,cout:1,cerr:1,clog:1,stringstream:1,istringstream:1,ostringstream:1,auto_ptr:1,deque:1,list:1,queue:1,stack:1,vector:1,map:1,set:1,bitset:1,multiset:1,multimap:1,unordered_set:1,unordered_map:1,unordered_multiset:1,unordered_multimap:1,array:1,shared_ptr:1}};return{dM:{k:a,i:"</",c:[hljs.CLCM,hljs.CBLCLM,hljs.QSM,{cN:"string",b:"'\\\\?.",e:"'",i:"."},{cN:"number",b:"\\b(\\d+(\\.\\d*)?|\\.\\d+)(u|U|l|L|ul|UL|f|F)"},hljs.CNM,{cN:"preprocessor",b:"#",e:"$"},{cN:"stl_container",b:"\\b(deque|list|queue|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<",e:">",k:a,r:10,c:["self"]}]}}}();hljs.LANGUAGES.r={dM:{c:[hljs.HCM,{cN:"number",b:"\\b0[xX][0-9a-fA-F]+[Li]?\\b",e:hljs.IMMEDIATE_RE,r:0},{cN:"number",b:"\\b\\d+(?:[eE][+\\-]?\\d*)?L\\b",e:hljs.IMMEDIATE_RE,r:0},{cN:"number",b:"\\b\\d+\\.(?!\\d)(?:i\\b)?",e:hljs.IMMEDIATE_RE,r:1},{cN:"number",b:"\\b\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b",e:hljs.IMMEDIATE_RE,r:0},{cN:"number",b:"\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b",e:hljs.IMMEDIATE_RE,r:1},{cN:"keyword",b:"(?:tryCatch|library|setGeneric|setGroupGeneric)\\b",e:hljs.IMMEDIATE_RE,r:10},{cN:"keyword",b:"\\.\\.\\.",e:hljs.IMMEDIATE_RE,r:10},{cN:"keyword",b:"\\.\\.\\d+(?![\\w.])",e:hljs.IMMEDIATE_RE,r:10},{cN:"keyword",b:"\\b(?:function)",e:hljs.IMMEDIATE_RE,r:2},{cN:"keyword",b:"(?:if|in|break|next|repeat|else|for|return|switch|while|try|stop|warning|require|attach|detach|source|setMethod|setClass)\\b",e:hljs.IMMEDIATE_RE,r:1},{cN:"literal",b:"(?:NA|NA_integer_|NA_real_|NA_character_|NA_complex_)\\b",e:hljs.IMMEDIATE_RE,r:10},{cN:"literal",b:"(?:NULL|TRUE|FALSE|T|F|Inf|NaN)\\b",e:hljs.IMMEDIATE_RE,r:1},{cN:"identifier",b:"[a-zA-Z.][a-zA-Z0-9._]*\\b",e:hljs.IMMEDIATE_RE,r:0},{cN:"operator",b:"<\\-(?!\\s*\\d)",e:hljs.IMMEDIATE_RE,r:2},{cN:"operator",b:"\\->|<\\-",e:hljs.IMMEDIATE_RE,r:1},{cN:"operator",b:"%%|~",e:hljs.IMMEDIATE_RE},{cN:"operator",b:">=|<=|==|!=|\\|\\||&&|=|\\+|\\-|\\*|/|\\^|>|<|!|&|\\||\\$|:",e:hljs.IMMEDIATE_RE,r:0},{cN:"operator",b:"%",e:"%",i:"\\n",r:1},{cN:"identifier",b:"`",e:"`",r:0},{cN:"string",b:'"',e:'"',c:[hljs.BE],r:0},{cN:"string",b:"'",e:"'",c:[hljs.BE],r:0},{cN:"paren",b:"[[({\\])}]",e:hljs.IMMEDIATE_RE,r:0}]}};
+hljs.initHighlightingOnLoad();
+</script>

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/markdown/resources/r_highlight.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/markdown/resources/mathjax.html
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/markdown/resources/mathjax.html	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/markdown/resources/mathjax.html	(revision 2477)
@@ -0,0 +1,4 @@
+<!-- MathJax scripts -->
+<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
+</script>
+

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/markdown/resources/mathjax.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/markdown/resources/markdown.html
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/markdown/resources/markdown.html	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/markdown/resources/markdown.html	(revision 2477)
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+
+<title>#!title#</title>
+
+<script type="text/javascript">
+window.onload = function() {
+  var imgs = document.getElementsByTagName('img'), i, img;
+  for (i = 0; i < imgs.length; i++) {
+    img = imgs[i];
+    // center an image if it is the only element of its parent
+    if (img.parentElement.childElementCount === 1)
+      img.parentElement.style.textAlign = 'center';
+  }
+};
+</script>
+
+#!r_highlight#
+
+#!mathjax#
+
+<style type="text/css">
+#!markdown_css#
+</style>
+
+#!header#
+
+</head>
+
+<body>
+#!html_output#
+</body>
+
+</html>

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/markdown/resources/markdown.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RSclient/R/RSclient
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RSclient/R/RSclient	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RSclient/R/RSclient	(revision 2477)
@@ -0,0 +1,27 @@
+#  File share/R/nspackloader.R
+#  Part of the R package, http://www.R-project.org
+#
+#  Copyright (C) 1995-2012 The R Core Team
+#
+#  This program is free software; you can redistribute it and/or modify
+#  it under the terms of the GNU General Public License as published by
+#  the Free Software Foundation; either version 2 of the License, or
+#  (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  A copy of the GNU General Public License is available at
+#  http://www.r-project.org/Licenses/
+
+local({
+    info <- loadingNamespaceInfo()
+    pkg <- info$pkgname
+    ns <- .getNamespace(as.name(pkg))
+    if (is.null(ns))
+        stop("cannot find namespace environment for ", pkg, domain = NA);
+    dbbase <- file.path(info$libname, pkg, "R", pkg)
+    lazyLoad(dbbase, ns, filter = function(n) n != ".__NAMESPACE__.")
+})
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RSclient/R/RSclient.rdb
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RSclient/R/RSclient.rdb
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RSclient/R/RSclient.rdx
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RSclient/R/RSclient.rdx
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RSclient/html/R.css
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RSclient/html/R.css	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RSclient/html/R.css	(revision 2477)
@@ -0,0 +1,97 @@
+body {
+    background: white;
+    color: black;
+}
+
+a:link {
+    background: white;
+    color: blue;
+}
+
+a:visited {
+    background: white;
+    color: rgb(50%, 0%, 50%);
+}
+
+h1 {
+    background: white;
+    color: rgb(55%, 55%, 55%);
+    font-family: monospace;
+    font-size: x-large;
+    text-align: center;
+}
+
+h2 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-size: large;
+    text-align: center;
+}
+
+h3 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-size: large;
+}
+
+h4 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-style: italic;
+    font-size: large;
+}
+
+h5 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+}
+
+h6 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-style: italic;
+}
+		
+img.toplogo {
+    width: 4em;
+    vertical-align: middle;
+}
+
+img.arrow {
+    width: 30px;
+    height: 30px;
+    border: 0;
+}
+
+span.acronym {
+    font-size: small;
+}
+
+span.env {
+    font-family: monospace;
+}
+
+span.file {
+    font-family: monospace;
+}
+
+span.option{
+    font-family: monospace;
+}
+
+span.pkg {
+    font-weight: bold;
+}
+
+span.samp{
+    font-family: monospace;
+}
+
+div.vignettes a:hover {
+    background: rgb(85%, 85%, 85%);
+}

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RSclient/html/R.css
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RSclient/html/00Index.html
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RSclient/html/00Index.html	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RSclient/html/00Index.html	(revision 2477)
@@ -0,0 +1,85 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title>R: Client for Rserve</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<link rel="stylesheet" type="text/css" href="R.css" />
+</head><body>
+<h1> Client for Rserve
+<img class="toplogo" src="../../../doc/html/Rlogo.svg" alt="[R logo]" />
+</h1>
+<hr/>
+<div style="text-align: center;">
+<a href="../../../doc/html/packages.html"><img class="arrow" src="../../../doc/html/left.jpg" alt="[Up]" /></a>
+<a href="../../../doc/html/index.html"><img class="arrow" src="../../../doc/html/up.jpg" alt="[Top]" /></a>
+</div><h2>Documentation for package &lsquo;RSclient&rsquo; version 0.7-3</h2>
+
+<ul><li><a href="../DESCRIPTION">DESCRIPTION file</a>.</li>
+<li><a href="../NEWS">Package NEWS</a>.</li>
+</ul>
+
+<h2>Help Pages</h2>
+
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="RC-methods.html">!=.RserveConnection</a></td>
+<td>Methods for the RserveConnection class</td></tr>
+<tr><td style="width: 25%;"><a href="RC-methods.html">==.RserveConnection</a></td>
+<td>Methods for the RserveConnection class</td></tr>
+<tr><td style="width: 25%;"><a href="RC-methods.html">print.RserveConnection</a></td>
+<td>Methods for the RserveConnection class</td></tr>
+<tr><td style="width: 25%;"><a href="RC-methods.html">RC-methods</a></td>
+<td>Methods for the RserveConnection class</td></tr>
+<tr><td style="width: 25%;"><a href="RCC.html">RCC</a></td>
+<td>Functions to talk to an Rserve instance (new version)</td></tr>
+<tr><td style="width: 25%;"><a href="Rclient.html">Rclient</a></td>
+<td>Functions to talk to an Rserve</td></tr>
+<tr><td style="width: 25%;"><a href="RCC.html">RS.assign</a></td>
+<td>Functions to talk to an Rserve instance (new version)</td></tr>
+<tr><td style="width: 25%;"><a href="RCC.html">RS.authkey</a></td>
+<td>Functions to talk to an Rserve instance (new version)</td></tr>
+<tr><td style="width: 25%;"><a href="RCC.html">RS.close</a></td>
+<td>Functions to talk to an Rserve instance (new version)</td></tr>
+<tr><td style="width: 25%;"><a href="RCC.html">RS.collect</a></td>
+<td>Functions to talk to an Rserve instance (new version)</td></tr>
+<tr><td style="width: 25%;"><a href="RCC.html">RS.connect</a></td>
+<td>Functions to talk to an Rserve instance (new version)</td></tr>
+<tr><td style="width: 25%;"><a href="RCC.html">RS.eval</a></td>
+<td>Functions to talk to an Rserve instance (new version)</td></tr>
+<tr><td style="width: 25%;"><a href="RCC.html">RS.eval.qap</a></td>
+<td>Functions to talk to an Rserve instance (new version)</td></tr>
+<tr><td style="width: 25%;"><a href="RCC.html">RS.login</a></td>
+<td>Functions to talk to an Rserve instance (new version)</td></tr>
+<tr><td style="width: 25%;"><a href="RCC.html">RS.oobCallbacks</a></td>
+<td>Functions to talk to an Rserve instance (new version)</td></tr>
+<tr><td style="width: 25%;"><a href="RCC.html">RS.server.eval</a></td>
+<td>Functions to talk to an Rserve instance (new version)</td></tr>
+<tr><td style="width: 25%;"><a href="RCC.html">RS.server.shutdown</a></td>
+<td>Functions to talk to an Rserve instance (new version)</td></tr>
+<tr><td style="width: 25%;"><a href="RCC.html">RS.server.source</a></td>
+<td>Functions to talk to an Rserve instance (new version)</td></tr>
+<tr><td style="width: 25%;"><a href="RCC.html">RS.switch</a></td>
+<td>Functions to talk to an Rserve instance (new version)</td></tr>
+<tr><td style="width: 25%;"><a href="Rclient.html">RSassign</a></td>
+<td>Functions to talk to an Rserve</td></tr>
+<tr><td style="width: 25%;"><a href="Rclient.html">RSattach</a></td>
+<td>Functions to talk to an Rserve</td></tr>
+<tr><td style="width: 25%;"><a href="Rclient.html">RSclose</a></td>
+<td>Functions to talk to an Rserve</td></tr>
+<tr><td style="width: 25%;"><a href="Rclient.html">RSconnect</a></td>
+<td>Functions to talk to an Rserve</td></tr>
+<tr><td style="width: 25%;"><a href="Rclient.html">RSdetach</a></td>
+<td>Functions to talk to an Rserve</td></tr>
+<tr><td style="width: 25%;"><a href="Rclient.html">RSeval</a></td>
+<td>Functions to talk to an Rserve</td></tr>
+<tr><td style="width: 25%;"><a href="Rclient.html">RSevalDetach</a></td>
+<td>Functions to talk to an Rserve</td></tr>
+<tr><td style="width: 25%;"><a href="Rclient.html">RSlogin</a></td>
+<td>Functions to talk to an Rserve</td></tr>
+<tr><td style="width: 25%;"><a href="Rclient.html">RSserverEval</a></td>
+<td>Functions to talk to an Rserve</td></tr>
+<tr><td style="width: 25%;"><a href="Rclient.html">RSserverSource</a></td>
+<td>Functions to talk to an Rserve</td></tr>
+<tr><td style="width: 25%;"><a href="Rclient.html">RSshutdown</a></td>
+<td>Functions to talk to an Rserve</td></tr>
+</table>
+</body></html>

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RSclient/html/00Index.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RSclient/Meta/package.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RSclient/Meta/package.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RSclient/Meta/nsInfo.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RSclient/Meta/nsInfo.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RSclient/Meta/hsearch.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RSclient/Meta/hsearch.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RSclient/Meta/links.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RSclient/Meta/links.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RSclient/Meta/Rd.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RSclient/Meta/Rd.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RSclient/help/AnIndex
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RSclient/help/AnIndex	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RSclient/help/AnIndex	(revision 2477)
@@ -0,0 +1,30 @@
+!=.RserveConnection	RC-methods
+==.RserveConnection	RC-methods
+print.RserveConnection	RC-methods
+RC-methods	RC-methods
+RCC	RCC
+Rclient	Rclient
+RS.assign	RCC
+RS.authkey	RCC
+RS.close	RCC
+RS.collect	RCC
+RS.connect	RCC
+RS.eval	RCC
+RS.eval.qap	RCC
+RS.login	RCC
+RS.oobCallbacks	RCC
+RS.server.eval	RCC
+RS.server.shutdown	RCC
+RS.server.source	RCC
+RS.switch	RCC
+RSassign	Rclient
+RSattach	Rclient
+RSclose	Rclient
+RSconnect	Rclient
+RSdetach	Rclient
+RSeval	Rclient
+RSevalDetach	Rclient
+RSlogin	Rclient
+RSserverEval	Rclient
+RSserverSource	Rclient
+RSshutdown	Rclient
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RSclient/help/paths.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RSclient/help/paths.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RSclient/help/aliases.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RSclient/help/aliases.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RSclient/help/RSclient.rdb
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RSclient/help/RSclient.rdb
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RSclient/help/RSclient.rdx
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RSclient/help/RSclient.rdx
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RSclient/libs/RSclient.so.dSYM/Contents/Info.plist
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RSclient/libs/RSclient.so.dSYM/Contents/Info.plist	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RSclient/libs/RSclient.so.dSYM/Contents/Info.plist	(revision 2477)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+	<dict>
+		<key>CFBundleDevelopmentRegion</key>
+		<string>English</string>
+		<key>CFBundleIdentifier</key>
+		<string>com.apple.xcode.dsym.RSclient.so</string>
+		<key>CFBundleInfoDictionaryVersion</key>
+		<string>6.0</string>
+		<key>CFBundlePackageType</key>
+		<string>dSYM</string>
+		<key>CFBundleSignature</key>
+		<string>????</string>
+		<key>CFBundleShortVersionString</key>
+		<string>1.0</string>
+		<key>CFBundleVersion</key>
+		<string>1</string>
+	</dict>
+</plist>
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RSclient/libs/RSclient.so.dSYM/Contents/Resources/DWARF/RSclient.so
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RSclient/libs/RSclient.so.dSYM/Contents/Resources/DWARF/RSclient.so
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mime/R/mime.rdx
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mime/R/mime.rdx
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mime/R/mime
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mime/R/mime	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mime/R/mime	(revision 2477)
@@ -0,0 +1,27 @@
+#  File share/R/nspackloader.R
+#  Part of the R package, http://www.R-project.org
+#
+#  Copyright (C) 1995-2012 The R Core Team
+#
+#  This program is free software; you can redistribute it and/or modify
+#  it under the terms of the GNU General Public License as published by
+#  the Free Software Foundation; either version 2 of the License, or
+#  (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  A copy of the GNU General Public License is available at
+#  http://www.r-project.org/Licenses/
+
+local({
+    info <- loadingNamespaceInfo()
+    pkg <- info$pkgname
+    ns <- .getNamespace(as.name(pkg))
+    if (is.null(ns))
+        stop("cannot find namespace environment for ", pkg, domain = NA);
+    dbbase <- file.path(info$libname, pkg, "R", pkg)
+    lazyLoad(dbbase, ns, filter = function(n) n != ".__NAMESPACE__.")
+})
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mime/R/mime.rdb
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mime/R/mime.rdb
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mime/Meta/package.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mime/Meta/package.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mime/Meta/nsInfo.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mime/Meta/nsInfo.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mime/Meta/hsearch.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mime/Meta/hsearch.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mime/Meta/links.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mime/Meta/links.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mime/Meta/Rd.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mime/Meta/Rd.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mime/help/mime.rdb
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mime/help/mime.rdb
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mime/help/mime.rdx
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mime/help/mime.rdx
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mime/help/AnIndex
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mime/help/AnIndex	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mime/help/AnIndex	(revision 2477)
@@ -0,0 +1,4 @@
+guess_type	guess_type
+mimeextra	mimemap
+mimemap	mimemap
+parse_multipart	parse_multipart
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mime/help/paths.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mime/help/paths.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mime/help/aliases.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mime/help/aliases.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mime/libs/mime.so.dSYM/Contents/Resources/DWARF/mime.so
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mime/libs/mime.so.dSYM/Contents/Resources/DWARF/mime.so
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mime/libs/mime.so.dSYM/Contents/Info.plist
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mime/libs/mime.so.dSYM/Contents/Info.plist	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mime/libs/mime.so.dSYM/Contents/Info.plist	(revision 2477)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+	<dict>
+		<key>CFBundleDevelopmentRegion</key>
+		<string>English</string>
+		<key>CFBundleIdentifier</key>
+		<string>com.apple.xcode.dsym.mime.so</string>
+		<key>CFBundleInfoDictionaryVersion</key>
+		<string>6.0</string>
+		<key>CFBundlePackageType</key>
+		<string>dSYM</string>
+		<key>CFBundleSignature</key>
+		<string>????</string>
+		<key>CFBundleShortVersionString</key>
+		<string>1.0</string>
+		<key>CFBundleVersion</key>
+		<string>1</string>
+	</dict>
+</plist>
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/doc/regular-expressions.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/doc/regular-expressions.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/doc/regular-expressions.R	(revision 2477)
@@ -0,0 +1,152 @@
+## ----setup, include = FALSE----------------------------------------------
+knitr::opts_chunk$set(
+  collapse = TRUE,
+  comment = "#>"
+)
+library(stringr)
+
+## ---- eval = FALSE-------------------------------------------------------
+#  # The regular call:
+#  str_extract(fruit, "nana")
+#  # Is shorthand for
+#  str_extract(fruit, regex("nana"))
+
+## ------------------------------------------------------------------------
+x <- c("apple", "banana", "pear")
+str_extract(x, "an")
+
+## ------------------------------------------------------------------------
+bananas <- c("banana", "Banana", "BANANA")
+str_detect(bananas, "banana")
+str_detect(bananas, regex("banana", ignore_case = TRUE))
+
+## ------------------------------------------------------------------------
+str_extract(x, ".a.")
+
+## ------------------------------------------------------------------------
+str_detect("\nX\n", ".X.")
+str_detect("\nX\n", regex(".X.", dotall = TRUE))
+
+## ------------------------------------------------------------------------
+# To create the regular expression, we need \\
+dot <- "\\."
+
+# But the expression itself only contains one:
+writeLines(dot)
+
+# And this tells R to look for an explicit .
+str_extract(c("abc", "a.c", "bef"), "a\\.c")
+
+## ------------------------------------------------------------------------
+x <- "a\\b"
+writeLines(x)
+
+str_extract(x, "\\\\")
+
+## ------------------------------------------------------------------------
+x <- c("a.b.c.d", "aeb")
+starts_with <- "a.b"
+
+str_detect(x, paste0("^", starts_with))
+str_detect(x, paste0("^\\Q", starts_with, "\\E"))
+
+## ------------------------------------------------------------------------
+x <- "a\u0301"
+str_extract(x, ".")
+str_extract(x, "\\X")
+
+## ------------------------------------------------------------------------
+str_extract_all("1 + 2 = 3", "\\d+")[[1]]
+
+## ------------------------------------------------------------------------
+# Some Laotian numbers
+str_detect("១២៣", "\\d")
+
+## ------------------------------------------------------------------------
+(text <- "Some  \t badly\n\t\tspaced \f text")
+str_replace_all(text, "\\s+", " ")
+
+## ------------------------------------------------------------------------
+(text <- c('"Double quotes"', "«Guillemet»", "“Fancy quotes”"))
+str_replace_all(text, "\\p{quotation mark}", "'")
+
+## ------------------------------------------------------------------------
+str_extract_all("Don't eat that!", "\\w+")[[1]]
+str_split("Don't eat that!", "\\W")[[1]]
+
+## ------------------------------------------------------------------------
+str_replace_all("The quick brown fox", "\\b", "_")
+str_replace_all("The quick brown fox", "\\B", "_")
+
+## ------------------------------------------------------------------------
+str_detect(c("abc", "def", "ghi"), "abc|def")
+
+## ------------------------------------------------------------------------
+str_extract(c("grey", "gray"), "gre|ay")
+str_extract(c("grey", "gray"), "gr(e|a)y")
+
+## ------------------------------------------------------------------------
+pattern <- "(..)\\1"
+fruit %>% 
+  str_subset(pattern)
+
+fruit %>% 
+  str_subset(pattern) %>% 
+  str_match(pattern)
+
+## ------------------------------------------------------------------------
+str_match(c("grey", "gray"), "gr(e|a)y")
+str_match(c("grey", "gray"), "gr(?:e|a)y")
+
+## ------------------------------------------------------------------------
+x <- c("apple", "banana", "pear")
+str_extract(x, "^a")
+str_extract(x, "a$")
+
+## ------------------------------------------------------------------------
+x <- "Line 1\nLine 2\nLine 3\n"
+str_extract_all(x, "^Line..")[[1]]
+str_extract_all(x, regex("^Line..", multiline = TRUE))[[1]]
+str_extract_all(x, regex("\\ALine..", multiline = TRUE))[[1]]
+
+## ------------------------------------------------------------------------
+x <- "1888 is the longest year in Roman numerals: MDCCCLXXXVIII"
+str_extract(x, "CC?")
+str_extract(x, "CC+")
+str_extract(x, 'C[LX]+')
+
+## ------------------------------------------------------------------------
+str_extract(x, "C{2}")
+str_extract(x, "C{2,}")
+str_extract(x, "C{2,3}")
+
+## ------------------------------------------------------------------------
+str_extract(x, c("C{2,3}", "C{2,3}?"))
+str_extract(x, c("C[LX]+", "C[LX]+?"))
+
+## ------------------------------------------------------------------------
+str_detect("ABC", "(?>A|.B)C")
+str_detect("ABC", "(?:A|.B)C")
+
+## ------------------------------------------------------------------------
+x <- c("1 piece", "2 pieces", "3")
+str_extract(x, "\\d+(?= pieces?)")
+
+y <- c("100", "$400")
+str_extract(y, "(?<=\\$)\\d+")
+
+## ------------------------------------------------------------------------
+str_detect("xyz", "x(?#this is a comment)")
+
+## ------------------------------------------------------------------------
+phone <- regex("
+  \\(?     # optional opening parens
+  (\\d{3}) # area code
+  [)- ]?   # optional closing parens, dash, or space
+  (\\d{3}) # another three numbers
+  [ -]?    # optional space or dash
+  (\\d{3}) # three more numbers
+  ", comments = TRUE)
+
+str_match("514-791-8141", phone)
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/doc/regular-expressions.Rmd
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/doc/regular-expressions.Rmd	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/doc/regular-expressions.Rmd	(revision 2477)
@@ -0,0 +1,415 @@
+---
+title: "Regular expressions"
+output: rmarkdown::html_vignette
+vignette: >
+  %\VignetteIndexEntry{Regular expressions}
+  %\VignetteEngine{knitr::rmarkdown}
+  %\VignetteEncoding{UTF-8}
+---
+
+```{r setup, include = FALSE}
+knitr::opts_chunk$set(
+  collapse = TRUE,
+  comment = "#>"
+)
+library(stringr)
+```
+
+Regular expressions are a concise and flexible tool for describing patterns in strings. This vignette describes the key features of stringr's regular expressions, as implemented by [stringi](https://github.com/gagolews/stringi). It is not a tutorial, so if you're unfamiliar regular expressions, I'd recommend starting at <http://r4ds.had.co.nz/strings.html>. If you want to master the details, I'd recommend reading the classic [_Mastering Regular Expressions_](https://amzn.com/0596528124) by Jeffrey E. F. Fried. 
+
+Regular expressions are the default pattern engine in stringr. That means when you use a pattern matching function with a bare string, it's equivalent to wrapping it in a call to `regex()`:
+
+```{r, eval = FALSE}
+# The regular call:
+str_extract(fruit, "nana")
+# Is shorthand for
+str_extract(fruit, regex("nana"))
+```
+
+You will need to use `regex()` explicitly if you want to override the default options, as you'll see in examples below.
+
+## Basic matches
+
+The simplest patterns match exact strings:
+
+```{r}
+x <- c("apple", "banana", "pear")
+str_extract(x, "an")
+```
+
+You can perform a case-insensitive match using `ignore_case = TRUE`:
+    
+```{r}
+bananas <- c("banana", "Banana", "BANANA")
+str_detect(bananas, "banana")
+str_detect(bananas, regex("banana", ignore_case = TRUE))
+```
+
+The next step up in complexity is `.`, which matches any character except a newline:
+
+```{r}
+str_extract(x, ".a.")
+```
+
+You can allow `.` to match everything, including `\n`, by setting `dotall = TRUE`:
+
+```{r}
+str_detect("\nX\n", ".X.")
+str_detect("\nX\n", regex(".X.", dotall = TRUE))
+```
+
+## Escaping
+
+If "`.`" matches any character, how do you match a literal "`.`"? You need to use an "escape" to tell the regular expression you want to match it exactly, not use its special behaviour. Like strings, regexps use the backslash, `\`, to escape special behaviour. So to match an `.`, you need the regexp `\.`. Unfortunately this creates a problem. We use strings to represent regular expressions, and `\` is also used as an escape symbol in strings. So to create the regular expression `\.` we need the string `"\\."`. 
+
+```{r}
+# To create the regular expression, we need \\
+dot <- "\\."
+
+# But the expression itself only contains one:
+writeLines(dot)
+
+# And this tells R to look for an explicit .
+str_extract(c("abc", "a.c", "bef"), "a\\.c")
+```
+
+If `\` is used as an escape character in regular expressions, how do you match a literal `\`? Well you need to escape it, creating the regular expression `\\`. To create that regular expression, you need to use a string, which also needs to escape `\`. That means to match a literal `\` you need to write `"\\\\"` --- you need four backslashes to match one!
+
+```{r}
+x <- "a\\b"
+writeLines(x)
+
+str_extract(x, "\\\\")
+```
+
+In this vignette, I use `\.` to denote the regular expression, and `"\\."` to denote the string that represents the regular expression.
+
+An alternative quoting mechanism is `\Q...\E`: all the characters in `...` are treated as exact matches. This is useful if you want to exactly match user input as part of a regular expression.
+
+```{r}
+x <- c("a.b.c.d", "aeb")
+starts_with <- "a.b"
+
+str_detect(x, paste0("^", starts_with))
+str_detect(x, paste0("^\\Q", starts_with, "\\E"))
+```
+
+## Special characters
+
+Escapes also allow you to specify individual characters that are otherwise hard to type. You can specify individual unicode characters in five ways, either as a variable number of hex digits (four is most common), or by name:
+
+* `\xhh`: 2 hex digits.
+
+* `\x{hhhh}`: 1-6 hex digits.
+
+* `\uhhhh`: 4 hex digits.
+
+* `\Uhhhhhhhh`: 8 hex digits.
+
+* `\N{name}`, e.g. `\N{grinning face}` matches the basic smiling emoji.
+
+Similarly, you can specify many common control characters:
+
+* `\a`: bell.
+
+* `\cX`: match a control-X character.
+
+* `\e`: escape  (`\u001B`).
+
+* `\f`: form feed (`\u000C`).
+
+* `\n`: line feed (`\u000A`).
+
+* `\r`: carriage return (`\u000D`).
+
+* `\t`: horizontal tabulation (`\u0009`).
+
+* `\0ooo` match an octal character. 'ooo' is from one to three octal digits, 
+  from 000 to 0377. The leading zero is required.
+
+(Many of these are only of historical interest and are only included here for the sake of completeness.)
+
+## Matching multiple characters
+
+There are a number of patterns that match more than one character. You've already seen `.`, which matches any character (except a newline). A closely related operator is `\X`, which matches a __grapheme cluster__, a set of individual elements that form a single symbol. For example, one way of representing "á" is as the letter "a" plus an accent: `.` will match the component "a", while `\X` will match the complete symbol:
+    
+```{r}
+x <- "a\u0301"
+str_extract(x, ".")
+str_extract(x, "\\X")
+```
+
+There are five other escaped pairs that match narrower classes of characters:
+   
+*   `\d`: matches any digit. The complement, `\D`, matches any character that 
+    is not a decimal digit.
+
+    ```{r}
+    str_extract_all("1 + 2 = 3", "\\d+")[[1]]
+    ```
+
+    Technically, `\d` includes any character in the Unicode Category of Nd 
+    ("Number, Decimal Digit"), which also includes numeric symbols from other 
+    languages:
+    
+    ```{r}
+    # Some Laotian numbers
+    str_detect("១២៣", "\\d")
+    ```
+    
+*   `\s`: matches any whitespace. This includes tabs, newlines, form feeds, 
+    and any character in the Unicode Z Category (which includes a variety of 
+    space characters and other separators.). The complement, `\S`, matches any
+    non-whitespace character.
+    
+    ```{r}
+    (text <- "Some  \t badly\n\t\tspaced \f text")
+    str_replace_all(text, "\\s+", " ")
+    ```
+
+*   `\p{property name}` matches any character with specific unicode property,
+    like `\p{Uppercase}` or `\p{Diacritic}`. The complement, 
+    `\P{property name}`, matches all characters without the property.
+    A complete list of unicode properties can be found at
+    <http://www.unicode.org/reports/tr44/#Property_Index>.
+    
+    ```{r}
+    (text <- c('"Double quotes"', "«Guillemet»", "“Fancy quotes”"))
+    str_replace_all(text, "\\p{quotation mark}", "'")
+    ```
+
+*   `\w` matches any "word" character, which includes alphabetic characters, 
+    marks and decimal numbers. The complement, `\W`, matches any non-word
+    character.
+    
+    ```{r}
+    str_extract_all("Don't eat that!", "\\w+")[[1]]
+    str_split("Don't eat that!", "\\W")[[1]]
+    ```
+    
+    Technically, `\w` also matches connector punctuation, `\u200c` (zero width
+    connector), and `\u200d` (zero width joiner), but these are rarely seen in
+    the wild.
+
+*   `\b` matches word boundaries, the transition between word and non-word 
+    characters. `\B` matches the opposite: boundaries that have either both
+    word or non-word characters on either side.
+    
+    ```{r}
+    str_replace_all("The quick brown fox", "\\b", "_")
+    str_replace_all("The quick brown fox", "\\B", "_")
+    ```
+
+You can also create your own __character classes__ using `[]`:
+
+* `[abc]`: matches a, b, or c.
+* `[a-z]`: matches every character between a and z 
+   (in Unicode code point order).
+* `[^abc]`: matches anything except a, b, or c.
+* `[\^\-]`: matches `-` or `\`.
+
+There are a number of pre-built classes that you can use inside `[]`:
+
+* `[:punct:]`: punctuation.
+* `[:alpha:]`: letters.
+* `[:lower:]`: lowercase letters.
+* `[:upper:]`: upperclass letters.
+* `[:digit:]`: digits.
+* `[:xdigit:]`: hex digits.
+* `[:alnum:]`: letters and numbers.
+* `[:cntrl:]`: control characters.
+* `[:graph:]`: letters, numbers, and punctuation.
+* `[:print:]`: letters, numbers, punctuation, and whitespace.
+* `[:space:]`: space characters (basically equivalent to `\s`).
+* `[:blank:]`: space and tab.
+
+These all go inside the `[]` for character classes, i.e. `[[:digit:]AX]` matches all digits, A, and X.
+
+You can also using Unicode properties, like `[\p{Letter}]`, and various set operations, like `[\p{Letter}--\p{script=latin}]`. See `?"stringi-search-charclass"` for details.
+
+## Alternation
+
+`|` is the __alternation__ operator, which will pick between one or more possible matches. For example, `abc|def` will match `abc` or `def`. 
+
+```{r}
+str_detect(c("abc", "def", "ghi"), "abc|def")
+```
+
+Note that the precedence for `|` is low, so that `abc|def` matches `abc` or `def` not `abcyz` or `abxyz`. 
+
+## Grouping
+
+You can use parentheses to override the default precedence rules:
+
+```{r}
+str_extract(c("grey", "gray"), "gre|ay")
+str_extract(c("grey", "gray"), "gr(e|a)y")
+```
+
+Parenthesis also define "groups" that you can refer to with __backreferences__, like `\1`, `\2` etc, and can be extracted with `str_match()`. For example, the following regular expression finds all fruits that have a repeated pair of letters:
+
+```{r}
+pattern <- "(..)\\1"
+fruit %>% 
+  str_subset(pattern)
+
+fruit %>% 
+  str_subset(pattern) %>% 
+  str_match(pattern)
+```
+
+You can use `(?:...)`, the non-grouping parentheses, to control precedence but not capture the match in a group. This is slightly more efficient than capturing parentheses.
+
+```{r}
+str_match(c("grey", "gray"), "gr(e|a)y")
+str_match(c("grey", "gray"), "gr(?:e|a)y")
+```
+
+This is most useful for more complex cases where you need to capture matches and control precedence independently.
+
+## Anchors
+
+By default, regular expressions will match any part of a string. It's often useful to __anchor__ the regular expression so that it matches from the start or end of the string:
+
+* `^` matches the start of string. 
+* `$` matches the end of the string.
+
+```{r}
+x <- c("apple", "banana", "pear")
+str_extract(x, "^a")
+str_extract(x, "a$")
+```
+
+To match a literal "$" or "^", you need to escape them, `\$`, and `\^`.
+
+For multiline strings, you can use `regex(multiline = TRUE)`. This changes the behaviour of `^` and `$`, and introduces three new operators:
+
+* `^` now matches the start of each line. 
+
+* `$` now matches the end of each line.
+
+* `\A` matches the start of the input.
+
+* `\z` matches the end of the input.
+
+* `\Z` matches the end of the input, but before the final line terminator, 
+  if it exists.
+
+```{r}
+x <- "Line 1\nLine 2\nLine 3\n"
+str_extract_all(x, "^Line..")[[1]]
+str_extract_all(x, regex("^Line..", multiline = TRUE))[[1]]
+str_extract_all(x, regex("\\ALine..", multiline = TRUE))[[1]]
+```
+
+## Repetition
+
+You can control how many times a pattern matches with the repetition operators:
+
+* `?`: 0 or 1.
+* `+`: 1 or more.
+* `*`: 0 or more.
+
+```{r}
+x <- "1888 is the longest year in Roman numerals: MDCCCLXXXVIII"
+str_extract(x, "CC?")
+str_extract(x, "CC+")
+str_extract(x, 'C[LX]+')
+```
+
+Note that the precedence of these operators is high, so you can write: `colou?r` to match either American or British spellings. That means most uses will need parentheses, like `bana(na)+`.
+
+You can also specify the number of matches precisely:
+
+* `{n}`: exactly n
+* `{n,}`: n or more
+* `{n,m}`: between n and m
+
+```{r}
+str_extract(x, "C{2}")
+str_extract(x, "C{2,}")
+str_extract(x, "C{2,3}")
+```
+
+By default these matches are "greedy": they will match the longest string possible. You can make them "lazy", matching the shortest string possible by putting a `?` after them:
+
+* `??`: 0 or 1, prefer 0.
+* `+?`: 1 or more, match as few times as possible.
+* `*?`: 0 or more, match as few times as possible.
+* `{n,}?`: n or more, match as few times as possible.
+* `{n,m}?`: between n and m, , match as few times as possible, but at least n.
+
+```{r}
+str_extract(x, c("C{2,3}", "C{2,3}?"))
+str_extract(x, c("C[LX]+", "C[LX]+?"))
+```
+
+You can also make the matches possessive, which means that if later parts of the match fail, the repetition will not be re-tried with a smaller number of characters. This is an advanced feature used to improve performance in worst-case scenarios (called "catastrophic backtracking").
+
+* `??`: 0 or 1, possessive.
+* `+?`: 1 or more, possessive.
+* `*?`: 0 or more, possessive.
+* `{n}?`: exactly n, possessive.
+* `{n,}?`: n or more, possessive.
+* `{n,m}?`: between n and m, possessive.
+
+A related concept is the __atomic-match__ parenthesis, `(?>...)`. If a later match fails and the engine needs to back-track, an atomic match is kept as is: it succeeds or fails as a whole. Compare the following two regular expressions:
+
+```{r}
+str_detect("ABC", "(?>A|.B)C")
+str_detect("ABC", "(?:A|.B)C")
+```
+
+The atomic match fails because it matches A, and then the next character is a C so it fails. The regular match suceeds because it matches A, but then C doesn't match, so it back-tracks and tries B instead.
+
+## Look arounds
+
+These assertions look ahead or behind the current match without "consuming" any characters (i.e. changing the input position).
+
+* `(?=...)`: positive look-ahead assertion. Matches if `...` matches at the 
+  current input.
+  
+* `(?!...)`: negative look-ahead assertion. Matches if `...` __does not__ 
+  matche at the current input.
+  
+* `(?<=...)`: positive look-behind assertion. Matches if `...` matches text 
+  preceding the current position, with the last character of the match 
+  being the character just before the current position. Length must be bounded  
+  (i.e. no `*` or `+`).
+
+* `(?<!...)`: negative look-behind assertion. Matches if `...` __does not__
+  match text preceding the current position. Length must be bounded  
+  (i.e. no `*` or `+`).
+
+These are useful when you want to check that a pattern exists, but you don't want to include it in the result:
+
+```{r}
+x <- c("1 piece", "2 pieces", "3")
+str_extract(x, "\\d+(?= pieces?)")
+
+y <- c("100", "$400")
+str_extract(y, "(?<=\\$)\\d+")
+```
+
+## Comments
+
+There are two ways to include comments in a regular expression. The first is with `(?#...)`:
+
+```{r}
+str_detect("xyz", "x(?#this is a comment)")
+```
+
+The second is to use `regex(comments = TRUE)`. This form ignores spaces and newlines, and anything everything after `#`. To match a literal space, you'll need to escape it: `"\\ "`. This is a useful way of describing complex regular expressions:
+
+```{r}
+phone <- regex("
+  \\(?     # optional opening parens
+  (\\d{3}) # area code
+  [)- ]?   # optional closing parens, dash, or space
+  (\\d{3}) # another three numbers
+  [ -]?    # optional space or dash
+  (\\d{3}) # three more numbers
+  ", comments = TRUE)
+
+str_match("514-791-8141", phone)
+```
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/doc/regular-expressions.html
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/doc/regular-expressions.html	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/doc/regular-expressions.html	(revision 2477)
@@ -0,0 +1,398 @@
+<!DOCTYPE html>
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+
+<meta charset="utf-8">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta name="generator" content="pandoc" />
+
+<meta name="viewport" content="width=device-width, initial-scale=1">
+
+
+
+<title>Regular expressions</title>
+
+
+
+<style type="text/css">code{white-space: pre;}</style>
+<style type="text/css">
+div.sourceCode { overflow-x: auto; }
+table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
+  margin: 0; padding: 0; vertical-align: baseline; border: none; }
+table.sourceCode { width: 100%; line-height: 100%; }
+td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
+td.sourceCode { padding-left: 5px; }
+code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
+code > span.dt { color: #902000; } /* DataType */
+code > span.dv { color: #40a070; } /* DecVal */
+code > span.bn { color: #40a070; } /* BaseN */
+code > span.fl { color: #40a070; } /* Float */
+code > span.ch { color: #4070a0; } /* Char */
+code > span.st { color: #4070a0; } /* String */
+code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
+code > span.ot { color: #007020; } /* Other */
+code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
+code > span.fu { color: #06287e; } /* Function */
+code > span.er { color: #ff0000; font-weight: bold; } /* Error */
+code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
+code > span.cn { color: #880000; } /* Constant */
+code > span.sc { color: #4070a0; } /* SpecialChar */
+code > span.vs { color: #4070a0; } /* VerbatimString */
+code > span.ss { color: #bb6688; } /* SpecialString */
+code > span.im { } /* Import */
+code > span.va { color: #19177c; } /* Variable */
+code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
+code > span.op { color: #666666; } /* Operator */
+code > span.bu { } /* BuiltIn */
+code > span.ex { } /* Extension */
+code > span.pp { color: #bc7a00; } /* Preprocessor */
+code > span.at { color: #7d9029; } /* Attribute */
+code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
+code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
+code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
+code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
+</style>
+
+
+
+<link href="data:text/css;charset=utf-8,body%20%7B%0Abackground%2Dcolor%3A%20%23fff%3B%0Amargin%3A%201em%20auto%3B%0Amax%2Dwidth%3A%20700px%3B%0Aoverflow%3A%20visible%3B%0Apadding%2Dleft%3A%202em%3B%0Apadding%2Dright%3A%202em%3B%0Afont%2Dfamily%3A%20%22Open%20Sans%22%2C%20%22Helvetica%20Neue%22%2C%20Helvetica%2C%20Arial%2C%20sans%2Dserif%3B%0Afont%2Dsize%3A%2014px%3B%0Aline%2Dheight%3A%201%2E35%3B%0A%7D%0A%23header%20%7B%0Atext%2Dalign%3A%20center%3B%0A%7D%0A%23TOC%20%7B%0Aclear%3A%20both%3B%0Amargin%3A%200%200%2010px%2010px%3B%0Apadding%3A%204px%3B%0Awidth%3A%20400px%3B%0Aborder%3A%201px%20solid%20%23CCCCCC%3B%0Aborder%2Dradius%3A%205px%3B%0Abackground%2Dcolor%3A%20%23f6f6f6%3B%0Afont%2Dsize%3A%2013px%3B%0Aline%2Dheight%3A%201%2E3%3B%0A%7D%0A%23TOC%20%2Etoctitle%20%7B%0Afont%2Dweight%3A%20bold%3B%0Afont%2Dsize%3A%2015px%3B%0Amargin%2Dleft%3A%205px%3B%0A%7D%0A%23TOC%20ul%20%7B%0Apadding%2Dleft%3A%2040px%3B%0Amargin%2Dleft%3A%20%2D1%2E5em%3B%0Amargin%2Dtop%3A%205px%3B%0Amargin%2Dbottom%3A%205px%3B%0A%7D%0A%23TOC%20ul%20ul%20%7B%0Amargin%2Dleft%3A%20%2D2em%3B%0A%7D%0A%23TOC%20li%20%7B%0Aline%2Dheight%3A%2016px%3B%0A%7D%0Atable%20%7B%0Amargin%3A%201em%20auto%3B%0Aborder%2Dwidth%3A%201px%3B%0Aborder%2Dcolor%3A%20%23DDDDDD%3B%0Aborder%2Dstyle%3A%20outset%3B%0Aborder%2Dcollapse%3A%20collapse%3B%0A%7D%0Atable%20th%20%7B%0Aborder%2Dwidth%3A%202px%3B%0Apadding%3A%205px%3B%0Aborder%2Dstyle%3A%20inset%3B%0A%7D%0Atable%20td%20%7B%0Aborder%2Dwidth%3A%201px%3B%0Aborder%2Dstyle%3A%20inset%3B%0Aline%2Dheight%3A%2018px%3B%0Apadding%3A%205px%205px%3B%0A%7D%0Atable%2C%20table%20th%2C%20table%20td%20%7B%0Aborder%2Dleft%2Dstyle%3A%20none%3B%0Aborder%2Dright%2Dstyle%3A%20none%3B%0A%7D%0Atable%20thead%2C%20table%20tr%2Eeven%20%7B%0Abackground%2Dcolor%3A%20%23f7f7f7%3B%0A%7D%0Ap%20%7B%0Amargin%3A%200%2E5em%200%3B%0A%7D%0Ablockquote%20%7B%0Abackground%2Dcolor%3A%20%23f6f6f6%3B%0Apadding%3A%200%2E25em%200%2E75em%3B%0A%7D%0Ahr%20%7B%0Aborder%2Dstyle%3A%20solid%3B%0Aborder%3A%20none%3B%0Aborder%2Dtop%3A%201px%20solid%20%23777%3B%0Amargin%3A%2028px%200%3B%0A%7D%0Adl%20%7B%0Amargin%2Dleft%3A%200%3B%0A%7D%0Adl%20dd%20%7B%0Amargin%2Dbottom%3A%2013px%3B%0Amargin%2Dleft%3A%2013px%3B%0A%7D%0Adl%20dt%20%7B%0Afont%2Dweight%3A%20bold%3B%0A%7D%0Aul%20%7B%0Amargin%2Dtop%3A%200%3B%0A%7D%0Aul%20li%20%7B%0Alist%2Dstyle%3A%20circle%20outside%3B%0A%7D%0Aul%20ul%20%7B%0Amargin%2Dbottom%3A%200%3B%0A%7D%0Apre%2C%20code%20%7B%0Abackground%2Dcolor%3A%20%23f7f7f7%3B%0Aborder%2Dradius%3A%203px%3B%0Acolor%3A%20%23333%3B%0Awhite%2Dspace%3A%20pre%2Dwrap%3B%20%0A%7D%0Apre%20%7B%0Aborder%2Dradius%3A%203px%3B%0Amargin%3A%205px%200px%2010px%200px%3B%0Apadding%3A%2010px%3B%0A%7D%0Apre%3Anot%28%5Bclass%5D%29%20%7B%0Abackground%2Dcolor%3A%20%23f7f7f7%3B%0A%7D%0Acode%20%7B%0Afont%2Dfamily%3A%20Consolas%2C%20Monaco%2C%20%27Courier%20New%27%2C%20monospace%3B%0Afont%2Dsize%3A%2085%25%3B%0A%7D%0Ap%20%3E%20code%2C%20li%20%3E%20code%20%7B%0Apadding%3A%202px%200px%3B%0A%7D%0Adiv%2Efigure%20%7B%0Atext%2Dalign%3A%20center%3B%0A%7D%0Aimg%20%7B%0Abackground%2Dcolor%3A%20%23FFFFFF%3B%0Apadding%3A%202px%3B%0Aborder%3A%201px%20solid%20%23DDDDDD%3B%0Aborder%2Dradius%3A%203px%3B%0Aborder%3A%201px%20solid%20%23CCCCCC%3B%0Amargin%3A%200%205px%3B%0A%7D%0Ah1%20%7B%0Amargin%2Dtop%3A%200%3B%0Afont%2Dsize%3A%2035px%3B%0Aline%2Dheight%3A%2040px%3B%0A%7D%0Ah2%20%7B%0Aborder%2Dbottom%3A%204px%20solid%20%23f7f7f7%3B%0Apadding%2Dtop%3A%2010px%3B%0Apadding%2Dbottom%3A%202px%3B%0Afont%2Dsize%3A%20145%25%3B%0A%7D%0Ah3%20%7B%0Aborder%2Dbottom%3A%202px%20solid%20%23f7f7f7%3B%0Apadding%2Dtop%3A%2010px%3B%0Afont%2Dsize%3A%20120%25%3B%0A%7D%0Ah4%20%7B%0Aborder%2Dbottom%3A%201px%20solid%20%23f7f7f7%3B%0Amargin%2Dleft%3A%208px%3B%0Afont%2Dsize%3A%20105%25%3B%0A%7D%0Ah5%2C%20h6%20%7B%0Aborder%2Dbottom%3A%201px%20solid%20%23ccc%3B%0Afont%2Dsize%3A%20105%25%3B%0A%7D%0Aa%20%7B%0Acolor%3A%20%230033dd%3B%0Atext%2Ddecoration%3A%20none%3B%0A%7D%0Aa%3Ahover%20%7B%0Acolor%3A%20%236666ff%3B%20%7D%0Aa%3Avisited%20%7B%0Acolor%3A%20%23800080%3B%20%7D%0Aa%3Avisited%3Ahover%20%7B%0Acolor%3A%20%23BB00BB%3B%20%7D%0Aa%5Bhref%5E%3D%22http%3A%22%5D%20%7B%0Atext%2Ddecoration%3A%20underline%3B%20%7D%0Aa%5Bhref%5E%3D%22https%3A%22%5D%20%7B%0Atext%2Ddecoration%3A%20underline%3B%20%7D%0A%0Acode%20%3E%20span%2Ekw%20%7B%20color%3A%20%23555%3B%20font%2Dweight%3A%20bold%3B%20%7D%20%0Acode%20%3E%20span%2Edt%20%7B%20color%3A%20%23902000%3B%20%7D%20%0Acode%20%3E%20span%2Edv%20%7B%20color%3A%20%2340a070%3B%20%7D%20%0Acode%20%3E%20span%2Ebn%20%7B%20color%3A%20%23d14%3B%20%7D%20%0Acode%20%3E%20span%2Efl%20%7B%20color%3A%20%23d14%3B%20%7D%20%0Acode%20%3E%20span%2Ech%20%7B%20color%3A%20%23d14%3B%20%7D%20%0Acode%20%3E%20span%2Est%20%7B%20color%3A%20%23d14%3B%20%7D%20%0Acode%20%3E%20span%2Eco%20%7B%20color%3A%20%23888888%3B%20font%2Dstyle%3A%20italic%3B%20%7D%20%0Acode%20%3E%20span%2Eot%20%7B%20color%3A%20%23007020%3B%20%7D%20%0Acode%20%3E%20span%2Eal%20%7B%20color%3A%20%23ff0000%3B%20font%2Dweight%3A%20bold%3B%20%7D%20%0Acode%20%3E%20span%2Efu%20%7B%20color%3A%20%23900%3B%20font%2Dweight%3A%20bold%3B%20%7D%20%20code%20%3E%20span%2Eer%20%7B%20color%3A%20%23a61717%3B%20background%2Dcolor%3A%20%23e3d2d2%3B%20%7D%20%0A" rel="stylesheet" type="text/css" />
+
+</head>
+
+<body>
+
+
+
+
+<h1 class="title toc-ignore">Regular expressions</h1>
+
+
+
+<p>Regular expressions are a concise and flexible tool for describing patterns in strings. This vignette describes the key features of stringr’s regular expressions, as implemented by <a href="https://github.com/gagolews/stringi">stringi</a>. It is not a tutorial, so if you’re unfamiliar regular expressions, I’d recommend starting at <a href="http://r4ds.had.co.nz/strings.html" class="uri">http://r4ds.had.co.nz/strings.html</a>. If you want to master the details, I’d recommend reading the classic <a href="https://amzn.com/0596528124"><em>Mastering Regular Expressions</em></a> by Jeffrey E. F. Fried.</p>
+<p>Regular expressions are the default pattern engine in stringr. That means when you use a pattern matching function with a bare string, it’s equivalent to wrapping it in a call to <code>regex()</code>:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="co"># The regular call:</span>
+<span class="kw">str_extract</span>(fruit, <span class="st">&quot;nana&quot;</span>)
+<span class="co"># Is shorthand for</span>
+<span class="kw">str_extract</span>(fruit, <span class="kw">regex</span>(<span class="st">&quot;nana&quot;</span>))</code></pre></div>
+<p>You will need to use <code>regex()</code> explicitly if you want to override the default options, as you’ll see in examples below.</p>
+<div id="basic-matches" class="section level2">
+<h2>Basic matches</h2>
+<p>The simplest patterns match exact strings:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">x &lt;-<span class="st"> </span><span class="kw">c</span>(<span class="st">&quot;apple&quot;</span>, <span class="st">&quot;banana&quot;</span>, <span class="st">&quot;pear&quot;</span>)
+<span class="kw">str_extract</span>(x, <span class="st">&quot;an&quot;</span>)
+<span class="co">#&gt; [1] NA   &quot;an&quot; NA</span></code></pre></div>
+<p>You can perform a case-insensitive match using <code>ignore_case = TRUE</code>:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">bananas &lt;-<span class="st"> </span><span class="kw">c</span>(<span class="st">&quot;banana&quot;</span>, <span class="st">&quot;Banana&quot;</span>, <span class="st">&quot;BANANA&quot;</span>)
+<span class="kw">str_detect</span>(bananas, <span class="st">&quot;banana&quot;</span>)
+<span class="co">#&gt; [1]  TRUE FALSE FALSE</span>
+<span class="kw">str_detect</span>(bananas, <span class="kw">regex</span>(<span class="st">&quot;banana&quot;</span>, <span class="dt">ignore_case =</span> <span class="ot">TRUE</span>))
+<span class="co">#&gt; [1] TRUE TRUE TRUE</span></code></pre></div>
+<p>The next step up in complexity is <code>.</code>, which matches any character except a newline:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">str_extract</span>(x, <span class="st">&quot;.a.&quot;</span>)
+<span class="co">#&gt; [1] NA    &quot;ban&quot; &quot;ear&quot;</span></code></pre></div>
+<p>You can allow <code>.</code> to match everything, including <code>\n</code>, by setting <code>dotall = TRUE</code>:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">str_detect</span>(<span class="st">&quot;</span><span class="ch">\n</span><span class="st">X</span><span class="ch">\n</span><span class="st">&quot;</span>, <span class="st">&quot;.X.&quot;</span>)
+<span class="co">#&gt; [1] FALSE</span>
+<span class="kw">str_detect</span>(<span class="st">&quot;</span><span class="ch">\n</span><span class="st">X</span><span class="ch">\n</span><span class="st">&quot;</span>, <span class="kw">regex</span>(<span class="st">&quot;.X.&quot;</span>, <span class="dt">dotall =</span> <span class="ot">TRUE</span>))
+<span class="co">#&gt; [1] TRUE</span></code></pre></div>
+</div>
+<div id="escaping" class="section level2">
+<h2>Escaping</h2>
+<p>If “<code>.</code>” matches any character, how do you match a literal “<code>.</code>”? You need to use an “escape” to tell the regular expression you want to match it exactly, not use its special behaviour. Like strings, regexps use the backslash, <code>\</code>, to escape special behaviour. So to match an <code>.</code>, you need the regexp <code>\.</code>. Unfortunately this creates a problem. We use strings to represent regular expressions, and <code>\</code> is also used as an escape symbol in strings. So to create the regular expression <code>\.</code> we need the string <code>&quot;\\.&quot;</code>.</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="co"># To create the regular expression, we need \\</span>
+dot &lt;-<span class="st"> &quot;</span><span class="ch">\\</span><span class="st">.&quot;</span>
+
+<span class="co"># But the expression itself only contains one:</span>
+<span class="kw">writeLines</span>(dot)
+<span class="co">#&gt; \.</span>
+
+<span class="co"># And this tells R to look for an explicit .</span>
+<span class="kw">str_extract</span>(<span class="kw">c</span>(<span class="st">&quot;abc&quot;</span>, <span class="st">&quot;a.c&quot;</span>, <span class="st">&quot;bef&quot;</span>), <span class="st">&quot;a</span><span class="ch">\\</span><span class="st">.c&quot;</span>)
+<span class="co">#&gt; [1] NA    &quot;a.c&quot; NA</span></code></pre></div>
+<p>If <code>\</code> is used as an escape character in regular expressions, how do you match a literal <code>\</code>? Well you need to escape it, creating the regular expression <code>\\</code>. To create that regular expression, you need to use a string, which also needs to escape <code>\</code>. That means to match a literal <code>\</code> you need to write <code>&quot;\\\\&quot;</code> — you need four backslashes to match one!</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">x &lt;-<span class="st"> &quot;a</span><span class="ch">\\</span><span class="st">b&quot;</span>
+<span class="kw">writeLines</span>(x)
+<span class="co">#&gt; a\b</span>
+
+<span class="kw">str_extract</span>(x, <span class="st">&quot;</span><span class="ch">\\\\</span><span class="st">&quot;</span>)
+<span class="co">#&gt; [1] &quot;\\&quot;</span></code></pre></div>
+<p>In this vignette, I use <code>\.</code> to denote the regular expression, and <code>&quot;\\.&quot;</code> to denote the string that represents the regular expression.</p>
+<p>An alternative quoting mechanism is <code>\Q...\E</code>: all the characters in <code>...</code> are treated as exact matches. This is useful if you want to exactly match user input as part of a regular expression.</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">x &lt;-<span class="st"> </span><span class="kw">c</span>(<span class="st">&quot;a.b.c.d&quot;</span>, <span class="st">&quot;aeb&quot;</span>)
+starts_with &lt;-<span class="st"> &quot;a.b&quot;</span>
+
+<span class="kw">str_detect</span>(x, <span class="kw">paste0</span>(<span class="st">&quot;^&quot;</span>, starts_with))
+<span class="co">#&gt; [1] TRUE TRUE</span>
+<span class="kw">str_detect</span>(x, <span class="kw">paste0</span>(<span class="st">&quot;^</span><span class="ch">\\</span><span class="st">Q&quot;</span>, starts_with, <span class="st">&quot;</span><span class="ch">\\</span><span class="st">E&quot;</span>))
+<span class="co">#&gt; [1]  TRUE FALSE</span></code></pre></div>
+</div>
+<div id="special-characters" class="section level2">
+<h2>Special characters</h2>
+<p>Escapes also allow you to specify individual characters that are otherwise hard to type. You can specify individual unicode characters in five ways, either as a variable number of hex digits (four is most common), or by name:</p>
+<ul>
+<li><p><code>\xhh</code>: 2 hex digits.</p></li>
+<li><p><code>\x{hhhh}</code>: 1-6 hex digits.</p></li>
+<li><p><code>\uhhhh</code>: 4 hex digits.</p></li>
+<li><p><code>\Uhhhhhhhh</code>: 8 hex digits.</p></li>
+<li><p><code>\N{name}</code>, e.g. <code>\N{grinning face}</code> matches the basic smiling emoji.</p></li>
+</ul>
+<p>Similarly, you can specify many common control characters:</p>
+<ul>
+<li><p><code>\a</code>: bell.</p></li>
+<li><p><code>\cX</code>: match a control-X character.</p></li>
+<li><p><code>\e</code>: escape (<code>\u001B</code>).</p></li>
+<li><p><code>\f</code>: form feed (<code>\u000C</code>).</p></li>
+<li><p><code>\n</code>: line feed (<code>\u000A</code>).</p></li>
+<li><p><code>\r</code>: carriage return (<code>\u000D</code>).</p></li>
+<li><p><code>\t</code>: horizontal tabulation (<code>\u0009</code>).</p></li>
+<li><p><code>\0ooo</code> match an octal character. ‘ooo’ is from one to three octal digits, from 000 to 0377. The leading zero is required.</p></li>
+</ul>
+<p>(Many of these are only of historical interest and are only included here for the sake of completeness.)</p>
+</div>
+<div id="matching-multiple-characters" class="section level2">
+<h2>Matching multiple characters</h2>
+<p>There are a number of patterns that match more than one character. You’ve already seen <code>.</code>, which matches any character (except a newline). A closely related operator is <code>\X</code>, which matches a <strong>grapheme cluster</strong>, a set of individual elements that form a single symbol. For example, one way of representing “á” is as the letter “a” plus an accent: <code>.</code> will match the component “a”, while <code>\X</code> will match the complete symbol:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">x &lt;-<span class="st"> &quot;a\u0301&quot;</span>
+<span class="kw">str_extract</span>(x, <span class="st">&quot;.&quot;</span>)
+<span class="co">#&gt; [1] &quot;a&quot;</span>
+<span class="kw">str_extract</span>(x, <span class="st">&quot;</span><span class="ch">\\</span><span class="st">X&quot;</span>)
+<span class="co">#&gt; [1] &quot;á&quot;</span></code></pre></div>
+<p>There are five other escaped pairs that match narrower classes of characters:</p>
+<ul>
+<li><p><code>\d</code>: matches any digit. The complement, <code>\D</code>, matches any character that is not a decimal digit.</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">str_extract_all</span>(<span class="st">&quot;1 + 2 = 3&quot;</span>, <span class="st">&quot;</span><span class="ch">\\</span><span class="st">d+&quot;</span>)[[<span class="dv">1</span>]]
+<span class="co">#&gt; [1] &quot;1&quot; &quot;2&quot; &quot;3&quot;</span></code></pre></div>
+<p>Technically, <code>\d</code> includes any character in the Unicode Category of Nd (“Number, Decimal Digit”), which also includes numeric symbols from other languages:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="co"># Some Laotian numbers</span>
+<span class="kw">str_detect</span>(<span class="st">&quot;១២៣&quot;</span>, <span class="st">&quot;</span><span class="ch">\\</span><span class="st">d&quot;</span>)
+<span class="co">#&gt; [1] TRUE</span></code></pre></div></li>
+<li><p><code>\s</code>: matches any whitespace. This includes tabs, newlines, form feeds, and any character in the Unicode Z Category (which includes a variety of space characters and other separators.). The complement, <code>\S</code>, matches any non-whitespace character.</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">(text &lt;-<span class="st"> &quot;Some  </span><span class="ch">\t</span><span class="st"> badly</span><span class="ch">\n\t\t</span><span class="st">spaced </span><span class="ch">\f</span><span class="st"> text&quot;</span>)
+<span class="co">#&gt; [1] &quot;Some  \t badly\n\t\tspaced \f text&quot;</span>
+<span class="kw">str_replace_all</span>(text, <span class="st">&quot;</span><span class="ch">\\</span><span class="st">s+&quot;</span>, <span class="st">&quot; &quot;</span>)
+<span class="co">#&gt; [1] &quot;Some badly spaced text&quot;</span></code></pre></div></li>
+<li><p><code>\p{property name}</code> matches any character with specific unicode property, like <code>\p{Uppercase}</code> or <code>\p{Diacritic}</code>. The complement, <code>\P{property name}</code>, matches all characters without the property. A complete list of unicode properties can be found at <a href="http://www.unicode.org/reports/tr44/#Property_Index" class="uri">http://www.unicode.org/reports/tr44/#Property_Index</a>.</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">(text &lt;-<span class="st"> </span><span class="kw">c</span>(<span class="st">'&quot;Double quotes&quot;'</span>, <span class="st">&quot;«Guillemet»&quot;</span>, <span class="st">&quot;“Fancy quotes”&quot;</span>))
+<span class="co">#&gt; [1] &quot;\&quot;Double quotes\&quot;&quot; &quot;«Guillemet»&quot;       &quot;“Fancy quotes”&quot;</span>
+<span class="kw">str_replace_all</span>(text, <span class="st">&quot;</span><span class="ch">\\</span><span class="st">p{quotation mark}&quot;</span>, <span class="st">&quot;'&quot;</span>)
+<span class="co">#&gt; [1] &quot;'Double quotes'&quot; &quot;'Guillemet'&quot;     &quot;'Fancy quotes'&quot;</span></code></pre></div></li>
+<li><p><code>\w</code> matches any “word” character, which includes alphabetic characters, marks and decimal numbers. The complement, <code>\W</code>, matches any non-word character.</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">str_extract_all</span>(<span class="st">&quot;Don't eat that!&quot;</span>, <span class="st">&quot;</span><span class="ch">\\</span><span class="st">w+&quot;</span>)[[<span class="dv">1</span>]]
+<span class="co">#&gt; [1] &quot;Don&quot;  &quot;t&quot;    &quot;eat&quot;  &quot;that&quot;</span>
+<span class="kw">str_split</span>(<span class="st">&quot;Don't eat that!&quot;</span>, <span class="st">&quot;</span><span class="ch">\\</span><span class="st">W&quot;</span>)[[<span class="dv">1</span>]]
+<span class="co">#&gt; [1] &quot;Don&quot;  &quot;t&quot;    &quot;eat&quot;  &quot;that&quot; &quot;&quot;</span></code></pre></div>
+<p>Technically, <code>\w</code> also matches connector punctuation, <code>\u200c</code> (zero width connector), and <code>\u200d</code> (zero width joiner), but these are rarely seen in the wild.</p></li>
+<li><p><code>\b</code> matches word boundaries, the transition between word and non-word characters. <code>\B</code> matches the opposite: boundaries that have either both word or non-word characters on either side.</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">str_replace_all</span>(<span class="st">&quot;The quick brown fox&quot;</span>, <span class="st">&quot;</span><span class="ch">\\</span><span class="st">b&quot;</span>, <span class="st">&quot;_&quot;</span>)
+<span class="co">#&gt; [1] &quot;_The_ _quick_ _brown_ _fox_&quot;</span>
+<span class="kw">str_replace_all</span>(<span class="st">&quot;The quick brown fox&quot;</span>, <span class="st">&quot;</span><span class="ch">\\</span><span class="st">B&quot;</span>, <span class="st">&quot;_&quot;</span>)
+<span class="co">#&gt; [1] &quot;T_h_e q_u_i_c_k b_r_o_w_n f_o_x&quot;</span></code></pre></div></li>
+</ul>
+<p>You can also create your own <strong>character classes</strong> using <code>[]</code>:</p>
+<ul>
+<li><code>[abc]</code>: matches a, b, or c.</li>
+<li><code>[a-z]</code>: matches every character between a and z (in Unicode code point order).</li>
+<li><code>[^abc]</code>: matches anything except a, b, or c.</li>
+<li><code>[\^\-]</code>: matches <code>-</code> or <code>\</code>.</li>
+</ul>
+<p>There are a number of pre-built classes that you can use inside <code>[]</code>:</p>
+<ul>
+<li><code>[:punct:]</code>: punctuation.</li>
+<li><code>[:alpha:]</code>: letters.</li>
+<li><code>[:lower:]</code>: lowercase letters.</li>
+<li><code>[:upper:]</code>: upperclass letters.</li>
+<li><code>[:digit:]</code>: digits.</li>
+<li><code>[:xdigit:]</code>: hex digits.</li>
+<li><code>[:alnum:]</code>: letters and numbers.</li>
+<li><code>[:cntrl:]</code>: control characters.</li>
+<li><code>[:graph:]</code>: letters, numbers, and punctuation.</li>
+<li><code>[:print:]</code>: letters, numbers, punctuation, and whitespace.</li>
+<li><code>[:space:]</code>: space characters (basically equivalent to <code>\s</code>).</li>
+<li><code>[:blank:]</code>: space and tab.</li>
+</ul>
+<p>These all go inside the <code>[]</code> for character classes, i.e. <code>[[:digit:]AX]</code> matches all digits, A, and X.</p>
+<p>You can also using Unicode properties, like <code>[\p{Letter}]</code>, and various set operations, like <code>[\p{Letter}--\p{script=latin}]</code>. See <code>?&quot;stringi-search-charclass&quot;</code> for details.</p>
+</div>
+<div id="alternation" class="section level2">
+<h2>Alternation</h2>
+<p><code>|</code> is the <strong>alternation</strong> operator, which will pick between one or more possible matches. For example, <code>abc|def</code> will match <code>abc</code> or <code>def</code>.</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">str_detect</span>(<span class="kw">c</span>(<span class="st">&quot;abc&quot;</span>, <span class="st">&quot;def&quot;</span>, <span class="st">&quot;ghi&quot;</span>), <span class="st">&quot;abc|def&quot;</span>)
+<span class="co">#&gt; [1]  TRUE  TRUE FALSE</span></code></pre></div>
+<p>Note that the precedence for <code>|</code> is low, so that <code>abc|def</code> matches <code>abc</code> or <code>def</code> not <code>abcyz</code> or <code>abxyz</code>.</p>
+</div>
+<div id="grouping" class="section level2">
+<h2>Grouping</h2>
+<p>You can use parentheses to override the default precedence rules:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">str_extract</span>(<span class="kw">c</span>(<span class="st">&quot;grey&quot;</span>, <span class="st">&quot;gray&quot;</span>), <span class="st">&quot;gre|ay&quot;</span>)
+<span class="co">#&gt; [1] &quot;gre&quot; &quot;ay&quot;</span>
+<span class="kw">str_extract</span>(<span class="kw">c</span>(<span class="st">&quot;grey&quot;</span>, <span class="st">&quot;gray&quot;</span>), <span class="st">&quot;gr(e|a)y&quot;</span>)
+<span class="co">#&gt; [1] &quot;grey&quot; &quot;gray&quot;</span></code></pre></div>
+<p>Parenthesis also define “groups” that you can refer to with <strong>backreferences</strong>, like <code>\1</code>, <code>\2</code> etc, and can be extracted with <code>str_match()</code>. For example, the following regular expression finds all fruits that have a repeated pair of letters:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">pattern &lt;-<span class="st"> &quot;(..)</span><span class="ch">\\</span><span class="st">1&quot;</span>
+fruit %&gt;%<span class="st"> </span>
+<span class="st">  </span><span class="kw">str_subset</span>(pattern)
+<span class="co">#&gt; [1] &quot;banana&quot;      &quot;coconut&quot;     &quot;cucumber&quot;    &quot;jujube&quot;      &quot;papaya&quot;     </span>
+<span class="co">#&gt; [6] &quot;salal berry&quot;</span>
+
+fruit %&gt;%<span class="st"> </span>
+<span class="st">  </span><span class="kw">str_subset</span>(pattern) %&gt;%<span class="st"> </span>
+<span class="st">  </span><span class="kw">str_match</span>(pattern)
+<span class="co">#&gt;      [,1]   [,2]</span>
+<span class="co">#&gt; [1,] &quot;anan&quot; &quot;an&quot;</span>
+<span class="co">#&gt; [2,] &quot;coco&quot; &quot;co&quot;</span>
+<span class="co">#&gt; [3,] &quot;cucu&quot; &quot;cu&quot;</span>
+<span class="co">#&gt; [4,] &quot;juju&quot; &quot;ju&quot;</span>
+<span class="co">#&gt; [5,] &quot;papa&quot; &quot;pa&quot;</span>
+<span class="co">#&gt; [6,] &quot;alal&quot; &quot;al&quot;</span></code></pre></div>
+<p>You can use <code>(?:...)</code>, the non-grouping parentheses, to control precedence but not capture the match in a group. This is slightly more efficient than capturing parentheses.</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">str_match</span>(<span class="kw">c</span>(<span class="st">&quot;grey&quot;</span>, <span class="st">&quot;gray&quot;</span>), <span class="st">&quot;gr(e|a)y&quot;</span>)
+<span class="co">#&gt;      [,1]   [,2]</span>
+<span class="co">#&gt; [1,] &quot;grey&quot; &quot;e&quot; </span>
+<span class="co">#&gt; [2,] &quot;gray&quot; &quot;a&quot;</span>
+<span class="kw">str_match</span>(<span class="kw">c</span>(<span class="st">&quot;grey&quot;</span>, <span class="st">&quot;gray&quot;</span>), <span class="st">&quot;gr(?:e|a)y&quot;</span>)
+<span class="co">#&gt;      [,1]  </span>
+<span class="co">#&gt; [1,] &quot;grey&quot;</span>
+<span class="co">#&gt; [2,] &quot;gray&quot;</span></code></pre></div>
+<p>This is most useful for more complex cases where you need to capture matches and control precedence independently.</p>
+</div>
+<div id="anchors" class="section level2">
+<h2>Anchors</h2>
+<p>By default, regular expressions will match any part of a string. It’s often useful to <strong>anchor</strong> the regular expression so that it matches from the start or end of the string:</p>
+<ul>
+<li><code>^</code> matches the start of string.</li>
+<li><code>$</code> matches the end of the string.</li>
+</ul>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">x &lt;-<span class="st"> </span><span class="kw">c</span>(<span class="st">&quot;apple&quot;</span>, <span class="st">&quot;banana&quot;</span>, <span class="st">&quot;pear&quot;</span>)
+<span class="kw">str_extract</span>(x, <span class="st">&quot;^a&quot;</span>)
+<span class="co">#&gt; [1] &quot;a&quot; NA  NA</span>
+<span class="kw">str_extract</span>(x, <span class="st">&quot;a$&quot;</span>)
+<span class="co">#&gt; [1] NA  &quot;a&quot; NA</span></code></pre></div>
+<p>To match a literal “$” or “^”, you need to escape them, <code>\$</code>, and <code>\^</code>.</p>
+<p>For multiline strings, you can use <code>regex(multiline = TRUE)</code>. This changes the behaviour of <code>^</code> and <code>$</code>, and introduces three new operators:</p>
+<ul>
+<li><p><code>^</code> now matches the start of each line.</p></li>
+<li><p><code>$</code> now matches the end of each line.</p></li>
+<li><p><code>\A</code> matches the start of the input.</p></li>
+<li><p><code>\z</code> matches the end of the input.</p></li>
+<li><p><code>\Z</code> matches the end of the input, but before the final line terminator, if it exists.</p></li>
+</ul>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">x &lt;-<span class="st"> &quot;Line 1</span><span class="ch">\n</span><span class="st">Line 2</span><span class="ch">\n</span><span class="st">Line 3</span><span class="ch">\n</span><span class="st">&quot;</span>
+<span class="kw">str_extract_all</span>(x, <span class="st">&quot;^Line..&quot;</span>)[[<span class="dv">1</span>]]
+<span class="co">#&gt; [1] &quot;Line 1&quot;</span>
+<span class="kw">str_extract_all</span>(x, <span class="kw">regex</span>(<span class="st">&quot;^Line..&quot;</span>, <span class="dt">multiline =</span> <span class="ot">TRUE</span>))[[<span class="dv">1</span>]]
+<span class="co">#&gt; [1] &quot;Line 1&quot; &quot;Line 2&quot; &quot;Line 3&quot;</span>
+<span class="kw">str_extract_all</span>(x, <span class="kw">regex</span>(<span class="st">&quot;</span><span class="ch">\\</span><span class="st">ALine..&quot;</span>, <span class="dt">multiline =</span> <span class="ot">TRUE</span>))[[<span class="dv">1</span>]]
+<span class="co">#&gt; [1] &quot;Line 1&quot;</span></code></pre></div>
+</div>
+<div id="repetition" class="section level2">
+<h2>Repetition</h2>
+<p>You can control how many times a pattern matches with the repetition operators:</p>
+<ul>
+<li><code>?</code>: 0 or 1.</li>
+<li><code>+</code>: 1 or more.</li>
+<li><code>*</code>: 0 or more.</li>
+</ul>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">x &lt;-<span class="st"> &quot;1888 is the longest year in Roman numerals: MDCCCLXXXVIII&quot;</span>
+<span class="kw">str_extract</span>(x, <span class="st">&quot;CC?&quot;</span>)
+<span class="co">#&gt; [1] &quot;CC&quot;</span>
+<span class="kw">str_extract</span>(x, <span class="st">&quot;CC+&quot;</span>)
+<span class="co">#&gt; [1] &quot;CCC&quot;</span>
+<span class="kw">str_extract</span>(x, <span class="st">'C[LX]+'</span>)
+<span class="co">#&gt; [1] &quot;CLXXX&quot;</span></code></pre></div>
+<p>Note that the precedence of these operators is high, so you can write: <code>colou?r</code> to match either American or British spellings. That means most uses will need parentheses, like <code>bana(na)+</code>.</p>
+<p>You can also specify the number of matches precisely:</p>
+<ul>
+<li><code>{n}</code>: exactly n</li>
+<li><code>{n,}</code>: n or more</li>
+<li><code>{n,m}</code>: between n and m</li>
+</ul>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">str_extract</span>(x, <span class="st">&quot;C{2}&quot;</span>)
+<span class="co">#&gt; [1] &quot;CC&quot;</span>
+<span class="kw">str_extract</span>(x, <span class="st">&quot;C{2,}&quot;</span>)
+<span class="co">#&gt; [1] &quot;CCC&quot;</span>
+<span class="kw">str_extract</span>(x, <span class="st">&quot;C{2,3}&quot;</span>)
+<span class="co">#&gt; [1] &quot;CCC&quot;</span></code></pre></div>
+<p>By default these matches are “greedy”: they will match the longest string possible. You can make them “lazy”, matching the shortest string possible by putting a <code>?</code> after them:</p>
+<ul>
+<li><code>??</code>: 0 or 1, prefer 0.</li>
+<li><code>+?</code>: 1 or more, match as few times as possible.</li>
+<li><code>*?</code>: 0 or more, match as few times as possible.</li>
+<li><code>{n,}?</code>: n or more, match as few times as possible.</li>
+<li><code>{n,m}?</code>: between n and m, , match as few times as possible, but at least n.</li>
+</ul>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">str_extract</span>(x, <span class="kw">c</span>(<span class="st">&quot;C{2,3}&quot;</span>, <span class="st">&quot;C{2,3}?&quot;</span>))
+<span class="co">#&gt; [1] &quot;CCC&quot; &quot;CC&quot;</span>
+<span class="kw">str_extract</span>(x, <span class="kw">c</span>(<span class="st">&quot;C[LX]+&quot;</span>, <span class="st">&quot;C[LX]+?&quot;</span>))
+<span class="co">#&gt; [1] &quot;CLXXX&quot; &quot;CL&quot;</span></code></pre></div>
+<p>You can also make the matches possessive, which means that if later parts of the match fail, the repetition will not be re-tried with a smaller number of characters. This is an advanced feature used to improve performance in worst-case scenarios (called “catastrophic backtracking”).</p>
+<ul>
+<li><code>??</code>: 0 or 1, possessive.</li>
+<li><code>+?</code>: 1 or more, possessive.</li>
+<li><code>*?</code>: 0 or more, possessive.</li>
+<li><code>{n}?</code>: exactly n, possessive.</li>
+<li><code>{n,}?</code>: n or more, possessive.</li>
+<li><code>{n,m}?</code>: between n and m, possessive.</li>
+</ul>
+<p>A related concept is the <strong>atomic-match</strong> parenthesis, <code>(?&gt;...)</code>. If a later match fails and the engine needs to back-track, an atomic match is kept as is: it succeeds or fails as a whole. Compare the following two regular expressions:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">str_detect</span>(<span class="st">&quot;ABC&quot;</span>, <span class="st">&quot;(?&gt;A|.B)C&quot;</span>)
+<span class="co">#&gt; [1] FALSE</span>
+<span class="kw">str_detect</span>(<span class="st">&quot;ABC&quot;</span>, <span class="st">&quot;(?:A|.B)C&quot;</span>)
+<span class="co">#&gt; [1] TRUE</span></code></pre></div>
+<p>The atomic match fails because it matches A, and then the next character is a C so it fails. The regular match suceeds because it matches A, but then C doesn’t match, so it back-tracks and tries B instead.</p>
+</div>
+<div id="look-arounds" class="section level2">
+<h2>Look arounds</h2>
+<p>These assertions look ahead or behind the current match without “consuming” any characters (i.e. changing the input position).</p>
+<ul>
+<li><p><code>(?=...)</code>: positive look-ahead assertion. Matches if <code>...</code> matches at the current input.</p></li>
+<li><p><code>(?!...)</code>: negative look-ahead assertion. Matches if <code>...</code> <strong>does not</strong> matche at the current input.</p></li>
+<li><p><code>(?&lt;=...)</code>: positive look-behind assertion. Matches if <code>...</code> matches text preceding the current position, with the last character of the match being the character just before the current position. Length must be bounded<br />
+(i.e. no <code>*</code> or <code>+</code>).</p></li>
+<li><p><code>(?&lt;!...)</code>: negative look-behind assertion. Matches if <code>...</code> <strong>does not</strong> match text preceding the current position. Length must be bounded<br />
+(i.e. no <code>*</code> or <code>+</code>).</p></li>
+</ul>
+<p>These are useful when you want to check that a pattern exists, but you don’t want to include it in the result:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">x &lt;-<span class="st"> </span><span class="kw">c</span>(<span class="st">&quot;1 piece&quot;</span>, <span class="st">&quot;2 pieces&quot;</span>, <span class="st">&quot;3&quot;</span>)
+<span class="kw">str_extract</span>(x, <span class="st">&quot;</span><span class="ch">\\</span><span class="st">d+(?= pieces?)&quot;</span>)
+<span class="co">#&gt; [1] &quot;1&quot; &quot;2&quot; NA</span>
+
+y &lt;-<span class="st"> </span><span class="kw">c</span>(<span class="st">&quot;100&quot;</span>, <span class="st">&quot;$400&quot;</span>)
+<span class="kw">str_extract</span>(y, <span class="st">&quot;(?&lt;=</span><span class="ch">\\</span><span class="st">$)</span><span class="ch">\\</span><span class="st">d+&quot;</span>)
+<span class="co">#&gt; [1] NA    &quot;400&quot;</span></code></pre></div>
+</div>
+<div id="comments" class="section level2">
+<h2>Comments</h2>
+<p>There are two ways to include comments in a regular expression. The first is with <code>(?#...)</code>:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">str_detect</span>(<span class="st">&quot;xyz&quot;</span>, <span class="st">&quot;x(?#this is a comment)&quot;</span>)
+<span class="co">#&gt; [1] TRUE</span></code></pre></div>
+<p>The second is to use <code>regex(comments = TRUE)</code>. This form ignores spaces and newlines, and anything everything after <code>#</code>. To match a literal space, you’ll need to escape it: <code>&quot;\\ &quot;</code>. This is a useful way of describing complex regular expressions:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">phone &lt;-<span class="st"> </span><span class="kw">regex</span>(<span class="st">&quot;</span>
+<span class="st">  </span><span class="ch">\\</span><span class="st">(?     # optional opening parens</span>
+<span class="st">  (</span><span class="ch">\\</span><span class="st">d{3}) # area code</span>
+<span class="st">  [)- ]?   # optional closing parens, dash, or space</span>
+<span class="st">  (</span><span class="ch">\\</span><span class="st">d{3}) # another three numbers</span>
+<span class="st">  [ -]?    # optional space or dash</span>
+<span class="st">  (</span><span class="ch">\\</span><span class="st">d{3}) # three more numbers</span>
+<span class="st">  &quot;</span>, <span class="dt">comments =</span> <span class="ot">TRUE</span>)
+
+<span class="kw">str_match</span>(<span class="st">&quot;514-791-8141&quot;</span>, phone)
+<span class="co">#&gt;      [,1]          [,2]  [,3]  [,4] </span>
+<span class="co">#&gt; [1,] &quot;514-791-814&quot; &quot;514&quot; &quot;791&quot; &quot;814&quot;</span></code></pre></div>
+</div>
+
+
+
+<!-- dynamically load mathjax for compatibility with self-contained -->
+<script>
+  (function () {
+    var script = document.createElement("script");
+    script.type = "text/javascript";
+    script.src  = "https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML";
+    document.getElementsByTagName("head")[0].appendChild(script);
+  })();
+</script>
+
+</body>
+</html>

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/doc/regular-expressions.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/doc/stringr.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/doc/stringr.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/doc/stringr.R	(revision 2477)
@@ -0,0 +1,142 @@
+## ---- include = FALSE----------------------------------------------------
+library(stringr)
+knitr::opts_chunk$set(
+  comment = "#>", 
+  collapse = TRUE
+)
+
+## ------------------------------------------------------------------------
+str_length("abc")
+
+## ------------------------------------------------------------------------
+x <- c("abcdef", "ghifjk")
+
+# The 3rd letter
+str_sub(x, 3, 3)
+
+# The 2nd to 2nd-to-last character
+str_sub(x, 2, -2)
+
+
+## ------------------------------------------------------------------------
+str_sub(x, 3, 3) <- "X"
+x
+
+## ------------------------------------------------------------------------
+str_dup(x, c(2, 3))
+
+## ------------------------------------------------------------------------
+x <- c("abc", "defghi")
+str_pad(x, 10)
+str_pad(x, 10, "both")
+
+## ------------------------------------------------------------------------
+str_pad(x, 4)
+
+## ------------------------------------------------------------------------
+x <- c("Short", "This is a long string")
+
+x %>% 
+  str_trunc(10) %>% 
+  str_pad(10, "right")
+
+## ------------------------------------------------------------------------
+x <- c("  a   ", "b   ",  "   c")
+str_trim(x)
+str_trim(x, "left")
+
+## ------------------------------------------------------------------------
+jabberwocky <- str_c(
+  "`Twas brillig, and the slithy toves ",
+  "did gyre and gimble in the wabe: ",
+  "All mimsy were the borogoves, ",
+  "and the mome raths outgrabe. "
+)
+cat(str_wrap(jabberwocky, width = 40))
+
+## ------------------------------------------------------------------------
+x <- "I like horses."
+str_to_upper(x)
+str_to_title(x)
+
+str_to_lower(x)
+# Turkish has two sorts of i: with and without the dot
+str_to_lower(x, "tr")
+
+## ------------------------------------------------------------------------
+x <- c("y", "i", "k")
+str_order(x)
+
+str_sort(x)
+# In Lithuanian, y comes between i and k
+str_sort(x, locale = "lt")
+
+## ------------------------------------------------------------------------
+strings <- c(
+  "apple", 
+  "219 733 8965", 
+  "329-293-8753", 
+  "Work: 579-499-7527; Home: 543.355.3679"
+)
+phone <- "([2-9][0-9]{2})[- .]([0-9]{3})[- .]([0-9]{4})"
+
+## ------------------------------------------------------------------------
+# Which strings contain phone numbers?
+str_detect(strings, phone)
+str_subset(strings, phone)
+
+## ------------------------------------------------------------------------
+# How many phone numbers in each string?
+str_count(strings, phone)
+
+## ------------------------------------------------------------------------
+# Where in the string is the phone number located?
+(loc <- str_locate(strings, phone))
+str_locate_all(strings, phone)
+
+## ------------------------------------------------------------------------
+# What are the phone numbers?
+str_extract(strings, phone)
+str_extract_all(strings, phone)
+str_extract_all(strings, phone, simplify = TRUE)
+
+## ------------------------------------------------------------------------
+# Pull out the three components of the match
+str_match(strings, phone)
+str_match_all(strings, phone)
+
+## ------------------------------------------------------------------------
+str_replace(strings, phone, "XXX-XXX-XXXX")
+str_replace_all(strings, phone, "XXX-XXX-XXXX")
+
+## ------------------------------------------------------------------------
+str_split("a-b-c", "-")
+str_split_fixed("a-b-c", "-", n = 2)
+
+## ------------------------------------------------------------------------
+a1 <- "\u00e1"
+a2 <- "a\u0301"
+c(a1, a2)
+a1 == a2
+
+## ------------------------------------------------------------------------
+str_detect(a1, fixed(a2))
+str_detect(a1, coll(a2))
+
+## ------------------------------------------------------------------------
+i <- c("I", "İ", "i", "ı")
+i
+
+str_subset(i, coll("i", ignore_case = TRUE))
+str_subset(i, coll("i", ignore_case = TRUE, locale = "tr"))
+
+## ------------------------------------------------------------------------
+x <- "This is a sentence."
+str_split(x, boundary("word"))
+str_count(x, boundary("word"))
+str_extract_all(x, boundary("word"))
+
+## ------------------------------------------------------------------------
+str_split(x, "")
+str_count(x, "")
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/doc/stringr.Rmd
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/doc/stringr.Rmd	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/doc/stringr.Rmd	(revision 2477)
@@ -0,0 +1,300 @@
+---
+title: "Introduction to stringr"
+output: rmarkdown::html_vignette
+vignette: >
+  %\VignetteIndexEntry{Introduction to stringr}
+  %\VignetteEngine{knitr::rmarkdown}
+  %\VignetteEncoding{UTF-8}
+---
+
+```{r, include = FALSE}
+library(stringr)
+knitr::opts_chunk$set(
+  comment = "#>", 
+  collapse = TRUE
+)
+```
+
+There are four main families of functions in stringr: 
+
+1.  Character manipulation: these functions allow you to manipulate the 
+    individual characters inside the strings inside character vectors.
+   
+1.  Whitespace tools to add, remove, and manipulation whitespace.
+
+1.  Locale sensitive operation whose operation will vary for locale
+    to locale
+    
+1.  Pattern matching functions. These recognise four engines of
+    pattern description. The most common is regular expresssions, but there
+    are a three other tools.
+
+## Getting and setting individual characters
+
+You can get the length of the string with `str_length()`:
+
+```{r}
+str_length("abc")
+```
+
+This is now equivalent to the base R function `nchar()`. Previously it was needed to work around issues with `nchar()` such as the fact that it returned 2 for `nchar(NA)`. This has been fixed as of R 3.3.0, so it is no longer so important.
+
+You can access individual character using `sub_str()`. It takes three arguments: a character vector, a starting position and an end position. Either position can either be a positive integer, which counts from the length, or a negative integer which counts from the right. The positions are inclusive, and if longer than the string, will be silently truncated.
+
+```{r}
+x <- c("abcdef", "ghifjk")
+
+# The 3rd letter
+str_sub(x, 3, 3)
+
+# The 2nd to 2nd-to-last character
+str_sub(x, 2, -2)
+
+```
+
+You can also use `str_sub()` to modify strings:
+
+```{r}
+str_sub(x, 3, 3) <- "X"
+x
+```
+
+To duplicate individual strings, you can use `str_dup()`:
+
+```{r}
+str_dup(x, c(2, 3))
+```
+
+## Whitespace
+
+Three functions add, remove, or modify whitespace:
+
+1. `str_pad()` pads a string to a fixed length by adding extra whitespace on 
+    the left, right, or both sides.
+    
+    ```{r}
+    x <- c("abc", "defghi")
+    str_pad(x, 10)
+    str_pad(x, 10, "both")
+    ```
+    
+    (You can pad with other characters by using the `pad` argument.)
+    
+    `str_pad()` will never make a string shorter:
+    
+    ```{r}
+    str_pad(x, 4)
+    ```
+    
+    So if you want to ensure that all strings are the same length (often useful
+    for print methods), combine `str_pad()` and `str_trunc()`:
+    
+    ```{r}
+    x <- c("Short", "This is a long string")
+    
+    x %>% 
+      str_trunc(10) %>% 
+      str_pad(10, "right")
+    ```
+
+1.  The opposite of `str_pad()` is `str_trim()`, which removes leading and 
+    trailing whitespace:
+    
+    ```{r}
+    x <- c("  a   ", "b   ",  "   c")
+    str_trim(x)
+    str_trim(x, "left")
+    ```
+
+1.  You can use `str_wrap()` to modify existing whitespace in order to wrap
+    a paragraph of text so that the length of each line as a similar as 
+    possible. 
+    
+    ```{r}
+    jabberwocky <- str_c(
+      "`Twas brillig, and the slithy toves ",
+      "did gyre and gimble in the wabe: ",
+      "All mimsy were the borogoves, ",
+      "and the mome raths outgrabe. "
+    )
+    cat(str_wrap(jabberwocky, width = 40))
+    ```
+
+## Locale sensitive
+
+A handful of stringr are functions are locale-sensitive: they will perform differently in different regions of the world. These functions case transformation functions:
+
+```{r}
+x <- "I like horses."
+str_to_upper(x)
+str_to_title(x)
+
+str_to_lower(x)
+# Turkish has two sorts of i: with and without the dot
+str_to_lower(x, "tr")
+```
+
+And string ordering and sorting:
+
+```{r}
+x <- c("y", "i", "k")
+str_order(x)
+
+str_sort(x)
+# In Lithuanian, y comes between i and k
+str_sort(x, locale = "lt")
+```
+
+The locale always defaults to English to ensure that the default behaviour is identically across systems. Locales always include a two letter ISO-639-1 language code (like "en" for English or "zh" for Chinese), and optionally a ISO-3166 country code (like "en_UK" vs "en_US"). You can see a complete list of available locales by running `stringi::stri_locale_list()`.
+
+## Pattern matching
+
+The vast majority of stringr functions work with patterns. These are parameterised by the task they perform and the types of patterns they match.
+
+### Tasks
+
+Each pattern matching function has the same first two arguments, a character vector of `string`s to process and a single `pattern` to match. stringr provides pattern matching functions to **detect**, **locate**, **extract**, **match**, **replace**, and **split** strings. I'll illustrate how they work with some strings and a regular expression designed to match (US) phone numbers:
+
+```{r}
+strings <- c(
+  "apple", 
+  "219 733 8965", 
+  "329-293-8753", 
+  "Work: 579-499-7527; Home: 543.355.3679"
+)
+phone <- "([2-9][0-9]{2})[- .]([0-9]{3})[- .]([0-9]{4})"
+```
+
+-   `str_detect()` detects the presence or absence of a pattern and returns a 
+    logical vector (similar to `grepl()`). `str_subset()` returns the elements
+    of a character vector that match a regular expression (similar to `grep()` 
+    with `value = TRUE`)`.
+    
+    ```{r}
+    # Which strings contain phone numbers?
+    str_detect(strings, phone)
+    str_subset(strings, phone)
+    ```
+
+-  `str_count()` counts the number of matches:
+
+    ```{r}
+    # How many phone numbers in each string?
+    str_count(strings, phone)
+    ```
+
+-   `str_locate()` locates the first position of a pattern and returns a numeric 
+    matrix with columns start and end. `str_locate_all()` locates all matches, 
+    returning a list of numeric matrices. Similar to `regexpr()` and `gregexpr()`.
+
+    ```{r}
+    # Where in the string is the phone number located?
+    (loc <- str_locate(strings, phone))
+    str_locate_all(strings, phone)
+    ```
+
+-   `str_extract()` extracts text corresponding to the first match, returning a 
+    character vector. `str_extract_all()` extracts all matches and returns a 
+    list of character vectors.
+
+    ```{r}
+    # What are the phone numbers?
+    str_extract(strings, phone)
+    str_extract_all(strings, phone)
+    str_extract_all(strings, phone, simplify = TRUE)
+    ```
+
+-   `str_match()` extracts capture groups formed by `()` from the first match. 
+    It returns a character matrix with one column for the complete match and 
+    one column for each group. `str_match_all()` extracts capture groups from 
+    all matches and returns a list of character matrices. Similar to 
+    `regmatches()`.
+
+    ```{r}
+    # Pull out the three components of the match
+    str_match(strings, phone)
+    str_match_all(strings, phone)
+    ```
+
+-   `str_replace()` replaces the first matched pattern and returns a character
+    vector. `str_replace_all()` replaces all matches. Similar to `sub()` and 
+    `gsub()`.
+
+    ```{r}
+    str_replace(strings, phone, "XXX-XXX-XXXX")
+    str_replace_all(strings, phone, "XXX-XXX-XXXX")
+    ```
+
+-   `str_split_fixed()` splits the string into a fixed number of pieces based 
+    on a pattern and returns a character matrix. `str_split()` splits a string 
+    into a variable number of pieces and returns a list of character vectors.
+    
+    ```{r}
+    str_split("a-b-c", "-")
+    str_split_fixed("a-b-c", "-", n = 2)
+    ```
+
+### Engines
+
+There are four main engines that stringr can use to describe patterns:
+
+* Regular expressions, the default, as shown above, and described in
+  `vignette("regular-expressions")`. 
+  
+* Fixed bytewise matching, with `fixed()`.
+
+* Locale-sensitve character matching, with `coll()`
+
+* Text boundary analysis with `boundary()`.
+
+#### Fixed matches
+
+`fixed(x)` only matches the exact sequence of bytes specified by `x`. This is a very limited "pattern", but the restriction can make matching much faster. Beware using `fixed()` with non-English data. It is problematic because there are often multiple ways of representing the same character. For  example, there are two ways to define "á": either as a single character or as an "a" plus an accent:
+
+```{r}
+a1 <- "\u00e1"
+a2 <- "a\u0301"
+c(a1, a2)
+a1 == a2
+```
+
+They render identically, but because they're defined differently, 
+`fixed()` doesn't find a match. Instead, you can use `coll()`, defined
+next, to respect human character comparison rules:
+
+```{r}
+str_detect(a1, fixed(a2))
+str_detect(a1, coll(a2))
+```
+    
+#### Collation search
+    
+`coll(x)` looks for a match to `x` using human-language **coll**ation rules, and is particularly important if you want to do case insensitive matching. Collation rules diffe around the world, so you'll also need to supply a `locale` parameter.
+
+```{r}
+i <- c("I", "İ", "i", "ı")
+i
+
+str_subset(i, coll("i", ignore_case = TRUE))
+str_subset(i, coll("i", ignore_case = TRUE, locale = "tr"))
+```
+
+The downside of `coll()` is speed; because the rules for recognising which characters are the same are complicated, `coll()` is relatively slow compared to `regex()` and `fixed()`. Note that will both `fixed()` and `regex()` have `ignore_case` arguments, they perform a much simpler comparison than `coll()`.
+
+#### Boundary
+
+`boundary()` matches boundaries between characters, lines, sentences or words. It's most useful with `str_split()`, but can used with all pattern matching functions
+
+```{r}
+x <- "This is a sentence."
+str_split(x, boundary("word"))
+str_count(x, boundary("word"))
+str_extract_all(x, boundary("word"))
+```
+
+By convention, `""` is treated as `boundary("character")`:
+
+```{r}
+str_split(x, "")
+str_count(x, "")
+```
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/doc/index.html
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/doc/index.html	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/doc/index.html	(revision 2477)
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title>R: Vignettes and other documentation</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<link rel="stylesheet" type="text/css" href="/doc/html/R.css" />
+</head><body>
+<h1> Vignettes and other documentation
+<img class="toplogo" src="/doc/html/Rlogo.svg" alt="[R logo]" />
+</h1>
+<hr/>
+<div style="text-align: center;">
+<a href="/doc/html/index.html"><img class="arrow" src="/doc/html/up.jpg" alt="[Top]" /></a>
+</div>
+<h2>Vignettes from package 'stringr'</h2>
+<table width="100%">
+<col style="width: 22%;" />
+<col style="width:  2%;" />
+<col style="width: 50%;" />
+<col style="width:  8%;" />
+<col style="width:  8%;" />
+<col style="width:  8%;" />
+<tr><td style="text-align: right; vertical-align: top;"><a href="../../../library/stringr/doc/regular-expressions.html">stringr::regular-expressions</a></td>
+<td></td><td valign="top">Regular expressions</td>
+<td valign="top"><a href="../../../library/stringr/doc/regular-expressions.html">HTML</a></td>
+<td valign="top"><a href="../../../library/stringr/doc/regular-expressions.Rmd">source</a></td>
+<td valign="top" style="white-space: nowrap"><a href="../../../library/stringr/doc/regular-expressions.R">R code</a></td></tr>
+<tr><td style="text-align: right; vertical-align: top;"><a href="../../../library/stringr/doc/stringr.html">stringr::stringr</a></td>
+<td></td><td valign="top">Introduction to stringr</td>
+<td valign="top"><a href="../../../library/stringr/doc/stringr.html">HTML</a></td>
+<td valign="top"><a href="../../../library/stringr/doc/stringr.Rmd">source</a></td>
+<td valign="top" style="white-space: nowrap"><a href="../../../library/stringr/doc/stringr.R">R code</a></td></tr>
+</table>
+</body></html>

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/doc/index.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/doc/stringr.html
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/doc/stringr.html	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/doc/stringr.html	(revision 2477)
@@ -0,0 +1,360 @@
+<!DOCTYPE html>
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+
+<meta charset="utf-8">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta name="generator" content="pandoc" />
+
+<meta name="viewport" content="width=device-width, initial-scale=1">
+
+
+
+<title>Introduction to stringr</title>
+
+
+
+<style type="text/css">code{white-space: pre;}</style>
+<style type="text/css">
+div.sourceCode { overflow-x: auto; }
+table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
+  margin: 0; padding: 0; vertical-align: baseline; border: none; }
+table.sourceCode { width: 100%; line-height: 100%; }
+td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
+td.sourceCode { padding-left: 5px; }
+code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
+code > span.dt { color: #902000; } /* DataType */
+code > span.dv { color: #40a070; } /* DecVal */
+code > span.bn { color: #40a070; } /* BaseN */
+code > span.fl { color: #40a070; } /* Float */
+code > span.ch { color: #4070a0; } /* Char */
+code > span.st { color: #4070a0; } /* String */
+code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
+code > span.ot { color: #007020; } /* Other */
+code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
+code > span.fu { color: #06287e; } /* Function */
+code > span.er { color: #ff0000; font-weight: bold; } /* Error */
+code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
+code > span.cn { color: #880000; } /* Constant */
+code > span.sc { color: #4070a0; } /* SpecialChar */
+code > span.vs { color: #4070a0; } /* VerbatimString */
+code > span.ss { color: #bb6688; } /* SpecialString */
+code > span.im { } /* Import */
+code > span.va { color: #19177c; } /* Variable */
+code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
+code > span.op { color: #666666; } /* Operator */
+code > span.bu { } /* BuiltIn */
+code > span.ex { } /* Extension */
+code > span.pp { color: #bc7a00; } /* Preprocessor */
+code > span.at { color: #7d9029; } /* Attribute */
+code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
+code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
+code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
+code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
+</style>
+
+
+
+<link href="data:text/css;charset=utf-8,body%20%7B%0Abackground%2Dcolor%3A%20%23fff%3B%0Amargin%3A%201em%20auto%3B%0Amax%2Dwidth%3A%20700px%3B%0Aoverflow%3A%20visible%3B%0Apadding%2Dleft%3A%202em%3B%0Apadding%2Dright%3A%202em%3B%0Afont%2Dfamily%3A%20%22Open%20Sans%22%2C%20%22Helvetica%20Neue%22%2C%20Helvetica%2C%20Arial%2C%20sans%2Dserif%3B%0Afont%2Dsize%3A%2014px%3B%0Aline%2Dheight%3A%201%2E35%3B%0A%7D%0A%23header%20%7B%0Atext%2Dalign%3A%20center%3B%0A%7D%0A%23TOC%20%7B%0Aclear%3A%20both%3B%0Amargin%3A%200%200%2010px%2010px%3B%0Apadding%3A%204px%3B%0Awidth%3A%20400px%3B%0Aborder%3A%201px%20solid%20%23CCCCCC%3B%0Aborder%2Dradius%3A%205px%3B%0Abackground%2Dcolor%3A%20%23f6f6f6%3B%0Afont%2Dsize%3A%2013px%3B%0Aline%2Dheight%3A%201%2E3%3B%0A%7D%0A%23TOC%20%2Etoctitle%20%7B%0Afont%2Dweight%3A%20bold%3B%0Afont%2Dsize%3A%2015px%3B%0Amargin%2Dleft%3A%205px%3B%0A%7D%0A%23TOC%20ul%20%7B%0Apadding%2Dleft%3A%2040px%3B%0Amargin%2Dleft%3A%20%2D1%2E5em%3B%0Amargin%2Dtop%3A%205px%3B%0Amargin%2Dbottom%3A%205px%3B%0A%7D%0A%23TOC%20ul%20ul%20%7B%0Amargin%2Dleft%3A%20%2D2em%3B%0A%7D%0A%23TOC%20li%20%7B%0Aline%2Dheight%3A%2016px%3B%0A%7D%0Atable%20%7B%0Amargin%3A%201em%20auto%3B%0Aborder%2Dwidth%3A%201px%3B%0Aborder%2Dcolor%3A%20%23DDDDDD%3B%0Aborder%2Dstyle%3A%20outset%3B%0Aborder%2Dcollapse%3A%20collapse%3B%0A%7D%0Atable%20th%20%7B%0Aborder%2Dwidth%3A%202px%3B%0Apadding%3A%205px%3B%0Aborder%2Dstyle%3A%20inset%3B%0A%7D%0Atable%20td%20%7B%0Aborder%2Dwidth%3A%201px%3B%0Aborder%2Dstyle%3A%20inset%3B%0Aline%2Dheight%3A%2018px%3B%0Apadding%3A%205px%205px%3B%0A%7D%0Atable%2C%20table%20th%2C%20table%20td%20%7B%0Aborder%2Dleft%2Dstyle%3A%20none%3B%0Aborder%2Dright%2Dstyle%3A%20none%3B%0A%7D%0Atable%20thead%2C%20table%20tr%2Eeven%20%7B%0Abackground%2Dcolor%3A%20%23f7f7f7%3B%0A%7D%0Ap%20%7B%0Amargin%3A%200%2E5em%200%3B%0A%7D%0Ablockquote%20%7B%0Abackground%2Dcolor%3A%20%23f6f6f6%3B%0Apadding%3A%200%2E25em%200%2E75em%3B%0A%7D%0Ahr%20%7B%0Aborder%2Dstyle%3A%20solid%3B%0Aborder%3A%20none%3B%0Aborder%2Dtop%3A%201px%20solid%20%23777%3B%0Amargin%3A%2028px%200%3B%0A%7D%0Adl%20%7B%0Amargin%2Dleft%3A%200%3B%0A%7D%0Adl%20dd%20%7B%0Amargin%2Dbottom%3A%2013px%3B%0Amargin%2Dleft%3A%2013px%3B%0A%7D%0Adl%20dt%20%7B%0Afont%2Dweight%3A%20bold%3B%0A%7D%0Aul%20%7B%0Amargin%2Dtop%3A%200%3B%0A%7D%0Aul%20li%20%7B%0Alist%2Dstyle%3A%20circle%20outside%3B%0A%7D%0Aul%20ul%20%7B%0Amargin%2Dbottom%3A%200%3B%0A%7D%0Apre%2C%20code%20%7B%0Abackground%2Dcolor%3A%20%23f7f7f7%3B%0Aborder%2Dradius%3A%203px%3B%0Acolor%3A%20%23333%3B%0Awhite%2Dspace%3A%20pre%2Dwrap%3B%20%0A%7D%0Apre%20%7B%0Aborder%2Dradius%3A%203px%3B%0Amargin%3A%205px%200px%2010px%200px%3B%0Apadding%3A%2010px%3B%0A%7D%0Apre%3Anot%28%5Bclass%5D%29%20%7B%0Abackground%2Dcolor%3A%20%23f7f7f7%3B%0A%7D%0Acode%20%7B%0Afont%2Dfamily%3A%20Consolas%2C%20Monaco%2C%20%27Courier%20New%27%2C%20monospace%3B%0Afont%2Dsize%3A%2085%25%3B%0A%7D%0Ap%20%3E%20code%2C%20li%20%3E%20code%20%7B%0Apadding%3A%202px%200px%3B%0A%7D%0Adiv%2Efigure%20%7B%0Atext%2Dalign%3A%20center%3B%0A%7D%0Aimg%20%7B%0Abackground%2Dcolor%3A%20%23FFFFFF%3B%0Apadding%3A%202px%3B%0Aborder%3A%201px%20solid%20%23DDDDDD%3B%0Aborder%2Dradius%3A%203px%3B%0Aborder%3A%201px%20solid%20%23CCCCCC%3B%0Amargin%3A%200%205px%3B%0A%7D%0Ah1%20%7B%0Amargin%2Dtop%3A%200%3B%0Afont%2Dsize%3A%2035px%3B%0Aline%2Dheight%3A%2040px%3B%0A%7D%0Ah2%20%7B%0Aborder%2Dbottom%3A%204px%20solid%20%23f7f7f7%3B%0Apadding%2Dtop%3A%2010px%3B%0Apadding%2Dbottom%3A%202px%3B%0Afont%2Dsize%3A%20145%25%3B%0A%7D%0Ah3%20%7B%0Aborder%2Dbottom%3A%202px%20solid%20%23f7f7f7%3B%0Apadding%2Dtop%3A%2010px%3B%0Afont%2Dsize%3A%20120%25%3B%0A%7D%0Ah4%20%7B%0Aborder%2Dbottom%3A%201px%20solid%20%23f7f7f7%3B%0Amargin%2Dleft%3A%208px%3B%0Afont%2Dsize%3A%20105%25%3B%0A%7D%0Ah5%2C%20h6%20%7B%0Aborder%2Dbottom%3A%201px%20solid%20%23ccc%3B%0Afont%2Dsize%3A%20105%25%3B%0A%7D%0Aa%20%7B%0Acolor%3A%20%230033dd%3B%0Atext%2Ddecoration%3A%20none%3B%0A%7D%0Aa%3Ahover%20%7B%0Acolor%3A%20%236666ff%3B%20%7D%0Aa%3Avisited%20%7B%0Acolor%3A%20%23800080%3B%20%7D%0Aa%3Avisited%3Ahover%20%7B%0Acolor%3A%20%23BB00BB%3B%20%7D%0Aa%5Bhref%5E%3D%22http%3A%22%5D%20%7B%0Atext%2Ddecoration%3A%20underline%3B%20%7D%0Aa%5Bhref%5E%3D%22https%3A%22%5D%20%7B%0Atext%2Ddecoration%3A%20underline%3B%20%7D%0A%0Acode%20%3E%20span%2Ekw%20%7B%20color%3A%20%23555%3B%20font%2Dweight%3A%20bold%3B%20%7D%20%0Acode%20%3E%20span%2Edt%20%7B%20color%3A%20%23902000%3B%20%7D%20%0Acode%20%3E%20span%2Edv%20%7B%20color%3A%20%2340a070%3B%20%7D%20%0Acode%20%3E%20span%2Ebn%20%7B%20color%3A%20%23d14%3B%20%7D%20%0Acode%20%3E%20span%2Efl%20%7B%20color%3A%20%23d14%3B%20%7D%20%0Acode%20%3E%20span%2Ech%20%7B%20color%3A%20%23d14%3B%20%7D%20%0Acode%20%3E%20span%2Est%20%7B%20color%3A%20%23d14%3B%20%7D%20%0Acode%20%3E%20span%2Eco%20%7B%20color%3A%20%23888888%3B%20font%2Dstyle%3A%20italic%3B%20%7D%20%0Acode%20%3E%20span%2Eot%20%7B%20color%3A%20%23007020%3B%20%7D%20%0Acode%20%3E%20span%2Eal%20%7B%20color%3A%20%23ff0000%3B%20font%2Dweight%3A%20bold%3B%20%7D%20%0Acode%20%3E%20span%2Efu%20%7B%20color%3A%20%23900%3B%20font%2Dweight%3A%20bold%3B%20%7D%20%20code%20%3E%20span%2Eer%20%7B%20color%3A%20%23a61717%3B%20background%2Dcolor%3A%20%23e3d2d2%3B%20%7D%20%0A" rel="stylesheet" type="text/css" />
+
+</head>
+
+<body>
+
+
+
+
+<h1 class="title toc-ignore">Introduction to stringr</h1>
+
+
+
+<p>There are four main families of functions in stringr:</p>
+<ol style="list-style-type: decimal">
+<li><p>Character manipulation: these functions allow you to manipulate the individual characters inside the strings inside character vectors.</p></li>
+<li><p>Whitespace tools to add, remove, and manipulation whitespace.</p></li>
+<li><p>Locale sensitive operation whose operation will vary for locale to locale</p></li>
+<li><p>Pattern matching functions. These recognise four engines of pattern description. The most common is regular expresssions, but there are a three other tools.</p></li>
+</ol>
+<div id="getting-and-setting-individual-characters" class="section level2">
+<h2>Getting and setting individual characters</h2>
+<p>You can get the length of the string with <code>str_length()</code>:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">str_length</span>(<span class="st">&quot;abc&quot;</span>)
+<span class="co">#&gt; [1] 3</span></code></pre></div>
+<p>This is now equivalent to the base R function <code>nchar()</code>. Previously it was needed to work around issues with <code>nchar()</code> such as the fact that it returned 2 for <code>nchar(NA)</code>. This has been fixed as of R 3.3.0, so it is no longer so important.</p>
+<p>You can access individual character using <code>sub_str()</code>. It takes three arguments: a character vector, a starting position and an end position. Either position can either be a positive integer, which counts from the length, or a negative integer which counts from the right. The positions are inclusive, and if longer than the string, will be silently truncated.</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">x &lt;-<span class="st"> </span><span class="kw">c</span>(<span class="st">&quot;abcdef&quot;</span>, <span class="st">&quot;ghifjk&quot;</span>)
+
+<span class="co"># The 3rd letter</span>
+<span class="kw">str_sub</span>(x, <span class="dv">3</span>, <span class="dv">3</span>)
+<span class="co">#&gt; [1] &quot;c&quot; &quot;i&quot;</span>
+
+<span class="co"># The 2nd to 2nd-to-last character</span>
+<span class="kw">str_sub</span>(x, <span class="dv">2</span>, -<span class="dv">2</span>)
+<span class="co">#&gt; [1] &quot;bcde&quot; &quot;hifj&quot;</span></code></pre></div>
+<p>You can also use <code>str_sub()</code> to modify strings:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">str_sub</span>(x, <span class="dv">3</span>, <span class="dv">3</span>) &lt;-<span class="st"> &quot;X&quot;</span>
+x
+<span class="co">#&gt; [1] &quot;abXdef&quot; &quot;ghXfjk&quot;</span></code></pre></div>
+<p>To duplicate individual strings, you can use <code>str_dup()</code>:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">str_dup</span>(x, <span class="kw">c</span>(<span class="dv">2</span>, <span class="dv">3</span>))
+<span class="co">#&gt; [1] &quot;abXdefabXdef&quot;       &quot;ghXfjkghXfjkghXfjk&quot;</span></code></pre></div>
+</div>
+<div id="whitespace" class="section level2">
+<h2>Whitespace</h2>
+<p>Three functions add, remove, or modify whitespace:</p>
+<ol style="list-style-type: decimal">
+<li><p><code>str_pad()</code> pads a string to a fixed length by adding extra whitespace on the left, right, or both sides.</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">x &lt;-<span class="st"> </span><span class="kw">c</span>(<span class="st">&quot;abc&quot;</span>, <span class="st">&quot;defghi&quot;</span>)
+<span class="kw">str_pad</span>(x, <span class="dv">10</span>)
+<span class="co">#&gt; [1] &quot;       abc&quot; &quot;    defghi&quot;</span>
+<span class="kw">str_pad</span>(x, <span class="dv">10</span>, <span class="st">&quot;both&quot;</span>)
+<span class="co">#&gt; [1] &quot;   abc    &quot; &quot;  defghi  &quot;</span></code></pre></div>
+<p>(You can pad with other characters by using the <code>pad</code> argument.)</p>
+<p><code>str_pad()</code> will never make a string shorter:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">str_pad</span>(x, <span class="dv">4</span>)
+<span class="co">#&gt; [1] &quot; abc&quot;   &quot;defghi&quot;</span></code></pre></div>
+<p>So if you want to ensure that all strings are the same length (often useful for print methods), combine <code>str_pad()</code> and <code>str_trunc()</code>:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">x &lt;-<span class="st"> </span><span class="kw">c</span>(<span class="st">&quot;Short&quot;</span>, <span class="st">&quot;This is a long string&quot;</span>)
+
+x %&gt;%<span class="st"> </span>
+<span class="st">  </span><span class="kw">str_trunc</span>(<span class="dv">10</span>) %&gt;%<span class="st"> </span>
+<span class="st">  </span><span class="kw">str_pad</span>(<span class="dv">10</span>, <span class="st">&quot;right&quot;</span>)
+<span class="co">#&gt; [1] &quot;Short     &quot; &quot;This is...&quot;</span></code></pre></div></li>
+<li><p>The opposite of <code>str_pad()</code> is <code>str_trim()</code>, which removes leading and trailing whitespace:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">x &lt;-<span class="st"> </span><span class="kw">c</span>(<span class="st">&quot;  a   &quot;</span>, <span class="st">&quot;b   &quot;</span>,  <span class="st">&quot;   c&quot;</span>)
+<span class="kw">str_trim</span>(x)
+<span class="co">#&gt; [1] &quot;a&quot; &quot;b&quot; &quot;c&quot;</span>
+<span class="kw">str_trim</span>(x, <span class="st">&quot;left&quot;</span>)
+<span class="co">#&gt; [1] &quot;a   &quot; &quot;b   &quot; &quot;c&quot;</span></code></pre></div></li>
+<li><p>You can use <code>str_wrap()</code> to modify existing whitespace in order to wrap a paragraph of text so that the length of each line as a similar as possible.</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">jabberwocky &lt;-<span class="st"> </span><span class="kw">str_c</span>(
+  <span class="st">&quot;`Twas brillig, and the slithy toves &quot;</span>,
+  <span class="st">&quot;did gyre and gimble in the wabe: &quot;</span>,
+  <span class="st">&quot;All mimsy were the borogoves, &quot;</span>,
+  <span class="st">&quot;and the mome raths outgrabe. &quot;</span>
+)
+<span class="kw">cat</span>(<span class="kw">str_wrap</span>(jabberwocky, <span class="dt">width =</span> <span class="dv">40</span>))
+<span class="co">#&gt; `Twas brillig, and the slithy toves did</span>
+<span class="co">#&gt; gyre and gimble in the wabe: All mimsy</span>
+<span class="co">#&gt; were the borogoves, and the mome raths</span>
+<span class="co">#&gt; outgrabe.</span></code></pre></div></li>
+</ol>
+</div>
+<div id="locale-sensitive" class="section level2">
+<h2>Locale sensitive</h2>
+<p>A handful of stringr are functions are locale-sensitive: they will perform differently in different regions of the world. These functions case transformation functions:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">x &lt;-<span class="st"> &quot;I like horses.&quot;</span>
+<span class="kw">str_to_upper</span>(x)
+<span class="co">#&gt; [1] &quot;I LIKE HORSES.&quot;</span>
+<span class="kw">str_to_title</span>(x)
+<span class="co">#&gt; [1] &quot;I Like Horses.&quot;</span>
+
+<span class="kw">str_to_lower</span>(x)
+<span class="co">#&gt; [1] &quot;i like horses.&quot;</span>
+<span class="co"># Turkish has two sorts of i: with and without the dot</span>
+<span class="kw">str_to_lower</span>(x, <span class="st">&quot;tr&quot;</span>)
+<span class="co">#&gt; [1] &quot;ı like horses.&quot;</span></code></pre></div>
+<p>And string ordering and sorting:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">x &lt;-<span class="st"> </span><span class="kw">c</span>(<span class="st">&quot;y&quot;</span>, <span class="st">&quot;i&quot;</span>, <span class="st">&quot;k&quot;</span>)
+<span class="kw">str_order</span>(x)
+<span class="co">#&gt; [1] 2 3 1</span>
+
+<span class="kw">str_sort</span>(x)
+<span class="co">#&gt; [1] &quot;i&quot; &quot;k&quot; &quot;y&quot;</span>
+<span class="co"># In Lithuanian, y comes between i and k</span>
+<span class="kw">str_sort</span>(x, <span class="dt">locale =</span> <span class="st">&quot;lt&quot;</span>)
+<span class="co">#&gt; [1] &quot;i&quot; &quot;y&quot; &quot;k&quot;</span></code></pre></div>
+<p>The locale always defaults to English to ensure that the default behaviour is identically across systems. Locales always include a two letter ISO-639-1 language code (like “en” for English or “zh” for Chinese), and optionally a ISO-3166 country code (like “en_UK” vs “en_US”). You can see a complete list of available locales by running <code>stringi::stri_locale_list()</code>.</p>
+</div>
+<div id="pattern-matching" class="section level2">
+<h2>Pattern matching</h2>
+<p>The vast majority of stringr functions work with patterns. These are parameterised by the task they perform and the types of patterns they match.</p>
+<div id="tasks" class="section level3">
+<h3>Tasks</h3>
+<p>Each pattern matching function has the same first two arguments, a character vector of <code>string</code>s to process and a single <code>pattern</code> to match. stringr provides pattern matching functions to <strong>detect</strong>, <strong>locate</strong>, <strong>extract</strong>, <strong>match</strong>, <strong>replace</strong>, and <strong>split</strong> strings. I’ll illustrate how they work with some strings and a regular expression designed to match (US) phone numbers:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">strings &lt;-<span class="st"> </span><span class="kw">c</span>(
+  <span class="st">&quot;apple&quot;</span>, 
+  <span class="st">&quot;219 733 8965&quot;</span>, 
+  <span class="st">&quot;329-293-8753&quot;</span>, 
+  <span class="st">&quot;Work: 579-499-7527; Home: 543.355.3679&quot;</span>
+)
+phone &lt;-<span class="st"> &quot;([2-9][0-9]{2})[- .]([0-9]{3})[- .]([0-9]{4})&quot;</span></code></pre></div>
+<ul>
+<li><p><code>str_detect()</code> detects the presence or absence of a pattern and returns a logical vector (similar to <code>grepl()</code>). <code>str_subset()</code> returns the elements of a character vector that match a regular expression (similar to <code>grep()</code> with <code>value = TRUE</code>)`.</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="co"># Which strings contain phone numbers?</span>
+<span class="kw">str_detect</span>(strings, phone)
+<span class="co">#&gt; [1] FALSE  TRUE  TRUE  TRUE</span>
+<span class="kw">str_subset</span>(strings, phone)
+<span class="co">#&gt; [1] &quot;219 733 8965&quot;                          </span>
+<span class="co">#&gt; [2] &quot;329-293-8753&quot;                          </span>
+<span class="co">#&gt; [3] &quot;Work: 579-499-7527; Home: 543.355.3679&quot;</span></code></pre></div></li>
+<li><p><code>str_count()</code> counts the number of matches:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="co"># How many phone numbers in each string?</span>
+<span class="kw">str_count</span>(strings, phone)
+<span class="co">#&gt; [1] 0 1 1 2</span></code></pre></div></li>
+<li><p><code>str_locate()</code> locates the first position of a pattern and returns a numeric matrix with columns start and end. <code>str_locate_all()</code> locates all matches, returning a list of numeric matrices. Similar to <code>regexpr()</code> and <code>gregexpr()</code>.</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="co"># Where in the string is the phone number located?</span>
+(loc &lt;-<span class="st"> </span><span class="kw">str_locate</span>(strings, phone))
+<span class="co">#&gt;      start end</span>
+<span class="co">#&gt; [1,]    NA  NA</span>
+<span class="co">#&gt; [2,]     1  12</span>
+<span class="co">#&gt; [3,]     1  12</span>
+<span class="co">#&gt; [4,]     7  18</span>
+<span class="kw">str_locate_all</span>(strings, phone)
+<span class="co">#&gt; [[1]]</span>
+<span class="co">#&gt;      start end</span>
+<span class="co">#&gt; </span>
+<span class="co">#&gt; [[2]]</span>
+<span class="co">#&gt;      start end</span>
+<span class="co">#&gt; [1,]     1  12</span>
+<span class="co">#&gt; </span>
+<span class="co">#&gt; [[3]]</span>
+<span class="co">#&gt;      start end</span>
+<span class="co">#&gt; [1,]     1  12</span>
+<span class="co">#&gt; </span>
+<span class="co">#&gt; [[4]]</span>
+<span class="co">#&gt;      start end</span>
+<span class="co">#&gt; [1,]     7  18</span>
+<span class="co">#&gt; [2,]    27  38</span></code></pre></div></li>
+<li><p><code>str_extract()</code> extracts text corresponding to the first match, returning a character vector. <code>str_extract_all()</code> extracts all matches and returns a list of character vectors.</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="co"># What are the phone numbers?</span>
+<span class="kw">str_extract</span>(strings, phone)
+<span class="co">#&gt; [1] NA             &quot;219 733 8965&quot; &quot;329-293-8753&quot; &quot;579-499-7527&quot;</span>
+<span class="kw">str_extract_all</span>(strings, phone)
+<span class="co">#&gt; [[1]]</span>
+<span class="co">#&gt; character(0)</span>
+<span class="co">#&gt; </span>
+<span class="co">#&gt; [[2]]</span>
+<span class="co">#&gt; [1] &quot;219 733 8965&quot;</span>
+<span class="co">#&gt; </span>
+<span class="co">#&gt; [[3]]</span>
+<span class="co">#&gt; [1] &quot;329-293-8753&quot;</span>
+<span class="co">#&gt; </span>
+<span class="co">#&gt; [[4]]</span>
+<span class="co">#&gt; [1] &quot;579-499-7527&quot; &quot;543.355.3679&quot;</span>
+<span class="kw">str_extract_all</span>(strings, phone, <span class="dt">simplify =</span> <span class="ot">TRUE</span>)
+<span class="co">#&gt;      [,1]           [,2]          </span>
+<span class="co">#&gt; [1,] &quot;&quot;             &quot;&quot;            </span>
+<span class="co">#&gt; [2,] &quot;219 733 8965&quot; &quot;&quot;            </span>
+<span class="co">#&gt; [3,] &quot;329-293-8753&quot; &quot;&quot;            </span>
+<span class="co">#&gt; [4,] &quot;579-499-7527&quot; &quot;543.355.3679&quot;</span></code></pre></div></li>
+<li><p><code>str_match()</code> extracts capture groups formed by <code>()</code> from the first match. It returns a character matrix with one column for the complete match and one column for each group. <code>str_match_all()</code> extracts capture groups from all matches and returns a list of character matrices. Similar to <code>regmatches()</code>.</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="co"># Pull out the three components of the match</span>
+<span class="kw">str_match</span>(strings, phone)
+<span class="co">#&gt;      [,1]           [,2]  [,3]  [,4]  </span>
+<span class="co">#&gt; [1,] NA             NA    NA    NA    </span>
+<span class="co">#&gt; [2,] &quot;219 733 8965&quot; &quot;219&quot; &quot;733&quot; &quot;8965&quot;</span>
+<span class="co">#&gt; [3,] &quot;329-293-8753&quot; &quot;329&quot; &quot;293&quot; &quot;8753&quot;</span>
+<span class="co">#&gt; [4,] &quot;579-499-7527&quot; &quot;579&quot; &quot;499&quot; &quot;7527&quot;</span>
+<span class="kw">str_match_all</span>(strings, phone)
+<span class="co">#&gt; [[1]]</span>
+<span class="co">#&gt;      [,1] [,2] [,3] [,4]</span>
+<span class="co">#&gt; </span>
+<span class="co">#&gt; [[2]]</span>
+<span class="co">#&gt;      [,1]           [,2]  [,3]  [,4]  </span>
+<span class="co">#&gt; [1,] &quot;219 733 8965&quot; &quot;219&quot; &quot;733&quot; &quot;8965&quot;</span>
+<span class="co">#&gt; </span>
+<span class="co">#&gt; [[3]]</span>
+<span class="co">#&gt;      [,1]           [,2]  [,3]  [,4]  </span>
+<span class="co">#&gt; [1,] &quot;329-293-8753&quot; &quot;329&quot; &quot;293&quot; &quot;8753&quot;</span>
+<span class="co">#&gt; </span>
+<span class="co">#&gt; [[4]]</span>
+<span class="co">#&gt;      [,1]           [,2]  [,3]  [,4]  </span>
+<span class="co">#&gt; [1,] &quot;579-499-7527&quot; &quot;579&quot; &quot;499&quot; &quot;7527&quot;</span>
+<span class="co">#&gt; [2,] &quot;543.355.3679&quot; &quot;543&quot; &quot;355&quot; &quot;3679&quot;</span></code></pre></div></li>
+<li><p><code>str_replace()</code> replaces the first matched pattern and returns a character vector. <code>str_replace_all()</code> replaces all matches. Similar to <code>sub()</code> and <code>gsub()</code>.</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">str_replace</span>(strings, phone, <span class="st">&quot;XXX-XXX-XXXX&quot;</span>)
+<span class="co">#&gt; [1] &quot;apple&quot;                                 </span>
+<span class="co">#&gt; [2] &quot;XXX-XXX-XXXX&quot;                          </span>
+<span class="co">#&gt; [3] &quot;XXX-XXX-XXXX&quot;                          </span>
+<span class="co">#&gt; [4] &quot;Work: XXX-XXX-XXXX; Home: 543.355.3679&quot;</span>
+<span class="kw">str_replace_all</span>(strings, phone, <span class="st">&quot;XXX-XXX-XXXX&quot;</span>)
+<span class="co">#&gt; [1] &quot;apple&quot;                                 </span>
+<span class="co">#&gt; [2] &quot;XXX-XXX-XXXX&quot;                          </span>
+<span class="co">#&gt; [3] &quot;XXX-XXX-XXXX&quot;                          </span>
+<span class="co">#&gt; [4] &quot;Work: XXX-XXX-XXXX; Home: XXX-XXX-XXXX&quot;</span></code></pre></div></li>
+<li><p><code>str_split_fixed()</code> splits the string into a fixed number of pieces based on a pattern and returns a character matrix. <code>str_split()</code> splits a string into a variable number of pieces and returns a list of character vectors.</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">str_split</span>(<span class="st">&quot;a-b-c&quot;</span>, <span class="st">&quot;-&quot;</span>)
+<span class="co">#&gt; [[1]]</span>
+<span class="co">#&gt; [1] &quot;a&quot; &quot;b&quot; &quot;c&quot;</span>
+<span class="kw">str_split_fixed</span>(<span class="st">&quot;a-b-c&quot;</span>, <span class="st">&quot;-&quot;</span>, <span class="dt">n =</span> <span class="dv">2</span>)
+<span class="co">#&gt;      [,1] [,2] </span>
+<span class="co">#&gt; [1,] &quot;a&quot;  &quot;b-c&quot;</span></code></pre></div></li>
+</ul>
+</div>
+<div id="engines" class="section level3">
+<h3>Engines</h3>
+<p>There are four main engines that stringr can use to describe patterns:</p>
+<ul>
+<li><p>Regular expressions, the default, as shown above, and described in <code>vignette(&quot;regular-expressions&quot;)</code>.</p></li>
+<li><p>Fixed bytewise matching, with <code>fixed()</code>.</p></li>
+<li><p>Locale-sensitve character matching, with <code>coll()</code></p></li>
+<li><p>Text boundary analysis with <code>boundary()</code>.</p></li>
+</ul>
+<div id="fixed-matches" class="section level4">
+<h4>Fixed matches</h4>
+<p><code>fixed(x)</code> only matches the exact sequence of bytes specified by <code>x</code>. This is a very limited “pattern”, but the restriction can make matching much faster. Beware using <code>fixed()</code> with non-English data. It is problematic because there are often multiple ways of representing the same character. For example, there are two ways to define “á”: either as a single character or as an “a” plus an accent:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">a1 &lt;-<span class="st"> &quot;\u00e1&quot;</span>
+a2 &lt;-<span class="st"> &quot;a\u0301&quot;</span>
+<span class="kw">c</span>(a1, a2)
+<span class="co">#&gt; [1] &quot;á&quot; &quot;á&quot;</span>
+a1 ==<span class="st"> </span>a2
+<span class="co">#&gt; [1] FALSE</span></code></pre></div>
+<p>They render identically, but because they’re defined differently, <code>fixed()</code> doesn’t find a match. Instead, you can use <code>coll()</code>, defined next, to respect human character comparison rules:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">str_detect</span>(a1, <span class="kw">fixed</span>(a2))
+<span class="co">#&gt; [1] FALSE</span>
+<span class="kw">str_detect</span>(a1, <span class="kw">coll</span>(a2))
+<span class="co">#&gt; [1] TRUE</span></code></pre></div>
+</div>
+<div id="collation-search" class="section level4">
+<h4>Collation search</h4>
+<p><code>coll(x)</code> looks for a match to <code>x</code> using human-language <strong>coll</strong>ation rules, and is particularly important if you want to do case insensitive matching. Collation rules diffe around the world, so you’ll also need to supply a <code>locale</code> parameter.</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">i &lt;-<span class="st"> </span><span class="kw">c</span>(<span class="st">&quot;I&quot;</span>, <span class="st">&quot;İ&quot;</span>, <span class="st">&quot;i&quot;</span>, <span class="st">&quot;ı&quot;</span>)
+i
+<span class="co">#&gt; [1] &quot;I&quot; &quot;İ&quot; &quot;i&quot; &quot;ı&quot;</span>
+
+<span class="kw">str_subset</span>(i, <span class="kw">coll</span>(<span class="st">&quot;i&quot;</span>, <span class="dt">ignore_case =</span> <span class="ot">TRUE</span>))
+<span class="co">#&gt; [1] &quot;I&quot; &quot;i&quot;</span>
+<span class="kw">str_subset</span>(i, <span class="kw">coll</span>(<span class="st">&quot;i&quot;</span>, <span class="dt">ignore_case =</span> <span class="ot">TRUE</span>, <span class="dt">locale =</span> <span class="st">&quot;tr&quot;</span>))
+<span class="co">#&gt; [1] &quot;İ&quot; &quot;i&quot;</span></code></pre></div>
+<p>The downside of <code>coll()</code> is speed; because the rules for recognising which characters are the same are complicated, <code>coll()</code> is relatively slow compared to <code>regex()</code> and <code>fixed()</code>. Note that will both <code>fixed()</code> and <code>regex()</code> have <code>ignore_case</code> arguments, they perform a much simpler comparison than <code>coll()</code>.</p>
+</div>
+<div id="boundary" class="section level4">
+<h4>Boundary</h4>
+<p><code>boundary()</code> matches boundaries between characters, lines, sentences or words. It’s most useful with <code>str_split()</code>, but can used with all pattern matching functions</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">x &lt;-<span class="st"> &quot;This is a sentence.&quot;</span>
+<span class="kw">str_split</span>(x, <span class="kw">boundary</span>(<span class="st">&quot;word&quot;</span>))
+<span class="co">#&gt; [[1]]</span>
+<span class="co">#&gt; [1] &quot;This&quot;     &quot;is&quot;       &quot;a&quot;        &quot;sentence&quot;</span>
+<span class="kw">str_count</span>(x, <span class="kw">boundary</span>(<span class="st">&quot;word&quot;</span>))
+<span class="co">#&gt; [1] 4</span>
+<span class="kw">str_extract_all</span>(x, <span class="kw">boundary</span>(<span class="st">&quot;word&quot;</span>))
+<span class="co">#&gt; [[1]]</span>
+<span class="co">#&gt; [1] &quot;This&quot;     &quot;is&quot;       &quot;a&quot;        &quot;sentence&quot;</span></code></pre></div>
+<p>By convention, <code>&quot;&quot;</code> is treated as <code>boundary(&quot;character&quot;)</code>:</p>
+<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">str_split</span>(x, <span class="st">&quot;&quot;</span>)
+<span class="co">#&gt; [[1]]</span>
+<span class="co">#&gt;  [1] &quot;T&quot; &quot;h&quot; &quot;i&quot; &quot;s&quot; &quot; &quot; &quot;i&quot; &quot;s&quot; &quot; &quot; &quot;a&quot; &quot; &quot; &quot;s&quot; &quot;e&quot; &quot;n&quot; &quot;t&quot; &quot;e&quot; &quot;n&quot; &quot;c&quot;</span>
+<span class="co">#&gt; [18] &quot;e&quot; &quot;.&quot;</span>
+<span class="kw">str_count</span>(x, <span class="st">&quot;&quot;</span>)
+<span class="co">#&gt; [1] 19</span></code></pre></div>
+</div>
+</div>
+</div>
+
+
+
+<!-- dynamically load mathjax for compatibility with self-contained -->
+<script>
+  (function () {
+    var script = document.createElement("script");
+    script.type = "text/javascript";
+    script.src  = "https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML";
+    document.getElementsByTagName("head")[0].appendChild(script);
+  })();
+</script>
+
+</body>
+</html>

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/doc/stringr.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/Meta/Rd.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/Meta/Rd.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/Meta/vignette.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/Meta/vignette.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/Meta/data.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/Meta/data.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/Meta/package.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/Meta/package.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/Meta/nsInfo.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/Meta/nsInfo.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/Meta/hsearch.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/Meta/hsearch.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/Meta/links.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/Meta/links.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/help/stringr.rdx
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/help/stringr.rdx
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/help/AnIndex
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/help/AnIndex	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/help/AnIndex	(revision 2477)
@@ -0,0 +1,52 @@
+stringr-package	stringr-package
+%>%	pipe
+boundary	modifiers
+case	case
+coll	modifiers
+fixed	modifiers
+fruit	stringr-data
+ignore.case	modifier-deprecated
+invert_match	invert_match
+modifier-deprecated	modifier-deprecated
+modifiers	modifiers
+perl	modifier-deprecated
+regex	modifiers
+sentences	stringr-data
+stringr	stringr-package
+stringr-data	stringr-data
+str_c	str_c
+str_conv	str_conv
+str_count	str_count
+str_detect	str_detect
+str_dup	str_dup
+str_extract	str_extract
+str_extract_all	str_extract
+str_interp	str_interp
+str_join	str_c
+str_length	str_length
+str_locate	str_locate
+str_locate_all	str_locate
+str_match	str_match
+str_match_all	str_match
+str_order	str_order
+str_pad	str_pad
+str_replace	str_replace
+str_replace_all	str_replace
+str_replace_na	str_replace_na
+str_sort	str_order
+str_split	str_split
+str_split_fixed	str_split
+str_sub	str_sub
+str_sub<-	str_sub
+str_subset	str_subset
+str_to_lower	case
+str_to_title	case
+str_to_upper	case
+str_trim	str_trim
+str_trunc	str_trunc
+str_view	str_view
+str_view_all	str_view
+str_which	str_subset
+str_wrap	str_wrap
+word	word
+words	stringr-data
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/help/paths.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/help/paths.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/help/aliases.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/help/aliases.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/help/stringr.rdb
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/help/stringr.rdb
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/data/Rdata.rdx
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/data/Rdata.rdx
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/data/Rdata.rdb
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/data/Rdata.rdb
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/data/Rdata.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/data/Rdata.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/R/stringr.rdb
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/R/stringr.rdb
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/R/stringr.rdx
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/R/stringr.rdx
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/R/stringr
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/R/stringr	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/R/stringr	(revision 2477)
@@ -0,0 +1,27 @@
+#  File share/R/nspackloader.R
+#  Part of the R package, http://www.R-project.org
+#
+#  Copyright (C) 1995-2012 The R Core Team
+#
+#  This program is free software; you can redistribute it and/or modify
+#  it under the terms of the GNU General Public License as published by
+#  the Free Software Foundation; either version 2 of the License, or
+#  (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  A copy of the GNU General Public License is available at
+#  http://www.r-project.org/Licenses/
+
+local({
+    info <- loadingNamespaceInfo()
+    pkg <- info$pkgname
+    ns <- .getNamespace(as.name(pkg))
+    if (is.null(ns))
+        stop("cannot find namespace environment for ", pkg, domain = NA);
+    dbbase <- file.path(info$libname, pkg, "R", pkg)
+    lazyLoad(dbbase, ns, filter = function(n) n != ".__NAMESPACE__.")
+})
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/html/R.css
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/html/R.css	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/html/R.css	(revision 2477)
@@ -0,0 +1,97 @@
+body {
+    background: white;
+    color: black;
+}
+
+a:link {
+    background: white;
+    color: blue;
+}
+
+a:visited {
+    background: white;
+    color: rgb(50%, 0%, 50%);
+}
+
+h1 {
+    background: white;
+    color: rgb(55%, 55%, 55%);
+    font-family: monospace;
+    font-size: x-large;
+    text-align: center;
+}
+
+h2 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-size: large;
+    text-align: center;
+}
+
+h3 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-size: large;
+}
+
+h4 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-style: italic;
+    font-size: large;
+}
+
+h5 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+}
+
+h6 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-style: italic;
+}
+		
+img.toplogo {
+    width: 4em;
+    vertical-align: middle;
+}
+
+img.arrow {
+    width: 30px;
+    height: 30px;
+    border: 0;
+}
+
+span.acronym {
+    font-size: small;
+}
+
+span.env {
+    font-family: monospace;
+}
+
+span.file {
+    font-family: monospace;
+}
+
+span.option{
+    font-family: monospace;
+}
+
+span.pkg {
+    font-weight: bold;
+}
+
+span.samp{
+    font-family: monospace;
+}
+
+div.vignettes a:hover {
+    background: rgb(85%, 85%, 85%);
+}

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/html/R.css
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/html/00Index.html
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/html/00Index.html	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/html/00Index.html	(revision 2477)
@@ -0,0 +1,117 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title>R: Simple, Consistent Wrappers for Common String Operations</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<link rel="stylesheet" type="text/css" href="R.css" />
+</head><body>
+<h1> Simple, Consistent Wrappers for Common String Operations
+<img class="toplogo" src="../../../doc/html/Rlogo.svg" alt="[R logo]" />
+</h1>
+<hr/>
+<div style="text-align: center;">
+<a href="../../../doc/html/packages.html"><img class="arrow" src="../../../doc/html/left.jpg" alt="[Up]" /></a>
+<a href="../../../doc/html/index.html"><img class="arrow" src="../../../doc/html/up.jpg" alt="[Top]" /></a>
+</div><h2>Documentation for package &lsquo;stringr&rsquo; version 1.2.0</h2>
+
+<ul><li><a href="../DESCRIPTION">DESCRIPTION file</a>.</li>
+<li><a href="../doc/index.html">User guides, package vignettes and other documentation.</a></li>
+</ul>
+
+<h2>Help Pages</h2>
+
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="modifiers.html">boundary</a></td>
+<td>Control matching behaviour with modifier functions.</td></tr>
+<tr><td style="width: 25%;"><a href="case.html">case</a></td>
+<td>Convert case of a string.</td></tr>
+<tr><td style="width: 25%;"><a href="modifiers.html">coll</a></td>
+<td>Control matching behaviour with modifier functions.</td></tr>
+<tr><td style="width: 25%;"><a href="modifiers.html">fixed</a></td>
+<td>Control matching behaviour with modifier functions.</td></tr>
+<tr><td style="width: 25%;"><a href="stringr-data.html">fruit</a></td>
+<td>Sample character vectors for practicing string manipulations.</td></tr>
+<tr><td style="width: 25%;"><a href="invert_match.html">invert_match</a></td>
+<td>Switch location of matches to location of non-matches.</td></tr>
+<tr><td style="width: 25%;"><a href="modifiers.html">modifiers</a></td>
+<td>Control matching behaviour with modifier functions.</td></tr>
+<tr><td style="width: 25%;"><a href="modifiers.html">regex</a></td>
+<td>Control matching behaviour with modifier functions.</td></tr>
+<tr><td style="width: 25%;"><a href="stringr-data.html">sentences</a></td>
+<td>Sample character vectors for practicing string manipulations.</td></tr>
+<tr><td style="width: 25%;"><a href="stringr-data.html">stringr-data</a></td>
+<td>Sample character vectors for practicing string manipulations.</td></tr>
+<tr><td style="width: 25%;"><a href="str_c.html">str_c</a></td>
+<td>Join multiple strings into a single string.</td></tr>
+<tr><td style="width: 25%;"><a href="str_conv.html">str_conv</a></td>
+<td>Specify the encoding of a string.</td></tr>
+<tr><td style="width: 25%;"><a href="str_count.html">str_count</a></td>
+<td>Count the number of matches in a string.</td></tr>
+<tr><td style="width: 25%;"><a href="str_detect.html">str_detect</a></td>
+<td>Detect the presence or absence of a pattern in a string.</td></tr>
+<tr><td style="width: 25%;"><a href="str_dup.html">str_dup</a></td>
+<td>Duplicate and concatenate strings within a character vector.</td></tr>
+<tr><td style="width: 25%;"><a href="str_extract.html">str_extract</a></td>
+<td>Extract matching patterns from a string.</td></tr>
+<tr><td style="width: 25%;"><a href="str_extract.html">str_extract_all</a></td>
+<td>Extract matching patterns from a string.</td></tr>
+<tr><td style="width: 25%;"><a href="str_interp.html">str_interp</a></td>
+<td>String interpolation.</td></tr>
+<tr><td style="width: 25%;"><a href="str_c.html">str_join</a></td>
+<td>Join multiple strings into a single string.</td></tr>
+<tr><td style="width: 25%;"><a href="str_length.html">str_length</a></td>
+<td>The length of a string.</td></tr>
+<tr><td style="width: 25%;"><a href="str_locate.html">str_locate</a></td>
+<td>Locate the position of patterns in a string.</td></tr>
+<tr><td style="width: 25%;"><a href="str_locate.html">str_locate_all</a></td>
+<td>Locate the position of patterns in a string.</td></tr>
+<tr><td style="width: 25%;"><a href="str_match.html">str_match</a></td>
+<td>Extract matched groups from a string.</td></tr>
+<tr><td style="width: 25%;"><a href="str_match.html">str_match_all</a></td>
+<td>Extract matched groups from a string.</td></tr>
+<tr><td style="width: 25%;"><a href="str_order.html">str_order</a></td>
+<td>Order or sort a character vector.</td></tr>
+<tr><td style="width: 25%;"><a href="str_pad.html">str_pad</a></td>
+<td>Pad a string.</td></tr>
+<tr><td style="width: 25%;"><a href="str_replace.html">str_replace</a></td>
+<td>Replace matched patterns in a string.</td></tr>
+<tr><td style="width: 25%;"><a href="str_replace.html">str_replace_all</a></td>
+<td>Replace matched patterns in a string.</td></tr>
+<tr><td style="width: 25%;"><a href="str_replace_na.html">str_replace_na</a></td>
+<td>Turn NA into "NA"</td></tr>
+<tr><td style="width: 25%;"><a href="str_order.html">str_sort</a></td>
+<td>Order or sort a character vector.</td></tr>
+<tr><td style="width: 25%;"><a href="str_split.html">str_split</a></td>
+<td>Split up a string into pieces.</td></tr>
+<tr><td style="width: 25%;"><a href="str_split.html">str_split_fixed</a></td>
+<td>Split up a string into pieces.</td></tr>
+<tr><td style="width: 25%;"><a href="str_sub.html">str_sub</a></td>
+<td>Extract and replace substrings from a character vector.</td></tr>
+<tr><td style="width: 25%;"><a href="str_sub.html">str_sub&lt;-</a></td>
+<td>Extract and replace substrings from a character vector.</td></tr>
+<tr><td style="width: 25%;"><a href="str_subset.html">str_subset</a></td>
+<td>Keep strings matching a pattern, or find positions.</td></tr>
+<tr><td style="width: 25%;"><a href="case.html">str_to_lower</a></td>
+<td>Convert case of a string.</td></tr>
+<tr><td style="width: 25%;"><a href="case.html">str_to_title</a></td>
+<td>Convert case of a string.</td></tr>
+<tr><td style="width: 25%;"><a href="case.html">str_to_upper</a></td>
+<td>Convert case of a string.</td></tr>
+<tr><td style="width: 25%;"><a href="str_trim.html">str_trim</a></td>
+<td>Trim whitespace from start and end of string.</td></tr>
+<tr><td style="width: 25%;"><a href="str_trunc.html">str_trunc</a></td>
+<td>Truncate a character string.</td></tr>
+<tr><td style="width: 25%;"><a href="str_view.html">str_view</a></td>
+<td>View HTML rendering of regular expression match.</td></tr>
+<tr><td style="width: 25%;"><a href="str_view.html">str_view_all</a></td>
+<td>View HTML rendering of regular expression match.</td></tr>
+<tr><td style="width: 25%;"><a href="str_subset.html">str_which</a></td>
+<td>Keep strings matching a pattern, or find positions.</td></tr>
+<tr><td style="width: 25%;"><a href="str_wrap.html">str_wrap</a></td>
+<td>Wrap strings into nicely formatted paragraphs.</td></tr>
+<tr><td style="width: 25%;"><a href="word.html">word</a></td>
+<td>Extract words from a sentence.</td></tr>
+<tr><td style="width: 25%;"><a href="stringr-data.html">words</a></td>
+<td>Sample character vectors for practicing string manipulations.</td></tr>
+</table>
+</body></html>

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/stringr/html/00Index.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/foreign/tests/keep/codefile.sps
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/foreign/tests/keep/codefile.sps	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/foreign/tests/keep/codefile.sps	(revision 2477)
@@ -0,0 +1,10 @@
+DATA LIST FILE= "datafile.dat"  free (",")
+/ X1 X2  * X3 (A5)  .
+
+VARIABLE LABELS
+X1 "X1" 
+ X2 "X2" 
+ X3 "X3" 
+ .
+
+EXECUTE.
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/foreign/tests/keep/datafile.dat
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/foreign/tests/keep/datafile.dat	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/foreign/tests/keep/datafile.dat	(revision 2477)
@@ -0,0 +1,3 @@
+1,4,str_1,
+2,5,str_2,
+3,6,str_3,
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/scatterplot3d/html/R.css
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/scatterplot3d/html/R.css	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/scatterplot3d/html/R.css	(revision 2477)
@@ -0,0 +1,97 @@
+body {
+    background: white;
+    color: black;
+}
+
+a:link {
+    background: white;
+    color: blue;
+}
+
+a:visited {
+    background: white;
+    color: rgb(50%, 0%, 50%);
+}
+
+h1 {
+    background: white;
+    color: rgb(55%, 55%, 55%);
+    font-family: monospace;
+    font-size: x-large;
+    text-align: center;
+}
+
+h2 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-size: large;
+    text-align: center;
+}
+
+h3 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-size: large;
+}
+
+h4 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-style: italic;
+    font-size: large;
+}
+
+h5 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+}
+
+h6 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-style: italic;
+}
+		
+img.toplogo {
+    width: 4em;
+    vertical-align: middle;
+}
+
+img.arrow {
+    width: 30px;
+    height: 30px;
+    border: 0;
+}
+
+span.acronym {
+    font-size: small;
+}
+
+span.env {
+    font-family: monospace;
+}
+
+span.file {
+    font-family: monospace;
+}
+
+span.option{
+    font-family: monospace;
+}
+
+span.pkg {
+    font-weight: bold;
+}
+
+span.samp{
+    font-family: monospace;
+}
+
+div.vignettes a:hover {
+    background: rgb(85%, 85%, 85%);
+}

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/scatterplot3d/html/R.css
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/scatterplot3d/html/00Index.html
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/scatterplot3d/html/00Index.html	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/scatterplot3d/html/00Index.html	(revision 2477)
@@ -0,0 +1,27 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title>R: 3D Scatter Plot</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<link rel="stylesheet" type="text/css" href="R.css" />
+</head><body>
+<h1> 3D Scatter Plot
+<img class="toplogo" src="../../../doc/html/Rlogo.svg" alt="[R logo]" />
+</h1>
+<hr/>
+<div style="text-align: center;">
+<a href="../../../doc/html/packages.html"><img class="arrow" src="../../../doc/html/left.jpg" alt="[Up]" /></a>
+<a href="../../../doc/html/index.html"><img class="arrow" src="../../../doc/html/up.jpg" alt="[Top]" /></a>
+</div><h2>Documentation for package &lsquo;scatterplot3d&rsquo; version 0.3-38</h2>
+
+<ul><li><a href="../DESCRIPTION">DESCRIPTION file</a>.</li>
+<li><a href="../doc/index.html">User guides, package vignettes and other documentation.</a></li>
+</ul>
+
+<h2>Help Pages</h2>
+
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="scatterplot3d.html">scatterplot3d</a></td>
+<td>3D Scatter Plot</td></tr>
+</table>
+</body></html>

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/scatterplot3d/html/00Index.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/scatterplot3d/doc/s3d.Rnw
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/scatterplot3d/doc/s3d.Rnw	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/scatterplot3d/doc/s3d.Rnw	(revision 2477)
@@ -0,0 +1,53 @@
+%\VignetteIndexEntry{Scatterplot3d - an R Package for Visualizing Multivariate Data}
+\include{SFBs3d_Def}
+\begin{document}
+\begin{center}
+\vspace*{7 mm}{\Large\bf Scatterplot3d --
+
+an \RR\ package for Visualizing Multivariate Data}
+
+\vspace{22 mm}{\large Uwe Ligges and Martin M\"achler}\vspace{7 mm}
+
+\emph{\small \begin{tabular}{c@{\extracolsep{5mm}}cc}
+Fachbereich Statistik       &  & Seminar f\"ur Statistik\\
+Universit\"at Dortmund      &  &  ETH Z\"urich \\
+44221 Dortmund              &  &  CH-8092 Z\"urich\\
+Germany                     &  &  Switzerland
+\end{tabular}}\end{center}\vspace{30 mm}
+
+Parts of this vignette have been published previously by the Journal of Statistical Software:\\
+Ligges, U. and M\"achler, M. (2003): Scatterplot3d -- an \RR\ Package for Visualizing Multivariate Data.
+{\em Journal of Statistical Software} 8(11), 1--20.
+
+\vspace{5 mm}
+
+{\bf Abstract \label{abstract}}
+\emph{Scatterplot3d} is an \RR\ package for the visualization of
+multivariate data in a three dimensional space.
+\RR\ is a ``language for data analysis and graphics''.
+%% kein Paragraph in kurzem Abstract
+In this paper we discuss the features % advantages
+of the package.
+It is designed by exclusively making use of already existing functions of
+\RR\ and its graphics system and thus shows the extensibility of the \RR\
+graphics system.
+Additionally some examples on generated and real world data are provided,
+as well as the source code and the help page of \sdd .
+
+\input{SFBs3d_Intro}
+\input{SFBs3d_Design}
+\input{SFBs3d_Extend}
+\input{SFBs3d_Examples}
+\input{SFBs3d_Related}
+\input{SFBs3d_Conclusion}
+
+
+\bibliographystyle{chicago}
+\bibliography{ligges}
+\clearpage
+\begin{appendix}
+\section*{Appendix -- help page}
+\small
+\input{scatterplot3d-help}
+\end{appendix}
+\end{document}
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/scatterplot3d/doc/s3d.pdf
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/scatterplot3d/doc/s3d.pdf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/scatterplot3d/doc/index.html
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/scatterplot3d/doc/index.html	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/scatterplot3d/doc/index.html	(revision 2477)
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title>R: Vignettes and other documentation</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<link rel="stylesheet" type="text/css" href="/doc/html/R.css" />
+</head><body>
+<h1> Vignettes and other documentation
+<img class="toplogo" src="/doc/html/Rlogo.svg" alt="[R logo]" />
+</h1>
+<hr/>
+<div style="text-align: center;">
+<a href="/doc/html/index.html"><img class="arrow" src="/doc/html/up.jpg" alt="[Top]" /></a>
+</div>
+<h2>Vignettes from package 'scatterplot3d'</h2>
+<table width="100%">
+<col style="width: 22%;" />
+<col style="width:  2%;" />
+<col style="width: 50%;" />
+<col style="width:  8%;" />
+<col style="width:  8%;" />
+<col style="width:  8%;" />
+<tr><td style="text-align: right; vertical-align: top;"><a href="../../../library/scatterplot3d/doc/s3d.pdf">scatterplot3d::s3d</a></td>
+<td></td><td valign="top">Scatterplot3d - an R Package for Visualizing Multivariate Data</td>
+<td valign="top"><a href="../../../library/scatterplot3d/doc/s3d.pdf">PDF</a></td>
+<td valign="top"><a href="../../../library/scatterplot3d/doc/s3d.Rnw">source</a></td>
+<td valign="top" style="white-space: nowrap"></td></tr>
+</table>
+</body></html>

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/scatterplot3d/doc/index.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/scatterplot3d/po/en/LC_MESSAGES/R-scatterplot3d.mo
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/scatterplot3d/po/en/LC_MESSAGES/R-scatterplot3d.mo
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/scatterplot3d/po/de/LC_MESSAGES/R-scatterplot3d.mo
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/scatterplot3d/po/de/LC_MESSAGES/R-scatterplot3d.mo
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mgcv/data/columb.polys.rda
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mgcv/data/columb.polys.rda
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mgcv/data/columb.rda
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mgcv/data/columb.rda
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mgcv/po/fr/LC_MESSAGES/R-mgcv.mo
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mgcv/po/fr/LC_MESSAGES/R-mgcv.mo
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mgcv/po/fr/LC_MESSAGES/mgcv.mo
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mgcv/po/fr/LC_MESSAGES/mgcv.mo
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mgcv/po/de/LC_MESSAGES/R-mgcv.mo
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mgcv/po/de/LC_MESSAGES/R-mgcv.mo
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mgcv/po/de/LC_MESSAGES/mgcv.mo
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mgcv/po/de/LC_MESSAGES/mgcv.mo
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mgcv/po/ko/LC_MESSAGES/R-mgcv.mo
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mgcv/po/ko/LC_MESSAGES/R-mgcv.mo
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mgcv/po/ko/LC_MESSAGES/mgcv.mo
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mgcv/po/ko/LC_MESSAGES/mgcv.mo
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mgcv/po/en@quot/LC_MESSAGES/R-mgcv.mo
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mgcv/po/en@quot/LC_MESSAGES/R-mgcv.mo
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mgcv/po/en@quot/LC_MESSAGES/mgcv.mo
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mgcv/po/en@quot/LC_MESSAGES/mgcv.mo
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mgcv/po/pl/LC_MESSAGES/R-mgcv.mo
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mgcv/po/pl/LC_MESSAGES/R-mgcv.mo
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mgcv/po/pl/LC_MESSAGES/mgcv.mo
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mgcv/po/pl/LC_MESSAGES/mgcv.mo
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mgcv/R/mgcv.rdx
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mgcv/R/mgcv.rdx
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mgcv/R/mgcv
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mgcv/R/mgcv	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mgcv/R/mgcv	(revision 2477)
@@ -0,0 +1,27 @@
+#  File share/R/nspackloader.R
+#  Part of the R package, http://www.R-project.org
+#
+#  Copyright (C) 1995-2012 The R Core Team
+#
+#  This program is free software; you can redistribute it and/or modify
+#  it under the terms of the GNU General Public License as published by
+#  the Free Software Foundation; either version 2 of the License, or
+#  (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  A copy of the GNU General Public License is available at
+#  http://www.r-project.org/Licenses/
+
+local({
+    info <- loadingNamespaceInfo()
+    pkg <- info$pkgname
+    ns <- .getNamespace(as.name(pkg))
+    if (is.null(ns))
+        stop("cannot find namespace environment for ", pkg, domain = NA);
+    dbbase <- file.path(info$libname, pkg, "R", pkg)
+    lazyLoad(dbbase, ns, filter = function(n) n != ".__NAMESPACE__.")
+})
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mgcv/R/mgcv.rdb
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mgcv/R/mgcv.rdb
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mgcv/html/R.css
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mgcv/html/R.css	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mgcv/html/R.css	(revision 2477)
@@ -0,0 +1,97 @@
+body {
+    background: white;
+    color: black;
+}
+
+a:link {
+    background: white;
+    color: blue;
+}
+
+a:visited {
+    background: white;
+    color: rgb(50%, 0%, 50%);
+}
+
+h1 {
+    background: white;
+    color: rgb(55%, 55%, 55%);
+    font-family: monospace;
+    font-size: x-large;
+    text-align: center;
+}
+
+h2 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-size: large;
+    text-align: center;
+}
+
+h3 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-size: large;
+}
+
+h4 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-style: italic;
+    font-size: large;
+}
+
+h5 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+}
+
+h6 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-style: italic;
+}
+		
+img.toplogo {
+    width: 4em;
+    vertical-align: middle;
+}
+
+img.arrow {
+    width: 30px;
+    height: 30px;
+    border: 0;
+}
+
+span.acronym {
+    font-size: small;
+}
+
+span.env {
+    font-family: monospace;
+}
+
+span.file {
+    font-family: monospace;
+}
+
+span.option{
+    font-family: monospace;
+}
+
+span.pkg {
+    font-weight: bold;
+}
+
+span.samp{
+    font-family: monospace;
+}
+
+div.vignettes a:hover {
+    background: rgb(85%, 85%, 85%);
+}

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mgcv/html/R.css
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mgcv/html/00Index.html
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mgcv/html/00Index.html	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mgcv/html/00Index.html	(revision 2477)
@@ -0,0 +1,572 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title>R: Mixed GAM Computation Vehicle with GCV/AIC/REML Smoothness
+Estimation</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<link rel="stylesheet" type="text/css" href="R.css" />
+</head><body>
+<h1> Mixed GAM Computation Vehicle with GCV/AIC/REML Smoothness
+Estimation
+<img class="toplogo" src="../../../doc/html/Rlogo.svg" alt="[R logo]" />
+</h1>
+<hr/>
+<div style="text-align: center;">
+<a href="../../../doc/html/packages.html"><img class="arrow" src="../../../doc/html/left.jpg" alt="[Up]" /></a>
+<a href="../../../doc/html/index.html"><img class="arrow" src="../../../doc/html/up.jpg" alt="[Top]" /></a>
+</div><h2>Documentation for package &lsquo;mgcv&rsquo; version 1.8-15</h2>
+
+<ul><li><a href="../DESCRIPTION">DESCRIPTION file</a>.</li>
+</ul>
+
+<h2>Help Pages</h2>
+
+
+<p style="text-align: center;">
+<a href="# "> </a>
+<a href="#A">A</a>
+<a href="#B">B</a>
+<a href="#C">C</a>
+<a href="#D">D</a>
+<a href="#E">E</a>
+<a href="#F">F</a>
+<a href="#G">G</a>
+<a href="#I">I</a>
+<a href="#J">J</a>
+<a href="#L">L</a>
+<a href="#M">M</a>
+<a href="#N">N</a>
+<a href="#O">O</a>
+<a href="#P">P</a>
+<a href="#Q">Q</a>
+<a href="#R">R</a>
+<a href="#S">S</a>
+<a href="#T">T</a>
+<a href="#U">U</a>
+<a href="#V">V</a>
+<a href="#Z">Z</a>
+</p>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="mgcv-package.html">mgcv-package</a></td>
+<td>Mixed GAM Computation Vehicle with GCV/AIC/REML smoothness estimation and GAMMs by REML/PQL</td></tr>
+</table>
+
+<h2><a name="A">-- A --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="smooth.construct.ad.smooth.spec.html">adaptive.smooth</a></td>
+<td>Adaptive smooths in GAMs</td></tr>
+<tr><td style="width: 25%;"><a href="logLik.gam.html">AIC.gam</a></td>
+<td>Log likelihood for a fitted GAM, for AIC</td></tr>
+<tr><td style="width: 25%;"><a href="anova.gam.html">anova.gam</a></td>
+<td>Approximate hypothesis tests related to GAM fits</td></tr>
+</table>
+
+<h2><a name="B">-- B --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="smooth.construct.bs.smooth.spec.html">b.spline</a></td>
+<td>Penalized B-splines in GAMs</td></tr>
+<tr><td style="width: 25%;"><a href="bam.html">bam</a></td>
+<td>Generalized additive models for very large datasets</td></tr>
+<tr><td style="width: 25%;"><a href="bam.update.html">bam.update</a></td>
+<td>Update a strictly additive bam model for new data.</td></tr>
+<tr><td style="width: 25%;"><a href="bandchol.html">bandchol</a></td>
+<td>Choleski decomposition of a band diagonal matrix</td></tr>
+<tr><td style="width: 25%;"><a href="Beta.html">betar</a></td>
+<td>GAM beta regression family</td></tr>
+<tr><td style="width: 25%;"><a href="bug.reports.mgcv.html">bug.reports.mgcv</a></td>
+<td>Reporting mgcv bugs.</td></tr>
+</table>
+
+<h2><a name="C">-- C --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="choose.k.html">choose.k</a></td>
+<td>Basis dimension choice for smooths</td></tr>
+<tr><td style="width: 25%;"><a href="pdIdnot.html">coef.pdIdnot</a></td>
+<td>Overflow proof pdMat class for multiples of the identity matrix</td></tr>
+<tr><td style="width: 25%;"><a href="pdTens.html">coef.pdTens</a></td>
+<td>Functions implementing a pdMat class for tensor product smooths</td></tr>
+<tr><td style="width: 25%;"><a href="columb.html">columb</a></td>
+<td>Reduced version of Columbus OH crime data</td></tr>
+<tr><td style="width: 25%;"><a href="columb.html">columb.polys</a></td>
+<td>Reduced version of Columbus OH crime data</td></tr>
+<tr><td style="width: 25%;"><a href="concurvity.html">concurvity</a></td>
+<td>GAM concurvity measures</td></tr>
+<tr><td style="width: 25%;"><a href="pdIdnot.html">corMatrix.pdIdnot</a></td>
+<td>Overflow proof pdMat class for multiples of the identity matrix</td></tr>
+<tr><td style="width: 25%;"><a href="coxph.html">cox.ph</a></td>
+<td>Additive Cox Proportional Hazard Model</td></tr>
+<tr><td style="width: 25%;"><a href="coxpht.html">cox.pht</a></td>
+<td>Additive Cox proportional hazard models with time varying covariates</td></tr>
+<tr><td style="width: 25%;"><a href="cSplineDes.html">cSplineDes</a></td>
+<td>Evaluate cyclic B spline basis</td></tr>
+<tr><td style="width: 25%;"><a href="smooth.construct.cr.smooth.spec.html">cubic.regression.spline</a></td>
+<td>Penalized Cubic regression splines in GAMs</td></tr>
+<tr><td style="width: 25%;"><a href="smooth.construct.cr.smooth.spec.html">cyclic.cubic.spline</a></td>
+<td>Penalized Cubic regression splines in GAMs</td></tr>
+<tr><td style="width: 25%;"><a href="smooth.construct.ps.smooth.spec.html">cyclic.p.spline</a></td>
+<td>P-splines in GAMs</td></tr>
+</table>
+
+<h2><a name="D">-- D --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="pdIdnot.html">Dim.pdIdnot</a></td>
+<td>Overflow proof pdMat class for multiples of the identity matrix</td></tr>
+<tr><td style="width: 25%;"><a href="smooth.construct.ds.smooth.spec.html">Duchon.spline</a></td>
+<td>Low rank Duchon 1977 splines</td></tr>
+</table>
+
+<h2><a name="E">-- E --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="exclude.too.far.html">exclude.too.far</a></td>
+<td>Exclude prediction grid points too far from data</td></tr>
+<tr><td style="width: 25%;"><a href="extract.lme.cov.html">extract.lme.cov</a></td>
+<td>Extract the data covariance matrix from an lme object</td></tr>
+<tr><td style="width: 25%;"><a href="extract.lme.cov.html">extract.lme.cov2</a></td>
+<td>Extract the data covariance matrix from an lme object</td></tr>
+</table>
+
+<h2><a name="F">-- F --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="smooth.construct.fs.smooth.spec.html">factor.smooth.interaction</a></td>
+<td>Factor smooth interactions in GAMs</td></tr>
+<tr><td style="width: 25%;"><a href="family.mgcv.html">family.mgcv</a></td>
+<td>Distribution families in mgcv</td></tr>
+<tr><td style="width: 25%;"><a href="fix.family.link.html">fix.family.link</a></td>
+<td>Modify families for use in GAM fitting and checking</td></tr>
+<tr><td style="width: 25%;"><a href="fix.family.link.html">fix.family.ls</a></td>
+<td>Modify families for use in GAM fitting and checking</td></tr>
+<tr><td style="width: 25%;"><a href="fix.family.link.html">fix.family.qf</a></td>
+<td>Modify families for use in GAM fitting and checking</td></tr>
+<tr><td style="width: 25%;"><a href="fix.family.link.html">fix.family.rd</a></td>
+<td>Modify families for use in GAM fitting and checking</td></tr>
+<tr><td style="width: 25%;"><a href="fix.family.link.html">fix.family.var</a></td>
+<td>Modify families for use in GAM fitting and checking</td></tr>
+<tr><td style="width: 25%;"><a href="fixDependence.html">fixDependence</a></td>
+<td>Detect linear dependencies of one matrix on another</td></tr>
+<tr><td style="width: 25%;"><a href="formula.gam.html">formula.gam</a></td>
+<td>GAM formula</td></tr>
+<tr><td style="width: 25%;"><a href="formXtViX.html">formXtViX</a></td>
+<td>Form component of GAMM covariance matrix</td></tr>
+<tr><td style="width: 25%;"><a href="fs.test.html">fs.boundary</a></td>
+<td>FELSPLINE test function</td></tr>
+<tr><td style="width: 25%;"><a href="fs.test.html">fs.test</a></td>
+<td>FELSPLINE test function</td></tr>
+<tr><td style="width: 25%;"><a href="full.score.html">full.score</a></td>
+<td>GCV/UBRE score for use within nlm</td></tr>
+<tr><td style="width: 25%;"><a href="linear.functional.terms.html">function.predictors</a></td>
+<td>Linear functionals of a smooth in GAMs</td></tr>
+</table>
+
+<h2><a name="G">-- G --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="gam.html">gam</a></td>
+<td>Generalized additive models with integrated smoothness estimation</td></tr>
+<tr><td style="width: 25%;"><a href="gam.check.html">gam.check</a></td>
+<td>Some diagnostics for a fitted gam model</td></tr>
+<tr><td style="width: 25%;"><a href="gam.control.html">gam.control</a></td>
+<td>Setting GAM fitting defaults</td></tr>
+<tr><td style="width: 25%;"><a href="gam.convergence.html">gam.convergence</a></td>
+<td>GAM convergence and performance issues</td></tr>
+<tr><td style="width: 25%;"><a href="gam.fit.html">gam.fit</a></td>
+<td>GAM P-IRLS estimation with GCV/UBRE smoothness estimation</td></tr>
+<tr><td style="width: 25%;"><a href="gam.fit3.html">gam.fit3</a></td>
+<td>P-IRLS GAM estimation with GCV &amp; UBRE/AIC or RE/ML derivative calculation</td></tr>
+<tr><td style="width: 25%;"><a href="gam.models.html">gam.models</a></td>
+<td>Specifying generalized additive models</td></tr>
+<tr><td style="width: 25%;"><a href="gam.outer.html">gam.outer</a></td>
+<td>Minimize GCV or UBRE score of a GAM using 'outer' iteration</td></tr>
+<tr><td style="width: 25%;"><a href="gam.convergence.html">gam.performance</a></td>
+<td>GAM convergence and performance issues</td></tr>
+<tr><td style="width: 25%;"><a href="gam.scale.html">gam.scale</a></td>
+<td>Scale parameter estimation in GAMs</td></tr>
+<tr><td style="width: 25%;"><a href="gam.selection.html">gam.selection</a></td>
+<td>Generalized Additive Model Selection</td></tr>
+<tr><td style="width: 25%;"><a href="gam.side.html">gam.side</a></td>
+<td>Identifiability side conditions for a GAM</td></tr>
+<tr><td style="width: 25%;"><a href="gam.vcomp.html">gam.vcomp</a></td>
+<td>Report gam smoothness estimates as variance components</td></tr>
+<tr><td style="width: 25%;"><a href="gam2objective.html">gam2derivative</a></td>
+<td>Objective functions for GAM smoothing parameter estimation</td></tr>
+<tr><td style="width: 25%;"><a href="gam2objective.html">gam2objective</a></td>
+<td>Objective functions for GAM smoothing parameter estimation</td></tr>
+<tr><td style="width: 25%;"><a href="gamm.html">gamm</a></td>
+<td>Generalized Additive Mixed Models</td></tr>
+<tr><td style="width: 25%;"><a href="gamObject.html">gamObject</a></td>
+<td>Fitted gam object</td></tr>
+<tr><td style="width: 25%;"><a href="gamSim.html">gamSim</a></td>
+<td>Simulate example data for GAMs</td></tr>
+<tr><td style="width: 25%;"><a href="gaulss.html">gaulss</a></td>
+<td>Gaussian location-scale model family</td></tr>
+<tr><td style="width: 25%;"><a href="get.var.html">get.var</a></td>
+<td>Get named variable or evaluate expression from list or data.frame</td></tr>
+<tr><td style="width: 25%;"><a href="gevlss.html">gevlss</a></td>
+<td>Generalized Extreme Value location-scale model family</td></tr>
+<tr><td style="width: 25%;"><a href="smooth.construct.gp.smooth.spec.html">gp.smooth</a></td>
+<td>Low rank Gaussian process smooths</td></tr>
+</table>
+
+<h2><a name="I">-- I --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="identifiability.html">identifiability</a></td>
+<td>Identifiability constraints</td></tr>
+<tr><td style="width: 25%;"><a href="in.out.html">in.out</a></td>
+<td>Which of a set of points lie within a polygon defined region</td></tr>
+<tr><td style="width: 25%;"><a href="influence.gam.html">influence.gam</a></td>
+<td>Extract the diagonal of the influence/hat matrix for a GAM</td></tr>
+<tr><td style="width: 25%;"><a href="initial.sp.html">initial.sp</a></td>
+<td>Starting values for multiple smoothing parameter estimation</td></tr>
+<tr><td style="width: 25%;"><a href="inSide.html">inSide</a></td>
+<td>Are points inside boundary?</td></tr>
+<tr><td style="width: 25%;"><a href="interpret.gam.html">interpret.gam</a></td>
+<td>Interpret a GAM formula</td></tr>
+</table>
+
+<h2><a name="J">-- J --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="jagam.html">jagam</a></td>
+<td>Just Another Gibbs Additive Modeller: JAGS support for mgcv.</td></tr>
+</table>
+
+<h2><a name="L">-- L --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="ldTweedie.html">ldTweedie</a></td>
+<td>Log Tweedie density evaluation</td></tr>
+<tr><td style="width: 25%;"><a href="linear.functional.terms.html">linear.functional.terms</a></td>
+<td>Linear functionals of a smooth in GAMs</td></tr>
+<tr><td style="width: 25%;"><a href="pdIdnot.html">logDet.pdIdnot</a></td>
+<td>Overflow proof pdMat class for multiples of the identity matrix</td></tr>
+<tr><td style="width: 25%;"><a href="logLik.gam.html">logLik.gam</a></td>
+<td>Log likelihood for a fitted GAM, for AIC</td></tr>
+<tr><td style="width: 25%;"><a href="ls.size.html">ls.size</a></td>
+<td>Size of list elements</td></tr>
+</table>
+
+<h2><a name="M">-- M --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="magic.html">magic</a></td>
+<td>Stable Multiple Smoothing Parameter Estimation by GCV or UBRE</td></tr>
+<tr><td style="width: 25%;"><a href="magic.post.proc.html">magic.post.proc</a></td>
+<td>Auxilliary information from magic fit</td></tr>
+<tr><td style="width: 25%;"><a href="mgcv-package.html">mgcv</a></td>
+<td>Mixed GAM Computation Vehicle with GCV/AIC/REML smoothness estimation and GAMMs by REML/PQL</td></tr>
+<tr><td style="width: 25%;"><a href="mgcv-FAQ.html">mgcv.FAQ</a></td>
+<td>Frequently Asked Questions for package mgcv</td></tr>
+<tr><td style="width: 25%;"><a href="mgcv-package.html">mgcv.package</a></td>
+<td>Mixed GAM Computation Vehicle with GCV/AIC/REML smoothness estimation and GAMMs by REML/PQL</td></tr>
+<tr><td style="width: 25%;"><a href="mgcv-parallel.html">mgcv.parallel</a></td>
+<td>Parallel computation in mgcv.</td></tr>
+<tr><td style="width: 25%;"><a href="missing.data.html">missing.data</a></td>
+<td>Missing data in GAMs</td></tr>
+<tr><td style="width: 25%;"><a href="model.matrix.gam.html">model.matrix.gam</a></td>
+<td>Extract model matrix from GAM fit</td></tr>
+<tr><td style="width: 25%;"><a href="mono.con.html">mono.con</a></td>
+<td>Monotonicity constraints for a cubic regression spline</td></tr>
+<tr><td style="width: 25%;"><a href="smooth.construct.mrf.smooth.spec.html">mrf</a></td>
+<td>Markov Random Field Smooths</td></tr>
+<tr><td style="width: 25%;"><a href="mroot.html">mroot</a></td>
+<td>Smallest square root of matrix</td></tr>
+<tr><td style="width: 25%;"><a href="multinom.html">multinom</a></td>
+<td>GAM multinomial logistic regression</td></tr>
+<tr><td style="width: 25%;"><a href="mvn.html">mvn</a></td>
+<td>Multivariate normal additive models</td></tr>
+</table>
+
+<h2><a name="N">-- N --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="negbin.html">nb</a></td>
+<td>GAM negative binomial families</td></tr>
+<tr><td style="width: 25%;"><a href="negbin.html">negbin</a></td>
+<td>GAM negative binomial families</td></tr>
+<tr><td style="width: 25%;"><a href="new.name.html">new.name</a></td>
+<td>Obtain a name for a new variable that is not already in use</td></tr>
+<tr><td style="width: 25%;"><a href="notExp.html">notExp</a></td>
+<td>Functions for better-than-log positive parameterization</td></tr>
+<tr><td style="width: 25%;"><a href="notExp2.html">notExp2</a></td>
+<td>Alternative to log parameterization for variance components</td></tr>
+<tr><td style="width: 25%;"><a href="notExp.html">notLog</a></td>
+<td>Functions for better-than-log positive parameterization</td></tr>
+<tr><td style="width: 25%;"><a href="notExp2.html">notLog2</a></td>
+<td>Alternative to log parameterization for variance components</td></tr>
+<tr><td style="width: 25%;"><a href="null.space.dimension.html">null.space.dimension</a></td>
+<td>The basis of the space of un-penalized functions for a TPRS</td></tr>
+</table>
+
+<h2><a name="O">-- O --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="ocat.html">ocat</a></td>
+<td>GAM ordered categorical family</td></tr>
+<tr><td style="width: 25%;"><a href="one.se.rule.html">one.se.rule</a></td>
+<td>The one standard error rule for smoother models</td></tr>
+<tr><td style="width: 25%;"><a href="ocat.html">ordered.categorical</a></td>
+<td>GAM ordered categorical family</td></tr>
+</table>
+
+<h2><a name="P">-- P --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="smooth.construct.ps.smooth.spec.html">p.spline</a></td>
+<td>P-splines in GAMs</td></tr>
+<tr><td style="width: 25%;"><a href="pcls.html">pcls</a></td>
+<td>Penalized Constrained Least Squares Fitting</td></tr>
+<tr><td style="width: 25%;"><a href="pdIdnot.html">pdConstruct.pdIdnot</a></td>
+<td>Overflow proof pdMat class for multiples of the identity matrix</td></tr>
+<tr><td style="width: 25%;"><a href="pdTens.html">pdConstruct.pdTens</a></td>
+<td>Functions implementing a pdMat class for tensor product smooths</td></tr>
+<tr><td style="width: 25%;"><a href="pdIdnot.html">pdFactor.pdIdnot</a></td>
+<td>Overflow proof pdMat class for multiples of the identity matrix</td></tr>
+<tr><td style="width: 25%;"><a href="pdTens.html">pdFactor.pdTens</a></td>
+<td>Functions implementing a pdMat class for tensor product smooths</td></tr>
+<tr><td style="width: 25%;"><a href="pdIdnot.html">pdIdnot</a></td>
+<td>Overflow proof pdMat class for multiples of the identity matrix</td></tr>
+<tr><td style="width: 25%;"><a href="pdIdnot.html">pdMatrix.pdIdnot</a></td>
+<td>Overflow proof pdMat class for multiples of the identity matrix</td></tr>
+<tr><td style="width: 25%;"><a href="pdTens.html">pdMatrix.pdTens</a></td>
+<td>Functions implementing a pdMat class for tensor product smooths</td></tr>
+<tr><td style="width: 25%;"><a href="pdTens.html">pdTens</a></td>
+<td>Functions implementing a pdMat class for tensor product smooths</td></tr>
+<tr><td style="width: 25%;"><a href="pen.edf.html">pen.edf</a></td>
+<td>Extract the effective degrees of freedom associated with each penalty in a gam fit</td></tr>
+<tr><td style="width: 25%;"><a href="vis.gam.html">persp.gam</a></td>
+<td>Visualization of GAM objects</td></tr>
+<tr><td style="width: 25%;"><a href="place.knots.html">place.knots</a></td>
+<td>Automatically place a set of knots evenly through covariate values</td></tr>
+<tr><td style="width: 25%;"><a href="plot.gam.html">plot.gam</a></td>
+<td>Default GAM plotting</td></tr>
+<tr><td style="width: 25%;"><a href="polys.plot.html">polys.plot</a></td>
+<td>Plot geographic regions defined as polygons</td></tr>
+<tr><td style="width: 25%;"><a href="predict.bam.html">predict.bam</a></td>
+<td>Prediction from fitted Big Additive Model model</td></tr>
+<tr><td style="width: 25%;"><a href="predict.gam.html">predict.gam</a></td>
+<td>Prediction from fitted GAM model</td></tr>
+<tr><td style="width: 25%;"><a href="Predict.matrix.html">Predict.matrix</a></td>
+<td>Prediction methods for smooth terms in a GAM</td></tr>
+<tr><td style="width: 25%;"><a href="smooth.construct.bs.smooth.spec.html">Predict.matrix.Bspline.smooth</a></td>
+<td>Penalized B-splines in GAMs</td></tr>
+<tr><td style="width: 25%;"><a href="Predict.matrix.cr.smooth.html">Predict.matrix.cr.smooth</a></td>
+<td>Predict matrix method functions</td></tr>
+<tr><td style="width: 25%;"><a href="Predict.matrix.cr.smooth.html">Predict.matrix.cs.smooth</a></td>
+<td>Predict matrix method functions</td></tr>
+<tr><td style="width: 25%;"><a href="Predict.matrix.cr.smooth.html">Predict.matrix.cyclic.smooth</a></td>
+<td>Predict matrix method functions</td></tr>
+<tr><td style="width: 25%;"><a href="smooth.construct.ds.smooth.spec.html">Predict.matrix.duchon.spline</a></td>
+<td>Low rank Duchon 1977 splines</td></tr>
+<tr><td style="width: 25%;"><a href="smooth.construct.fs.smooth.spec.html">Predict.matrix.fs.interaction</a></td>
+<td>Factor smooth interactions in GAMs</td></tr>
+<tr><td style="width: 25%;"><a href="smooth.construct.gp.smooth.spec.html">Predict.matrix.gp.smooth</a></td>
+<td>Low rank Gaussian process smooths</td></tr>
+<tr><td style="width: 25%;"><a href="smooth.construct.mrf.smooth.spec.html">Predict.matrix.mrf.smooth</a></td>
+<td>Markov Random Field Smooths</td></tr>
+<tr><td style="width: 25%;"><a href="Predict.matrix.cr.smooth.html">Predict.matrix.pspline.smooth</a></td>
+<td>Predict matrix method functions</td></tr>
+<tr><td style="width: 25%;"><a href="smooth.construct.re.smooth.spec.html">Predict.matrix.random.effect</a></td>
+<td>Simple random effects in GAMs</td></tr>
+<tr><td style="width: 25%;"><a href="Predict.matrix.soap.film.html">Predict.matrix.sf</a></td>
+<td>Prediction matrix for soap film smooth</td></tr>
+<tr><td style="width: 25%;"><a href="Predict.matrix.soap.film.html">Predict.matrix.soap.film</a></td>
+<td>Prediction matrix for soap film smooth</td></tr>
+<tr><td style="width: 25%;"><a href="smooth.construct.sos.smooth.spec.html">Predict.matrix.sos.smooth</a></td>
+<td>Splines on the sphere</td></tr>
+<tr><td style="width: 25%;"><a href="Predict.matrix.soap.film.html">Predict.matrix.sw</a></td>
+<td>Prediction matrix for soap film smooth</td></tr>
+<tr><td style="width: 25%;"><a href="Predict.matrix.cr.smooth.html">Predict.matrix.t2.smooth</a></td>
+<td>Predict matrix method functions</td></tr>
+<tr><td style="width: 25%;"><a href="Predict.matrix.cr.smooth.html">Predict.matrix.tensor.smooth</a></td>
+<td>Predict matrix method functions</td></tr>
+<tr><td style="width: 25%;"><a href="Predict.matrix.cr.smooth.html">Predict.matrix.tprs.smooth</a></td>
+<td>Predict matrix method functions</td></tr>
+<tr><td style="width: 25%;"><a href="Predict.matrix.cr.smooth.html">Predict.matrix.ts.smooth</a></td>
+<td>Predict matrix method functions</td></tr>
+<tr><td style="width: 25%;"><a href="Predict.matrix.html">Predict.matrix2</a></td>
+<td>Prediction methods for smooth terms in a GAM</td></tr>
+<tr><td style="width: 25%;"><a href="smoothCon.html">PredictMat</a></td>
+<td>Prediction/Construction wrapper functions for GAM smooth terms</td></tr>
+<tr><td style="width: 25%;"><a href="anova.gam.html">print.anova.gam</a></td>
+<td>Approximate hypothesis tests related to GAM fits</td></tr>
+<tr><td style="width: 25%;"><a href="print.gam.html">print.gam</a></td>
+<td>Print a Generalized Additive Model object.</td></tr>
+<tr><td style="width: 25%;"><a href="summary.gam.html">print.summary.gam</a></td>
+<td>Summary for a GAM fit</td></tr>
+</table>
+
+<h2><a name="Q">-- Q --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="qq.gam.html">qq.gam</a></td>
+<td>QQ plots for gam model residuals</td></tr>
+</table>
+
+<h2><a name="R">-- R --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="random.effects.html">random.effects</a></td>
+<td>Random effects in GAMs</td></tr>
+<tr><td style="width: 25%;"><a href="residuals.gam.html">residuals.gam</a></td>
+<td>Generalized Additive Model residuals</td></tr>
+<tr><td style="width: 25%;"><a href="rig.html">rig</a></td>
+<td>Generate inverse Gaussian random deviates</td></tr>
+<tr><td style="width: 25%;"><a href="rmvn.html">rmvn</a></td>
+<td>Generate multivariate normal deviates</td></tr>
+<tr><td style="width: 25%;"><a href="Rrank.html">Rrank</a></td>
+<td>Find rank of upper triangular matrix</td></tr>
+<tr><td style="width: 25%;"><a href="rTweedie.html">rTweedie</a></td>
+<td>Generate Tweedie random deviates</td></tr>
+</table>
+
+<h2><a name="S">-- S --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="s.html">s</a></td>
+<td>Defining smooths in GAM formulae</td></tr>
+<tr><td style="width: 25%;"><a href="scat.html">scat</a></td>
+<td>GAM scaled t family for heavy tailed data</td></tr>
+<tr><td style="width: 25%;"><a href="sdiag.html">sdiag</a></td>
+<td>Extract or modify diagonals of a matrix</td></tr>
+<tr><td style="width: 25%;"><a href="sdiag.html">sdiag&lt;-</a></td>
+<td>Extract or modify diagonals of a matrix</td></tr>
+<tr><td style="width: 25%;"><a href="linear.functional.terms.html">signal.regression</a></td>
+<td>Linear functionals of a smooth in GAMs</td></tr>
+<tr><td style="width: 25%;"><a href="jagam.html">sim2jam</a></td>
+<td>Just Another Gibbs Additive Modeller: JAGS support for mgcv.</td></tr>
+<tr><td style="width: 25%;"><a href="single.index.html">single.index</a></td>
+<td>Single index models with mgcv</td></tr>
+<tr><td style="width: 25%;"><a href="slanczos.html">slanczos</a></td>
+<td>Compute truncated eigen decomposition of a symmetric matrix</td></tr>
+<tr><td style="width: 25%;"><a href="smooth.construct.html">smooth.construct</a></td>
+<td>Constructor functions for smooth terms in a GAM</td></tr>
+<tr><td style="width: 25%;"><a href="smooth.construct.ad.smooth.spec.html">smooth.construct.ad.smooth.spec</a></td>
+<td>Adaptive smooths in GAMs</td></tr>
+<tr><td style="width: 25%;"><a href="smooth.construct.bs.smooth.spec.html">smooth.construct.bs.smooth.spec</a></td>
+<td>Penalized B-splines in GAMs</td></tr>
+<tr><td style="width: 25%;"><a href="smooth.construct.cr.smooth.spec.html">smooth.construct.cc.smooth.spec</a></td>
+<td>Penalized Cubic regression splines in GAMs</td></tr>
+<tr><td style="width: 25%;"><a href="smooth.construct.ps.smooth.spec.html">smooth.construct.cp.smooth.spec</a></td>
+<td>P-splines in GAMs</td></tr>
+<tr><td style="width: 25%;"><a href="smooth.construct.cr.smooth.spec.html">smooth.construct.cr.smooth.spec</a></td>
+<td>Penalized Cubic regression splines in GAMs</td></tr>
+<tr><td style="width: 25%;"><a href="smooth.construct.cr.smooth.spec.html">smooth.construct.cs.smooth.spec</a></td>
+<td>Penalized Cubic regression splines in GAMs</td></tr>
+<tr><td style="width: 25%;"><a href="smooth.construct.ds.smooth.spec.html">smooth.construct.ds.smooth.spec</a></td>
+<td>Low rank Duchon 1977 splines</td></tr>
+<tr><td style="width: 25%;"><a href="smooth.construct.fs.smooth.spec.html">smooth.construct.fs.smooth.spec</a></td>
+<td>Factor smooth interactions in GAMs</td></tr>
+<tr><td style="width: 25%;"><a href="smooth.construct.gp.smooth.spec.html">smooth.construct.gp.smooth.spec</a></td>
+<td>Low rank Gaussian process smooths</td></tr>
+<tr><td style="width: 25%;"><a href="smooth.construct.mrf.smooth.spec.html">smooth.construct.mrf.smooth.spec</a></td>
+<td>Markov Random Field Smooths</td></tr>
+<tr><td style="width: 25%;"><a href="smooth.construct.ps.smooth.spec.html">smooth.construct.ps.smooth.spec</a></td>
+<td>P-splines in GAMs</td></tr>
+<tr><td style="width: 25%;"><a href="smooth.construct.re.smooth.spec.html">smooth.construct.re.smooth.spec</a></td>
+<td>Simple random effects in GAMs</td></tr>
+<tr><td style="width: 25%;"><a href="smooth.construct.so.smooth.spec.html">smooth.construct.sf.smooth.spec</a></td>
+<td>Soap film smoother constructer</td></tr>
+<tr><td style="width: 25%;"><a href="smooth.construct.so.smooth.spec.html">smooth.construct.so.smooth.spec</a></td>
+<td>Soap film smoother constructer</td></tr>
+<tr><td style="width: 25%;"><a href="smooth.construct.sos.smooth.spec.html">smooth.construct.sos.smooth.spec</a></td>
+<td>Splines on the sphere</td></tr>
+<tr><td style="width: 25%;"><a href="smooth.construct.so.smooth.spec.html">smooth.construct.sw.smooth.spec</a></td>
+<td>Soap film smoother constructer</td></tr>
+<tr><td style="width: 25%;"><a href="smooth.construct.t2.smooth.spec.html">smooth.construct.t2.smooth.spec</a></td>
+<td>Tensor product smoothing constructor</td></tr>
+<tr><td style="width: 25%;"><a href="smooth.construct.tensor.smooth.spec.html">smooth.construct.tensor.smooth.spec</a></td>
+<td>Tensor product smoothing constructor</td></tr>
+<tr><td style="width: 25%;"><a href="smooth.construct.tp.smooth.spec.html">smooth.construct.tp.smooth.spec</a></td>
+<td>Penalized thin plate regression splines in GAMs</td></tr>
+<tr><td style="width: 25%;"><a href="smooth.construct.tp.smooth.spec.html">smooth.construct.ts.smooth.spec</a></td>
+<td>Penalized thin plate regression splines in GAMs</td></tr>
+<tr><td style="width: 25%;"><a href="smooth.construct.html">smooth.construct2</a></td>
+<td>Constructor functions for smooth terms in a GAM</td></tr>
+<tr><td style="width: 25%;"><a href="smooth.terms.html">smooth.terms</a></td>
+<td>Smooth terms in GAM</td></tr>
+<tr><td style="width: 25%;"><a href="smooth2random.html">smooth2random</a></td>
+<td>Convert a smooth to a form suitable for estimating as random effect</td></tr>
+<tr><td style="width: 25%;"><a href="smoothCon.html">smoothCon</a></td>
+<td>Prediction/Construction wrapper functions for GAM smooth terms</td></tr>
+<tr><td style="width: 25%;"><a href="smooth.construct.so.smooth.spec.html">soap</a></td>
+<td>Soap film smoother constructer</td></tr>
+<tr><td style="width: 25%;"><a href="pdIdnot.html">solve.pdIdnot</a></td>
+<td>Overflow proof pdMat class for multiples of the identity matrix</td></tr>
+<tr><td style="width: 25%;"><a href="sp.vcov.html">sp.vcov</a></td>
+<td>Extract smoothing parameter estimator covariance matrix from (RE)ML GAM fit</td></tr>
+<tr><td style="width: 25%;"><a href="spasm.construct.html">spasm.construct</a></td>
+<td>Experimental sparse smoothers</td></tr>
+<tr><td style="width: 25%;"><a href="spasm.construct.html">spasm.smooth</a></td>
+<td>Experimental sparse smoothers</td></tr>
+<tr><td style="width: 25%;"><a href="spasm.construct.html">spasm.sp</a></td>
+<td>Experimental sparse smoothers</td></tr>
+<tr><td style="width: 25%;"><a href="smooth.construct.sos.smooth.spec.html">Spherical.Spline</a></td>
+<td>Splines on the sphere</td></tr>
+<tr><td style="width: 25%;"><a href="step.gam.html">step.gam</a></td>
+<td>Alternatives to step.gam</td></tr>
+<tr><td style="width: 25%;"><a href="summary.gam.html">summary.gam</a></td>
+<td>Summary for a GAM fit</td></tr>
+<tr><td style="width: 25%;"><a href="pdIdnot.html">summary.pdIdnot</a></td>
+<td>Overflow proof pdMat class for multiples of the identity matrix</td></tr>
+<tr><td style="width: 25%;"><a href="pdTens.html">summary.pdTens</a></td>
+<td>Functions implementing a pdMat class for tensor product smooths</td></tr>
+</table>
+
+<h2><a name="T">-- T --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="scat.html">t.scaled</a></td>
+<td>GAM scaled t family for heavy tailed data</td></tr>
+<tr><td style="width: 25%;"><a href="t2.html">t2</a></td>
+<td>Define alternative tensor product smooths in GAM formulae</td></tr>
+<tr><td style="width: 25%;"><a href="te.html">te</a></td>
+<td>Define tensor product smooths or tensor product interactions in GAM formulae</td></tr>
+<tr><td style="width: 25%;"><a href="tensor.prod.model.matrix.html">tensor.prod.model.matrix</a></td>
+<td>Utility functions for constructing tensor product smooths</td></tr>
+<tr><td style="width: 25%;"><a href="tensor.prod.model.matrix.html">tensor.prod.penalties</a></td>
+<td>Utility functions for constructing tensor product smooths</td></tr>
+<tr><td style="width: 25%;"><a href="te.html">ti</a></td>
+<td>Define tensor product smooths or tensor product interactions in GAM formulae</td></tr>
+<tr><td style="width: 25%;"><a href="smooth.construct.tp.smooth.spec.html">tprs</a></td>
+<td>Penalized thin plate regression splines in GAMs</td></tr>
+<tr><td style="width: 25%;"><a href="trichol.html">trichol</a></td>
+<td>Choleski decomposition of a tri-diagonal matrix</td></tr>
+<tr><td style="width: 25%;"><a href="Tweedie.html">tw</a></td>
+<td>GAM Tweedie families</td></tr>
+<tr><td style="width: 25%;"><a href="Tweedie.html">Tweedie</a></td>
+<td>GAM Tweedie families</td></tr>
+</table>
+
+<h2><a name="U">-- U --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="uniquecombs.html">uniquecombs</a></td>
+<td>find the unique rows in a matrix</td></tr>
+<tr><td style="width: 25%;"><a href="smooth.construct.html">user.defined.smooth</a></td>
+<td>Constructor functions for smooth terms in a GAM</td></tr>
+</table>
+
+<h2><a name="V">-- V --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="vcov.gam.html">vcov.gam</a></td>
+<td>Extract parameter (estimator) covariance matrix from GAM fit</td></tr>
+<tr><td style="width: 25%;"><a href="vis.gam.html">vis.gam</a></td>
+<td>Visualization of GAM objects</td></tr>
+</table>
+
+<h2><a name="Z">-- Z --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="ziP.html">ziP</a></td>
+<td>GAM zero-inflated Poisson regression family</td></tr>
+<tr><td style="width: 25%;"><a href="ziplss.html">ziplss</a></td>
+<td>Zero inflated Poisson location-scale model family</td></tr>
+</table>
+</body></html>

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mgcv/html/00Index.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/parallel/tests/multicore1.RR
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/parallel/tests/multicore1.RR	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/parallel/tests/multicore1.RR	(revision 2477)
@@ -0,0 +1,10 @@
+library(parallel)
+
+p <- parallel:::mcfork()
+if (inherits(p, "masterProcess")) {
+    cat("I'm a child! ", Sys.getpid(), "\n")
+    parallel:::mcexit(,"I was a child")
+}
+cat("I'm the master\n")
+unserialize(parallel:::readChildren(1.5))
+## don't do anything here as stdin is eaten.
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/parallel/tests/multicore2.RR
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/parallel/tests/multicore2.RR	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/parallel/tests/multicore2.RR	(revision 2477)
@@ -0,0 +1,15 @@
+library(parallel)
+
+if(require(boot)) {
+    cd4.rg <- function(data, mle) MASS::mvrnorm(nrow(data), mle$m, mle$v)
+    cd4.mle <- list(m = colMeans(cd4), v = var(cd4))
+    mc <- getOption("mc.cores", 2)
+    run1 <- function(...) boot(cd4, corr, R = 500, sim = "parametric",
+                               ran.gen = cd4.rg, mle = cd4.mle)
+    ## To make this reproducible:
+    set.seed(123, "L'Ecuyer"); mc.reset.stream()
+    res <- mclapply(seq_len(mc), run1)
+    cd4.boot <- do.call(c, res)
+    boot.ci(cd4.boot,  type = c("norm", "basic", "perc"),
+            conf = 0.9, h = atanh, hinv = tanh)
+}
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/parallel/tests/multicore3.RR
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/parallel/tests/multicore3.RR	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/parallel/tests/multicore3.RR	(revision 2477)
@@ -0,0 +1,7 @@
+library(parallel)
+
+simplify2array(mclapply(rep(4, 5), rnorm))
+# use the same random numbers for all values
+set.seed(1)
+simplify2array(mclapply(rep(4, 5), rnorm, mc.preschedule = FALSE,
+                mc.set.seed = FALSE))
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/parallel/tests/snow1.RR
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/parallel/tests/snow1.RR	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/parallel/tests/snow1.RR	(revision 2477)
@@ -0,0 +1,40 @@
+## not necessarily reproducible examples.
+
+library(parallel)
+
+
+cl <- makeCluster(getOption("cl.cores", 2))
+
+clusterApply(cl, 1:2, get("+"), 3)
+xx <- 1
+clusterExport(cl, "xx")
+clusterCall(cl, function(y) xx + y, 2)
+
+## Use clusterMap like an mapply example
+clusterMap(cl, function(x,y) seq_len(x) + y,
+          c(a =  1, b = 2, c = 3), c(A = 10, B = 0, C = -10))
+
+
+parSapply(cl, 1:20, get("+"), 3)
+
+## PR14898
+parSapply(cl, 1, identity)
+
+if(require(boot)) {
+    ## A bootstrapping example, which can be done in many ways:
+    clusterEvalQ(cl, {
+        ## set up each worker.  Could also use clusterExport()
+        library(boot)
+        cd4.rg <- function(data, mle) MASS::mvrnorm(nrow(data), mle$m, mle$v)
+        cd4.mle <- list(m = colMeans(cd4), v = var(cd4))
+        NULL
+    })
+    res <- clusterEvalQ(cl, boot(cd4, corr, R = 100,
+                                 sim = "parametric", ran.gen = cd4.rg, mle = cd4.mle))
+    cd4.boot <- do.call(c, res)
+    print(boot.ci(cd4.boot,  type = c("norm", "basic", "perc"),
+                  conf = 0.9, h = atanh, hinv = tanh))
+}
+stopCluster(cl)
+
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/parallel/tests/multicore2.Rout.save
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/parallel/tests/multicore2.Rout.save	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/parallel/tests/multicore2.Rout.save	(revision 2477)
@@ -0,0 +1,48 @@
+
+R version 3.3.2 RC (2016-10-26 r71594) -- "Sincere Pumpkin Patch"
+Copyright (C) 2016 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
+
+R is free software and comes with ABSOLUTELY NO WARRANTY.
+You are welcome to redistribute it under certain conditions.
+Type 'license()' or 'licence()' for distribution details.
+
+R is a collaborative project with many contributors.
+Type 'contributors()' for more information and
+'citation()' on how to cite R or R packages in publications.
+
+Type 'demo()' for some demos, 'help()' for on-line help, or
+'help.start()' for an HTML browser interface to help.
+Type 'q()' to quit R.
+
+> library(parallel)
+> 
+> if(require(boot)) {
++     cd4.rg <- function(data, mle) MASS::mvrnorm(nrow(data), mle$m, mle$v)
++     cd4.mle <- list(m = colMeans(cd4), v = var(cd4))
++     mc <- getOption("mc.cores", 2)
++     run1 <- function(...) boot(cd4, corr, R = 500, sim = "parametric",
++                                ran.gen = cd4.rg, mle = cd4.mle)
++     ## To make this reproducible:
++     set.seed(123, "L'Ecuyer"); mc.reset.stream()
++     res <- mclapply(seq_len(mc), run1)
++     cd4.boot <- do.call(c, res)
++     boot.ci(cd4.boot,  type = c("norm", "basic", "perc"),
++             conf = 0.9, h = atanh, hinv = tanh)
++ }
+Loading required package: boot
+BOOTSTRAP CONFIDENCE INTERVAL CALCULATIONS
+Based on 1000 bootstrap replicates
+
+CALL : 
+boot.ci(boot.out = cd4.boot, conf = 0.9, type = c("norm", "basic", 
+    "perc"), h = atanh, hinv = tanh)
+
+Intervals : 
+Level      Normal              Basic              Percentile     
+90%   ( 0.4575,  0.8547 )   ( 0.4703,  0.8575 )   ( 0.4964,  0.8663 )  
+Calculations on Transformed Scale;  Intervals on Original Scale
+> 
+> proc.time()
+   user  system elapsed 
+  0.154   0.019   0.260 
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/parallel/tests/snow2.RR
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/parallel/tests/snow2.RR	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/parallel/tests/snow2.RR	(revision 2477)
@@ -0,0 +1,20 @@
+## reproducible examples.
+
+library(parallel)
+
+if(require(boot)) {
+    run1 <- function(...) {
+        library(boot)
+        cd4.rg <- function(data, mle) MASS::mvrnorm(nrow(data), mle$m, mle$v)
+        cd4.mle <- list(m = colMeans(cd4), v = var(cd4))
+        boot(cd4, corr, R = 500, sim = "parametric",
+             ran.gen = cd4.rg, mle = cd4.mle)
+    }
+    cl <- makeCluster(mc <- 2)
+    clusterSetRNGStream(cl, 123)
+    cd4.boot <- do.call(c, parLapply(cl, seq_len(mc), run1))
+    print(boot.ci(cd4.boot,  type = c("norm", "basic", "perc"),
+                  conf = 0.9, h = atanh, hinv = tanh))
+    stopCluster(cl)
+}
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/parallel/tests/Master.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/parallel/tests/Master.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/parallel/tests/Master.R	(revision 2477)
@@ -0,0 +1,36 @@
+
+runone <- function(f)
+{
+    message("  Running ", sQuote(f))
+    infile <- paste(f, "RR", sep = ".")
+    outfile <- paste(f, "Rout", sep = ".")
+    cmd <- paste(shQuote(file.path(R.home("bin"), "R")),
+                 "CMD BATCH --vanilla",
+                 shQuote(infile), shQuote(outfile))
+    res <- system(cmd)
+    if (res) {
+        cat(readLines(outfile), sep="\n")
+        file.rename(outfile, paste(outfile, "fail", sep="."))
+        return(1L)
+    }
+    savefile <- paste(outfile, "save", sep = "." )
+    if (file.exists(savefile)) {
+        message("  Comparing ", sQuote(outfile), " to ",
+                sQuote(savefile), " ...", appendLF = FALSE)
+        res <- tools:::Rdiff(outfile, savefile, TRUE)
+        if (!res) message(" OK")
+    }
+    0L
+}
+
+res <- 0L
+if(.Platform$OS.type == "unix") {
+    res <- res + runone("multicore1")
+    res <- res + runone("multicore2")
+    res <- res + runone("multicore3")
+}
+res <- res + runone("snow1")
+res <- res + runone("snow2")
+
+if(res) stop(gettextf("%d tests failed", res))
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/parallel/tests/snow2.Rout.save
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/parallel/tests/snow2.Rout.save	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/parallel/tests/snow2.Rout.save	(revision 2477)
@@ -0,0 +1,53 @@
+
+R version 3.3.2 RC (2016-10-26 r71594) -- "Sincere Pumpkin Patch"
+Copyright (C) 2016 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
+
+R is free software and comes with ABSOLUTELY NO WARRANTY.
+You are welcome to redistribute it under certain conditions.
+Type 'license()' or 'licence()' for distribution details.
+
+R is a collaborative project with many contributors.
+Type 'contributors()' for more information and
+'citation()' on how to cite R or R packages in publications.
+
+Type 'demo()' for some demos, 'help()' for on-line help, or
+'help.start()' for an HTML browser interface to help.
+Type 'q()' to quit R.
+
+> ## reproducible examples.
+> 
+> library(parallel)
+> 
+> if(require(boot)) {
++     run1 <- function(...) {
++         library(boot)
++         cd4.rg <- function(data, mle) MASS::mvrnorm(nrow(data), mle$m, mle$v)
++         cd4.mle <- list(m = colMeans(cd4), v = var(cd4))
++         boot(cd4, corr, R = 500, sim = "parametric",
++              ran.gen = cd4.rg, mle = cd4.mle)
++     }
++     cl <- makeCluster(mc <- 2)
++     clusterSetRNGStream(cl, 123)
++     cd4.boot <- do.call(c, parLapply(cl, seq_len(mc), run1))
++     print(boot.ci(cd4.boot,  type = c("norm", "basic", "perc"),
++                   conf = 0.9, h = atanh, hinv = tanh))
++     stopCluster(cl)
++ }
+Loading required package: boot
+BOOTSTRAP CONFIDENCE INTERVAL CALCULATIONS
+Based on 1000 bootstrap replicates
+
+CALL : 
+boot.ci(boot.out = cd4.boot, conf = 0.9, type = c("norm", "basic", 
+    "perc"), h = atanh, hinv = tanh)
+
+Intervals : 
+Level      Normal              Basic              Percentile     
+90%   ( 0.4705,  0.8589 )   ( 0.4620,  0.8597 )   ( 0.4900,  0.8689 )  
+Calculations on Transformed Scale;  Intervals on Original Scale
+> 
+> 
+> proc.time()
+   user  system elapsed 
+  0.161   0.022   0.591 
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/parallel/Meta/Rd.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/parallel/Meta/Rd.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/parallel/Meta/vignette.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/parallel/Meta/vignette.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/parallel/Meta/package.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/parallel/Meta/package.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/parallel/Meta/nsInfo.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/parallel/Meta/nsInfo.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/parallel/Meta/hsearch.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/parallel/Meta/hsearch.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/parallel/Meta/links.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/parallel/Meta/links.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/spatial/po/de/LC_MESSAGES/R-spatial.mo
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/spatial/po/de/LC_MESSAGES/R-spatial.mo
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/spatial/po/ko/LC_MESSAGES/R-spatial.mo
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/spatial/po/ko/LC_MESSAGES/R-spatial.mo
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/spatial/po/en@quot/LC_MESSAGES/R-spatial.mo
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/spatial/po/en@quot/LC_MESSAGES/R-spatial.mo
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/spatial/po/pl/LC_MESSAGES/R-spatial.mo
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/spatial/po/pl/LC_MESSAGES/R-spatial.mo
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/spatial/po/fr/LC_MESSAGES/R-spatial.mo
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/spatial/po/fr/LC_MESSAGES/R-spatial.mo
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/spatial/Meta/links.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/spatial/Meta/links.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/spatial/Meta/Rd.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/spatial/Meta/Rd.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/spatial/Meta/package.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/spatial/Meta/package.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/spatial/Meta/nsInfo.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/spatial/Meta/nsInfo.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/spatial/Meta/hsearch.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/spatial/Meta/hsearch.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/graphics/Meta/package.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/graphics/Meta/package.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/graphics/Meta/nsInfo.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/graphics/Meta/nsInfo.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/graphics/Meta/hsearch.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/graphics/Meta/hsearch.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/graphics/Meta/links.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/graphics/Meta/links.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/graphics/Meta/demo.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/graphics/Meta/demo.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/graphics/Meta/Rd.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/graphics/Meta/Rd.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/R/mvtnorm
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/R/mvtnorm	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/R/mvtnorm	(revision 2477)
@@ -0,0 +1,27 @@
+#  File share/R/nspackloader.R
+#  Part of the R package, http://www.R-project.org
+#
+#  Copyright (C) 1995-2012 The R Core Team
+#
+#  This program is free software; you can redistribute it and/or modify
+#  it under the terms of the GNU General Public License as published by
+#  the Free Software Foundation; either version 2 of the License, or
+#  (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  A copy of the GNU General Public License is available at
+#  http://www.r-project.org/Licenses/
+
+local({
+    info <- loadingNamespaceInfo()
+    pkg <- info$pkgname
+    ns <- .getNamespace(as.name(pkg))
+    if (is.null(ns))
+        stop("cannot find namespace environment for ", pkg, domain = NA);
+    dbbase <- file.path(info$libname, pkg, "R", pkg)
+    lazyLoad(dbbase, ns, filter = function(n) n != ".__NAMESPACE__.")
+})
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/R/mvtnorm.rdb
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/R/mvtnorm.rdb
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/R/mvtnorm.rdx
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/R/mvtnorm.rdx
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/include/mvtnormAPI.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/include/mvtnormAPI.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/include/mvtnormAPI.h	(revision 2477)
@@ -0,0 +1,24 @@
+
+#include <R_ext/Rdynload.h>
+#include <mvtnorm.h>
+
+// external API
+void mvtnorm_C_mvtdst(int *n, int *nu, double *lower, double *upper,
+                      int *infin, double *corr, double *delta,
+                      int *maxpts, double *abseps, double *releps,
+                      double *error, double *value, int *inform, int *rnd) {
+
+    static void(*fun)(int*, int*, double*, double*,
+                      int*, double*, double*,
+                      int*, double*, double*,
+                      double*, double*, int*, int*) = NULL;
+
+    if (fun == NULL) 
+        fun = (void(*)(int*, int*, double*, double*,
+                       int*, double*, double*,
+                       int*, double*, double*,
+                       double*, double*, int*, int*)) R_GetCCallable("mvtnorm", "C_mvtdst");
+                                                                                                                                    
+    fun(n, nu, lower, upper, infin, corr, delta,
+             maxpts, abseps, releps, error, value, inform, rnd);
+}
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/include/mvtnorm.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/include/mvtnorm.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/include/mvtnorm.h	(revision 2477)
@@ -0,0 +1,22 @@
+
+#include <R.h>
+#include <Rmath.h>
+#include <Rinternals.h>
+
+void F77_NAME(mvtdst)(int *n, int *nu, double *lower, double *upper,
+                      int *infin, double *corr, double *delta,
+                      int *maxpts, double *abseps, double *releps,
+                      double *error, double *value, int *inform);
+
+void F77_NAME(tvtlrcall)(int *NU, double *H, double *R, double *EPSI, double *TVTL);
+void C_tvtlr            (int *NU, double *H, double *R, double *EPSI, double *TVTL);
+
+void F77_NAME(bvtlrcall)(int *NU, double *DH, double *DK, double *R, double *BVTL);
+void C_bvtlr            (int *NU, double *DH, double *DK, double *R, double *BVTL);
+
+void C_mvtdst(int *n, int *nu, double *lower, double *upper,
+              int *infin, double *corr, double *delta,
+              int *maxpts, double *abseps, double *releps,
+              double *error, double *value, int *inform, int *rnd);
+
+SEXP C_miwa(SEXP steps, SEXP corr, SEXP upper, SEXP lower, SEXP infin);
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/html/R.css
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/html/R.css	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/html/R.css	(revision 2477)
@@ -0,0 +1,97 @@
+body {
+    background: white;
+    color: black;
+}
+
+a:link {
+    background: white;
+    color: blue;
+}
+
+a:visited {
+    background: white;
+    color: rgb(50%, 0%, 50%);
+}
+
+h1 {
+    background: white;
+    color: rgb(55%, 55%, 55%);
+    font-family: monospace;
+    font-size: x-large;
+    text-align: center;
+}
+
+h2 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-size: large;
+    text-align: center;
+}
+
+h3 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-size: large;
+}
+
+h4 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-style: italic;
+    font-size: large;
+}
+
+h5 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+}
+
+h6 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-style: italic;
+}
+		
+img.toplogo {
+    width: 4em;
+    vertical-align: middle;
+}
+
+img.arrow {
+    width: 30px;
+    height: 30px;
+    border: 0;
+}
+
+span.acronym {
+    font-size: small;
+}
+
+span.env {
+    font-family: monospace;
+}
+
+span.file {
+    font-family: monospace;
+}
+
+span.option{
+    font-family: monospace;
+}
+
+span.pkg {
+    font-weight: bold;
+}
+
+span.samp{
+    font-family: monospace;
+}
+
+div.vignettes a:hover {
+    background: rgb(85%, 85%, 85%);
+}

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/html/R.css
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/html/00Index.html
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/html/00Index.html	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/html/00Index.html	(revision 2477)
@@ -0,0 +1,48 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title>R: Multivariate Normal and t Distributions</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<link rel="stylesheet" type="text/css" href="R.css" />
+</head><body>
+<h1> Multivariate Normal and t Distributions
+<img class="toplogo" src="../../../doc/html/Rlogo.svg" alt="[R logo]" />
+</h1>
+<hr/>
+<div style="text-align: center;">
+<a href="../../../doc/html/packages.html"><img class="arrow" src="../../../doc/html/left.jpg" alt="[Up]" /></a>
+<a href="../../../doc/html/index.html"><img class="arrow" src="../../../doc/html/up.jpg" alt="[Top]" /></a>
+</div><h2>Documentation for package &lsquo;mvtnorm&rsquo; version 1.0-6</h2>
+
+<ul><li><a href="../DESCRIPTION">DESCRIPTION file</a>.</li>
+<li><a href="../doc/index.html">User guides, package vignettes and other documentation.</a></li>
+<li><a href="../NEWS">Package NEWS</a>.</li>
+</ul>
+
+<h2>Help Pages</h2>
+
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="Mvnorm.html">dmvnorm</a></td>
+<td>Multivariate Normal Density and Random Deviates</td></tr>
+<tr><td style="width: 25%;"><a href="Mvt.html">dmvt</a></td>
+<td>The Multivariate t Distribution</td></tr>
+<tr><td style="width: 25%;"><a href="algorithms.html">GenzBretz</a></td>
+<td>Choice of Algorithm and Hyper Parameters</td></tr>
+<tr><td style="width: 25%;"><a href="algorithms.html">Miwa</a></td>
+<td>Choice of Algorithm and Hyper Parameters</td></tr>
+<tr><td style="width: 25%;"><a href="pmvnorm.html">pmvnorm</a></td>
+<td>Multivariate Normal Distribution</td></tr>
+<tr><td style="width: 25%;"><a href="pmvt.html">pmvt</a></td>
+<td>Multivariate t Distribution</td></tr>
+<tr><td style="width: 25%;"><a href="qmvnorm.html">qmvnorm</a></td>
+<td>Quantiles of the Multivariate Normal Distribution</td></tr>
+<tr><td style="width: 25%;"><a href="qmvt.html">qmvt</a></td>
+<td>Quantiles of the Multivariate t Distribution</td></tr>
+<tr><td style="width: 25%;"><a href="Mvnorm.html">rmvnorm</a></td>
+<td>Multivariate Normal Density and Random Deviates</td></tr>
+<tr><td style="width: 25%;"><a href="Mvt.html">rmvt</a></td>
+<td>The Multivariate t Distribution</td></tr>
+<tr><td style="width: 25%;"><a href="algorithms.html">TVPACK</a></td>
+<td>Choice of Algorithm and Hyper Parameters</td></tr>
+</table>
+</body></html>

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/html/00Index.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/doc/MVT_Rnews.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/doc/MVT_Rnews.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/doc/MVT_Rnews.R	(revision 2477)
@@ -0,0 +1,40 @@
+### R code from vignette source 'MVT_Rnews.Rnw'
+
+###################################################
+### code chunk number 1: prelim
+###################################################
+set.seed(290875)
+### options(width=60, prompt="R> ")
+
+
+
+###################################################
+### code chunk number 2: smallex
+###################################################
+library(mvtnorm)
+m <- 3
+sigma <- diag(3)
+sigma[2,1] <- 3/5
+sigma[3,1] <- 1/3
+sigma[3,2] <- 11/15
+pmvnorm(mean=rep(0, m), sigma, lower=rep(-Inf, m), upper=c(1,4,2))
+
+
+###################################################
+### code chunk number 3: cats
+###################################################
+n <- c(26, 24, 20, 33, 32)
+V <- diag(1/n)
+df <- 130
+C <- c(1,1,1,0,0,-1,0,0,1,0,0,-1,0,0,1,0,0,0,-1,-1,0,0,-1,0,0)
+C <- matrix(C, ncol=5)
+### covariance matrix 
+cv <- C %*% V %*% t(C)
+### correlation matrix
+dv <- t(1/sqrt(diag(cv)))
+cr <- cv * (t(dv) %*% dv)
+delta <- rep(0,5)
+qmvt(0.95, df = df, delta = delta, corr = cr, abseps = 0.0001, 
+     maxpts = 100000, tail = "both")
+
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/doc/MVT_Rnews.Rnw
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/doc/MVT_Rnews.Rnw	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/doc/MVT_Rnews.Rnw	(revision 2477)
@@ -0,0 +1,243 @@
+\documentclass[11pt]{amsart}
+\usepackage[round]{natbib}
+\usepackage{bibentry}
+\renewcommand{\baselinestretch}{1.5}
+
+%%\VignetteIndexEntry{Using mvtnorm}
+
+\newcommand{\ba}{{\bf a}}
+\newcommand{\bb}{{\bf b}}
+\newcommand{\ta}{{\tilde a}}
+\newcommand{\tb}{{\tilde b}}
+\newcommand{\bab}{\bar{{\bf a}}}
+\newcommand{\bbb}{\bar{{\bf b}}}
+\newcommand{\byb}{\bar{{\bf y}}}
+\newcommand{\be}{{\bf e}}
+\newcommand{\bu}{{\bf u}}
+\newcommand{\bk}{{\bf k}}
+\newcommand{\bp}{{\bf p}}
+\newcommand{\bq}{{\bf q}}
+\newcommand{\bt}{{\bf t}}
+\newcommand{\bx}{{\bf x}}
+\newcommand{\by}{{\bf y}}
+\newcommand{\bz}{{\bf z}}
+\newcommand{\bv}{{\bf v}}
+\newcommand{\bw}{{\bf w}}
+\newcommand{\bg}{{\bg b}}
+\newcommand{\bs}{{\bf s}}
+\newcommand{\bI}{{\bf I}}
+\newcommand{\bR}{{\bf R}}
+\newcommand{\bT}{{\bf T}}
+\newcommand{\binf}{\mbox{\boldmath $\infty$}}
+\newcommand{\thh}{\mbox{\boldmath $\theta$}}
+\newcommand{\la}{\mbox{\boldmath $\lambda$}}
+\newcommand{\bbt}{\mbox{\boldmath $\beta$}}
+\newcommand{\muu}{\mbox{\boldmath $\mu$}}
+\newcommand{\brho}{\mbox{\boldmath $\rho$}}
+\newcommand{\bdel}{\mbox{\boldmath $\delta$}}
+\newcommand{\Sig}{\mbox{\boldmath $\Sigma$}}
+\newcommand{\Ph}{\mbox{\boldmath $\Phi$}}
+\newcommand{\beps}{\mbox{\boldmath $\epsilon$}}
+\newcommand{\bbet}{\mbox{\boldmath $\beta$}}
+\newcommand{\C}{\mbox{\boldmath $C$}}
+\newcommand{\V}{\mbox{\boldmath $V$}}
+
+
+
+\begin{document}
+
+\title{On Multivariate $t$ and Gau{\ss} Probabilities in R}
+
+\author{Torsten Hothorn}
+\thanks{This document is an updated version of the paper published in
+\textsf{R} News $\mathbf{1}(2)$.}
+\address{Friedrich-Alexander-Universit\"at Erlangen-N\"urnberg \\
+Institut f\"ur Medizininformatik, Biometrie und Epidemiologie \\
+Waldstra{\ss}e 6, D-91054 Erlangen}
+\email{Torsten.Hothorn@rzmail.uni-erlangen.de}
+\author{Frank Bretz}
+\address{Universit\"at Hannover \\ LG Bioinformatik, FB Gartenbau \\
+Herrenh\"auser Str. 2 \\ D-30419 Hannover}
+\email{bretz@ifgb.uni-hannover.de}
+\author{Alan Genz}
+\address{Department of Mathematics \\ Washington State University \\
+Pullman, WA 99164-3113 USA}
+\email{alangenz@wsu.edu}
+
+\maketitle
+
+<<prelim, echo=FALSE>>=
+set.seed(290875)
+### options(width=60, prompt="R> ")
+
+@
+
+\section*{Introduction}
+
+The numerical computation of a multivariate normal or $t$
+probability is often a difficult problem. Recent developments
+resulted in algorithms for the fast computation of those
+probabilities for arbitrary correlation structures. We refer to
+the work described in \cite{numerical-:1992},
+\cite{comparison:1993} and \cite{numerical-:1999}. The procedures
+proposed in those papers are implemented in package {\ttfamily
+mvtnorm}, available at CRAN. Basically, the package implements
+two functions: {\ttfamily pmvnorm} for the computation of
+multivariate normal probabilities and {\ttfamily pmvt} for the
+computation of multivariate $t$ probabilities, both for arbitrary
+means (resp. noncentrality parameters), correlation matrices and
+hyperrectangular integration regions.
+
+We first illustrate the use of the package using a simple example of the
+multivariate normal distribution in Section \ref{simple}.
+A little more details are given in Section \ref{details}. The application of
+{\ttfamily pmvt} in a multiple testing problem is discussed in Section
+\ref{appl}.
+
+\section{A Simple Example \label{simple}}
+
+Assume that $ X = (X_1, X_2, X_3) $ is multivariate normal with correlation
+matrix
+\begin{eqnarray*}
+\Sig = \left( \begin{array}{ccc} 1 & \frac{3}{5} & \frac{1}{3} \\
+\frac{3}{5} & 1 & \frac{11}{15} \\
+\frac{1}{3} & \frac{11}{15} & 1 \end{array} \right)
+\end{eqnarray*}
+and expectation $ \mu = (0,0,0)^{\top} $. We are interested in the probability
+\begin{eqnarray*}
+P(-\infty < X_1 \le 1, -\infty < X_2 \le 4, -\infty < X_3 \le 2).
+\end{eqnarray*}
+This is computed as follows:
+<<smallex, echo=TRUE>>=
+library(mvtnorm)
+m <- 3
+sigma <- diag(3)
+sigma[2,1] <- 3/5
+sigma[3,1] <- 1/3
+sigma[3,2] <- 11/15
+pmvnorm(mean=rep(0, m), sigma, lower=rep(-Inf, m), upper=c(1,4,2))
+@
+First, the lower triangular of the correlation matrix {\ttfamily sigma}
+is needed. The mean
+vector is passed to {\ttfamily pmvnorm} by the argument {\ttfamily mean}.
+The region of
+integration is given by the vectors {\ttfamily lower} and {\ttfamily upper},
+both can have elements {\ttfamily -Inf} or {\ttfamily +Inf}. The value of {\ttfamily pmvnorm}
+is the estimated integral value with two attributes 
+\begin{itemize}
+\item {\ttfamily error}: the estimated absolute error and
+\item {\ttfamily msg}: a status message, indicating wheater or not the algorithm
+terminated correctly.
+\end{itemize}
+From the results above it follows that
+\begin{eqnarray*}
+P(-\infty < X_1 \le 1, -\infty < X_2 \le 4, -\infty < X_3 \le 2) \approx
+0.82798
+\end{eqnarray*}
+with an absolute error estimate of $2.0e-06$.
+
+\section{Details \label{details}}
+
+This section outlines the basic ideas of the algorithms used. The
+multivariate $t$ distribution (MVT) is given by $$ \bT(\ba, \bb,
+\Sig, \nu) = \frac{2^{1-\frac{\nu}{2}}}{\Gamma(\frac{\nu}{2})}
+\int\limits_0^{\infty}s^{\nu-1}e^{-\frac{s^2}{2}}
+\Ph(\frac{s\ba}{\sqrt{\nu}},\frac{s\bb}{\sqrt{\nu}},\Sig) ds, $$
+where the multivariate normal distribution function (MVN) $$
+\Ph(\ba,\bb, \Sig) = \frac{1}{\sqrt{|\Sig| (2\pi)^m}}
+\int\limits_{a_1}^{b_1} \int\limits_{a_2}^{b_2} ...
+\int\limits_{a_m}^{b_m} e^{- \frac{1}{2} \bx^t \Sig^{-1} \bx}
+d\bx, $$ $\bx = (x_1, x_2, ..., x_m)^t$, $-\infty \leq a_i < b_i
+\leq \infty$ for all $i$, and $\Sig$ is a positive semi-definite
+symmetric $m \times m$ matrix. The original integral over an
+arbitrary $m$-dimensional, possibly unbounded hyper-rectangle is
+transformed to an integral over the unit hypercube. These
+transformations are described in \cite{numerical-:1992} for the
+MVN case and in \cite{numerical-:1999} for the MVT case. Several
+suitable standard integration routines can be applied to this
+transformed integral. For the present implementation randomized
+lattice rules were used. Such lattice rules seek to fill the
+integration region evenly in a deterministic process. In
+principle, they construct regular patterns, such that the
+projections of the integration points onto each axis produce an
+equidistant subdivision of the axis. Robust integration error
+bounds are obtained by introducing additional shifts of the
+entire set of integration nodes in random directions. Since this
+additional randomization step is only performed to introduce a
+robust Monte Carlo error bound, 10 simulation runs are usually
+sufficient. For a more detailed description \cite{numerical-:1999}
+might be referred to.
+
+\section{Applications \label{appl}}
+
+The multivariate $t$ distribution is applicable in a wide field
+of multiple testing problems. We will illustrate this using a
+example studied earlier by \cite{the-effici:1987}. For short, the
+effects of $5$ different perfusates in capillary permeability in
+cats was investigated by \cite{blood-and-:1987}. The data met the
+assumptions of a standard one-factor ANOVA. For experimental
+reasons, the investigators were interested in a simultaneous
+confidence intervals for the following pairwise comparisons: $
+\beta_1 - \beta_2, \beta_1 - \beta_3, \beta_1 - \beta_5, \beta_4
+- \beta_2 $ and $ \beta_4 - \beta_3 $. Therefore, the matrix of
+contrast is given by
+\begin{eqnarray*}
+\C = \left( \begin{array}{rrrrr} 1 & -1 & 0 & 0 & 0 \\
+1 & 0 & -1 & 0 & 0 \\
+1 & 0 & 0 & 0 & -1 \\
+0 & 1 & 0 & -1 & 0 \\
+0 & 0 & 1 & -1 & 0 \end{array} \right) .
+\end{eqnarray*}
+\cite{the-effici:1987} assumed that $ \beta = (\beta_1, \dots, \beta_5) $ is
+multivariate normal with mean $ \beta $ and covariance matrix $ \sigma^2 \V
+$, where $ \V $ is known. Under the null hypothesis $ \beta = 0 $, we need
+knowledge about the
+distribution of the statistic
+\begin{eqnarray*}
+W = \max_{1 \le j \le 5} \left\{ \frac{| c_j(\hat{\beta} - \beta)
+|}{\hat{\sigma}\sqrt{c_j \V c_j^{\top}}} \right\}
+\end{eqnarray*}
+where $ c_j $ is the $j$th row of $ \C $. By assumption,
+$\hat{\sigma}$ is $ \chi_\nu $ distributed, so under hypothesis $
+W $ the argument to $ \max $ follows a multivariate $ t $
+distribution. Confidence intervals can be obtained by $ c_j
+\hat{\beta} \pm w_\alpha \hat{\sigma} \sqrt{c_j \V c_i^\top} $,
+where $ w_\alpha $ is the $ 1 - \alpha $ quantile of the null
+distribution of $ W $. Using {\ttfamily pmvt}, one can easily
+compute the quantile for the example cited above.
+
+<<cats, echo=TRUE>>=
+n <- c(26, 24, 20, 33, 32)
+V <- diag(1/n)
+df <- 130
+C <- c(1,1,1,0,0,-1,0,0,1,0,0,-1,0,0,1,0,0,0,-1,-1,0,0,-1,0,0)
+C <- matrix(C, ncol=5)
+### covariance matrix 
+cv <- C %*% V %*% t(C)
+### correlation matrix
+dv <- t(1/sqrt(diag(cv)))
+cr <- cv * (t(dv) %*% dv)
+delta <- rep(0,5)
+qmvt(0.95, df = df, delta = delta, corr = cr, abseps = 0.0001, 
+     maxpts = 100000, tail = "both")
+@
+{\ttfamily n} is the sample size vector of each level of the
+factor, {\ttfamily V} is the covariance matrix of $ \beta $. With
+the contrasts $ \C $ we can compute the correlation matrix
+{\ttfamily cr} of $ \C\beta $. Finally, we are interested in the
+$ 95\%$ quantile of $ W $. The {\ttfamily
+alpha} quantile can now be computed easily using {\ttfamily
+pmvt}. The $95\%$ quantile of $ W $ in this example is $ 2.56 $
+, \cite{the-effici:1987} obtained the same result using $ 80.000
+$ simulation runs. The computation needs $ 8.06 $ seconds total
+time on a Pentium III $450$ MHz with $256$ MB memory.
+
+Using package {\ttfamily mvtnorm}, the efficient computation of
+multivariate normal or $ t $ probabilities is now available
+in {\ttfamily R}. We hope that this is helpful to users / programmers who
+deal with multiple testing problems.
+
+\bibliographystyle{plainnat}
+\bibliography{litdb}
+
+\end{document}
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/doc/index.html
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/doc/index.html	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/doc/index.html	(revision 2477)
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title>R: Vignettes and other documentation</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<link rel="stylesheet" type="text/css" href="/doc/html/R.css" />
+</head><body>
+<h1> Vignettes and other documentation
+<img class="toplogo" src="/doc/html/Rlogo.svg" alt="[R logo]" />
+</h1>
+<hr/>
+<div style="text-align: center;">
+<a href="/doc/html/index.html"><img class="arrow" src="/doc/html/up.jpg" alt="[Top]" /></a>
+</div>
+<h2>Vignettes from package 'mvtnorm'</h2>
+<table width="100%">
+<col style="width: 22%;" />
+<col style="width:  2%;" />
+<col style="width: 50%;" />
+<col style="width:  8%;" />
+<col style="width:  8%;" />
+<col style="width:  8%;" />
+<tr><td style="text-align: right; vertical-align: top;"><a href="../../../library/mvtnorm/doc/MVT_Rnews.pdf">mvtnorm::MVT_Rnews</a></td>
+<td></td><td valign="top">Using mvtnorm</td>
+<td valign="top"><a href="../../../library/mvtnorm/doc/MVT_Rnews.pdf">PDF</a></td>
+<td valign="top"><a href="../../../library/mvtnorm/doc/MVT_Rnews.Rnw">source</a></td>
+<td valign="top" style="white-space: nowrap"><a href="../../../library/mvtnorm/doc/MVT_Rnews.R">R code</a></td></tr>
+</table>
+</body></html>

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/doc/index.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/doc/MVT_Rnews.pdf
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/doc/MVT_Rnews.pdf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/C_API_Example/src/test.c
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/C_API_Example/src/test.c	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/C_API_Example/src/test.c	(revision 2477)
@@ -0,0 +1,20 @@
+
+#include <R.h>
+#include <Rinternals.h>
+#include <Rdefines.h>
+
+#include <R_ext/Rdynload.h>  /* required by R */
+
+#include <mvtnormAPI.h>
+
+void C_test(int *n, int *nu, double *lower, double *upper,
+            int *infin, double *corr, double *delta,
+            int *maxpts, double *abseps, double *releps,
+            double *error, double *value, int *inform) {
+
+    int rnd = 1;
+
+    /* mvtnorm_C_mvtdst is defined in mvtnorm/inst/include/mvtnormAPI.h */
+    mvtnorm_C_mvtdst(n, nu, lower, upper, infin, corr, delta,
+                     maxpts, abseps, releps, error, value, inform, &rnd);
+}
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/C_API_Example/NAMESPACE
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/C_API_Example/NAMESPACE	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/C_API_Example/NAMESPACE	(revision 2477)
@@ -0,0 +1,4 @@
+
+useDynLib(mvtnormAPI)
+
+export("testAPI")
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/C_API_Example/R/test.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/C_API_Example/R/test.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/C_API_Example/R/test.R	(revision 2477)
@@ -0,0 +1,20 @@
+
+testAPI <- function(x, n, df, lower, upper, infin, corr, corrF, delta) {
+
+    error <- 0; value <- 0; inform <- 0
+    ret <- .C("C_test", N = as.integer(n),
+                              NU = as.integer(df),
+                              LOWER = as.double(lower),
+                              UPPER = as.double(upper),
+                              INFIN = as.integer(infin),
+                              CORREL = as.double(corrF),
+                              DELTA = as.double(delta),
+                              MAXPTS = as.integer(x$maxpts),
+                              ABSEPS = as.double(x$abseps),
+                              RELEPS = as.double(x$releps),
+                              error = as.double(error),  
+                              value = as.double(value),
+                              inform = as.integer(inform), PACKAGE="mvtnormAPI")
+    ret
+}
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/C_API_Example/tests/test.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/C_API_Example/tests/test.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/C_API_Example/tests/test.R	(revision 2477)
@@ -0,0 +1,14 @@
+
+library("mvtnormAPI")
+set.seed(29)
+(v1 <- unlist(testAPI(list(maxpts = 2000, abseps = 1/1000, releps = 1/1000), 
+     2L, 0L, 1:1, c(-1,-1), 0:0, .2, .2, 0)))
+
+library("mvtnorm")
+set.seed(29)
+(v2 <- unlist(mvtnorm:::probval.GenzBretz(list(maxpts = 2000, abseps = 1/1000, releps = 1/1000), 
+     2L, 0L, 1:1, c(-1,-1), 0:0, .2, .2, 0) ))
+v2 <- v2[names(v1)]
+
+stopifnot(all.equal(v1, v2))
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/C_API_Example/DESCRIPTION
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/C_API_Example/DESCRIPTION	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/C_API_Example/DESCRIPTION	(revision 2477)
@@ -0,0 +1,10 @@
+Package: mvtnormAPI
+Title: Test package for mvtnorm C API
+Version: 1.0-0
+Date: 2014-12-16
+Authors@R: person("Torsten", "Hothorn", role = c("aut", "cre"),
+                    email = "Torsten.Hothorn@R-project.org")
+Description: Tests the C API of mvtnorm
+Depends: mvtnorm
+LinkingTo: mvtnorm
+License: GPL-2
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/Meta/package.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/Meta/package.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/Meta/nsInfo.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/Meta/nsInfo.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/Meta/hsearch.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/Meta/hsearch.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/Meta/links.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/Meta/links.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/Meta/Rd.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/Meta/Rd.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/Meta/vignette.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/mvtnorm/Meta/vignette.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/Meta/data.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/Meta/data.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/Meta/package.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/Meta/package.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/Meta/nsInfo.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/Meta/nsInfo.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/Meta/hsearch.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/Meta/hsearch.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/Meta/links.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/Meta/links.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/Meta/Rd.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/Meta/Rd.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/scripts/ch01.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/scripts/ch01.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/scripts/ch01.R	(revision 2477)
@@ -0,0 +1,114 @@
+#-*- R -*-
+
+## Script from Fourth Edition of `Modern Applied Statistics with S'
+
+options(width=65, digits=5, height=9999)
+pdf(file="ch01.pdf", width=8, height=6, pointsize=9)
+
+# Chapter 1   Introduction
+
+# 1.1 A quick overview of S
+
+2 + 3
+sqrt(3/4)/(1/3 - 2/pi^2)
+
+library(MASS)
+mean(chem)
+m <- mean(chem); v <- var(chem)/length(chem)
+m/sqrt(v)
+
+std.dev <- function(x) sqrt(var(x))
+t.test.p <- function(x, mu=0) {
+    n <- length(x)
+    t <- sqrt(n) * (mean(x) - mu) / std.dev(x)
+    2 * (1 - pt(abs(t), n - 1))
+}
+
+t.stat <- function(x, mu = 0) {
+   n <- length(x)
+   t <- sqrt(n) * (mean(x) - mu) / std.dev(x)
+   list(t = t, p = 2 * (1 - pt(abs(t), n - 1)))
+}
+z <- rnorm(300, 1, 2)  # generate 300 N(1, 4) variables.
+t.stat(z)
+unlist(t.stat(z, 1))  # test mu=1, compact result
+
+# 1.4  An introductory session
+
+x <- rnorm(1000)
+y <- rnorm(1000)
+truehist(c(x,y+3), nbins=25)
+
+# ?truehist
+
+contour(dd <- kde2d(x,y))
+image(dd)
+
+x <- seq(1, 20, 0.5)
+x
+w <- 1 + x/2
+y <- x + w*rnorm(x)
+dum <-  data.frame(x, y, w)
+dum
+rm(x, y, w)
+
+fm <- lm(y ~ x,  data=dum)
+summary(fm)
+fm1 <- lm(y ~ x,  data = dum, weight = 1/w^2)
+summary(fm1)
+
+lrf <-  loess(y ~ x, dum)
+
+attach(dum)
+plot(x, y)
+lines(spline(x, fitted(lrf)), col = 2)
+
+abline(0, 1, lty = 3, col = 3)
+abline(fm, col = 4)
+abline(fm1, lty = 4, col = 5)
+
+plot(fitted(fm), resid(fm), xlab = "Fitted Values", ylab = "Residuals")
+
+qqnorm(resid(fm))
+qqline(resid(fm))
+
+detach()
+rm(fm,fm1,lrf,dum)
+
+hills
+# S: splom(~ hills)
+pairs(hills)
+
+# S: if(interactive()) brush(hills)
+
+attach(hills)
+plot(dist, time)
+if(interactive()) identify(dist, time, row.names(hills))
+abline(lm(time ~ dist))
+# library(lqs)
+abline(lqs(time ~ dist), lty=3, col=4)
+detach()
+
+if(interactive()){
+plot(c(0,1), c(0,1), type="n")
+xy <- locator(type = "p")
+abline(lm(y ~ x, xy), col = 4)
+abline(rlm(y ~ x, xy, method = "MM"), lty = 3, col = 3)
+abline(lqs(y ~ x, xy), lty = 2, col = 2)
+rm(xy)
+}
+
+attach(michelson)
+search()
+plot(Expt, Speed, main="Speed of Light Data", xlab="Experiment No.")
+fm <-  aov(Speed ~ Run + Expt)
+summary(fm)
+fm0 <- update(fm, . ~ . - Run)
+anova(fm0, fm)
+detach()
+rm(fm, fm0)
+
+1 - pf(4.3781, 4, 76)
+qf(0.95, 4, 76)
+
+# End of ch01
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/scripts/ch10.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/scripts/ch10.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/scripts/ch10.R	(revision 2477)
@@ -0,0 +1,276 @@
+#-*- R -*-
+
+## Script from Fourth Edition of `Modern Applied Statistics with S'
+
+# Chapter 10   Random and Mixed Effects
+
+library(MASS)
+library(lattice)
+pdf(file="ch10.pdf", width=8, height=6, pointsize=9)
+options(width=65, digits=5)
+library(nlme)
+
+# 10.1  Linear models
+
+xyplot(Y ~ EP | No, data = petrol,
+   xlab = "ASTM end point (deg. F)",
+   ylab = "Yield as a percent of crude",
+   panel = function(x, y) {
+      panel.grid()
+      m <- sort.list(x)
+      panel.xyplot(x[m], y[m], type = "b", cex = 0.5)
+   })
+
+Petrol <- petrol
+names(Petrol)
+Petrol[, 2:5] <- scale(Petrol[, 2:5], scale = FALSE)
+pet1.lm <- lm(Y ~ No/EP - 1, Petrol)
+matrix(round(coef(pet1.lm), 2), 2, 10, byrow = TRUE,
+       dimnames = list(c("b0", "b1"), levels(Petrol$No)))
+
+pet2.lm <- lm(Y ~ No - 1 + EP, Petrol)
+anova(pet2.lm, pet1.lm)
+
+pet3.lm <- lm(Y ~ SG + VP + V10 + EP, Petrol)
+anova(pet3.lm, pet2.lm)
+
+pet3.lme <- lme(Y ~ SG + VP + V10 + EP,
+                random = ~ 1 | No, data = Petrol)
+summary(pet3.lme)
+
+pet3.lme <- update(pet3.lme, method = "ML")
+summary(pet3.lme)
+
+anova(pet3.lme, pet3.lm)
+
+pet4.lme <- update(pet3.lme, fixed = Y ~ V10 + EP)
+anova(pet4.lme, pet3.lme)
+fixed.effects(pet4.lme)
+coef(pet4.lme)
+
+pet5.lme <- update(pet4.lme, random = ~ 1 + EP | No)
+anova(pet4.lme, pet5.lme)
+
+nl1 <- nlschools
+attach(nl1)
+classMeans <- tapply(IQ, class, mean)
+nl1$IQave <- classMeans[as.character(class)]
+detach()
+cen <- c("IQ", "IQave", "SES")
+nl1[cen] <- scale(nl1[cen], center = TRUE, scale = FALSE)
+
+options(contrasts = c("contr.treatment", "contr.poly"))
+nl.lme <- lme(lang ~ IQ*COMB + IQave + SES,
+              random = ~ IQ | class, data = nl1)
+summary(nl.lme)
+
+## singular.ok = TRUE is the default in R
+summary(lm(lang ~ IQ*COMB + SES + class, data = nl1, singular.ok = TRUE))
+
+nl2 <- cbind(aggregate(nl1[c(1,7)], list(class = nl1$class), mean),
+             unique(nl1[c("class", "COMB", "GS")]))
+summary(lm(lang ~ IQave + COMB, data = nl2, weights = GS))
+
+sitka.lme <- lme(size ~ treat*ordered(Time),
+   random = ~1 | tree, data = Sitka, method = "ML")
+Sitka <- Sitka  # make a local copy for S-PLUS
+attach(Sitka)
+Sitka$treatslope <- Time * (treat == "ozone")
+detach()
+sitka.lme2 <- update(sitka.lme,
+    fixed = size ~ ordered(Time) + treat + treatslope)
+anova(sitka.lme, sitka.lme2)
+
+# fitted curves
+matrix(fitted(sitka.lme2, level = 0)[c(301:305, 1:5)],
+       2, 5, byrow = TRUE,
+       dimnames = list(c("control", "ozone"), unique(Sitka$Time)))
+
+
+# 10.2  Classic nested designs
+
+if(FALSE) {
+summary(raov(Conc ~ Lab/Bat, data = coop, subset = Spc=="S1"))
+
+is.random(coop) <- T
+is.random(coop$Spc) <- F
+is.random(coop)
+
+varcomp(Conc ~ Lab/Bat, data = coop, subset = Spc=="S1")
+
+varcomp(Conc ~ Lab/Bat, data = coop, subset = Spc=="S1",
+        method = c("winsor", "minque0"))
+}
+
+#oats <- oats  # make a local copy: needed in S-PLUS
+oats$Nf <- ordered(oats$N, levels = sort(levels(oats$N)))
+
+oats.aov <- aov(Y ~ Nf*V + Error(B/V), data = oats, qr = TRUE)
+summary(oats.aov)
+summary(oats.aov, split = list(Nf = list(L = 1, Dev = 2:3)))
+
+plot(fitted(oats.aov[[4]]), studres(oats.aov[[4]]))
+abline(h = 0, lty = 2)
+oats.pr <- proj(oats.aov)
+qqnorm(oats.pr[[4]][,"Residuals"], ylab = "Stratum 4 residuals")
+qqline(oats.pr[[4]][,"Residuals"])
+
+oats.aov <- aov(Y ~ N + V + Error(B/V), data = oats, qr = TRUE)
+model.tables(oats.aov, type = "means", se = TRUE)
+# we can get the unimplemented standard errors from
+se.contrast(oats.aov, list(N == "0.0cwt", N == "0.2cwt"), data=oats)
+se.contrast(oats.aov, list(V == "Golden.rain", V == "Victory"), data=oats)
+
+
+# is.random(oats$B) <- T
+# varcomp(Y ~ N + V + B/V, data = oats)
+
+lme(Conc ~ 1, random = ~1 | Lab/Bat, data = coop,
+    subset = Spc=="S1")
+
+options(contrasts = c("contr.treatment", "contr.poly"))
+summary(lme(Y ~ N + V, random = ~1 | B/V, data = oats))
+
+
+# 10.3 Non-linear mixed effects models
+
+options(contrasts = c("contr.treatment", "contr.poly"))
+sitka.nlme <- nlme(size ~ A + B * (1 - exp(-(Time-100)/C)),
+    fixed = list(A ~ treat, B ~ treat, C ~ 1),
+    random = A + B ~ 1 | tree, data = Sitka,
+    start  = list(fixed = c(2, 0, 4, 0, 100)), verbose = TRUE)
+
+summary(sitka.nlme)
+
+summary(update(sitka.nlme,
+               corr = corCAR1(0.95, ~Time | tree)))
+
+Fpl <- deriv(~ A + (B-A)/(1 + exp((log(d) - ld50)/th)),
+    c("A","B","ld50","th"), function(d, A, B, ld50, th) {})
+
+st <- coef(nls(BPchange ~ Fpl(Dose, A, B, ld50, th),
+          start = c(A = 25, B = 0, ld50 = 4, th = 0.25),
+          data = Rabbit))
+Rc.nlme <- nlme(BPchange ~ Fpl(Dose, A, B, ld50, th),
+     fixed = list(A ~ 1, B ~ 1, ld50 ~ 1, th ~ 1),
+     random = A + ld50 ~ 1 | Animal, data = Rabbit,
+     subset = Treatment == "Control",
+     start = list(fixed = st))
+## The next fails on some R platforms and some versions of nlme
+## Rm.nlme <- update(Rc.nlme, subset = Treatment=="MDL")
+## so update starting values
+st <- coef(nls(BPchange ~ Fpl(Dose, A, B, ld50, th),
+          start = c(A = 25, B = 0, ld50 = 4, th = 0.25),
+          data = Rabbit, subset = Treatment == "MDL"))
+Rm.nlme <- update(Rc.nlme, subset = Treatment=="MDL",
+                  start = list(fixed = st))
+
+Rc.nlme
+Rm.nlme
+
+c1 <- c(28, 1.6, 4.1, 0.27, 0)
+R.nlme1 <- nlme(BPchange ~ Fpl(Dose, A, B, ld50, th),
+    fixed = list(A ~ Treatment, B ~ Treatment,
+                 ld50 ~ Treatment, th ~ Treatment),
+    random =  A + ld50 ~ 1 | Animal/Run, data = Rabbit,
+    start = list(fixed = c1[c(1, 5, 2, 5, 3, 5, 4, 5)]))
+summary(R.nlme1)
+R.nlme2 <- update(R.nlme1,
+     fixed = list(A ~ 1, B ~ 1, ld50 ~ Treatment, th ~ 1),
+     start = list(fixed = c1[c(1:3, 5, 4)]))
+anova(R.nlme2, R.nlme1)
+summary(R.nlme2)
+
+xyplot(BPchange ~ log(Dose) | Animal * Treatment, Rabbit,
+    xlab = "log(Dose) of Phenylbiguanide",
+    ylab = "Change in blood pressure (mm Hg)",
+    subscripts = TRUE, aspect = "xy", panel =
+       function(x, y, subscripts) {
+          panel.grid()
+          panel.xyplot(x, y)
+          sp <- spline(x, fitted(R.nlme2)[subscripts])
+          panel.xyplot(sp$x, sp$y, type = "l")
+       })
+
+
+# 10.4 Generalized linear mixed models
+
+contrasts(bacteria$trt) <- structure(contr.sdif(3),
+    dimnames = list(NULL, c("drug", "encourage")))
+summary(glm(y ~ trt * week, binomial, data = bacteria))
+summary(glm(y ~ trt + week, binomial, data = bacteria))
+
+summary(glm(y ~ lbase*trt + lage + V4, family = poisson, data = epil))
+
+epil2 <- epil[epil$period == 1, ]
+epil2["period"] <- rep(0, 59); epil2["y"] <- epil2["base"]
+epil["time"] <- 1; epil2["time"] <- 4
+epil2 <- rbind(epil, epil2)
+epil2$pred <- unclass(epil2$trt) * (epil2$period > 0)
+epil2$subject <- factor(epil2$subject)
+epil3 <- aggregate(epil2, list(epil2$subject, epil2$period > 0),
+                   function(x) if(is.numeric(x)) sum(x) else x[1])
+epil3$pred <- factor(epil3$pred, labels = c("base", "placebo", "drug"))
+
+contrasts(epil3$pred) <- structure(contr.sdif(3),
+    dimnames = list(NULL, c("placebo-base", "drug-placebo")))
+summary(glm(y ~ pred + factor(subject) + offset(log(time)),
+            family = poisson, data = epil3))
+
+glm(y ~ factor(subject), family = poisson, data = epil)
+
+library(survival)
+bacteria$Time <- rep(1, nrow(bacteria))
+coxph(Surv(Time, unclass(y)) ~ week + strata(ID),
+      data = bacteria, method = "exact")
+coxph(Surv(Time, unclass(y)) ~ factor(week) + strata(ID),
+      data = bacteria, method = "exact")
+coxph(Surv(Time, unclass(y)) ~ I(week > 2) + strata(ID),
+      data = bacteria, method = "exact")
+
+fit <- glm(y ~ trt + I(week> 2), binomial, data = bacteria)
+summary(fit)
+sum(residuals(fit, type = "pearson")^2)
+
+if(FALSE) { # slow
+## package available from http://www.stats.ox.ac.uk/pub/RWin
+## but these examples fail
+library(GLMMGibbs)
+# declare a random intercept for each subject
+epil$subject <- Ra(data = factor(epil$subject))
+glmm(y ~ lbase*trt + lage + V4 + subject, family = poisson,
+     data = epil, keep = 100000, thin = 100)
+
+epil3$subject <- Ra(data = factor(epil3$subject))
+glmm(y ~ pred + subject, family = poisson,
+     data = epil3, keep = 100000, thin = 100)
+}
+
+
+summary(glmmPQL(y ~ trt + I(week> 2), random = ~ 1 | ID,
+                family = binomial, data = bacteria))
+summary(glmmPQL(y ~ lbase*trt + lage + V4,
+                random = ~ 1 | subject,
+                family = poisson, data = epil))
+summary(glmmPQL(y ~ pred, random = ~1 | subject,
+                family = poisson, data = epil3))
+
+
+# 10.5  GEE models
+
+## modified for YAGS >= 3.21-3
+## package available from http://www.stats.ox.ac.uk/pub/RWin
+if(require(yags)) {
+print(yags(y == "y" ~ trt + I(week > 2), family = binomial, alphainit=0,
+           id = ID, corstr = "exchangeable", data = bacteria))
+
+print(yags(y ~ lbase*trt + lage + V4, family = poisson, alphainit=0,
+           id = subject, corstr = "exchangeable", data = epil))
+}
+
+options(contrasts = c("contr.sum", "contr.poly"))
+library(gee)
+summary(gee(y ~ pred + factor(subject), family = poisson,
+            id = subject, data = epil3,  corstr = "exchangeable"))
+
+# End of ch10
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/scripts/ch02.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/scripts/ch02.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/scripts/ch02.R	(revision 2477)
@@ -0,0 +1,199 @@
+#-*- R -*-
+
+## Script from Fourth Edition of `Modern Applied Statistics with S'
+
+# Chapter 2   Data Manipulation
+
+library(MASS)
+options(width=65, digits=5, height=9999)
+
+-2:2
+
+powers.of.pi <- pi^(-2:2)
+powers.of.pi
+class(powers.of.pi)
+
+print(powers.of.pi)
+summary(powers.of.pi)
+
+# rm(powers.of.pi)
+
+powers.of.pi[5]
+
+names(powers.of.pi) <- -2:2
+powers.of.pi
+powers.of.pi["2"]
+class(powers.of.pi)
+
+as.vector(powers.of.pi)
+names(powers.of.pi) <- NULL
+powers.of.pi
+
+citizen <- factor(c("uk", "us", "no", "au", "uk", "us", "us"))
+citizen
+
+unclass(citizen)
+
+citizen[5:7]
+
+citizen <- factor(c("uk", "us", "no", "au", "uk", "us", "us"),
+                   levels = c("us", "fr", "no", "au", "uk"))
+citizen
+
+income <- ordered(c("Mid", "Hi", "Lo", "Mid", "Lo", "Hi", "Lo"))
+income
+
+as.numeric(income)
+
+inc <- ordered(c("Mid", "Hi", "Lo", "Mid", "Lo", "Hi", "Lo"),
+                levels = c("Lo", "Mid", "Hi"))
+inc
+
+erupt <- cut(geyser$duration, breaks = 0:6)
+erupt <- ordered(erupt, labels=levels(erupt))
+erupt
+
+painters
+row.names(painters)
+
+summary(painters) # try it!
+
+attach(painters)
+School
+detach("painters")
+
+mymat <- matrix(1:30, 3, 10)
+mymat
+
+myarr <- mymat
+dim(myarr) <- c(3, 5, 2)
+class(myarr)
+myarr
+dim(myarr)
+
+dimnames(myarr) <- list(letters[1:3], NULL, c("(i)", "(ii)"))
+myarr
+
+newvar <- NA
+class(NA)
+
+newvar > 3
+
+x <- c(pi, 4, 5)
+x[2] <- NA
+x
+class(x)
+
+is.na(x)
+
+1/0
+
+x <- c(-1, 0, 1)/0
+x
+is.na(x)
+x > Inf
+
+x <- c(2.9, 3.1, 3.4, 3.4, 3.7, 3.7, 2.8, 2.5)
+
+
+
+letters[1:3]
+letters[c(1:3,3:1)]
+
+longitude <- state.center$x
+names(longitude) <- state.name
+longitude[c("Hawaii", "Alaska")]
+
+myarr[1, 2:4, ]
+myarr[1, 2:4, , drop = FALSE]
+
+attach(painters)
+painters[Colour >= 17, ]
+
+painters[Colour >= 15 & Composition > 10, ]
+painters[Colour >= 15 & School != "D", ]
+
+painters[is.element(School, c("A", "B", "D")), ]
+painters[School %in% c("A", "B", "D"), ]   ## R only
+
+painters[cbind(1:nrow(painters), ifelse(Colour > Expression, 3, 4))]
+
+painters[grep("io$", row.names(painters)), ]
+
+detach("painters")
+
+m <- 30
+fglsub1 <- fgl[sort(sample(1:nrow(fgl), m)), ]
+
+fglsub2 <- fgl[rbinom(nrow(fgl), 1, 0.1) == 1, ]
+
+fglsub3 <- fgl[seq(1, nrow(fgl), by = 10), ]
+
+painters[sort.list(row.names(painters)), ]
+
+
+lcrabs <- crabs  # make a copy
+lcrabs[, 4:8] <- log(crabs[, 4:8])
+
+scrabs <- crabs  # make a copy
+scrabs[, 4:8] <- lapply(scrabs[, 4:8], scale)
+## or to just centre the variables
+scrabs[, 4:8] <- lapply(scrabs[, 4:8], scale, scale = FALSE)
+
+scrabs <- crabs  # make a copy
+scrabs[ ] <- lapply(scrabs,
+   function(x) {if(is.numeric(x)) scale(x) else x})
+
+sapply(crabs, is.numeric)
+
+by(crabs[, 4:8], list(crabs$sp, crabs$sex), summary)
+
+aggregate(crabs[, 4:8], by = list(sp=crabs$sp, sex=crabs$sex),
+           median)
+
+authors <- data.frame(
+         surname = c("Tukey", "Venables", "Tierney", "Ripley", "McNeil"),
+         nationality = c("US", "Australia", "US", "UK", "Australia"),
+         deceased = c("yes", rep("no", 4)))
+books <- data.frame(
+         name = c("Tukey", "Venables", "Tierney",
+                  "Ripley", "Ripley", "McNeil", "R Core"),
+         title = c("Exploratory Data Analysis",
+                   "Modern Applied Statistics ...",
+                   "LISP-STAT",
+                   "Spatial Statistics", "Stochastic Simulation",
+                   "Interactive Data Analysis",
+                   "An Introduction to R"))
+
+authors
+books
+
+merge(authors, books, by.x = "surname", by.y = "name")
+
+attach(quine)
+table(Age)
+table(Sex, Age)
+
+tab <- xtabs(~ Sex + Age, quine)
+unclass(tab)
+
+tapply(Days, Age, mean)
+
+tapply(Days, Age, mean, trim = 0.1)
+
+tapply(Days, list(Sex, Age), mean)
+
+tapply(Days, list(Sex, Age),
+        function(x) sqrt(var(x)/length(x)))
+
+quineFO <- quine[sapply(quine, is.factor)]
+
+#tab <- do.call("table", quineFO)
+tab <- table(quineFO)
+
+QuineF <- expand.grid(lapply(quineFO, levels))
+
+QuineF$Freq <- as.vector(tab)
+QuineF
+
+# End of ch02
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/scripts/ch11.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/scripts/ch11.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/scripts/ch11.R	(revision 2477)
@@ -0,0 +1,223 @@
+#-*- R -*-
+
+## Script from Fourth Edition of `Modern Applied Statistics with S'
+
+# Chapter 11   Exploratory Multivariate Analysis
+
+library(MASS)
+pdf(file="ch11.pdf", width=8, height=6, pointsize=9)
+options(width=65, digits=5)
+
+
+# 11.1  Visualization methods
+
+# ir <- rbind(iris[,,1], iris[,,2], iris[,,3])
+ir <- rbind(iris3[,,1], iris3[,,2], iris3[,,3])
+ir.species <- factor(c(rep("s", 50), rep("c", 50), rep("v", 50)))
+(ir.pca <- princomp(log(ir), cor = TRUE))
+summary(ir.pca)
+plot(ir.pca)
+ir.pc <- predict(ir.pca)
+eqscplot(ir.pc[, 1:2], type = "n",
+    xlab = "first principal component",
+    ylab = "second principal component")
+text(ir.pc[, 1:2], labels = as.character(ir.species),
+     col = 3 + unclass(ir.species))
+
+lcrabs <- log(crabs[, 4:8])
+crabs.grp <- factor(c("B", "b", "O", "o")[rep(1:4, each = 50)])
+(lcrabs.pca <- princomp(lcrabs))
+loadings(lcrabs.pca)
+lcrabs.pc <- predict(lcrabs.pca)
+dimnames(lcrabs.pc) <- list(NULL, paste("PC", 1:5, sep = ""))
+
+if(FALSE) { # needs interaction with XGobi, or, better, rggobi
+library(xgobi)
+xgobi(lcrabs, colors = c("SkyBlue", "SlateBlue", "Orange",
+     "Red")[rep(1:4, each = 50)])
+xgobi(lcrabs, glyphs = 12 + 5*rep(0:3, each = 50, 4))
+
+library(rggobi)
+g <- ggobi(lcrabs)
+d <- displays(g)[[1]]
+pmode(d) <- "2D Tour"
+crabs.grp <- factor(c("B", "b", "O", "o")[rep(1:4, each = 50)])
+glyph_colour(g$lcrabs) <- crabs.grp
+colorscheme(g) <- "Paired 4"
+}
+
+ir.scal <- cmdscale(dist(ir), k = 2, eig = TRUE)
+ir.scal$points[, 2] <- -ir.scal$points[, 2]
+eqscplot(ir.scal$points, type = "n")
+text(ir.scal$points, labels = as.character(ir.species),
+     col = 3 + unclass(ir.species), cex = 0.8)
+
+distp <- dist(ir)
+dist2 <- dist(ir.scal$points)
+sum((distp - dist2)^2)/sum(distp^2)
+
+ir.sam <- sammon(dist(ir[-143,]))
+eqscplot(ir.sam$points, type = "n")
+text(ir.sam$points, labels = as.character(ir.species[-143]),
+     col = 3 + unclass(ir.species), cex = 0.8)
+
+ir.iso <- isoMDS(dist(ir[-143,]))
+eqscplot(ir.iso$points, type = "n")
+text(ir.iso$points, labels = as.character(ir.species[-143]),
+     col = 3 + unclass(ir.species), cex = 0.8)
+
+cr.scale <- 0.5 * log(crabs$CL * crabs$CW)
+slcrabs <- lcrabs - cr.scale
+cr.means <- matrix(0, 2, 5)
+cr.means[1,] <- colMeans(slcrabs[crabs$sex == "F", ])
+cr.means[2,] <- colMeans(slcrabs[crabs$sex == "M", ])
+dslcrabs <- slcrabs - cr.means[as.numeric(crabs$sex), ]
+lcrabs.sam <- sammon(dist(dslcrabs))
+eqscplot(lcrabs.sam$points, type = "n", xlab = "", ylab = "")
+text(lcrabs.sam$points, labels = as.character(crabs.grp))
+
+fgl.iso <- isoMDS(dist(as.matrix(fgl[-40, -10])))
+eqscplot(fgl.iso$points, type = "n", xlab = "", ylab = "", axes = FALSE)
+# either
+# for(i in seq(along = levels(fgl$type))) {
+#   set <- fgl$type[-40] == levels(fgl$type)[i]
+#   points(fgl.iso$points[set,], pch = 18, cex = 0.6, col = 2 + i)}
+# key(text = list(levels(fgl$type), col = 3:8))
+# or
+text(fgl.iso$points,
+     labels = c("F", "N", "V", "C", "T", "H")[fgl$type[-40]],
+     cex = 0.6)
+fgl.iso3 <- isoMDS(dist(as.matrix(fgl[-40, -10])), k = 3)
+# S: brush(fgl.iso3$points)
+fgl.col <- c("SkyBlue", "SlateBlue", "Orange", "Orchid",
+             "Green", "HotPink")[fgl$type]
+# xgobi(fgl.iso3$points, colors = fgl.col)
+
+library(class)
+gr <- somgrid(topo = "hexagonal")
+crabs.som <- batchSOM(lcrabs, gr, c(4, 4, 2, 2, 1, 1, 1, 0, 0))
+plot(crabs.som)
+
+bins <- as.numeric(knn1(crabs.som$code, lcrabs, 0:47))
+plot(crabs.som$grid, type = "n")
+symbols(crabs.som$grid$pts[, 1], crabs.som$grid$pts[, 2],
+        circles = rep(0.4, 48), inches = FALSE, add = TRUE)
+text(crabs.som$grid$pts[bins, ] + rnorm(400, 0, 0.1),
+     as.character(crabs.grp))
+
+crabs.som2 <- SOM(lcrabs, gr); plot(crabs.som2)
+
+state <- state.x77[, 2:7]; row.names(state) <- state.abb
+biplot(princomp(state, cor = TRUE), pc.biplot = TRUE, cex = 0.7,
+       expand = 0.8)
+
+library(fastICA)
+nICA <- 4
+crabs.ica <- fastICA(crabs[, 4:8], nICA)
+Z <- crabs.ica$S
+par(mfrow = c(2, nICA))
+for(i in 1:nICA) boxplot(Z[, i] ~ crabs.grp)
+par(mfrow = c(1, 1))
+
+
+# S: stars(state.x77[, c(7, 4, 6, 2, 5, 3)], byrow = TRUE)
+stars(state.x77[, c(7, 4, 6, 2, 5, 3)])
+
+parcoord(state.x77[, c(7, 4, 6, 2, 5, 3)])
+parcoord(log(ir)[, c(3, 4, 2, 1)], col = 1 + (0:149)%/%50)
+
+
+# 11.2   Cluster analysis
+
+swiss.x <- as.matrix(swiss[,-1])
+library(cluster)
+# S: h <- hclust(dist(swiss.x), method = "connected")
+h <- hclust(dist(swiss.x), method = "single")
+plot(h)
+cutree(h, 3)
+# S: plclust( clorder(h, cutree(h, 3) ))
+
+pltree(diana(swiss.x))
+par(mfrow = c(1, 1))
+
+h <- hclust(dist(swiss.x), method = "average")
+initial <- tapply(swiss.x, list(rep(cutree(h, 3),
+  ncol(swiss.x)), col(swiss.x)), mean)
+dimnames(initial) <- list(NULL, dimnames(swiss.x)[[2]])
+km <- kmeans(swiss.x, initial)
+(swiss.pca <- princomp(swiss.x))
+swiss.px <- predict(swiss.pca)
+dimnames(km$centers)[[2]] <- dimnames(swiss.x)[[2]]
+swiss.centers <- predict(swiss.pca, km$centers)
+eqscplot(swiss.px[, 1:2], type = "n",
+         xlab = "first principal component",
+         ylab = "second principal component")
+text(swiss.px[, 1:2], labels = km$cluster)
+points(swiss.centers[,1:2], pch = 3, cex = 3)
+if(interactive()) identify(swiss.px[, 1:2], cex = 0.5)
+
+swiss.pam <- pam(swiss.px, 3)
+summary(swiss.pam)
+eqscplot(swiss.px[, 1:2], type = "n",
+         xlab = "first principal component",
+         ylab = "second principal component")
+text(swiss.px[,1:2], labels = swiss.pam$clustering)
+points(swiss.pam$medoid[,1:2], pch = 3, cex = 3)
+
+fanny(swiss.px, 3)
+
+## From the on-line Errata:
+##
+##   `The authors of mclust have chosen to re-use the name for a
+##   completely incompatible package.  We can no longer recommend its
+##   use, and the code given in the first printing does not work in R's
+##   mclust-2.x.'
+##
+
+## And later mclust was given a restrictive licence, so this example
+## has been removed.  Finally in 2012 it was given an OpenSource licence.
+
+
+# 11.3 Factor analysis
+
+ability.FA <- factanal(covmat = ability.cov, factors = 1)
+ability.FA
+(ability.FA <- update(ability.FA, factors = 2))
+#summary(ability.FA)
+round(loadings(ability.FA) %*% t(loadings(ability.FA)) +
+           diag(ability.FA$uniq), 3)
+
+if(require("GPArotation")) {
+# loadings(rotate(ability.FA, rotation = "oblimin"))
+    L <- loadings(ability.FA)
+    print(oblirot <- oblimin(L))
+    par(pty = "s")
+    eqscplot(L, xlim = c(0,1), ylim = c(0,1))
+    if(interactive()) identify(L, dimnames(L)[[1]])
+    naxes <- oblirot$Th
+    arrows(rep(0, 2), rep(0, 2), naxes[,1], naxes[,2])
+}
+
+
+# 11.4 Discrete multivariate analysis
+
+caith <- as.matrix(caith)
+names(dimnames(caith)) <- c("eyes", "hair")
+mosaicplot(caith, color = TRUE)
+House <- xtabs(Freq ~ Type + Infl + Cont + Sat, housing)
+mosaicplot(House, color = TRUE)
+
+corresp(caith)
+
+caith2 <- caith
+dimnames(caith2)[[2]] <- c("F", "R", "M", "D", "B")
+par(mfcol = c(1, 3))
+plot(corresp(caith2, nf = 2)); title("symmetric")
+plot(corresp(caith2, nf = 2), type = "rows"); title("rows")
+plot(corresp(caith2, nf = 2), type = "col"); title("columns")
+par(mfrow = c(1, 1))
+
+farms.mca <- mca(farms, abbrev = TRUE)  # Use levels as names
+plot(farms.mca, cex = rep(0.7, 2))
+
+# End of ch11
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/scripts/ch03.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/scripts/ch03.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/scripts/ch03.R	(revision 2477)
@@ -0,0 +1,185 @@
+#-*- R -*-
+
+## Script from Fourth Edition of `Modern Applied Statistics with S'
+
+# Chapter 3   S Language
+
+library(MASS)
+options(width=65, digits=5, height=9999)
+
+# from Chapter 2
+
+powers.of.pi <- pi^(-2:2)
+names(powers.of.pi) <- -2:2
+mymat <- matrix(1:30, 3, 10)
+myarr <- mymat
+dim(myarr) <- c(3, 5, 2)
+dimnames(myarr) <- list(letters[1:3], NULL, c("(i)", "(ii)"))
+
+
+# 3.1  Language layout
+
+1 - pi + exp(1.7)
+
+a <- 6
+
+b <- a <- 6
+
+(z <- 1 - pi + exp(1.7))
+
+search()
+
+objects()
+
+objects(2)
+
+find("objects")
+
+get("[<-.data.frame", pos = 2)
+
+# hills <- hills  # only needed in S-PLUS
+hills$ispeed <- hills$time/hills$dist
+
+
+# 3.2  More on S objects
+
+length(letters)
+
+Empl <- list(employee = "Anna", spouse = "Fred", children = 3,
+            child.ages = c(4, 7, 9))
+
+Empl$employee
+Empl$child.ages[2]
+
+x <- "spouse"; Empl[[x]]
+
+unlist(Empl)
+unlist(Empl, use.names = F)
+
+attributes(myarr)
+attr(myarr, "dim")
+
+Empl <- c(Empl, service = 8)
+
+c(list(x = 1:3, a = 3:6), list(y = 8:23, b = c(3, 8, 39)))
+
+as(powers.of.pi, "vector")
+as(powers.of.pi, "numeric")
+is(powers.of.pi, "numeric")
+as(powers.of.pi, "character")
+is(powers.of.pi, "vector")
+as(powers.of.pi, "integer")
+is(mymat, "array")
+
+
+# 3.3  Arithmetical expressions
+
+x <- c(10.4, 5.6, 3.1, 6.4, 21.7)
+y <- c(x, x)
+v <- 2 * x + y + 1
+
+
+s3 <- seq(-5, 5, by = 0.2)
+s4 <- seq(length = 51, from = -5, by = 0.2)
+
+s5 <- rep(x, times = 5) # repeat whole vector
+s5 <- rep(x, each = 5)  # repeat element-by-element
+
+x <- 1:4          # puts c(1,2,3,4)             into x
+i <- rep(2, 4)    # puts c(2,2,2,2)             into i
+y <- rep(x, 2)    # puts c(1,2,3,4,1,2,3,4)     into y
+z <- rep(x, i)    # puts c(1,1,2,2,3,3,4,4)     into z
+w <- rep(x, x)    # puts c(1,2,2,3,3,3,4,4,4,4) into w
+
+( colc <- rep(1:3, each = 8) )
+( rowc <- rep(rep(1:4, each = 2), 3) )
+
+1 + (ceiling(1:24/8) - 1) %% 3 -> colc; colc
+1 + (ceiling(1:24/2) - 1) %% 4 -> rowc; rowc
+# or
+gl(3, 8)
+gl(4, 2, 24)
+
+
+# 3.4  Character vector operations
+
+paste(c("X", "Y"), 1:4)
+paste(c("X", "Y"), 1:4, sep = "")
+
+paste(c("X", "Y"), 1:4, sep = "", collapse = " + ")
+
+
+substring(state.name[44:50], 1, 4)
+
+as.vector(abbreviate(state.name[44:50]))
+as.vector(abbreviate(state.name[44:50], use.classes = FALSE))
+
+grep("na$", state.name)
+regexpr("na$", state.name)
+state.name[regexpr("na$", state.name)> 0]
+
+
+# 3.5  Formatting and printing
+
+d <- date()
+cat("Today's date is:", substring(d, 1, 10),
+                         substring(d, 25, 28), "\n")
+
+cat(1, 2, 3, 4, 5, 6, fill = 8, labels = letters)
+
+cat(powers.of.pi, "\n")
+format(powers.of.pi)
+cat(format(powers.of.pi), "\n", sep="  ")
+
+
+# 3.6  Calling conventions for functions
+
+args(hist.default)
+
+
+# 3.8  Control stuctures
+
+yp <- rpois(50, lambda = 1) # full Poisson sample of size 50
+table(yp)
+y <- yp[yp > 0]             # truncate the zeros; n = 29
+
+ybar <- mean(y); ybar
+lam <- ybar
+it <- 0                     # iteration count
+del <- 1                    # iterative adjustment
+while (abs(del) > 0.0001 && (it <- it + 1) < 10) {
+   del <- (lam - ybar*(1 - exp(-lam)))/(1 - ybar*exp(-lam))
+   lam <- lam - del
+   cat(it, lam, "\n")}
+
+
+# 3.9  Array and matrix operations
+
+p <- dbinom(0:4, size = 4, prob = 1/3)  # an example
+CC <- -(p %o% p)
+diag(CC) <- p + diag(CC)
+structure(3^8 * CC, dimnames = list(0:4, 0:4))  # convenience
+
+apply(iris3, c(2, 3), mean)
+apply(iris3, c(2, 3), mean, trim = 0.1)
+apply(iris3, 2, mean)
+
+ir.var <- apply(iris3, 3, var)
+
+ir.var <- array(ir.var, dim = dim(iris3)[c(2, 2, 3)],
+                dimnames = dimnames(iris3)[c(2, 2, 3)])
+
+matrix(rep(1/50, 50) %*% matrix(iris3, nrow = 50), nrow = 4,
+        dimnames = dimnames(iris3)[-1])
+
+ir.means <- colMeans(iris3)
+sweep(iris3, c(2, 3), ir.means)
+log(sweep(iris3, c(2, 3), ir.means, "/"))
+
+
+# 3.10  Introduction to classes and methods
+
+methods(summary)
+
+# End of ch03
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/scripts/ch12.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/scripts/ch12.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/scripts/ch12.R	(revision 2477)
@@ -0,0 +1,434 @@
+#-*- R -*-
+
+## Script from Fourth Edition of `Modern Applied Statistics with S'
+
+# Chapter 12   Classification
+
+library(MASS)
+pdf(file="ch12.pdf", width=8, height=6, pointsize=9)
+options(width=65, digits=5)
+library(class)
+library(nnet)
+
+
+# 12.1  Discriminant Analysis
+
+ir <- rbind(iris3[,,1], iris3[,,2], iris3[,,3])
+ir.species <- factor(c(rep("s", 50), rep("c", 50), rep("v", 50)))
+
+(ir.lda <- lda(log(ir), ir.species))
+ir.ld <- predict(ir.lda, dimen = 2)$x
+eqscplot(ir.ld, type = "n", xlab = "first linear discriminant",
+          ylab = "second linear discriminant")
+text(ir.ld, labels = as.character(ir.species[-143]),
+      col = 3 + unclass(ir.species), cex = 0.8)
+
+plot(ir.lda, dimen = 1)
+plot(ir.lda, type = "density", dimen = 1)
+
+lcrabs <- log(crabs[, 4:8])
+crabs.grp <- factor(c("B", "b", "O", "o")[rep(1:4, each = 50)])
+
+(dcrabs.lda <- lda(crabs$sex ~ FL + RW + CL + CW, lcrabs))
+table(crabs$sex, predict(dcrabs.lda)$class)
+
+(dcrabs.lda4 <- lda(crabs.grp ~ FL + RW + CL + CW, lcrabs))
+dcrabs.pr4 <- predict(dcrabs.lda4, dimen = 2)
+dcrabs.pr2 <- dcrabs.pr4$post[, c("B", "O")] %*% c(1, 1)
+table(crabs$sex, dcrabs.pr2 > 0.5)
+
+cr.t <- dcrabs.pr4$x[, 1:2]
+eqscplot(cr.t, type = "n", xlab = "First LD", ylab = "Second LD")
+text(cr.t, labels = as.character(crabs.grp))
+perp <- function(x, y) {
+   m <- (x+y)/2
+   s <- - (x[1] - y[1])/(x[2] - y[2])
+   abline(c(m[2] - s*m[1], s))
+   invisible()
+}
+cr.m <- lda(cr.t, crabs$sex)$means
+points(cr.m, pch = 3, mkh = 0.3)
+perp(cr.m[1, ], cr.m[2, ])
+
+cr.lda <- lda(cr.t, crabs.grp)
+x <- seq(-6, 6, 0.25)
+y <- seq(-2, 2, 0.25)
+Xcon <- matrix(c(rep(x,length(y)),
+              rep(y, rep(length(x), length(y)))),,2)
+cr.pr <- predict(cr.lda, Xcon)$post[, c("B", "O")] %*% c(1,1)
+contour(x, y, matrix(cr.pr, length(x), length(y)),
+       levels = 0.5, labex = 0, add = TRUE, lty=  3)
+
+for(i in c("O", "o",  "B", "b"))
+ print(var(lcrabs[crabs.grp == i, ]))
+
+fgl.ld <- predict(lda(type ~ ., fgl), dimen = 2)$x
+eqscplot(fgl.ld, type = "n", xlab = "LD1", ylab = "LD2")
+# either
+# for(i in seq(along = levels(fgl$type))) {
+#    set <- fgl$type[-40] == levels(fgl$type)[i]
+#    points(fgl.ld[set,], pch = 18, cex = 0.6, col = 2 + i)}
+# key(text = list(levels(fgl$type), col = 3:8))
+# or
+text(fgl.ld, cex = 0.6,
+     labels = c("F", "N", "V", "C", "T", "H")[fgl$type[-40]])
+
+fgl.rld <- predict(lda(type ~ ., fgl, method = "t"), dimen = 2)$x
+eqscplot(fgl.rld, type = "n", xlab = "LD1", ylab = "LD2")
+# either
+# for(i in seq(along = levels(fgl$type))) {
+#   set <- fgl$type[-40] == levels(fgl$type)[i]
+#   points(fgl.rld[set,], pch = 18, cex = 0.6, col = 2 + i)}
+# key(text = list(levels(fgl$type), col = 3:8))
+# or
+text(fgl.rld, cex = 0.6,
+     labels = c("F", "N", "V", "C", "T", "H")[fgl$type[-40]])
+
+
+# 12.2  Classification theory
+
+#decrease len if you have little memory.
+predplot <- function(object, main="", len = 100, ...)
+{
+    plot(Cushings[,1], Cushings[,2], log="xy", type="n",
+         xlab = "Tetrahydrocortisone", ylab = "Pregnanetriol", main = main)
+    for(il in 1:4) {
+        set <- Cushings$Type==levels(Cushings$Type)[il]
+        text(Cushings[set, 1], Cushings[set, 2],
+             labels=as.character(Cushings$Type[set]), col = 2 + il) }
+    xp <- seq(0.6, 4.0, length=len)
+    yp <- seq(-3.25, 2.45, length=len)
+    cushT <- expand.grid(Tetrahydrocortisone = xp,
+                         Pregnanetriol = yp)
+    Z <- predict(object, cushT, ...); zp <- as.numeric(Z$class)
+    zp <- Z$post[,3] - pmax(Z$post[,2], Z$post[,1])
+    contour(exp(xp), exp(yp), matrix(zp, len),
+            add = TRUE, levels = 0, labex = 0)
+    zp <- Z$post[,1] - pmax(Z$post[,2], Z$post[,3])
+    contour(exp(xp), exp(yp), matrix(zp, len),
+            add = TRUE, levels = 0, labex = 0)
+    invisible()
+}
+
+cushplot <- function(xp, yp, Z)
+{
+    plot(Cushings[, 1], Cushings[, 2], log = "xy", type = "n",
+         xlab = "Tetrahydrocortisone", ylab = "Pregnanetriol")
+    for(il in 1:4) {
+        set <- Cushings$Type==levels(Cushings$Type)[il]
+        text(Cushings[set, 1], Cushings[set, 2],
+             labels = as.character(Cushings$Type[set]), col = 2 + il) }
+    zp <- Z[, 3] - pmax(Z[, 2], Z[, 1])
+    contour(exp(xp), exp(yp), matrix(zp, np),
+            add = TRUE, levels = 0, labex = 0)
+    zp <- Z[, 1] - pmax(Z[, 2], Z[, 3])
+    contour(exp(xp), exp(yp), matrix(zp, np),
+            add = TRUE, levels = 0, labex = 0)
+    invisible()
+}
+
+cush <- log(as.matrix(Cushings[, -3]))
+tp <- Cushings$Type[1:21, drop = TRUE]
+cush.lda <- lda(cush[1:21,], tp); predplot(cush.lda, "LDA")
+cush.qda <- qda(cush[1:21,], tp); predplot(cush.qda, "QDA")
+predplot(cush.qda, "QDA (predictive)", method = "predictive")
+predplot(cush.qda, "QDA (debiased)", method = "debiased")
+
+Cf <- data.frame(tp = tp,
+  Tetrahydrocortisone = log(Cushings[1:21, 1]),
+  Pregnanetriol = log(Cushings[1:21, 2]) )
+cush.multinom <- multinom(tp ~ Tetrahydrocortisone
+  + Pregnanetriol, Cf, maxit = 250)
+xp <- seq(0.6, 4.0, length = 100); np <- length(xp)
+yp <- seq(-3.25, 2.45, length = 100)
+cushT <- expand.grid(Tetrahydrocortisone = xp,
+                     Pregnanetriol = yp)
+Z <- predict(cush.multinom, cushT, type = "probs")
+cushplot(xp, yp, Z)
+
+library(tree)
+cush.tr <- tree(tp ~ Tetrahydrocortisone + Pregnanetriol, Cf)
+plot(cush[, 1], cush[, 2], type = "n",
+    xlab = "Tetrahydrocortisone", ylab = "Pregnanetriol")
+for(il in 1:4) {
+ set <- Cushings$Type==levels(Cushings$Type)[il]
+ text(cush[set, 1], cush[set, 2],
+      labels = as.character(Cushings$Type[set]), col = 2 + il) }
+par(cex = 1.5); partition.tree(cush.tr, add = TRUE); par(cex = 1)
+
+
+# 12.3  Non-parametric rules
+
+Z <- knn(scale(cush[1:21, ], FALSE, c(3.4, 5.7)),
+        scale(cushT, FALSE, c(3.4, 5.7)), tp)
+cushplot(xp, yp, class.ind(Z))
+Z <- knn(scale(cush[1:21, ], FALSE, c(3.4, 5.7)),
+        scale(cushT, FALSE, c(3.4, 5.7)), tp, k = 3)
+cushplot(xp, yp, class.ind(Z))
+
+
+# 12.4  Neural networks
+
+pltnn <- function(main, ...) {
+   plot(Cushings[,1], Cushings[,2], log="xy", type="n",
+   xlab="Tetrahydrocortisone", ylab = "Pregnanetriol", main=main, ...)
+   for(il in 1:4) {
+       set <- Cushings$Type==levels(Cushings$Type)[il]
+       text(Cushings[set, 1], Cushings[set, 2],
+          as.character(Cushings$Type[set]), col = 2 + il) }
+}
+
+plt.bndry <- function(size=0, decay=0, ...)
+{
+   cush.nn <- nnet(cush, tpi, skip=TRUE, softmax=TRUE, size=size,
+      decay=decay, maxit=1000)
+   invisible(b1(predict(cush.nn, cushT), ...))
+}
+
+b1 <- function(Z, ...)
+{
+   zp <- Z[,3] - pmax(Z[,2], Z[,1])
+   contour(exp(xp), exp(yp), matrix(zp, np),
+      add=TRUE, levels=0, labex=0, ...)
+   zp <- Z[,1] - pmax(Z[,3], Z[,2])
+   contour(exp(xp), exp(yp), matrix(zp, np),
+      add=TRUE, levels=0, labex=0, ...)
+}
+
+cush <- cush[1:21,]; tpi <- class.ind(tp)
+# functions pltnn and plt.bndry given in the scripts
+par(mfrow = c(2, 2))
+pltnn("Size = 2")
+set.seed(1); plt.bndry(size = 2, col = 2)
+set.seed(3); plt.bndry(size = 2, col = 3)
+plt.bndry(size = 2, col = 4)
+
+pltnn("Size = 2, lambda = 0.001")
+set.seed(1); plt.bndry(size = 2, decay = 0.001, col = 2)
+set.seed(2); plt.bndry(size = 2, decay = 0.001, col = 4)
+
+pltnn("Size = 2, lambda = 0.01")
+set.seed(1); plt.bndry(size = 2, decay = 0.01, col = 2)
+set.seed(2); plt.bndry(size = 2, decay = 0.01, col = 4)
+
+pltnn("Size = 5, 20  lambda = 0.01")
+set.seed(2); plt.bndry(size = 5, decay = 0.01, col = 1)
+set.seed(2); plt.bndry(size = 20, decay = 0.01, col = 2)
+
+# functions pltnn and b1 are in the scripts
+pltnn("Many local maxima")
+Z <- matrix(0, nrow(cushT), ncol(tpi))
+for(iter in 1:20) {
+   set.seed(iter)
+   cush.nn <- nnet(cush, tpi, skip = TRUE, softmax = TRUE, size = 3,
+       decay = 0.01, maxit = 1000, trace = FALSE)
+   Z <- Z + predict(cush.nn, cushT)
+   cat("final value", format(round(cush.nn$value,3)), "\n")
+   b1(predict(cush.nn, cushT), col = 2, lwd = 0.5)
+}
+pltnn("Averaged")
+b1(Z, lwd = 3)
+
+
+# 12.5  Support vector machines
+
+library(e1071)
+crabs.svm <- svm(crabs$sp ~ ., data = lcrabs, cost = 100, gamma = 1)
+table(true = crabs$sp, predicted = predict(crabs.svm, lcrabs))
+
+svm(crabs$sp ~ ., data = lcrabs, cost = 100, gamma = 1, cross = 10)
+
+
+
+# 12.6  Forensic glass example
+
+set.seed(123)
+# dump random partition from S-PLUS
+rand <- c(9, 6, 7, 10, 8, 8, 2, 2, 10, 1, 5, 2, 3, 8, 6, 8, 2, 6, 4,
+4, 6, 1, 3, 2, 5, 5, 5, 3, 1, 9, 10, 2, 8, 2, 1, 6, 2, 7, 7, 8, 4, 1,
+9, 5, 5, 1, 4, 6, 8, 6, 5, 7, 9, 2, 1, 1, 10, 9, 7, 6, 4, 7, 4, 8, 9,
+9, 1, 8, 9, 5, 3, 3, 4, 8, 8, 6, 6, 9, 3, 10, 3, 10, 6, 6, 5, 10, 10,
+2, 10, 6, 1, 4, 7, 8, 9, 10, 7, 10, 8, 4, 6, 8, 9, 10, 1, 9, 10, 6, 8,
+4, 10, 8, 2, 10, 2, 3, 10, 1, 5, 9, 4, 4, 8, 2, 7, 6, 4, 8, 10, 4, 8,
+10, 6, 10, 4, 9, 4, 1, 6, 5, 3, 2, 4, 1, 3, 4, 8, 4, 3, 7, 2, 5, 4, 5,
+10, 7, 4, 2, 6, 3, 2, 2, 8, 4, 10, 8, 10, 2, 10, 6, 5, 2, 3, 2, 6, 2,
+7, 7, 8, 9, 7, 10, 8, 6, 7, 9, 7, 10, 3, 2, 7, 5, 6, 1, 3, 9, 7, 7, 1,
+8, 7, 8, 8, 8, 10, 4, 5, 9, 4, 6, 9, 6, 10, 2)
+
+con <- function(...)
+{
+    print(tab <- table(...))
+    diag(tab) <- 0
+    cat("error rate = ",
+        round(100*sum(tab)/length(list(...)[[1]]), 2), "%\n")
+    invisible()
+}
+CVtest <- function(fitfn, predfn, ...)
+{
+    res <- fgl$type
+    for (i in sort(unique(rand))) {
+        cat("fold ", i, "\n", sep = "")
+        learn <- fitfn(rand != i, ...)
+        res[rand == i] <- predfn(learn, rand == i)
+    }
+    res
+}
+res.multinom <- CVtest(
+  function(x, ...) multinom(type ~ ., fgl[x, ], ...),
+  function(obj, x) predict(obj, fgl[x, ], type = "class"),
+  maxit = 1000, trace = FALSE)
+
+con(true = fgl$type, predicted = res.multinom)
+
+res.lda <- CVtest(
+  function(x, ...) lda(type ~ ., fgl[x, ], ...),
+  function(obj, x) predict(obj, fgl[x, ])$class )
+con(true = fgl$type, predicted = res.lda)
+
+fgl0 <- fgl[ , -10] # drop type
+{ res <- fgl$type
+  for (i in sort(unique(rand))) {
+      cat("fold ", i ,"\n", sep = "")
+      sub <- rand == i
+      res[sub] <- knn(fgl0[!sub, ], fgl0[sub, ], fgl$type[!sub],
+                      k = 1)
+  }
+  res } -> res.knn1
+con(true = fgl$type, predicted = res.knn1)
+
+res.lb <- knn(fgl0, fgl0, fgl$type, k = 3, prob = TRUE, use.all = FALSE)
+table(attr(res.lb, "prob"))
+
+library(rpart)
+res.rpart <- CVtest(
+  function(x, ...) {
+    tr <- rpart(type ~ ., fgl[x,], ...)
+    cp <- tr$cptable
+    r <- cp[, 4] + cp[, 5]
+    rmin <- min(seq(along = r)[cp[, 4] < min(r)])
+    cp0 <- cp[rmin, 1]
+    cat("size chosen was", cp[rmin, 2] + 1, "\n")
+    prune(tr, cp = 1.01*cp0)
+  },
+  function(obj, x)
+    predict(obj, fgl[x, ], type = "class"),
+  cp = 0.001
+)
+con(true = fgl$type, predicted = res.rpart)
+
+fgl1 <- fgl
+fgl1[1:9] <- lapply(fgl[, 1:9], function(x)
+               {r <- range(x); (x - r[1])/diff(r)})
+
+CVnn2 <- function(formula, data,
+                  size = rep(6,2), lambda = c(0.001, 0.01),
+                  nreps = 1, nifold = 5, verbose = 99, ...)
+{
+    CVnn1 <- function(formula, data, nreps=1, ri, verbose,  ...)
+    {
+        truth <- data[,deparse(formula[[2]])]
+        res <-  matrix(0, nrow(data), length(levels(truth)))
+        if(verbose > 20) cat("  inner fold")
+        for (i in sort(unique(ri))) {
+            if(verbose > 20) cat(" ", i,  sep="")
+            for(rep in 1:nreps) {
+                learn <- nnet(formula, data[ri !=i,], trace = FALSE, ...)
+                res[ri == i,] <- res[ri == i,] +
+                    predict(learn, data[ri == i,])
+            }
+        }
+        if(verbose > 20) cat("\n")
+        sum(as.numeric(truth) != max.col(res/nreps))
+    }
+    truth <- data[,deparse(formula[[2]])]
+    res <-  matrix(0, nrow(data), length(levels(truth)))
+    choice <- numeric(length(lambda))
+    for (i in sort(unique(rand))) {
+        if(verbose > 0) cat("fold ", i,"\n", sep="")
+        ri <- sample(nifold, sum(rand!=i), replace=TRUE)
+        for(j in seq(along=lambda)) {
+            if(verbose > 10)
+                cat("  size =", size[j], "decay =", lambda[j], "\n")
+            choice[j] <- CVnn1(formula, data[rand != i,], nreps=nreps,
+                               ri=ri, size=size[j], decay=lambda[j],
+                               verbose=verbose, ...)
+        }
+        decay <- lambda[which.is.max(-choice)]
+        csize <- size[which.is.max(-choice)]
+        if(verbose > 5) cat("  #errors:", choice, "  ") #
+        if(verbose > 1) cat("chosen size = ", csize,
+                            " decay = ", decay, "\n", sep="")
+        for(rep in 1:nreps) {
+            learn <- nnet(formula, data[rand != i,], trace=FALSE,
+                          size=csize, decay=decay, ...)
+            res[rand == i,] <- res[rand == i,] +
+                predict(learn, data[rand == i,])
+        }
+    }
+    factor(levels(truth)[max.col(res/nreps)], levels = levels(truth))
+}
+
+if(FALSE) { # only run this if you have time to wait
+res.nn2 <- CVnn2(type ~ ., fgl1, skip = TRUE, maxit = 500, nreps = 10)
+con(true = fgl$type, predicted = res.nn2)
+}
+
+res.svm <- CVtest(
+  function(x, ...) svm(type ~ ., fgl[x, ], ...),
+  function(obj, x) predict(obj, fgl[x, ]),
+  cost = 100, gamma = 1 )
+con(true = fgl$type, predicted = res.svm)
+
+svm(type ~ ., data = fgl, cost = 100, gamma = 1, cross = 10)
+
+
+cd0 <- lvqinit(fgl0, fgl$type, prior = rep(1, 6)/6, k = 3)
+cd1 <- olvq1(fgl0, fgl$type, cd0)
+con(true = fgl$type, predicted = lvqtest(cd1, fgl0))
+
+CV.lvq <- function()
+{
+    res <- fgl$type
+    for(i in sort(unique(rand))) {
+        cat("doing fold", i, "\n")
+        cd0 <- lvqinit(fgl0[rand != i,], fgl$type[rand != i],
+                       prior = rep(1, 6)/6, k = 3)
+        cd1 <- olvq1(fgl0[rand != i,], fgl$type[rand != i], cd0)
+        cd1 <- lvq3(fgl0[rand != i,], fgl$type[rand != i],
+                    cd1, niter = 10000)
+        res[rand == i] <- lvqtest(cd1, fgl0[rand == i, ])
+    }
+    res
+}
+con(true = fgl$type, predicted = CV.lvq())
+
+
+# 12.7  Calibration plots
+
+CVprobs <- function(fitfn, predfn, ...)
+{
+    res <- matrix(, 214, 6)
+    for (i in sort(unique(rand))) {
+        cat("fold ", i, "\n", sep = "")
+        learn <- fitfn(rand != i, ...)
+        res[rand == i, ] <- predfn(learn, rand == i)
+    }
+    res
+}
+probs.multinom <- CVprobs(
+  function(x, ...) multinom(type ~ ., fgl[x, ], ...),
+  function(obj, x) predict(obj, fgl[x, ], type = "probs"),
+  maxit = 1000, trace = FALSE)
+
+probs.yes <- as.vector(class.ind(fgl$type))
+probs <- as.vector(probs.multinom)
+par(pty = "s")
+plot(c(0, 1), c(0, 1), type = "n", xlab = "predicted probability",
+     ylab = "", xaxs = "i", yaxs = "i", las = 1)
+rug(probs[probs.yes == 0], 0.02, side = 1, lwd = 0.5)
+rug(probs[probs.yes == 1], 0.02, side = 3, lwd = 0.5)
+abline(0, 1)
+newp <- seq(0, 1, length = 100)
+lines(newp, predict(loess(probs.yes ~ probs, span = 1), newp))
+
+# End of ch12
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/scripts/ch04.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/scripts/ch04.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/scripts/ch04.R	(revision 2477)
@@ -0,0 +1,253 @@
+#-*- R -*-
+
+## Script from Fourth Edition of `Modern Applied Statistics with S'
+
+# Chapter 4   Graphical Output
+
+library(MASS)
+library(lattice)
+pdf(file="ch04.pdf", width=8, height=6, pointsize=9)
+options(width=65, digits=5)
+
+
+# 4.2  Basic plotting functions
+
+lung.deaths <- aggregate(ts.union(mdeaths, fdeaths), 1)
+barplot(t(lung.deaths), names = dimnames(lung.deaths)[[1]],
+        main = "UK deaths from lung disease")
+if(interactive())
+    legend(locator(1), c("Males", "Females"), fill = c(2, 3))
+loc <- barplot(t(lung.deaths), names = dimnames(lung.deaths)[[1]],
+               angle = c(45, 135), density = 10, col = 1)
+total <- rowSums(lung.deaths)
+text(loc, total + par("cxy")[2], total, cex = 0.7, xpd = TRUE)
+
+# S: if(interactive()) brush(hills)
+
+topo.loess <- loess(z ~ x * y, topo, degree = 2, span = 0.25)
+topo.mar <- list(x = seq(0, 6.5, 0.2), y=seq(0, 6.5, 0.2))
+topo.lo <- predict(topo.loess, expand.grid(topo.mar))
+par(pty = "s")       # square plot
+contour(topo.mar$x, topo.mar$y, topo.lo, xlab = "", ylab = "",
+  levels = seq(700,1000,25), cex = 0.7)
+points(topo$x, topo$y)
+par(pty =  "m")
+topo.lo1 <- cbind(expand.grid(x=topo.mar$x, y=topo.mar$y),
+                  z=as.vector(topo.lo))
+contourplot(z ~ x * y, topo.lo1, aspect = 1,
+  at = seq(700, 1000, 25), xlab = "", ylab = "",
+  panel = function(x, y, subscripts, ...) {
+     panel.levelplot(x, y, subscripts, ...)
+     panel.xyplot(topo$x,topo$y, cex = 0.5)
+  }
+)
+
+# see help(Skye)
+# ternary(Skye/100, ord = c(1, 3, 2))
+
+
+# 4.3  Enhancing plots
+
+attach(wtloss)
+oldpar <- par(no.readonly = TRUE)
+# alter margin 4; others are default
+par(mar = c(5.1, 4.1, 4.1, 4.1))
+plot(Days, Weight, type = "p", ylab = "Weight (kg)")
+Wt.lbs <- pretty(range(Weight*2.205))
+axis(side = 4, at = Wt.lbs/2.205, lab = Wt.lbs, las = 0)
+mtext("Weight (lb)", side = 4, line = 3)
+detach()
+par(oldpar)
+
+x <- 0:100
+plik <- function(lambda)
+  sum(dpois(x, lambda) * 2 * ( (lambda - x) +
+      x * log(pmax(1, x)/lambda)))
+lambda <- c(1e-8, 0.05, seq(0.1, 5, 0.1))
+plot(lambda, sapply(lambda, plik), type = "l", ylim = c(0, 1.4),
+     xlab = expression(lambda),
+     ylab = expression(paste(E[lambda], "(deviance)")))
+abline(h = 1, lty = 3)
+
+
+# 4.4  Fine control of graphics
+
+## in R just use swiss
+# swiss <- data.frame(Fertility = swiss.fertility, swiss.x)
+attach(swiss)
+qqnorm(Infant.Mortality)
+qqline(Infant.Mortality)
+
+samp <- cbind(Infant.Mortality, matrix(rnorm(47*19), 47, 19))
+samp <- apply(scale(samp), 2, sort)
+rs <- samp[, 1]
+xs <- qqnorm(rs, plot = FALSE)$x
+env <- t(apply(samp[, -1], 1, range))
+
+matplot(xs, cbind(rs, env), type = "pnn",
+        pch = 4, mkh = 0.06, axes = FALSE, xlab = "", ylab = "")
+
+xyul <- par("usr")
+smidge <- min(diff(c(xyul[1], xs, xyul[2])))/2
+segments(xs - smidge, env[, 1], xs + smidge, env[, 1])
+segments(xs - smidge, env[, 2], xs + smidge, env[, 2])
+
+xul <- trunc(10*xyul[1:2])/10
+axis(1, at=seq(xul[1], xul[2], by=0.1), labels = FALSE, tck=0.01)
+xi <- trunc(xyul[1:2])
+axis(1, at = seq(xi[1], xi[2], by = 0.5), tck = 0.02)
+yul <- trunc(5*xyul[3:4])/5
+axis(2, at=seq(yul[1], yul[2], by=0.2), labels = FALSE, tck=0.01)
+yi <- trunc(xyul[3:4])
+axis(2, at = yi[1]:yi[2], tck = 0.02)
+
+box(bty = "l")          # lower case "L"
+# ps.options()$fonts
+# R cannot change font family in a plot.
+mtext("Quantiles of Standard Normal", side=1, line=2.5, font=3)
+mtext(expression(R[i]), side = 2, line = 2, at = yul[2])
+detach()
+
+
+# 4.5  Trellis graphics
+
+xyplot(time ~ dist, data = hills,
+  panel = function(x, y, ...) {
+     panel.xyplot(x, y, ...)
+     panel.lmline(x, y, type = "l")
+     panel.abline(lqs(y ~ x), lty = 3)
+#     identify(x, y, row.names(hills))
+  }
+)
+
+## note: don't use separate title() call
+bwplot(Expt ~ Speed, data = michelson, ylab = "Experiment No.",
+       main = "Speed of Light Data")
+
+splom(~ swiss, aspect = "fill",
+  panel = function(x, y, ...) {
+     panel.xyplot(x, y, ...); panel.loess(x, y, ...)
+  }
+)
+
+sps <- trellis.par.get("superpose.symbol")
+sps$pch <- 1:7
+trellis.par.set("superpose.symbol", sps)
+xyplot(Time ~ Viscosity, data = stormer, groups = Wt,
+   panel = panel.superpose, type = "b",
+   key = list(columns = 3,
+       text = list(paste(c("Weight:   ", "", ""),
+                         unique(stormer$Wt), "gms")),
+       points = Rows(sps, 1:3)
+       )
+)
+rm(sps)
+
+topo.plt <- expand.grid(topo.mar)
+topo.plt$pred <- as.vector(predict(topo.loess, topo.plt))
+levelplot(pred ~ x * y, topo.plt, aspect = 1,
+  at = seq(690, 960, 10), xlab = "", ylab = "",
+  panel = function(x, y, subscripts, ...) {
+     panel.levelplot(x, y, subscripts, ...)
+     panel.xyplot(topo$x,topo$y, cex = 0.5, col = 1)
+  }
+)
+
+wireframe(pred ~ x * y, topo.plt, aspect = c(1, 0.5),
+          drape = TRUE, screen = list(z = -150, x = -60),
+          colorkey = list(space="right", height=0.6))
+
+
+lcrabs.pc <- predict(princomp(log(crabs[,4:8])))
+crabs.grp <- c("B", "b", "O", "o")[rep(1:4, each = 50)]
+splom(~ lcrabs.pc[, 1:3], groups = crabs.grp,
+   panel = panel.superpose,
+   key = list(text = list(c("Blue male", "Blue female",
+                            "Orange Male", "Orange female")),
+       points = Rows(trellis.par.get("superpose.symbol"), 1:4),
+       columns = 4)
+  )
+
+sex <- crabs$sex
+levels(sex) <- c("Female", "Male")
+sp <- crabs$sp
+levels(sp) <- c("Blue", "Orange")
+splom(~ lcrabs.pc[, 1:3] | sp*sex, cex = 0.5, pscales = 0)
+
+Quine <- quine
+levels(Quine$Eth) <- c("Aboriginal", "Non-aboriginal")
+levels(Quine$Sex) <- c("Female", "Male")
+levels(Quine$Age) <- c("primary", "first form",
+                      "second form", "third form")
+levels(Quine$Lrn) <- c("Average learner", "Slow learner")
+bwplot(Age ~ Days | Sex*Lrn*Eth, data = Quine)
+
+bwplot(Age ~ Days | Sex*Lrn*Eth, data = Quine, layout = c(4, 2),
+      strip = function(...) strip.default(..., style = 1))
+
+stripplot(Age ~ Days | Sex*Lrn*Eth, data = Quine,
+         jitter = TRUE, layout = c(4, 2))
+
+stripplot(Age ~ Days | Eth*Sex, data = Quine,
+   groups = Lrn, jitter = TRUE,
+   panel = function(x, y, subscripts, jitter.data = FALSE, ...) {
+       if(jitter.data)  y <- jitter(as.numeric(y))
+       panel.superpose(x, y, subscripts, ...)
+   },
+   xlab = "Days of absence",
+   between = list(y = 1), par.strip.text = list(cex = 0.7),
+   key = list(columns = 2, text = list(levels(Quine$Lrn)),
+       points = Rows(trellis.par.get("superpose.symbol"), 1:2)
+       ),
+   strip = function(...)
+        strip.default(..., strip.names = c(TRUE, TRUE), style = 1)
+)
+
+fgl0 <- fgl[ ,-10] # omit type.
+fgl.df <- data.frame(type = rep(fgl$type, 9),
+  y = as.vector(as.matrix(fgl0)),
+  meas = factor(rep(1:9, each = 214), labels = names(fgl0)))
+stripplot(type ~ y | meas, data = fgl.df,
+  scales = list(x = "free"), xlab = "", cex = 0.5,
+  strip = function(...) strip.default(style = 1, ...))
+
+if(FALSE) { # no data supplied
+xyplot(ratio ~ scant | subject, data = A5,
+      xlab = "scan interval (years)",
+      ylab = "ventricle/brain volume normalized to 1 at start",
+      subscripts = TRUE, ID = A5$ID,
+      strip = function(factor, ...)
+         strip.default(..., factor.levels = labs, style = 1),
+      layout = c(8, 5, 1),
+      skip = c(rep(FALSE, 37), rep(TRUE, 1), rep(FALSE, 1)),
+      panel = function(x, y, subscripts, ID) {
+          panel.xyplot(x, y, type = "b", cex = 0.5)
+          which <- unique(ID[subscripts])
+          panel.xyplot(c(0, 1.5), pr3[names(pr3) == which],
+                       type = "l", lty = 3)
+          if(which == 303 || which == 341) points(1.4, 1.3)
+      })
+}
+
+Cath <- equal.count(swiss$Catholic, number = 6, overlap = 0.25)
+xyplot(Fertility ~ Education | Cath, data = swiss,
+  span = 1, layout = c(6, 1), aspect = 1,
+  panel = function(x, y, span) {
+     panel.xyplot(x, y); panel.loess(x, y, span)
+  }
+)
+
+Cath2 <- equal.count(swiss$Catholic, number = 2, overlap = 0)
+Agr <- equal.count(swiss$Agric, number = 3, overlap = 0.25)
+xyplot(Fertility ~ Education | Agr * Cath2, data = swiss,
+  span = 1, aspect = "xy",
+  panel = function(x, y, span) {
+     panel.xyplot(x, y); panel.loess(x, y, span)
+  }
+)
+
+Cath
+levels(Cath)
+plot(Cath, aspect = 0.3)
+
+# End of ch04
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/scripts/ch13.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/scripts/ch13.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/scripts/ch13.R	(revision 2477)
@@ -0,0 +1,285 @@
+#-*- R -*-
+
+## Script from Fourth Edition of `Modern Applied Statistics with S'
+
+# Chapter 13   Survival Analysis
+
+library(MASS)
+options(width=65, digits=5, height=9999)
+options(contrasts=c("contr.treatment", "contr.poly"))
+pdf("ch13.pdf", width=8, height=6, pointsize=9)
+
+library(survival)
+
+# 13.1  Estimators of survivor curves
+
+plot(survfit(Surv(time) ~ ag, data=leuk), lty = 2:3, col = 2:3)
+legend(80, 0.8, c("ag absent", "ag present"), lty = 2:3, col = 2:3)
+
+attach(gehan)
+Surv(time, cens)
+plot(log(time) ~ pair)
+# product-limit estimators with Greenwood's formula for errors:
+gehan.surv <- survfit(Surv(time, cens) ~ treat, data = gehan,
+                      conf.type = "log-log")
+summary(gehan.surv)
+plot(gehan.surv, conf.int = TRUE, lty = 3:2, log = TRUE,
+     xlab = "time of remission (weeks)", ylab = "survival")
+lines(gehan.surv, lty = 3:2, lwd = 2, cex = 2)
+legend(25, 0.1 , c("control", "6-MP"), lty = 2:3, lwd = 2)
+detach()
+
+survdiff(Surv(time, cens) ~ treat, data = gehan)
+survdiff(Surv(time) ~ ag, data = leuk)
+
+
+# 13.2  Parametric models
+
+plot(gehan.surv,  lty = 3:4, col = 2:3, fun = "cloglog",
+     xlab = "time of remission (weeks)", ylab = "log H(t)")
+legend(2, 0.5, c("control","6-MP"), lty = 4:3, col = 3:2)
+
+survreg(Surv(time) ~ ag*log(wbc), leuk, dist = "exponential")
+summary(survreg(Surv(time) ~ ag + log(wbc), leuk, dist = "exponential"))
+summary(survreg(Surv(time) ~ ag + log(wbc), leuk)) # Weibull
+summary(survreg(Surv(time) ~ ag + log(wbc), leuk,
+                dist="loglogistic"))
+anova(survreg(Surv(time) ~ log(wbc), data = leuk),
+   survreg(Surv(time) ~ ag + log(wbc), data = leuk))
+summary(survreg(Surv(time) ~ strata(ag) + log(wbc), data=leuk))
+leuk.wei <- survreg(Surv(time) ~ ag + log(wbc), leuk)
+ntimes <- leuk$time * exp(-leuk.wei$linear.predictors)
+plot(survfit(Surv(ntimes) ~ 1), log = TRUE)
+
+survreg(Surv(time, cens) ~ factor(pair) + treat, gehan,
+        dist = "exponential")
+summary(survreg(Surv(time, cens) ~ treat, gehan, dist = "exponential"))
+summary(survreg(Surv(time, cens) ~ treat, gehan))
+
+plot(survfit(Surv(time, cens) ~ factor(temp), motors), conf.int = FALSE)
+motor.wei <- survreg(Surv(time, cens) ~ temp, motors)
+summary(motor.wei)
+unlist(predict(motor.wei, data.frame(temp=130), se.fit = TRUE))
+
+predict(motor.wei, data.frame(temp=130), type = "quantile",
+        p = c(0.5, 0.1))
+t1 <-  predict(motor.wei, data.frame(temp=130),
+               type = "uquantile", p = 0.5, se = TRUE)
+exp(c(LL=t1$fit - 2*t1$se, UL=t1$fit + 2*t1$se))
+t1 <-  predict(motor.wei, data.frame(temp=130),
+               type = "uquantile", p = 0.1, se = TRUE)
+exp(c(LL=t1$fit - 2*t1$se, UL=t1$fit + 2*t1$se))
+
+# summary(censorReg(censor(time, cens) ~ treat, gehan))
+
+# 13.3  Cox proportional hazards model
+
+attach(leuk)
+leuk.cox <- coxph(Surv(time) ~ ag + log(wbc), data = leuk)
+summary(leuk.cox)
+update(leuk.cox, ~ . -ag)
+
+(leuk.coxs <- coxph(Surv(time) ~ strata(ag) + log(wbc), data = leuk))
+
+(leuk.coxs1 <- update(leuk.coxs, . ~ . + ag:log(wbc)))
+plot(survfit(Surv(time) ~ ag), lty = 2:3, log = TRUE)
+lines(survfit(leuk.coxs), lty = 2:3, lwd = 3)
+legend(80, 0.8, c("ag absent", "ag present"), lty = 2:3)
+leuk.cox <- coxph(Surv(time) ~ ag, leuk)
+detach()
+
+gehan.cox <- coxph(Surv(time, cens) ~ treat, gehan, method = "exact")
+summary(gehan.cox)
+
+# The next fit is slow
+coxph(Surv(time, cens) ~ treat + factor(pair), gehan,
+        method = "exact")
+1 - pchisq(45.5 - 16.2, 20)
+
+(motor.cox <- coxph(Surv(time, cens) ~ temp, motors))
+coxph(Surv(time, cens) ~ temp, motors, method = "breslow")
+coxph(Surv(time, cens) ~ temp, motors, method = "exact")
+plot( survfit(motor.cox, newdata=data.frame(temp=200),
+               conf.type = "log-log") )
+summary( survfit(motor.cox, newdata = data.frame(temp=130)) )
+
+
+# 13.4  Further examples
+
+# VA.temp <- as.data.frame(cancer.vet)
+# dimnames(VA.temp)[[2]] <- c("treat", "cell", "stime",
+#     "status", "Karn", "diag.time","age","therapy")
+# attach(VA.temp)
+# VA <- data.frame(stime, status, treat = factor(treat), age,
+#     Karn, diag.time, cell = factor(cell), prior = factor(therapy))
+# detach(VA.temp)
+(VA.cox <- coxph(Surv(stime, status) ~ treat + age  + Karn +
+                 diag.time + cell + prior, data = VA))
+
+(VA.coxs <- coxph(Surv(stime, status) ~ treat + age + Karn +
+     diag.time + strata(cell) + prior, data = VA))
+
+par(mfrow=c(1,2), pty="s")
+plot(survfit(VA.coxs), log = TRUE, lty = 1:4, col = 2:5)
+#legend(locator(1), c("squamous", "small", "adeno", "large"), lty = 1:4, col = 2:5)
+plot(survfit(VA.coxs), fun = "cloglog", lty = 1:4, col = 2:5)
+cKarn <- factor(cut(VA$Karn, 5))
+VA.cox1 <- coxph(Surv(stime, status) ~ strata(cKarn) + cell, data = VA)
+plot(survfit(VA.cox1), fun="cloglog")
+VA.cox2 <- coxph(Surv(stime, status) ~ Karn + strata(cell), data = VA)
+scatter.smooth(VA$Karn, residuals(VA.cox2))
+
+VA.wei <- survreg(Surv(stime, status) ~ treat + age + Karn +
+                  diag.time + cell + prior, data = VA)
+summary(VA.wei, cor = FALSE)
+
+VA.exp <- survreg(Surv(stime, status) ~ Karn + cell,
+                  data = VA, dist = "exponential")
+summary(VA.exp, cor = FALSE)
+
+cox.zph(VA.coxs)
+
+par(mfrow = c(3, 2), pty="m"); plot(cox.zph(VA.coxs))
+
+VA2 <- VA ## needed because VA and stepAIC are both in MASS
+VA2$Karnc <- VA2$Karn - 50
+VA.coxc <- update(VA.cox, ~ . - Karn + Karnc, data=VA2)
+VA.cox2 <- stepAIC(VA.coxc, ~ .^2)
+VA.cox2$anova
+
+(VA.cox3 <- update(VA.cox2, ~ treat/Karnc + prior*Karnc
+   + treat:prior + cell/diag.time))
+
+cox.zph(VA.cox3)
+
+par(mfrow = c(2, 2))
+plot(cox.zph(VA.cox3), var = c(1, 3, 7))
+par(mfrow = c(1, 1))
+
+#data(heart) # in package survival
+coxph(Surv(start, stop, event) ~ transplant*
+    (age + surgery + year), data = heart)
+(stan <- coxph(Surv(start, stop, event) ~ transplant*year +
+    age + surgery, data = heart))
+
+stan1 <- coxph(Surv(start, stop, event) ~ strata(transplant) +
+    year + year:transplant + age + surgery, heart)
+par(mfrow=c(1,2), pty="s")
+plot(survfit(stan1), conf.int = TRUE, log = TRUE, lty = c(1, 3), col = 2:3)
+#legend(locator(1), c("before", "after"), lty = c(1, 3), col= 2:3)
+
+attach(heart)
+plot(year[transplant==0], residuals(stan1, collapse = id),
+     xlab = "year", ylab = "martingale residual")
+lines(lowess(year[transplant == 0],
+             residuals(stan1, collapse = id)))
+par(mfrow = c(1,1), pty = "m")
+sresid <- resid(stan1, type = "dfbeta", collapse = id)
+detach()
+-100 * sresid %*% diag(1/stan1$coef)
+
+# Survivor curve for the "average" subject
+summary(survfit(stan))
+#  follow-up for two years
+stan2 <- data.frame(start = c(0, 183), stop= c(183, 2*365),
+    event = c(0, 0), year = c(4, 4), age = c(50, 50) - 48,
+    surgery = c(1, 1), transplant = as.factor(c(0, 1)))
+summary(survfit(stan, stan2, individual = TRUE, conf.type = "log-log"))
+
+# Aids analysis
+time.depend.covar <- function(data) {
+  id <- row.names(data); n <- length(id)
+  events <- c(0, 10043, 11139, 12053) # julian days
+  crit1 <- matrix(events[1:3], n, 3 ,byrow = TRUE)
+  crit2 <- matrix(events[2:4], n, 3, byrow = TRUE)
+  diag <- matrix(data$diag,n,3); death <- matrix(data$death,n,3)
+  incid <- (diag < crit2) & (death >= crit1); incid <- t(incid)
+  indr <- col(incid)[incid]; indc <- row(incid)[incid]
+  ind <- cbind(indr, indc); idno <- id[indr]
+  state <- data$state[indr]; T.categ <- data$T.categ[indr]
+  age <- data$age[indr]; sex <- data$sex[indr]
+  late <- indc - 1
+  start <- t(pmax(crit1 - diag, 0))[incid]
+  stop <- t(pmin(crit2, death + 0.9) - diag)[incid]
+  status <- matrix(as.numeric(data$status),n,3)-1 # 0/1
+  status[death > crit2] <- 0; status <- status[ind]
+  levels(state) <- c("NSW", "Other", "QLD", "VIC")
+  levels(T.categ) <- c("hs", "hsid", "id", "het", "haem",
+                       "blood", "mother", "other")
+  levels(sex) <- c("F", "M")
+  data.frame(idno, zid=factor(late), start, stop, status,
+             state, T.categ, age, sex)
+}
+Aids3 <- time.depend.covar(Aids2)
+
+attach(Aids3)
+aids.cox <- coxph(Surv(start, stop, status)
+     ~ zid + state + T.categ + sex + age, data = Aids3)
+summary(aids.cox)
+
+aids1.cox <- coxph(Surv(start, stop, status)
+  ~ zid + strata(state) + T.categ + age, data = Aids3)
+(aids1.surv <- survfit(aids1.cox))
+plot(aids1.surv, mark.time = FALSE, lty = 1:4, col = 2:5,
+     xscale = 365.25/12, xlab = "months since diagnosis")
+#legend(locator(1), levels(state), lty = 1:4, col = 2:5)
+
+aids2.cox <- coxph(Surv(start, stop, status)
+  ~ zid + state + strata(T.categ) + age, data = Aids3)
+(aids2.surv <- survfit(aids2.cox))
+
+par(mfrow = c(1, 2), pty="s")
+plot(aids2.surv[1:4], mark.time = FALSE, lty = 1:4, col = 2:5,
+  xscale=365.25/12, xlab="months since diagnosis")
+#legend(locator(1), levels(T.categ)[1:4], lty = 1:4, col = 2:5)
+
+plot(aids2.surv[c(1, 5, 6, 8)], mark.time = FALSE, lty = 1:4, col = 2:5,
+  xscale=365.25/12, xlab="months since diagnosis")
+#legend(locator(1), levels(T.categ)[c(1, 5, 6, 8)], lty = 1:4, col = 2:5)
+par(mfrow=c(1,1), pty="m")
+
+cases <- diff(c(0,idno)) != 0
+aids.res <- residuals(aids.cox, collapse = idno)
+scatter.smooth(age[cases], aids.res, xlab = "age",
+  ylab="martingale residual")
+
+age2 <- cut(age, c(-1, 15, 30, 40, 50, 60, 100))
+c.age <- factor(as.numeric(age2), labels = c("0-15", "16-30",
+  "31-40", "41-50", "51-60", "61+"))
+table(c.age)
+c.age <- relevel(c.age, "31-40")
+
+summary(coxph(Surv(start, stop, status) ~ zid  + state
+  + T.categ + age + c.age, data = Aids3))
+detach()
+
+make.aidsp <- function(){
+  cutoff <- 10043
+  btime <- pmin(cutoff, Aids2$death) - pmin(cutoff, Aids2$diag)
+  atime <- pmax(cutoff, Aids2$death) - pmax(cutoff, Aids2$diag)
+  survtime <- btime + 0.5*atime
+  status <- as.numeric(Aids2$status)
+  data.frame(survtime, status = status - 1, state = Aids2$state,
+    T.categ = Aids2$T.categ, age = Aids2$age, sex = Aids2$sex)
+}
+Aidsp <- make.aidsp()
+aids.wei <- survreg(Surv(survtime + 0.9, status) ~  state
+    + T.categ + sex + age, data = Aidsp)
+summary(aids.wei, cor = FALSE)
+
+survreg(Surv(survtime + 0.9, status) ~ state + T.categ
+  + age, data = Aidsp)
+
+(aids.ps <- survreg(Surv(survtime + 0.9, status) ~  state
+   + T.categ + pspline(age, df=6), data = Aidsp))
+zz <- predict(aids.ps, data.frame(
+   state = factor(rep("NSW", 83), levels = levels(Aidsp$state)),
+   T.categ = factor(rep("hs", 83), levels = levels(Aidsp$T.categ)),
+   age = 0:82), se = T, type = "linear")
+plot(0:82, exp(zz$fit)/365.25, type = "l", ylim = c(0, 2),
+   xlab = "age", ylab = "expected lifetime (years)")
+lines(0:82, exp(zz$fit+1.96*zz$se.fit)/365.25, lty = 3, col = 2)
+lines(0:82, exp(zz$fit-1.96*zz$se.fit)/365.25, lty = 3, col = 2)
+rug(Aidsp$age+runif(length(Aidsp$age), -0.5, 0.5), ticksize = 0.015)
+
+# End of ch13
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/scripts/ch05.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/scripts/ch05.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/scripts/ch05.R	(revision 2477)
@@ -0,0 +1,283 @@
+#-*- R -*-
+
+## Script from Fourth Edition of `Modern Applied Statistics with S'
+
+# Chapter 5   Univariate Statistics
+
+# for later use, from section 5.6
+perm.t.test <- function(d) {
+# ttest is function(x) mean(x)/sqrt(var(x)/length(x))
+    binary.v <- function(x, digits) {
+       if(missing(digits)) {
+           mx <- max(x)
+           digits <- if(mx > 0) 1 + floor(log(mx, base = 2)) else 1
+       }
+       ans <- 0:(digits - 1)
+       lx <- length(x)
+       x <- rep(x, rep(digits, lx))
+       x <- (x %/% 2^ans) %% 2
+       dim(x) <- c(digits, lx)
+       x
+    }
+    digits <- length(d)
+    n <- 2^digits
+    x <- d * 2 * (binary.v(1:n, digits) - 0.5)
+    mx <- matrix(1/digits, 1, digits) %*% x
+    s <- matrix(1/(digits - 1), 1, digits)
+    vx <- s %*% (x - matrix(mx, digits, n, byrow=TRUE))^2
+    as.vector(mx/sqrt(vx/digits))
+}
+
+library(MASS)
+options(width=65, digits=5, height=9999)
+library(lattice)
+pdf(file="ch05.pdf", width=8, height=6, pointsize=9)
+
+rm(A, B) # precautionary clear-out
+attach(shoes)
+tperm <- perm.t.test(B - A) # see section 5.6
+detach()
+
+# from ch04
+if(!exists("fgl.df")) {
+fgl0 <- fgl[ ,-10] # omit type.
+fgl.df <- data.frame(type = rep(fgl$type, 9),
+  y = as.vector(as.matrix(fgl0)),
+  meas = factor(rep(1:9, each = 214), labels = names(fgl0)))
+  invisible()
+}
+
+
+# 5.1  Probability distributions
+
+
+x <- rt(250, df = 9)
+par(pty = "s")
+qqnorm(x)
+qqline(x)
+par(pty = "m")
+
+x <- rgamma(100, shape = 5, rate = 0.1)
+fitdistr(x, "gamma")
+x2 <- rt(250, df = 9)
+fitdistr(x2, "t", df = 9)
+fitdistr(x2, "t")
+
+
+# 5.2  Generating random data
+
+contam <- rnorm( 100, 0, (1 + 2*rbinom(100, 1, 0.05)) )
+
+
+# 5.3  Data summaries
+
+par(mfrow=c(2,3))
+hist(geyser$duration, "scott", xlab="duration")
+hist(chem, "scott")
+hist(tperm, "scott")
+hist(geyser$duration, "FD", xlab="duration")
+hist(chem, "FD")
+hist(tperm, "FD")
+par(mfrow=c(1,1))
+
+swiss.fertility <- swiss[, 1]
+stem(swiss.fertility)
+stem(chem)
+stem(abbey)
+stem(abbey, scale = 0.4) ## use scale = 0.4 in R
+
+
+par(mfrow = c(1,2))
+boxplot(chem, sub = "chem", range = 0.5)
+boxplot(abbey, sub = "abbey")
+par(mfrow = c(1,1))
+
+bwplot(type ~ y | meas, data = fgl.df, scales = list(x="free"),
+  strip = function(...) strip.default(..., style=1), xlab = "")
+
+
+# 5.4  Classical univariate statistics
+
+attach(shoes)
+t.test(A, mu = 10)
+t.test(A)$conf.int
+
+wilcox.test(A, mu = 10)
+
+var.test(A, B)
+
+t.test(A, B, var.equal = TRUE)
+
+t.test(A, B, var.equal = FALSE)
+
+wilcox.test(A, B)
+
+t.test(A, B, paired = TRUE)
+
+wilcox.test(A, B, paired = TRUE)
+detach()
+
+par(mfrow = c(1, 2))
+truehist(tperm, xlab = "diff")
+x <- seq(-4,4, 0.1)
+lines(x, dt(x,9))
+#cdf.compare(tperm, distribution = "t", df = 9)
+sres <- c(sort(tperm), 4)
+yres <- (0:1024)/1024
+plot(sres, yres, type="S", xlab="diff", ylab="")
+lines(x, pt(x,9), lty=3)
+
+legend(-5, 1.05, c("Permutation dsn","t_9 cdf"), lty = c(1,3))
+par(mfrow = c(1, 1))
+
+
+# 5.5  Robust summaries
+
+# Figure 5.7 was obtained by
+x <- seq(-10, 10, len=500)
+y <- dt(x, 25, log = TRUE)
+z <- -diff(y)/diff(x)
+plot(x[-1], z, type = "l", xlab = "", ylab = "psi")
+y2 <-  dt(x, 5, log = TRUE)
+z2 <- -diff(y2)/diff(x)
+lines(x[-1], z2, lty = 2)
+
+
+sort(chem)
+mean(chem)
+median(chem)
+#location.m(chem)
+#location.m(chem, psi.fun="huber")
+mad(chem)
+#scale.tau(chem)
+#scale.tau(chem, center=3.68)
+unlist(huber(chem))
+unlist(hubers(chem))
+fitdistr(chem, "t", list(m = 3, s = 0.5), df = 5)
+
+sort(abbey)
+mean(abbey)
+median(abbey)
+#location.m(abbey)
+#location.m(abbey, psi.fun="huber")
+unlist(hubers(abbey))
+unlist(hubers(abbey, k = 2))
+unlist(hubers(abbey, k = 1))
+fitdistr(abbey, "t", list(m = 12, s = 5), df = 10)
+
+
+# 5.6  Density estimation
+
+# Figure 5.8
+attach(geyser)
+par(mfrow=c(2,3))
+truehist(duration, h=0.5, x0=0.0, xlim=c(0, 6), ymax=0.7)
+truehist(duration, h=0.5, x0=0.1, xlim=c(0, 6), ymax=0.7)
+truehist(duration, h=0.5, x0=0.2, xlim=c(0, 6), ymax=0.7)
+truehist(duration, h=0.5, x0=0.3, xlim=c(0, 6), ymax=0.7)
+truehist(duration, h=0.5, x0=0.4, xlim=c(0, 6), ymax=0.7)
+
+breaks <- seq(0, 5.9, 0.1)
+counts <- numeric(length(breaks))
+for(i in (0:4)) counts[i+(1:55)] <- counts[i+(1:55)] +
+    rep(hist(duration, breaks=0.1*i + seq(0, 5.5, 0.5),
+    prob=TRUE, plot=FALSE)$density, rep(5,11))
+plot(breaks+0.05, counts/5, type="l", xlab="duration",
+    ylab="averaged", bty="n", xlim=c(0, 6), ylim=c(0, 0.7))
+detach()
+
+
+attach(geyser)
+truehist(duration, nbins = 15, xlim = c(0.5, 6), ymax = 1.2)
+lines(density(duration, width = "nrd"))
+
+truehist(duration, nbins = 15, xlim = c(0.5, 6), ymax = 1.2)
+lines(density(duration, width = "SJ", n = 256), lty = 3)
+lines(density(duration, n = 256, width = "SJ-dpi"), lty = 1)
+detach()
+
+gal <- galaxies/1000
+plot(x = c(0, 40), y = c(0, 0.3), type = "n", bty = "l",
+    xlab = "velocity of galaxy (1000km/s)", ylab = "density")
+rug(gal)
+lines(density(gal, width = "SJ-dpi", n = 256), lty = 1)
+lines(density(gal, width = "SJ", n = 256), lty = 3)
+library(polspline)
+x <- seq(5, 40, length = 500)
+lines(x, doldlogspline(x, oldlogspline(gal)), lty = 2)
+
+
+geyser2 <- data.frame(as.data.frame(geyser)[-1, ],
+                      pduration = geyser$duration[-299])
+attach(geyser2)
+par(mfrow = c(2, 2))
+plot(pduration, waiting, xlim = c(0.5, 6), ylim = c(40, 110),
+   xlab = "previous duration", ylab = "waiting")
+f1 <- kde2d(pduration, waiting, n = 50, lims=c(0.5, 6, 40, 110))
+image(f1, zlim = c(0, 0.075),
+     xlab = "previous duration", ylab = "waiting")
+f2 <- kde2d(pduration, waiting, n = 50, lims=c(0.5, 6, 40, 110),
+  h = c(width.SJ(duration), width.SJ(waiting)) )
+image(f2, zlim = c(0, 0.075),
+      xlab = "previous duration", ylab = "waiting")
+persp(f2,  phi = 30, theta = 20, d = 5,
+      xlab = "previous duration", ylab = "waiting", zlab = "")
+detach()
+
+density(gal, n = 1, from = 20.833, to = 20.834, width = "SJ")$y
+1/(2 * sqrt(length(gal)) * 0.13)
+
+set.seed(101)
+m <- 1000
+res <- numeric(m)
+for (i in 1:m) res[i] <- median(sample(gal, replace = TRUE))
+mean(res - median(gal))
+sqrt(var(res))
+
+truehist(res, h = 0.1)
+lines(density(res, width = "SJ-dpi", n = 256))
+quantile(res, p = c(0.025, 0.975))
+x <- seq(19.5, 22.5, length = 500)
+lines(x, doldlogspline(x, oldlogspline(res)), lty = 3)
+
+library(boot)
+set.seed(101)
+gal.boot <- boot(gal, function(x, i) median(x[i]), R = 1000)
+gal.boot
+
+boot.ci(gal.boot, conf = c(0.90, 0.95),
+         type = c("norm","basic","perc","bca"))
+plot(gal.boot)
+
+if(FALSE) { # bootstrap() is an S-PLUS function
+gal.bt <- bootstrap(gal, median, seed = 101, B = 1000)
+summary(gal.bt)
+plot(gal.bt)
+qqnorm(gal.bt)
+
+limits.emp(gal.bt)
+limits.bca(gal.bt)
+}
+
+sim.gen  <- function(data, mle) {
+ n <- length(data)
+ data[sample(n, replace = TRUE)]  + mle*rnorm(n)
+}
+gal.boot2 <- boot(gal, median, R = 1000,
+ sim = "parametric", ran.gen = sim.gen, mle = 0.5)
+boot.ci(gal.boot2, conf = c(0.90, 0.95),
+         type = c("norm","basic","perc"))
+
+attach(shoes)
+t.test(B - A)
+shoes.boot <- boot(B - A, function(x,i) mean(x[i]), R = 1000)
+boot.ci(shoes.boot, type = c("norm", "basic", "perc", "bca"))
+mean.fun <- function(d, i) {
+ n <- length(i)
+ c(mean(d[i]), (n-1)*var(d[i])/n^2)
+}
+shoes.boot2 <- boot(B - A, mean.fun, R = 1000)
+boot.ci(shoes.boot2, type = "stud")
+detach()
+
+# End of ch05
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/scripts/ch14.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/scripts/ch14.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/scripts/ch14.R	(revision 2477)
@@ -0,0 +1,258 @@
+#-*- R -*-
+
+## Script from Fourth Edition of `Modern Applied Statistics with S'
+
+# Chapter 14   Time Series
+
+library(MASS)
+pdf(file="ch14.pdf", width=8, height=6, pointsize=9)
+options(width=65, digits=5)
+
+lh
+deaths
+#tspar(deaths)
+tsp(deaths)
+start(deaths)
+end(deaths)
+frequency(deaths)
+cycle(deaths)
+ts.plot(lh)
+ts.plot(deaths, mdeaths, fdeaths,
+        lty = c(1, 3, 4), xlab = "year", ylab = "deaths")
+
+aggregate(deaths, 4, sum)
+aggregate(deaths, 1, mean)
+
+
+# 14.1  Second-order summaries
+
+acf(lh)
+acf(lh, type = "covariance")
+acf(deaths)
+acf(ts.union(mdeaths, fdeaths))
+
+par(mfrow = c(2, 2))
+spectrum(lh)
+spectrum(deaths)
+
+par(mfrow = c(2, 2))
+spectrum(lh)
+spectrum(lh, spans = 3)
+spectrum(lh, spans = c(3, 3))
+spectrum(lh, spans = c(3, 5))
+
+spectrum(deaths)
+spectrum(deaths, spans = c(3, 3))
+spectrum(deaths, spans = c(3, 5))
+spectrum(deaths, spans = c(5, 7))
+
+par(mfrow = c(1, 2))
+cpgram(lh)
+cpgram(deaths)
+par(mfrow = c(1, 1))
+
+
+# 14.2  ARIMA models
+
+
+# ts.sim <- arima.sim(list(order = c(1,1,0), ar = 0.7), n = 200)
+
+acf(lh, type = "partial")
+acf(deaths, type = "partial")
+
+lh.ar1 <- ar(lh, FALSE, 1)
+cpgram(lh.ar1$resid, main = "AR(1) fit to lh")
+lh.ar <- ar(lh, order.max = 9)
+lh.ar$order
+lh.ar$aic
+cpgram(lh.ar$resid, main = "AR(3) fit to lh")
+
+(lh.arima1 <- arima(lh, order = c(1,0,0)))
+tsdiag(lh.arima1)
+(lh.arima3 <- arima(lh, order = c(3,0,0)))
+tsdiag(lh.arima3)
+(lh.arima11 <- arima(lh, order = c(1,0,1)))
+
+lh.fore <- predict(lh.arima3, 12)
+ts.plot(lh, lh.fore$pred, lh.fore$pred + 2*lh.fore$se,
+        lh.fore$pred - 2*lh.fore$se, lty = c(1,2,3,3))
+
+
+# 14.3  Seasonality
+
+deaths.stl <- stl(deaths, "periodic")
+dsd <-  deaths.stl$time.series[, "trend"] +
+    deaths.stl$time.series[, "remainder"]
+#ts.plot(deaths, deaths.stl$sea, deaths.stl$rem)
+ts.plot(deaths, deaths.stl$time.series[, "seasonal"], dsd,
+        gpars = list(lty = c(1, 3, 2)))
+
+par(mfrow = c(2, 3))
+#dsd <- deaths.stl$rem
+ts.plot(dsd)
+
+acf(dsd)
+acf(dsd, type = "partial")
+spectrum(dsd, span = c(3, 3))
+cpgram(dsd)
+dsd.ar <- ar(dsd)
+dsd.ar$order
+dsd.ar$aic
+dsd.ar$ar
+cpgram(dsd.ar$resid, main = "AR(1) residuals")
+par(mfrow = c(1, 1))
+
+deaths.diff <- diff(deaths, 12)
+acf(deaths.diff, 30)
+acf(deaths.diff, 30, type = "partial")
+ar(deaths.diff)
+# this suggests the seasonal effect is still present.
+(deaths.arima1 <- arima(deaths, order = c(2,0,0),
+     seasonal = list(order = c(0,1,0), period = 12)) )
+tsdiag(deaths.arima1, gof.lag = 30)
+# suggests need a seasonal AR term
+(deaths.arima2 <- arima(deaths, order = c(2,0,0),
+     list(order = c(1,0,0), period = 12)) )
+tsdiag(deaths.arima2, gof.lag = 30)
+cpgram(deaths.arima2$resid)
+(deaths.arima3 <- arima(deaths, order = c(2,0,0),
+    list(order = c(1,1,0), period = 12)) )
+tsdiag(deaths.arima3, gof.lag = 30)
+
+par(mfrow = c(3, 1))
+nott <- window(nottem, end = c(1936, 12))
+ts.plot(nott)
+nott.stl <- stl(nott, "period")
+ts.plot(nott.stl$time.series[, c("remainder", "seasonal")],
+        gpars = list(ylim  =  c(-15, 15), lty = c(1, 3)))
+nott.stl <- stl(nott, 5)
+ts.plot(nott.stl$time.series[, c("remainder", "seasonal")],
+        ylim  =  c(-15, 15), lty = c(1, 3))
+
+par(mfrow = c(1, 1))
+boxplot(split(nott, cycle(nott)), names = month.abb)
+
+nott[110] <- 35
+nott.stl <- stl(nott, "period")
+nott1 <- nott.stl$time.series[, "trend"] + nott.stl$time.series[, "remainder"]
+acf(nott1)
+acf(nott1, type = "partial")
+cpgram(nott1)
+ar(nott1)$aic
+plot(0:23, ar(nott1)$aic, xlab = "order", ylab = "AIC",
+     main = "AIC for AR(p)")
+(nott1.ar1 <- arima(nott1, order = c(1,0,0)))
+nott1.fore <- predict(nott1.ar1, 36)
+nott1.fore$pred <- nott1.fore$pred +
+    as.vector(nott.stl$time.series[1:36, "seasonal"])
+ts.plot(window(nottem, 1937), nott1.fore$pred,
+        nott1.fore$pred+2*nott1.fore$se,
+        nott1.fore$pred-2*nott1.fore$se, lty = c(3, 1, 2, 2))
+title("via Seasonal Decomposition")
+
+acf(diff(nott,12), 30)
+acf(diff(nott,12), 30, type = "partial")
+cpgram(diff(nott, 12))
+(nott.arima1 <- arima(nott, order = c(1,0,0),
+     list(order = c(2,1,0), period = 12)) )
+tsdiag(nott.arima1, gof.lag = 30)
+(nott.arima2 <- arima(nott, order = c(0,0,2),
+      list(order = c(0,1,2), period = 12)) )
+tsdiag(nott.arima2, gof.lag = 30)
+(nott.arima3 <- arima(nott, order = c(1,0,0),
+      list(order = c(0,1,2), period = 12)) )
+tsdiag(nott.arima3, gof.lag = 30)
+
+nott.fore <- predict(nott.arima3, 36)
+ts.plot(window(nottem, 1937), nott.fore$pred,
+        nott.fore$pred+2*nott.fore$se,
+        nott.fore$pred-2*nott.fore$se, lty = c(3, 1, 2, 2))
+title("via Seasonal ARIMA model")
+
+
+# 14.6  Regression with autocorrelated errors
+
+attach(beav1)
+beav1$hours <- 24*(day-346) + trunc(time/100) + (time%%100)/60
+detach()
+attach(beav2)
+beav2$hours <- 24*(day-307) + trunc(time/100) + (time%%100)/60
+detach()
+par(mfrow = c(2, 2))
+plot(beav1$hours, beav1$temp, type = "l", xlab = "time",
+     ylab = "temperature", main = "Beaver 1")
+usr <- par("usr"); usr[3:4] <- c(-0.2, 8); par(usr = usr)
+lines(beav1$hours, beav1$activ, type = "s", lty = 2)
+plot(beav2$hours, beav2$temp, type = "l", xlab = "time",
+     ylab = "temperature", main = "Beaver 2")
+usr <- par("usr"); usr[3:4] <- c(-0.2, 8); par(usr = usr)
+lines(beav2$hours, beav2$activ, type = "s", lty = 2)
+
+attach(beav2)
+temp2 <- ts(temp, start = 8+2/3, frequency = 6)
+activ2 <- ts(activ, start = 8+2/3, frequency = 6)
+acf(temp2[activ2 == 0])
+acf(temp2[activ2 == 1]) # also look at PACFs
+acf(temp2[activ2 == 0], type = "partial")
+acf(temp2[activ2 == 1], type = "partial")
+ar(temp2[activ2 == 0])
+ar(temp2[activ2 == 1])
+par(mfrow = c(1, 1))
+detach()
+rm(temp2, activ2)
+
+library(nlme)
+beav2.gls <- gls(temp ~ activ, data = beav2,
+                 corr = corAR1(0.8), method = "ML")
+summary(beav2.gls)
+summary(update(beav2.gls, subset = 6:100))
+
+arima(beav2$temp, c(1,0,0), xreg = beav2$activ)
+
+attach(beav1)
+temp1 <- ts(c(temp[1:82], NA, temp[83:114]), start = 9.5, frequency = 6)
+activ1 <- ts(c(activ[1:82], NA, activ[83:114]), start = 9.5, frequency = 6)
+acf(temp1[1:53])
+acf(temp1[1:53], type = "partial")
+ar(temp1[1:53])
+
+act <- c(rep(0, 10), activ1)
+beav1b <- data.frame(Time = time(temp1), temp = as.vector(temp1),
+           act = act[11:125], act1 = act[10:124],
+           act2 = act[9:123], act3 = act[8:122])
+detach()
+rm(temp1, activ1)
+
+summary(gls(temp ~ act + act1 + act2 + act3,
+            data = beav1b, na.action = na.omit,
+            corr = corCAR1(0.82^6, ~Time), method = "ML"))
+
+arima(beav1b$temp, c(1, 0, 0), xreg = beav1b[, 3:6])
+
+
+# 14.6  Models for financial time series
+
+plot(SP500, type = "l", xlab = "", ylab = "returns (%)", xaxt = "n", las = 1)
+axis(1, at = c(0, 254, 507, 761, 1014, 1266, 1518, 1772, 2025, 2277,
+        2529, 2781), lab = 1990:2001)
+
+plot(density(SP500, width = "sj", n = 256), type = "l", xlab = "", ylab = "")
+
+par(pty = "s")
+qqnorm(SP500)
+qqline(SP500)
+if(FALSE) {
+    module(garch)
+    summary(garch(SP500 ~ 1, ~garch(1,1)))
+
+    fit <- garch(SP500 ~ 1, ~garch(1,1), cond.dist = "t")
+    summary(fit)
+    plot(fit)
+
+    summary(garch(SP500 ~ 1, ~egarch(1,1), cond.dist = "t", leverage = TRUE))
+}
+
+if(require(tseries))
+    print(summary(garch(x = SP500 - median(SP500), order = c(1, 1))))
+
+# End of ch14
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/scripts/ch06.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/scripts/ch06.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/scripts/ch06.R	(revision 2477)
@@ -0,0 +1,358 @@
+#-*- R -*-
+
+## Script from Fourth Edition of `Modern Applied Statistics with S'
+
+# Chapter 6   Linear Statistical Models
+
+library(MASS)
+library(lattice)
+options(width=65, digits=5, height=9999)
+pdf(file="ch06.pdf", width=8, height=6, pointsize=9)
+options(contrasts = c("contr.helmert", "contr.poly"))
+
+
+# 6.1  A linear regression example
+
+xyplot(Gas ~ Temp | Insul, whiteside, panel =
+  function(x, y, ...) {
+    panel.xyplot(x, y, ...)
+    panel.lmline(x, y, ...)
+  }, xlab = "Average external temperature (deg. C)",
+  ylab = "Gas consumption  (1000 cubic feet)", aspect = "xy",
+  strip = function(...) strip.default(..., style = 1))
+
+
+gasB <- lm(Gas ~ Temp, data = whiteside, subset = Insul=="Before")
+gasA <- update(gasB, subset = Insul=="After")
+
+summary(gasB)
+summary(gasA)
+
+varB <- deviance(gasB)/gasB$df.resid    # direct calculation
+varB <- summary(gasB)$sigma^2           # alternative
+
+gasBA <- lm(Gas ~ Insul/Temp - 1, data = whiteside)
+summary(gasBA)
+
+gasQ <- lm(Gas ~ Insul/(Temp + I(Temp^2)) - 1, data = whiteside)
+summary(gasQ)$coef
+
+# R: options(contrasts = c("contr.helmert", "contr.poly"))
+gasPR <- lm(Gas ~ Insul + Temp, data = whiteside)
+anova(gasPR, gasBA)
+
+oldcon <- options(contrasts = c("contr.treatment", "contr.poly"))
+gasBA1 <- lm(Gas ~ Insul*Temp, data = whiteside)
+summary(gasBA1)$coef
+options(oldcon)
+
+
+# 6.2  Model formulae and model matrices
+
+dat <- data.frame(a = factor(rep(1:3, 3)),
+                  y = rnorm(9, rep(2:4, 3), 0.1))
+obj <- lm(y ~ a, dat)
+(alf.star <- coef(obj))
+Ca <- contrasts(dat$a)      # contrast matrix for `a'
+drop(Ca %*% alf.star[-1])
+dummy.coef(obj)
+
+
+N <- factor(Nlevs <- c(0,1,2,4))
+contrasts(N)
+contrasts(ordered(N))
+
+N2 <- N
+contrasts(N2, 2) <- poly(Nlevs, 2)
+N2 <- C(N, poly(Nlevs, 2), 2)       # alternative
+contrasts(N2)
+
+fractions(ginv(contr.helmert(n = 4)))
+
+Cp <- diag(-1, 4, 5);  Cp[row(Cp) == col(Cp) - 1] <- 1
+Cp
+fractions(ginv(Cp))
+
+
+# 6.3  Regression diagnostics
+
+(hills.lm <- lm(time ~ dist + climb, data = hills))
+frame()
+par(fig = c(0, 0.6, 0, 0.55))
+plot(fitted(hills.lm), studres(hills.lm))
+abline(h = 0, lty = 2)
+# identify(fitted(hills.lm), studres(hills.lm), row.names(hills))
+par(fig = c(0.6, 1, 0, 0.55), pty = "s")
+qqnorm(studres(hills.lm))
+qqline(studres(hills.lm))
+par(pty = "m")
+hills.hat <- lm.influence(hills.lm)$hat
+cbind(hills, lev = hills.hat)[hills.hat > 3/35, ]
+cbind(hills, pred = predict(hills.lm))["Knock Hill", ]
+(hills1.lm <- update(hills.lm, subset = -18))
+update(hills.lm, subset = -c(7, 18))
+summary(hills1.lm)
+summary(update(hills1.lm,  weights = 1/dist^2))
+lm(time ~ -1 + dist + climb, hills[-18, ], weight = 1/dist^2)
+
+# hills <- hills   # make a local copy (needed in S-PLUS)
+hills$ispeed <- hills$time/hills$dist
+hills$grad <- hills$climb/hills$dist
+(hills2.lm <- lm(ispeed ~ grad, data = hills[-18, ]))
+frame()
+par(fig = c(0, 0.6, 0, 0.55))
+plot(hills$grad[-18], studres(hills2.lm), xlab = "grad")
+abline(h = 0, lty = 2)
+# identify(hills$grad[-18], studres(hills2.lm), row.names(hills)[-18])
+par(fig = c(0.6, 1, 0, 0.55), pty = "s")
+qqnorm(studres(hills2.lm))
+qqline(studres(hills2.lm))
+par(pty = "m")
+hills2.hat <- lm.influence(hills2.lm)$hat
+cbind(hills[-18,], lev = hills2.hat)[hills2.hat > 1.8*2/34, ]
+
+
+# 6.4  Safe prediction
+
+quad1 <- lm(Weight ~ Days + I(Days^2), data = wtloss)
+quad2 <- lm(Weight ~ poly(Days, 2), data = wtloss)
+
+new.x <- data.frame(Days = seq(250, 300, 10),
+                    row.names = seq(250, 300, 10))
+
+predict(quad1, newdata = new.x)
+predict(quad2, newdata = new.x)
+
+# predict.gam(quad2, newdata = new.x) # S-PLUS only
+
+
+# 6.5  Robust and resistant regression
+
+# library(lqs)
+phones.lm <- lm(calls ~ year, data = phones)
+attach(phones); plot(year, calls); detach()
+abline(phones.lm$coef)
+abline(rlm(calls ~ year, phones, maxit=50), lty = 2, col = 2)
+abline(lqs(calls ~ year, phones), lty =3, col = 3)
+# legend(locator(1), lty = 1:3, col = 1:3,
+#        legend = c("least squares", "M-estimate", "LTS"))
+
+## cor = FALSE is the default in R
+summary(lm(calls ~ year, data = phones))
+summary(rlm(calls ~ year, maxit = 50, data = phones))
+summary(rlm(calls ~ year, scale.est = "proposal 2", data = phones))
+summary(rlm(calls ~ year, data = phones, psi = psi.bisquare))
+
+lqs(calls ~ year, data = phones)
+lqs(calls ~ year, data = phones, method = "lms")
+lqs(calls ~ year, data = phones, method = "S")
+
+summary(rlm(calls ~ year, data = phones, method = "MM"))
+
+# library(robust) # S-PLUS only
+# phones.lmr <- lmRob(calls ~ year, data = phones)
+# summary(phones.lmr)
+# plot(phones.lmr)
+
+hills.lm
+hills1.lm # omitting Knock Hill
+rlm(time ~ dist + climb, data = hills)
+summary(rlm(time ~ dist + climb, data = hills,
+             weights = 1/dist^2, method = "MM"))
+lqs(time ~ dist + climb, data = hills, nsamp = "exact")
+summary(hills2.lm) # omitting Knock Hill
+summary(rlm(ispeed ~ grad, data = hills))
+summary(rlm(ispeed ~ grad, data = hills, method="MM"))
+# summary(lmRob(ispeed ~ grad, data = hills))
+
+lqs(ispeed ~ grad, data = hills)
+
+
+# 6.6  Bootstrapping linear models
+
+library(boot)
+fit <- lm(calls ~ year, data = phones)
+ph <- data.frame(phones, res = resid(fit), fitted = fitted(fit))
+ph.fun <- function(data, i) {
+  d <- data
+  d$calls <- d$fitted + d$res[i]
+  coef(update(fit, data=d))
+}
+(ph.lm.boot <- boot(ph, ph.fun, R = 999))
+
+fit <- rlm(calls ~ year, method = "MM", data = phones)
+ph <- data.frame(phones, res = resid(fit), fitted = fitted(fit))
+(ph.rlm.boot <- boot(ph, ph.fun, R = 999))
+
+
+# 6.7  Factorial designs and designed experiments
+
+options(contrasts=c("contr.helmert", "contr.poly"))
+(npk.aov <- aov(yield ~ block + N*P*K, data = npk))
+summary(npk.aov)
+
+alias(npk.aov)
+coef(npk.aov)
+
+options(contrasts=c("contr.treatment", "contr.poly"))
+npk.aov1 <- aov(yield ~ block + N + K, data = npk)
+summary.lm(npk.aov1)
+se.contrast(npk.aov1, list(N == "0", N == "1"), data = npk)
+model.tables(npk.aov1, type = "means", se = TRUE)
+
+mp <- c("-", "+")
+(NPK <- expand.grid(N = mp, P = mp, K = mp))
+
+if(FALSE) { ## fac.design is part of S-PLUS.
+blocks13 <- fac.design(levels = c(2, 2, 2),
+    factor= list(N=mp, P=mp, K=mp), rep = 3, fraction = 1/2)
+
+blocks46 <- fac.design(levels = c(2, 2, 2),
+   factor = list(N=mp, P=mp, K=mp), rep = 3, fraction = ~ -N:P:K)
+
+NPK <- design(block = factor(rep(1:6, each  = 4)),
+             rbind(blocks13, blocks46))
+i <- order(runif(6)[NPK$block], runif(24))
+NPK <- NPK[i,]  # Randomized
+
+lev <- rep(2, 7)
+factors <- list(S=mp, D=mp, H=mp, G=mp, R=mp, B=mp, P=mp)
+(Bike <- fac.design(lev, factors,
+     fraction = ~ S:D:G + S:H:R + D:H:B + S:D:H:P))
+replications(~ .^2, data=Bike)
+}
+
+if(require("FrF2")) {
+NPK <- FrF2(8, factor.names = c("N", "P", "K"), default.levels = 0:1,
+            blocks = 2, replications = 3)
+print(NPK)
+print(as.data.frame(NPK))
+
+print(Bike <- FrF2(factor.names = c("S", "D", "H", "G", "R", "B", "P"),
+                   default.levels = c("+", "-"), resolution = 3))
+print(replications(~ .^2, data=Bike))
+}
+
+# 6.8  An unbalanced four-way layout
+
+attach(quine)
+table(Lrn, Age, Sex, Eth)
+
+Means <- tapply(Days, list(Eth, Sex, Age, Lrn), mean)
+Vars  <- tapply(Days, list(Eth, Sex, Age, Lrn), var)
+SD <- sqrt(Vars)
+par(mfrow = c(1, 2), pty="s")
+plot(Means, Vars, xlab = "Cell Means", ylab = "Cell Variances")
+plot(Means, SD, xlab = "Cell Means", ylab = "Cell Std Devn.")
+detach()
+
+## singular.ok = TRUE is the default in R
+boxcox(Days+1 ~ Eth*Sex*Age*Lrn, data = quine, singular.ok = TRUE,
+  lambda = seq(-0.05, 0.45, len = 20))
+
+logtrans(Days ~ Age*Sex*Eth*Lrn, data = quine,
+    alpha = seq(0.75, 6.5, len = 20), singular.ok = TRUE)
+
+quine.hi <- aov(log(Days + 2.5) ~ .^4, quine)
+quine.nxt <- update(quine.hi, . ~ . - Eth:Sex:Age:Lrn)
+dropterm(quine.nxt, test = "F")
+
+quine.lo <- aov(log(Days+2.5) ~ 1, quine)
+addterm(quine.lo, quine.hi, test = "F")
+
+quine.stp <- stepAIC(quine.nxt,
+   scope = list(upper = ~Eth*Sex*Age*Lrn, lower = ~1),
+   trace = FALSE)
+quine.stp$anova
+
+dropterm(quine.stp, test = "F")
+quine.3 <- update(quine.stp, . ~ . - Eth:Age:Lrn)
+dropterm(quine.3, test = "F")
+quine.4 <- update(quine.3, . ~ . - Eth:Age)
+quine.5 <- update(quine.4, . ~ . - Age:Lrn)
+dropterm(quine.5, test = "F")
+
+
+# 6.9  Predicting computer performance
+
+par(mfrow = c(1, 2), pty = "s")
+boxcox(perf ~ syct + mmin + mmax + cach + chmin + chmax,
+       data = cpus, lambda = seq(0, 1, 0.1))
+
+cpus1 <- cpus
+attach(cpus)
+for(v in names(cpus)[2:7])
+  cpus1[[v]] <- cut(cpus[[v]], unique(quantile(cpus[[v]])),
+                    include.lowest = TRUE)
+detach()
+boxcox(perf ~ syct + mmin + mmax + cach + chmin + chmax,
+       data = cpus1, lambda = seq(-0.25, 1, 0.1))
+par(mfrow = c(1, 1), pty = "m")
+
+set.seed(123)
+cpus2 <- cpus[, 2:8]  # excludes names, authors' predictions
+cpus2[, 1:3] <- log10(cpus2[, 1:3])
+#cpus.samp <- sample(1:209, 100)
+cpus.samp <-
+c(3, 5, 6, 7, 8, 10, 11, 16, 20, 21, 22, 23, 24, 25, 29, 33, 39, 41, 44, 45,
+46, 49, 57, 58, 62, 63, 65, 66, 68, 69, 73, 74, 75, 76, 78, 83, 86,
+88, 98, 99, 100, 103, 107, 110, 112, 113, 115, 118, 119, 120, 122,
+124, 125, 126, 127, 132, 136, 141, 144, 146, 147, 148, 149, 150, 151,
+152, 154, 156, 157, 158, 159, 160, 161, 163, 166, 167, 169, 170, 173,
+174, 175, 176, 177, 183, 184, 187, 188, 189, 194, 195, 196, 197, 198,
+199, 202, 204, 205, 206, 208, 209)
+
+cpus.lm <- lm(log10(perf) ~ ., data = cpus2[cpus.samp, ])
+test.cpus <- function(fit)
+   sqrt(sum((log10(cpus2[-cpus.samp, "perf"]) -
+             predict(fit, cpus2[-cpus.samp,]))^2)/109)
+test.cpus(cpus.lm)
+cpus.lm2 <- stepAIC(cpus.lm, trace=FALSE)
+cpus.lm2$anova
+test.cpus(cpus.lm2)
+
+
+# 6.10  Multiple comparisons
+
+immer.aov <- aov((Y1 + Y2)/2 ~ Var + Loc, data = immer)
+summary(immer.aov)
+
+model.tables(immer.aov, type = "means", se = TRUE, cterms = "Var")
+
+if(FALSE) {
+multicomp(immer.aov, plot = TRUE)
+
+oats1 <- aov(Y ~ N + V + B, data = oats)
+summary(oats1)
+multicomp(oats1, focus = "V")
+multicomp(oats1, focus = "N", comparisons = "mcc", control = 1)
+lmat <- matrix(c(0,-1,1,rep(0, 11), 0,0,-1,1, rep(0,10),
+                 0,0,0,-1,1,rep(0,9)),,3,
+               dimnames = list(NULL,
+               c("0.2cwt-0.0cwt", "0.4cwt-0.2cwt", "0.6cwt-0.4cwt")))
+multicomp(oats1, lmat = lmat, bounds = "lower", comparisons = "none")
+}
+
+(tk <- TukeyHSD(immer.aov, which = "Var"))
+plot(tk)
+
+oats1 <- aov(Y ~ N + V + B, data = oats)
+(tk <- TukeyHSD(oats1, which = "V"))
+plot(tk)
+
+## An alternative under R is to use package multcomp (which requires mvtnorm)
+## This code is for multcomp >= 0.991-1
+library(multcomp)
+## next is slow:
+(tk <- confint(glht(immer.aov, linfct = mcp(Var = "Tukey"))))
+plot(tk)
+
+confint(glht(oats1, linfct = mcp(V = "Tukey")))
+lmat <- matrix(c(0,-1,1,rep(0, 11), 0,0,-1,1, rep(0,10),
+                 0,0,0,-1,1,rep(0,9)),,3,
+               dimnames = list(NULL,
+               c("0.2cwt-0.0cwt", "0.4cwt-0.2cwt", "0.6cwt-0.4cwt")))
+confint(glht(oats1, linfct = mcp(N = t(lmat[2:5, ])), alternative = "greater"))
+plot(tk)
+
+# End of ch06
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/scripts/ch15.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/scripts/ch15.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/scripts/ch15.R	(revision 2477)
@@ -0,0 +1,188 @@
+#-*- R -*-
+
+## Script from Fourth Edition of `Modern Applied Statistics with S'
+
+# Chapter 15   Spatial Statistics
+
+library(MASS)
+pdf(file="ch15.pdf", width=8, height=8, pointsize=9)
+options(width=65, digits=5)
+
+library(spatial)
+
+# 15.1  Spatial interpolation and smoothing
+
+par(mfrow=c(2,2), pty = "s")
+topo.ls <- surf.ls(2, topo)
+trsurf <- trmat(topo.ls, 0, 6.5, 0, 6.5, 30)
+eqscplot(trsurf, , xlab = "", ylab = "", type = "n")
+contour(trsurf, levels = seq(600, 1000, 25), add = TRUE)
+points(topo)
+title("Degree=2")
+topo.ls <- surf.ls(3, topo)
+trsurf <- trmat(topo.ls, 0, 6.5, 0, 6.5, 30)
+eqscplot(trsurf, , xlab = "", ylab = "", type = "n")
+contour(trsurf, levels = seq(600, 1000, 25), add = TRUE)
+points(topo)
+title("Degree=3")
+topo.ls <- surf.ls(4, topo)
+trsurf <- trmat(topo.ls, 0, 6.5, 0, 6.5, 30)
+eqscplot(trsurf, , xlab = "", ylab = "", type = "n")
+contour(trsurf, levels = seq(600, 1000, 25), add = TRUE)
+points(topo)
+title("Degree=4")
+topo.ls <- surf.ls(6, topo)
+trsurf <- trmat(topo.ls, 0, 6.5, 0, 6.5, 30)
+eqscplot(trsurf, , xlab = "", ylab = "", type = "n")
+contour(trsurf, levels = seq(600, 1000, 25), add = TRUE)
+points(topo)
+title("Degree=6")
+
+library(lattice)
+topo.ls <- surf.ls(4, topo)
+trsurf <- trmat(topo.ls, 0, 6.5, 0, 6.5, 30)
+trsurf[c("x", "y")] <- expand.grid(x=trsurf$x, y=trsurf$y)
+plt1 <- levelplot(z ~ x * y, trsurf, aspect=1,
+           at = seq(650, 1000, 10),  xlab = "", ylab = "")
+plt2 <- wireframe(z ~ x * y, trsurf, aspect=c(1, 0.5),
+           screen = list(z = -30, x = -60))
+print(plt1, position = c(0, 0, 0.5, 1), more=TRUE)
+print(plt2, position = c(0.45, 0, 1, 1))
+
+par(mfcol = c(2, 2), pty = "s")
+topo.loess <- loess(z ~ x * y, topo, degree = 2, span = 0.25,
+  normalize = FALSE)
+topo.mar <- list(x = seq(0, 6.5, 0.1), y = seq(0, 6.5, 0.1))
+topo.lo <- predict(topo.loess, expand.grid(topo.mar), se = TRUE)
+eqscplot(topo.mar, xlab = "fit", ylab = "", type = "n")
+contour(topo.mar$x, topo.mar$y, topo.lo$fit,
+   levels = seq(700, 1000, 25), add = TRUE)
+points(topo)
+eqscplot(topo.mar, xlab = "standard error", ylab = "", type = "n")
+contour(topo.mar$x,topo.mar$y,topo.lo$se.fit,
+  levels = seq(5, 25, 5), add = TRUE)
+title("Loess degree = 2")
+points(topo)
+
+topo.loess <- loess(z ~ x * y, topo, degree = 1, span = 0.25, normalize = FALSE)
+topo.lo <- predict(topo.loess, expand.grid(topo.mar), se=TRUE)
+eqscplot(topo.mar, xlab = "fit", ylab = "", type = "n")
+contour(topo.mar$x,topo.mar$y,topo.lo$fit, levels = seq(700, 1000, 25),
+        add = TRUE)
+points(topo)
+eqscplot(topo.mar, xlab = "standard error", ylab = "", type = "n")
+contour(topo.mar$x,topo.mar$y,topo.lo$se.fit, levels = seq(5, 25, 5),
+        add = TRUE)
+title("Loess degree = 1")
+points(topo)
+
+library(akima)
+par(mfrow = c(1, 2), pty=  "s")
+topo.int <- interp.old(topo$x, topo$y, topo$z)
+eqscplot(topo.int, xlab = "interp default", ylab = "", type = "n")
+contour(topo.int, levels = seq(600, 1000, 25), add = TRUE)
+points(topo)
+topo.mar <- list(x = seq(0, 6.5, 0.1), y = seq(0, 6.5, 0.1))
+topo.int2 <- interp.old(topo$x, topo$y, topo$z, topo.mar$x, topo.mar$y,
+                        ncp = 4, extrap = TRUE)
+eqscplot(topo.int2, xlab = "interp", ylab = "", type = "n")
+contour(topo.int2, levels = seq(600, 1000, 25), add = TRUE)
+points(topo)
+
+
+
+# 15.2  Kriging
+
+par(mfrow = c(2, 2), pty = "s")
+topo.ls <- surf.ls(2, topo)
+trsurf <- trmat(topo.ls, 0, 6.5, 0, 6.5, 30)
+eqscplot(trsurf, , xlab = "", ylab = "", type = "n")
+contour(trsurf, levels = seq(600, 1000, 25), add = TRUE)
+points(topo)
+title("LS trend surface")
+
+topo.gls <- surf.gls(2, expcov, topo, d = 0.7)
+trsurf <- trmat(topo.gls, 0, 6.5, 0, 6.5, 30)
+eqscplot(trsurf, , xlab = "", ylab = "", type = "n")
+contour(trsurf, levels = seq(600, 1000, 25), add = TRUE)
+points(topo)
+title("GLS trend surface")
+
+prsurf <- prmat(topo.gls, 0, 6.5, 0, 6.5, 50)
+eqscplot(prsurf, , xlab = "", ylab = "", type = "n")
+contour(prsurf, levels = seq(600, 1000, 25), add = TRUE)
+points(topo)
+title("Kriging prediction")
+sesurf <- semat(topo.gls, 0, 6.5, 0, 6.5, 30)
+eqscplot(sesurf, , xlab = "", ylab = "", type = "n")
+contour(sesurf, levels = c(20, 25), add = TRUE)
+points(topo)
+title("Kriging s.e.")
+
+par(mfrow = c(2, 2), pty = "m")
+topo.kr <- surf.ls(2, topo)
+correlogram(topo.kr, 25)
+d <- seq(0, 7, 0.1)
+lines(d, expcov(d, 0.7))
+variogram(topo.kr, 25)
+
+## left panel of Figure 15.7
+topo.kr <- surf.gls(2, expcov, topo, d=0.7)
+correlogram(topo.kr, 25)
+lines(d, expcov(d, 0.7))
+lines(d, gaucov(d, 1.0, 0.3), lty = 3) # try nugget effect
+
+## right panel
+topo.kr <- surf.ls(0, topo)
+correlogram(topo.kr, 25)
+lines(d, gaucov(d, 2, 0.05))
+
+par(mfrow = c(2, 2), pty = "s")
+## top row of Figure 15.8
+topo.kr <- surf.gls(2, gaucov, topo, d = 1, alph = 0.3)
+prsurf <- prmat(topo.kr, 0, 6.5, 0, 6.5, 50)
+eqscplot(prsurf, , xlab = "fit", ylab = "", type = "n")
+contour(prsurf, levels = seq(600, 1000, 25), add = TRUE)
+points(topo)
+sesurf <- semat(topo.kr, 0, 6.5, 0, 6.5, 25)
+eqscplot(sesurf, , xlab = "standard error", ylab = "", type = "n")
+contour(sesurf, levels = c(15, 20, 25), add = TRUE)
+points(topo)
+
+## bottom row of Figure 15.8
+topo.kr <- surf.gls(0, gaucov, topo, d = 2, alph = 0.05,
+                    nx = 10000)
+prsurf <- prmat(topo.kr, 0, 6.5, 0, 6.5, 50)
+eqscplot(prsurf, , xlab = "fit", ylab = "", type = "n")
+contour(prsurf, levels = seq(600, 1000, 25), add = TRUE)
+points(topo)
+sesurf <- semat(topo.kr, 0, 6.5, 0, 6.5, 25)
+eqscplot(sesurf, , xlab = "standard error", ylab = "", type = "n")
+contour(sesurf, levels = c(15, 20, 25), add = TRUE)
+points(topo)
+
+
+
+# 15.3  Point process analysis
+
+library(spatial)
+pines <- ppinit("pines.dat")
+par(mfrow = c(2, 2), pty = "s")
+plot(pines, xlim = c(0, 10), ylim = c(0, 10),
+    xlab = "", ylab = "", xaxs = "i", yaxs = "i")
+plot(Kfn(pines,5), type = "s", xlab = "distance", ylab = "L(t)")
+lims <- Kenvl(5, 100, Psim(72))
+lines(lims$x, lims$l, lty = 2)
+lines(lims$x, lims$u, lty = 2)
+
+ppregion(pines)
+plot(Kfn(pines, 1.5), type = "s",
+    xlab = "distance", ylab = "L(t)")
+lims <- Kenvl(1.5, 100, Strauss(72, 0.2, 0.7))
+lines(lims$x, lims$a, lty = 2)
+lines(lims$x, lims$l, lty = 2)
+lines(lims$x, lims$u, lty = 2)
+pplik(pines, 0.7)
+lines(Kaver(1.5, 100, Strauss(72, 0.15, 0.7)), lty = 3)
+
+# End of ch15
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/scripts/ch07.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/scripts/ch07.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/scripts/ch07.R	(revision 2477)
@@ -0,0 +1,184 @@
+#-*- R -*-
+
+## Script from Fourth Edition of `Modern Applied Statistics with S'
+
+# Chapter 7   Generalized Linear Models
+
+library(MASS)
+options(width=65, digits=5, height=9999)
+pdf(file="ch07.pdf", width=8, height=6, pointsize=9)
+options(contrasts = c("contr.treatment", "contr.poly"))
+
+ax.1 <- glm(Postwt ~ Prewt + Treat + offset(Prewt),
+            family = gaussian, data = anorexia)
+summary(ax.1)
+
+# 7.2  Binomial data
+
+options(contrasts = c("contr.treatment", "contr.poly"))
+ldose <- rep(0:5, 2)
+numdead <- c(1, 4, 9, 13, 18, 20, 0, 2, 6, 10, 12, 16)
+sex <- factor(rep(c("M", "F"), c(6, 6)))
+SF <- cbind(numdead, numalive = 20 - numdead)
+budworm.lg <- glm(SF ~ sex*ldose, family = binomial)
+summary(budworm.lg)
+
+plot(c(1,32), c(0,1), type = "n", xlab = "dose",
+     ylab = "prob", log = "x")
+text(2^ldose, numdead/20, labels = as.character(sex))
+ld <- seq(0, 5, 0.1)
+lines(2^ld, predict(budworm.lg, data.frame(ldose = ld,
+  sex = factor(rep("M", length(ld)), levels = levels(sex))),
+  type = "response"), col = 3)
+lines(2^ld, predict(budworm.lg, data.frame(ldose = ld,
+  sex = factor(rep("F", length(ld)), levels = levels(sex))),
+  type = "response"), lty = 2, col = 2)
+
+budworm.lgA <- update(budworm.lg, . ~ sex * I(ldose - 3))
+summary(budworm.lgA, cor = F)$coefficients
+anova(update(budworm.lg, . ~ . + sex * I(ldose^2)),
+      test = "Chisq")
+
+budworm.lg0 <- glm(SF ~ sex + ldose - 1, family = binomial)
+summary(budworm.lg0, cor = F)$coefficients
+
+dose.p(budworm.lg0, cf = c(1,3), p = 1:3/4)
+dose.p(update(budworm.lg0, family = binomial(link = probit)),
+       cf = c(1, 3), p = 1:3/4)
+
+options(contrasts = c("contr.treatment", "contr.poly"))
+attach(birthwt)
+race <- factor(race, labels = c("white", "black", "other"))
+table(ptl)
+ptd <- factor(ptl > 0)
+table(ftv)
+ftv <- factor(ftv)
+levels(ftv)[-(1:2)] <- "2+"
+table(ftv)  # as a check
+bwt <- data.frame(low = factor(low), age, lwt, race,
+   smoke = (smoke > 0), ptd, ht = (ht > 0), ui = (ui > 0), ftv)
+detach(); rm(race, ptd, ftv)
+
+birthwt.glm <- glm(low ~ ., family = binomial, data = bwt)
+summary(birthwt.glm)
+birthwt.step <- stepAIC(birthwt.glm, trace = FALSE)
+birthwt.step$anova
+birthwt.step2 <- stepAIC(birthwt.glm, ~ .^2 + I(scale(age)^2)
+   + I(scale(lwt)^2), trace = FALSE)
+birthwt.step2$anova
+summary(birthwt.step2)$coef
+table(bwt$low, predict(birthwt.step2) > 0)
+
+## R has a similar gam() in package gam and a different gam() in package mgcv
+if(require(gam)) {
+    attach(bwt)
+    age1 <- age*(ftv=="1"); age2 <- age*(ftv=="2+")
+    birthwt.gam <- gam(low ~ s(age) + s(lwt) + smoke + ptd +
+                       ht + ui + ftv + s(age1) + s(age2) + smoke:ui, binomial,
+                       bwt, bf.maxit=25)
+    print(summary(birthwt.gam))
+    print(table(low, predict(birthwt.gam) > 0))
+    par(mfrow = c(2, 2))
+    if(interactive()) plot(birthwt.gam, ask = TRUE, se = TRUE)
+    par(mfrow = c(1, 1))
+    detach()
+}
+
+library(mgcv)
+attach(bwt)
+age1 <- age*(ftv=="1"); age2 <- age*(ftv=="2+")
+(birthwt.gam <- gam(low ~ s(age) + s(lwt) + smoke + ptd +
+    ht + ui + ftv + s(age1) + s(age2) + smoke:ui, binomial, bwt))
+table(low, predict(birthwt.gam) > 0)
+par(mfrow = c(2, 2))
+plot(birthwt.gam, se = TRUE)
+par(mfrow = c(1, 1))
+detach()
+
+# 7.3  Poisson models
+
+names(housing)
+house.glm0 <- glm(Freq ~ Infl*Type*Cont + Sat,
+                  family = poisson, data = housing)
+summary(house.glm0)
+
+addterm(house.glm0, ~. + Sat:(Infl+Type+Cont), test = "Chisq")
+
+house.glm1 <- update(house.glm0, . ~ . + Sat:(Infl+Type+Cont))
+summary(house.glm1)
+1 - pchisq(deviance(house.glm1), house.glm1$df.resid)
+
+dropterm(house.glm1, test = "Chisq")
+
+addterm(house.glm1, ~. + Sat:(Infl+Type+Cont)^2, test = "Chisq")
+
+hnames <- lapply(housing[, -5], levels) # omit Freq
+house.pm <- predict(house.glm1, expand.grid(hnames),
+                   type = "response")  # poisson means
+house.pm <- matrix(house.pm, ncol = 3, byrow = TRUE,
+                   dimnames = list(NULL, hnames[[1]]))
+house.pr <- house.pm/drop(house.pm %*% rep(1, 3))
+cbind(expand.grid(hnames[-1]), round(house.pr, 2))
+
+loglm(Freq ~ Infl*Type*Cont + Sat*(Infl+Type+Cont),
+       data = housing)
+
+library(nnet)
+(house.mult <- multinom(Sat ~ Infl + Type + Cont,
+                        weights = Freq, data = housing))
+house.mult2 <- multinom(Sat ~ Infl*Type*Cont,
+                         weights = Freq, data = housing)
+anova(house.mult, house.mult2, test = "none")
+
+house.pm <- predict(house.mult, expand.grid(hnames[-1]),
+                    type = "probs")
+cbind(expand.grid(hnames[-1]), round(house.pm, 2))
+
+house.cpr <- apply(house.pr, 1, cumsum)
+logit <- function(x) log(x/(1-x))
+house.ld <- logit(house.cpr[2, ]) - logit(house.cpr[1, ])
+sort(drop(house.ld))
+mean(.Last.value)
+
+house.plr <- polr(Sat ~ Infl + Type + Cont,
+                  data = housing, weights = Freq)
+house.plr
+
+house.pr1 <- predict(house.plr, expand.grid(hnames[-1]),
+                     type = "probs")
+cbind(expand.grid(hnames[-1]), round(house.pr1, 2))
+
+Fr <- matrix(housing$Freq, ncol = 3, byrow = TRUE)
+2 * sum(Fr * log(house.pr/house.pr1))
+
+house.plr2 <- stepAIC(house.plr, ~.^2)
+house.plr2$anova
+
+
+# 7.4  A negative binomial family
+
+glm(Days ~ .^4, family = poisson, data = quine)
+quine.nb <- glm(Days ~ .^4, family = negative.binomial(2), data = quine)
+quine.nb0 <- update(quine.nb, . ~ Sex/(Age + Eth*Lrn))
+anova(quine.nb0, quine.nb, test = "Chisq")
+
+quine.nb <- glm.nb(Days ~ .^4, data = quine)
+quine.nb2 <- stepAIC(quine.nb)
+quine.nb2$anova
+dropterm(quine.nb2, test = "Chisq")
+quine.nb3 <-
+  update(quine.nb2, . ~ . - Eth:Age:Lrn - Sex:Age:Lrn)
+anova(quine.nb2, quine.nb3)
+c(theta = quine.nb2$theta, SE = quine.nb2$SE)
+
+par(mfrow = c(2,2), pty = "m")
+rs <- resid(quine.nb2, type = "deviance")
+plot(predict(quine.nb2), rs, xlab = "Linear predictors",
+    ylab = "Deviance residuals")
+abline(h = 0, lty = 2)
+qqnorm(rs, ylab = "Deviance residuals")
+qqline(rs)
+par(mfrow = c(1,1))
+
+
+# End of ch07
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/scripts/ch16.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/scripts/ch16.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/scripts/ch16.R	(revision 2477)
@@ -0,0 +1,168 @@
+#-*- R -*-
+
+## Script from Fourth Edition of `Modern Applied Statistics with S'
+
+# Chapter 16   Optimization and Mazimum Likelihood Estimation
+
+library(MASS)
+pdf(file="ch16.pdf", width=8, height=8, pointsize=9)
+options(width=65, digits=5)
+
+# 16.3 General optimization
+
+attach(geyser)
+truehist(waiting, xlim = c(35, 110), ymax = 0.04, h = 5)
+wait.dns <- density(waiting, n = 512, width = "SJ")
+lines(wait.dns, lty = 2)
+
+lmix2 <- deriv3(
+     ~ -log(p*dnorm((x-u1)/s1)/s1 + (1-p)*dnorm((x-u2)/s2)/s2),
+     c("p", "u1", "s1", "u2", "s2"),
+     function(x, p, u1, s1, u2, s2) NULL)
+
+(p0 <- c(p = mean(waiting < 70), u1 = 50, s1 = 5, u2 = 80, s2 = 5))
+
+## using optim
+
+mix.obj <- function(p, x)
+{
+  e <- p[1] * dnorm((x - p[2])/p[3])/p[3] +
+       (1 - p[1]) * dnorm((x - p[4])/p[5])/p[5]
+  if(any(e <= 0)) Inf else -sum(log(e))
+}
+optim(p0, mix.obj, x = waiting)$par # Nelder-Mead
+
+optim(p0, mix.obj, x = waiting, method = "BFGS",
+     control = list(parscale= c(0.1, rep(1, 4))))$par
+
+# with derivatives
+lmix2a <- deriv(
+     ~ -log(p*dnorm((x-u1)/s1)/s1 + (1-p)*dnorm((x-u2)/s2)/s2),
+     c("p", "u1", "s1", "u2", "s2"),
+     function(x, p, u1, s1, u2, s2) NULL)
+mix.gr <- function(p, x) {
+   u1 <- p[2]; s1 <- p[3]; u2 <- p[4]; s2 <- p[5]; p <- p[1]
+   colSums(attr(lmix2a(x, p, u1, s1, u2, s2), "gradient")) }
+
+optim(p0, mix.obj, mix.gr, x = waiting, method = "BFGS",
+     control = list(parscale= c(0.1, rep(1, 4))))$par
+
+mix.nl0 <- optim(p0, mix.obj, mix.gr, method = "L-BFGS-B", hessian = TRUE,
+                lower = c(0, -Inf, 0, -Inf, 0),
+                upper = c(1, rep(Inf, 4)), x = waiting)
+rbind(est = mix.nl0$par, se = sqrt(diag(solve(mix.nl0$hessian))))
+
+dmix2 <- function(x, p, u1, s1, u2, s2)
+             p * dnorm(x, u1, s1) + (1-p) * dnorm(x, u2, s2)
+attach(as.list(mix.nl0$par))
+wait.fdns <- list(x = wait.dns$x,
+                  y = dmix2(wait.dns$x, p, u1, s1, u2, s2))
+lines(wait.fdns)
+par(usr = c(0, 1, 0, 1))
+legend(0.1, 0.9, c("Normal mixture", "Nonparametric"),
+       lty = c(1, 2), bty = "n")
+
+pmix2 <- deriv(~ p*pnorm((x-u1)/s1) + (1-p)*pnorm((x-u2)/s2),
+               "x", function(x, p, u1, s1, u2, s2) {})
+pr0 <- (seq(along = waiting) - 0.5)/length(waiting)
+x0 <- x1 <- as.vector(sort(waiting)) ; del <- 1; i <- 0
+while((i <- 1 + 1) < 10 && abs(del) > 0.0005) {
+  pr <- pmix2(x0, p, u1, s1, u2, s2)
+  del <- (pr - pr0)/attr(pr, "gradient")
+  x0 <- x0 - 0.5*del
+  cat(format(del <- max(abs(del))), "\n")
+}
+detach()
+par(pty = "s")
+plot(x0, x1, xlim = range(x0, x1), ylim = range(x0, x1),
+     xlab = "Model quantiles", ylab = "Waiting time")
+abline(0, 1)
+par(pty = "m")
+
+
+
+mix1.obj <- function(p, x, y)
+{
+  q <- exp(p[1] + p[2]*y)
+  q <- q/(1 + q)
+  e <- q * dnorm((x - p[3])/p[4])/p[4] +
+       (1 - q) * dnorm((x - p[5])/p[6])/p[6]
+  if(any(e <= 0)) Inf else -sum(log(e))
+}
+p1 <- mix.nl0$par; tmp <- as.vector(p1[1])
+p2 <- c(a = log(tmp/(1-tmp)), b = 0, p1[-1])
+mix.nl1 <- optim(p2, mix1.obj, method = "L-BFGS-B",
+                lower = c(-Inf, -Inf, -Inf, 0, -Inf, 0),
+                upper = rep(Inf, 6), hessian = TRUE,
+                x = waiting[-1], y = duration[-299])
+rbind(est = mix.nl1$par, se = sqrt(diag(solve(mix.nl1$hessian))))
+
+
+if(!exists("bwt")) {
+  attach(birthwt)
+  race <- factor(race, labels=c("white", "black", "other"))
+  ptd <- factor(ptl > 0)
+  ftv <- factor(ftv); levels(ftv)[-(1:2)] <- "2+"
+  bwt <- data.frame(low=factor(low), age, lwt, race,
+	   smoke=(smoke>0), ptd, ht=(ht>0), ui=(ui>0), ftv)
+  detach(); rm(race, ptd, ftv)
+}
+
+logitreg <- function(x, y, wt = rep(1, length(y)),
+               intercept = TRUE, start = rep(0, p), ...)
+{
+  fmin <- function(beta, X, y, w) {
+      p <- plogis(X %*% beta)
+      -sum(2 * w * ifelse(y, log(p), log(1-p)))
+  }
+  gmin <- function(beta, X, y, w) {
+      eta <- X %*% beta; p <- plogis(eta)
+      -2 * matrix(w *dlogis(eta) * ifelse(y, 1/p, -1/(1-p)), 1) %*% X
+  }
+  if(is.null(dim(x))) dim(x) <- c(length(x), 1)
+  dn <- dimnames(x)[[2]]
+  if(!length(dn)) dn <- paste("Var", 1:ncol(x), sep="")
+  p <- ncol(x) + intercept
+  if(intercept) {x <- cbind(1, x); dn <- c("(Intercept)", dn)}
+  if(is.factor(y)) y <- (unclass(y) != 1)
+  fit <- optim(start, fmin, gmin, X = x, y = y, w = wt,
+               method = "BFGS", ...)
+  names(fit$par) <- dn
+  cat("\nCoefficients:\n"); print(fit$par)
+  # R: use fit$value and fit$convergence
+  cat("\nResidual Deviance:", format(fit$value), "\n")
+  if(fit$convergence > 0)
+      cat("\nConvergence code:", fit$convergence, "\n")
+  invisible(fit)
+}
+
+options(contrasts = c("contr.treatment", "contr.poly"))
+X <- model.matrix(terms(low ~ ., data=bwt), data = bwt)[, -1]
+logitreg(X, bwt$low)
+
+AIDSfit <- function(y, z, start=rep(mean(y), ncol(z)), ...)
+{
+  deviance <- function(beta, y, z) {
+      mu <- z %*% beta
+      2 * sum(mu - y - y*log(mu/y)) }
+  grad <- function(beta, y, z) {
+      mu <- z %*% beta
+      2 * t(1 - y/mu) %*% z }
+  optim(start, deviance, grad, lower = 0, y = y, z = z,
+        method = "L-BFGS-B", ...)
+}
+
+Y <- scan()
+12 14 33 50 67 74 123 141 165 204 253 246 240
+
+library(nnet) # for class.ind
+s <- seq(0, 13.999, 0.01); tint <- 1:14
+X <- expand.grid(s, tint)
+Z <- matrix(pweibull(pmax(X[,2] - X[,1],0), 2.5, 10),length(s))
+Z <- Z[,2:14] - Z[,1:13]
+Z <- t(Z) %*% class.ind(factor(floor(s/2))) * 0.01
+round(AIDSfit(Y, Z)$par)
+rm(s, X, Y, Z)
+
+# End of ch16
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/scripts/ch08.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/scripts/ch08.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/scripts/ch08.R	(revision 2477)
@@ -0,0 +1,457 @@
+#-*- R -*-
+
+## Script from Fourth Edition of `Modern Applied Statistics with S'
+
+# Chapter 8   Non-linear and Smooth Regression
+
+library(MASS)
+library(lattice)
+options(width=65, digits=5, height=9999)
+pdf(file="ch08.pdf", width=8, height=6, pointsize=9)
+
+
+# From Chapter 6, for comparisons
+set.seed(123)
+cpus.samp <-
+c(3, 5, 6, 7, 8, 10, 11, 16, 20, 21, 22, 23, 24, 25, 29, 33, 39, 41, 44, 45,
+46, 49, 57, 58, 62, 63, 65, 66, 68, 69, 73, 74, 75, 76, 78, 83, 86,
+88, 98, 99, 100, 103, 107, 110, 112, 113, 115, 118, 119, 120, 122,
+124, 125, 126, 127, 132, 136, 141, 144, 146, 147, 148, 149, 150, 151,
+152, 154, 156, 157, 158, 159, 160, 161, 163, 166, 167, 169, 170, 173,
+174, 175, 176, 177, 183, 184, 187, 188, 189, 194, 195, 196, 197, 198,
+199, 202, 204, 205, 206, 208, 209)
+
+cpus1 <- cpus
+attach(cpus)
+for(v in names(cpus)[2:7])
+  cpus1[[v]] <- cut(cpus[[v]], unique(quantile(cpus[[v]])),
+                    include.lowest = TRUE)
+detach()
+cpus.lm <- lm(log10(perf) ~ ., data=cpus1[cpus.samp, 2:8])
+cpus.lm2 <- stepAIC(cpus.lm, trace=FALSE)
+res2 <- log10(cpus1[-cpus.samp, "perf"]) -
+              predict(cpus.lm2, cpus1[-cpus.samp,])
+cpus2 <- cpus[, 2:8]  # excludes names, authors' predictions
+cpus2[, 1:3] <- log10(cpus2[, 1:3])
+
+test.cpus <- function(fit)
+  sqrt(sum((log10(cpus2[-cpus.samp, "perf"]) -
+            predict(fit, cpus2[-cpus.samp,]))^2)/109)
+
+# 8.1 An introductory example
+
+attach(wtloss)
+# alter margin 4; others are default
+oldpar <- par(mar = c(5.1, 4.1, 4.1, 4.1))
+plot(Days, Weight, type = "p", ylab = "Weight (kg)")
+Wt.lbs <- pretty(range(Weight*2.205))
+axis(side = 4, at = Wt.lbs/2.205, lab = Wt.lbs, srt = 90)
+mtext("Weight (lb)", side = 4, line = 3)
+par(oldpar) # restore settings
+detach()
+
+
+# 8.2  Fitting non-linear regression models
+
+wtloss.st <- c(b0 = 90, b1 = 95, th = 120)
+wtloss.fm <- nls(Weight ~ b0 + b1*2^(-Days/th),
+   data = wtloss, start = wtloss.st, trace = TRUE)
+wtloss.fm
+
+expn <- function(b0, b1, th, x) {
+   temp <- 2^(-x/th)
+   model.func <- b0 + b1 * temp
+   Z <- cbind(1, temp, (b1 * x * temp * log(2))/th^2)
+   dimnames(Z) <- list(NULL, c("b0", "b1", "th"))
+   attr(model.func, "gradient") <- Z
+   model.func
+}
+
+wtloss.gr <- nls(Weight ~ expn(b0, b1, th, Days),
+   data = wtloss, start = wtloss.st, trace = TRUE)
+
+expn1 <- deriv(y ~ b0 + b1 * 2^(-x/th), c("b0", "b1", "th"),
+               function(b0, b1, th, x) {})
+
+
+negexp <- selfStart(model = ~ b0 + b1*exp(-x/th),
+   initial = negexp.SSival, parameters = c("b0", "b1", "th"),
+   template = function(x, b0, b1, th) {})
+
+wtloss.ss <- nls(Weight ~ negexp(Days, B0, B1, theta),
+                 data = wtloss, trace = TRUE)
+
+
+# 8.3  Non-linear fitted model objects and method functions
+
+summary(wtloss.gr)
+deviance(wtloss.gr)
+vcov(wtloss.gr)
+
+A <- model.matrix(~ Strip - 1, data = muscle)
+rats.nls1 <- nls(log(Length) ~ cbind(A, rho^Conc),
+   data = muscle, start = c(rho = 0.1), algorithm = "plinear")
+(B <- coef(rats.nls1))
+
+st <- list(alpha = B[2:22], beta = B[23], rho = B[1])
+rats.nls2 <- nls(log(Length) ~ alpha[Strip] + beta*rho^Conc,
+                  data = muscle, start = st)
+
+attach(muscle)
+Muscle <- expand.grid(Conc = sort(unique(Conc)),
+                     Strip = levels(Strip))
+Muscle$Yhat <- predict(rats.nls2, Muscle)
+Muscle$logLength <- rep(NA, nrow(Muscle))
+ind <- match(paste(Strip, Conc),
+            paste(Muscle$Strip, Muscle$Conc))
+Muscle$logLength[ind] <- log(Length)
+detach()
+
+xyplot(Yhat ~ Conc | Strip, Muscle, as.table = TRUE,
+  ylim = range(c(Muscle$Yhat, Muscle$logLength), na.rm = TRUE),
+  subscripts = TRUE, xlab = "Calcium Chloride concentration (mM)",
+  ylab = "log(Length in mm)", panel =
+  function(x, y, subscripts, ...) {
+     panel.xyplot(x, Muscle$logLength[subscripts], ...)
+     llines(spline(x, y))
+  })
+
+
+# 8.5  Confidence intervals for parameters
+
+expn2 <- deriv(~b0 + b1*((w0 - b0)/b1)^(x/d0),
+        c("b0","b1","d0"), function(b0, b1, d0, x, w0) {})
+
+wtloss.init <- function(obj, w0) {
+  p <- coef(obj)
+  d0 <-  - log((w0 - p["b0"])/p["b1"])/log(2) * p["th"]
+  c(p[c("b0", "b1")], d0 = as.vector(d0))
+}
+
+out <- NULL
+w0s <- c(110, 100, 90)
+for(w0 in w0s) {
+    fm <- nls(Weight ~ expn2(b0, b1, d0, Days, w0),
+              wtloss, start = wtloss.init(wtloss.gr, w0))
+    out <- rbind(out, c(coef(fm)["d0"], confint(fm, "d0")))
+}
+dimnames(out)[[1]] <- paste(w0s,"kg:")
+out
+
+fm0 <- lm(Wt*Time ~ Viscosity + Time - 1,  data = stormer)
+b0 <- coef(fm0)
+names(b0) <- c("b1", "b2")
+b0
+storm.fm <- nls(Time ~ b1*Viscosity/(Wt-b2), data = stormer,
+                start = b0, trace = TRUE)
+
+bc <- coef(storm.fm)
+se <- sqrt(diag(vcov(storm.fm)))
+dv <- deviance(storm.fm)
+
+par(pty = "s")
+b1 <- bc[1] + seq(-3*se[1], 3*se[1], length = 51)
+b2 <- bc[2] + seq(-3*se[2], 3*se[2], length = 51)
+bv <- expand.grid(b1, b2)
+
+attach(stormer)
+ssq <- function(b)
+      sum((Time - b[1] * Viscosity/(Wt-b[2]))^2)
+dbetas <- apply(bv, 1, ssq)
+
+cc <- matrix(Time - rep(bv[,1],rep(23, 2601)) *
+      Viscosity/(Wt - rep(bv[,2], rep(23, 2601))), 23)
+dbetas <- matrix(drop(rep(1, 23) %*% cc^2), 51)
+
+fstat <- matrix( ((dbetas - dv)/2) / (dv/21), 51, 51)
+
+qf(0.95, 2, 21)
+
+plot(b1, b2, type = "n")
+lev <- c(1, 2, 5, 7, 10, 15, 20)
+contour(b1, b2, fstat, levels = lev, labex = 0.75, lty = 2, add = TRUE)
+contour(b1, b2, fstat, levels = qf(0.95,2,21), add = TRUE, labex = 0)
+text(31.6, 0.3, labels = "95% CR", adj = 0, cex = 0.75)
+points(bc[1], bc[2], pch = 3, mkh = 0.1)
+detach()
+par(pty = "m")
+
+library(boot)
+storm.fm <- nls(Time ~ b*Viscosity/(Wt - c), stormer,
+                start = c(b=29.401, c=2.2183))
+summary(storm.fm)$parameters
+st <- cbind(stormer, fit=fitted(storm.fm))
+storm.bf <- function(rs, i) {
+#    st <- st # for S-PLUS
+    st$Time <-  st$fit + rs[i]
+    coef(nls(Time ~ b * Viscosity/(Wt - c), st,
+             start = coef(storm.fm)))
+}
+rs <- scale(resid(storm.fm), scale = FALSE) # remove the mean
+(storm.boot <- boot(rs, storm.bf, R = 9999)) ## slow
+boot.ci(storm.boot, index = 1,
+        type = c("norm", "basic", "perc", "bca"))
+boot.ci(storm.boot, index = 2,
+        type = c("norm", "basic", "perc", "bca"))
+
+
+# 8.5  Assessing the linear approximation
+
+opar <- par(pty = "m", mfrow = c(1, 3))
+plot(profile(update(wtloss.gr, trace = FALSE)))
+par(opar)
+
+
+# 8.7  One-dimensional curve fitting
+
+attach(GAGurine)
+par(mfrow = c(3, 2))
+plot(Age, GAG, main = "Degree 6 polynomial")
+GAG.lm <- lm(GAG ~ Age + I(Age^2) + I(Age^3) + I(Age^4) +
+   I(Age^5) + I(Age^6) + I(Age^7) + I(Age^8))
+anova(GAG.lm)
+GAG.lm2 <- lm(GAG ~ Age + I(Age^2) + I(Age^3) + I(Age^4) +
+   I(Age^5) + I(Age^6))
+xx <- seq(0, 17, len = 200)
+lines(xx, predict(GAG.lm2, data.frame(Age = xx)))
+
+library(splines)
+plot(Age, GAG, type = "n", main = "Splines")
+lines(Age, fitted(lm(GAG ~ ns(Age, df = 5))))
+lines(Age, fitted(lm(GAG ~ ns(Age, df = 10))), lty = 3)
+lines(Age, fitted(lm(GAG ~ ns(Age, df = 20))), lty = 4)
+lines(smooth.spline(Age, GAG), lwd = 3)
+legend(12, 50, c("df=5", "df=10", "df=20", "Smoothing"),
+       lty = c(1, 3, 4, 1), lwd = c(1,1,1,3), bty = "n")
+plot(Age, GAG, type = "n", main = "loess")
+lines(loess.smooth(Age, GAG))
+plot(Age, GAG, type = "n", main = "supsmu")
+lines(supsmu(Age, GAG))
+lines(supsmu(Age, GAG, bass = 3), lty = 3)
+lines(supsmu(Age, GAG, bass = 10), lty = 4)
+legend(12, 50, c("default", "base = 3", "base = 10"),
+       lty = c(1, 3, 4), bty = "n")
+plot(Age, GAG, type = "n", main = "ksmooth")
+lines(ksmooth(Age, GAG, "normal", bandwidth = 1))
+lines(ksmooth(Age, GAG, "normal", bandwidth = 5), lty = 3)
+legend(12, 50, c("width = 1", "width = 5"), lty = c(1, 3), bty = "n")
+
+library(KernSmooth)
+plot(Age, GAG, type = "n", main = "locpoly")
+(h <- dpill(Age, GAG))
+lines(locpoly(Age, GAG, degree = 0, bandwidth = h))
+
+lines(locpoly(Age, GAG, degree = 1, bandwidth = h), lty = 3)
+lines(locpoly(Age, GAG, degree = 2, bandwidth = h), lty = 4)
+legend(12, 50, c("const", "linear", "quadratic"),
+       lty = c(1, 3, 4), bty = "n")
+detach()
+
+
+# 8.8  Additive models
+
+## R has a different gam() in package mgcv
+library(mgcv)
+rock.lm <- lm(log(perm) ~ area + peri + shape, data = rock)
+summary(rock.lm)
+(rock.gam <- gam(log(perm) ~ s(area) + s(peri) + s(shape), data=rock))
+#summary(rock.gam)
+#anova(rock.lm, rock.gam)
+par(mfrow = c(2, 3), pty = "s")
+plot(rock.gam, se = TRUE, pages = 0)
+rock.gam1 <- gam(log(perm) ~ area + peri + s(shape), data = rock)
+plot(rock.gam1, se = TRUE)
+par(pty="m")
+#anova(rock.lm, rock.gam1, rock.gam)
+
+library(mda)
+rock.bruto <- bruto(rock[, -4], rock[, 4])
+rock.bruto$type
+rock.bruto$df
+
+
+Xin <- as.matrix(cpus2[cpus.samp, 1:6])
+test2 <- function(fit) {
+ Xp <- as.matrix(cpus2[-cpus.samp, 1:6])
+ sqrt(sum((log10(cpus2[-cpus.samp, "perf"]) -
+           predict(fit, Xp))^2)/109)
+}
+
+cpus.bruto <- bruto(Xin, log10(cpus2[cpus.samp, 7]))
+test2(cpus.bruto)
+cpus.bruto$type
+cpus.bruto$df
+# examine the fitted functions
+par(mfrow = c(3, 2))
+Xp <- matrix(sapply(cpus2[cpus.samp, 1:6], mean), 100, 6, byrow = TRUE)
+for(i in 1:6) {
+ xr <- sapply(cpus2, range)
+ Xp1 <- Xp; Xp1[, i] <- seq(xr[1, i], xr[2, i], len = 100)
+ Xf <- predict(cpus.bruto, Xp1)
+ plot(Xp1[ ,i], Xf, xlab=names(cpus2)[i], ylab=  "", type = "l")
+}
+
+cpus.mars <- mars(Xin, log10(cpus2[cpus.samp,7]))
+showcuts <- function(obj)
+{
+ tmp <- obj$cuts[obj$sel, ]
+ dimnames(tmp) <- list(NULL, dimnames(Xin)[[2]])
+ tmp
+}
+showcuts(cpus.mars)
+test2(cpus.mars)
+# examine the fitted functions
+Xp <- matrix(sapply(cpus2[cpus.samp, 1:6], mean), 100, 6, byrow = TRUE)
+for(i in 1:6) {
+ xr <- sapply(cpus2, range)
+ Xp1 <- Xp; Xp1[, i] <- seq(xr[1, i], xr[2, i], len = 100)
+ Xf <- predict(cpus.mars, Xp1)
+ plot(Xp1[ ,i], Xf, xlab = names(cpus2)[i], ylab = "", type = "l")
+}
+
+cpus.mars2 <- mars(Xin, log10(cpus2[cpus.samp,7]), degree = 2)
+showcuts(cpus.mars2)
+test2(cpus.mars2)
+
+cpus.mars6 <- mars(Xin, log10(cpus2[cpus.samp,7]), degree = 6)
+showcuts(cpus.mars6)
+test2(cpus.mars6)
+
+if(require(acepack)) {
+    attach(cpus2)
+    cpus.avas <- avas(cpus2[, 1:6], perf)
+    plot(log10(perf), cpus.avas$ty)
+    par(mfrow = c(2, 3))
+    for(i in 1:6) {
+        o <- order(cpus2[, i])
+        plot(cpus2[o, i], cpus.avas$tx[o, i], type = "l",
+             xlab = names(cpus2[i]), ylab = "")
+    }
+    detach()
+}
+
+# 8.9  Projection-pursuit regression
+
+attach(rock)
+rock1 <- data.frame(area = area/10000, peri = peri/10000,
+                    shape = shape, perm = perm)
+detach()
+(rock.ppr <- ppr(log(perm) ~ area + peri + shape, data = rock1,
+                 nterms = 2, max.terms = 5))
+rock.ppr
+summary(rock.ppr)
+
+par(mfrow = c(3, 2))
+plot(rock.ppr)
+plot(update(rock.ppr, bass = 5))
+plot(rock.ppr2 <- update(rock.ppr, sm.method = "gcv", gcvpen = 2))
+par(mfrow = c(1, 1))
+
+summary(rock.ppr2)
+
+summary(rock1) # to find the ranges of the variables
+Xp <- expand.grid(area = seq(0.1, 1.2, 0.05),
+                  peri = seq(0, 0.5, 0.02), shape = 0.2)
+rock.grid <- cbind(Xp, fit = predict(rock.ppr2, Xp))
+wireframe(fit ~ area + peri, rock.grid, screen = list(z=160,x=-60),
+          aspect = c(1, 0.5), drape = TRUE)
+# or
+persp(seq(0.1, 1.2, 0.05), seq(0, 0.5, 0.02), matrix(rock.grid$fit, 23),
+      d = 5, theta = -160, phi = 30, zlim = c(-1, 15))
+
+
+(cpus.ppr <- ppr(log10(perf) ~ ., data = cpus2[cpus.samp,],
+                 nterms = 2, max.terms = 10, bass = 5))
+cpus.ppr <- ppr(log10(perf) ~ ., data = cpus2[cpus.samp,],
+                nterms = 8, max.terms = 10, bass = 5)
+test.cpus(cpus.ppr)
+
+ppr(log10(perf) ~ ., data = cpus2[cpus.samp,],
+    nterms = 2, max.terms = 10, sm.method = "spline")
+cpus.ppr2 <- ppr(log10(perf) ~ ., data = cpus2[cpus.samp,],
+   nterms = 7, max.terms = 10, sm.method = "spline")
+test.cpus(cpus.ppr2)
+res3 <- log10(cpus2[-cpus.samp, "perf"]) -
+             predict(cpus.ppr, cpus2[-cpus.samp,])
+wilcox.test(res2^2, res3^2, paired = TRUE, alternative = "greater")
+
+
+# 8.10  Neural networks
+
+library(nnet)
+attach(rock)
+area1 <- area/10000; peri1 <- peri/10000
+rock1 <- data.frame(perm, area = area1, peri = peri1, shape)
+rock.nn <- nnet(log(perm) ~ area + peri + shape, rock1,
+    size = 3, decay = 1e-3, linout = TRUE, skip = TRUE,
+    maxit = 1000, Hess = TRUE)
+sum((log(perm) - predict(rock.nn))^2)
+detach()
+eigen(rock.nn$Hessian, TRUE)$values    # rock.nn$Hessian in R
+
+Xp <- expand.grid(area = seq(0.1, 1.2, 0.05),
+                 peri = seq(0, 0.5, 0.02), shape = 0.2)
+rock.grid <- cbind(Xp, fit = predict(rock.nn, Xp))
+wireframe(fit ~ area + peri, rock.grid, screen = list(z=160, x=-60),
+          aspect = c(1, 0.5), drape = TRUE)
+# or
+persp(seq(0.1, 1.2, 0.05), seq(0, 0.5, 0.02), matrix(rock.grid$fit, 23),
+      d = 5, theta = -160, phi = 30, zlim = c(-1, 15))
+
+attach(cpus2)
+cpus3 <-
+ data.frame(syct= syct-2, mmin=mmin-3, mmax=mmax-4, cach=cach/256,
+            chmin=chmin/100, chmax=chmax/100, perf=perf)
+detach()
+
+test.cpus <- function(fit)
+ sqrt(sum((log10(cpus3[-cpus.samp, "perf"]) -
+          predict(fit, cpus3[-cpus.samp,]))^2)/109)
+cpus.nn1 <- nnet(log10(perf) ~ ., cpus3[cpus.samp,],
+                linout = TRUE, skip = TRUE, size = 0)
+test.cpus(cpus.nn1)
+
+cpus.nn2 <- nnet(log10(perf) ~ ., cpus3[cpus.samp,], linout = TRUE,
+                 skip = TRUE, size = 4, decay = 0.01, maxit = 1000)
+test.cpus(cpus.nn2)
+cpus.nn3 <- nnet(log10(perf) ~ ., cpus3[cpus.samp,], linout = TRUE,
+                 skip = TRUE, size = 10, decay = 0.01, maxit = 1000)
+test.cpus(cpus.nn3)
+cpus.nn4 <- nnet(log10(perf) ~ ., cpus3[cpus.samp,], linout = TRUE,
+                skip = TRUE, size = 25, decay = 0.01, maxit = 1000)
+test.cpus(cpus.nn4)
+
+CVnn.cpus <- function(formula, data = cpus3[cpus.samp, ],
+    size = c(0, 4, 4, 10, 10),
+    lambda = c(0, rep(c(0.003, 0.01), 2)),
+    nreps = 5, nifold = 10, ...)
+{
+  CVnn1 <- function(formula, data, nreps=1, ri,  ...)
+  {
+    truth <- log10(data$perf)
+    res <- numeric(length(truth))
+    cat("  fold")
+    for (i in sort(unique(ri))) {
+      cat(" ", i,  sep="")
+      for(rep in 1:nreps) {
+        learn <- nnet(formula, data[ri !=i,], trace=FALSE, ...)
+        res[ri == i] <- res[ri == i] +
+                        predict(learn, data[ri == i,])
+      }
+    }
+    cat("\n")
+    sum((truth - res/nreps)^2)
+  }
+  choice <- numeric(length(lambda))
+  ri <- sample(nifold, nrow(data), replace = TRUE)
+  for(j in seq(along=lambda)) {
+    cat("  size =", size[j], "decay =", lambda[j], "\n")
+    choice[j] <- CVnn1(formula, data, nreps=nreps, ri=ri,
+                       size=size[j], decay=lambda[j], ...)
+    }
+  cbind(size=size, decay=lambda, fit=sqrt(choice/100))
+}
+CVnn.cpus(log10(perf) ~ ., data = cpus3[cpus.samp,],
+         linout = TRUE, skip = TRUE, maxit = 1000)
+
+# End of ch08
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/scripts/ch09.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/scripts/ch09.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/scripts/ch09.R	(revision 2477)
@@ -0,0 +1,104 @@
+#-*- R -*-
+
+## Script from Fourth Edition of `Modern Applied Statistics with S'
+
+# Chapter 9   Tree-based Methods
+
+library(MASS)
+pdf(file="ch09.pdf", width=8, height=6, pointsize=9)
+options(digits=5)
+
+library(rpart)
+
+# Figure 9.3
+shuttle.rp <- rpart(use ~ ., data=shuttle, minbucket=0, xval = 0,
+                    maxsurrogate = 0, cp = 0, subset = 1:253)
+post(shuttle.rp, horizontal = FALSE, height=10, width=8, title = "",
+     pointsize = 8, pretty = 0)
+
+
+# 9.3   Implementation in rpart
+
+set.seed(123)
+cpus.rp <- rpart(log10(perf) ~ ., cpus[ , 2:8], cp = 1e-3)
+cpus.rp
+print(cpus.rp, cp = 0.01) # default pruning
+
+plot(cpus.rp, uniform = TRUE)
+text(cpus.rp, digits = 3)
+
+printcp(cpus.rp)
+plotcp(cpus.rp)
+
+cpus.rp1 <- prune(cpus.rp, cp = 0.006)
+print(cpus.rp1, digits = 3)
+plot(cpus.rp1, branch = 0.4, uniform = TRUE)
+text(cpus.rp1, digits = 3)
+
+# for figure 9.2
+cpus.rp2 <- prune(cpus.rp, cp = 0.03)
+post(cpus.rp2, horizontal = FALSE, title = "", digits=4, pointsize=18)
+
+
+set.seed(123)
+fgl.rp <- rpart(type ~ ., fgl, cp = 0.001)
+plotcp(fgl.rp)
+printcp(fgl.rp)
+
+fgl.rp2 <- prune(fgl.rp, cp = 0.02)
+plot(fgl.rp2, uniform = TRUE)
+text(fgl.rp2, use.n = TRUE)
+fgl.rp2
+
+summary(fgl.rp2)
+
+set.seed(123)
+fgl.rp3 <- rpart(type ~ ., fgl, cp = 0.001,
+                 parms = list(split="information"))
+plotcp(fgl.rp3)
+printcp(fgl.rp3)
+
+fgl.rp4 <- prune(fgl.rp3, cp = 0.03)
+plot(fgl.rp4, uniform = TRUE); text(fgl.rp4, use.n = TRUE)
+
+plot(cpus.rp, branch = 0.6, compress = TRUE, uniform = TRUE)
+text(cpus.rp, digits = 3, all = TRUE, use.n = TRUE)
+
+
+# 9.3   Implementation in tree
+
+library(tree)
+## the stopping criteria differ slightly between R and S-PLUS
+cpus.ltr <- tree(log10(perf) ~ ., data = cpus[, 2:8], mindev = 0.005)
+summary(cpus.ltr)
+
+cpus.ltr
+plot(cpus.ltr, type="u");  text(cpus.ltr)
+
+par(mfrow = c(1, 2), pty = "s")
+set.seed(321)
+plot(cv.tree(cpus.ltr, , prune.tree))
+cpus.ltr1 <- prune.tree(cpus.ltr, best = 10)
+plot(cpus.ltr1, type = "u")
+text(cpus.ltr1, digits = 3)
+par(mfrow = c(1, 1), pty = "m")
+
+fgl.tr <- tree(type ~ ., fgl)
+summary(fgl.tr)
+plot(fgl.tr)
+text(fgl.tr, all = TRUE, cex = 0.5)
+
+par(mfrow = c(1, 2), pty = "s")
+set.seed(123)
+fgl.cv <- cv.tree(fgl.tr,, prune.misclass)
+for(i in 2:5)  fgl.cv$dev <- fgl.cv$dev +
+    cv.tree(fgl.tr,, prune.misclass)$dev
+fgl.cv$dev <- fgl.cv$dev/5
+fgl.cv
+plot(fgl.cv)
+
+fgl.tr1 <- prune.misclass(fgl.tr, best = 9)
+plot(fgl.tr1, type = "u")
+text(fgl.tr1, all = TRUE)
+
+# End of ch09
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/help/MASS.rdx
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/help/MASS.rdx
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/help/AnIndex
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/help/AnIndex	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/help/AnIndex	(revision 2477)
@@ -0,0 +1,251 @@
+.rat	rational
+abbey	abbey
+accdeaths	accdeaths
+addterm	addterm
+addterm.default	addterm
+addterm.glm	addterm
+addterm.lm	addterm
+Aids2	Aids2
+Animals	Animals
+anorexia	anorexia
+anova.negbin	anova.negbin
+area	area
+as.character.fractions	fractions
+as.fractions	fractions
+bacteria	bacteria
+bandwidth.nrd	bandwidth.nrd
+bcv	bcv
+beav1	beav1
+beav2	beav2
+biopsy	biopsy
+birthwt	birthwt
+Boston	Boston
+boxcox	boxcox
+boxcox.default	boxcox
+boxcox.formula	boxcox
+boxcox.lm	boxcox
+cabbages	cabbages
+caith	caith
+Cars93	Cars93
+cats	cats
+cement	cement
+chem	chem
+coef.lda	lda
+con2tr	con2tr
+confint.glm	confint
+confint.nls	confint
+confint.profile.glm	confint
+confint.profile.nls	confint
+contr.sdif	contr.sdif
+coop	coop
+corresp	corresp
+corresp.data.frame	corresp
+corresp.default	corresp
+corresp.factor	corresp
+corresp.formula	corresp
+corresp.matrix	corresp
+corresp.xtabs	corresp
+cov.mcd	cov.rob
+cov.mve	cov.rob
+cov.rob	cov.rob
+cov.trob	cov.trob
+cpus	cpus
+crabs	crabs
+Cushings	Cushings
+DDT	DDT
+deaths	deaths
+denumerate	denumerate
+denumerate.formula	denumerate
+dose.p	dose.p
+drivers	drivers
+dropterm	dropterm
+dropterm.default	dropterm
+dropterm.glm	dropterm
+dropterm.lm	dropterm
+eagles	eagles
+enlist	MASS-internal
+epil	epil
+eqscplot	eqscplot
+extractAIC.gls	stepAIC
+extractAIC.lme	stepAIC
+family.negbin	glm.nb
+farms	farms
+fbeta	MASS-internal
+fgl	fgl
+fitdistr	fitdistr
+forbes	forbes
+fractions	fractions
+frequency.polygon	MASS-internal
+GAGurine	GAGurine
+galaxies	galaxies
+gamma.dispersion	gamma.dispersion
+gamma.shape	gamma.shape.glm
+gamma.shape.glm	gamma.shape.glm
+gehan	gehan
+genotype	genotype
+geyser	geyser
+gilgais	gilgais
+ginv	ginv
+glm.convert	glm.convert
+glm.nb	glm.nb
+glmmPQL	glmmPQL
+hills	hills
+hist.FD	hist.scott
+hist.scott	hist.scott
+housing	housing
+huber	huber
+hubers	hubers
+immer	immer
+Insurance	Insurance
+is.fractions	fractions
+isoMDS	isoMDS
+kde2d	kde2d
+lda	lda
+lda.data.frame	lda
+lda.default	lda
+lda.formula	lda
+lda.matrix	lda
+ldahist	ldahist
+leuk	leuk
+lm.gls	lm.gls
+lm.ridge	lm.ridge
+lmsreg	lqs
+lmwork	stdres
+logLik.negbin	glm.nb
+loglm	loglm
+loglm1	loglm1
+loglm1.data.frame	loglm1
+loglm1.default	loglm1
+loglm1.xtabs	loglm1
+logtrans	logtrans
+logtrans.default	logtrans
+logtrans.formula	logtrans
+logtrans.lm	logtrans
+lqs	lqs
+lqs.default	lqs
+lqs.formula	lqs
+ltsreg	lqs
+mammals	mammals
+Math.fractions	fractions
+mca	mca
+mcycle	mcycle
+Melanoma	Melanoma
+menarche	menarche
+michelson	michelson
+minn38	minn38
+model.frame.lda	lda
+model.frame.qda	qda
+motors	motors
+muscle	muscle
+mvrnorm	mvrnorm
+nclass.freq	MASS-internal
+neg.bin	MASS-internal
+negative.binomial	negative.binomial
+negexp.SSival	MASS-internal
+newcomb	newcomb
+nlschools	nlschools
+npk	npk
+npr1	npr1
+Null	Null
+oats	oats
+OME	OME
+Ops.fractions	fractions
+painters	painters
+pairs.lda	pairs.lda
+pairs.profile	plot.profile
+parcoord	parcoord
+petrol	petrol
+phones	phones
+Pima.te	Pima.tr
+Pima.tr	Pima.tr
+Pima.tr2	Pima.tr
+plot.lda	plot.lda
+plot.mca	plot.mca
+plot.profile	plot.profile
+plot.ridgelm	lm.ridge
+polr	polr
+predict.glmmPQL	predict.glmmPQL
+predict.lda	predict.lda
+predict.lqs	predict.lqs
+predict.mca	predict.mca
+predict.qda	predict.qda
+predict.rlm	rlm
+print.fractions	fractions
+print.gamma.shape	gamma.shape.glm
+print.glm.dose	dose.p
+print.lda	lda
+print.mca	mca
+print.qda	qda
+print.ridgelm	lm.ridge
+print.rlm	rlm
+print.rms.curv	rms.curv
+print.summary.loglm	summary.loglm
+print.summary.negbin	summary.negbin
+print.summary.rlm	summary.rlm
+profile.glm	profile.glm
+psi.bisquare	rlm
+psi.hampel	rlm
+psi.huber	rlm
+qda	qda
+qda.data.frame	qda
+qda.default	qda
+qda.formula	qda
+qda.matrix	qda
+quine	quine
+Rabbit	Rabbit
+rational	rational
+renumerate	renumerate
+renumerate.formula	renumerate
+rlm	rlm
+rlm.default	rlm
+rlm.formula	rlm
+rms.curv	rms.curv
+rnegbin	rnegbin
+road	road
+rotifer	rotifer
+Rubber	Rubber
+sammon	sammon
+select	lm.ridge
+select.ridgelm	lm.ridge
+Shepard	isoMDS
+ships	ships
+shoes	shoes
+shrimp	shrimp
+shuttle	shuttle
+Sitka	Sitka
+Sitka89	Sitka89
+Skye	Skye
+snails	snails
+SP500	SP500
+stdres	stdres
+steam	steam
+stepAIC	stepAIC
+stormer	stormer
+studres	studres
+Summary.fractions	fractions
+summary.loglm	summary.loglm
+summary.negbin	summary.negbin
+summary.rlm	summary.rlm
+survey	survey
+synth.te	synth.tr
+synth.tr	synth.tr
+t.fractions	fractions
+terms.gls	stepAIC
+terms.lme	stepAIC
+theta.md	theta.md
+theta.ml	theta.md
+theta.mm	theta.md
+topo	topo
+Traffic	Traffic
+truehist	truehist
+ucv	ucv
+UScereal	UScereal
+UScrime	UScrime
+VA	VA
+waders	waders
+whiteside	whiteside
+width.SJ	width.SJ
+write.matrix	write.matrix
+wtloss	wtloss
+[.fractions	fractions
+[<-.fractions	fractions
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/help/paths.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/help/paths.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/help/aliases.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/help/aliases.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/help/MASS.rdb
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/help/MASS.rdb
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/R/MASS.rdx
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/R/MASS.rdx
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/R/MASS
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/R/MASS	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/R/MASS	(revision 2477)
@@ -0,0 +1,27 @@
+#  File share/R/nspackloader.R
+#  Part of the R package, http://www.R-project.org
+#
+#  Copyright (C) 1995-2012 The R Core Team
+#
+#  This program is free software; you can redistribute it and/or modify
+#  it under the terms of the GNU General Public License as published by
+#  the Free Software Foundation; either version 2 of the License, or
+#  (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  A copy of the GNU General Public License is available at
+#  http://www.r-project.org/Licenses/
+
+local({
+    info <- loadingNamespaceInfo()
+    pkg <- info$pkgname
+    ns <- .getNamespace(as.name(pkg))
+    if (is.null(ns))
+        stop("cannot find namespace environment for ", pkg, domain = NA);
+    dbbase <- file.path(info$libname, pkg, "R", pkg)
+    lazyLoad(dbbase, ns, filter = function(n) n != ".__NAMESPACE__.")
+})
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/R/MASS.rdb
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/R/MASS.rdb
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/tests/Examples/MASS-Ex.Rout.save
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/tests/Examples/MASS-Ex.Rout.save	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/tests/Examples/MASS-Ex.Rout.save	(revision 2477)
@@ -0,0 +1,5174 @@
+
+R version 3.3.0 beta (2016-04-20 r70527) -- "Supposedly Educational"
+Copyright (C) 2016 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
+
+R is free software and comes with ABSOLUTELY NO WARRANTY.
+You are welcome to redistribute it under certain conditions.
+Type 'license()' or 'licence()' for distribution details.
+
+  Natural language support but running in an English locale
+
+R is a collaborative project with many contributors.
+Type 'contributors()' for more information and
+'citation()' on how to cite R or R packages in publications.
+
+Type 'demo()' for some demos, 'help()' for on-line help, or
+'help.start()' for an HTML browser interface to help.
+Type 'q()' to quit R.
+
+> pkgname <- "MASS"
+> source(file.path(R.home("share"), "R", "examples-header.R"))
+> options(warn = 1)
+> library('MASS')
+> 
+> base::assign(".oldSearch", base::search(), pos = 'CheckExEnv')
+> cleanEx()
+> nameEx("Insurance")
+> ### * Insurance
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: Insurance
+> ### Title: Numbers of Car Insurance claims
+> ### Aliases: Insurance
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> ## main-effects fit as Poisson GLM with offset
+> glm(Claims ~ District + Group + Age + offset(log(Holders)),
++     data = Insurance, family = poisson)
+
+Call:  glm(formula = Claims ~ District + Group + Age + offset(log(Holders)), 
+    family = poisson, data = Insurance)
+
+Coefficients:
+(Intercept)    District2    District3    District4      Group.L      Group.Q  
+  -1.810508     0.025868     0.038524     0.234205     0.429708     0.004632  
+    Group.C        Age.L        Age.Q        Age.C  
+  -0.029294    -0.394432    -0.000355    -0.016737  
+
+Degrees of Freedom: 63 Total (i.e. Null);  54 Residual
+Null Deviance:	    236.3 
+Residual Deviance: 51.42 	AIC: 388.7
+> 
+> # same via loglm
+> loglm(Claims ~ District + Group + Age + offset(log(Holders)),
++       data = Insurance)
+Call:
+loglm(formula = Claims ~ District + Group + Age + offset(log(Holders)), 
+    data = Insurance)
+
+Statistics:
+                      X^2 df  P(> X^2)
+Likelihood Ratio 51.42003 54 0.5745071
+Pearson          48.62933 54 0.6809086
+> 
+> 
+> 
+> cleanEx()
+> nameEx("Null")
+> ### * Null
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: Null
+> ### Title: Null Spaces of Matrices
+> ### Aliases: Null
+> ### Keywords: algebra
+> 
+> ### ** Examples
+> 
+> # The function is currently defined as
+> function(M)
++ {
++     tmp <- qr(M)
++     set <- if(tmp$rank == 0L) seq_len(ncol(M)) else  -seq_len(tmp$rank)
++     qr.Q(tmp, complete = TRUE)[, set, drop = FALSE]
++ }
+function (M) 
+{
+    tmp <- qr(M)
+    set <- if (tmp$rank == 0L) 
+        seq_len(ncol(M))
+    else -seq_len(tmp$rank)
+    qr.Q(tmp, complete = TRUE)[, set, drop = FALSE]
+}
+> 
+> 
+> 
+> cleanEx()
+> nameEx("OME")
+> ### * OME
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: OME
+> ### Title: Tests of Auditory Perception in Children with OME
+> ### Aliases: OME
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> # Fit logistic curve from p = 0.5 to p = 1.0
+> fp1 <- deriv(~ 0.5 + 0.5/(1 + exp(-(x-L75)/scal)),
++              c("L75", "scal"),
++              function(x,L75,scal)NULL)
+> nls(Correct/Trials ~ fp1(Loud, L75, scal), data = OME,
++     start = c(L75=45, scal=3))
+Nonlinear regression model
+  model: Correct/Trials ~ fp1(Loud, L75, scal)
+   data: OME
+   L75   scal 
+44.149  3.775 
+ residual sum-of-squares: 69.88
+
+Number of iterations to convergence: 4 
+Achieved convergence tolerance: 7.016e-06
+> nls(Correct/Trials ~ fp1(Loud, L75, scal),
++     data = OME[OME$Noise == "coherent",],
++     start=c(L75=45, scal=3))
+Nonlinear regression model
+  model: Correct/Trials ~ fp1(Loud, L75, scal)
+   data: OME[OME$Noise == "coherent", ]
+   L75   scal 
+47.993  1.259 
+ residual sum-of-squares: 30.35
+
+Number of iterations to convergence: 5 
+Achieved convergence tolerance: 4.895e-06
+> nls(Correct/Trials ~ fp1(Loud, L75, scal),
++     data = OME[OME$Noise == "incoherent",],
++     start = c(L75=45, scal=3))
+Nonlinear regression model
+  model: Correct/Trials ~ fp1(Loud, L75, scal)
+   data: OME[OME$Noise == "incoherent", ]
+  L75  scal 
+38.87  2.17 
+ residual sum-of-squares: 23.73
+
+Number of iterations to convergence: 11 
+Achieved convergence tolerance: 3.846e-06
+> 
+> # individual fits for each experiment
+> 
+> aa <- factor(OME$Age)
+> ab <- 10*OME$ID + unclass(aa)
+> ac <- unclass(factor(ab))
+> OME$UID <- as.vector(ac)
+> OME$UIDn <- OME$UID + 0.1*(OME$Noise == "incoherent")
+> rm(aa, ab, ac)
+> OMEi <- OME
+> 
+> library(nlme)
+> fp2 <- deriv(~ 0.5 + 0.5/(1 + exp(-(x-L75)/2)),
++             "L75", function(x,L75) NULL)
+> dec <- getOption("OutDec")
+> options(show.error.messages = FALSE, OutDec=".")
+> OMEi.nls <- nlsList(Correct/Trials ~ fp2(Loud, L75) | UIDn,
++    data = OMEi, start = list(L75=45), control = list(maxiter=100))
+> options(show.error.messages = TRUE, OutDec=dec)
+> tmp <- sapply(OMEi.nls, function(X)
++               {if(is.null(X)) NA else as.vector(coef(X))})
+> OMEif <- data.frame(UID = round(as.numeric((names(tmp)))),
++          Noise = rep(c("coherent", "incoherent"), 110),
++          L75 = as.vector(tmp), stringsAsFactors = TRUE)
+> OMEif$Age <- OME$Age[match(OMEif$UID, OME$UID)]
+> OMEif$OME <- OME$OME[match(OMEif$UID, OME$UID)]
+> OMEif <- OMEif[OMEif$L75 > 30,]
+> summary(lm(L75 ~ Noise/Age, data = OMEif, na.action = na.omit))
+
+Call:
+lm(formula = L75 ~ Noise/Age, data = OMEif, na.action = na.omit)
+
+Residuals:
+     Min       1Q   Median       3Q      Max 
+-13.0022  -1.9878   0.3346   2.0229  16.3260 
+
+Coefficients:
+                    Estimate Std. Error t value Pr(>|t|)    
+(Intercept)         47.73580    0.76456  62.435  < 2e-16 ***
+Noiseincoherent     -4.87352    1.11247  -4.381 1.92e-05 ***
+Noisecoherent:Age   -0.02785    0.02349  -1.186    0.237    
+Noiseincoherent:Age -0.12219    0.02589  -4.719 4.50e-06 ***
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Residual standard error: 3.774 on 196 degrees of freedom
+  (17 observations deleted due to missingness)
+Multiple R-squared:  0.5246,	Adjusted R-squared:  0.5173 
+F-statistic: 72.09 on 3 and 196 DF,  p-value: < 2.2e-16
+
+> summary(lm(L75 ~ Noise/(Age + OME), data = OMEif,
++            subset = (Age >= 30 & Age <= 60),
++            na.action = na.omit), cor = FALSE)
+
+Call:
+lm(formula = L75 ~ Noise/(Age + OME), data = OMEif, subset = (Age >= 
+    30 & Age <= 60), na.action = na.omit)
+
+Residuals:
+     Min       1Q   Median       3Q      Max 
+-10.4514  -2.0588   0.0194   1.6827  15.9738 
+
+Coefficients:
+                       Estimate Std. Error t value Pr(>|t|)    
+(Intercept)            50.21090    1.74482  28.777  < 2e-16 ***
+Noiseincoherent        -5.97491    2.70148  -2.212  0.02890 *  
+Noisecoherent:Age      -0.09358    0.03586  -2.609  0.01023 *  
+Noiseincoherent:Age    -0.15155    0.04151  -3.651  0.00039 ***
+Noisecoherent:OMElow    0.45103    1.07594   0.419  0.67583    
+Noiseincoherent:OMElow -0.14075    1.24537  -0.113  0.91021    
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Residual standard error: 3.7 on 119 degrees of freedom
+  (17 observations deleted due to missingness)
+Multiple R-squared:  0.6073,	Adjusted R-squared:  0.5908 
+F-statistic: 36.81 on 5 and 119 DF,  p-value: < 2.2e-16
+
+> 
+> # Or fit by weighted least squares
+> fpl75 <- deriv(~ sqrt(n)*(r/n - 0.5 - 0.5/(1 + exp(-(x-L75)/scal))),
++                c("L75", "scal"),
++                function(r,n,x,L75,scal) NULL)
+> nls(0 ~ fpl75(Correct, Trials, Loud, L75, scal),
++     data = OME[OME$Noise == "coherent",],
++     start = c(L75=45, scal=3))
+Nonlinear regression model
+  model: 0 ~ fpl75(Correct, Trials, Loud, L75, scal)
+   data: OME[OME$Noise == "coherent", ]
+   L75   scal 
+47.798  1.296 
+ residual sum-of-squares: 91.72
+
+Number of iterations to convergence: 5 
+Achieved convergence tolerance: 9.302e-06
+> nls(0 ~ fpl75(Correct, Trials, Loud, L75, scal),
++     data = OME[OME$Noise == "incoherent",],
++     start = c(L75=45, scal=3))
+Nonlinear regression model
+  model: 0 ~ fpl75(Correct, Trials, Loud, L75, scal)
+   data: OME[OME$Noise == "incoherent", ]
+   L75   scal 
+38.553  2.078 
+ residual sum-of-squares: 60.19
+
+Number of iterations to convergence: 8 
+Achieved convergence tolerance: 4.55e-06
+> 
+> # Test to see if the curves shift with age
+> fpl75age <- deriv(~sqrt(n)*(r/n -  0.5 - 0.5/(1 +
++                   exp(-(x-L75-slope*age)/scal))),
++                   c("L75", "slope", "scal"),
++                   function(r,n,x,age,L75,slope,scal) NULL)
+> OME.nls1 <-
++ nls(0 ~ fpl75age(Correct, Trials, Loud, Age, L75, slope, scal),
++     data = OME[OME$Noise == "coherent",],
++     start = c(L75=45, slope=0, scal=2))
+> sqrt(diag(vcov(OME.nls1)))
+       L75      slope       scal 
+0.61091761 0.01665916 0.17566450 
+> 
+> OME.nls2 <-
++ nls(0 ~ fpl75age(Correct, Trials, Loud, Age, L75, slope, scal),
++     data = OME[OME$Noise == "incoherent",],
++     start = c(L75=45, slope=0, scal=2))
+> sqrt(diag(vcov(OME.nls2)))
+       L75      slope       scal 
+0.49553854 0.01348281 0.24453836 
+> 
+> # Now allow random effects by using NLME
+> OMEf <- OME[rep(1:nrow(OME), OME$Trials),]
+> OMEf$Resp <- with(OME, rep(rep(c(1,0), length(Trials)),
++                           t(cbind(Correct, Trials-Correct))))
+> OMEf <- OMEf[, -match(c("Correct", "Trials"), names(OMEf))]
+> 
+> ## Not run: 
+> ##D ## these fail in R on most platforms
+> ##D fp2 <- deriv(~ 0.5 + 0.5/(1 + exp(-(x-L75)/exp(lsc))),
+> ##D              c("L75", "lsc"),
+> ##D              function(x, L75, lsc) NULL)
+> ##D try(summary(nlme(Resp ~ fp2(Loud, L75, lsc),
+> ##D      fixed = list(L75 ~ Age, lsc ~ 1),
+> ##D      random = L75 + lsc ~ 1 | UID,
+> ##D      data = OMEf[OMEf$Noise == "coherent",], method = "ML",
+> ##D      start = list(fixed=c(L75=c(48.7, -0.03), lsc=0.24)), verbose = TRUE)))
+> ##D 
+> ##D try(summary(nlme(Resp ~ fp2(Loud, L75, lsc),
+> ##D      fixed = list(L75 ~ Age, lsc ~ 1),
+> ##D      random = L75 + lsc ~ 1 | UID,
+> ##D      data = OMEf[OMEf$Noise == "incoherent",], method = "ML",
+> ##D      start = list(fixed=c(L75=c(41.5, -0.1), lsc=0)), verbose = TRUE)))
+> ## End(Not run)
+> 
+> 
+> cleanEx()
+
+detaching ‘package:nlme’
+
+> nameEx("Skye")
+> ### * Skye
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: Skye
+> ### Title: AFM Compositions of Aphyric Skye Lavas
+> ### Aliases: Skye
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> # ternary() is from the on-line answers.
+> ternary <- function(X, pch = par("pch"), lcex = 1,
++                     add = FALSE, ord = 1:3, ...)
++ {
++   X <- as.matrix(X)
++   if(any(X < 0)) stop("X must be non-negative")
++   s <- drop(X %*% rep(1, ncol(X)))
++   if(any(s<=0)) stop("each row of X must have a positive sum")
++   if(max(abs(s-1)) > 1e-6) {
++     warning("row(s) of X will be rescaled")
++     X <- X / s
++   }
++   X <- X[, ord]
++   s3 <- sqrt(1/3)
++   if(!add)
++   {
++     oldpty <- par("pty")
++     on.exit(par(pty=oldpty))
++     par(pty="s")
++     plot(c(-s3, s3), c(0.5-s3, 0.5+s3), type="n", axes=FALSE,
++          xlab="", ylab="")
++     polygon(c(0, -s3, s3), c(1, 0, 0), density=0)
++     lab <- NULL
++     if(!is.null(dn <- dimnames(X))) lab <- dn[[2]]
++     if(length(lab) < 3) lab <- as.character(1:3)
++     eps <- 0.05 * lcex
++     text(c(0, s3+eps*0.7, -s3-eps*0.7),
++          c(1+eps, -0.1*eps, -0.1*eps), lab, cex=lcex)
++   }
++   points((X[,2] - X[,3])*s3, X[,1], ...)
++ }
+> 
+> ternary(Skye/100, ord=c(1,3,2))
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("addterm")
+> ### * addterm
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: addterm
+> ### Title: Try All One-Term Additions to a Model
+> ### Aliases: addterm addterm.default addterm.glm addterm.lm
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> quine.hi <- aov(log(Days + 2.5) ~ .^4, quine)
+> quine.lo <- aov(log(Days+2.5) ~ 1, quine)
+> addterm(quine.lo, quine.hi, test="F")
+Single term additions
+
+Model:
+log(Days + 2.5) ~ 1
+       Df Sum of Sq     RSS     AIC F Value     Pr(F)    
+<none>              106.787 -43.664                      
+Eth     1   10.6820  96.105 -57.052 16.0055 0.0001006 ***
+Sex     1    0.5969 106.190 -42.483  0.8094 0.3698057    
+Age     3    4.7469 102.040 -44.303  2.2019 0.0904804 .  
+Lrn     1    0.0043 106.783 -41.670  0.0058 0.9392083    
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> 
+> house.glm0 <- glm(Freq ~ Infl*Type*Cont + Sat, family=poisson,
++                    data=housing)
+> addterm(house.glm0, ~. + Sat:(Infl+Type+Cont), test="Chisq")
+Single term additions
+
+Model:
+Freq ~ Infl * Type * Cont + Sat
+         Df Deviance    AIC     LRT   Pr(Chi)    
+<none>        217.46 610.43                      
+Infl:Sat  4   111.08 512.05 106.371 < 2.2e-16 ***
+Type:Sat  6   156.79 561.76  60.669 3.292e-11 ***
+Cont:Sat  2   212.33 609.30   5.126   0.07708 .  
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> house.glm1 <- update(house.glm0, . ~ . + Sat*(Infl+Type+Cont))
+> addterm(house.glm1, ~. + Sat:(Infl+Type+Cont)^2, test = "Chisq")
+Single term additions
+
+Model:
+Freq ~ Infl + Type + Cont + Sat + Infl:Type + Infl:Cont + Type:Cont + 
+    Infl:Sat + Type:Sat + Cont:Sat + Infl:Type:Cont
+              Df Deviance    AIC     LRT Pr(Chi)  
+<none>             38.662 455.63                  
+Infl:Type:Sat 12   16.107 457.08 22.5550 0.03175 *
+Infl:Cont:Sat  4   37.472 462.44  1.1901 0.87973  
+Type:Cont:Sat  6   28.256 457.23 10.4064 0.10855  
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> 
+> 
+> 
+> cleanEx()
+> nameEx("anova.negbin")
+> ### * anova.negbin
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: anova.negbin
+> ### Title: Likelihood Ratio Tests for Negative Binomial GLMs
+> ### Aliases: anova.negbin
+> ### Keywords: regression
+> 
+> ### ** Examples
+> 
+> m1 <- glm.nb(Days ~ Eth*Age*Lrn*Sex, quine, link = log)
+> m2 <- update(m1, . ~ . - Eth:Age:Lrn:Sex)
+> anova(m2, m1)
+Likelihood ratio tests of Negative Binomial Models
+
+Response: Days
+                                                                                                                                      Model
+1 Eth + Age + Lrn + Sex + Eth:Age + Eth:Lrn + Age:Lrn + Eth:Sex + Age:Sex + Lrn:Sex + Eth:Age:Lrn + Eth:Age:Sex + Eth:Lrn:Sex + Age:Lrn:Sex
+2                                                                                                                     Eth * Age * Lrn * Sex
+    theta Resid. df    2 x log-lik.   Test    df LR stat.   Pr(Chi)
+1 1.90799       120       -1040.728                                
+2 1.92836       118       -1039.324 1 vs 2     2 1.403843 0.4956319
+> anova(m2)
+Warning in anova.negbin(m2) : tests made without re-estimating 'theta'
+Analysis of Deviance Table
+
+Model: Negative Binomial(1.908), link: log
+
+Response: Days
+
+Terms added sequentially (first to last)
+
+
+            Df Deviance Resid. Df Resid. Dev  Pr(>Chi)    
+NULL                          145     270.03              
+Eth          1  19.0989       144     250.93 1.241e-05 ***
+Age          3  16.3483       141     234.58  0.000962 ***
+Lrn          1   3.5449       140     231.04  0.059730 .  
+Sex          1   0.3989       139     230.64  0.527666    
+Eth:Age      3  14.6030       136     216.03  0.002189 ** 
+Eth:Lrn      1   0.0447       135     215.99  0.832601    
+Age:Lrn      2   1.7482       133     214.24  0.417240    
+Eth:Sex      1   1.1470       132     213.09  0.284183    
+Age:Sex      3  21.9746       129     191.12 6.603e-05 ***
+Lrn:Sex      1   0.0277       128     191.09  0.867712    
+Eth:Age:Lrn  2   9.0099       126     182.08  0.011054 *  
+Eth:Age:Sex  3   4.8218       123     177.26  0.185319    
+Eth:Lrn:Sex  1   3.3160       122     173.94  0.068608 .  
+Age:Lrn:Sex  2   6.3941       120     167.55  0.040882 *  
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> 
+> 
+> 
+> cleanEx()
+> nameEx("area")
+> ### * area
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: area
+> ### Title: Adaptive Numerical Integration
+> ### Aliases: area
+> ### Keywords: nonlinear
+> 
+> ### ** Examples
+> 
+> area(sin, 0, pi)  # integrate the sin function from 0 to pi.
+[1] 2
+> 
+> 
+> 
+> cleanEx()
+> nameEx("bacteria")
+> ### * bacteria
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: bacteria
+> ### Title: Presence of Bacteria after Drug Treatments
+> ### Aliases: bacteria
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> contrasts(bacteria$trt) <- structure(contr.sdif(3),
++      dimnames = list(NULL, c("drug", "encourage")))
+> ## fixed effects analyses
+> summary(glm(y ~ trt * week, binomial, data = bacteria))
+
+Call:
+glm(formula = y ~ trt * week, family = binomial, data = bacteria)
+
+Deviance Residuals: 
+    Min       1Q   Median       3Q      Max  
+-2.2144   0.4245   0.5373   0.6750   1.0697  
+
+Coefficients:
+                  Estimate Std. Error z value Pr(>|z|)    
+(Intercept)        1.97548    0.30053   6.573 4.92e-11 ***
+trtdrug           -0.99848    0.69490  -1.437  0.15075    
+trtencourage       0.83865    0.73482   1.141  0.25374    
+week              -0.11814    0.04460  -2.649  0.00807 ** 
+trtdrug:week      -0.01722    0.10570  -0.163  0.87061    
+trtencourage:week -0.07043    0.10964  -0.642  0.52060    
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+(Dispersion parameter for binomial family taken to be 1)
+
+    Null deviance: 217.38  on 219  degrees of freedom
+Residual deviance: 203.12  on 214  degrees of freedom
+AIC: 215.12
+
+Number of Fisher Scoring iterations: 4
+
+> summary(glm(y ~ trt + week, binomial, data = bacteria))
+
+Call:
+glm(formula = y ~ trt + week, family = binomial, data = bacteria)
+
+Deviance Residuals: 
+    Min       1Q   Median       3Q      Max  
+-2.2899   0.3885   0.5400   0.7027   1.1077  
+
+Coefficients:
+             Estimate Std. Error z value Pr(>|z|)    
+(Intercept)   1.96018    0.29705   6.599 4.15e-11 ***
+trtdrug      -1.10667    0.42519  -2.603  0.00925 ** 
+trtencourage  0.45502    0.42766   1.064  0.28735    
+week         -0.11577    0.04414  -2.623  0.00872 ** 
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+(Dispersion parameter for binomial family taken to be 1)
+
+    Null deviance: 217.38  on 219  degrees of freedom
+Residual deviance: 203.81  on 216  degrees of freedom
+AIC: 211.81
+
+Number of Fisher Scoring iterations: 4
+
+> summary(glm(y ~ trt + I(week > 2), binomial, data = bacteria))
+
+Call:
+glm(formula = y ~ trt + I(week > 2), family = binomial, data = bacteria)
+
+Deviance Residuals: 
+    Min       1Q   Median       3Q      Max  
+-2.4043   0.3381   0.5754   0.6237   1.0051  
+
+Coefficients:
+                Estimate Std. Error z value Pr(>|z|)    
+(Intercept)       2.2479     0.3560   6.315 2.71e-10 ***
+trtdrug          -1.1187     0.4288  -2.609  0.00909 ** 
+trtencourage      0.4815     0.4330   1.112  0.26614    
+I(week > 2)TRUE  -1.2949     0.4104  -3.155  0.00160 ** 
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+(Dispersion parameter for binomial family taken to be 1)
+
+    Null deviance: 217.38  on 219  degrees of freedom
+Residual deviance: 199.18  on 216  degrees of freedom
+AIC: 207.18
+
+Number of Fisher Scoring iterations: 5
+
+> 
+> # conditional random-effects analysis
+> library(survival)
+> bacteria$Time <- rep(1, nrow(bacteria))
+> coxph(Surv(Time, unclass(y)) ~ week + strata(ID),
++       data = bacteria, method = "exact")
+Call:
+coxph(formula = Surv(Time, unclass(y)) ~ week + strata(ID), data = bacteria, 
+    method = "exact")
+
+        coef exp(coef) se(coef)     z     p
+week -0.1626    0.8500   0.0547 -2.97 0.003
+
+Likelihood ratio test=9.85  on 1 df, p=0.0017
+n= 220, number of events= 177 
+> coxph(Surv(Time, unclass(y)) ~ factor(week) + strata(ID),
++       data = bacteria, method = "exact")
+Call:
+coxph(formula = Surv(Time, unclass(y)) ~ factor(week) + strata(ID), 
+    data = bacteria, method = "exact")
+
+                 coef exp(coef) se(coef)     z     p
+factor(week)2   0.198     1.219    0.724  0.27 0.784
+factor(week)4  -1.421     0.242    0.667 -2.13 0.033
+factor(week)6  -1.661     0.190    0.682 -2.43 0.015
+factor(week)11 -1.675     0.187    0.678 -2.47 0.013
+
+Likelihood ratio test=15.4  on 4 df, p=0.00385
+n= 220, number of events= 177 
+> coxph(Surv(Time, unclass(y)) ~ I(week > 2) + strata(ID),
++       data = bacteria, method = "exact")
+Call:
+coxph(formula = Surv(Time, unclass(y)) ~ I(week > 2) + strata(ID), 
+    data = bacteria, method = "exact")
+
+                  coef exp(coef) se(coef)     z       p
+I(week > 2)TRUE -1.670     0.188    0.482 -3.47 0.00053
+
+Likelihood ratio test=15.2  on 1 df, p=9.93e-05
+n= 220, number of events= 177 
+> 
+> # PQL glmm analysis
+> library(nlme)
+> summary(glmmPQL(y ~ trt + I(week > 2), random = ~ 1 | ID,
++                 family = binomial, data = bacteria))
+iteration 1
+iteration 2
+iteration 3
+iteration 4
+iteration 5
+iteration 6
+Linear mixed-effects model fit by maximum likelihood
+ Data: bacteria 
+  AIC BIC logLik
+   NA  NA     NA
+
+Random effects:
+ Formula: ~1 | ID
+        (Intercept)  Residual
+StdDev:    1.410637 0.7800511
+
+Variance function:
+ Structure: fixed weights
+ Formula: ~invwt 
+Fixed effects: y ~ trt + I(week > 2) 
+                     Value Std.Error  DF   t-value p-value
+(Intercept)      2.7447864 0.3784193 169  7.253294  0.0000
+trtdrug         -1.2473553 0.6440635  47 -1.936696  0.0588
+trtencourage     0.4930279 0.6699339  47  0.735935  0.4654
+I(week > 2)TRUE -1.6072570 0.3583379 169 -4.485311  0.0000
+ Correlation: 
+                (Intr) trtdrg trtncr
+trtdrug          0.009              
+trtencourage     0.036 -0.518       
+I(week > 2)TRUE -0.710  0.047 -0.046
+
+Standardized Within-Group Residuals:
+       Min         Q1        Med         Q3        Max 
+-5.1985361  0.1572336  0.3513075  0.4949482  1.7448845 
+
+Number of Observations: 220
+Number of Groups: 50 
+> 
+> 
+> 
+> cleanEx()
+
+detaching ‘package:nlme’, ‘package:survival’
+
+> nameEx("bandwidth.nrd")
+> ### * bandwidth.nrd
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: bandwidth.nrd
+> ### Title: Bandwidth for density() via Normal Reference Distribution
+> ### Aliases: bandwidth.nrd
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> # The function is currently defined as
+> function(x)
++ {
++     r <- quantile(x, c(0.25, 0.75))
++     h <- (r[2] - r[1])/1.34
++     4 * 1.06 * min(sqrt(var(x)), h) * length(x)^(-1/5)
++ }
+function (x) 
+{
+    r <- quantile(x, c(0.25, 0.75))
+    h <- (r[2] - r[1])/1.34
+    4 * 1.06 * min(sqrt(var(x)), h) * length(x)^(-1/5)
+}
+> 
+> 
+> 
+> cleanEx()
+> nameEx("bcv")
+> ### * bcv
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: bcv
+> ### Title: Biased Cross-Validation for Bandwidth Selection
+> ### Aliases: bcv
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> bcv(geyser$duration)
+[1] 0.8940809
+> 
+> 
+> 
+> cleanEx()
+> nameEx("beav1")
+> ### * beav1
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: beav1
+> ### Title: Body Temperature Series of Beaver 1
+> ### Aliases: beav1
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> beav1 <- within(beav1,
++                hours <- 24*(day-346) + trunc(time/100) + (time%%100)/60)
+> plot(beav1$hours, beav1$temp, type="l", xlab="time",
++    ylab="temperature", main="Beaver 1")
+> usr <- par("usr"); usr[3:4] <- c(-0.2, 8); par(usr=usr)
+> lines(beav1$hours, beav1$activ, type="s", lty=2)
+> temp <- ts(c(beav1$temp[1:82], NA, beav1$temp[83:114]),
++            start = 9.5, frequency = 6)
+> activ <- ts(c(beav1$activ[1:82], NA, beav1$activ[83:114]),
++             start = 9.5, frequency = 6)
+> 
+> acf(temp[1:53])
+> acf(temp[1:53], type = "partial")
+> ar(temp[1:53])
+
+Call:
+ar(x = temp[1:53])
+
+Coefficients:
+     1  
+0.8222  
+
+Order selected 1  sigma^2 estimated as  0.01011
+> act <- c(rep(0, 10), activ)
+> X <- cbind(1, act = act[11:125], act1 = act[10:124],
++           act2 = act[9:123], act3 = act[8:122])
+> alpha <- 0.80
+> stemp <- as.vector(temp - alpha*lag(temp, -1))
+> sX <- X[-1, ] - alpha * X[-115,]
+> beav1.ls <- lm(stemp ~ -1 + sX, na.action = na.omit)
+> summary(beav1.ls, cor = FALSE)
+
+Call:
+lm(formula = stemp ~ -1 + sX, na.action = na.omit)
+
+Residuals:
+     Min       1Q   Median       3Q      Max 
+-0.21317 -0.04317  0.00683  0.05483  0.37683 
+
+Coefficients:
+       Estimate Std. Error t value Pr(>|t|)    
+sX     36.85587    0.03922 939.833  < 2e-16 ***
+sXact   0.25400    0.03930   6.464 3.37e-09 ***
+sXact1  0.17096    0.05100   3.352  0.00112 ** 
+sXact2  0.16202    0.05147   3.148  0.00215 ** 
+sXact3  0.10548    0.04310   2.448  0.01605 *  
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Residual standard error: 0.08096 on 104 degrees of freedom
+  (5 observations deleted due to missingness)
+Multiple R-squared:  0.9999,	Adjusted R-squared:  0.9999 
+F-statistic: 1.81e+05 on 5 and 104 DF,  p-value: < 2.2e-16
+
+> rm(temp, activ)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("beav2")
+> ### * beav2
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: beav2
+> ### Title: Body Temperature Series of Beaver 2
+> ### Aliases: beav2
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> attach(beav2)
+> beav2$hours <- 24*(day-307) + trunc(time/100) + (time%%100)/60
+> plot(beav2$hours, beav2$temp, type = "l", xlab = "time",
++    ylab = "temperature", main = "Beaver 2")
+> usr <- par("usr"); usr[3:4] <- c(-0.2, 8); par(usr = usr)
+> lines(beav2$hours, beav2$activ, type = "s", lty = 2)
+> 
+> temp <- ts(temp, start = 8+2/3, frequency = 6)
+> activ <- ts(activ, start = 8+2/3, frequency = 6)
+> acf(temp[activ == 0]); acf(temp[activ == 1]) # also look at PACFs
+> ar(temp[activ == 0]); ar(temp[activ == 1])
+
+Call:
+ar(x = temp[activ == 0])
+
+Coefficients:
+     1  
+0.7392  
+
+Order selected 1  sigma^2 estimated as  0.02011
+
+Call:
+ar(x = temp[activ == 1])
+
+Coefficients:
+     1  
+0.7894  
+
+Order selected 1  sigma^2 estimated as  0.01792
+> 
+> arima(temp, order = c(1,0,0), xreg = activ)
+
+Call:
+arima(x = temp, order = c(1, 0, 0), xreg = activ)
+
+Coefficients:
+         ar1  intercept   activ
+      0.8733    37.1920  0.6139
+s.e.  0.0684     0.1187  0.1381
+
+sigma^2 estimated as 0.01518:  log likelihood = 66.78,  aic = -125.55
+> dreg <- cbind(sin = sin(2*pi*beav2$hours/24), cos = cos(2*pi*beav2$hours/24))
+> arima(temp, order = c(1,0,0), xreg = cbind(active=activ, dreg))
+
+Call:
+arima(x = temp, order = c(1, 0, 0), xreg = cbind(active = activ, dreg))
+
+Coefficients:
+         ar1  intercept  active  dreg.sin  dreg.cos
+      0.7905    37.1674  0.5322    -0.282    0.1201
+s.e.  0.0681     0.0939  0.1282     0.105    0.0997
+
+sigma^2 estimated as 0.01434:  log likelihood = 69.83,  aic = -127.67
+> 
+> library(nlme) # for gls and corAR1
+> beav2.gls <- gls(temp ~ activ, data = beav2, corr = corAR1(0.8),
++                  method = "ML")
+> summary(beav2.gls)
+Generalized least squares fit by maximum likelihood
+  Model: temp ~ activ 
+  Data: beav2 
+        AIC       BIC   logLik
+  -125.5505 -115.1298 66.77523
+
+Correlation Structure: AR(1)
+ Formula: ~1 
+ Parameter estimate(s):
+      Phi 
+0.8731771 
+
+Coefficients:
+               Value Std.Error  t-value p-value
+(Intercept) 37.19195 0.1131328 328.7460       0
+activ        0.61418 0.1087286   5.6487       0
+
+ Correlation: 
+      (Intr)
+activ -0.582
+
+Standardized residuals:
+        Min          Q1         Med          Q3         Max 
+-2.42080780 -0.61510520 -0.03573836  0.81641138  2.15153499 
+
+Residual standard error: 0.2527856 
+Degrees of freedom: 100 total; 98 residual
+> summary(update(beav2.gls, subset = 6:100))
+Generalized least squares fit by maximum likelihood
+  Model: temp ~ activ 
+  Data: beav2 
+  Subset: 6:100 
+       AIC       BIC   logLik
+  -124.981 -114.7654 66.49048
+
+Correlation Structure: AR(1)
+ Formula: ~1 
+ Parameter estimate(s):
+      Phi 
+0.8380448 
+
+Coefficients:
+               Value  Std.Error  t-value p-value
+(Intercept) 37.25001 0.09634047 386.6496       0
+activ        0.60277 0.09931904   6.0690       0
+
+ Correlation: 
+      (Intr)
+activ -0.657
+
+Standardized residuals:
+       Min         Q1        Med         Q3        Max 
+-2.0231494 -0.8910348 -0.1497564  0.7640939  2.2719468 
+
+Residual standard error: 0.2188542 
+Degrees of freedom: 95 total; 93 residual
+> detach("beav2"); rm(temp, activ)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+
+detaching ‘package:nlme’
+
+> nameEx("birthwt")
+> ### * birthwt
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: birthwt
+> ### Title: Risk Factors Associated with Low Infant Birth Weight
+> ### Aliases: birthwt
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> bwt <- with(birthwt, {
++ race <- factor(race, labels = c("white", "black", "other"))
++ ptd <- factor(ptl > 0)
++ ftv <- factor(ftv)
++ levels(ftv)[-(1:2)] <- "2+"
++ data.frame(low = factor(low), age, lwt, race, smoke = (smoke > 0),
++            ptd, ht = (ht > 0), ui = (ui > 0), ftv)
++ })
+> options(contrasts = c("contr.treatment", "contr.poly"))
+> glm(low ~ ., binomial, bwt)
+
+Call:  glm(formula = low ~ ., family = binomial, data = bwt)
+
+Coefficients:
+(Intercept)          age          lwt    raceblack    raceother    smokeTRUE  
+    0.82302     -0.03723     -0.01565      1.19241      0.74068      0.75553  
+    ptdTRUE       htTRUE       uiTRUE         ftv1        ftv2+  
+    1.34376      1.91317      0.68020     -0.43638      0.17901  
+
+Degrees of Freedom: 188 Total (i.e. Null);  178 Residual
+Null Deviance:	    234.7 
+Residual Deviance: 195.5 	AIC: 217.5
+> 
+> 
+> 
+> base::options(contrasts = c(unordered = "contr.treatment",ordered = "contr.poly"))
+> cleanEx()
+> nameEx("boxcox")
+> ### * boxcox
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: boxcox
+> ### Title: Box-Cox Transformations for Linear Models
+> ### Aliases: boxcox boxcox.default boxcox.formula boxcox.lm
+> ### Keywords: regression models hplot
+> 
+> ### ** Examples
+> 
+> boxcox(Volume ~ log(Height) + log(Girth), data = trees,
++        lambda = seq(-0.25, 0.25, length = 10))
+> 
+> boxcox(Days+1 ~ Eth*Sex*Age*Lrn, data = quine,
++        lambda = seq(-0.05, 0.45, len = 20))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("caith")
+> ### * caith
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: caith
+> ### Title: Colours of Eyes and Hair of People in Caithness
+> ### Aliases: caith
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> corresp(caith)
+First canonical correlation(s): 0.4463684 
+
+ Row scores:
+       blue       light      medium        dark 
+-0.89679252 -0.98731818  0.07530627  1.57434710 
+
+ Column scores:
+       fair         red      medium        dark       black 
+-1.21871379 -0.52257500 -0.09414671  1.31888486  2.45176017 
+> dimnames(caith)[[2]] <- c("F", "R", "M", "D", "B")
+> par(mfcol=c(1,3))
+> plot(corresp(caith, nf=2)); title("symmetric")
+> plot(corresp(caith, nf=2), type="rows"); title("rows")
+> plot(corresp(caith, nf=2), type="col"); title("columns")
+> par(mfrow=c(1,1))
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("cement")
+> ### * cement
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: cement
+> ### Title: Heat Evolved by Setting Cements
+> ### Aliases: cement
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> lm(y ~ x1 + x2 + x3 + x4, cement)
+
+Call:
+lm(formula = y ~ x1 + x2 + x3 + x4, data = cement)
+
+Coefficients:
+(Intercept)           x1           x2           x3           x4  
+    62.4054       1.5511       0.5102       0.1019      -0.1441  
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("confint")
+> ### * confint
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: confint-MASS
+> ### Title: Confidence Intervals for Model Parameters
+> ### Aliases: confint.glm confint.nls confint.profile.glm
+> ###   confint.profile.nls
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> expn1 <- deriv(y ~ b0 + b1 * 2^(-x/th), c("b0", "b1", "th"),
++                function(b0, b1, th, x) {})
+> 
+> wtloss.gr <- nls(Weight ~ expn1(b0, b1, th, Days),
++    data = wtloss, start = c(b0=90, b1=95, th=120))
+> 
+> expn2 <- deriv(~b0 + b1*((w0 - b0)/b1)^(x/d0),
++          c("b0","b1","d0"), function(b0, b1, d0, x, w0) {})
+> 
+> wtloss.init <- function(obj, w0) {
++   p <- coef(obj)
++   d0 <-  - log((w0 - p["b0"])/p["b1"])/log(2) * p["th"]
++   c(p[c("b0", "b1")], d0 = as.vector(d0))
++ }
+> 
+> out <- NULL
+> w0s <- c(110, 100, 90)
+> for(w0 in w0s) {
++     fm <- nls(Weight ~ expn2(b0, b1, d0, Days, w0),
++               wtloss, start = wtloss.init(wtloss.gr, w0))
++     out <- rbind(out, c(coef(fm)["d0"], confint(fm, "d0")))
++   }
+Waiting for profiling to be done...
+Waiting for profiling to be done...
+Waiting for profiling to be done...
+> dimnames(out) <- list(paste(w0s, "kg:"),  c("d0", "low", "high"))
+> out
+              d0      low     high
+110 kg: 261.5132 256.2303 267.5009
+100 kg: 349.4979 334.7293 368.0151
+90 kg:  507.0941 457.2637 594.8745
+> 
+> ldose <- rep(0:5, 2)
+> numdead <- c(1, 4, 9, 13, 18, 20, 0, 2, 6, 10, 12, 16)
+> sex <- factor(rep(c("M", "F"), c(6, 6)))
+> SF <- cbind(numdead, numalive = 20 - numdead)
+> budworm.lg0 <- glm(SF ~ sex + ldose - 1, family = binomial)
+> confint(budworm.lg0)
+Waiting for profiling to be done...
+           2.5 %    97.5 %
+sexF  -4.4581438 -2.613610
+sexM  -3.1728745 -1.655117
+ldose  0.8228708  1.339058
+> confint(budworm.lg0, "ldose")
+Waiting for profiling to be done...
+    2.5 %    97.5 % 
+0.8228708 1.3390581 
+> 
+> 
+> 
+> cleanEx()
+> nameEx("contr.sdif")
+> ### * contr.sdif
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: contr.sdif
+> ### Title: Successive Differences Contrast Coding
+> ### Aliases: contr.sdif
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> (A <- contr.sdif(6))
+         2-1        3-2  4-3        5-4        6-5
+1 -0.8333333 -0.6666667 -0.5 -0.3333333 -0.1666667
+2  0.1666667 -0.6666667 -0.5 -0.3333333 -0.1666667
+3  0.1666667  0.3333333 -0.5 -0.3333333 -0.1666667
+4  0.1666667  0.3333333  0.5 -0.3333333 -0.1666667
+5  0.1666667  0.3333333  0.5  0.6666667 -0.1666667
+6  0.1666667  0.3333333  0.5  0.6666667  0.8333333
+> zapsmall(ginv(A))
+     [,1] [,2] [,3] [,4] [,5] [,6]
+[1,]   -1    1    0    0    0    0
+[2,]    0   -1    1    0    0    0
+[3,]    0    0   -1    1    0    0
+[4,]    0    0    0   -1    1    0
+[5,]    0    0    0    0   -1    1
+> 
+> 
+> 
+> cleanEx()
+> nameEx("corresp")
+> ### * corresp
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: corresp
+> ### Title: Simple Correspondence Analysis
+> ### Aliases: corresp corresp.xtabs corresp.data.frame corresp.default
+> ###   corresp.factor corresp.formula corresp.matrix
+> ### Keywords: category multivariate
+> 
+> ### ** Examples
+> 
+> (ct <- corresp(~ Age + Eth, data = quine))
+First canonical correlation(s): 0.05317534 
+
+ Age scores:
+        F0         F1         F2         F3 
+-0.3344445  1.4246090 -1.0320002 -0.4612728 
+
+ Eth scores:
+         A          N 
+-1.0563816  0.9466276 
+> plot(ct)
+> 
+> corresp(caith)
+First canonical correlation(s): 0.4463684 
+
+ Row scores:
+       blue       light      medium        dark 
+-0.89679252 -0.98731818  0.07530627  1.57434710 
+
+ Column scores:
+       fair         red      medium        dark       black 
+-1.21871379 -0.52257500 -0.09414671  1.31888486  2.45176017 
+> biplot(corresp(caith, nf = 2))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("cov.rob")
+> ### * cov.rob
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: cov.rob
+> ### Title: Resistant Estimation of Multivariate Location and Scatter
+> ### Aliases: cov.rob cov.mve cov.mcd
+> ### Keywords: robust multivariate
+> 
+> ### ** Examples
+> 
+> set.seed(123)
+> cov.rob(stackloss)
+$center
+  Air.Flow Water.Temp Acid.Conc. stack.loss 
+   56.3750    20.0000    85.4375    13.0625 
+
+$cov
+            Air.Flow Water.Temp Acid.Conc. stack.loss
+Air.Flow   23.050000   6.666667  16.625000  19.308333
+Water.Temp  6.666667   5.733333   5.333333   7.733333
+Acid.Conc. 16.625000   5.333333  34.395833  13.837500
+stack.loss 19.308333   7.733333  13.837500  18.462500
+
+$msg
+[1] "20 singular samples of size 5 out of 2500"
+
+$crit
+[1] 19.89056
+
+$best
+ [1]  5  6  7  8  9 10 11 12 15 16 18 19 20
+
+$n.obs
+[1] 21
+
+> cov.rob(stack.x, method = "mcd", nsamp = "exact")
+$center
+  Air.Flow Water.Temp Acid.Conc. 
+  56.70588   20.23529   85.52941 
+
+$cov
+            Air.Flow Water.Temp Acid.Conc.
+Air.Flow   23.470588   7.573529  16.102941
+Water.Temp  7.573529   6.316176   5.367647
+Acid.Conc. 16.102941   5.367647  32.389706
+
+$msg
+[1] "266 singular samples of size 4 out of 5985"
+
+$crit
+[1] 5.472581
+
+$best
+ [1]  4  5  6  7  8  9 10 11 12 13 14 20
+
+$n.obs
+[1] 21
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("cov.trob")
+> ### * cov.trob
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: cov.trob
+> ### Title: Covariance Estimation for Multivariate t Distribution
+> ### Aliases: cov.trob
+> ### Keywords: multivariate
+> 
+> ### ** Examples
+> 
+> cov.trob(stackloss)
+$cov
+           Air.Flow Water.Temp Acid.Conc. stack.loss
+Air.Flow   60.47035  17.027203  18.554452   62.28032
+Water.Temp 17.02720   8.085857   5.604132   20.50469
+Acid.Conc. 18.55445   5.604132  24.404633   16.91085
+stack.loss 62.28032  20.504687  16.910855   72.80743
+
+$center
+  Air.Flow Water.Temp Acid.Conc. stack.loss 
+  58.96905   20.79263   86.05588   16.09028 
+
+$n.obs
+[1] 21
+
+$call
+cov.trob(x = stackloss)
+
+$iter
+[1] 5
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("denumerate")
+> ### * denumerate
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: denumerate
+> ### Title: Transform an Allowable Formula for 'loglm' into one for 'terms'
+> ### Aliases: denumerate denumerate.formula
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> denumerate(~(1+2+3)^3 + a/b)
+~(.v1 + .v2 + .v3)^3 + a/b
+> ## which gives ~ (.v1 + .v2 + .v3)^3 + a/b
+> 
+> 
+> 
+> cleanEx()
+> nameEx("dose.p")
+> ### * dose.p
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: dose.p
+> ### Title: Predict Doses for Binomial Assay model
+> ### Aliases: dose.p print.glm.dose
+> ### Keywords: regression models
+> 
+> ### ** Examples
+> 
+> ldose <- rep(0:5, 2)
+> numdead <- c(1, 4, 9, 13, 18, 20, 0, 2, 6, 10, 12, 16)
+> sex <- factor(rep(c("M", "F"), c(6, 6)))
+> SF <- cbind(numdead, numalive = 20 - numdead)
+> budworm.lg0 <- glm(SF ~ sex + ldose - 1, family = binomial)
+> 
+> dose.p(budworm.lg0, cf = c(1,3), p = 1:3/4)
+              Dose        SE
+p = 0.25: 2.231265 0.2499089
+p = 0.50: 3.263587 0.2297539
+p = 0.75: 4.295910 0.2746874
+> dose.p(update(budworm.lg0, family = binomial(link=probit)),
++        cf = c(1,3), p = 1:3/4)
+              Dose        SE
+p = 0.25: 2.191229 0.2384478
+p = 0.50: 3.257703 0.2240685
+p = 0.75: 4.324177 0.2668745
+> 
+> 
+> 
+> cleanEx()
+> nameEx("dropterm")
+> ### * dropterm
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: dropterm
+> ### Title: Try All One-Term Deletions from a Model
+> ### Aliases: dropterm dropterm.default dropterm.glm dropterm.lm
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> quine.hi <- aov(log(Days + 2.5) ~ .^4, quine)
+> quine.nxt <- update(quine.hi, . ~ . - Eth:Sex:Age:Lrn)
+> dropterm(quine.nxt, test=  "F")
+Single term deletions
+
+Model:
+log(Days + 2.5) ~ Eth + Sex + Age + Lrn + Eth:Sex + Eth:Age + 
+    Eth:Lrn + Sex:Age + Sex:Lrn + Age:Lrn + Eth:Sex:Age + Eth:Sex:Lrn + 
+    Eth:Age:Lrn + Sex:Age:Lrn
+            Df Sum of Sq    RSS     AIC F Value   Pr(F)  
+<none>                   64.099 -68.184                  
+Eth:Sex:Age  3   0.97387 65.073 -71.982 0.60773 0.61125  
+Eth:Sex:Lrn  1   1.57879 65.678 -66.631 2.95567 0.08816 .
+Eth:Age:Lrn  2   2.12841 66.227 -67.415 1.99230 0.14087  
+Sex:Age:Lrn  2   1.46623 65.565 -68.882 1.37247 0.25743  
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> quine.stp <- stepAIC(quine.nxt,
++     scope = list(upper = ~Eth*Sex*Age*Lrn, lower = ~1),
++     trace = FALSE)
+> dropterm(quine.stp, test = "F")
+Single term deletions
+
+Model:
+log(Days + 2.5) ~ Eth + Sex + Age + Lrn + Eth:Sex + Eth:Age + 
+    Eth:Lrn + Sex:Age + Sex:Lrn + Age:Lrn + Eth:Sex:Lrn + Eth:Age:Lrn
+            Df Sum of Sq    RSS     AIC F Value     Pr(F)    
+<none>                   66.600 -72.597                      
+Sex:Age      3   10.7959 77.396 -56.663  6.7542 0.0002933 ***
+Eth:Sex:Lrn  1    3.0325 69.632 -68.096  5.6916 0.0185476 *  
+Eth:Age:Lrn  2    2.0960 68.696 -72.072  1.9670 0.1441822    
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> quine.3 <- update(quine.stp, . ~ . - Eth:Age:Lrn)
+> dropterm(quine.3, test = "F")
+Single term deletions
+
+Model:
+log(Days + 2.5) ~ Eth + Sex + Age + Lrn + Eth:Sex + Eth:Age + 
+    Eth:Lrn + Sex:Age + Sex:Lrn + Age:Lrn + Eth:Sex:Lrn
+            Df Sum of Sq    RSS     AIC F Value     Pr(F)    
+<none>                   68.696 -72.072                      
+Eth:Age      3    3.0312 71.727 -71.768  1.8679 0.1383323    
+Sex:Age      3   11.4272 80.123 -55.607  7.0419 0.0002037 ***
+Age:Lrn      2    2.8149 71.511 -70.209  2.6020 0.0780701 .  
+Eth:Sex:Lrn  1    4.6956 73.391 -64.419  8.6809 0.0038268 ** 
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> quine.4 <- update(quine.3, . ~ . - Eth:Age)
+> dropterm(quine.4, test = "F")
+Single term deletions
+
+Model:
+log(Days + 2.5) ~ Eth + Sex + Age + Lrn + Eth:Sex + Eth:Lrn + 
+    Sex:Age + Sex:Lrn + Age:Lrn + Eth:Sex:Lrn
+            Df Sum of Sq    RSS     AIC F Value     Pr(F)    
+<none>                   71.727 -71.768                      
+Sex:Age      3   11.5656 83.292 -55.942  6.9873 0.0002147 ***
+Age:Lrn      2    2.9118 74.639 -69.959  2.6387 0.0752793 .  
+Eth:Sex:Lrn  1    6.8181 78.545 -60.511 12.3574 0.0006052 ***
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> quine.5 <- update(quine.4, . ~ . - Age:Lrn)
+> dropterm(quine.5, test = "F")
+Single term deletions
+
+Model:
+log(Days + 2.5) ~ Eth + Sex + Age + Lrn + Eth:Sex + Eth:Lrn + 
+    Sex:Age + Sex:Lrn + Eth:Sex:Lrn
+            Df Sum of Sq    RSS     AIC F Value     Pr(F)    
+<none>                   74.639 -69.959                      
+Sex:Age      3    9.9002 84.539 -57.774  5.8362 0.0008944 ***
+Eth:Sex:Lrn  1    6.2988 80.937 -60.130 11.1396 0.0010982 ** 
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> 
+> house.glm0 <- glm(Freq ~ Infl*Type*Cont + Sat, family=poisson,
++                    data = housing)
+> house.glm1 <- update(house.glm0, . ~ . + Sat*(Infl+Type+Cont))
+> dropterm(house.glm1, test = "Chisq")
+Single term deletions
+
+Model:
+Freq ~ Infl + Type + Cont + Sat + Infl:Type + Infl:Cont + Type:Cont + 
+    Infl:Sat + Type:Sat + Cont:Sat + Infl:Type:Cont
+               Df Deviance    AIC     LRT   Pr(Chi)    
+<none>              38.662 455.63                      
+Infl:Sat        4  147.780 556.75 109.117 < 2.2e-16 ***
+Type:Sat        6  100.889 505.86  62.227 1.586e-11 ***
+Cont:Sat        2   54.722 467.69  16.060 0.0003256 ***
+Infl:Type:Cont  6   43.952 448.92   5.290 0.5072454    
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> 
+> 
+> 
+> cleanEx()
+> nameEx("eagles")
+> ### * eagles
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: eagles
+> ### Title: Foraging Ecology of Bald Eagles
+> ### Aliases: eagles
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> eagles.glm <- glm(cbind(y, n - y) ~ P*A + V, data = eagles,
++                   family = binomial)
+> dropterm(eagles.glm)
+Single term deletions
+
+Model:
+cbind(y, n - y) ~ P * A + V
+       Df Deviance    AIC
+<none>       0.333 23.073
+V       1   53.737 74.478
+P:A     1    6.956 27.696
+> prof <- profile(eagles.glm)
+> plot(prof)
+> pairs(prof)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("epil")
+> ### * epil
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: epil
+> ### Title: Seizure Counts for Epileptics
+> ### Aliases: epil
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> summary(glm(y ~ lbase*trt + lage + V4, family = poisson,
++             data = epil), cor = FALSE)
+
+Call:
+glm(formula = y ~ lbase * trt + lage + V4, family = poisson, 
+    data = epil)
+
+Deviance Residuals: 
+    Min       1Q   Median       3Q      Max  
+-5.0915  -1.4126  -0.2739   0.7580  10.7711  
+
+Coefficients:
+                   Estimate Std. Error z value Pr(>|z|)    
+(Intercept)         1.89791    0.04260  44.552  < 2e-16 ***
+lbase               0.94862    0.04360  21.759  < 2e-16 ***
+trtprogabide       -0.34588    0.06100  -5.670 1.42e-08 ***
+lage                0.88760    0.11650   7.619 2.56e-14 ***
+V4                 -0.15977    0.05458  -2.927  0.00342 ** 
+lbase:trtprogabide  0.56154    0.06352   8.841  < 2e-16 ***
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+(Dispersion parameter for poisson family taken to be 1)
+
+    Null deviance: 2517.83  on 235  degrees of freedom
+Residual deviance:  869.07  on 230  degrees of freedom
+AIC: 1647
+
+Number of Fisher Scoring iterations: 5
+
+> epil2 <- epil[epil$period == 1, ]
+> epil2["period"] <- rep(0, 59); epil2["y"] <- epil2["base"]
+> epil["time"] <- 1; epil2["time"] <- 4
+> epil2 <- rbind(epil, epil2)
+> epil2$pred <- unclass(epil2$trt) * (epil2$period > 0)
+> epil2$subject <- factor(epil2$subject)
+> epil3 <- aggregate(epil2, list(epil2$subject, epil2$period > 0),
++    function(x) if(is.numeric(x)) sum(x) else x[1])
+> epil3$pred <- factor(epil3$pred,
++    labels = c("base", "placebo", "drug"))
+> 
+> contrasts(epil3$pred) <- structure(contr.sdif(3),
++     dimnames = list(NULL, c("placebo-base", "drug-placebo")))
+> summary(glm(y ~ pred + factor(subject) + offset(log(time)),
++             family = poisson, data = epil3), cor = FALSE)
+
+Call:
+glm(formula = y ~ pred + factor(subject) + offset(log(time)), 
+    family = poisson, data = epil3)
+
+Deviance Residuals: 
+    Min       1Q   Median       3Q      Max  
+-5.2928  -0.7350   0.0000   0.6997   4.7145  
+
+Coefficients:
+                    Estimate Std. Error z value Pr(>|z|)    
+(Intercept)        1.122e+00  2.008e-01   5.590 2.28e-08 ***
+predplacebo-base   1.087e-01  4.691e-02   2.318 0.020474 *  
+preddrug-placebo  -1.016e-01  6.507e-02  -1.561 0.118431    
+factor(subject)2  -2.300e-15  2.828e-01   0.000 1.000000    
+factor(subject)3  -3.857e-01  3.144e-01  -1.227 0.219894    
+factor(subject)4  -1.744e-01  2.960e-01  -0.589 0.555847    
+factor(subject)5   1.577e+00  2.197e-01   7.178 7.08e-13 ***
+factor(subject)6   6.729e-01  2.458e-01   2.738 0.006182 ** 
+factor(subject)7  -4.082e-02  2.858e-01  -0.143 0.886411    
+factor(subject)8   1.758e+00  2.166e-01   8.117 4.77e-16 ***
+factor(subject)9   5.878e-01  2.494e-01   2.356 0.018454 *  
+factor(subject)10  5.423e-01  2.515e-01   2.156 0.031060 *  
+factor(subject)11  1.552e+00  2.202e-01   7.048 1.81e-12 ***
+factor(subject)12  9.243e-01  2.364e-01   3.910 9.22e-05 ***
+factor(subject)13  3.075e-01  2.635e-01   1.167 0.243171    
+factor(subject)14  1.212e+00  2.278e-01   5.320 1.04e-07 ***
+factor(subject)15  1.765e+00  2.164e-01   8.153 3.54e-16 ***
+factor(subject)16  9.708e-01  2.348e-01   4.134 3.57e-05 ***
+factor(subject)17 -4.082e-02  2.858e-01  -0.143 0.886411    
+factor(subject)18  2.236e+00  2.104e-01  10.629  < 2e-16 ***
+factor(subject)19  2.776e-01  2.651e-01   1.047 0.295060    
+factor(subject)20  3.646e-01  2.603e-01   1.401 0.161324    
+factor(subject)21  3.922e-02  2.801e-01   0.140 0.888645    
+factor(subject)22 -8.338e-02  2.889e-01  -0.289 0.772894    
+factor(subject)23  1.823e-01  2.708e-01   0.673 0.500777    
+factor(subject)24  8.416e-01  2.393e-01   3.517 0.000436 ***
+factor(subject)25  2.069e+00  2.123e-01   9.750  < 2e-16 ***
+factor(subject)26 -5.108e-01  3.266e-01  -1.564 0.117799    
+factor(subject)27 -2.231e-01  3.000e-01  -0.744 0.456990    
+factor(subject)28  1.386e+00  2.236e-01   6.200 5.66e-10 ***
+factor(subject)29  1.604e+00  2.227e-01   7.203 5.90e-13 ***
+factor(subject)30  1.023e+00  2.372e-01   4.313 1.61e-05 ***
+factor(subject)31  9.149e-02  2.821e-01   0.324 0.745700    
+factor(subject)32 -3.111e-02  2.909e-01  -0.107 0.914822    
+factor(subject)33  4.710e-01  2.597e-01   1.814 0.069736 .  
+factor(subject)34  3.887e-01  2.640e-01   1.473 0.140879    
+factor(subject)35  1.487e+00  2.250e-01   6.609 3.87e-11 ***
+factor(subject)36  3.598e-01  2.656e-01   1.355 0.175551    
+factor(subject)37 -1.221e-01  2.979e-01  -0.410 0.681943    
+factor(subject)38  1.344e+00  2.283e-01   5.889 3.90e-09 ***
+factor(subject)39  1.082e+00  2.354e-01   4.596 4.30e-06 ***
+factor(subject)40 -7.687e-01  3.634e-01  -2.116 0.034384 *  
+factor(subject)41  1.656e-01  2.772e-01   0.597 0.550234    
+factor(subject)42  5.227e-02  2.848e-01   0.184 0.854388    
+factor(subject)43  1.543e+00  2.239e-01   6.891 5.54e-12 ***
+factor(subject)44  9.605e-01  2.393e-01   4.014 5.96e-05 ***
+factor(subject)45  1.177e+00  2.326e-01   5.061 4.18e-07 ***
+factor(subject)46 -5.275e-01  3.355e-01  -1.572 0.115840    
+factor(subject)47  1.053e+00  2.363e-01   4.456 8.35e-06 ***
+factor(subject)48 -5.275e-01  3.355e-01  -1.572 0.115840    
+factor(subject)49  2.949e+00  2.082e-01  14.168  < 2e-16 ***
+factor(subject)50  3.887e-01  2.640e-01   1.473 0.140879    
+factor(subject)51  1.038e+00  2.367e-01   4.385 1.16e-05 ***
+factor(subject)52  5.711e-01  2.548e-01   2.241 0.025023 *  
+factor(subject)53  1.670e+00  2.215e-01   7.538 4.76e-14 ***
+factor(subject)54  4.443e-01  2.611e-01   1.702 0.088759 .  
+factor(subject)55  2.674e-01  2.709e-01   0.987 0.323618    
+factor(subject)56  1.124e+00  2.341e-01   4.800 1.59e-06 ***
+factor(subject)57  2.674e-01  2.709e-01   0.987 0.323618    
+factor(subject)58 -6.017e-01  3.436e-01  -1.751 0.079911 .  
+factor(subject)59 -7.556e-02  2.942e-01  -0.257 0.797331    
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+(Dispersion parameter for poisson family taken to be 1)
+
+    Null deviance: 3180.82  on 117  degrees of freedom
+Residual deviance:  303.16  on  57  degrees of freedom
+AIC: 1003.5
+
+Number of Fisher Scoring iterations: 5
+
+> 
+> summary(glmmPQL(y ~ lbase*trt + lage + V4,
++                 random = ~ 1 | subject,
++                 family = poisson, data = epil))
+iteration 1
+iteration 2
+iteration 3
+iteration 4
+iteration 5
+Linear mixed-effects model fit by maximum likelihood
+ Data: epil 
+  AIC BIC logLik
+   NA  NA     NA
+
+Random effects:
+ Formula: ~1 | subject
+        (Intercept) Residual
+StdDev:   0.4442704 1.400807
+
+Variance function:
+ Structure: fixed weights
+ Formula: ~invwt 
+Fixed effects: y ~ lbase * trt + lage + V4 
+                        Value Std.Error  DF   t-value p-value
+(Intercept)         1.8696677 0.1055620 176 17.711554  0.0000
+lbase               0.8818228 0.1292834  54  6.820849  0.0000
+trtprogabide       -0.3095253 0.1490438  54 -2.076740  0.0426
+lage                0.5335460 0.3463119  54  1.540652  0.1292
+V4                 -0.1597696 0.0774521 176 -2.062819  0.0406
+lbase:trtprogabide  0.3415425 0.2033325  54  1.679725  0.0988
+ Correlation: 
+                   (Intr) lbase  trtprg lage   V4    
+lbase              -0.126                            
+trtprogabide       -0.691  0.089                     
+lage               -0.103 -0.038  0.088              
+V4                 -0.162  0.000  0.000  0.000       
+lbase:trtprogabide  0.055 -0.645 -0.184  0.267  0.000
+
+Standardized Within-Group Residuals:
+        Min          Q1         Med          Q3         Max 
+-2.13240534 -0.63871136 -0.08486339  0.41960195  4.97872138 
+
+Number of Observations: 236
+Number of Groups: 59 
+> summary(glmmPQL(y ~ pred, random = ~1 | subject,
++                 family = poisson, data = epil3))
+iteration 1
+iteration 2
+iteration 3
+iteration 4
+iteration 5
+iteration 6
+iteration 7
+iteration 8
+Linear mixed-effects model fit by maximum likelihood
+ Data: epil3 
+  AIC BIC logLik
+   NA  NA     NA
+
+Random effects:
+ Formula: ~1 | subject
+        (Intercept) Residual
+StdDev:   0.7257895  2.16629
+
+Variance function:
+ Structure: fixed weights
+ Formula: ~invwt 
+Fixed effects: y ~ pred 
+                     Value  Std.Error DF   t-value p-value
+(Intercept)       3.213631 0.10569117 58 30.405865  0.0000
+predplacebo-base  0.110855 0.09989089 57  1.109763  0.2718
+preddrug-placebo -0.105613 0.13480483 57 -0.783450  0.4366
+ Correlation: 
+                 (Intr) prdpl-
+predplacebo-base  0.081       
+preddrug-placebo -0.010 -0.700
+
+Standardized Within-Group Residuals:
+       Min         Q1        Med         Q3        Max 
+-2.0446864 -0.4765135 -0.1975651  0.3145761  2.6532834 
+
+Number of Observations: 118
+Number of Groups: 59 
+> 
+> 
+> 
+> cleanEx()
+> nameEx("farms")
+> ### * farms
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: farms
+> ### Title: Ecological Factors in Farm Management
+> ### Aliases: farms
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> farms.mca <- mca(farms, abbrev = TRUE)  # Use levels as names
+> eqscplot(farms.mca$cs, type = "n")
+> text(farms.mca$rs, cex = 0.7)
+> text(farms.mca$cs, labels = dimnames(farms.mca$cs)[[1]], cex = 0.7)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("fitdistr")
+> ### * fitdistr
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: fitdistr
+> ### Title: Maximum-likelihood Fitting of Univariate Distributions
+> ### Aliases: fitdistr
+> ### Keywords: distribution htest
+> 
+> ### ** Examples
+> 
+> ## avoid spurious accuracy
+> op <- options(digits = 3)
+> set.seed(123)
+> x <- rgamma(100, shape = 5, rate = 0.1)
+> fitdistr(x, "gamma")
+   shape     rate 
+  6.4870   0.1365 
+ (0.8946) (0.0196)
+> ## now do this directly with more control.
+> fitdistr(x, dgamma, list(shape = 1, rate = 0.1), lower = 0.001)
+   shape     rate 
+  6.4869   0.1365 
+ (0.8944) (0.0196)
+> 
+> set.seed(123)
+> x2 <- rt(250, df = 9)
+> fitdistr(x2, "t", df = 9)
+      m         s   
+  -0.0107    1.0441 
+ ( 0.0722) ( 0.0543)
+> ## allow df to vary: not a very good idea!
+> fitdistr(x2, "t")
+Warning in dt((x - m)/s, df, log = TRUE) : NaNs produced
+      m          s          df   
+  -0.00965    1.00617    6.62729 
+ ( 0.07147) ( 0.07707) ( 2.71033)
+> ## now do fixed-df fit directly with more control.
+> mydt <- function(x, m, s, df) dt((x-m)/s, df)/s
+> fitdistr(x2, mydt, list(m = 0, s = 1), df = 9, lower = c(-Inf, 0))
+      m         s   
+  -0.0107    1.0441 
+ ( 0.0722) ( 0.0543)
+> 
+> set.seed(123)
+> x3 <- rweibull(100, shape = 4, scale = 100)
+> fitdistr(x3, "weibull")
+    shape     scale 
+    4.080    99.984 
+ (  0.313) (  2.582)
+> 
+> set.seed(123)
+> x4 <- rnegbin(500, mu = 5, theta = 4)
+> fitdistr(x4, "Negative Binomial")
+   size     mu  
+  4.216   4.945 
+ (0.504) (0.147)
+> options(op)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("fractions")
+> ### * fractions
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: fractions
+> ### Title: Rational Approximation
+> ### Aliases: fractions Math.fractions Ops.fractions Summary.fractions
+> ###   [.fractions [<-.fractions as.character.fractions as.fractions
+> ###   is.fractions print.fractions t.fractions
+> ### Keywords: math
+> 
+> ### ** Examples
+> 
+> X <- matrix(runif(25), 5, 5)
+> zapsmall(solve(X, X/5)) # print near-zeroes as zero
+     [,1] [,2] [,3] [,4] [,5]
+[1,]  0.2  0.0  0.0  0.0  0.0
+[2,]  0.0  0.2  0.0  0.0  0.0
+[3,]  0.0  0.0  0.2  0.0  0.0
+[4,]  0.0  0.0  0.0  0.2  0.0
+[5,]  0.0  0.0  0.0  0.0  0.2
+> fractions(solve(X, X/5))
+     [,1] [,2] [,3] [,4] [,5]
+[1,] 1/5    0    0    0    0 
+[2,]   0  1/5    0    0    0 
+[3,]   0    0  1/5    0    0 
+[4,]   0    0    0  1/5    0 
+[5,]   0    0    0    0  1/5 
+> fractions(solve(X, X/5)) + 1
+     [,1] [,2] [,3] [,4] [,5]
+[1,] 6/5    1    1    1    1 
+[2,]   1  6/5    1    1    1 
+[3,]   1    1  6/5    1    1 
+[4,]   1    1    1  6/5    1 
+[5,]   1    1    1    1  6/5 
+> 
+> 
+> 
+> cleanEx()
+> nameEx("galaxies")
+> ### * galaxies
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: galaxies
+> ### Title: Velocities for 82 Galaxies
+> ### Aliases: galaxies
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> gal <- galaxies/1000
+> c(width.SJ(gal, method = "dpi"), width.SJ(gal))
+[1] 3.256151 2.566423
+> plot(x = c(0, 40), y = c(0, 0.3), type = "n", bty = "l",
++      xlab = "velocity of galaxy (1000km/s)", ylab = "density")
+> rug(gal)
+> lines(density(gal, width = 3.25, n = 200), lty = 1)
+> lines(density(gal, width = 2.56, n = 200), lty = 3)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("gamma.shape.glm")
+> ### * gamma.shape.glm
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: gamma.shape
+> ### Title: Estimate the Shape Parameter of the Gamma Distribution in a GLM
+> ###   Fit
+> ### Aliases: gamma.shape gamma.shape.glm print.gamma.shape
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> clotting <- data.frame(
++     u = c(5,10,15,20,30,40,60,80,100),
++     lot1 = c(118,58,42,35,27,25,21,19,18),
++     lot2 = c(69,35,26,21,18,16,13,12,12))
+> clot1 <- glm(lot1 ~ log(u), data = clotting, family = Gamma)
+> gamma.shape(clot1)
+               
+Alpha: 538.1315
+SE:    253.5991
+> 
+> gm <- glm(Days + 0.1 ~ Age*Eth*Sex*Lrn,
++           quasi(link=log, variance="mu^2"), quine,
++           start = c(3, rep(0,31)))
+> gamma.shape(gm, verbose = TRUE)
+Initial estimate: 1.060344
+Iter. 1 Alpha: 1.238408
+Iter. 2 Alpha: 1.276997
+Iter. 3 Alpha: 1.278343
+Iter. 4 Alpha: 1.278345
+                
+Alpha: 1.2783449
+SE:    0.1345175
+> summary(gm, dispersion = gamma.dispersion(gm))  # better summary
+
+Call:
+glm(formula = Days + 0.1 ~ Age * Eth * Sex * Lrn, family = quasi(link = log, 
+    variance = "mu^2"), data = quine, start = c(3, rep(0, 31)))
+
+Deviance Residuals: 
+    Min       1Q   Median       3Q      Max  
+-3.0385  -0.7164  -0.1532   0.3863   1.3087  
+
+Coefficients: (4 not defined because of singularities)
+                      Estimate Std. Error z value Pr(>|z|)    
+(Intercept)            3.06105    0.44223   6.922 4.46e-12 ***
+AgeF1                 -0.61870    0.59331  -1.043 0.297041    
+AgeF2                 -2.31911    0.98885  -2.345 0.019014 *  
+AgeF3                 -0.37623    0.53149  -0.708 0.479020    
+EthN                  -0.13789    0.62540  -0.220 0.825496    
+SexM                  -0.48844    0.59331  -0.823 0.410369    
+LrnSL                 -1.92965    0.98885  -1.951 0.051009 .  
+AgeF1:EthN             0.10249    0.82338   0.124 0.900942    
+AgeF2:EthN            -0.50874    1.39845  -0.364 0.716017    
+AgeF3:EthN             0.06314    0.74584   0.085 0.932534    
+AgeF1:SexM             0.40695    0.94847   0.429 0.667884    
+AgeF2:SexM             3.06173    1.11626   2.743 0.006091 ** 
+AgeF3:SexM             1.10841    0.74208   1.494 0.135267    
+EthN:SexM             -0.74217    0.82338  -0.901 0.367394    
+AgeF1:LrnSL            2.60967    1.10114   2.370 0.017789 *  
+AgeF2:LrnSL            4.78434    1.36304   3.510 0.000448 ***
+AgeF3:LrnSL                 NA         NA      NA       NA    
+EthN:LrnSL             2.22936    1.39845   1.594 0.110899    
+SexM:LrnSL             1.56531    1.18112   1.325 0.185077    
+AgeF1:EthN:SexM       -0.30235    1.32176  -0.229 0.819065    
+AgeF2:EthN:SexM        0.29742    1.57035   0.189 0.849780    
+AgeF3:EthN:SexM        0.82215    1.03277   0.796 0.425995    
+AgeF1:EthN:LrnSL      -3.50803    1.54655  -2.268 0.023311 *  
+AgeF2:EthN:LrnSL      -3.33529    1.92481  -1.733 0.083133 .  
+AgeF3:EthN:LrnSL            NA         NA      NA       NA    
+AgeF1:SexM:LrnSL      -2.39791    1.51050  -1.587 0.112400    
+AgeF2:SexM:LrnSL      -4.12161    1.60698  -2.565 0.010323 *  
+AgeF3:SexM:LrnSL            NA         NA      NA       NA    
+EthN:SexM:LrnSL       -0.15305    1.66253  -0.092 0.926653    
+AgeF1:EthN:SexM:LrnSL  2.13480    2.08685   1.023 0.306317    
+AgeF2:EthN:SexM:LrnSL  2.11886    2.27882   0.930 0.352473    
+AgeF3:EthN:SexM:LrnSL       NA         NA      NA       NA    
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+(Dispersion parameter for quasi family taken to be 0.7822615)
+
+    Null deviance: 190.40  on 145  degrees of freedom
+Residual deviance: 128.36  on 118  degrees of freedom
+AIC: NA
+
+Number of Fisher Scoring iterations: 7
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("gehan")
+> ### * gehan
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: gehan
+> ### Title: Remission Times of Leukaemia Patients
+> ### Aliases: gehan
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> library(survival)
+> gehan.surv <- survfit(Surv(time, cens) ~ treat, data = gehan,
++      conf.type = "log-log")
+> summary(gehan.surv)
+Call: survfit(formula = Surv(time, cens) ~ treat, data = gehan, conf.type = "log-log")
+
+                treat=6-MP 
+ time n.risk n.event survival std.err lower 95% CI upper 95% CI
+    6     21       3    0.857  0.0764        0.620        0.952
+    7     17       1    0.807  0.0869        0.563        0.923
+   10     15       1    0.753  0.0963        0.503        0.889
+   13     12       1    0.690  0.1068        0.432        0.849
+   16     11       1    0.627  0.1141        0.368        0.805
+   22      7       1    0.538  0.1282        0.268        0.747
+   23      6       1    0.448  0.1346        0.188        0.680
+
+                treat=control 
+ time n.risk n.event survival std.err lower 95% CI upper 95% CI
+    1     21       2   0.9048  0.0641      0.67005        0.975
+    2     19       2   0.8095  0.0857      0.56891        0.924
+    3     17       1   0.7619  0.0929      0.51939        0.893
+    4     16       2   0.6667  0.1029      0.42535        0.825
+    5     14       2   0.5714  0.1080      0.33798        0.749
+    8     12       4   0.3810  0.1060      0.18307        0.578
+   11      8       2   0.2857  0.0986      0.11656        0.482
+   12      6       2   0.1905  0.0857      0.05948        0.377
+   15      4       1   0.1429  0.0764      0.03566        0.321
+   17      3       1   0.0952  0.0641      0.01626        0.261
+   22      2       1   0.0476  0.0465      0.00332        0.197
+   23      1       1   0.0000     NaN           NA           NA
+
+> survreg(Surv(time, cens) ~ factor(pair) + treat, gehan, dist = "exponential")
+Call:
+survreg(formula = Surv(time, cens) ~ factor(pair) + treat, data = gehan, 
+    dist = "exponential")
+
+Coefficients:
+   (Intercept)  factor(pair)2  factor(pair)3  factor(pair)4  factor(pair)5 
+     2.0702861      2.1476909      1.8329493      1.7718527      1.4682566 
+ factor(pair)6  factor(pair)7  factor(pair)8  factor(pair)9 factor(pair)10 
+     1.8954775      0.5583010      2.5187140      2.2970513      2.4862208 
+factor(pair)11 factor(pair)12 factor(pair)13 factor(pair)14 factor(pair)15 
+     1.0524472      1.8270477      1.6772567      1.7778672      2.0859913 
+factor(pair)16 factor(pair)17 factor(pair)18 factor(pair)19 factor(pair)20 
+     3.0634288      0.7996252      1.5855018      1.4083884      0.4023946 
+factor(pair)21   treatcontrol 
+     1.9698390     -1.7671562 
+
+Scale fixed at 1 
+
+Loglik(model)= -101.6   Loglik(intercept only)= -116.8
+	Chisq= 30.27 on 21 degrees of freedom, p= 0.087 
+n= 42 
+> summary(survreg(Surv(time, cens) ~ treat, gehan, dist = "exponential"))
+
+Call:
+survreg(formula = Surv(time, cens) ~ treat, data = gehan, dist = "exponential")
+             Value Std. Error     z        p
+(Intercept)   3.69      0.333 11.06 2.00e-28
+treatcontrol -1.53      0.398 -3.83 1.27e-04
+
+Scale fixed at 1 
+
+Exponential distribution
+Loglik(model)= -108.5   Loglik(intercept only)= -116.8
+	Chisq= 16.49 on 1 degrees of freedom, p= 4.9e-05 
+Number of Newton-Raphson Iterations: 4 
+n= 42 
+
+> summary(survreg(Surv(time, cens) ~ treat, gehan))
+
+Call:
+survreg(formula = Surv(time, cens) ~ treat, data = gehan)
+              Value Std. Error     z        p
+(Intercept)   3.516      0.252 13.96 2.61e-44
+treatcontrol -1.267      0.311 -4.08 4.51e-05
+Log(scale)   -0.312      0.147 -2.12 3.43e-02
+
+Scale= 0.732 
+
+Weibull distribution
+Loglik(model)= -106.6   Loglik(intercept only)= -116.4
+	Chisq= 19.65 on 1 degrees of freedom, p= 9.3e-06 
+Number of Newton-Raphson Iterations: 5 
+n= 42 
+
+> gehan.cox <- coxph(Surv(time, cens) ~ treat, gehan)
+> summary(gehan.cox)
+Call:
+coxph(formula = Surv(time, cens) ~ treat, data = gehan)
+
+  n= 42, number of events= 30 
+
+               coef exp(coef) se(coef)     z Pr(>|z|)    
+treatcontrol 1.5721    4.8169   0.4124 3.812 0.000138 ***
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+             exp(coef) exp(-coef) lower .95 upper .95
+treatcontrol     4.817     0.2076     2.147     10.81
+
+Concordance= 0.69  (se = 0.053 )
+Rsquare= 0.322   (max possible= 0.988 )
+Likelihood ratio test= 16.35  on 1 df,   p=5.261e-05
+Wald test            = 14.53  on 1 df,   p=0.0001378
+Score (logrank) test = 17.25  on 1 df,   p=3.283e-05
+
+> 
+> 
+> 
+> cleanEx()
+
+detaching ‘package:survival’
+
+> nameEx("ginv")
+> ### * ginv
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: ginv
+> ### Title: Generalized Inverse of a Matrix
+> ### Aliases: ginv
+> ### Keywords: algebra
+> 
+> ### ** Examples
+> 
+> ## Not run: 
+> ##D # The function is currently defined as
+> ##D function(X, tol = sqrt(.Machine$double.eps))
+> ##D {
+> ##D ## Generalized Inverse of a Matrix
+> ##D   dnx <- dimnames(X)
+> ##D   if(is.null(dnx)) dnx <- vector("list", 2)
+> ##D   s <- svd(X)
+> ##D   nz <- s$d > tol * s$d[1]
+> ##D   structure(
+> ##D     if(any(nz)) s$v[, nz] %*% (t(s$u[, nz])/s$d[nz]) else X,
+> ##D     dimnames = dnx[2:1])
+> ##D }
+> ## End(Not run)
+> 
+> 
+> cleanEx()
+> nameEx("glm.convert")
+> ### * glm.convert
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: glm.convert
+> ### Title: Change a Negative Binomial fit to a GLM fit
+> ### Aliases: glm.convert
+> ### Keywords: regression models
+> 
+> ### ** Examples
+> 
+> quine.nb1 <- glm.nb(Days ~ Sex/(Age + Eth*Lrn), data = quine)
+> quine.nbA <- glm.convert(quine.nb1)
+> quine.nbB <- update(quine.nb1, . ~ . + Sex:Age:Lrn)
+> anova(quine.nbA, quine.nbB)
+Analysis of Deviance Table
+
+Model 1: Days ~ Sex/(Age + Eth * Lrn)
+Model 2: Days ~ Sex + Sex:Age + Sex:Eth + Sex:Lrn + Sex:Eth:Lrn + Sex:Age:Lrn
+  Resid. Df Resid. Dev Df Deviance
+1       132     167.56            
+2       128     166.83  4    0.723
+> 
+> 
+> 
+> cleanEx()
+> nameEx("glm.nb")
+> ### * glm.nb
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: glm.nb
+> ### Title: Fit a Negative Binomial Generalized Linear Model
+> ### Aliases: glm.nb family.negbin logLik.negbin
+> ### Keywords: regression models
+> 
+> ### ** Examples
+> 
+> quine.nb1 <- glm.nb(Days ~ Sex/(Age + Eth*Lrn), data = quine)
+> quine.nb2 <- update(quine.nb1, . ~ . + Sex:Age:Lrn)
+> quine.nb3 <- update(quine.nb2, Days ~ .^4)
+> anova(quine.nb1, quine.nb2, quine.nb3)
+Likelihood ratio tests of Negative Binomial Models
+
+Response: Days
+                                                                                          Model
+1                                                                         Sex/(Age + Eth * Lrn)
+2                                 Sex + Sex:Age + Sex:Eth + Sex:Lrn + Sex:Eth:Lrn + Sex:Age:Lrn
+3 Sex + Sex:Age + Sex:Eth + Sex:Lrn + Sex:Eth:Lrn + Sex:Age:Lrn + Sex:Age:Eth + Sex:Age:Eth:Lrn
+     theta Resid. df    2 x log-lik.   Test    df  LR stat.    Pr(Chi)
+1 1.597991       132       -1063.025                                  
+2 1.686899       128       -1055.398 1 vs 2     4  7.627279 0.10622602
+3 1.928360       118       -1039.324 2 vs 3    10 16.073723 0.09754136
+> ## Don't show: 
+> ## PR#1695
+> y <- c(7, 5, 4, 7, 5, 2, 11, 5, 5, 4, 2, 3, 4, 3, 5, 9, 6, 7, 10, 6, 12,
++ 6, 3, 5, 3, 9, 13, 0, 6, 1, 2, 0, 1, 0, 0, 4, 5, 1, 5, 3, 3, 4)
+> 
+> lag1 <- c(0, 7, 5, 4, 7, 5, 2, 11, 5, 5, 4, 2, 3, 4, 3, 5, 9, 6, 7, 10,
++ 6, 12, 6, 3, 5, 3, 9, 13, 0, 6, 1, 2, 0, 1, 0, 0, 4, 5, 1, 5, 3, 3)
+> 
+> lag2 <- c(0, 0, 7, 5, 4, 7, 5, 2, 11, 5, 5, 4, 2, 3, 4, 3, 5, 9, 6, 7,
++ 10, 6, 12, 6, 3, 5, 3, 9, 13, 0, 6, 1, 2, 0, 1, 0, 0, 4, 5, 1, 5, 3)
+> 
+> lag3 <- c(0, 0, 0, 7, 5, 4, 7, 5, 2, 11, 5, 5, 4, 2, 3, 4, 3, 5, 9, 6,
++ 7, 10, 6, 12, 6, 3, 5, 3, 9, 13, 0, 6, 1, 2, 0, 1, 0, 0, 4, 5, 1, 5)
+> 
+> (fit <- glm(y ~ lag1+lag2+lag3, family=poisson(link=identity),
++             start=c(2, 0.1, 0.1, 0.1)))
+
+Call:  glm(formula = y ~ lag1 + lag2 + lag3, family = poisson(link = identity), 
+    start = c(2, 0.1, 0.1, 0.1))
+
+Coefficients:
+(Intercept)         lag1         lag2         lag3  
+     2.6609       0.1573       0.1424       0.1458  
+
+Degrees of Freedom: 41 Total (i.e. Null);  38 Residual
+Null Deviance:	    100.2 
+Residual Deviance: 90.34 	AIC: 225.6
+> try(glm.nb(y ~ lag1+lag2+lag3, link=identity))
+Warning in log(y/mu) : NaNs produced
+Error : no valid set of coefficients has been found: please supply starting values
+> glm.nb(y ~ lag1+lag2+lag3, link=identity,  start=c(2, 0.1, 0.1, 0.1))
+
+Call:  glm.nb(formula = y ~ lag1 + lag2 + lag3, start = c(2, 0.1, 0.1, 
+    0.1), link = identity, init.theta = 4.406504429)
+
+Coefficients:
+(Intercept)         lag1         lag2         lag3  
+     2.6298       0.1774       0.1407       0.1346  
+
+Degrees of Freedom: 41 Total (i.e. Null);  38 Residual
+Null Deviance:	    55.07 
+Residual Deviance: 50.09 	AIC: 215.9
+> glm.nb(y ~ lag1+lag2+lag3, link=identity,  start=coef(fit))
+
+Call:  glm.nb(formula = y ~ lag1 + lag2 + lag3, start = coef(fit), link = identity, 
+    init.theta = 4.406504429)
+
+Coefficients:
+(Intercept)         lag1         lag2         lag3  
+     2.6298       0.1774       0.1407       0.1346  
+
+Degrees of Freedom: 41 Total (i.e. Null);  38 Residual
+Null Deviance:	    55.07 
+Residual Deviance: 50.09 	AIC: 215.9
+> glm.nb(y ~ lag1+lag2+lag3, link=identity, etastart=rep(5, 42))
+
+Call:  glm.nb(formula = y ~ lag1 + lag2 + lag3, etastart = rep(5, 42), 
+    link = identity, init.theta = 4.406504429)
+
+Coefficients:
+(Intercept)         lag1         lag2         lag3  
+     2.6298       0.1774       0.1407       0.1346  
+
+Degrees of Freedom: 41 Total (i.e. Null);  38 Residual
+Null Deviance:	    55.07 
+Residual Deviance: 50.09 	AIC: 215.9
+> ## End(Don't show)
+> 
+> 
+> cleanEx()
+> nameEx("glmmPQL")
+> ### * glmmPQL
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: glmmPQL
+> ### Title: Fit Generalized Linear Mixed Models via PQL
+> ### Aliases: glmmPQL
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> library(nlme) # will be loaded automatically if omitted
+> summary(glmmPQL(y ~ trt + I(week > 2), random = ~ 1 | ID,
++                 family = binomial, data = bacteria))
+iteration 1
+iteration 2
+iteration 3
+iteration 4
+iteration 5
+iteration 6
+Linear mixed-effects model fit by maximum likelihood
+ Data: bacteria 
+  AIC BIC logLik
+   NA  NA     NA
+
+Random effects:
+ Formula: ~1 | ID
+        (Intercept)  Residual
+StdDev:    1.410637 0.7800511
+
+Variance function:
+ Structure: fixed weights
+ Formula: ~invwt 
+Fixed effects: y ~ trt + I(week > 2) 
+                    Value Std.Error  DF   t-value p-value
+(Intercept)      3.412014 0.5185033 169  6.580506  0.0000
+trtdrug         -1.247355 0.6440635  47 -1.936696  0.0588
+trtdrug+        -0.754327 0.6453978  47 -1.168779  0.2484
+I(week > 2)TRUE -1.607257 0.3583379 169 -4.485311  0.0000
+ Correlation: 
+                (Intr) trtdrg trtdr+
+trtdrug         -0.598              
+trtdrug+        -0.571  0.460       
+I(week > 2)TRUE -0.537  0.047 -0.001
+
+Standardized Within-Group Residuals:
+       Min         Q1        Med         Q3        Max 
+-5.1985361  0.1572336  0.3513075  0.4949482  1.7448845 
+
+Number of Observations: 220
+Number of Groups: 50 
+> ## Don't show: 
+>  # an example of offset
+> summary(glmmPQL(y ~ trt + week, random = ~ 1 | ID,
++                 family = binomial, data = bacteria))
+iteration 1
+iteration 2
+iteration 3
+iteration 4
+iteration 5
+iteration 6
+Linear mixed-effects model fit by maximum likelihood
+ Data: bacteria 
+  AIC BIC logLik
+   NA  NA     NA
+
+Random effects:
+ Formula: ~1 | ID
+        (Intercept)  Residual
+StdDev:    1.325243 0.7903088
+
+Variance function:
+ Structure: fixed weights
+ Formula: ~invwt 
+Fixed effects: y ~ trt + week 
+                 Value Std.Error  DF   t-value p-value
+(Intercept)  3.0302276 0.4791396 169  6.324310  0.0000
+trtdrug     -1.2176812 0.6160113  47 -1.976719  0.0540
+trtdrug+    -0.7886376 0.6193895  47 -1.273250  0.2092
+week        -0.1446463 0.0392343 169 -3.686730  0.0003
+ Correlation: 
+         (Intr) trtdrg trtdr+
+trtdrug  -0.622              
+trtdrug+ -0.609  0.464       
+week     -0.481  0.050  0.030
+
+Standardized Within-Group Residuals:
+       Min         Q1        Med         Q3        Max 
+-4.2868074  0.2039043  0.3140333  0.5440835  1.9754065 
+
+Number of Observations: 220
+Number of Groups: 50 
+> summary(glmmPQL(y ~ trt + week + offset(week), random = ~ 1 | ID,
++                 family = binomial, data = bacteria))
+iteration 1
+iteration 2
+iteration 3
+iteration 4
+iteration 5
+iteration 6
+Linear mixed-effects model fit by maximum likelihood
+ Data: bacteria 
+  AIC BIC logLik
+   NA  NA     NA
+
+Random effects:
+ Formula: ~1 | ID
+        (Intercept)  Residual
+StdDev:    1.325243 0.7903088
+
+Variance function:
+ Structure: fixed weights
+ Formula: ~invwt 
+Fixed effects: y ~ trt + week + offset(week) 
+                 Value Std.Error  DF    t-value p-value
+(Intercept)  3.0302276 0.4791396 169   6.324310  0.0000
+trtdrug     -1.2176812 0.6160113  47  -1.976719  0.0540
+trtdrug+    -0.7886376 0.6193895  47  -1.273250  0.2092
+week        -1.1446463 0.0392343 169 -29.174622  0.0000
+ Correlation: 
+         (Intr) trtdrg trtdr+
+trtdrug  -0.622              
+trtdrug+ -0.609  0.464       
+week     -0.481  0.050  0.030
+
+Standardized Within-Group Residuals:
+       Min         Q1        Med         Q3        Max 
+-4.2868074  0.2039043  0.3140333  0.5440835  1.9754065 
+
+Number of Observations: 220
+Number of Groups: 50 
+> ## End(Don't show)
+> 
+> 
+> cleanEx()
+
+detaching ‘package:nlme’
+
+> nameEx("housing")
+> ### * housing
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: housing
+> ### Title: Frequency Table from a Copenhagen Housing Conditions Survey
+> ### Aliases: housing
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> options(contrasts = c("contr.treatment", "contr.poly"))
+> 
+> # Surrogate Poisson models
+> house.glm0 <- glm(Freq ~ Infl*Type*Cont + Sat, family = poisson,
++                   data = housing)
+> summary(house.glm0, cor = FALSE)
+
+Call:
+glm(formula = Freq ~ Infl * Type * Cont + Sat, family = poisson, 
+    data = housing)
+
+Deviance Residuals: 
+    Min       1Q   Median       3Q      Max  
+-4.5551  -1.0612  -0.0593   0.6483   4.1478  
+
+Coefficients:
+                                    Estimate Std. Error z value Pr(>|z|)    
+(Intercept)                        3.136e+00  1.196e-01  26.225  < 2e-16 ***
+InflMedium                         2.733e-01  1.586e-01   1.723 0.084868 .  
+InflHigh                          -2.054e-01  1.784e-01  -1.152 0.249511    
+TypeApartment                      3.666e-01  1.555e-01   2.357 0.018403 *  
+TypeAtrium                        -7.828e-01  2.134e-01  -3.668 0.000244 ***
+TypeTerrace                       -8.145e-01  2.157e-01  -3.775 0.000160 ***
+ContHigh                          -1.490e-15  1.690e-01   0.000 1.000000    
+Sat.L                              1.159e-01  4.038e-02   2.871 0.004094 ** 
+Sat.Q                              2.629e-01  4.515e-02   5.824 5.76e-09 ***
+InflMedium:TypeApartment          -1.177e-01  2.086e-01  -0.564 0.572571    
+InflHigh:TypeApartment             1.753e-01  2.279e-01   0.769 0.441783    
+InflMedium:TypeAtrium             -4.068e-01  3.035e-01  -1.340 0.180118    
+InflHigh:TypeAtrium               -1.692e-01  3.294e-01  -0.514 0.607433    
+InflMedium:TypeTerrace             6.292e-03  2.860e-01   0.022 0.982450    
+InflHigh:TypeTerrace              -9.305e-02  3.280e-01  -0.284 0.776633    
+InflMedium:ContHigh               -1.398e-01  2.279e-01  -0.613 0.539715    
+InflHigh:ContHigh                 -6.091e-01  2.800e-01  -2.176 0.029585 *  
+TypeApartment:ContHigh             5.029e-01  2.109e-01   2.385 0.017083 *  
+TypeAtrium:ContHigh                6.774e-01  2.751e-01   2.462 0.013811 *  
+TypeTerrace:ContHigh               1.099e+00  2.675e-01   4.106 4.02e-05 ***
+InflMedium:TypeApartment:ContHigh  5.359e-02  2.862e-01   0.187 0.851450    
+InflHigh:TypeApartment:ContHigh    1.462e-01  3.380e-01   0.432 0.665390    
+InflMedium:TypeAtrium:ContHigh     1.555e-01  3.907e-01   0.398 0.690597    
+InflHigh:TypeAtrium:ContHigh       4.782e-01  4.441e-01   1.077 0.281619    
+InflMedium:TypeTerrace:ContHigh   -4.980e-01  3.671e-01  -1.357 0.174827    
+InflHigh:TypeTerrace:ContHigh     -4.470e-01  4.545e-01  -0.984 0.325326    
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+(Dispersion parameter for poisson family taken to be 1)
+
+    Null deviance: 833.66  on 71  degrees of freedom
+Residual deviance: 217.46  on 46  degrees of freedom
+AIC: 610.43
+
+Number of Fisher Scoring iterations: 5
+
+> 
+> addterm(house.glm0, ~. + Sat:(Infl+Type+Cont), test = "Chisq")
+Single term additions
+
+Model:
+Freq ~ Infl * Type * Cont + Sat
+         Df Deviance    AIC     LRT   Pr(Chi)    
+<none>        217.46 610.43                      
+Infl:Sat  4   111.08 512.05 106.371 < 2.2e-16 ***
+Type:Sat  6   156.79 561.76  60.669 3.292e-11 ***
+Cont:Sat  2   212.33 609.30   5.126   0.07708 .  
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> 
+> house.glm1 <- update(house.glm0, . ~ . + Sat*(Infl+Type+Cont))
+> summary(house.glm1, cor = FALSE)
+
+Call:
+glm(formula = Freq ~ Infl + Type + Cont + Sat + Infl:Type + Infl:Cont + 
+    Type:Cont + Infl:Sat + Type:Sat + Cont:Sat + Infl:Type:Cont, 
+    family = poisson, data = housing)
+
+Deviance Residuals: 
+    Min       1Q   Median       3Q      Max  
+-1.6022  -0.5282  -0.0641   0.5757   1.9322  
+
+Coefficients:
+                                   Estimate Std. Error z value Pr(>|z|)    
+(Intercept)                        3.135074   0.120112  26.101  < 2e-16 ***
+InflMedium                         0.248327   0.159979   1.552 0.120602    
+InflHigh                          -0.412645   0.184947  -2.231 0.025671 *  
+TypeApartment                      0.292524   0.157477   1.858 0.063231 .  
+TypeAtrium                        -0.792847   0.214413  -3.698 0.000218 ***
+TypeTerrace                       -1.018074   0.221263  -4.601 4.20e-06 ***
+ContHigh                          -0.001407   0.169711  -0.008 0.993385    
+Sat.L                             -0.098106   0.112592  -0.871 0.383570    
+Sat.Q                              0.285657   0.122283   2.336 0.019489 *  
+InflMedium:TypeApartment          -0.017882   0.210496  -0.085 0.932302    
+InflHigh:TypeApartment             0.386869   0.233297   1.658 0.097263 .  
+InflMedium:TypeAtrium             -0.360311   0.304979  -1.181 0.237432    
+InflHigh:TypeAtrium               -0.036788   0.334793  -0.110 0.912503    
+InflMedium:TypeTerrace             0.185154   0.288892   0.641 0.521580    
+InflHigh:TypeTerrace               0.310749   0.334815   0.928 0.353345    
+InflMedium:ContHigh               -0.200060   0.228748  -0.875 0.381799    
+InflHigh:ContHigh                 -0.725790   0.282352  -2.571 0.010155 *  
+TypeApartment:ContHigh             0.569691   0.212152   2.685 0.007247 ** 
+TypeAtrium:ContHigh                0.702115   0.276056   2.543 0.010979 *  
+TypeTerrace:ContHigh               1.215930   0.269968   4.504 6.67e-06 ***
+InflMedium:Sat.L                   0.519627   0.096830   5.366 8.03e-08 ***
+InflHigh:Sat.L                     1.140302   0.118180   9.649  < 2e-16 ***
+InflMedium:Sat.Q                  -0.064474   0.102666  -0.628 0.530004    
+InflHigh:Sat.Q                     0.115436   0.127798   0.903 0.366380    
+TypeApartment:Sat.L               -0.520170   0.109793  -4.738 2.16e-06 ***
+TypeAtrium:Sat.L                  -0.288484   0.149551  -1.929 0.053730 .  
+TypeTerrace:Sat.L                 -0.998666   0.141527  -7.056 1.71e-12 ***
+TypeApartment:Sat.Q                0.055418   0.118515   0.468 0.640068    
+TypeAtrium:Sat.Q                  -0.273820   0.149713  -1.829 0.067405 .  
+TypeTerrace:Sat.Q                 -0.032328   0.149251  -0.217 0.828520    
+ContHigh:Sat.L                     0.340703   0.087778   3.881 0.000104 ***
+ContHigh:Sat.Q                    -0.097929   0.094068  -1.041 0.297851    
+InflMedium:TypeApartment:ContHigh  0.046900   0.286212   0.164 0.869837    
+InflHigh:TypeApartment:ContHigh    0.126229   0.338208   0.373 0.708979    
+InflMedium:TypeAtrium:ContHigh     0.157239   0.390719   0.402 0.687364    
+InflHigh:TypeAtrium:ContHigh       0.478611   0.444244   1.077 0.281320    
+InflMedium:TypeTerrace:ContHigh   -0.500162   0.367135  -1.362 0.173091    
+InflHigh:TypeTerrace:ContHigh     -0.463099   0.454713  -1.018 0.308467    
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+(Dispersion parameter for poisson family taken to be 1)
+
+    Null deviance: 833.657  on 71  degrees of freedom
+Residual deviance:  38.662  on 34  degrees of freedom
+AIC: 455.63
+
+Number of Fisher Scoring iterations: 4
+
+> 
+> 1 - pchisq(deviance(house.glm1), house.glm1$df.residual)
+[1] 0.2671363
+> 
+> dropterm(house.glm1, test = "Chisq")
+Single term deletions
+
+Model:
+Freq ~ Infl + Type + Cont + Sat + Infl:Type + Infl:Cont + Type:Cont + 
+    Infl:Sat + Type:Sat + Cont:Sat + Infl:Type:Cont
+               Df Deviance    AIC     LRT   Pr(Chi)    
+<none>              38.662 455.63                      
+Infl:Sat        4  147.780 556.75 109.117 < 2.2e-16 ***
+Type:Sat        6  100.889 505.86  62.227 1.586e-11 ***
+Cont:Sat        2   54.722 467.69  16.060 0.0003256 ***
+Infl:Type:Cont  6   43.952 448.92   5.290 0.5072454    
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> 
+> addterm(house.glm1, ~. + Sat:(Infl+Type+Cont)^2, test  =  "Chisq")
+Single term additions
+
+Model:
+Freq ~ Infl + Type + Cont + Sat + Infl:Type + Infl:Cont + Type:Cont + 
+    Infl:Sat + Type:Sat + Cont:Sat + Infl:Type:Cont
+              Df Deviance    AIC     LRT Pr(Chi)  
+<none>             38.662 455.63                  
+Infl:Type:Sat 12   16.107 457.08 22.5550 0.03175 *
+Infl:Cont:Sat  4   37.472 462.44  1.1901 0.87973  
+Type:Cont:Sat  6   28.256 457.23 10.4064 0.10855  
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> 
+> hnames <- lapply(housing[, -5], levels) # omit Freq
+> newData <- expand.grid(hnames)
+> newData$Sat <- ordered(newData$Sat)
+> house.pm <- predict(house.glm1, newData,
++                     type = "response")  # poisson means
+> house.pm <- matrix(house.pm, ncol = 3, byrow = TRUE,
++                    dimnames = list(NULL, hnames[[1]]))
+> house.pr <- house.pm/drop(house.pm %*% rep(1, 3))
+> cbind(expand.grid(hnames[-1]), round(house.pr, 2))
+     Infl      Type Cont  Low Medium High
+1     Low     Tower  Low 0.40   0.26 0.34
+2  Medium     Tower  Low 0.26   0.27 0.47
+3    High     Tower  Low 0.15   0.19 0.66
+4     Low Apartment  Low 0.54   0.23 0.23
+5  Medium Apartment  Low 0.39   0.26 0.34
+6    High Apartment  Low 0.26   0.21 0.53
+7     Low    Atrium  Low 0.43   0.32 0.25
+8  Medium    Atrium  Low 0.30   0.35 0.36
+9    High    Atrium  Low 0.19   0.27 0.54
+10    Low   Terrace  Low 0.65   0.22 0.14
+11 Medium   Terrace  Low 0.51   0.27 0.22
+12   High   Terrace  Low 0.37   0.24 0.39
+13    Low     Tower High 0.30   0.28 0.42
+14 Medium     Tower High 0.18   0.27 0.54
+15   High     Tower High 0.10   0.19 0.71
+16    Low Apartment High 0.44   0.27 0.30
+17 Medium Apartment High 0.30   0.28 0.42
+18   High Apartment High 0.18   0.21 0.61
+19    Low    Atrium High 0.33   0.36 0.31
+20 Medium    Atrium High 0.22   0.36 0.42
+21   High    Atrium High 0.13   0.27 0.60
+22    Low   Terrace High 0.55   0.27 0.19
+23 Medium   Terrace High 0.40   0.31 0.29
+24   High   Terrace High 0.27   0.26 0.47
+> 
+> # Iterative proportional scaling
+> loglm(Freq ~ Infl*Type*Cont + Sat*(Infl+Type+Cont), data = housing)
+Call:
+loglm(formula = Freq ~ Infl * Type * Cont + Sat * (Infl + Type + 
+    Cont), data = housing)
+
+Statistics:
+                      X^2 df  P(> X^2)
+Likelihood Ratio 38.66222 34 0.2671359
+Pearson          38.90831 34 0.2582333
+> 
+> 
+> # multinomial model
+> library(nnet)
+> (house.mult<- multinom(Sat ~ Infl + Type + Cont, weights = Freq,
++                        data = housing))
+# weights:  24 (14 variable)
+initial  value 1846.767257 
+iter  10 value 1747.045232
+final  value 1735.041933 
+converged
+Call:
+multinom(formula = Sat ~ Infl + Type + Cont, data = housing, 
+    weights = Freq)
+
+Coefficients:
+       (Intercept) InflMedium  InflHigh TypeApartment TypeAtrium TypeTerrace
+Medium  -0.4192316  0.4464003 0.6649367    -0.4356851  0.1313663  -0.6665728
+High    -0.1387453  0.7348626 1.6126294    -0.7356261 -0.4079808  -1.4123333
+        ContHigh
+Medium 0.3608513
+High   0.4818236
+
+Residual Deviance: 3470.084 
+AIC: 3498.084 
+> house.mult2 <- multinom(Sat ~ Infl*Type*Cont, weights = Freq,
++                         data = housing)
+# weights:  75 (48 variable)
+initial  value 1846.767257 
+iter  10 value 1734.465581
+iter  20 value 1717.220153
+iter  30 value 1715.760679
+iter  40 value 1715.713306
+final  value 1715.710836 
+converged
+> anova(house.mult, house.mult2)
+Likelihood ratio tests of Multinomial Models
+
+Response: Sat
+               Model Resid. df Resid. Dev   Test    Df LR stat.   Pr(Chi)
+1 Infl + Type + Cont       130   3470.084                                
+2 Infl * Type * Cont        96   3431.422 1 vs 2    34 38.66219 0.2671367
+> 
+> house.pm <- predict(house.mult, expand.grid(hnames[-1]), type = "probs")
+> cbind(expand.grid(hnames[-1]), round(house.pm, 2))
+     Infl      Type Cont  Low Medium High
+1     Low     Tower  Low 0.40   0.26 0.34
+2  Medium     Tower  Low 0.26   0.27 0.47
+3    High     Tower  Low 0.15   0.19 0.66
+4     Low Apartment  Low 0.54   0.23 0.23
+5  Medium Apartment  Low 0.39   0.26 0.34
+6    High Apartment  Low 0.26   0.21 0.53
+7     Low    Atrium  Low 0.43   0.32 0.25
+8  Medium    Atrium  Low 0.30   0.35 0.36
+9    High    Atrium  Low 0.19   0.27 0.54
+10    Low   Terrace  Low 0.65   0.22 0.14
+11 Medium   Terrace  Low 0.51   0.27 0.22
+12   High   Terrace  Low 0.37   0.24 0.39
+13    Low     Tower High 0.30   0.28 0.42
+14 Medium     Tower High 0.18   0.27 0.54
+15   High     Tower High 0.10   0.19 0.71
+16    Low Apartment High 0.44   0.27 0.30
+17 Medium Apartment High 0.30   0.28 0.42
+18   High Apartment High 0.18   0.21 0.61
+19    Low    Atrium High 0.33   0.36 0.31
+20 Medium    Atrium High 0.22   0.36 0.42
+21   High    Atrium High 0.13   0.27 0.60
+22    Low   Terrace High 0.55   0.27 0.19
+23 Medium   Terrace High 0.40   0.31 0.29
+24   High   Terrace High 0.27   0.26 0.47
+> 
+> # proportional odds model
+> house.cpr <- apply(house.pr, 1, cumsum)
+> logit <- function(x) log(x/(1-x))
+> house.ld <- logit(house.cpr[2, ]) - logit(house.cpr[1, ])
+> (ratio <- sort(drop(house.ld)))
+ [1] 0.9357341 0.9854433 1.0573182 1.0680491 1.0772649 1.0803574 1.0824895
+ [8] 1.0998759 1.1199975 1.1554228 1.1768138 1.1866427 1.2091541 1.2435026
+[15] 1.2724096 1.2750171 1.2849903 1.3062598 1.3123988 1.3904715 1.4540087
+[22] 1.4947753 1.4967585 1.6068789
+> mean(ratio)
+[1] 1.223835
+> 
+> (house.plr <- polr(Sat ~ Infl + Type + Cont,
++                    data = housing, weights = Freq))
+Call:
+polr(formula = Sat ~ Infl + Type + Cont, data = housing, weights = Freq)
+
+Coefficients:
+   InflMedium      InflHigh TypeApartment    TypeAtrium   TypeTerrace 
+    0.5663937     1.2888191    -0.5723501    -0.3661866    -1.0910149 
+     ContHigh 
+    0.3602841 
+
+Intercepts:
+ Low|Medium Medium|High 
+ -0.4961353   0.6907083 
+
+Residual Deviance: 3479.149 
+AIC: 3495.149 
+> 
+> house.pr1 <- predict(house.plr, expand.grid(hnames[-1]), type = "probs")
+> cbind(expand.grid(hnames[-1]), round(house.pr1, 2))
+     Infl      Type Cont  Low Medium High
+1     Low     Tower  Low 0.38   0.29 0.33
+2  Medium     Tower  Low 0.26   0.27 0.47
+3    High     Tower  Low 0.14   0.21 0.65
+4     Low Apartment  Low 0.52   0.26 0.22
+5  Medium Apartment  Low 0.38   0.29 0.33
+6    High Apartment  Low 0.23   0.26 0.51
+7     Low    Atrium  Low 0.47   0.27 0.26
+8  Medium    Atrium  Low 0.33   0.29 0.38
+9    High    Atrium  Low 0.19   0.25 0.56
+10    Low   Terrace  Low 0.64   0.21 0.14
+11 Medium   Terrace  Low 0.51   0.26 0.23
+12   High   Terrace  Low 0.33   0.29 0.38
+13    Low     Tower High 0.30   0.28 0.42
+14 Medium     Tower High 0.19   0.25 0.56
+15   High     Tower High 0.10   0.17 0.72
+16    Low Apartment High 0.43   0.28 0.29
+17 Medium Apartment High 0.30   0.28 0.42
+18   High Apartment High 0.17   0.23 0.60
+19    Low    Atrium High 0.38   0.29 0.33
+20 Medium    Atrium High 0.26   0.27 0.47
+21   High    Atrium High 0.14   0.21 0.64
+22    Low   Terrace High 0.56   0.25 0.19
+23 Medium   Terrace High 0.42   0.28 0.30
+24   High   Terrace High 0.26   0.27 0.47
+> 
+> Fr <- matrix(housing$Freq, ncol  =  3, byrow = TRUE)
+> 2*sum(Fr*log(house.pr/house.pr1))
+[1] 9.065433
+> 
+> house.plr2 <- stepAIC(house.plr, ~.^2)
+Start:  AIC=3495.15
+Sat ~ Infl + Type + Cont
+
+            Df    AIC
++ Infl:Type  6 3484.6
++ Type:Cont  3 3492.5
+<none>         3495.1
++ Infl:Cont  2 3498.9
+- Cont       1 3507.5
+- Type       3 3545.1
+- Infl       2 3599.4
+
+Step:  AIC=3484.64
+Sat ~ Infl + Type + Cont + Infl:Type
+
+            Df    AIC
++ Type:Cont  3 3482.7
+<none>         3484.6
++ Infl:Cont  2 3488.5
+- Infl:Type  6 3495.1
+- Cont       1 3497.8
+
+Step:  AIC=3482.69
+Sat ~ Infl + Type + Cont + Infl:Type + Type:Cont
+
+            Df    AIC
+<none>         3482.7
+- Type:Cont  3 3484.6
++ Infl:Cont  2 3486.6
+- Infl:Type  6 3492.5
+> house.plr2$anova
+Stepwise Model Path 
+Analysis of Deviance Table
+
+Initial Model:
+Sat ~ Infl + Type + Cont
+
+Final Model:
+Sat ~ Infl + Type + Cont + Infl:Type + Type:Cont
+
+
+         Step Df  Deviance Resid. Df Resid. Dev      AIC
+1                               1673   3479.149 3495.149
+2 + Infl:Type  6 22.509347      1667   3456.640 3484.640
+3 + Type:Cont  3  7.945029      1664   3448.695 3482.695
+> 
+> 
+> 
+> base::options(contrasts = c(unordered = "contr.treatment",ordered = "contr.poly"))
+> cleanEx()
+
+detaching ‘package:nnet’
+
+> nameEx("huber")
+> ### * huber
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: huber
+> ### Title: Huber M-estimator of Location with MAD Scale
+> ### Aliases: huber
+> ### Keywords: robust
+> 
+> ### ** Examples
+> 
+> huber(chem)
+$mu
+[1] 3.206724
+
+$s
+[1] 0.526323
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("hubers")
+> ### * hubers
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: hubers
+> ### Title: Huber Proposal 2 Robust Estimator of Location and/or Scale
+> ### Aliases: hubers
+> ### Keywords: robust
+> 
+> ### ** Examples
+> 
+> hubers(chem)
+$mu
+[1] 3.205498
+
+$s
+[1] 0.673652
+
+> hubers(chem, mu=3.68)
+$mu
+[1] 3.68
+
+$s
+[1] 0.9409628
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("immer")
+> ### * immer
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: immer
+> ### Title: Yields from a Barley Field Trial
+> ### Aliases: immer
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> immer.aov <- aov(cbind(Y1,Y2) ~ Loc + Var, data = immer)
+> summary(immer.aov)
+ Response Y1 :
+            Df  Sum Sq Mean Sq F value    Pr(>F)    
+Loc          5 17829.8  3566.0 21.8923 1.751e-07 ***
+Var          4  2756.6   689.2  4.2309   0.01214 *  
+Residuals   20  3257.7   162.9                      
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+ Response Y2 :
+            Df  Sum Sq Mean Sq F value    Pr(>F)    
+Loc          5 10285.0 2056.99 10.3901 5.049e-05 ***
+Var          4  2845.2  711.29  3.5928   0.02306 *  
+Residuals   20  3959.5  197.98                      
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+> 
+> immer.aov <- aov((Y1+Y2)/2 ~ Var + Loc, data = immer)
+> summary(immer.aov)
+            Df Sum Sq Mean Sq F value   Pr(>F)    
+Var          4   2655   663.7   5.989  0.00245 ** 
+Loc          5  10610  2122.1  19.148 5.21e-07 ***
+Residuals   20   2217   110.8                     
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> model.tables(immer.aov, type = "means", se = TRUE, cterms = "Var")
+Tables of means
+Grand mean
+       
+101.09 
+
+ Var 
+Var
+     M      P      S      T      V 
+ 94.39 102.54  91.13 118.20  99.18 
+
+Standard errors for differences of means
+          Var
+        6.078
+replic.     6
+> 
+> 
+> 
+> cleanEx()
+> nameEx("isoMDS")
+> ### * isoMDS
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: isoMDS
+> ### Title: Kruskal's Non-metric Multidimensional Scaling
+> ### Aliases: isoMDS Shepard
+> ### Keywords: multivariate
+> 
+> ### ** Examples
+> 
+> swiss.x <- as.matrix(swiss[, -1])
+> swiss.dist <- dist(swiss.x)
+> swiss.mds <- isoMDS(swiss.dist)
+initial  value 2.979731 
+iter   5 value 2.431486
+iter  10 value 2.343353
+final  value 2.338839 
+converged
+> plot(swiss.mds$points, type = "n")
+> text(swiss.mds$points, labels = as.character(1:nrow(swiss.x)))
+> swiss.sh <- Shepard(swiss.dist, swiss.mds$points)
+> plot(swiss.sh, pch = ".")
+> lines(swiss.sh$x, swiss.sh$yf, type = "S")
+> 
+> 
+> 
+> cleanEx()
+> nameEx("kde2d")
+> ### * kde2d
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: kde2d
+> ### Title: Two-Dimensional Kernel Density Estimation
+> ### Aliases: kde2d
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> attach(geyser)
+> plot(duration, waiting, xlim = c(0.5,6), ylim = c(40,100))
+> f1 <- kde2d(duration, waiting, n = 50, lims = c(0.5, 6, 40, 100))
+> image(f1, zlim = c(0, 0.05))
+> f2 <- kde2d(duration, waiting, n = 50, lims = c(0.5, 6, 40, 100),
++             h = c(width.SJ(duration), width.SJ(waiting)) )
+> image(f2, zlim = c(0, 0.05))
+> persp(f2, phi = 30, theta = 20, d = 5)
+> 
+> plot(duration[-272], duration[-1], xlim = c(0.5, 6),
++      ylim = c(1, 6),xlab = "previous duration", ylab = "duration")
+> f1 <- kde2d(duration[-272], duration[-1],
++             h = rep(1.5, 2), n = 50, lims = c(0.5, 6, 0.5, 6))
+> contour(f1, xlab = "previous duration",
++         ylab = "duration", levels  =  c(0.05, 0.1, 0.2, 0.4) )
+> f1 <- kde2d(duration[-272], duration[-1],
++             h = rep(0.6, 2), n = 50, lims = c(0.5, 6, 0.5, 6))
+> contour(f1, xlab = "previous duration",
++         ylab = "duration", levels  =  c(0.05, 0.1, 0.2, 0.4) )
+> f1 <- kde2d(duration[-272], duration[-1],
++             h = rep(0.4, 2), n = 50, lims = c(0.5, 6, 0.5, 6))
+> contour(f1, xlab = "previous duration",
++         ylab = "duration", levels  =  c(0.05, 0.1, 0.2, 0.4) )
+> detach("geyser")
+> 
+> 
+> 
+> cleanEx()
+> nameEx("lda")
+> ### * lda
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: lda
+> ### Title: Linear Discriminant Analysis
+> ### Aliases: lda lda.default lda.data.frame lda.formula lda.matrix
+> ###   model.frame.lda print.lda coef.lda
+> ### Keywords: multivariate
+> 
+> ### ** Examples
+> 
+> Iris <- data.frame(rbind(iris3[,,1], iris3[,,2], iris3[,,3]),
++                    Sp = rep(c("s","c","v"), rep(50,3)))
+> train <- sample(1:150, 75)
+> table(Iris$Sp[train])
+
+ c  s  v 
+28 26 21 
+> ## your answer may differ
+> ##  c  s  v
+> ## 22 23 30
+> z <- lda(Sp ~ ., Iris, prior = c(1,1,1)/3, subset = train)
+> predict(z, Iris[-train, ])$class
+ [1] s s s s s s s s s s s s s s s s s s s s s s s s c c c c c c c c c c c c c c
+[39] c c c c c c c c v v v v v v v v v v v v v v v v v v v v v v v v v v v v v
+Levels: c s v
+> ##  [1] s s s s s s s s s s s s s s s s s s s s s s s s s s s c c c
+> ## [31] c c c c c c c v c c c c v c c c c c c c c c c c c v v v v v
+> ## [61] v v v v v v v v v v v v v v v
+> (z1 <- update(z, . ~ . - Petal.W.))
+Call:
+lda(Sp ~ Sepal.L. + Sepal.W. + Petal.L., data = Iris, prior = c(1, 
+    1, 1)/3, subset = train)
+
+Prior probabilities of groups:
+        c         s         v 
+0.3333333 0.3333333 0.3333333 
+
+Group means:
+  Sepal.L. Sepal.W. Petal.L.
+c 5.878571 2.785714 4.278571
+s 4.950000 3.338462 1.457692
+v 6.504762 2.957143 5.500000
+
+Coefficients of linear discriminants:
+                LD1        LD2
+Sepal.L.  1.2555097 -0.2975141
+Sepal.W.  0.9085695  2.8401071
+Petal.L. -3.5502485  0.4380715
+
+Proportion of trace:
+   LD1    LD2 
+0.9957 0.0043 
+> 
+> 
+> 
+> cleanEx()
+> nameEx("leuk")
+> ### * leuk
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: leuk
+> ### Title: Survival Times and White Blood Counts for Leukaemia Patients
+> ### Aliases: leuk
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> library(survival)
+> plot(survfit(Surv(time) ~ ag, data = leuk), lty = 2:3, col = 2:3)
+> 
+> # now Cox models
+> leuk.cox <- coxph(Surv(time) ~ ag + log(wbc), leuk)
+> summary(leuk.cox)
+Call:
+coxph(formula = Surv(time) ~ ag + log(wbc), data = leuk)
+
+  n= 33, number of events= 33 
+
+             coef exp(coef) se(coef)      z Pr(>|z|)   
+agpresent -1.0691    0.3433   0.4293 -2.490  0.01276 * 
+log(wbc)   0.3677    1.4444   0.1360  2.703  0.00687 **
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+          exp(coef) exp(-coef) lower .95 upper .95
+agpresent    0.3433     2.9126     0.148    0.7964
+log(wbc)     1.4444     0.6923     1.106    1.8857
+
+Concordance= 0.726  (se = 0.065 )
+Rsquare= 0.377   (max possible= 0.994 )
+Likelihood ratio test= 15.64  on 2 df,   p=0.0004014
+Wald test            = 15.06  on 2 df,   p=0.0005365
+Score (logrank) test = 16.49  on 2 df,   p=0.0002629
+
+> 
+> 
+> 
+> cleanEx()
+
+detaching ‘package:survival’
+
+> nameEx("lm.ridge")
+> ### * lm.ridge
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: lm.ridge
+> ### Title: Ridge Regression
+> ### Aliases: lm.ridge plot.ridgelm print.ridgelm select select.ridgelm
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> longley # not the same as the S-PLUS dataset
+     GNP.deflator     GNP Unemployed Armed.Forces Population Year Employed
+1947         83.0 234.289      235.6        159.0    107.608 1947   60.323
+1948         88.5 259.426      232.5        145.6    108.632 1948   61.122
+1949         88.2 258.054      368.2        161.6    109.773 1949   60.171
+1950         89.5 284.599      335.1        165.0    110.929 1950   61.187
+1951         96.2 328.975      209.9        309.9    112.075 1951   63.221
+1952         98.1 346.999      193.2        359.4    113.270 1952   63.639
+1953         99.0 365.385      187.0        354.7    115.094 1953   64.989
+1954        100.0 363.112      357.8        335.0    116.219 1954   63.761
+1955        101.2 397.469      290.4        304.8    117.388 1955   66.019
+1956        104.6 419.180      282.2        285.7    118.734 1956   67.857
+1957        108.4 442.769      293.6        279.8    120.445 1957   68.169
+1958        110.8 444.546      468.1        263.7    121.950 1958   66.513
+1959        112.6 482.704      381.3        255.2    123.366 1959   68.655
+1960        114.2 502.601      393.1        251.4    125.368 1960   69.564
+1961        115.7 518.173      480.6        257.2    127.852 1961   69.331
+1962        116.9 554.894      400.7        282.7    130.081 1962   70.551
+> names(longley)[1] <- "y"
+> lm.ridge(y ~ ., longley)
+                        GNP    Unemployed  Armed.Forces    Population 
+2946.85636017    0.26352725    0.03648291    0.01116105   -1.73702984 
+         Year      Employed 
+  -1.41879853    0.23128785 
+> plot(lm.ridge(y ~ ., longley,
++               lambda = seq(0,0.1,0.001)))
+> select(lm.ridge(y ~ ., longley,
++                lambda = seq(0,0.1,0.0001)))
+modified HKB estimator is 0.006836982 
+modified L-W estimator is 0.05267247 
+smallest value of GCV  at 0.0057 
+> 
+> 
+> 
+> cleanEx()
+> nameEx("loglm")
+> ### * loglm
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: loglm
+> ### Title: Fit Log-Linear Models by Iterative Proportional Scaling
+> ### Aliases: loglm
+> ### Keywords: category models
+> 
+> ### ** Examples
+> 
+> # The data frames  Cars93, minn38 and quine are available
+> # in the MASS package.
+> 
+> # Case 1: frequencies specified as an array.
+> sapply(minn38, function(x) length(levels(x)))
+ hs phs fol sex   f 
+  3   4   7   2   0 
+> ## hs phs fol sex f
+> ##  3   4   7   2 0
+> ##minn38a <- array(0, c(3,4,7,2), lapply(minn38[, -5], levels))
+> ##minn38a[data.matrix(minn38[,-5])] <- minn38$f
+> 
+> ## or more simply
+> minn38a <- xtabs(f ~ ., minn38)
+> 
+> fm <- loglm(~ 1 + 2 + 3 + 4, minn38a)  # numerals as names.
+> deviance(fm)
+[1] 3711.914
+> ## [1] 3711.9
+> fm1 <- update(fm, .~.^2)
+> fm2 <- update(fm, .~.^3, print = TRUE)
+5 iterations: deviation 0.07512432 
+> ## 5 iterations: deviation 0.075
+> anova(fm, fm1, fm2)
+LR tests for hierarchical log-linear models
+
+Model 1:
+ ~1 + 2 + 3 + 4 
+Model 2:
+ . ~ `1` + `2` + `3` + `4` + `1`:`2` + `1`:`3` + `1`:`4` + `2`:`3` + `2`:`4` + `3`:`4` 
+Model 3:
+ . ~ `1` + `2` + `3` + `4` + `1`:`2` + `1`:`3` + `1`:`4` + `2`:`3` + `2`:`4` + `3`:`4` + `1`:`2`:`3` + `1`:`2`:`4` + `1`:`3`:`4` + `2`:`3`:`4` 
+
+            Deviance  df Delta(Dev) Delta(df) P(> Delta(Dev)
+Model 1   3711.91367 155                                    
+Model 2    220.04285 108 3491.87082        47        0.00000
+Model 3     47.74492  36  172.29794        72        0.00000
+Saturated    0.00000   0   47.74492        36        0.09114
+> 
+> # Case 1. An array generated with xtabs.
+> 
+> loglm(~ Type + Origin, xtabs(~ Type + Origin, Cars93))
+Call:
+loglm(formula = ~Type + Origin, data = xtabs(~Type + Origin, 
+    Cars93))
+
+Statistics:
+                      X^2 df   P(> X^2)
+Likelihood Ratio 18.36179  5 0.00252554
+Pearson          14.07985  5 0.01511005
+> 
+> # Case 2.  Frequencies given as a vector in a data frame
+> names(quine)
+[1] "Eth"  "Sex"  "Age"  "Lrn"  "Days"
+> ## [1] "Eth"  "Sex"  "Age"  "Lrn"  "Days"
+> fm <- loglm(Days ~ .^2, quine)
+> gm <- glm(Days ~ .^2, poisson, quine)  # check glm.
+> c(deviance(fm), deviance(gm))          # deviances agree
+[1] 1368.669 1368.669
+> ## [1] 1368.7 1368.7
+> c(fm$df, gm$df)                        # resid df do not!
+[1] 127
+> c(fm$df, gm$df.residual)               # resid df do not!
+[1] 127 128
+> ## [1] 127 128
+> # The loglm residual degrees of freedom is wrong because of
+> # a non-detectable redundancy in the model matrix.
+> 
+> 
+> 
+> cleanEx()
+> nameEx("logtrans")
+> ### * logtrans
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: logtrans
+> ### Title: Estimate log Transformation Parameter
+> ### Aliases: logtrans logtrans.formula logtrans.lm logtrans.default
+> ### Keywords: regression models hplot
+> 
+> ### ** Examples
+> 
+> logtrans(Days ~ Age*Sex*Eth*Lrn, data = quine,
++          alpha = seq(0.75, 6.5, len=20))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("lqs")
+> ### * lqs
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: lqs
+> ### Title: Resistant Regression
+> ### Aliases: lqs lqs.formula lqs.default lmsreg ltsreg
+> ### Keywords: models robust
+> 
+> ### ** Examples
+> 
+> set.seed(123) # make reproducible
+> lqs(stack.loss ~ ., data = stackloss)
+Call:
+lqs.formula(formula = stack.loss ~ ., data = stackloss)
+
+Coefficients:
+(Intercept)     Air.Flow   Water.Temp   Acid.Conc.  
+ -3.631e+01    7.292e-01    4.167e-01   -8.131e-17  
+
+Scale estimates 0.9149 1.0148 
+
+> lqs(stack.loss ~ ., data = stackloss, method = "S", nsamp = "exact")
+Call:
+lqs.formula(formula = stack.loss ~ ., data = stackloss, nsamp = "exact", 
+    method = "S")
+
+Coefficients:
+(Intercept)     Air.Flow   Water.Temp   Acid.Conc.  
+  -35.37611      0.82522      0.44248     -0.07965  
+
+Scale estimates 1.912 
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("mca")
+> ### * mca
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: mca
+> ### Title: Multiple Correspondence Analysis
+> ### Aliases: mca print.mca
+> ### Keywords: category multivariate
+> 
+> ### ** Examples
+> 
+> farms.mca <- mca(farms, abbrev=TRUE)
+> farms.mca
+Call:
+mca(df = farms, abbrev = TRUE)
+
+Multiple correspondence analysis of 20 cases of 4 factors
+
+Correlations 0.806 0.745  cumulative % explained 26.87 51.71 
+> plot(farms.mca)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("menarche")
+> ### * menarche
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: menarche
+> ### Title: Age of Menarche in Warsaw
+> ### Aliases: menarche
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> mprob <- glm(cbind(Menarche, Total - Menarche) ~ Age,
++              binomial(link = probit), data = menarche)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("motors")
+> ### * motors
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: motors
+> ### Title: Accelerated Life Testing of Motorettes
+> ### Aliases: motors
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> library(survival)
+> plot(survfit(Surv(time, cens) ~ factor(temp), motors), conf.int = FALSE)
+> # fit Weibull model
+> motor.wei <- survreg(Surv(time, cens) ~ temp, motors)
+> summary(motor.wei)
+
+Call:
+survreg(formula = Surv(time, cens) ~ temp, data = motors)
+              Value Std. Error     z         p
+(Intercept) 16.3185    0.62296  26.2 3.03e-151
+temp        -0.0453    0.00319 -14.2  6.74e-46
+Log(scale)  -1.0956    0.21480  -5.1  3.38e-07
+
+Scale= 0.334 
+
+Weibull distribution
+Loglik(model)= -147.4   Loglik(intercept only)= -169.5
+	Chisq= 44.32 on 1 degrees of freedom, p= 2.8e-11 
+Number of Newton-Raphson Iterations: 7 
+n= 40 
+
+> # and predict at 130C
+> unlist(predict(motor.wei, data.frame(temp=130), se.fit = TRUE))
+   fit.1 se.fit.1 
+33813.06  7506.36 
+> 
+> motor.cox <- coxph(Surv(time, cens) ~ temp, motors)
+> summary(motor.cox)
+Call:
+coxph(formula = Surv(time, cens) ~ temp, data = motors)
+
+  n= 40, number of events= 17 
+
+        coef exp(coef) se(coef)     z Pr(>|z|)    
+temp 0.09185   1.09620  0.02736 3.358 0.000786 ***
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+     exp(coef) exp(-coef) lower .95 upper .95
+temp     1.096     0.9122     1.039     1.157
+
+Concordance= 0.84  (se = 0.076 )
+Rsquare= 0.472   (max possible= 0.936 )
+Likelihood ratio test= 25.56  on 1 df,   p=4.299e-07
+Wald test            = 11.27  on 1 df,   p=0.0007863
+Score (logrank) test = 22.73  on 1 df,   p=1.862e-06
+
+> # predict at temperature 200
+> plot(survfit(motor.cox, newdata = data.frame(temp=200),
++      conf.type = "log-log"))
+> summary( survfit(motor.cox, newdata = data.frame(temp=130)) )
+Call: survfit(formula = motor.cox, newdata = data.frame(temp = 130))
+
+ time n.risk n.event survival  std.err lower 95% CI upper 95% CI
+  408     40       4    1.000 0.000254        0.999            1
+  504     36       3    1.000 0.000498        0.999            1
+ 1344     28       2    0.999 0.001910        0.995            1
+ 1440     26       1    0.998 0.002697        0.993            1
+ 1764     20       1    0.996 0.005325        0.986            1
+ 2772     19       1    0.994 0.007920        0.978            1
+ 3444     18       1    0.991 0.010673        0.971            1
+ 3542     17       1    0.988 0.013667        0.962            1
+ 3780     16       1    0.985 0.016976        0.952            1
+ 4860     15       1    0.981 0.020692        0.941            1
+ 5196     14       1    0.977 0.024941        0.929            1
+> 
+> 
+> 
+> cleanEx()
+
+detaching ‘package:survival’
+
+> nameEx("muscle")
+> ### * muscle
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: muscle
+> ### Title: Effect of Calcium Chloride on Muscle Contraction in Rat Hearts
+> ### Aliases: muscle
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> A <- model.matrix(~ Strip - 1, data=muscle)
+> rats.nls1 <- nls(log(Length) ~ cbind(A, rho^Conc),
++    data = muscle, start = c(rho=0.1), algorithm="plinear")
+> (B <- coef(rats.nls1))
+          rho .lin.StripS01 .lin.StripS02 .lin.StripS03 .lin.StripS04 
+   0.07776401    3.08304824    3.30137838    3.44562531    2.80464434 
+.lin.StripS05 .lin.StripS06 .lin.StripS07 .lin.StripS08 .lin.StripS09 
+   2.60835015    3.03357725    3.52301734    3.38711844    3.46709396 
+.lin.StripS10 .lin.StripS11 .lin.StripS12 .lin.StripS13 .lin.StripS14 
+   3.81438456    3.73878664    3.51332581    3.39741115    3.47088608 
+.lin.StripS15 .lin.StripS16 .lin.StripS17 .lin.StripS18 .lin.StripS19 
+   3.72895847    3.31863862    3.37938673    2.96452195    3.58468686 
+.lin.StripS20 .lin.StripS21        .lin22 
+   3.39628029    3.36998872   -2.96015460 
+> 
+> st <- list(alpha = B[2:22], beta = B[23], rho = B[1])
+> (rats.nls2 <- nls(log(Length) ~ alpha[Strip] + beta*rho^Conc,
++                   data = muscle, start = st))
+Nonlinear regression model
+  model: log(Length) ~ alpha[Strip] + beta * rho^Conc
+   data: muscle
+alpha..lin.StripS01 alpha..lin.StripS02 alpha..lin.StripS03 alpha..lin.StripS04 
+            3.08305             3.30138             3.44563             2.80464 
+alpha..lin.StripS05 alpha..lin.StripS06 alpha..lin.StripS07 alpha..lin.StripS08 
+            2.60835             3.03358             3.52302             3.38712 
+alpha..lin.StripS09 alpha..lin.StripS10 alpha..lin.StripS11 alpha..lin.StripS12 
+            3.46709             3.81438             3.73879             3.51333 
+alpha..lin.StripS13 alpha..lin.StripS14 alpha..lin.StripS15 alpha..lin.StripS16 
+            3.39741             3.47089             3.72896             3.31864 
+alpha..lin.StripS17 alpha..lin.StripS18 alpha..lin.StripS19 alpha..lin.StripS20 
+            3.37939             2.96452             3.58469             3.39628 
+alpha..lin.StripS21         beta..lin22             rho.rho 
+            3.36999            -2.96015             0.07776 
+ residual sum-of-squares: 1.045
+
+Number of iterations to convergence: 0 
+Achieved convergence tolerance: 4.923e-06
+> 
+> Muscle <- with(muscle, {
++ Muscle <- expand.grid(Conc = sort(unique(Conc)), Strip = levels(Strip))
++ Muscle$Yhat <- predict(rats.nls2, Muscle)
++ Muscle <- cbind(Muscle, logLength = rep(as.numeric(NA), 126))
++ ind <- match(paste(Strip, Conc),
++             paste(Muscle$Strip, Muscle$Conc))
++ Muscle$logLength[ind] <- log(Length)
++ Muscle})
+> 
+> lattice::xyplot(Yhat ~ Conc | Strip, Muscle, as.table = TRUE,
++    ylim = range(c(Muscle$Yhat, Muscle$logLength), na.rm = TRUE),
++    subscripts = TRUE, xlab = "Calcium Chloride concentration (mM)",
++    ylab = "log(Length in mm)", panel =
++    function(x, y, subscripts, ...) {
++       panel.xyplot(x, Muscle$logLength[subscripts], ...)
++       llines(spline(x, y))
++    })
+> 
+> 
+> 
+> cleanEx()
+> nameEx("mvrnorm")
+> ### * mvrnorm
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: mvrnorm
+> ### Title: Simulate from a Multivariate Normal Distribution
+> ### Aliases: mvrnorm
+> ### Keywords: distribution multivariate
+> 
+> ### ** Examples
+> 
+> Sigma <- matrix(c(10,3,3,2),2,2)
+> Sigma
+     [,1] [,2]
+[1,]   10    3
+[2,]    3    2
+> var(mvrnorm(n = 1000, rep(0, 2), Sigma))
+          [,1]     [,2]
+[1,] 10.697849 3.228279
+[2,]  3.228279 2.165271
+> var(mvrnorm(n = 1000, rep(0, 2), Sigma, empirical = TRUE))
+     [,1] [,2]
+[1,]   10    3
+[2,]    3    2
+> 
+> 
+> 
+> cleanEx()
+> nameEx("negative.binomial")
+> ### * negative.binomial
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: negative.binomial
+> ### Title: Family function for Negative Binomial GLMs
+> ### Aliases: negative.binomial
+> ### Keywords: regression models
+> 
+> ### ** Examples
+> 
+> # Fitting a Negative Binomial model to the quine data
+> #   with theta = 2 assumed known.
+> #
+> glm(Days ~ .^4, family = negative.binomial(2), data = quine)
+
+Call:  glm(formula = Days ~ .^4, family = negative.binomial(2), data = quine)
+
+Coefficients:
+          (Intercept)                   EthN                   SexM  
+               3.0564                -0.1386                -0.4914  
+                AgeF1                  AgeF2                  AgeF3  
+              -0.6227                -2.3632                -0.3784  
+                LrnSL              EthN:SexM             EthN:AgeF1  
+              -1.9577                -0.7524                 0.1029  
+           EthN:AgeF2             EthN:AgeF3             EthN:LrnSL  
+              -0.5546                 0.0633                 2.2588  
+           SexM:AgeF1             SexM:AgeF2             SexM:AgeF3  
+               0.4092                 3.1098                 1.1145  
+           SexM:LrnSL            AgeF1:LrnSL            AgeF2:LrnSL  
+               1.5900                 2.6421                 4.8585  
+          AgeF3:LrnSL        EthN:SexM:AgeF1        EthN:SexM:AgeF2  
+                   NA                -0.3105                 0.3469  
+      EthN:SexM:AgeF3        EthN:SexM:LrnSL       EthN:AgeF1:LrnSL  
+               0.8329                -0.1639                -3.5493  
+     EthN:AgeF2:LrnSL       EthN:AgeF3:LrnSL       SexM:AgeF1:LrnSL  
+              -3.3315                     NA                -2.4285  
+     SexM:AgeF2:LrnSL       SexM:AgeF3:LrnSL  EthN:SexM:AgeF1:LrnSL  
+              -4.1914                     NA                 2.1711  
+EthN:SexM:AgeF2:LrnSL  EthN:SexM:AgeF3:LrnSL  
+               2.1029                     NA  
+
+Degrees of Freedom: 145 Total (i.e. Null);  118 Residual
+Null Deviance:	    280.2 
+Residual Deviance: 172 	AIC: 1095
+> 
+> 
+> 
+> cleanEx()
+> nameEx("nlschools")
+> ### * nlschools
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: nlschools
+> ### Title: Eighth-Grade Pupils in the Netherlands
+> ### Aliases: nlschools
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> ## Don't show: 
+> op <- options(digits=5)
+> ## End(Don't show)
+> nl1 <- within(nlschools, {
++ IQave <- tapply(IQ, class, mean)[as.character(class)]
++ IQ <- IQ - IQave
++ })
+> cen <- c("IQ", "IQave", "SES")
+> nl1[cen] <- scale(nl1[cen], center = TRUE, scale = FALSE)
+> 
+> nl.lme <- nlme::lme(lang ~ IQ*COMB + IQave + SES,
++                     random = ~ IQ | class, data = nl1)
+> summary(nl.lme)
+Linear mixed-effects model fit by REML
+ Data: nl1 
+    AIC   BIC  logLik
+  15120 15178 -7550.2
+
+Random effects:
+ Formula: ~IQ | class
+ Structure: General positive-definite, Log-Cholesky parametrization
+            StdDev  Corr  
+(Intercept) 2.78707 (Intr)
+IQ          0.48424 -0.516
+Residual    6.24839       
+
+Fixed effects: lang ~ IQ * COMB + IQave + SES 
+             Value Std.Error   DF t-value p-value
+(Intercept) 41.370   0.35364 2151 116.985  0.0000
+IQ           2.124   0.10070 2151  21.088  0.0000
+COMB1       -1.672   0.58719  130  -2.847  0.0051
+IQave        3.248   0.30021  130  10.818  0.0000
+SES          0.157   0.01465 2151  10.697  0.0000
+IQ:COMB1     0.431   0.18594 2151   2.317  0.0206
+ Correlation: 
+         (Intr) IQ     COMB1  IQave  SES   
+IQ       -0.257                            
+COMB1    -0.609  0.155                     
+IQave    -0.049  0.041  0.171              
+SES       0.010 -0.190 -0.001 -0.168       
+IQ:COMB1  0.139 -0.522 -0.206 -0.016 -0.003
+
+Standardized Within-Group Residuals:
+      Min        Q1       Med        Q3       Max 
+-4.059387 -0.631084  0.065519  0.717864  2.794540 
+
+Number of Observations: 2287
+Number of Groups: 133 
+> ## Don't show: 
+> options(op)
+> ## End(Don't show)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("npk")
+> ### * npk
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: npk
+> ### Title: Classical N, P, K Factorial Experiment
+> ### Aliases: npk
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> options(contrasts = c("contr.sum", "contr.poly"))
+> npk.aov <- aov(yield ~ block + N*P*K, npk)
+> npk.aov
+Call:
+   aov(formula = yield ~ block + N * P * K, data = npk)
+
+Terms:
+                   block        N        P        K      N:P      N:K      P:K
+Sum of Squares  343.2950 189.2817   8.4017  95.2017  21.2817  33.1350   0.4817
+Deg. of Freedom        5        1        1        1        1        1        1
+                Residuals
+Sum of Squares   185.2867
+Deg. of Freedom        12
+
+Residual standard error: 3.929447
+1 out of 13 effects not estimable
+Estimated effects may be unbalanced
+> summary(npk.aov)
+            Df Sum Sq Mean Sq F value  Pr(>F)   
+block        5  343.3   68.66   4.447 0.01594 * 
+N            1  189.3  189.28  12.259 0.00437 **
+P            1    8.4    8.40   0.544 0.47490   
+K            1   95.2   95.20   6.166 0.02880 * 
+N:P          1   21.3   21.28   1.378 0.26317   
+N:K          1   33.1   33.14   2.146 0.16865   
+P:K          1    0.5    0.48   0.031 0.86275   
+Residuals   12  185.3   15.44                   
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> alias(npk.aov)
+Model :
+yield ~ block + N * P * K
+
+Complete :
+         (Intercept) block1 block2 block3 block4 block5 N1 P1 K1 N1:P1 N1:K1
+N1:P1:K1  0           1     -1     -1     -1      1      0  0  0  0     0   
+         P1:K1
+N1:P1:K1  0   
+
+> coef(npk.aov)
+(Intercept)      block1      block2      block3      block4      block5 
+ 54.8750000  -0.8500000   2.5750000   5.9000000  -4.7500000  -4.3500000 
+         N1          P1          K1       N1:P1       N1:K1       P1:K1 
+ -2.8083333   0.5916667   1.9916667  -0.9416667  -1.1750000   0.1416667 
+> options(contrasts = c("contr.treatment", "contr.poly"))
+> npk.aov1 <- aov(yield ~ block + N + K, data = npk)
+> summary.lm(npk.aov1)
+
+Call:
+aov(formula = yield ~ block + N + K, data = npk)
+
+Residuals:
+    Min      1Q  Median      3Q     Max 
+-6.4083 -2.1438  0.2042  2.3292  7.0750 
+
+Coefficients:
+            Estimate Std. Error t value Pr(>|t|)    
+(Intercept)   53.208      2.276  23.381  8.5e-14 ***
+block2         3.425      2.787   1.229  0.23690    
+block3         6.750      2.787   2.422  0.02769 *  
+block4        -3.900      2.787  -1.399  0.18082    
+block5        -3.500      2.787  -1.256  0.22723    
+block6         2.325      2.787   0.834  0.41646    
+N1             5.617      1.609   3.490  0.00302 ** 
+K1            -3.983      1.609  -2.475  0.02487 *  
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Residual standard error: 3.942 on 16 degrees of freedom
+Multiple R-squared:  0.7163,	Adjusted R-squared:  0.5922 
+F-statistic: 5.772 on 7 and 16 DF,  p-value: 0.001805
+
+> se.contrast(npk.aov1, list(N=="0", N=="1"), data = npk)
+[1] 1.609175
+> model.tables(npk.aov1, type = "means", se = TRUE)
+Tables of means
+Grand mean
+       
+54.875 
+
+ block 
+block
+    1     2     3     4     5     6 
+54.03 57.45 60.77 50.12 50.52 56.35 
+
+ N 
+N
+    0     1 
+52.07 57.68 
+
+ K 
+K
+    0     1 
+56.87 52.88 
+
+Standard errors for differences of means
+        block     N     K
+        2.787 1.609 1.609
+replic.     4    12    12
+> 
+> 
+> 
+> base::options(contrasts = c(unordered = "contr.treatment",ordered = "contr.poly"))
+> cleanEx()
+> nameEx("oats")
+> ### * oats
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: oats
+> ### Title: Data from an Oats Field Trial
+> ### Aliases: oats
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> oats$Nf <- ordered(oats$N, levels = sort(levels(oats$N)))
+> oats.aov <- aov(Y ~ Nf*V + Error(B/V), data = oats, qr = TRUE)
+> summary(oats.aov)
+
+Error: B
+          Df Sum Sq Mean Sq F value Pr(>F)
+Residuals  5  15875    3175               
+
+Error: B:V
+          Df Sum Sq Mean Sq F value Pr(>F)
+V          2   1786   893.2   1.485  0.272
+Residuals 10   6013   601.3               
+
+Error: Within
+          Df Sum Sq Mean Sq F value   Pr(>F)    
+Nf         3  20020    6673  37.686 2.46e-12 ***
+Nf:V       6    322      54   0.303    0.932    
+Residuals 45   7969     177                     
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> summary(oats.aov, split = list(Nf=list(L=1, Dev=2:3)))
+
+Error: B
+          Df Sum Sq Mean Sq F value Pr(>F)
+Residuals  5  15875    3175               
+
+Error: B:V
+          Df Sum Sq Mean Sq F value Pr(>F)
+V          2   1786   893.2   1.485  0.272
+Residuals 10   6013   601.3               
+
+Error: Within
+            Df Sum Sq Mean Sq F value   Pr(>F)    
+Nf           3  20020    6673  37.686 2.46e-12 ***
+  Nf: L      1  19536   19536 110.323 1.09e-13 ***
+  Nf: Dev    2    484     242   1.367    0.265    
+Nf:V         6    322      54   0.303    0.932    
+  Nf:V: L    2    168      84   0.475    0.625    
+  Nf:V: Dev  4    153      38   0.217    0.928    
+Residuals   45   7969     177                     
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> par(mfrow = c(1,2), pty = "s")
+> plot(fitted(oats.aov[[4]]), studres(oats.aov[[4]]))
+> abline(h = 0, lty = 2)
+> oats.pr <- proj(oats.aov)
+> qqnorm(oats.pr[[4]][,"Residuals"], ylab = "Stratum 4 residuals")
+> qqline(oats.pr[[4]][,"Residuals"])
+> 
+> par(mfrow = c(1,1), pty = "m")
+> oats.aov2 <- aov(Y ~ N + V + Error(B/V), data = oats, qr = TRUE)
+> model.tables(oats.aov2, type = "means", se = TRUE)
+Warning in model.tables.aovlist(oats.aov2, type = "means", se = TRUE) :
+  SEs for type 'means' are not yet implemented
+Tables of means
+Grand mean
+         
+103.9722 
+
+ N 
+N
+0.0cwt 0.2cwt 0.4cwt 0.6cwt 
+ 79.39  98.89 114.22 123.39 
+
+ V 
+V
+Golden.rain  Marvellous     Victory 
+     104.50      109.79       97.63 
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("parcoord")
+> ### * parcoord
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: parcoord
+> ### Title: Parallel Coordinates Plot
+> ### Aliases: parcoord
+> ### Keywords: hplot
+> 
+> ### ** Examples
+> 
+> parcoord(state.x77[, c(7, 4, 6, 2, 5, 3)])
+> 
+> ir <- rbind(iris3[,,1], iris3[,,2], iris3[,,3])
+> parcoord(log(ir)[, c(3, 4, 2, 1)], col = 1 + (0:149)%/%50)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("petrol")
+> ### * petrol
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: petrol
+> ### Title: N. L. Prater's Petrol Refinery Data
+> ### Aliases: petrol
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> library(nlme)
+> Petrol <- petrol
+> Petrol[, 2:5] <- scale(as.matrix(Petrol[, 2:5]), scale = FALSE)
+> pet3.lme <- lme(Y ~ SG + VP + V10 + EP,
++                 random = ~ 1 | No, data = Petrol)
+> pet3.lme <- update(pet3.lme, method = "ML")
+> pet4.lme <- update(pet3.lme, fixed = Y ~ V10 + EP)
+> anova(pet4.lme, pet3.lme)
+         Model df      AIC      BIC    logLik   Test L.Ratio p-value
+pet4.lme     1  5 149.6119 156.9406 -69.80594                       
+pet3.lme     2  7 149.3833 159.6435 -67.69166 1 vs 2 4.22855  0.1207
+> 
+> 
+> 
+> cleanEx()
+
+detaching ‘package:nlme’
+
+> nameEx("plot.mca")
+> ### * plot.mca
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: plot.mca
+> ### Title: Plot Method for Objects of Class 'mca'
+> ### Aliases: plot.mca
+> ### Keywords: hplot multivariate
+> 
+> ### ** Examples
+> 
+> plot(mca(farms, abbrev = TRUE))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("plot.profile")
+> ### * plot.profile
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: plot.profile
+> ### Title: Plotting Functions for 'profile' Objects
+> ### Aliases: plot.profile pairs.profile
+> ### Keywords: models hplot
+> 
+> ### ** Examples
+> 
+> ## see ?profile.glm for an example using glm fits.
+> 
+> ## a version of example(profile.nls) from R >= 2.8.0
+> fm1 <- nls(demand ~ SSasympOrig(Time, A, lrc), data = BOD)
+> pr1 <- profile(fm1, alpha = 0.1)
+> MASS:::plot.profile(pr1)
+> pairs(pr1) # a little odd since the parameters are highly correlated
+> 
+> ## an example from ?nls
+> x <- -(1:100)/10
+> y <- 100 + 10 * exp(x / 2) + rnorm(x)/10
+> nlmod <- nls(y ~  Const + A * exp(B * x), start=list(Const=100, A=10, B=1))
+> pairs(profile(nlmod))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("polr")
+> ### * polr
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: polr
+> ### Title: Ordered Logistic or Probit Regression
+> ### Aliases: polr
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> options(contrasts = c("contr.treatment", "contr.poly"))
+> house.plr <- polr(Sat ~ Infl + Type + Cont, weights = Freq, data = housing)
+> house.plr
+Call:
+polr(formula = Sat ~ Infl + Type + Cont, data = housing, weights = Freq)
+
+Coefficients:
+   InflMedium      InflHigh TypeApartment    TypeAtrium   TypeTerrace 
+    0.5663937     1.2888191    -0.5723501    -0.3661866    -1.0910149 
+     ContHigh 
+    0.3602841 
+
+Intercepts:
+ Low|Medium Medium|High 
+ -0.4961353   0.6907083 
+
+Residual Deviance: 3479.149 
+AIC: 3495.149 
+> summary(house.plr, digits = 3)
+
+Re-fitting to get Hessian
+
+Call:
+polr(formula = Sat ~ Infl + Type + Cont, data = housing, weights = Freq)
+
+Coefficients:
+               Value Std. Error t value
+InflMedium     0.566     0.1047    5.41
+InflHigh       1.289     0.1272   10.14
+TypeApartment -0.572     0.1192   -4.80
+TypeAtrium    -0.366     0.1552   -2.36
+TypeTerrace   -1.091     0.1515   -7.20
+ContHigh       0.360     0.0955    3.77
+
+Intercepts:
+            Value  Std. Error t value
+Low|Medium  -0.496  0.125     -3.974 
+Medium|High  0.691  0.125      5.505 
+
+Residual Deviance: 3479.149 
+AIC: 3495.149 
+> ## slightly worse fit from
+> summary(update(house.plr, method = "probit", Hess = TRUE), digits = 3)
+Call:
+polr(formula = Sat ~ Infl + Type + Cont, data = housing, weights = Freq, 
+    Hess = TRUE, method = "probit")
+
+Coefficients:
+               Value Std. Error t value
+InflMedium     0.346     0.0641    5.40
+InflHigh       0.783     0.0764   10.24
+TypeApartment -0.348     0.0723   -4.81
+TypeAtrium    -0.218     0.0948   -2.30
+TypeTerrace   -0.664     0.0918   -7.24
+ContHigh       0.222     0.0581    3.83
+
+Intercepts:
+            Value  Std. Error t value
+Low|Medium  -0.300  0.076     -3.937 
+Medium|High  0.427  0.076      5.585 
+
+Residual Deviance: 3479.689 
+AIC: 3495.689 
+> ## although it is not really appropriate, can fit
+> summary(update(house.plr, method = "loglog", Hess = TRUE), digits = 3)
+Call:
+polr(formula = Sat ~ Infl + Type + Cont, data = housing, weights = Freq, 
+    Hess = TRUE, method = "loglog")
+
+Coefficients:
+               Value Std. Error t value
+InflMedium     0.367     0.0727    5.05
+InflHigh       0.790     0.0806    9.81
+TypeApartment -0.349     0.0757   -4.61
+TypeAtrium    -0.196     0.0988   -1.98
+TypeTerrace   -0.698     0.1043   -6.69
+ContHigh       0.268     0.0636    4.21
+
+Intercepts:
+            Value  Std. Error t value
+Low|Medium   0.086  0.083      1.038 
+Medium|High  0.892  0.087     10.223 
+
+Residual Deviance: 3491.41 
+AIC: 3507.41 
+> summary(update(house.plr, method = "cloglog", Hess = TRUE), digits = 3)
+Call:
+polr(formula = Sat ~ Infl + Type + Cont, data = housing, weights = Freq, 
+    Hess = TRUE, method = "cloglog")
+
+Coefficients:
+               Value Std. Error t value
+InflMedium     0.382     0.0703    5.44
+InflHigh       0.915     0.0926    9.89
+TypeApartment -0.407     0.0861   -4.73
+TypeAtrium    -0.281     0.1111   -2.52
+TypeTerrace   -0.742     0.1013   -7.33
+ContHigh       0.209     0.0651    3.21
+
+Intercepts:
+            Value  Std. Error t value
+Low|Medium  -0.796  0.090     -8.881 
+Medium|High  0.055  0.086      0.647 
+
+Residual Deviance: 3484.053 
+AIC: 3500.053 
+> 
+> predict(house.plr, housing, type = "p")
+         Low    Medium      High
+1  0.3784493 0.2876752 0.3338755
+2  0.3784493 0.2876752 0.3338755
+3  0.3784493 0.2876752 0.3338755
+4  0.2568264 0.2742122 0.4689613
+5  0.2568264 0.2742122 0.4689613
+6  0.2568264 0.2742122 0.4689613
+7  0.1436924 0.2110836 0.6452240
+8  0.1436924 0.2110836 0.6452240
+9  0.1436924 0.2110836 0.6452240
+10 0.5190445 0.2605077 0.2204478
+11 0.5190445 0.2605077 0.2204478
+12 0.5190445 0.2605077 0.2204478
+13 0.3798514 0.2875965 0.3325521
+14 0.3798514 0.2875965 0.3325521
+15 0.3798514 0.2875965 0.3325521
+16 0.2292406 0.2643196 0.5064398
+17 0.2292406 0.2643196 0.5064398
+18 0.2292406 0.2643196 0.5064398
+19 0.4675584 0.2745383 0.2579033
+20 0.4675584 0.2745383 0.2579033
+21 0.4675584 0.2745383 0.2579033
+22 0.3326236 0.2876008 0.3797755
+23 0.3326236 0.2876008 0.3797755
+24 0.3326236 0.2876008 0.3797755
+25 0.1948548 0.2474226 0.5577225
+26 0.1948548 0.2474226 0.5577225
+27 0.1948548 0.2474226 0.5577225
+28 0.6444840 0.2114256 0.1440905
+29 0.6444840 0.2114256 0.1440905
+30 0.6444840 0.2114256 0.1440905
+31 0.5071210 0.2641196 0.2287594
+32 0.5071210 0.2641196 0.2287594
+33 0.5071210 0.2641196 0.2287594
+34 0.3331573 0.2876330 0.3792097
+35 0.3331573 0.2876330 0.3792097
+36 0.3331573 0.2876330 0.3792097
+37 0.2980880 0.2837746 0.4181374
+38 0.2980880 0.2837746 0.4181374
+39 0.2980880 0.2837746 0.4181374
+40 0.1942209 0.2470589 0.5587202
+41 0.1942209 0.2470589 0.5587202
+42 0.1942209 0.2470589 0.5587202
+43 0.1047770 0.1724227 0.7228003
+44 0.1047770 0.1724227 0.7228003
+45 0.1047770 0.1724227 0.7228003
+46 0.4294564 0.2820629 0.2884807
+47 0.4294564 0.2820629 0.2884807
+48 0.4294564 0.2820629 0.2884807
+49 0.2993357 0.2839753 0.4166890
+50 0.2993357 0.2839753 0.4166890
+51 0.2993357 0.2839753 0.4166890
+52 0.1718050 0.2328648 0.5953302
+53 0.1718050 0.2328648 0.5953302
+54 0.1718050 0.2328648 0.5953302
+55 0.3798387 0.2875972 0.3325641
+56 0.3798387 0.2875972 0.3325641
+57 0.3798387 0.2875972 0.3325641
+58 0.2579546 0.2745537 0.4674917
+59 0.2579546 0.2745537 0.4674917
+60 0.2579546 0.2745537 0.4674917
+61 0.1444202 0.2117081 0.6438717
+62 0.1444202 0.2117081 0.6438717
+63 0.1444202 0.2117081 0.6438717
+64 0.5583813 0.2471826 0.1944361
+65 0.5583813 0.2471826 0.1944361
+66 0.5583813 0.2471826 0.1944361
+67 0.4178031 0.2838213 0.2983756
+68 0.4178031 0.2838213 0.2983756
+69 0.4178031 0.2838213 0.2983756
+70 0.2584149 0.2746916 0.4668935
+71 0.2584149 0.2746916 0.4668935
+72 0.2584149 0.2746916 0.4668935
+> addterm(house.plr, ~.^2, test = "Chisq")
+Single term additions
+
+Model:
+Sat ~ Infl + Type + Cont
+          Df    AIC     LRT   Pr(Chi)    
+<none>       3495.1                      
+Infl:Type  6 3484.6 22.5093 0.0009786 ***
+Infl:Cont  2 3498.9  0.2090 0.9007957    
+Type:Cont  3 3492.5  8.6662 0.0340752 *  
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> house.plr2 <- stepAIC(house.plr, ~.^2)
+Start:  AIC=3495.15
+Sat ~ Infl + Type + Cont
+
+            Df    AIC
++ Infl:Type  6 3484.6
++ Type:Cont  3 3492.5
+<none>         3495.1
++ Infl:Cont  2 3498.9
+- Cont       1 3507.5
+- Type       3 3545.1
+- Infl       2 3599.4
+
+Step:  AIC=3484.64
+Sat ~ Infl + Type + Cont + Infl:Type
+
+            Df    AIC
++ Type:Cont  3 3482.7
+<none>         3484.6
++ Infl:Cont  2 3488.5
+- Infl:Type  6 3495.1
+- Cont       1 3497.8
+
+Step:  AIC=3482.69
+Sat ~ Infl + Type + Cont + Infl:Type + Type:Cont
+
+            Df    AIC
+<none>         3482.7
+- Type:Cont  3 3484.6
++ Infl:Cont  2 3486.6
+- Infl:Type  6 3492.5
+> house.plr2$anova
+Stepwise Model Path 
+Analysis of Deviance Table
+
+Initial Model:
+Sat ~ Infl + Type + Cont
+
+Final Model:
+Sat ~ Infl + Type + Cont + Infl:Type + Type:Cont
+
+
+         Step Df  Deviance Resid. Df Resid. Dev      AIC
+1                               1673   3479.149 3495.149
+2 + Infl:Type  6 22.509347      1667   3456.640 3484.640
+3 + Type:Cont  3  7.945029      1664   3448.695 3482.695
+> anova(house.plr, house.plr2)
+Likelihood ratio tests of ordinal regression models
+
+Response: Sat
+                                       Model Resid. df Resid. Dev   Test    Df
+1                         Infl + Type + Cont      1673   3479.149             
+2 Infl + Type + Cont + Infl:Type + Type:Cont      1664   3448.695 1 vs 2     9
+  LR stat.      Pr(Chi)
+1                      
+2 30.45438 0.0003670555
+> 
+> house.plr <- update(house.plr, Hess=TRUE)
+> pr <- profile(house.plr)
+> confint(pr)
+                   2.5 %      97.5 %
+InflMedium     0.3616415  0.77195375
+InflHigh       1.0409701  1.53958138
+TypeApartment -0.8069590 -0.33940432
+TypeAtrium    -0.6705862 -0.06204495
+TypeTerrace   -1.3893863 -0.79533958
+ContHigh       0.1733589  0.54792854
+> plot(pr)
+> pairs(pr)
+> 
+> 
+> 
+> base::options(contrasts = c(unordered = "contr.treatment",ordered = "contr.poly"))
+> cleanEx()
+> nameEx("predict.glmmPQL")
+> ### * predict.glmmPQL
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: predict.glmmPQL
+> ### Title: Predict Method for glmmPQL Fits
+> ### Aliases: predict.glmmPQL
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> fit <- glmmPQL(y ~ trt + I(week > 2), random = ~1 |  ID,
++                family = binomial, data = bacteria)
+iteration 1
+iteration 2
+iteration 3
+iteration 4
+iteration 5
+iteration 6
+> predict(fit, bacteria, level = 0, type="response")
+  [1] 0.9680779 0.9680779 0.8587270 0.8587270 0.9344832 0.9344832 0.7408574
+  [8] 0.7408574 0.8970307 0.8970307 0.6358511 0.6358511 0.6358511 0.9680779
+ [15] 0.9680779 0.8587270 0.8587270 0.8587270 0.9680779 0.9680779 0.8587270
+ [22] 0.8587270 0.8587270 0.8970307 0.8970307 0.6358511 0.6358511 0.9344832
+ [29] 0.9344832 0.7408574 0.7408574 0.7408574 0.9680779 0.9680779 0.8587270
+ [36] 0.8587270 0.8587270 0.9680779 0.9680779 0.8587270 0.8587270 0.8587270
+ [43] 0.9344832 0.7408574 0.9680779 0.9680779 0.8587270 0.8587270 0.8587270
+ [50] 0.8970307 0.8970307 0.6358511 0.6358511 0.6358511 0.9680779 0.9680779
+ [57] 0.8587270 0.8587270 0.8587270 0.9680779 0.9680779 0.8587270 0.8970307
+ [64] 0.8970307 0.6358511 0.6358511 0.6358511 0.9344832 0.9344832 0.7408574
+ [71] 0.7408574 0.7408574 0.9680779 0.9680779 0.8587270 0.8587270 0.8587270
+ [78] 0.8970307 0.8970307 0.6358511 0.6358511 0.6358511 0.9680779 0.9680779
+ [85] 0.8587270 0.8587270 0.8587270 0.9344832 0.9344832 0.7408574 0.7408574
+ [92] 0.9680779 0.9680779 0.8587270 0.8587270 0.8587270 0.9680779 0.9680779
+ [99] 0.8587270 0.8587270 0.8587270 0.9680779 0.9680779 0.8587270 0.8587270
+[106] 0.8587270 0.9344832 0.9344832 0.7408574 0.7408574 0.7408574 0.8970307
+[113] 0.8970307 0.6358511 0.6358511 0.9680779 0.9680779 0.8587270 0.9680779
+[120] 0.9680779 0.8587270 0.8587270 0.8970307 0.8970307 0.6358511 0.6358511
+[127] 0.6358511 0.9344832 0.7408574 0.7408574 0.7408574 0.9680779 0.8587270
+[134] 0.8587270 0.8587270 0.8970307 0.8970307 0.6358511 0.6358511 0.6358511
+[141] 0.9680779 0.9680779 0.8587270 0.8587270 0.8587270 0.9344832 0.7408574
+[148] 0.8970307 0.8970307 0.6358511 0.6358511 0.9680779 0.9680779 0.8587270
+[155] 0.8970307 0.8970307 0.6358511 0.9680779 0.9680779 0.8587270 0.8587270
+[162] 0.8587270 0.9344832 0.9344832 0.7408574 0.7408574 0.7408574 0.9680779
+[169] 0.9680779 0.8587270 0.8587270 0.8587270 0.9344832 0.7408574 0.8970307
+[176] 0.8970307 0.6358511 0.6358511 0.6358511 0.9344832 0.9344832 0.7408574
+[183] 0.7408574 0.9680779 0.9680779 0.8587270 0.8587270 0.8587270 0.8970307
+[190] 0.8970307 0.6358511 0.6358511 0.6358511 0.9344832 0.9344832 0.7408574
+[197] 0.7408574 0.7408574 0.8970307 0.6358511 0.6358511 0.9344832 0.9344832
+[204] 0.7408574 0.7408574 0.7408574 0.8970307 0.8970307 0.6358511 0.6358511
+[211] 0.9344832 0.9344832 0.7408574 0.7408574 0.7408574 0.9344832 0.9344832
+[218] 0.7408574 0.7408574 0.7408574
+attr(,"label")
+[1] "Predicted values"
+> predict(fit, bacteria, level = 1, type="response")
+      X01       X01       X01       X01       X02       X02       X02       X02 
+0.9828449 0.9828449 0.9198935 0.9198935 0.9050782 0.9050782 0.6564944 0.6564944 
+      X03       X03       X03       X03       X03       X04       X04       X04 
+0.9724022 0.9724022 0.8759665 0.8759665 0.8759665 0.9851548 0.9851548 0.9300763 
+      X04       X04       X05       X05       X05       X05       X05       X06 
+0.9300763 0.9300763 0.9851548 0.9851548 0.9300763 0.9300763 0.9300763 0.9662755 
+      X06       X06       X06       X07       X07       X07       X07       X07 
+0.9662755 0.8516962 0.8516962 0.7291679 0.7291679 0.3504978 0.3504978 0.3504978 
+      X08       X08       X08       X08       X08       X09       X09       X09 
+0.9426815 0.9426815 0.7672499 0.7672499 0.7672499 0.9851548 0.9851548 0.9300763 
+      X09       X09       X10       X10       X11       X11       X11       X11 
+0.9300763 0.9300763 0.9640326 0.8430706 0.9851548 0.9851548 0.9300763 0.9300763 
+      X11       X12       X12       X12       X12       X12       X13       X13 
+0.9300763 0.8334870 0.8334870 0.5008219 0.5008219 0.5008219 0.9851548 0.9851548 
+      X13       X13       X13       X14       X14       X14       X15       X15 
+0.9300763 0.9300763 0.9300763 0.8907227 0.8907227 0.6203155 0.9724022 0.9724022 
+      X15       X15       X15       X16       X16       X16       X16       X16 
+0.8759665 0.8759665 0.8759665 0.9287777 0.9287777 0.7232833 0.7232833 0.7232833 
+      X17       X17       X17       X17       X17       X18       X18       X18 
+0.9426815 0.9426815 0.7672499 0.7672499 0.7672499 0.7070916 0.7070916 0.3260827 
+      X18       X18       X19       X19       X19       X19       X19       X20 
+0.3260827 0.3260827 0.8702991 0.8702991 0.5735499 0.5735499 0.5735499 0.9736293 
+      X20       X20       X20       X21       X21       X21       X21       X21 
+0.9736293 0.8809564 0.8809564 0.9851548 0.9851548 0.9300763 0.9300763 0.9300763 
+      Y01       Y01       Y01       Y01       Y01       Y02       Y02       Y02 
+0.9851548 0.9851548 0.9300763 0.9300763 0.9300763 0.7607971 0.7607971 0.3893126 
+      Y02       Y02       Y03       Y03       Y03       Y03       Y03       Y04 
+0.3893126 0.3893126 0.8487181 0.8487181 0.5292976 0.5292976 0.5292976 0.5734482 
+      Y04       Y04       Y04       Y05       Y05       Y05       Y06       Y06 
+0.5734482 0.2122655 0.2122655 0.7144523 0.7144523 0.3339997 0.9828449 0.9828449 
+      Y06       Y06       Y07       Y07       Y07       Y07       Y07       Y08 
+0.9198935 0.9198935 0.8334870 0.8334870 0.5008219 0.5008219 0.5008219 0.9238389 
+      Y08       Y08       Y08       Y09       Y09       Y09       Y09       Y10 
+0.7085660 0.7085660 0.7085660 0.9847299 0.9281899 0.9281899 0.9281899 0.9188296 
+      Y10       Y10       Y10       Y10       Y11       Y11       Y11       Y11 
+0.9188296 0.6940862 0.6940862 0.6940862 0.9851548 0.9851548 0.9300763 0.9300763 
+      Y11       Y12       Y12       Y13       Y13       Y13       Y13       Y14 
+0.9300763 0.9640326 0.8430706 0.5734482 0.5734482 0.2122655 0.2122655 0.9793383 
+      Y14       Y14       Z01       Z01       Z01       Z02       Z02       Z02 
+0.9793383 0.9047659 0.9556329 0.9556329 0.8119328 0.9851548 0.9851548 0.9300763 
+      Z02       Z02       Z03       Z03       Z03       Z03       Z03       Z05 
+0.9300763 0.9300763 0.9779690 0.9779690 0.8989642 0.8989642 0.8989642 0.8702991 
+      Z05       Z05       Z05       Z05       Z06       Z06       Z07       Z07 
+0.8702991 0.5735499 0.5735499 0.5735499 0.8306525 0.4957505 0.8334870 0.8334870 
+      Z07       Z07       Z07       Z09       Z09       Z09       Z09       Z10 
+0.5008219 0.5008219 0.5008219 0.9736293 0.9736293 0.8809564 0.8809564 0.9851548 
+      Z10       Z10       Z10       Z10       Z11       Z11       Z11       Z11 
+0.9851548 0.9300763 0.9300763 0.9300763 0.9724022 0.9724022 0.8759665 0.8759665 
+      Z11       Z14       Z14       Z14       Z14       Z14       Z15       Z15 
+0.8759665 0.9287777 0.9287777 0.7232833 0.7232833 0.7232833 0.9643851 0.8444172 
+      Z15       Z19       Z19       Z19       Z19       Z19       Z20       Z20 
+0.8444172 0.9779690 0.9779690 0.8989642 0.8989642 0.8989642 0.7620490 0.7620490 
+      Z20       Z20       Z24       Z24       Z24       Z24       Z24       Z26 
+0.3909523 0.3909523 0.8487181 0.8487181 0.5292976 0.5292976 0.5292976 0.9287777 
+      Z26       Z26       Z26       Z26 
+0.9287777 0.7232833 0.7232833 0.7232833 
+attr(,"label")
+[1] "Predicted values"
+> 
+> 
+> 
+> cleanEx()
+> nameEx("predict.lda")
+> ### * predict.lda
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: predict.lda
+> ### Title: Classify Multivariate Observations by Linear Discrimination
+> ### Aliases: predict.lda
+> ### Keywords: multivariate
+> 
+> ### ** Examples
+> 
+> tr <- sample(1:50, 25)
+> train <- rbind(iris3[tr,,1], iris3[tr,,2], iris3[tr,,3])
+> test <- rbind(iris3[-tr,,1], iris3[-tr,,2], iris3[-tr,,3])
+> cl <- factor(c(rep("s",25), rep("c",25), rep("v",25)))
+> z <- lda(train, cl)
+> predict(z, test)$class
+ [1] s s s s s s s s s s s s s s s s s s s s s s s s s c c c c c c c c c c v c c
+[39] c c c c c c c c c c c c v v v v v v v v v c v v v v v v v v v v v v v v v
+Levels: c s v
+> 
+> 
+> 
+> cleanEx()
+> nameEx("predict.lqs")
+> ### * predict.lqs
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: predict.lqs
+> ### Title: Predict from an lqs Fit
+> ### Aliases: predict.lqs
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> set.seed(123)
+> fm <- lqs(stack.loss ~ ., data = stackloss, method = "S", nsamp = "exact")
+> predict(fm, stackloss)
+        1         2         3         4         5         6         7         8 
+35.500000 35.579646 30.409292 19.477876 18.592920 19.035398 19.000000 19.000000 
+        9        10        11        12        13        14        15        16 
+15.734513 14.079646 13.362832 13.000000 13.920354 13.486726  6.761062  7.000000 
+       17        18        19        20        21 
+ 8.557522  8.000000  8.362832 13.154867 23.991150 
+> 
+> 
+> 
+> cleanEx()
+> nameEx("predict.qda")
+> ### * predict.qda
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: predict.qda
+> ### Title: Classify from Quadratic Discriminant Analysis
+> ### Aliases: predict.qda
+> ### Keywords: multivariate
+> 
+> ### ** Examples
+> 
+> tr <- sample(1:50, 25)
+> train <- rbind(iris3[tr,,1], iris3[tr,,2], iris3[tr,,3])
+> test <- rbind(iris3[-tr,,1], iris3[-tr,,2], iris3[-tr,,3])
+> cl <- factor(c(rep("s",25), rep("c",25), rep("v",25)))
+> zq <- qda(train, cl)
+> predict(zq, test)$class
+ [1] s s s s s s s s s s s s s s s s s s s s s s s s s c c c c c c c c c c v c c
+[39] c c c c c c c c c c c c v v v v v v v v v v v v v v v v v v v v v v v v v
+Levels: c s v
+> 
+> 
+> 
+> cleanEx()
+> nameEx("profile.glm")
+> ### * profile.glm
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: profile.glm
+> ### Title: Method for Profiling glm Objects
+> ### Aliases: profile.glm
+> ### Keywords: regression models
+> 
+> ### ** Examples
+> 
+> options(contrasts = c("contr.treatment", "contr.poly"))
+> ldose <- rep(0:5, 2)
+> numdead <- c(1, 4, 9, 13, 18, 20, 0, 2, 6, 10, 12, 16)
+> sex <- factor(rep(c("M", "F"), c(6, 6)))
+> SF <- cbind(numdead, numalive = 20 - numdead)
+> budworm.lg <- glm(SF ~ sex*ldose, family = binomial)
+> pr1 <- profile(budworm.lg)
+> plot(pr1)
+> pairs(pr1)
+> 
+> 
+> 
+> base::options(contrasts = c(unordered = "contr.treatment",ordered = "contr.poly"))
+> cleanEx()
+> nameEx("qda")
+> ### * qda
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: qda
+> ### Title: Quadratic Discriminant Analysis
+> ### Aliases: qda qda.data.frame qda.default qda.formula qda.matrix
+> ###   model.frame.qda print.qda
+> ### Keywords: multivariate
+> 
+> ### ** Examples
+> 
+> tr <- sample(1:50, 25)
+> train <- rbind(iris3[tr,,1], iris3[tr,,2], iris3[tr,,3])
+> test <- rbind(iris3[-tr,,1], iris3[-tr,,2], iris3[-tr,,3])
+> cl <- factor(c(rep("s",25), rep("c",25), rep("v",25)))
+> z <- qda(train, cl)
+> predict(z,test)$class
+ [1] s s s s s s s s s s s s s s s s s s s s s s s s s c c c c c c c c c c v c c
+[39] c c c c c c c c c c c c v v v v v v v v v v v v v v v v v v v v v v v v v
+Levels: c s v
+> 
+> 
+> 
+> cleanEx()
+> nameEx("rational")
+> ### * rational
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: rational
+> ### Title: Rational Approximation
+> ### Aliases: rational .rat
+> ### Keywords: math
+> 
+> ### ** Examples
+> 
+> X <- matrix(runif(25), 5, 5)
+> zapsmall(solve(X, X/5)) # print near-zeroes as zero
+     [,1] [,2] [,3] [,4] [,5]
+[1,]  0.2  0.0  0.0  0.0  0.0
+[2,]  0.0  0.2  0.0  0.0  0.0
+[3,]  0.0  0.0  0.2  0.0  0.0
+[4,]  0.0  0.0  0.0  0.2  0.0
+[5,]  0.0  0.0  0.0  0.0  0.2
+> rational(solve(X, X/5))
+     [,1] [,2] [,3] [,4] [,5]
+[1,]  0.2  0.0  0.0  0.0  0.0
+[2,]  0.0  0.2  0.0  0.0  0.0
+[3,]  0.0  0.0  0.2  0.0  0.0
+[4,]  0.0  0.0  0.0  0.2  0.0
+[5,]  0.0  0.0  0.0  0.0  0.2
+> 
+> 
+> 
+> cleanEx()
+> nameEx("renumerate")
+> ### * renumerate
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: renumerate
+> ### Title: Convert a Formula Transformed by 'denumerate'
+> ### Aliases: renumerate renumerate.formula
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> denumerate(~(1+2+3)^3 + a/b)
+~(.v1 + .v2 + .v3)^3 + a/b
+> ## ~ (.v1 + .v2 + .v3)^3 + a/b
+> renumerate(.Last.value)
+~(`1` + `2` + `3`)^3 + a/b
+> ## ~ (1 + 2 + 3)^3 + a/b
+> 
+> 
+> 
+> cleanEx()
+> nameEx("rlm")
+> ### * rlm
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: rlm
+> ### Title: Robust Fitting of Linear Models
+> ### Aliases: rlm rlm.default rlm.formula print.rlm predict.rlm psi.bisquare
+> ###   psi.hampel psi.huber
+> ### Keywords: models robust
+> 
+> ### ** Examples
+> 
+> summary(rlm(stack.loss ~ ., stackloss))
+
+Call: rlm(formula = stack.loss ~ ., data = stackloss)
+Residuals:
+     Min       1Q   Median       3Q      Max 
+-8.91753 -1.73127  0.06187  1.54306  6.50163 
+
+Coefficients:
+            Value    Std. Error t value 
+(Intercept) -41.0265   9.8073    -4.1832
+Air.Flow      0.8294   0.1112     7.4597
+Water.Temp    0.9261   0.3034     3.0524
+Acid.Conc.   -0.1278   0.1289    -0.9922
+
+Residual standard error: 2.441 on 17 degrees of freedom
+> rlm(stack.loss ~ ., stackloss, psi = psi.hampel, init = "lts")
+Call:
+rlm(formula = stack.loss ~ ., data = stackloss, psi = psi.hampel, 
+    init = "lts")
+Converged in 9 iterations
+
+Coefficients:
+(Intercept)    Air.Flow  Water.Temp  Acid.Conc. 
+-40.4747826   0.7410853   1.2250730  -0.1455245 
+
+Degrees of freedom: 21 total; 17 residual
+Scale estimate: 3.09 
+> rlm(stack.loss ~ ., stackloss, psi = psi.bisquare)
+Call:
+rlm(formula = stack.loss ~ ., data = stackloss, psi = psi.bisquare)
+Converged in 11 iterations
+
+Coefficients:
+(Intercept)    Air.Flow  Water.Temp  Acid.Conc. 
+-42.2852537   0.9275471   0.6507322  -0.1123310 
+
+Degrees of freedom: 21 total; 17 residual
+Scale estimate: 2.28 
+> 
+> 
+> 
+> cleanEx()
+> nameEx("rms.curv")
+> ### * rms.curv
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: rms.curv
+> ### Title: Relative Curvature Measures for Non-Linear Regression
+> ### Aliases: rms.curv print.rms.curv
+> ### Keywords: nonlinear
+> 
+> ### ** Examples
+> 
+> # The treated sample from the Puromycin data
+> mmcurve <- deriv3(~ Vm * conc/(K + conc), c("Vm", "K"),
++                   function(Vm, K, conc) NULL)
+> Treated <- Puromycin[Puromycin$state == "treated", ]
+> (Purfit1 <- nls(rate ~ mmcurve(Vm, K, conc), data = Treated,
++                 start = list(Vm=200, K=0.1)))
+Nonlinear regression model
+  model: rate ~ mmcurve(Vm, K, conc)
+   data: Treated
+       Vm         K 
+212.68363   0.06412 
+ residual sum-of-squares: 1195
+
+Number of iterations to convergence: 6 
+Achieved convergence tolerance: 6.096e-06
+> rms.curv(Purfit1)
+Parameter effects: c^theta x sqrt(F) = 0.2121 
+        Intrinsic: c^iota  x sqrt(F) = 0.092 
+> ##Parameter effects: c^theta x sqrt(F) = 0.2121
+> ##        Intrinsic: c^iota  x sqrt(F) = 0.092
+> 
+> 
+> 
+> cleanEx()
+> nameEx("rnegbin")
+> ### * rnegbin
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: rnegbin
+> ### Title: Simulate Negative Binomial Variates
+> ### Aliases: rnegbin
+> ### Keywords: distribution
+> 
+> ### ** Examples
+> 
+> # Negative Binomials with means fitted(fm) and theta = 4.5
+> fm <- glm.nb(Days ~ ., data = quine)
+> dummy <- rnegbin(fitted(fm), theta = 4.5)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("sammon")
+> ### * sammon
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: sammon
+> ### Title: Sammon's Non-Linear Mapping
+> ### Aliases: sammon
+> ### Keywords: multivariate
+> 
+> ### ** Examples
+> 
+> swiss.x <- as.matrix(swiss[, -1])
+> swiss.sam <- sammon(dist(swiss.x))
+Initial stress        : 0.00824
+stress after  10 iters: 0.00439, magic = 0.338
+stress after  20 iters: 0.00383, magic = 0.500
+stress after  30 iters: 0.00383, magic = 0.500
+> plot(swiss.sam$points, type = "n")
+> text(swiss.sam$points, labels = as.character(1:nrow(swiss.x)))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("stepAIC")
+> ### * stepAIC
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: stepAIC
+> ### Title: Choose a model by AIC in a Stepwise Algorithm
+> ### Aliases: stepAIC extractAIC.gls terms.gls extractAIC.lme terms.lme
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> quine.hi <- aov(log(Days + 2.5) ~ .^4, quine)
+> quine.nxt <- update(quine.hi, . ~ . - Eth:Sex:Age:Lrn)
+> quine.stp <- stepAIC(quine.nxt,
++     scope = list(upper = ~Eth*Sex*Age*Lrn, lower = ~1),
++     trace = FALSE)
+> quine.stp$anova
+Stepwise Model Path 
+Analysis of Deviance Table
+
+Initial Model:
+log(Days + 2.5) ~ Eth + Sex + Age + Lrn + Eth:Sex + Eth:Age + 
+    Eth:Lrn + Sex:Age + Sex:Lrn + Age:Lrn + Eth:Sex:Age + Eth:Sex:Lrn + 
+    Eth:Age:Lrn + Sex:Age:Lrn
+
+Final Model:
+log(Days + 2.5) ~ Eth + Sex + Age + Lrn + Eth:Sex + Eth:Age + 
+    Eth:Lrn + Sex:Age + Sex:Lrn + Age:Lrn + Eth:Sex:Lrn + Eth:Age:Lrn
+
+
+           Step Df Deviance Resid. Df Resid. Dev       AIC
+1                                 120   64.09900 -68.18396
+2 - Eth:Sex:Age  3 0.973869       123   65.07287 -71.98244
+3 - Sex:Age:Lrn  2 1.526754       125   66.59962 -72.59652
+> 
+> cpus1 <- cpus
+> for(v in names(cpus)[2:7])
++   cpus1[[v]] <- cut(cpus[[v]], unique(quantile(cpus[[v]])),
++                     include.lowest = TRUE)
+> cpus0 <- cpus1[, 2:8]  # excludes names, authors' predictions
+> cpus.samp <- sample(1:209, 100)
+> cpus.lm <- lm(log10(perf) ~ ., data = cpus1[cpus.samp,2:8])
+> cpus.lm2 <- stepAIC(cpus.lm, trace = FALSE)
+> cpus.lm2$anova
+Stepwise Model Path 
+Analysis of Deviance Table
+
+Initial Model:
+log10(perf) ~ syct + mmin + mmax + cach + chmin + chmax
+
+Final Model:
+log10(perf) ~ mmax + cach + chmax
+
+
+     Step Df  Deviance Resid. Df Resid. Dev       AIC
+1                             82   3.362324 -303.2538
+2  - syct  3 0.0445369        85   3.406861 -307.9379
+3  - mmin  3 0.1947053        88   3.601566 -308.3801
+4 - chmin  3 0.1924133        91   3.793980 -309.1755
+> 
+> example(birthwt)
+
+brthwt> bwt <- with(birthwt, {
+brthwt+ race <- factor(race, labels = c("white", "black", "other"))
+brthwt+ ptd <- factor(ptl > 0)
+brthwt+ ftv <- factor(ftv)
+brthwt+ levels(ftv)[-(1:2)] <- "2+"
+brthwt+ data.frame(low = factor(low), age, lwt, race, smoke = (smoke > 0),
+brthwt+            ptd, ht = (ht > 0), ui = (ui > 0), ftv)
+brthwt+ })
+
+brthwt> options(contrasts = c("contr.treatment", "contr.poly"))
+
+brthwt> glm(low ~ ., binomial, bwt)
+
+Call:  glm(formula = low ~ ., family = binomial, data = bwt)
+
+Coefficients:
+(Intercept)          age          lwt    raceblack    raceother    smokeTRUE  
+    0.82302     -0.03723     -0.01565      1.19241      0.74068      0.75553  
+    ptdTRUE       htTRUE       uiTRUE         ftv1        ftv2+  
+    1.34376      1.91317      0.68020     -0.43638      0.17901  
+
+Degrees of Freedom: 188 Total (i.e. Null);  178 Residual
+Null Deviance:	    234.7 
+Residual Deviance: 195.5 	AIC: 217.5
+> birthwt.glm <- glm(low ~ ., family = binomial, data = bwt)
+> birthwt.step <- stepAIC(birthwt.glm, trace = FALSE)
+> birthwt.step$anova
+Stepwise Model Path 
+Analysis of Deviance Table
+
+Initial Model:
+low ~ age + lwt + race + smoke + ptd + ht + ui + ftv
+
+Final Model:
+low ~ lwt + race + smoke + ptd + ht + ui
+
+
+   Step Df Deviance Resid. Df Resid. Dev      AIC
+1                         178   195.4755 217.4755
+2 - ftv  2 1.358185       180   196.8337 214.8337
+3 - age  1 1.017866       181   197.8516 213.8516
+> birthwt.step2 <- stepAIC(birthwt.glm, ~ .^2 + I(scale(age)^2)
++     + I(scale(lwt)^2), trace = FALSE)
+> birthwt.step2$anova
+Stepwise Model Path 
+Analysis of Deviance Table
+
+Initial Model:
+low ~ age + lwt + race + smoke + ptd + ht + ui + ftv
+
+Final Model:
+low ~ age + lwt + smoke + ptd + ht + ui + ftv + age:ftv + smoke:ui
+
+
+        Step Df  Deviance Resid. Df Resid. Dev      AIC
+1                               178   195.4755 217.4755
+2  + age:ftv  2 12.474896       176   183.0006 209.0006
+3 + smoke:ui  1  3.056805       175   179.9438 207.9438
+4     - race  2  3.129586       177   183.0734 207.0734
+> 
+> quine.nb <- glm.nb(Days ~ .^4, data = quine)
+> quine.nb2 <- stepAIC(quine.nb)
+Start:  AIC=1095.32
+Days ~ (Eth + Sex + Age + Lrn)^4
+
+                  Df    AIC
+- Eth:Sex:Age:Lrn  2 1092.7
+<none>               1095.3
+
+Step:  AIC=1092.73
+Days ~ Eth + Sex + Age + Lrn + Eth:Sex + Eth:Age + Eth:Lrn + 
+    Sex:Age + Sex:Lrn + Age:Lrn + Eth:Sex:Age + Eth:Sex:Lrn + 
+    Eth:Age:Lrn + Sex:Age:Lrn
+
+              Df    AIC
+- Eth:Sex:Age  3 1089.4
+<none>           1092.7
+- Eth:Sex:Lrn  1 1093.3
+- Eth:Age:Lrn  2 1094.7
+- Sex:Age:Lrn  2 1095.0
+
+Step:  AIC=1089.41
+Days ~ Eth + Sex + Age + Lrn + Eth:Sex + Eth:Age + Eth:Lrn + 
+    Sex:Age + Sex:Lrn + Age:Lrn + Eth:Sex:Lrn + Eth:Age:Lrn + 
+    Sex:Age:Lrn
+
+              Df    AIC
+<none>           1089.4
+- Sex:Age:Lrn  2 1091.1
+- Eth:Age:Lrn  2 1091.2
+- Eth:Sex:Lrn  1 1092.5
+> quine.nb2$anova
+Stepwise Model Path 
+Analysis of Deviance Table
+
+Initial Model:
+Days ~ (Eth + Sex + Age + Lrn)^4
+
+Final Model:
+Days ~ Eth + Sex + Age + Lrn + Eth:Sex + Eth:Age + Eth:Lrn + 
+    Sex:Age + Sex:Lrn + Age:Lrn + Eth:Sex:Lrn + Eth:Age:Lrn + 
+    Sex:Age:Lrn
+
+
+               Step Df   Deviance Resid. Df Resid. Dev      AIC
+1                                       118   167.4535 1095.324
+2 - Eth:Sex:Age:Lrn  2 0.09746244       120   167.5509 1092.728
+3     - Eth:Sex:Age  3 0.11060087       123   167.4403 1089.409
+> 
+> 
+> 
+> cleanEx()
+> nameEx("summary.negbin")
+> ### * summary.negbin
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: summary.negbin
+> ### Title: Summary Method Function for Objects of Class 'negbin'
+> ### Aliases: summary.negbin print.summary.negbin
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> summary(glm.nb(Days ~ Eth*Age*Lrn*Sex, quine, link = log))
+
+Call:
+glm.nb(formula = Days ~ Eth * Age * Lrn * Sex, data = quine, 
+    link = log, init.theta = 1.928360145)
+
+Deviance Residuals: 
+    Min       1Q   Median       3Q      Max  
+-3.2377  -0.9079  -0.2019   0.5173   1.7043  
+
+Coefficients: (4 not defined because of singularities)
+                      Estimate Std. Error z value Pr(>|z|)    
+(Intercept)             3.0564     0.3760   8.128 4.38e-16 ***
+EthN                   -0.1386     0.5334  -0.260 0.795023    
+AgeF1                  -0.6227     0.5125  -1.215 0.224334    
+AgeF2                  -2.3632     1.0770  -2.194 0.028221 *  
+AgeF3                  -0.3784     0.4546  -0.832 0.405215    
+LrnSL                  -1.9577     0.9967  -1.964 0.049493 *  
+SexM                   -0.4914     0.5104  -0.963 0.335653    
+EthN:AgeF1              0.1029     0.7123   0.144 0.885175    
+EthN:AgeF2             -0.5546     1.6798  -0.330 0.741297    
+EthN:AgeF3              0.0633     0.6396   0.099 0.921159    
+EthN:LrnSL              2.2588     1.3019   1.735 0.082743 .  
+AgeF1:LrnSL             2.6421     1.0821   2.442 0.014618 *  
+AgeF2:LrnSL             4.8585     1.4423   3.369 0.000755 ***
+AgeF3:LrnSL                 NA         NA      NA       NA    
+EthN:SexM              -0.7524     0.7220  -1.042 0.297400    
+AgeF1:SexM              0.4092     0.8299   0.493 0.621973    
+AgeF2:SexM              3.1098     1.1655   2.668 0.007624 ** 
+AgeF3:SexM              1.1145     0.6365   1.751 0.079926 .  
+LrnSL:SexM              1.5900     1.1499   1.383 0.166750    
+EthN:AgeF1:LrnSL       -3.5493     1.4270  -2.487 0.012876 *  
+EthN:AgeF2:LrnSL       -3.3315     2.0919  -1.593 0.111256    
+EthN:AgeF3:LrnSL            NA         NA      NA       NA    
+EthN:AgeF1:SexM        -0.3105     1.2055  -0.258 0.796735    
+EthN:AgeF2:SexM         0.3469     1.7965   0.193 0.846875    
+EthN:AgeF3:SexM         0.8329     0.8970   0.929 0.353092    
+EthN:LrnSL:SexM        -0.1639     1.5250  -0.107 0.914411    
+AgeF1:LrnSL:SexM       -2.4285     1.4201  -1.710 0.087246 .  
+AgeF2:LrnSL:SexM       -4.1914     1.6201  -2.587 0.009679 ** 
+AgeF3:LrnSL:SexM            NA         NA      NA       NA    
+EthN:AgeF1:LrnSL:SexM   2.1711     1.9192   1.131 0.257963    
+EthN:AgeF2:LrnSL:SexM   2.1029     2.3444   0.897 0.369718    
+EthN:AgeF3:LrnSL:SexM       NA         NA      NA       NA    
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+(Dispersion parameter for Negative Binomial(1.9284) family taken to be 1)
+
+    Null deviance: 272.29  on 145  degrees of freedom
+Residual deviance: 167.45  on 118  degrees of freedom
+AIC: 1097.3
+
+Number of Fisher Scoring iterations: 1
+
+
+              Theta:  1.928 
+          Std. Err.:  0.269 
+
+ 2 x log-likelihood:  -1039.324 
+> 
+> 
+> 
+> cleanEx()
+> nameEx("summary.rlm")
+> ### * summary.rlm
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: summary.rlm
+> ### Title: Summary Method for Robust Linear Models
+> ### Aliases: summary.rlm print.summary.rlm
+> ### Keywords: robust
+> 
+> ### ** Examples
+> 
+> summary(rlm(calls ~ year, data = phones, maxit = 50))
+
+Call: rlm(formula = calls ~ year, data = phones, maxit = 50)
+Residuals:
+    Min      1Q  Median      3Q     Max 
+-18.314  -5.953  -1.681  26.460 173.769 
+
+Coefficients:
+            Value     Std. Error t value  
+(Intercept) -102.6222   26.6082    -3.8568
+year           2.0414    0.4299     4.7480
+
+Residual standard error: 9.032 on 22 degrees of freedom
+> 
+> 
+> 
+> cleanEx()
+> nameEx("theta.md")
+> ### * theta.md
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: theta.md
+> ### Title: Estimate theta of the Negative Binomial
+> ### Aliases: theta.md theta.ml theta.mm
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> quine.nb <- glm.nb(Days ~ .^2, data = quine)
+> theta.md(quine$Days, fitted(quine.nb), dfr = df.residual(quine.nb))
+[1] 1.135441
+> theta.ml(quine$Days, fitted(quine.nb))
+[1] 1.603641
+attr(,"SE")
+[1] 0.2138379
+> theta.mm(quine$Days, fitted(quine.nb), dfr = df.residual(quine.nb))
+[1] 1.562879
+> 
+> ## weighted example
+> yeast <- data.frame(cbind(numbers = 0:5, fr = c(213, 128, 37, 18, 3, 1)))
+> fit <- glm.nb(numbers ~ 1, weights = fr, data = yeast)
+> summary(fit)
+
+Call:
+glm.nb(formula = numbers ~ 1, data = yeast, weights = fr, init.theta = 3.586087428, 
+    link = log)
+
+Deviance Residuals: 
+      1        2        3        4        5        6  
+-16.314    3.682    6.923    7.555    4.033    2.813  
+
+Coefficients:
+            Estimate Std. Error z value Pr(>|z|)    
+(Intercept) -0.38199    0.06603  -5.785 7.25e-09 ***
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+(Dispersion parameter for Negative Binomial(3.5861) family taken to be 1)
+
+    Null deviance: 408.9  on 5  degrees of freedom
+Residual deviance: 408.9  on 5  degrees of freedom
+AIC: 897.06
+
+Number of Fisher Scoring iterations: 1
+
+
+              Theta:  3.59 
+          Std. Err.:  1.75 
+
+ 2 x log-likelihood:  -893.063 
+> mu <- fitted(fit)
+> theta.md(yeast$numbers, mu, dfr = 399, weights = yeast$fr)
+[1] 3.027079
+> theta.ml(yeast$numbers, mu, limit = 15, weights = yeast$fr)
+[1] 3.586087
+attr(,"SE")
+[1] 1.749609
+> theta.mm(yeast$numbers, mu, dfr = 399, weights = yeast$fr)
+[1] 3.549593
+> 
+> 
+> 
+> cleanEx()
+> nameEx("ucv")
+> ### * ucv
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: ucv
+> ### Title: Unbiased Cross-Validation for Bandwidth Selection
+> ### Aliases: ucv
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> ucv(geyser$duration)
+Warning in ucv(geyser$duration) :
+  minimum occurred at one end of the range
+[1] 0.1746726
+> 
+> 
+> 
+> cleanEx()
+> nameEx("waders")
+> ### * waders
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: waders
+> ### Title: Counts of Waders at 15 Sites in South Africa
+> ### Aliases: waders
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> plot(corresp(waders, nf=2))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("whiteside")
+> ### * whiteside
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: whiteside
+> ### Title: House Insulation: Whiteside's Data
+> ### Aliases: whiteside
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(lattice)
+Loading required package: lattice
+> xyplot(Gas ~ Temp | Insul, whiteside, panel =
++   function(x, y, ...) {
++     panel.xyplot(x, y, ...)
++     panel.lmline(x, y, ...)
++   }, xlab = "Average external temperature (deg. C)",
++   ylab = "Gas consumption  (1000 cubic feet)", aspect = "xy",
++   strip = function(...) strip.default(..., style = 1))
+> 
+> gasB <- lm(Gas ~ Temp, whiteside, subset = Insul=="Before")
+> gasA <- update(gasB, subset = Insul=="After")
+> summary(gasB)
+
+Call:
+lm(formula = Gas ~ Temp, data = whiteside, subset = Insul == 
+    "Before")
+
+Residuals:
+     Min       1Q   Median       3Q      Max 
+-0.62020 -0.19947  0.06068  0.16770  0.59778 
+
+Coefficients:
+            Estimate Std. Error t value Pr(>|t|)    
+(Intercept)  6.85383    0.11842   57.88   <2e-16 ***
+Temp        -0.39324    0.01959  -20.08   <2e-16 ***
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Residual standard error: 0.2813 on 24 degrees of freedom
+Multiple R-squared:  0.9438,	Adjusted R-squared:  0.9415 
+F-statistic: 403.1 on 1 and 24 DF,  p-value: < 2.2e-16
+
+> summary(gasA)
+
+Call:
+lm(formula = Gas ~ Temp, data = whiteside, subset = Insul == 
+    "After")
+
+Residuals:
+     Min       1Q   Median       3Q      Max 
+-0.97802 -0.11082  0.02672  0.25294  0.63803 
+
+Coefficients:
+            Estimate Std. Error t value Pr(>|t|)    
+(Intercept)  4.72385    0.12974   36.41  < 2e-16 ***
+Temp        -0.27793    0.02518  -11.04 1.05e-11 ***
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Residual standard error: 0.3548 on 28 degrees of freedom
+Multiple R-squared:  0.8131,	Adjusted R-squared:  0.8064 
+F-statistic: 121.8 on 1 and 28 DF,  p-value: 1.046e-11
+
+> gasBA <- lm(Gas ~ Insul/Temp - 1, whiteside)
+> summary(gasBA)
+
+Call:
+lm(formula = Gas ~ Insul/Temp - 1, data = whiteside)
+
+Residuals:
+     Min       1Q   Median       3Q      Max 
+-0.97802 -0.18011  0.03757  0.20930  0.63803 
+
+Coefficients:
+                 Estimate Std. Error t value Pr(>|t|)    
+InsulBefore       6.85383    0.13596   50.41   <2e-16 ***
+InsulAfter        4.72385    0.11810   40.00   <2e-16 ***
+InsulBefore:Temp -0.39324    0.02249  -17.49   <2e-16 ***
+InsulAfter:Temp  -0.27793    0.02292  -12.12   <2e-16 ***
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Residual standard error: 0.323 on 52 degrees of freedom
+Multiple R-squared:  0.9946,	Adjusted R-squared:  0.9942 
+F-statistic:  2391 on 4 and 52 DF,  p-value: < 2.2e-16
+
+> 
+> gasQ <- lm(Gas ~ Insul/(Temp + I(Temp^2)) - 1, whiteside)
+> coef(summary(gasQ))
+                          Estimate  Std. Error   t value     Pr(>|t|)
+InsulBefore            6.759215179 0.150786777 44.826312 4.854615e-42
+InsulAfter             4.496373920 0.160667904 27.985514 3.302572e-32
+InsulBefore:Temp      -0.317658735 0.062965170 -5.044991 6.362323e-06
+InsulAfter:Temp       -0.137901603 0.073058019 -1.887563 6.489554e-02
+InsulBefore:I(Temp^2) -0.008472572 0.006624737 -1.278930 2.068259e-01
+InsulAfter:I(Temp^2)  -0.014979455 0.007447107 -2.011446 4.968398e-02
+> 
+> gasPR <- lm(Gas ~ Insul + Temp, whiteside)
+> anova(gasPR, gasBA)
+Analysis of Variance Table
+
+Model 1: Gas ~ Insul + Temp
+Model 2: Gas ~ Insul/Temp - 1
+  Res.Df    RSS Df Sum of Sq      F    Pr(>F)    
+1     53 6.7704                                  
+2     52 5.4252  1    1.3451 12.893 0.0007307 ***
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> options(contrasts = c("contr.treatment", "contr.poly"))
+> gasBA1 <- lm(Gas ~ Insul*Temp, whiteside)
+> coef(summary(gasBA1))
+                  Estimate Std. Error    t value     Pr(>|t|)
+(Intercept)      6.8538277 0.13596397  50.409146 7.997414e-46
+InsulAfter      -2.1299780 0.18009172 -11.827185 2.315921e-16
+Temp            -0.3932388 0.02248703 -17.487358 1.976009e-23
+InsulAfter:Temp  0.1153039 0.03211212   3.590665 7.306852e-04
+> 
+> 
+> 
+> base::options(contrasts = c(unordered = "contr.treatment",ordered = "contr.poly"))
+> cleanEx()
+
+detaching ‘package:lattice’
+
+> nameEx("width.SJ")
+> ### * width.SJ
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: width.SJ
+> ### Title: Bandwidth Selection by Pilot Estimation of Derivatives
+> ### Aliases: width.SJ
+> ### Keywords: dplot
+> 
+> ### ** Examples
+> 
+> width.SJ(geyser$duration, method = "dpi")
+[1] 0.5747852
+> width.SJ(geyser$duration)
+[1] 0.360518
+> 
+> width.SJ(galaxies, method = "dpi")
+[1] 3256.151
+> width.SJ(galaxies)
+[1] 2566.423
+> 
+> 
+> 
+> cleanEx()
+> nameEx("wtloss")
+> ### * wtloss
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: wtloss
+> ### Title: Weight Loss Data from an Obese Patient
+> ### Aliases: wtloss
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> wtloss.fm <- nls(Weight ~ b0 + b1*2^(-Days/th),
++     data = wtloss, start = list(b0=90, b1=95, th=120))
+> wtloss.fm
+Nonlinear regression model
+  model: Weight ~ b0 + b1 * 2^(-Days/th)
+   data: wtloss
+    b0     b1     th 
+ 81.37 102.68 141.91 
+ residual sum-of-squares: 39.24
+
+Number of iterations to convergence: 3 
+Achieved convergence tolerance: 4.324e-06
+> plot(wtloss)
+> with(wtloss, lines(Days, fitted(wtloss.fm)))
+> 
+> 
+> 
+> ### * <FOOTER>
+> ###
+> options(digits = 7L)
+> base::cat("Time elapsed: ", proc.time() - base::get("ptime", pos = 'CheckExEnv'),"\n")
+Time elapsed:  13.177 0.277 13.574 0 0 
+> grDevices::dev.off()
+null device 
+          1 
+> ###
+> ### Local variables: ***
+> ### mode: outline-minor ***
+> ### outline-regexp: "\\(> \\)?### [*]+" ***
+> ### End: ***
+> quit('no')
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/html/R.css
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/html/R.css	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/html/R.css	(revision 2477)
@@ -0,0 +1,97 @@
+body {
+    background: white;
+    color: black;
+}
+
+a:link {
+    background: white;
+    color: blue;
+}
+
+a:visited {
+    background: white;
+    color: rgb(50%, 0%, 50%);
+}
+
+h1 {
+    background: white;
+    color: rgb(55%, 55%, 55%);
+    font-family: monospace;
+    font-size: x-large;
+    text-align: center;
+}
+
+h2 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-size: large;
+    text-align: center;
+}
+
+h3 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-size: large;
+}
+
+h4 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-style: italic;
+    font-size: large;
+}
+
+h5 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+}
+
+h6 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-style: italic;
+}
+		
+img.toplogo {
+    width: 4em;
+    vertical-align: middle;
+}
+
+img.arrow {
+    width: 30px;
+    height: 30px;
+    border: 0;
+}
+
+span.acronym {
+    font-size: small;
+}
+
+span.env {
+    font-family: monospace;
+}
+
+span.file {
+    font-family: monospace;
+}
+
+span.option{
+    font-family: monospace;
+}
+
+span.pkg {
+    font-weight: bold;
+}
+
+span.samp{
+    font-family: monospace;
+}
+
+div.vignettes a:hover {
+    background: rgb(85%, 85%, 85%);
+}

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/html/R.css
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/html/00Index.html
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/html/00Index.html	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/html/00Index.html	(revision 2477)
@@ -0,0 +1,646 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title>R: Support Functions and Datasets for Venables and Ripley's MASS</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<link rel="stylesheet" type="text/css" href="R.css" />
+</head><body>
+<h1> Support Functions and Datasets for Venables and Ripley's MASS
+<img class="toplogo" src="../../../doc/html/Rlogo.svg" alt="[R logo]" />
+</h1>
+<hr/>
+<div style="text-align: center;">
+<a href="../../../doc/html/packages.html"><img class="arrow" src="../../../doc/html/left.jpg" alt="[Up]" /></a>
+<a href="../../../doc/html/index.html"><img class="arrow" src="../../../doc/html/up.jpg" alt="[Top]" /></a>
+</div><h2>Documentation for package &lsquo;MASS&rsquo; version 7.3-45</h2>
+
+<ul><li><a href="../DESCRIPTION">DESCRIPTION file</a>.</li>
+<li><a href="../NEWS">Package NEWS</a>.</li>
+</ul>
+
+<h2>Help Pages</h2>
+
+
+<p style="text-align: center;">
+<a href="#A">A</a>
+<a href="#B">B</a>
+<a href="#C">C</a>
+<a href="#D">D</a>
+<a href="#E">E</a>
+<a href="#F">F</a>
+<a href="#G">G</a>
+<a href="#H">H</a>
+<a href="#I">I</a>
+<a href="#K">K</a>
+<a href="#L">L</a>
+<a href="#M">M</a>
+<a href="#N">N</a>
+<a href="#O">O</a>
+<a href="#P">P</a>
+<a href="#Q">Q</a>
+<a href="#R">R</a>
+<a href="#S">S</a>
+<a href="#T">T</a>
+<a href="#U">U</a>
+<a href="#V">V</a>
+<a href="#W">W</a>
+<a href="#misc">misc</a>
+</p>
+
+
+<h2><a name="A">-- A --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="abbey.html">abbey</a></td>
+<td>Determinations of Nickel Content</td></tr>
+<tr><td style="width: 25%;"><a href="accdeaths.html">accdeaths</a></td>
+<td>Accidental Deaths in the US 1973-1978</td></tr>
+<tr><td style="width: 25%;"><a href="addterm.html">addterm</a></td>
+<td>Try All One-Term Additions to a Model</td></tr>
+<tr><td style="width: 25%;"><a href="addterm.html">addterm.default</a></td>
+<td>Try All One-Term Additions to a Model</td></tr>
+<tr><td style="width: 25%;"><a href="addterm.html">addterm.glm</a></td>
+<td>Try All One-Term Additions to a Model</td></tr>
+<tr><td style="width: 25%;"><a href="addterm.html">addterm.lm</a></td>
+<td>Try All One-Term Additions to a Model</td></tr>
+<tr><td style="width: 25%;"><a href="Aids2.html">Aids2</a></td>
+<td>Australian AIDS Survival Data</td></tr>
+<tr><td style="width: 25%;"><a href="Animals.html">Animals</a></td>
+<td>Brain and Body Weights for 28 Species</td></tr>
+<tr><td style="width: 25%;"><a href="anorexia.html">anorexia</a></td>
+<td>Anorexia Data on Weight Change</td></tr>
+<tr><td style="width: 25%;"><a href="anova.negbin.html">anova.negbin</a></td>
+<td>Likelihood Ratio Tests for Negative Binomial GLMs</td></tr>
+<tr><td style="width: 25%;"><a href="area.html">area</a></td>
+<td>Adaptive Numerical Integration</td></tr>
+<tr><td style="width: 25%;"><a href="fractions.html">as.character.fractions</a></td>
+<td>Rational Approximation</td></tr>
+<tr><td style="width: 25%;"><a href="fractions.html">as.fractions</a></td>
+<td>Rational Approximation</td></tr>
+</table>
+
+<h2><a name="B">-- B --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="bacteria.html">bacteria</a></td>
+<td>Presence of Bacteria after Drug Treatments</td></tr>
+<tr><td style="width: 25%;"><a href="bandwidth.nrd.html">bandwidth.nrd</a></td>
+<td>Bandwidth for density() via Normal Reference Distribution</td></tr>
+<tr><td style="width: 25%;"><a href="bcv.html">bcv</a></td>
+<td>Biased Cross-Validation for Bandwidth Selection</td></tr>
+<tr><td style="width: 25%;"><a href="beav1.html">beav1</a></td>
+<td>Body Temperature Series of Beaver 1</td></tr>
+<tr><td style="width: 25%;"><a href="beav2.html">beav2</a></td>
+<td>Body Temperature Series of Beaver 2</td></tr>
+<tr><td style="width: 25%;"><a href="biopsy.html">biopsy</a></td>
+<td>Biopsy Data on Breast Cancer Patients</td></tr>
+<tr><td style="width: 25%;"><a href="birthwt.html">birthwt</a></td>
+<td>Risk Factors Associated with Low Infant Birth Weight</td></tr>
+<tr><td style="width: 25%;"><a href="Boston.html">Boston</a></td>
+<td>Housing Values in Suburbs of Boston</td></tr>
+<tr><td style="width: 25%;"><a href="boxcox.html">boxcox</a></td>
+<td>Box-Cox Transformations for Linear Models</td></tr>
+<tr><td style="width: 25%;"><a href="boxcox.html">boxcox.default</a></td>
+<td>Box-Cox Transformations for Linear Models</td></tr>
+<tr><td style="width: 25%;"><a href="boxcox.html">boxcox.formula</a></td>
+<td>Box-Cox Transformations for Linear Models</td></tr>
+<tr><td style="width: 25%;"><a href="boxcox.html">boxcox.lm</a></td>
+<td>Box-Cox Transformations for Linear Models</td></tr>
+</table>
+
+<h2><a name="C">-- C --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="cabbages.html">cabbages</a></td>
+<td>Data from a cabbage field trial</td></tr>
+<tr><td style="width: 25%;"><a href="caith.html">caith</a></td>
+<td>Colours of Eyes and Hair of People in Caithness</td></tr>
+<tr><td style="width: 25%;"><a href="Cars93.html">Cars93</a></td>
+<td>Data from 93 Cars on Sale in the USA in 1993</td></tr>
+<tr><td style="width: 25%;"><a href="cats.html">cats</a></td>
+<td>Anatomical Data from Domestic Cats</td></tr>
+<tr><td style="width: 25%;"><a href="cement.html">cement</a></td>
+<td>Heat Evolved by Setting Cements</td></tr>
+<tr><td style="width: 25%;"><a href="chem.html">chem</a></td>
+<td>Copper in Wholemeal Flour</td></tr>
+<tr><td style="width: 25%;"><a href="lda.html">coef.lda</a></td>
+<td>Linear Discriminant Analysis</td></tr>
+<tr><td style="width: 25%;"><a href="con2tr.html">con2tr</a></td>
+<td>Convert Lists to Data Frames for use by lattice</td></tr>
+<tr><td style="width: 25%;"><a href="confint.html">confint.glm</a></td>
+<td>Confidence Intervals for Model Parameters</td></tr>
+<tr><td style="width: 25%;"><a href="confint.html">confint.nls</a></td>
+<td>Confidence Intervals for Model Parameters</td></tr>
+<tr><td style="width: 25%;"><a href="confint.html">confint.profile.glm</a></td>
+<td>Confidence Intervals for Model Parameters</td></tr>
+<tr><td style="width: 25%;"><a href="confint.html">confint.profile.nls</a></td>
+<td>Confidence Intervals for Model Parameters</td></tr>
+<tr><td style="width: 25%;"><a href="contr.sdif.html">contr.sdif</a></td>
+<td>Successive Differences Contrast Coding</td></tr>
+<tr><td style="width: 25%;"><a href="coop.html">coop</a></td>
+<td>Co-operative Trial in Analytical Chemistry</td></tr>
+<tr><td style="width: 25%;"><a href="corresp.html">corresp</a></td>
+<td>Simple Correspondence Analysis</td></tr>
+<tr><td style="width: 25%;"><a href="corresp.html">corresp.data.frame</a></td>
+<td>Simple Correspondence Analysis</td></tr>
+<tr><td style="width: 25%;"><a href="corresp.html">corresp.default</a></td>
+<td>Simple Correspondence Analysis</td></tr>
+<tr><td style="width: 25%;"><a href="corresp.html">corresp.factor</a></td>
+<td>Simple Correspondence Analysis</td></tr>
+<tr><td style="width: 25%;"><a href="corresp.html">corresp.formula</a></td>
+<td>Simple Correspondence Analysis</td></tr>
+<tr><td style="width: 25%;"><a href="corresp.html">corresp.matrix</a></td>
+<td>Simple Correspondence Analysis</td></tr>
+<tr><td style="width: 25%;"><a href="corresp.html">corresp.xtabs</a></td>
+<td>Simple Correspondence Analysis</td></tr>
+<tr><td style="width: 25%;"><a href="cov.rob.html">cov.mcd</a></td>
+<td>Resistant Estimation of Multivariate Location and Scatter</td></tr>
+<tr><td style="width: 25%;"><a href="cov.rob.html">cov.mve</a></td>
+<td>Resistant Estimation of Multivariate Location and Scatter</td></tr>
+<tr><td style="width: 25%;"><a href="cov.rob.html">cov.rob</a></td>
+<td>Resistant Estimation of Multivariate Location and Scatter</td></tr>
+<tr><td style="width: 25%;"><a href="cov.trob.html">cov.trob</a></td>
+<td>Covariance Estimation for Multivariate t Distribution</td></tr>
+<tr><td style="width: 25%;"><a href="cpus.html">cpus</a></td>
+<td>Performance of Computer CPUs</td></tr>
+<tr><td style="width: 25%;"><a href="crabs.html">crabs</a></td>
+<td>Morphological Measurements on Leptograpsus Crabs</td></tr>
+<tr><td style="width: 25%;"><a href="Cushings.html">Cushings</a></td>
+<td>Diagnostic Tests on Patients with Cushing's Syndrome</td></tr>
+</table>
+
+<h2><a name="D">-- D --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="DDT.html">DDT</a></td>
+<td>DDT in Kale</td></tr>
+<tr><td style="width: 25%;"><a href="deaths.html">deaths</a></td>
+<td>Monthly Deaths from Lung Diseases in the UK</td></tr>
+<tr><td style="width: 25%;"><a href="denumerate.html">denumerate</a></td>
+<td>Transform an Allowable Formula for 'loglm' into one for 'terms'</td></tr>
+<tr><td style="width: 25%;"><a href="denumerate.html">denumerate.formula</a></td>
+<td>Transform an Allowable Formula for 'loglm' into one for 'terms'</td></tr>
+<tr><td style="width: 25%;"><a href="dose.p.html">dose.p</a></td>
+<td>Predict Doses for Binomial Assay model</td></tr>
+<tr><td style="width: 25%;"><a href="drivers.html">drivers</a></td>
+<td>Deaths of Car Drivers in Great Britain 1969-84</td></tr>
+<tr><td style="width: 25%;"><a href="dropterm.html">dropterm</a></td>
+<td>Try All One-Term Deletions from a Model</td></tr>
+<tr><td style="width: 25%;"><a href="dropterm.html">dropterm.default</a></td>
+<td>Try All One-Term Deletions from a Model</td></tr>
+<tr><td style="width: 25%;"><a href="dropterm.html">dropterm.glm</a></td>
+<td>Try All One-Term Deletions from a Model</td></tr>
+<tr><td style="width: 25%;"><a href="dropterm.html">dropterm.lm</a></td>
+<td>Try All One-Term Deletions from a Model</td></tr>
+</table>
+
+<h2><a name="E">-- E --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="eagles.html">eagles</a></td>
+<td>Foraging Ecology of Bald Eagles</td></tr>
+<tr><td style="width: 25%;"><a href="epil.html">epil</a></td>
+<td>Seizure Counts for Epileptics</td></tr>
+<tr><td style="width: 25%;"><a href="eqscplot.html">eqscplot</a></td>
+<td>Plots with Geometrically Equal Scales</td></tr>
+<tr><td style="width: 25%;"><a href="stepAIC.html">extractAIC.gls</a></td>
+<td>Choose a model by AIC in a Stepwise Algorithm</td></tr>
+<tr><td style="width: 25%;"><a href="stepAIC.html">extractAIC.lme</a></td>
+<td>Choose a model by AIC in a Stepwise Algorithm</td></tr>
+</table>
+
+<h2><a name="F">-- F --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="glm.nb.html">family.negbin</a></td>
+<td>Fit a Negative Binomial Generalized Linear Model</td></tr>
+<tr><td style="width: 25%;"><a href="farms.html">farms</a></td>
+<td>Ecological Factors in Farm Management</td></tr>
+<tr><td style="width: 25%;"><a href="fgl.html">fgl</a></td>
+<td>Measurements of Forensic Glass Fragments</td></tr>
+<tr><td style="width: 25%;"><a href="fitdistr.html">fitdistr</a></td>
+<td>Maximum-likelihood Fitting of Univariate Distributions</td></tr>
+<tr><td style="width: 25%;"><a href="forbes.html">forbes</a></td>
+<td>Forbes' Data on Boiling Points in the Alps</td></tr>
+<tr><td style="width: 25%;"><a href="fractions.html">fractions</a></td>
+<td>Rational Approximation</td></tr>
+</table>
+
+<h2><a name="G">-- G --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="GAGurine.html">GAGurine</a></td>
+<td>Level of GAG in Urine of Children</td></tr>
+<tr><td style="width: 25%;"><a href="galaxies.html">galaxies</a></td>
+<td>Velocities for 82 Galaxies</td></tr>
+<tr><td style="width: 25%;"><a href="gamma.dispersion.html">gamma.dispersion</a></td>
+<td>Calculate the MLE of the Gamma Dispersion Parameter in a GLM Fit</td></tr>
+<tr><td style="width: 25%;"><a href="gamma.shape.glm.html">gamma.shape</a></td>
+<td>Estimate the Shape Parameter of the Gamma Distribution in a GLM Fit</td></tr>
+<tr><td style="width: 25%;"><a href="gamma.shape.glm.html">gamma.shape.glm</a></td>
+<td>Estimate the Shape Parameter of the Gamma Distribution in a GLM Fit</td></tr>
+<tr><td style="width: 25%;"><a href="gehan.html">gehan</a></td>
+<td>Remission Times of Leukaemia Patients</td></tr>
+<tr><td style="width: 25%;"><a href="genotype.html">genotype</a></td>
+<td>Rat Genotype Data</td></tr>
+<tr><td style="width: 25%;"><a href="geyser.html">geyser</a></td>
+<td>Old Faithful Geyser Data</td></tr>
+<tr><td style="width: 25%;"><a href="gilgais.html">gilgais</a></td>
+<td>Line Transect of Soil in Gilgai Territory</td></tr>
+<tr><td style="width: 25%;"><a href="ginv.html">ginv</a></td>
+<td>Generalized Inverse of a Matrix</td></tr>
+<tr><td style="width: 25%;"><a href="glm.convert.html">glm.convert</a></td>
+<td>Change a Negative Binomial fit to a GLM fit</td></tr>
+<tr><td style="width: 25%;"><a href="glm.nb.html">glm.nb</a></td>
+<td>Fit a Negative Binomial Generalized Linear Model</td></tr>
+<tr><td style="width: 25%;"><a href="glmmPQL.html">glmmPQL</a></td>
+<td>Fit Generalized Linear Mixed Models via PQL</td></tr>
+</table>
+
+<h2><a name="H">-- H --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="hills.html">hills</a></td>
+<td>Record Times in Scottish Hill Races</td></tr>
+<tr><td style="width: 25%;"><a href="hist.scott.html">hist.FD</a></td>
+<td>Plot a Histogram with Automatic Bin Width Selection</td></tr>
+<tr><td style="width: 25%;"><a href="hist.scott.html">hist.scott</a></td>
+<td>Plot a Histogram with Automatic Bin Width Selection</td></tr>
+<tr><td style="width: 25%;"><a href="housing.html">housing</a></td>
+<td>Frequency Table from a Copenhagen Housing Conditions Survey</td></tr>
+<tr><td style="width: 25%;"><a href="huber.html">huber</a></td>
+<td>Huber M-estimator of Location with MAD Scale</td></tr>
+<tr><td style="width: 25%;"><a href="hubers.html">hubers</a></td>
+<td>Huber Proposal 2 Robust Estimator of Location and/or Scale</td></tr>
+</table>
+
+<h2><a name="I">-- I --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="immer.html">immer</a></td>
+<td>Yields from a Barley Field Trial</td></tr>
+<tr><td style="width: 25%;"><a href="Insurance.html">Insurance</a></td>
+<td>Numbers of Car Insurance claims</td></tr>
+<tr><td style="width: 25%;"><a href="fractions.html">is.fractions</a></td>
+<td>Rational Approximation</td></tr>
+<tr><td style="width: 25%;"><a href="isoMDS.html">isoMDS</a></td>
+<td>Kruskal's Non-metric Multidimensional Scaling</td></tr>
+</table>
+
+<h2><a name="K">-- K --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="kde2d.html">kde2d</a></td>
+<td>Two-Dimensional Kernel Density Estimation</td></tr>
+</table>
+
+<h2><a name="L">-- L --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="lda.html">lda</a></td>
+<td>Linear Discriminant Analysis</td></tr>
+<tr><td style="width: 25%;"><a href="lda.html">lda.data.frame</a></td>
+<td>Linear Discriminant Analysis</td></tr>
+<tr><td style="width: 25%;"><a href="lda.html">lda.default</a></td>
+<td>Linear Discriminant Analysis</td></tr>
+<tr><td style="width: 25%;"><a href="lda.html">lda.formula</a></td>
+<td>Linear Discriminant Analysis</td></tr>
+<tr><td style="width: 25%;"><a href="lda.html">lda.matrix</a></td>
+<td>Linear Discriminant Analysis</td></tr>
+<tr><td style="width: 25%;"><a href="ldahist.html">ldahist</a></td>
+<td>Histograms or Density Plots of Multiple Groups</td></tr>
+<tr><td style="width: 25%;"><a href="leuk.html">leuk</a></td>
+<td>Survival Times and White Blood Counts for Leukaemia Patients</td></tr>
+<tr><td style="width: 25%;"><a href="lm.gls.html">lm.gls</a></td>
+<td>Fit Linear Models by Generalized Least Squares</td></tr>
+<tr><td style="width: 25%;"><a href="lm.ridge.html">lm.ridge</a></td>
+<td>Ridge Regression</td></tr>
+<tr><td style="width: 25%;"><a href="lqs.html">lmsreg</a></td>
+<td>Resistant Regression</td></tr>
+<tr><td style="width: 25%;"><a href="stdres.html">lmwork</a></td>
+<td>Extract Standardized Residuals from a Linear Model</td></tr>
+<tr><td style="width: 25%;"><a href="glm.nb.html">logLik.negbin</a></td>
+<td>Fit a Negative Binomial Generalized Linear Model</td></tr>
+<tr><td style="width: 25%;"><a href="loglm.html">loglm</a></td>
+<td>Fit Log-Linear Models by Iterative Proportional Scaling</td></tr>
+<tr><td style="width: 25%;"><a href="logtrans.html">logtrans</a></td>
+<td>Estimate log Transformation Parameter</td></tr>
+<tr><td style="width: 25%;"><a href="logtrans.html">logtrans.default</a></td>
+<td>Estimate log Transformation Parameter</td></tr>
+<tr><td style="width: 25%;"><a href="logtrans.html">logtrans.formula</a></td>
+<td>Estimate log Transformation Parameter</td></tr>
+<tr><td style="width: 25%;"><a href="logtrans.html">logtrans.lm</a></td>
+<td>Estimate log Transformation Parameter</td></tr>
+<tr><td style="width: 25%;"><a href="lqs.html">lqs</a></td>
+<td>Resistant Regression</td></tr>
+<tr><td style="width: 25%;"><a href="lqs.html">lqs.default</a></td>
+<td>Resistant Regression</td></tr>
+<tr><td style="width: 25%;"><a href="lqs.html">lqs.formula</a></td>
+<td>Resistant Regression</td></tr>
+<tr><td style="width: 25%;"><a href="lqs.html">ltsreg</a></td>
+<td>Resistant Regression</td></tr>
+</table>
+
+<h2><a name="M">-- M --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="mammals.html">mammals</a></td>
+<td>Brain and Body Weights for 62 Species of Land Mammals</td></tr>
+<tr><td style="width: 25%;"><a href="fractions.html">Math.fractions</a></td>
+<td>Rational Approximation</td></tr>
+<tr><td style="width: 25%;"><a href="mca.html">mca</a></td>
+<td>Multiple Correspondence Analysis</td></tr>
+<tr><td style="width: 25%;"><a href="mcycle.html">mcycle</a></td>
+<td>Data from a Simulated Motorcycle Accident</td></tr>
+<tr><td style="width: 25%;"><a href="Melanoma.html">Melanoma</a></td>
+<td>Survival from Malignant Melanoma</td></tr>
+<tr><td style="width: 25%;"><a href="menarche.html">menarche</a></td>
+<td>Age of Menarche in Warsaw</td></tr>
+<tr><td style="width: 25%;"><a href="michelson.html">michelson</a></td>
+<td>Michelson's Speed of Light Data</td></tr>
+<tr><td style="width: 25%;"><a href="minn38.html">minn38</a></td>
+<td>Minnesota High School Graduates of 1938</td></tr>
+<tr><td style="width: 25%;"><a href="lda.html">model.frame.lda</a></td>
+<td>Linear Discriminant Analysis</td></tr>
+<tr><td style="width: 25%;"><a href="qda.html">model.frame.qda</a></td>
+<td>Quadratic Discriminant Analysis</td></tr>
+<tr><td style="width: 25%;"><a href="motors.html">motors</a></td>
+<td>Accelerated Life Testing of Motorettes</td></tr>
+<tr><td style="width: 25%;"><a href="muscle.html">muscle</a></td>
+<td>Effect of Calcium Chloride on Muscle Contraction in Rat Hearts</td></tr>
+<tr><td style="width: 25%;"><a href="mvrnorm.html">mvrnorm</a></td>
+<td>Simulate from a Multivariate Normal Distribution</td></tr>
+</table>
+
+<h2><a name="N">-- N --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="negative.binomial.html">negative.binomial</a></td>
+<td>Family function for Negative Binomial GLMs</td></tr>
+<tr><td style="width: 25%;"><a href="newcomb.html">newcomb</a></td>
+<td>Newcomb's Measurements of the Passage Time of Light</td></tr>
+<tr><td style="width: 25%;"><a href="nlschools.html">nlschools</a></td>
+<td>Eighth-Grade Pupils in the Netherlands</td></tr>
+<tr><td style="width: 25%;"><a href="npk.html">npk</a></td>
+<td>Classical N, P, K Factorial Experiment</td></tr>
+<tr><td style="width: 25%;"><a href="npr1.html">npr1</a></td>
+<td>US Naval Petroleum Reserve No. 1 data</td></tr>
+<tr><td style="width: 25%;"><a href="Null.html">Null</a></td>
+<td>Null Spaces of Matrices</td></tr>
+</table>
+
+<h2><a name="O">-- O --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="oats.html">oats</a></td>
+<td>Data from an Oats Field Trial</td></tr>
+<tr><td style="width: 25%;"><a href="OME.html">OME</a></td>
+<td>Tests of Auditory Perception in Children with OME</td></tr>
+<tr><td style="width: 25%;"><a href="fractions.html">Ops.fractions</a></td>
+<td>Rational Approximation</td></tr>
+</table>
+
+<h2><a name="P">-- P --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="painters.html">painters</a></td>
+<td>The Painter's Data of de Piles</td></tr>
+<tr><td style="width: 25%;"><a href="pairs.lda.html">pairs.lda</a></td>
+<td>Produce Pairwise Scatterplots from an 'lda' Fit</td></tr>
+<tr><td style="width: 25%;"><a href="plot.profile.html">pairs.profile</a></td>
+<td>Plotting Functions for 'profile' Objects</td></tr>
+<tr><td style="width: 25%;"><a href="parcoord.html">parcoord</a></td>
+<td>Parallel Coordinates Plot</td></tr>
+<tr><td style="width: 25%;"><a href="petrol.html">petrol</a></td>
+<td>N. L. Prater's Petrol Refinery Data</td></tr>
+<tr><td style="width: 25%;"><a href="phones.html">phones</a></td>
+<td>Belgium Phone Calls 1950-1973</td></tr>
+<tr><td style="width: 25%;"><a href="Pima.tr.html">Pima.te</a></td>
+<td>Diabetes in Pima Indian Women</td></tr>
+<tr><td style="width: 25%;"><a href="Pima.tr.html">Pima.tr</a></td>
+<td>Diabetes in Pima Indian Women</td></tr>
+<tr><td style="width: 25%;"><a href="Pima.tr.html">Pima.tr2</a></td>
+<td>Diabetes in Pima Indian Women</td></tr>
+<tr><td style="width: 25%;"><a href="plot.lda.html">plot.lda</a></td>
+<td>Plot Method for Class 'lda'</td></tr>
+<tr><td style="width: 25%;"><a href="plot.mca.html">plot.mca</a></td>
+<td>Plot Method for Objects of Class 'mca'</td></tr>
+<tr><td style="width: 25%;"><a href="plot.profile.html">plot.profile</a></td>
+<td>Plotting Functions for 'profile' Objects</td></tr>
+<tr><td style="width: 25%;"><a href="lm.ridge.html">plot.ridgelm</a></td>
+<td>Ridge Regression</td></tr>
+<tr><td style="width: 25%;"><a href="polr.html">polr</a></td>
+<td>Ordered Logistic or Probit Regression</td></tr>
+<tr><td style="width: 25%;"><a href="predict.glmmPQL.html">predict.glmmPQL</a></td>
+<td>Predict Method for glmmPQL Fits</td></tr>
+<tr><td style="width: 25%;"><a href="predict.lda.html">predict.lda</a></td>
+<td>Classify Multivariate Observations by Linear Discrimination</td></tr>
+<tr><td style="width: 25%;"><a href="predict.lqs.html">predict.lqs</a></td>
+<td>Predict from an lqs Fit</td></tr>
+<tr><td style="width: 25%;"><a href="predict.mca.html">predict.mca</a></td>
+<td>Predict Method for Class 'mca'</td></tr>
+<tr><td style="width: 25%;"><a href="predict.qda.html">predict.qda</a></td>
+<td>Classify from Quadratic Discriminant Analysis</td></tr>
+<tr><td style="width: 25%;"><a href="rlm.html">predict.rlm</a></td>
+<td>Robust Fitting of Linear Models</td></tr>
+<tr><td style="width: 25%;"><a href="fractions.html">print.fractions</a></td>
+<td>Rational Approximation</td></tr>
+<tr><td style="width: 25%;"><a href="gamma.shape.glm.html">print.gamma.shape</a></td>
+<td>Estimate the Shape Parameter of the Gamma Distribution in a GLM Fit</td></tr>
+<tr><td style="width: 25%;"><a href="dose.p.html">print.glm.dose</a></td>
+<td>Predict Doses for Binomial Assay model</td></tr>
+<tr><td style="width: 25%;"><a href="lda.html">print.lda</a></td>
+<td>Linear Discriminant Analysis</td></tr>
+<tr><td style="width: 25%;"><a href="mca.html">print.mca</a></td>
+<td>Multiple Correspondence Analysis</td></tr>
+<tr><td style="width: 25%;"><a href="qda.html">print.qda</a></td>
+<td>Quadratic Discriminant Analysis</td></tr>
+<tr><td style="width: 25%;"><a href="lm.ridge.html">print.ridgelm</a></td>
+<td>Ridge Regression</td></tr>
+<tr><td style="width: 25%;"><a href="rlm.html">print.rlm</a></td>
+<td>Robust Fitting of Linear Models</td></tr>
+<tr><td style="width: 25%;"><a href="rms.curv.html">print.rms.curv</a></td>
+<td>Relative Curvature Measures for Non-Linear Regression</td></tr>
+<tr><td style="width: 25%;"><a href="summary.loglm.html">print.summary.loglm</a></td>
+<td>Summary Method Function for Objects of Class 'loglm'</td></tr>
+<tr><td style="width: 25%;"><a href="summary.negbin.html">print.summary.negbin</a></td>
+<td>Summary Method Function for Objects of Class 'negbin'</td></tr>
+<tr><td style="width: 25%;"><a href="summary.rlm.html">print.summary.rlm</a></td>
+<td>Summary Method for Robust Linear Models</td></tr>
+<tr><td style="width: 25%;"><a href="profile.glm.html">profile.glm</a></td>
+<td>Method for Profiling glm Objects</td></tr>
+<tr><td style="width: 25%;"><a href="rlm.html">psi.bisquare</a></td>
+<td>Robust Fitting of Linear Models</td></tr>
+<tr><td style="width: 25%;"><a href="rlm.html">psi.hampel</a></td>
+<td>Robust Fitting of Linear Models</td></tr>
+<tr><td style="width: 25%;"><a href="rlm.html">psi.huber</a></td>
+<td>Robust Fitting of Linear Models</td></tr>
+</table>
+
+<h2><a name="Q">-- Q --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="qda.html">qda</a></td>
+<td>Quadratic Discriminant Analysis</td></tr>
+<tr><td style="width: 25%;"><a href="qda.html">qda.data.frame</a></td>
+<td>Quadratic Discriminant Analysis</td></tr>
+<tr><td style="width: 25%;"><a href="qda.html">qda.default</a></td>
+<td>Quadratic Discriminant Analysis</td></tr>
+<tr><td style="width: 25%;"><a href="qda.html">qda.formula</a></td>
+<td>Quadratic Discriminant Analysis</td></tr>
+<tr><td style="width: 25%;"><a href="qda.html">qda.matrix</a></td>
+<td>Quadratic Discriminant Analysis</td></tr>
+<tr><td style="width: 25%;"><a href="quine.html">quine</a></td>
+<td>Absenteeism from School in Rural New South Wales</td></tr>
+</table>
+
+<h2><a name="R">-- R --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="Rabbit.html">Rabbit</a></td>
+<td>Blood Pressure in Rabbits</td></tr>
+<tr><td style="width: 25%;"><a href="rational.html">rational</a></td>
+<td>Rational Approximation</td></tr>
+<tr><td style="width: 25%;"><a href="renumerate.html">renumerate</a></td>
+<td>Convert a Formula Transformed by 'denumerate'</td></tr>
+<tr><td style="width: 25%;"><a href="renumerate.html">renumerate.formula</a></td>
+<td>Convert a Formula Transformed by 'denumerate'</td></tr>
+<tr><td style="width: 25%;"><a href="rlm.html">rlm</a></td>
+<td>Robust Fitting of Linear Models</td></tr>
+<tr><td style="width: 25%;"><a href="rlm.html">rlm.default</a></td>
+<td>Robust Fitting of Linear Models</td></tr>
+<tr><td style="width: 25%;"><a href="rlm.html">rlm.formula</a></td>
+<td>Robust Fitting of Linear Models</td></tr>
+<tr><td style="width: 25%;"><a href="rms.curv.html">rms.curv</a></td>
+<td>Relative Curvature Measures for Non-Linear Regression</td></tr>
+<tr><td style="width: 25%;"><a href="rnegbin.html">rnegbin</a></td>
+<td>Simulate Negative Binomial Variates</td></tr>
+<tr><td style="width: 25%;"><a href="road.html">road</a></td>
+<td>Road Accident Deaths in US States</td></tr>
+<tr><td style="width: 25%;"><a href="rotifer.html">rotifer</a></td>
+<td>Numbers of Rotifers by Fluid Density</td></tr>
+<tr><td style="width: 25%;"><a href="Rubber.html">Rubber</a></td>
+<td>Accelerated Testing of Tyre Rubber</td></tr>
+</table>
+
+<h2><a name="S">-- S --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="sammon.html">sammon</a></td>
+<td>Sammon's Non-Linear Mapping</td></tr>
+<tr><td style="width: 25%;"><a href="lm.ridge.html">select</a></td>
+<td>Ridge Regression</td></tr>
+<tr><td style="width: 25%;"><a href="lm.ridge.html">select.ridgelm</a></td>
+<td>Ridge Regression</td></tr>
+<tr><td style="width: 25%;"><a href="isoMDS.html">Shepard</a></td>
+<td>Kruskal's Non-metric Multidimensional Scaling</td></tr>
+<tr><td style="width: 25%;"><a href="ships.html">ships</a></td>
+<td>Ships Damage Data</td></tr>
+<tr><td style="width: 25%;"><a href="shoes.html">shoes</a></td>
+<td>Shoe wear data of Box, Hunter and Hunter</td></tr>
+<tr><td style="width: 25%;"><a href="shrimp.html">shrimp</a></td>
+<td>Percentage of Shrimp in Shrimp Cocktail</td></tr>
+<tr><td style="width: 25%;"><a href="shuttle.html">shuttle</a></td>
+<td>Space Shuttle Autolander Problem</td></tr>
+<tr><td style="width: 25%;"><a href="Sitka.html">Sitka</a></td>
+<td>Growth Curves for Sitka Spruce Trees in 1988</td></tr>
+<tr><td style="width: 25%;"><a href="Sitka89.html">Sitka89</a></td>
+<td>Growth Curves for Sitka Spruce Trees in 1989</td></tr>
+<tr><td style="width: 25%;"><a href="Skye.html">Skye</a></td>
+<td>AFM Compositions of Aphyric Skye Lavas</td></tr>
+<tr><td style="width: 25%;"><a href="snails.html">snails</a></td>
+<td>Snail Mortality Data</td></tr>
+<tr><td style="width: 25%;"><a href="SP500.html">SP500</a></td>
+<td>Returns of the Standard and Poors 500</td></tr>
+<tr><td style="width: 25%;"><a href="stdres.html">stdres</a></td>
+<td>Extract Standardized Residuals from a Linear Model</td></tr>
+<tr><td style="width: 25%;"><a href="steam.html">steam</a></td>
+<td>The Saturated Steam Pressure Data</td></tr>
+<tr><td style="width: 25%;"><a href="stepAIC.html">stepAIC</a></td>
+<td>Choose a model by AIC in a Stepwise Algorithm</td></tr>
+<tr><td style="width: 25%;"><a href="stormer.html">stormer</a></td>
+<td>The Stormer Viscometer Data</td></tr>
+<tr><td style="width: 25%;"><a href="studres.html">studres</a></td>
+<td>Extract Studentized Residuals from a Linear Model</td></tr>
+<tr><td style="width: 25%;"><a href="fractions.html">Summary.fractions</a></td>
+<td>Rational Approximation</td></tr>
+<tr><td style="width: 25%;"><a href="summary.loglm.html">summary.loglm</a></td>
+<td>Summary Method Function for Objects of Class 'loglm'</td></tr>
+<tr><td style="width: 25%;"><a href="summary.negbin.html">summary.negbin</a></td>
+<td>Summary Method Function for Objects of Class 'negbin'</td></tr>
+<tr><td style="width: 25%;"><a href="summary.rlm.html">summary.rlm</a></td>
+<td>Summary Method for Robust Linear Models</td></tr>
+<tr><td style="width: 25%;"><a href="survey.html">survey</a></td>
+<td>Student Survey Data</td></tr>
+<tr><td style="width: 25%;"><a href="synth.tr.html">synth.te</a></td>
+<td>Synthetic Classification Problem</td></tr>
+<tr><td style="width: 25%;"><a href="synth.tr.html">synth.tr</a></td>
+<td>Synthetic Classification Problem</td></tr>
+</table>
+
+<h2><a name="T">-- T --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="fractions.html">t.fractions</a></td>
+<td>Rational Approximation</td></tr>
+<tr><td style="width: 25%;"><a href="stepAIC.html">terms.gls</a></td>
+<td>Choose a model by AIC in a Stepwise Algorithm</td></tr>
+<tr><td style="width: 25%;"><a href="stepAIC.html">terms.lme</a></td>
+<td>Choose a model by AIC in a Stepwise Algorithm</td></tr>
+<tr><td style="width: 25%;"><a href="theta.md.html">theta.md</a></td>
+<td>Estimate theta of the Negative Binomial</td></tr>
+<tr><td style="width: 25%;"><a href="theta.md.html">theta.ml</a></td>
+<td>Estimate theta of the Negative Binomial</td></tr>
+<tr><td style="width: 25%;"><a href="theta.md.html">theta.mm</a></td>
+<td>Estimate theta of the Negative Binomial</td></tr>
+<tr><td style="width: 25%;"><a href="topo.html">topo</a></td>
+<td>Spatial Topographic Data</td></tr>
+<tr><td style="width: 25%;"><a href="Traffic.html">Traffic</a></td>
+<td>Effect of Swedish Speed Limits on Accidents</td></tr>
+<tr><td style="width: 25%;"><a href="truehist.html">truehist</a></td>
+<td>Plot a Histogram</td></tr>
+</table>
+
+<h2><a name="U">-- U --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="ucv.html">ucv</a></td>
+<td>Unbiased Cross-Validation for Bandwidth Selection</td></tr>
+<tr><td style="width: 25%;"><a href="UScereal.html">UScereal</a></td>
+<td>Nutritional and Marketing Information on US Cereals</td></tr>
+<tr><td style="width: 25%;"><a href="UScrime.html">UScrime</a></td>
+<td>The Effect of Punishment Regimes on Crime Rates</td></tr>
+</table>
+
+<h2><a name="V">-- V --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="VA.html">VA</a></td>
+<td>Veteran's Administration Lung Cancer Trial</td></tr>
+</table>
+
+<h2><a name="W">-- W --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="waders.html">waders</a></td>
+<td>Counts of Waders at 15 Sites in South Africa</td></tr>
+<tr><td style="width: 25%;"><a href="whiteside.html">whiteside</a></td>
+<td>House Insulation: Whiteside's Data</td></tr>
+<tr><td style="width: 25%;"><a href="width.SJ.html">width.SJ</a></td>
+<td>Bandwidth Selection by Pilot Estimation of Derivatives</td></tr>
+<tr><td style="width: 25%;"><a href="write.matrix.html">write.matrix</a></td>
+<td>Write a Matrix or Data Frame</td></tr>
+<tr><td style="width: 25%;"><a href="wtloss.html">wtloss</a></td>
+<td>Weight Loss Data from an Obese Patient</td></tr>
+</table>
+
+<h2><a name="misc">-- misc --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="rational.html">.rat</a></td>
+<td>Rational Approximation</td></tr>
+<tr><td style="width: 25%;"><a href="fractions.html">[.fractions</a></td>
+<td>Rational Approximation</td></tr>
+<tr><td style="width: 25%;"><a href="fractions.html">[&lt;-.fractions</a></td>
+<td>Rational Approximation</td></tr>
+</table>
+</body></html>

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/MASS/html/00Index.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/data/CAex.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/data/CAex.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/data/CAex.R	(revision 2477)
@@ -0,0 +1,18 @@
+stopifnot(require(Matrix), require(methods)) # Matrix classes; new, slot<-
+
+CAex <-
+    local({
+	load(system.file(file.path("external", "CAex_slots.rda"), package = "Matrix"))
+	## -> 'L'
+	r <- new("dgCMatrix")
+	for (n in c("Dim", "i","p","x"))
+	    slot(r, n) <- L[[n]]
+	r
+    })
+
+## The reverse { CAex |--> L } is
+if(FALSE) {
+    sNms <- c("Dim", "i", "p", "x")
+    L <- lapply(sNms, function(N) slot(CAex, N)); names(L) <- sNms
+    save(L, file = "/u/maechler/R/Pkgs/Matrix/inst/external/CAex_slots.rda")
+}
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/data/USCounties.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/data/USCounties.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/data/USCounties.R	(revision 2477)
@@ -0,0 +1,17 @@
+stopifnot(require(Matrix), require(methods)) # Matrix classes; new, slot<-
+
+USCounties <-
+    local({
+	load(system.file(file.path("external", "USCounties_slots.rda"),
+                         package = "Matrix"))
+	## -> 'L'
+	r <- new("dsCMatrix")
+	for (n in c("Dim", "i","p","x"))
+	    slot(r, n) <- L[[n]]
+	r
+    })
+
+## The reverse:
+##  L <- list()
+##  for (n in c("Dim", "i","p","x"))    L[[n]] <- slot(USCounties, n)
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/data/KNex.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/data/KNex.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/data/KNex.R	(revision 2477)
@@ -0,0 +1,11 @@
+stopifnot(require(Matrix), require(methods)) # Matrix classes; new, slot<-
+
+KNex <-
+    local({
+	load(system.file(file.path("external", "KNex_slots.rda"), package = "Matrix"))
+	## -> 'L'
+	r <- list(mm = new("dgCMatrix"), y = L[["y"]])
+	for (n in c("Dim", "i","p","x")) ## needs methods::slot<-
+	    slot(r$mm, n) <- L[[n]]
+	r
+    })
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/po/fr/LC_MESSAGES/R-Matrix.mo
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/po/fr/LC_MESSAGES/R-Matrix.mo
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/po/fr/LC_MESSAGES/Matrix.mo
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/po/fr/LC_MESSAGES/Matrix.mo
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/po/de/LC_MESSAGES/R-Matrix.mo
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/po/de/LC_MESSAGES/R-Matrix.mo
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/po/de/LC_MESSAGES/Matrix.mo
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/po/de/LC_MESSAGES/Matrix.mo
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/po/ko/LC_MESSAGES/R-Matrix.mo
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/po/ko/LC_MESSAGES/R-Matrix.mo
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/po/en@quot/LC_MESSAGES/R-Matrix.mo
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/po/en@quot/LC_MESSAGES/R-Matrix.mo
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/po/en@quot/LC_MESSAGES/Matrix.mo
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/po/en@quot/LC_MESSAGES/Matrix.mo
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/po/pl/LC_MESSAGES/R-Matrix.mo
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/po/pl/LC_MESSAGES/R-Matrix.mo
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/po/pl/LC_MESSAGES/Matrix.mo
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/po/pl/LC_MESSAGES/Matrix.mo
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/external/lund_a.rsa
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/external/lund_a.rsa	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/external/lund_a.rsa	(revision 2477)
@@ -0,0 +1,356 @@
+1SYMMETRIC MATRIX A OF LUND EIGENVALUE PROBLEM, MAY 1974                LUND A  
+           352            10            82           260             0          
+RSA                      147           147          1298             0          
+(16I5)          (16I5)          (5E16.8)                                        
+    1    7   15   23   31   39   47   53   58   68   77   85   97  108  118  130
+  141  151  163  174  184  196  207  217  228  238  247  254  260  265  275  284
+  292  304  315  325  337  348  358  370  381  391  403  414  424  435  445  454
+  461  467  472  482  491  499  510  521  531  543  554  564  576  587  597  609
+  620  630  641  651  660  667  673  678  688  697  705  717  728  738  750  761
+  771  783  794  804  815  826  836  847  857  866  873  879  884  894  903  911
+  923  934  944  956  967  977  989 1000 1010 1022 1033 1043 1053 1063 1072 1079
+ 1085 1090 1099 1107 1114 1124 1133 1141 1151 1160 1168 1178 1187 1195 1205 1214
+ 1222 1231 1239 1246 1251 1255 1258 1262 1265 1269 1272 1276 1279 1283 1286 1290
+ 1293 1296 1298 1299                                                            
+    1    2    8    9   10   11    2    3    9   10   11   12   13   14    3    4
+   12   13   14   15   16   17    4    5   15   16   17   18   19   20    5    6
+   18   19   20   21   22   23    6    7   21   22   23   24   25   26    7   24
+   25   26   27   28    8    9   10   11   29    9   10   11   12   13   14   29
+   30   31   32   10   11   12   13   14   29   30   31   32   11   12   13   14
+   29   30   31   32   12   13   14   15   16   17   30   31   32   33   34   35
+   13   14   15   16   17   30   31   32   33   34   35   14   15   16   17   30
+   31   32   33   34   35   15   16   17   18   19   20   33   34   35   36   37
+   38   16   17   18   19   20   33   34   35   36   37   38   17   18   19   20
+   33   34   35   36   37   38   18   19   20   21   22   23   36   37   38   39
+   40   41   19   20   21   22   23   36   37   38   39   40   41   20   21   22
+   23   36   37   38   39   40   41   21   22   23   24   25   26   39   40   41
+   42   43   44   22   23   24   25   26   39   40   41   42   43   44   23   24
+   25   26   39   40   41   42   43   44   24   25   26   27   28   42   43   44
+   45   46   47   25   26   27   28   42   43   44   45   46   47   26   27   28
+   42   43   44   45   46   47   27   28   45   46   47   48   49   28   45   46
+   47   48   49   29   30   31   32   50   30   31   32   33   34   35   50   51
+   52   53   31   32   33   34   35   50   51   52   53   32   33   34   35   50
+   51   52   53   33   34   35   36   37   38   51   52   53   54   55   56   34
+   35   36   37   38   51   52   53   54   55   56   35   36   37   38   51   52
+   53   54   55   56   36   37   38   39   40   41   54   55   56   57   58   59
+   37   38   39   40   41   54   55   56   57   58   59   38   39   40   41   54
+   55   56   57   58   59   39   40   41   42   43   44   57   58   59   60   61
+   62   40   41   42   43   44   57   58   59   60   61   62   41   42   43   44
+   57   58   59   60   61   62   42   43   44   45   46   47   60   61   62   63
+   64   65   43   44   45   46   47   60   61   62   63   64   65   44   45   46
+   47   60   61   62   63   64   65   45   46   47   48   49   63   64   65   66
+   67   68   46   47   48   49   63   64   65   66   67   68   47   48   49   63
+   64   65   66   67   68   48   49   66   67   68   69   70   49   66   67   68
+   69   70   50   51   52   53   71   51   52   53   54   55   56   71   72   73
+   74   52   53   54   55   56   71   72   73   74   53   54   55   56   71   72
+   73   74   54   55   56   57   58   59   73   74   75   76   77   55   56   57
+   58   59   72   73   74   75   76   77   56   57   58   59   72   73   74   75
+   76   77   57   58   59   60   61   62   75   76   77   78   79   80   58   59
+   60   61   62   75   76   77   78   79   80   59   60   61   62   75   76   77
+   78   79   80   60   61   62   63   64   65   78   79   80   81   82   83   61
+   62   63   64   65   78   79   80   81   82   83   62   63   64   65   78   79
+   80   81   82   83   63   64   65   66   67   68   81   82   83   84   85   86
+   64   65   66   67   68   81   82   83   84   85   86   65   66   67   68   81
+   82   83   84   85   86   66   67   68   69   70   84   85   86   87   88   89
+   67   68   69   70   84   85   86   87   88   89   68   69   70   84   85   86
+   87   88   89   69   70   87   88   89   90   91   70   87   88   89   90   91
+   71   72   73   74   92   72   73   74   75   76   77   92   93   94   95   73
+   74   75   76   77   92   93   94   95   74   75   76   77   92   93   94   95
+   75   76   77   78   79   80   93   94   95   96   97   98   76   77   78   79
+   80   93   94   95   96   97   98   77   78   79   80   93   94   95   96   97
+   98   78   79   80   81   82   83   96   97   98   99  100  101   79   80   81
+   82   83   96   97   98   99  100  101   80   81   82   83   96   97   98   99
+  100  101   81   82   83   84   85   86   99  100  101  102  103  104   82   83
+   84   85   86   99  100  101  102  103  104   83   84   85   86   99  100  101
+  102  103  104   84   85   86   87   88   89  103  104  105  106  107   85   86
+   87   88   89  102  103  104  105  106  107   86   87   88   89  102  103  104
+  105  106  107   87   88   89   90   91  105  106  107  108  109  110   88   89
+   90   91  105  106  107  108  109  110   89   90   91  105  106  107  108  109
+  110   90   91  108  109  110  111  112   91  108  109  110  111  112   92   93
+   94   95  113   93   94   95   96   97   98  113  114  115  116   94   95   96
+   97   98  113  114  115  116   95   96   97   98  113  114  115  116   96   97
+   98   99  100  101  114  115  116  117  118  119   97   98   99  100  101  114
+  115  116  117  118  119   98   99  100  101  114  115  116  117  118  119   99
+  100  101  102  103  104  117  118  119  120  121  122  100  101  102  103  104
+  117  118  119  120  121  122  101  102  103  104  117  118  119  120  121  122
+  102  103  104  105  106  107  120  121  122  123  124  125  103  104  105  106
+  107  120  121  122  123  124  125  104  105  106  107  120  121  122  123  124
+  125  105  106  107  108  109  110  123  124  125  126  127  128  106  107  108
+  109  110  123  124  125  126  127  128  107  108  109  110  123  124  125  126
+  127  128  108  109  110  111  112  127  128  129  130  131  109  110  111  112
+  126  127  128  129  130  131  110  111  112  126  127  128  129  130  131  111
+  112  129  130  131  132  133  112  129  130  131  132  133  113  114  115  116
+  134  114  115  116  117  118  119  134  135  136  115  116  117  118  119  134
+  135  136  116  117  118  119  134  135  136  117  118  119  120  121  122  135
+  136  137  138  118  119  120  121  122  135  136  137  138  119  120  121  122
+  135  136  137  138  120  121  122  123  124  125  137  138  139  140  121  122
+  123  124  125  137  138  139  140  122  123  124  125  137  138  139  140  123
+  124  125  126  127  128  139  140  141  142  124  125  126  127  128  139  140
+  141  142  125  126  127  128  139  140  141  142  126  127  128  129  130  131
+  141  142  143  144  127  128  129  130  131  141  142  143  144  128  129  130
+  131  141  142  143  144  129  130  131  132  133  143  144  145  146  130  131
+  132  133  143  144  145  146  131  132  133  143  144  145  146  132  133  145
+  146  147  133  145  146  147  134  135  136  135  136  137  138  136  137  138
+  137  138  139  140  138  139  140  139  140  141  142  140  141  142  141  142
+  143  144  142  143  144  143  144  145  146  144  145  146  145  146  147  146
+  147  147                                                                      
+  0.75000000E+08  0.96153881E+06 -0.12179486E+08 -0.26175210E+07  0.28846144E+08
+  0.57692300E+07  0.75000000E+08  0.96153869E+06 -0.74786312E+05  0.96153840E+07
+ -0.12179486E+08 -0.26175210E+07  0.28846144E+08  0.57692300E+07  0.75000000E+08
+  0.96153844E+06 -0.74786375E+05  0.96153840E+07 -0.12179486E+08 -0.26175210E+07
+  0.28846144E+08  0.57692310E+07  0.75000000E+08  0.96153869E+06 -0.74786312E+05
+  0.96153840E+07 -0.12179487E+08 -0.26175210E+07  0.28846144E+08  0.57692300E+07
+  0.75000000E+08  0.96153894E+06 -0.74786375E+05  0.96153840E+07 -0.12179486E+08
+ -0.26175210E+07  0.28846160E+08  0.57692310E+07  0.75000000E+08  0.96153894E+06
+ -0.74786312E+05  0.96153850E+07 -0.12179488E+08 -0.26175220E+07  0.28846160E+08
+  0.57692310E+07  0.44230768E+08 -0.74786312E+05  0.96153850E+07 -0.12179488E+08
+ -0.15405980E+07  0.14423078E+08  0.75000000E+08  0.26175210E+07  0.57692300E+07
+  0.28846144E+08  0.96153831E+06  0.50256406E+06  0.78125000E-02  0.78125000E-02
+ -0.12564100E+06  0.74786312E+05 -0.26175210E+07  0.74786312E+05 -0.12564100E+06
+  0.26175210E+07 -0.74786312E+05  0.14999998E+09  0.12820510E+07 -0.74786312E+05
+  0.19230770E+07  0.57692310E+07 -0.12179486E+08 -0.26175210E+07  0.28846144E+08
+  0.57692300E+07  0.14999998E+09  0.26175210E+07  0.57692300E+07  0.28846144E+08
+  0.96153840E+07  0.74786312E+05  0.57692300E+07  0.19230770E+07  0.50256406E+06
+ -0.10937500E+00  0.54687500E-01 -0.12564100E+06  0.74786312E+05 -0.26175210E+07
+ -0.24414062E-03  0.74786375E+05  0.74786312E+05 -0.12564100E+06  0.26175210E+07
+ -0.74786250E+05  0.14999998E+09  0.12820520E+07 -0.74786312E+05  0.19230770E+07
+  0.57692300E+07 -0.74786312E+05  0.96153840E+07 -0.12179487E+08 -0.26175210E+07
+  0.28846144E+08  0.57692300E+07  0.14999998E+09  0.26175210E+07  0.57692300E+07
+  0.28846144E+08 -0.74786375E+05 -0.12179486E+08  0.96153840E+07  0.74786312E+05
+  0.57692310E+07  0.19230770E+07  0.50256406E+06  0.14843750E+00 -0.11718750E+00
+ -0.12564100E+06  0.74786312E+05 -0.26175210E+07 -0.36621094E-03  0.74786375E+05
+  0.74786250E+05 -0.12564100E+06  0.26175210E+07 -0.74786312E+05  0.14999998E+09
+  0.12820510E+07 -0.74786312E+05  0.19230770E+07  0.57692310E+07 -0.74786250E+05
+  0.96153840E+07 -0.12179488E+08 -0.26175210E+07  0.28846160E+08  0.57692310E+07
+  0.14999998E+09  0.26175210E+07  0.57692310E+07  0.28846144E+08 -0.74786375E+05
+ -0.12179485E+08  0.96153830E+07  0.74786375E+05  0.57692300E+07  0.19230770E+07
+  0.50256406E+06 -0.13281250E+00  0.17187500E+00 -0.12564100E+06  0.74786312E+05
+ -0.26175210E+07  0.48828125E-03  0.74786312E+05  0.74786312E+05 -0.12564100E+06
+  0.26175210E+07 -0.74786250E+05  0.14999998E+09  0.12820510E+07 -0.74786375E+05
+  0.19230770E+07  0.57692300E+07 -0.74786250E+05  0.96153840E+07 -0.12179488E+08
+ -0.26175210E+07  0.28846144E+08  0.57692300E+07  0.14999998E+09  0.26175210E+07
+  0.57692300E+07  0.28846144E+08 -0.74786375E+05 -0.12179487E+08  0.96153850E+07
+  0.74786375E+05  0.57692310E+07  0.19230760E+07  0.50256412E+06  0.32031250E+00
+ -0.68750000E+00 -0.12564106E+06  0.74786375E+05 -0.26175220E+07 -0.12207031E-03
+  0.74786437E+05  0.74786187E+05 -0.12564106E+06  0.26175220E+07 -0.74786375E+05
+  0.15000002E+09  0.12820520E+07 -0.74786312E+05  0.19230770E+07  0.57692320E+07
+ -0.74786250E+05  0.96153840E+07 -0.12179490E+08 -0.26175220E+07  0.28846160E+08
+  0.57692320E+07  0.15000000E+09  0.26175220E+07  0.57692320E+07  0.28846160E+08
+ -0.74786437E+05 -0.12179483E+08  0.96153830E+07  0.74786312E+05  0.57692320E+07
+  0.19230770E+07  0.50256419E+06  0.41406250E+00  0.85937500E-01 -0.12564106E+06
+  0.74786375E+05  0.36621094E-03  0.74786312E+05  0.74786375E+05 -0.12564106E+06
+  0.26175220E+07 -0.74786375E+05  0.15000002E+09  0.12820510E+07 -0.74786312E+05
+  0.19230770E+07 -0.74786312E+05  0.96153860E+07 -0.12179491E+08 -0.26175220E+07
+  0.28846160E+08  0.57692320E+07  0.15000002E+09  0.26175220E+07  0.57692320E+07
+ -0.74786375E+05 -0.12179491E+08  0.96153880E+07  0.74786375E+05  0.57692320E+07
+  0.19230770E+07  0.25128206E+06  0.46367550E+06  0.36621094E-03  0.74786312E+05
+  0.74786375E+05 -0.62820531E+05  0.10769230E+07  0.75000016E+08 -0.74786312E+05
+  0.96153860E+07 -0.12179491E+08 -0.15405990E+07  0.14423080E+08  0.75000000E+08
+  0.26175210E+07  0.57692300E+07  0.28846144E+08  0.96153831E+06  0.50256406E+06
+ -0.10937500E+00  0.54687500E-01 -0.12564100E+06  0.74786250E+05 -0.26175210E+07
+  0.74786312E+05 -0.12564100E+06  0.26175210E+07 -0.74786312E+05  0.14999998E+09
+  0.12820520E+07 -0.74786312E+05  0.19230770E+07  0.57692310E+07 -0.12179486E+08
+ -0.26175210E+07  0.28846144E+08  0.57692300E+07  0.14999998E+09  0.26175210E+07
+  0.57692300E+07  0.28846144E+08  0.96153840E+07  0.74786312E+05  0.57692300E+07
+  0.19230770E+07  0.50256412E+06  0.24218750E+00 -0.38281250E+00 -0.12564106E+06
+  0.74786375E+05 -0.26175220E+07 -0.48828125E-03  0.74786312E+05  0.74786312E+05
+ -0.12564100E+06  0.26175210E+07 -0.74786375E+05  0.14999998E+09  0.12820510E+07
+ -0.74786312E+05  0.19230770E+07  0.57692310E+07 -0.74786250E+05  0.96153820E+07
+ -0.12179487E+08 -0.26175210E+07  0.28846160E+08  0.57692300E+07  0.14999998E+09
+  0.26175220E+07  0.57692310E+07  0.28846160E+08 -0.74786375E+05 -0.12179485E+08
+  0.96153840E+07  0.74786312E+05  0.57692310E+07  0.19230770E+07  0.50256412E+06
+ -0.23437500E-01  0.34375000E+00 -0.12564100E+06  0.74786250E+05 -0.26175210E+07
+  0.24414062E-03  0.74786312E+05  0.74786312E+05 -0.12564100E+06  0.26175210E+07
+ -0.74786312E+05  0.15000000E+09  0.12820520E+07 -0.74786312E+05  0.19230770E+07
+  0.57692310E+07 -0.74786312E+05  0.96153850E+07 -0.12179488E+08 -0.26175210E+07
+  0.28846144E+08  0.57692300E+07  0.15000000E+09  0.26175210E+07  0.57692310E+07
+  0.28846144E+08 -0.74786312E+05 -0.12179488E+08  0.96153850E+07  0.74786375E+05
+  0.57692300E+07  0.19230770E+07  0.50256406E+06  0.19531250E+00 -0.27343750E+00
+ -0.12564100E+06  0.74786312E+05 -0.26175210E+07  0.48828125E-03  0.74786312E+05
+  0.74786250E+05 -0.12564100E+06  0.26175210E+07 -0.74786312E+05  0.14999998E+09
+  0.12820510E+07 -0.74786375E+05  0.19230770E+07  0.57692310E+07 -0.74786250E+05
+  0.96153820E+07 -0.12179488E+08 -0.26175210E+07  0.28846144E+08  0.57692300E+07
+  0.14999998E+09  0.26175210E+07  0.57692300E+07  0.28846160E+08 -0.74786375E+05
+ -0.12179485E+08  0.96153850E+07  0.74786375E+05  0.57692310E+07  0.19230770E+07
+  0.50256412E+06 -0.55468750E+00 -0.32812500E+00 -0.12564106E+06  0.74786250E+05
+ -0.26175220E+07 -0.24414062E-03  0.74786312E+05  0.74786312E+05 -0.12564100E+06
+  0.26175210E+07 -0.74786375E+05  0.15000002E+09  0.12820510E+07 -0.74786375E+05
+  0.19230770E+07  0.57692320E+07 -0.74786312E+05  0.96153830E+07 -0.12179486E+08
+ -0.26175210E+07  0.28846144E+08  0.57692310E+07  0.15000002E+09  0.26175220E+07
+  0.57692320E+07  0.28846160E+08 -0.74786312E+05 -0.12179486E+08  0.96153830E+07
+  0.74786312E+05  0.57692300E+07  0.19230760E+07  0.50256419E+06  0.53906250E+00
+  0.15625000E-01 -0.12564106E+06  0.74786250E+05 -0.73242187E-03  0.74786562E+05
+  0.74786125E+05 -0.12564106E+06  0.26175220E+07 -0.74786250E+05  0.15000005E+09
+  0.12820520E+07 -0.74786375E+05  0.19230770E+07 -0.74786125E+05  0.96153870E+07
+ -0.12179498E+08 -0.26175230E+07  0.28846160E+08  0.57692320E+07  0.15000002E+09
+  0.26175220E+07  0.57692320E+07 -0.74786625E+05 -0.12179486E+08  0.96153900E+07
+  0.74786500E+05  0.57692330E+07  0.19230770E+07  0.25128206E+06  0.46367500E+06
+ -0.61035156E-03  0.74786312E+05  0.74786375E+05 -0.62820516E+05  0.10769230E+07
+  0.75000000E+08 -0.74786312E+05  0.96153830E+07 -0.12179487E+08 -0.15405980E+07
+  0.14423077E+08  0.75000000E+08  0.26175210E+07  0.57692310E+07  0.28846144E+08
+  0.96153856E+06  0.50256406E+06  0.18750000E+00  0.23437500E-01 -0.12564100E+06
+  0.74786312E+05 -0.26175210E+07  0.74786312E+05 -0.12564100E+06  0.26175210E+07
+ -0.74786312E+05  0.14999998E+09  0.12820510E+07 -0.74786312E+05  0.19230770E+07
+  0.57692300E+07 -0.12179487E+08 -0.26175210E+07  0.28846160E+08  0.57692310E+07
+  0.14999998E+09  0.26175210E+07  0.57692310E+07  0.28846144E+08  0.96153830E+07
+  0.74786312E+05  0.57692310E+07  0.19230770E+07  0.50256406E+06 -0.24218750E+00
+ -0.62500000E-01 -0.12564100E+06  0.74786250E+05 -0.26175210E+07  0.74786375E+05
+  0.74786250E+05 -0.12564100E+06  0.26175210E+07 -0.74786250E+05  0.15000000E+09
+  0.12820510E+07 -0.74786437E+05  0.19230760E+07  0.57692290E+07 -0.74786312E+05
+  0.96153850E+07 -0.12179488E+08 -0.26175210E+07  0.28846144E+08  0.57692300E+07
+  0.14999998E+09  0.26175210E+07  0.57692300E+07  0.28846144E+08 -0.74786375E+05
+ -0.12179487E+08  0.96153840E+07  0.74786375E+05  0.57692310E+07  0.19230770E+07
+  0.50256412E+06  0.20312500E+00 -0.24218750E+00 -0.12564100E+06  0.74786312E+05
+ -0.26175210E+07  0.85449219E-03  0.74786375E+05  0.74786250E+05 -0.12564100E+06
+  0.26175210E+07 -0.74786312E+05  0.14999998E+09  0.12820510E+07 -0.74786312E+05
+  0.19230770E+07  0.57692310E+07 -0.74786250E+05  0.96153850E+07 -0.12179488E+08
+ -0.26175210E+07  0.28846160E+08  0.57692320E+07  0.15000000E+09  0.26175210E+07
+  0.57692320E+07  0.28846160E+08 -0.74786312E+05 -0.12179485E+08  0.96153820E+07
+  0.74786312E+05  0.57692310E+07  0.19230770E+07  0.50256412E+06  0.22656250E+00
+  0.25000000E+00 -0.12564100E+06  0.74786375E+05 -0.26175210E+07  0.24414062E-03
+  0.74786312E+05  0.74786312E+05 -0.12564100E+06  0.26175210E+07 -0.74786312E+05
+  0.15000000E+09  0.12820510E+07 -0.74786312E+05  0.19230770E+07  0.57692300E+07
+ -0.74786312E+05  0.96153850E+07 -0.12179489E+08 -0.26175210E+07  0.28846160E+08
+  0.57692310E+07  0.15000000E+09  0.26175210E+07  0.57692310E+07  0.28846144E+08
+ -0.74786312E+05 -0.12179489E+08  0.96153860E+07  0.74786312E+05  0.57692320E+07
+  0.19230770E+07  0.50256412E+06  0.18750000E+00 -0.82031250E+00 -0.12564106E+06
+  0.74786125E+05 -0.26175220E+07  0.36621094E-03  0.74786500E+05  0.74786187E+05
+ -0.12564100E+06  0.26175210E+07 -0.74786187E+05  0.15000002E+09  0.12820520E+07
+ -0.74786500E+05  0.19230780E+07  0.57692330E+07 -0.74786250E+05  0.96153880E+07
+ -0.12179493E+08 -0.26175220E+07  0.28846160E+08  0.57692310E+07  0.15000002E+09
+  0.26175220E+07  0.57692330E+07  0.28846160E+08 -0.74786437E+05 -0.12179487E+08
+  0.96153850E+07  0.74786437E+05  0.57692310E+07  0.19230770E+07  0.50256425E+06
+ -0.69531250E+00 -0.15625000E+00 -0.12564106E+06  0.74786437E+05 -0.85449219E-03
+  0.74786312E+05  0.74786312E+05 -0.12564106E+06  0.26175220E+07 -0.74786500E+05
+  0.15000003E+09  0.12820520E+07 -0.74786250E+05  0.19230770E+07 -0.74786312E+05
+  0.96153820E+07 -0.12179484E+08 -0.26175210E+07  0.28846160E+08  0.57692320E+07
+  0.15000003E+09  0.26175220E+07  0.57692330E+07 -0.74786312E+05 -0.12179484E+08
+  0.96153820E+07  0.74786187E+05  0.57692310E+07  0.19230770E+07  0.25128212E+06
+  0.46367594E+06  0.97656250E-03  0.74786375E+05  0.74786375E+05 -0.62820547E+05
+  0.10769240E+07  0.75000016E+08 -0.74786375E+05  0.96153890E+07 -0.12179494E+08
+ -0.15405990E+07  0.14423084E+08  0.75000000E+08  0.26175210E+07  0.57692300E+07
+  0.28846144E+08  0.96153831E+06  0.50256406E+06 -0.15625000E+00  0.70312500E-01
+ -0.12564100E+06  0.74786250E+05 -0.26175210E+07  0.74786312E+05 -0.12564100E+06
+  0.26175210E+07 -0.74786312E+05  0.14999998E+09  0.12820520E+07 -0.74786375E+05
+  0.19230770E+07  0.57692310E+07 -0.12179486E+08 -0.26175210E+07  0.28846144E+08
+  0.57692300E+07  0.14999998E+09  0.26175210E+07  0.57692300E+07  0.28846144E+08
+  0.96153840E+07  0.74786375E+05  0.57692300E+07  0.19230760E+07  0.50256406E+06
+  0.70312500E-01 -0.14843750E+00 -0.12564100E+06  0.74786312E+05 -0.26175210E+07
+ -0.85449219E-03  0.74786375E+05  0.74786250E+05 -0.12564100E+06  0.26175210E+07
+ -0.74786312E+05  0.14999998E+09  0.12820510E+07 -0.74786375E+05  0.19230770E+07
+  0.57692310E+07 -0.74786250E+05  0.96153820E+07 -0.12179487E+08 -0.26175210E+07
+  0.28846144E+08  0.57692300E+07  0.14999998E+09  0.26175210E+07  0.57692300E+07
+  0.28846144E+08 -0.74786375E+05 -0.12179484E+08  0.96153830E+07  0.74786312E+05
+  0.57692300E+07  0.19230770E+07  0.50256412E+06 -0.24218750E+00 -0.25000000E+00
+ -0.12564100E+06  0.74786312E+05 -0.26175210E+07 -0.24414062E-03  0.74786312E+05
+  0.74786312E+05 -0.12564100E+06  0.26175210E+07 -0.74786375E+05  0.15000000E+09
+  0.12820510E+07 -0.74786312E+05  0.19230770E+07  0.57692320E+07 -0.74786312E+05
+  0.96153830E+07 -0.12179486E+08 -0.26175210E+07  0.28846144E+08  0.57692310E+07
+  0.15000000E+09  0.26175210E+07  0.57692310E+07  0.28846160E+08 -0.74786312E+05
+ -0.12179486E+08  0.96153830E+07  0.74786312E+05  0.57692300E+07  0.19230760E+07
+  0.50256419E+06  0.59375000E+00 -0.60937500E+00 -0.12564106E+06  0.74786375E+05
+ -0.26175220E+07 -0.73242187E-03  0.74786437E+05  0.74786250E+05 -0.12564106E+06
+  0.26175220E+07 -0.74786312E+05  0.15000003E+09  0.12820520E+07 -0.74786375E+05
+  0.19230770E+07  0.57692330E+07 -0.74786187E+05  0.96153850E+07 -0.12179493E+08
+ -0.26175220E+07  0.28846160E+08  0.57692320E+07  0.15000003E+09  0.26175220E+07
+  0.57692320E+07  0.28846160E+08 -0.74786500E+05 -0.12179487E+08  0.96153880E+07
+  0.74786375E+05  0.57692330E+07  0.19230770E+07  0.50256412E+06  0.85937500E-01
+  0.15781250E+01 -0.12564100E+06  0.74786250E+05 -0.26175200E+07  0.74786312E+05
+  0.74786312E+05 -0.12564100E+06  0.26175210E+07 -0.74786187E+05  0.15000000E+09
+  0.12820520E+07 -0.74786312E+05  0.19230770E+07  0.57692300E+07 -0.74786375E+05
+  0.96153870E+07 -0.12179490E+08 -0.26175210E+07  0.28846144E+08  0.57692300E+07
+  0.15000000E+09  0.26175200E+07  0.57692290E+07  0.28846144E+08 -0.74786375E+05
+ -0.12179490E+08  0.96153870E+07  0.74786437E+05  0.57692300E+07  0.19230770E+07
+  0.50256400E+06 -0.12890625E+01 -0.11250000E+01 -0.12564100E+06  0.74786187E+05
+ -0.85449219E-03  0.74786250E+05  0.74786312E+05 -0.12564100E+06  0.26175200E+07
+ -0.74786312E+05  0.14999998E+09  0.12820510E+07 -0.74786437E+05  0.19230770E+07
+ -0.74786312E+05  0.96153800E+07 -0.12179482E+08 -0.26175200E+07  0.28846144E+08
+  0.57692280E+07  0.14999998E+09  0.26175220E+07  0.57692310E+07 -0.74786375E+05
+ -0.12179482E+08  0.96153820E+07  0.74786312E+05  0.57692280E+07  0.19230760E+07
+  0.25128206E+06  0.46367419E+06 -0.85449219E-03  0.74786250E+05  0.74786312E+05
+ -0.62820488E+05  0.10769230E+07  0.75000000E+08 -0.74786312E+05  0.96153800E+07
+ -0.12179482E+08 -0.15405980E+07  0.14423071E+08  0.75000000E+08  0.26175210E+07
+  0.57692310E+07  0.28846160E+08  0.96153850E+06  0.50256412E+06  0.70312500E+00
+ -0.13281250E+00 -0.12564106E+06  0.74786375E+05 -0.26175220E+07  0.74786312E+05
+ -0.12564106E+06  0.26175220E+07 -0.74786375E+05  0.15000000E+09  0.12820510E+07
+ -0.74786250E+05  0.19230770E+07  0.57692310E+07 -0.12179488E+08 -0.26175220E+07
+  0.28846160E+08  0.57692320E+07  0.15000000E+09  0.26175220E+07  0.57692320E+07
+  0.28846160E+08  0.96153840E+07  0.74786250E+05  0.57692320E+07  0.19230770E+07
+  0.50256412E+06  0.28906250E+00  0.39843750E+00 -0.12564100E+06  0.74786375E+05
+ -0.26175210E+07  0.24414062E-03  0.74786250E+05  0.74786375E+05 -0.12564100E+06
+  0.26175210E+07 -0.74786312E+05  0.15000000E+09  0.12820510E+07 -0.74786312E+05
+  0.19230770E+07  0.57692300E+07 -0.74786437E+05  0.96153870E+07 -0.12179488E+08
+ -0.26175210E+07  0.28846160E+08  0.57692310E+07  0.15000000E+09  0.26175210E+07
+  0.57692310E+07  0.28846144E+08 -0.74786250E+05 -0.12179491E+08  0.96153850E+07
+  0.74786312E+05  0.57692310E+07  0.19230770E+07  0.50256412E+06  0.25000000E+00
+ -0.27343750E+00 -0.12564100E+06  0.74786187E+05 -0.26175210E+07  0.36621094E-03
+  0.74786500E+05  0.74786187E+05 -0.12564100E+06  0.26175210E+07 -0.74786187E+05
+  0.15000000E+09  0.12820520E+07 -0.74786437E+05  0.19230780E+07  0.57692310E+07
+ -0.74786250E+05  0.96153880E+07 -0.12179493E+08 -0.26175220E+07  0.28846160E+08
+  0.57692310E+07  0.15000000E+09  0.26175220E+07  0.57692320E+07  0.28846160E+08
+ -0.74786437E+05 -0.12179487E+08  0.96153850E+07  0.74786437E+05  0.57692310E+07
+  0.19230770E+07  0.50256412E+06 -0.15234375E+01 -0.78125000E-01 -0.12564100E+06
+  0.74786250E+05 -0.26175210E+07 -0.85449219E-03  0.74786312E+05  0.74786312E+05
+ -0.12564100E+06  0.26175200E+07 -0.74786250E+05  0.15000000E+09  0.12820520E+07
+ -0.74786437E+05  0.19230770E+07  0.57692300E+07 -0.74786312E+05  0.96153820E+07
+ -0.12179484E+08 -0.26175200E+07  0.28846144E+08  0.57692280E+07  0.15000000E+09
+  0.26175210E+07  0.57692300E+07  0.28846144E+08 -0.74786312E+05 -0.12179484E+08
+  0.96153820E+07  0.74786312E+05  0.57692300E+07  0.19230760E+07  0.50256419E+06
+  0.94531250E+00 -0.10156250E+01 -0.12564106E+06  0.74786625E+05 -0.26175230E+07
+ -0.12207031E-03  0.74786312E+05  0.74786250E+05 -0.12564106E+06  0.26175230E+07
+ -0.74786625E+05  0.15000002E+09  0.12820510E+07 -0.74786062E+05  0.19230780E+07
+  0.57692330E+07 -0.74786312E+05  0.96153820E+07 -0.12179482E+08 -0.26175220E+07
+  0.28846160E+08  0.57692340E+07  0.15000002E+09  0.26175220E+07  0.57692350E+07
+  0.28846160E+08 -0.74786250E+05 -0.12179482E+08  0.96153790E+07  0.74786062E+05
+  0.57692330E+07  0.19230780E+07  0.50256425E+06  0.42109375E+01  0.16250000E+01
+ -0.12564100E+06  0.74786500E+05  0.74786687E+05  0.74786250E+05 -0.12564119E+06
+  0.26175240E+07 -0.74786125E+05  0.15000006E+09  0.12820520E+07 -0.74786187E+05
+  0.19230770E+07 -0.74786250E+05  0.96154010E+07 -0.12179514E+08 -0.26175250E+07
+  0.28846192E+08  0.57692380E+07  0.15000005E+09  0.26175210E+07  0.57692320E+07
+ -0.74786687E+05 -0.12179502E+08  0.96154010E+07  0.74786687E+05  0.57692390E+07
+  0.19230790E+07  0.25128194E+06  0.46367419E+06  0.97656250E-03  0.74785812E+05
+  0.74786750E+05 -0.62820441E+05  0.10769220E+07  0.74999952E+08 -0.74786750E+05
+  0.96153810E+07 -0.12179472E+08 -0.15405970E+07  0.14423061E+08  0.75000000E+08
+  0.26175220E+07  0.57692310E+07  0.28846160E+08  0.96153850E+06  0.50256419E+06
+ -0.46875000E-01 -0.21093750E+00 -0.12564106E+06  0.74786375E+05 -0.26175220E+07
+  0.74786312E+05 -0.12564106E+06 -0.74786375E+05  0.15000002E+09  0.12820510E+07
+ -0.74786312E+05  0.19230770E+07  0.57692310E+07 -0.12179488E+08 -0.26175220E+07
+  0.57692320E+07  0.15000002E+09  0.26175220E+07  0.57692320E+07  0.28846160E+08
+  0.96153840E+07  0.74786250E+05  0.19230770E+07  0.50256419E+06  0.78125000E-02
+ -0.14843750E+00 -0.12564106E+06  0.74786312E+05 -0.26175220E+07  0.24414062E-03
+  0.74786375E+05 -0.12564100E+06 -0.74786312E+05  0.15000002E+09  0.12820510E+07
+ -0.74786437E+05  0.19230770E+07  0.57692310E+07 -0.74786437E+05 -0.12179488E+08
+ -0.26175210E+07  0.57692310E+07  0.15000002E+09  0.26175220E+07  0.57692310E+07
+  0.28846160E+08 -0.74786250E+05  0.96153850E+07  0.74786312E+05  0.19230770E+07
+  0.50256412E+06  0.23437500E-01  0.28125000E+00 -0.12564106E+06  0.74786500E+05
+ -0.26175220E+07  0.24414062E-03  0.74786375E+05 -0.12564100E+06 -0.74786500E+05
+  0.15000000E+09  0.12820510E+07 -0.74786187E+05  0.19230770E+07  0.57692310E+07
+ -0.74786437E+05 -0.12179482E+08 -0.26175210E+07  0.57692320E+07  0.15000002E+09
+  0.26175210E+07  0.57692320E+07  0.28846160E+08 -0.74786125E+05  0.96153810E+07
+  0.74786187E+05  0.19230770E+07  0.50256400E+06  0.11640625E+01  0.13359375E+01
+ -0.12564100E+06  0.74786312E+05 -0.26175200E+07  0.97656250E-03  0.74786375E+05
+ -0.12564100E+06 -0.74786187E+05  0.14999998E+09  0.12820510E+07 -0.74786312E+05
+  0.19230760E+07  0.57692280E+07 -0.74786375E+05 -0.12179494E+08 -0.26175220E+07
+  0.57692310E+07  0.14999998E+09  0.26175200E+07  0.57692280E+07  0.28846144E+08
+ -0.74786312E+05  0.96153890E+07  0.74786500E+05  0.19230770E+07  0.50256406E+06
+ -0.31093750E+01 -0.27187500E+01 -0.12564106E+06  0.74785812E+05 -0.26175220E+07
+ -0.12207031E-03  0.74786250E+05 -0.12564094E+06 -0.74786125E+05  0.15000000E+09
+  0.12820520E+07 -0.74786937E+05  0.19230780E+07  0.57692350E+07 -0.74786312E+05
+ -0.12179482E+08 -0.26175190E+07  0.57692270E+07  0.15000002E+09  0.26175230E+07
+  0.57692330E+07  0.28846160E+08 -0.74786250E+05  0.96153790E+07  0.74786375E+05
+  0.19230750E+07  0.50256425E+06 -0.35390625E+01  0.13046875E+01 -0.12564100E+06
+  0.74786562E+05  0.73242187E-03  0.74786250E+05 -0.12564100E+06 -0.74786562E+05
+  0.15000005E+09  0.12820500E+07 -0.74786062E+05  0.19230760E+07 -0.74786250E+05
+ -0.12179474E+08 -0.26175200E+07  0.57692300E+07  0.15000000E+09  0.26175200E+07
+  0.57692300E+07 -0.74786250E+05  0.96153740E+07  0.74786000E+05  0.19230760E+07
+  0.25128200E+06  0.46367700E+06  0.97656250E-03  0.74786375E+05 -0.62820547E+05
+  0.74999984E+08 -0.74786375E+05 -0.12179494E+08 -0.15405990E+07  0.44230768E+08
+  0.15405980E+07  0.14423078E+08  0.25128206E+06 -0.46367525E+06 -0.62820520E+05
+ -0.10769230E+07  0.75000000E+08  0.15405980E+07  0.14423078E+08  0.25128206E+06
+ -0.46367462E+06 -0.62820488E+05 -0.10769230E+07  0.74999984E+08  0.15405980E+07
+  0.14423071E+08  0.25128206E+06 -0.46367625E+06 -0.62820543E+05 -0.10769240E+07
+  0.75000016E+08  0.15405990E+07  0.14423084E+08  0.25128206E+06 -0.46367419E+06
+ -0.62820488E+05 -0.10769230E+07  0.75000000E+08  0.15405980E+07  0.14423071E+08
+  0.25128187E+06 -0.46367400E+06 -0.62820441E+05 -0.10769220E+07  0.74999936E+08
+  0.15405970E+07  0.14423061E+08  0.25128200E+06 -0.46367694E+06 -0.62820543E+05
+  0.74999984E+08  0.15405990E+07  0.12564106E+06                                
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/external/test3comp.rda
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/external/test3comp.rda
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/external/CAex_slots.rda
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/external/CAex_slots.rda
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/external/lund_a.mtx
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/external/lund_a.mtx	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/external/lund_a.mtx	(revision 2477)
@@ -0,0 +1,1300 @@
+%%MatrixMarket matrix coordinate real symmetric
+147 147 1298
+1 1  7.5000000000000e+07
+2 1  9.6153881000000e+05
+8 1 -1.2179486000000e+07
+9 1 -2.6175210000000e+06
+10 1  2.8846144000000e+07
+11 1  5.7692300000000e+06
+2 2  7.5000000000000e+07
+3 2  9.6153869000000e+05
+9 2 -7.4786312000000e+04
+10 2  9.6153840000000e+06
+11 2 -1.2179486000000e+07
+12 2 -2.6175210000000e+06
+13 2  2.8846144000000e+07
+14 2  5.7692300000000e+06
+3 3  7.5000000000000e+07
+4 3  9.6153844000000e+05
+12 3 -7.4786375000000e+04
+13 3  9.6153840000000e+06
+14 3 -1.2179486000000e+07
+15 3 -2.6175210000000e+06
+16 3  2.8846144000000e+07
+17 3  5.7692310000000e+06
+4 4  7.5000000000000e+07
+5 4  9.6153869000000e+05
+15 4 -7.4786312000000e+04
+16 4  9.6153840000000e+06
+17 4 -1.2179487000000e+07
+18 4 -2.6175210000000e+06
+19 4  2.8846144000000e+07
+20 4  5.7692300000000e+06
+5 5  7.5000000000000e+07
+6 5  9.6153894000000e+05
+18 5 -7.4786375000000e+04
+19 5  9.6153840000000e+06
+20 5 -1.2179486000000e+07
+21 5 -2.6175210000000e+06
+22 5  2.8846160000000e+07
+23 5  5.7692310000000e+06
+6 6  7.5000000000000e+07
+7 6  9.6153894000000e+05
+21 6 -7.4786312000000e+04
+22 6  9.6153850000000e+06
+23 6 -1.2179488000000e+07
+24 6 -2.6175220000000e+06
+25 6  2.8846160000000e+07
+26 6  5.7692310000000e+06
+7 7  4.4230768000000e+07
+24 7 -7.4786312000000e+04
+25 7  9.6153850000000e+06
+26 7 -1.2179488000000e+07
+27 7 -1.5405980000000e+06
+28 7  1.4423078000000e+07
+8 8  7.5000000000000e+07
+9 8  2.6175210000000e+06
+10 8  5.7692300000000e+06
+11 8  2.8846144000000e+07
+29 8  9.6153831000000e+05
+9 9  5.0256406000000e+05
+10 9  7.8125000000000e-03
+11 9  7.8125000000000e-03
+12 9 -1.2564100000000e+05
+13 9  7.4786312000000e+04
+14 9 -2.6175210000000e+06
+29 9  7.4786312000000e+04
+30 9 -1.2564100000000e+05
+31 9  2.6175210000000e+06
+32 9 -7.4786312000000e+04
+10 10  1.4999998000000e+08
+11 10  1.2820510000000e+06
+12 10 -7.4786312000000e+04
+13 10  1.9230770000000e+06
+14 10  5.7692310000000e+06
+29 10 -1.2179486000000e+07
+30 10 -2.6175210000000e+06
+31 10  2.8846144000000e+07
+32 10  5.7692300000000e+06
+11 11  1.4999998000000e+08
+12 11  2.6175210000000e+06
+13 11  5.7692300000000e+06
+14 11  2.8846144000000e+07
+29 11  9.6153840000000e+06
+30 11  7.4786312000000e+04
+31 11  5.7692300000000e+06
+32 11  1.9230770000000e+06
+12 12  5.0256406000000e+05
+13 12 -1.0937500000000e-01
+14 12  5.4687500000000e-02
+15 12 -1.2564100000000e+05
+16 12  7.4786312000000e+04
+17 12 -2.6175210000000e+06
+30 12 -2.4414062000000e-04
+31 12  7.4786375000000e+04
+32 12  7.4786312000000e+04
+33 12 -1.2564100000000e+05
+34 12  2.6175210000000e+06
+35 12 -7.4786250000000e+04
+13 13  1.4999998000000e+08
+14 13  1.2820520000000e+06
+15 13 -7.4786312000000e+04
+16 13  1.9230770000000e+06
+17 13  5.7692300000000e+06
+30 13 -7.4786312000000e+04
+31 13  9.6153840000000e+06
+32 13 -1.2179487000000e+07
+33 13 -2.6175210000000e+06
+34 13  2.8846144000000e+07
+35 13  5.7692300000000e+06
+14 14  1.4999998000000e+08
+15 14  2.6175210000000e+06
+16 14  5.7692300000000e+06
+17 14  2.8846144000000e+07
+30 14 -7.4786375000000e+04
+31 14 -1.2179486000000e+07
+32 14  9.6153840000000e+06
+33 14  7.4786312000000e+04
+34 14  5.7692310000000e+06
+35 14  1.9230770000000e+06
+15 15  5.0256406000000e+05
+16 15  1.4843750000000e-01
+17 15 -1.1718750000000e-01
+18 15 -1.2564100000000e+05
+19 15  7.4786312000000e+04
+20 15 -2.6175210000000e+06
+33 15 -3.6621094000000e-04
+34 15  7.4786375000000e+04
+35 15  7.4786250000000e+04
+36 15 -1.2564100000000e+05
+37 15  2.6175210000000e+06
+38 15 -7.4786312000000e+04
+16 16  1.4999998000000e+08
+17 16  1.2820510000000e+06
+18 16 -7.4786312000000e+04
+19 16  1.9230770000000e+06
+20 16  5.7692310000000e+06
+33 16 -7.4786250000000e+04
+34 16  9.6153840000000e+06
+35 16 -1.2179488000000e+07
+36 16 -2.6175210000000e+06
+37 16  2.8846160000000e+07
+38 16  5.7692310000000e+06
+17 17  1.4999998000000e+08
+18 17  2.6175210000000e+06
+19 17  5.7692310000000e+06
+20 17  2.8846144000000e+07
+33 17 -7.4786375000000e+04
+34 17 -1.2179485000000e+07
+35 17  9.6153830000000e+06
+36 17  7.4786375000000e+04
+37 17  5.7692300000000e+06
+38 17  1.9230770000000e+06
+18 18  5.0256406000000e+05
+19 18 -1.3281250000000e-01
+20 18  1.7187500000000e-01
+21 18 -1.2564100000000e+05
+22 18  7.4786312000000e+04
+23 18 -2.6175210000000e+06
+36 18  4.8828125000000e-04
+37 18  7.4786312000000e+04
+38 18  7.4786312000000e+04
+39 18 -1.2564100000000e+05
+40 18  2.6175210000000e+06
+41 18 -7.4786250000000e+04
+19 19  1.4999998000000e+08
+20 19  1.2820510000000e+06
+21 19 -7.4786375000000e+04
+22 19  1.9230770000000e+06
+23 19  5.7692300000000e+06
+36 19 -7.4786250000000e+04
+37 19  9.6153840000000e+06
+38 19 -1.2179488000000e+07
+39 19 -2.6175210000000e+06
+40 19  2.8846144000000e+07
+41 19  5.7692300000000e+06
+20 20  1.4999998000000e+08
+21 20  2.6175210000000e+06
+22 20  5.7692300000000e+06
+23 20  2.8846144000000e+07
+36 20 -7.4786375000000e+04
+37 20 -1.2179487000000e+07
+38 20  9.6153850000000e+06
+39 20  7.4786375000000e+04
+40 20  5.7692310000000e+06
+41 20  1.9230760000000e+06
+21 21  5.0256412000000e+05
+22 21  3.2031250000000e-01
+23 21 -6.8750000000000e-01
+24 21 -1.2564106000000e+05
+25 21  7.4786375000000e+04
+26 21 -2.6175220000000e+06
+39 21 -1.2207031000000e-04
+40 21  7.4786437000000e+04
+41 21  7.4786187000000e+04
+42 21 -1.2564106000000e+05
+43 21  2.6175220000000e+06
+44 21 -7.4786375000000e+04
+22 22  1.5000002000000e+08
+23 22  1.2820520000000e+06
+24 22 -7.4786312000000e+04
+25 22  1.9230770000000e+06
+26 22  5.7692320000000e+06
+39 22 -7.4786250000000e+04
+40 22  9.6153840000000e+06
+41 22 -1.2179490000000e+07
+42 22 -2.6175220000000e+06
+43 22  2.8846160000000e+07
+44 22  5.7692320000000e+06
+23 23  1.5000000000000e+08
+24 23  2.6175220000000e+06
+25 23  5.7692320000000e+06
+26 23  2.8846160000000e+07
+39 23 -7.4786437000000e+04
+40 23 -1.2179483000000e+07
+41 23  9.6153830000000e+06
+42 23  7.4786312000000e+04
+43 23  5.7692320000000e+06
+44 23  1.9230770000000e+06
+24 24  5.0256419000000e+05
+25 24  4.1406250000000e-01
+26 24  8.5937500000000e-02
+27 24 -1.2564106000000e+05
+28 24  7.4786375000000e+04
+42 24  3.6621094000000e-04
+43 24  7.4786312000000e+04
+44 24  7.4786375000000e+04
+45 24 -1.2564106000000e+05
+46 24  2.6175220000000e+06
+47 24 -7.4786375000000e+04
+25 25  1.5000002000000e+08
+26 25  1.2820510000000e+06
+27 25 -7.4786312000000e+04
+28 25  1.9230770000000e+06
+42 25 -7.4786312000000e+04
+43 25  9.6153860000000e+06
+44 25 -1.2179491000000e+07
+45 25 -2.6175220000000e+06
+46 25  2.8846160000000e+07
+47 25  5.7692320000000e+06
+26 26  1.5000002000000e+08
+27 26  2.6175220000000e+06
+28 26  5.7692320000000e+06
+42 26 -7.4786375000000e+04
+43 26 -1.2179491000000e+07
+44 26  9.6153880000000e+06
+45 26  7.4786375000000e+04
+46 26  5.7692320000000e+06
+47 26  1.9230770000000e+06
+27 27  2.5128206000000e+05
+28 27  4.6367550000000e+05
+45 27  3.6621094000000e-04
+46 27  7.4786312000000e+04
+47 27  7.4786375000000e+04
+48 27 -6.2820531000000e+04
+49 27  1.0769230000000e+06
+28 28  7.5000016000000e+07
+45 28 -7.4786312000000e+04
+46 28  9.6153860000000e+06
+47 28 -1.2179491000000e+07
+48 28 -1.5405990000000e+06
+49 28  1.4423080000000e+07
+29 29  7.5000000000000e+07
+30 29  2.6175210000000e+06
+31 29  5.7692300000000e+06
+32 29  2.8846144000000e+07
+50 29  9.6153831000000e+05
+30 30  5.0256406000000e+05
+31 30 -1.0937500000000e-01
+32 30  5.4687500000000e-02
+33 30 -1.2564100000000e+05
+34 30  7.4786250000000e+04
+35 30 -2.6175210000000e+06
+50 30  7.4786312000000e+04
+51 30 -1.2564100000000e+05
+52 30  2.6175210000000e+06
+53 30 -7.4786312000000e+04
+31 31  1.4999998000000e+08
+32 31  1.2820520000000e+06
+33 31 -7.4786312000000e+04
+34 31  1.9230770000000e+06
+35 31  5.7692310000000e+06
+50 31 -1.2179486000000e+07
+51 31 -2.6175210000000e+06
+52 31  2.8846144000000e+07
+53 31  5.7692300000000e+06
+32 32  1.4999998000000e+08
+33 32  2.6175210000000e+06
+34 32  5.7692300000000e+06
+35 32  2.8846144000000e+07
+50 32  9.6153840000000e+06
+51 32  7.4786312000000e+04
+52 32  5.7692300000000e+06
+53 32  1.9230770000000e+06
+33 33  5.0256412000000e+05
+34 33  2.4218750000000e-01
+35 33 -3.8281250000000e-01
+36 33 -1.2564106000000e+05
+37 33  7.4786375000000e+04
+38 33 -2.6175220000000e+06
+51 33 -4.8828125000000e-04
+52 33  7.4786312000000e+04
+53 33  7.4786312000000e+04
+54 33 -1.2564100000000e+05
+55 33  2.6175210000000e+06
+56 33 -7.4786375000000e+04
+34 34  1.4999998000000e+08
+35 34  1.2820510000000e+06
+36 34 -7.4786312000000e+04
+37 34  1.9230770000000e+06
+38 34  5.7692310000000e+06
+51 34 -7.4786250000000e+04
+52 34  9.6153820000000e+06
+53 34 -1.2179487000000e+07
+54 34 -2.6175210000000e+06
+55 34  2.8846160000000e+07
+56 34  5.7692300000000e+06
+35 35  1.4999998000000e+08
+36 35  2.6175220000000e+06
+37 35  5.7692310000000e+06
+38 35  2.8846160000000e+07
+51 35 -7.4786375000000e+04
+52 35 -1.2179485000000e+07
+53 35  9.6153840000000e+06
+54 35  7.4786312000000e+04
+55 35  5.7692310000000e+06
+56 35  1.9230770000000e+06
+36 36  5.0256412000000e+05
+37 36 -2.3437500000000e-02
+38 36  3.4375000000000e-01
+39 36 -1.2564100000000e+05
+40 36  7.4786250000000e+04
+41 36 -2.6175210000000e+06
+54 36  2.4414062000000e-04
+55 36  7.4786312000000e+04
+56 36  7.4786312000000e+04
+57 36 -1.2564100000000e+05
+58 36  2.6175210000000e+06
+59 36 -7.4786312000000e+04
+37 37  1.5000000000000e+08
+38 37  1.2820520000000e+06
+39 37 -7.4786312000000e+04
+40 37  1.9230770000000e+06
+41 37  5.7692310000000e+06
+54 37 -7.4786312000000e+04
+55 37  9.6153850000000e+06
+56 37 -1.2179488000000e+07
+57 37 -2.6175210000000e+06
+58 37  2.8846144000000e+07
+59 37  5.7692300000000e+06
+38 38  1.5000000000000e+08
+39 38  2.6175210000000e+06
+40 38  5.7692310000000e+06
+41 38  2.8846144000000e+07
+54 38 -7.4786312000000e+04
+55 38 -1.2179488000000e+07
+56 38  9.6153850000000e+06
+57 38  7.4786375000000e+04
+58 38  5.7692300000000e+06
+59 38  1.9230770000000e+06
+39 39  5.0256406000000e+05
+40 39  1.9531250000000e-01
+41 39 -2.7343750000000e-01
+42 39 -1.2564100000000e+05
+43 39  7.4786312000000e+04
+44 39 -2.6175210000000e+06
+57 39  4.8828125000000e-04
+58 39  7.4786312000000e+04
+59 39  7.4786250000000e+04
+60 39 -1.2564100000000e+05
+61 39  2.6175210000000e+06
+62 39 -7.4786312000000e+04
+40 40  1.4999998000000e+08
+41 40  1.2820510000000e+06
+42 40 -7.4786375000000e+04
+43 40  1.9230770000000e+06
+44 40  5.7692310000000e+06
+57 40 -7.4786250000000e+04
+58 40  9.6153820000000e+06
+59 40 -1.2179488000000e+07
+60 40 -2.6175210000000e+06
+61 40  2.8846144000000e+07
+62 40  5.7692300000000e+06
+41 41  1.4999998000000e+08
+42 41  2.6175210000000e+06
+43 41  5.7692300000000e+06
+44 41  2.8846160000000e+07
+57 41 -7.4786375000000e+04
+58 41 -1.2179485000000e+07
+59 41  9.6153850000000e+06
+60 41  7.4786375000000e+04
+61 41  5.7692310000000e+06
+62 41  1.9230770000000e+06
+42 42  5.0256412000000e+05
+43 42 -5.5468750000000e-01
+44 42 -3.2812500000000e-01
+45 42 -1.2564106000000e+05
+46 42  7.4786250000000e+04
+47 42 -2.6175220000000e+06
+60 42 -2.4414062000000e-04
+61 42  7.4786312000000e+04
+62 42  7.4786312000000e+04
+63 42 -1.2564100000000e+05
+64 42  2.6175210000000e+06
+65 42 -7.4786375000000e+04
+43 43  1.5000002000000e+08
+44 43  1.2820510000000e+06
+45 43 -7.4786375000000e+04
+46 43  1.9230770000000e+06
+47 43  5.7692320000000e+06
+60 43 -7.4786312000000e+04
+61 43  9.6153830000000e+06
+62 43 -1.2179486000000e+07
+63 43 -2.6175210000000e+06
+64 43  2.8846144000000e+07
+65 43  5.7692310000000e+06
+44 44  1.5000002000000e+08
+45 44  2.6175220000000e+06
+46 44  5.7692320000000e+06
+47 44  2.8846160000000e+07
+60 44 -7.4786312000000e+04
+61 44 -1.2179486000000e+07
+62 44  9.6153830000000e+06
+63 44  7.4786312000000e+04
+64 44  5.7692300000000e+06
+65 44  1.9230760000000e+06
+45 45  5.0256419000000e+05
+46 45  5.3906250000000e-01
+47 45  1.5625000000000e-02
+48 45 -1.2564106000000e+05
+49 45  7.4786250000000e+04
+63 45 -7.3242187000000e-04
+64 45  7.4786562000000e+04
+65 45  7.4786125000000e+04
+66 45 -1.2564106000000e+05
+67 45  2.6175220000000e+06
+68 45 -7.4786250000000e+04
+46 46  1.5000005000000e+08
+47 46  1.2820520000000e+06
+48 46 -7.4786375000000e+04
+49 46  1.9230770000000e+06
+63 46 -7.4786125000000e+04
+64 46  9.6153870000000e+06
+65 46 -1.2179498000000e+07
+66 46 -2.6175230000000e+06
+67 46  2.8846160000000e+07
+68 46  5.7692320000000e+06
+47 47  1.5000002000000e+08
+48 47  2.6175220000000e+06
+49 47  5.7692320000000e+06
+63 47 -7.4786625000000e+04
+64 47 -1.2179486000000e+07
+65 47  9.6153900000000e+06
+66 47  7.4786500000000e+04
+67 47  5.7692330000000e+06
+68 47  1.9230770000000e+06
+48 48  2.5128206000000e+05
+49 48  4.6367500000000e+05
+66 48 -6.1035156000000e-04
+67 48  7.4786312000000e+04
+68 48  7.4786375000000e+04
+69 48 -6.2820516000000e+04
+70 48  1.0769230000000e+06
+49 49  7.5000000000000e+07
+66 49 -7.4786312000000e+04
+67 49  9.6153830000000e+06
+68 49 -1.2179487000000e+07
+69 49 -1.5405980000000e+06
+70 49  1.4423077000000e+07
+50 50  7.5000000000000e+07
+51 50  2.6175210000000e+06
+52 50  5.7692310000000e+06
+53 50  2.8846144000000e+07
+71 50  9.6153856000000e+05
+51 51  5.0256406000000e+05
+52 51  1.8750000000000e-01
+53 51  2.3437500000000e-02
+54 51 -1.2564100000000e+05
+55 51  7.4786312000000e+04
+56 51 -2.6175210000000e+06
+71 51  7.4786312000000e+04
+72 51 -1.2564100000000e+05
+73 51  2.6175210000000e+06
+74 51 -7.4786312000000e+04
+52 52  1.4999998000000e+08
+53 52  1.2820510000000e+06
+54 52 -7.4786312000000e+04
+55 52  1.9230770000000e+06
+56 52  5.7692300000000e+06
+71 52 -1.2179487000000e+07
+72 52 -2.6175210000000e+06
+73 52  2.8846160000000e+07
+74 52  5.7692310000000e+06
+53 53  1.4999998000000e+08
+54 53  2.6175210000000e+06
+55 53  5.7692310000000e+06
+56 53  2.8846144000000e+07
+71 53  9.6153830000000e+06
+72 53  7.4786312000000e+04
+73 53  5.7692310000000e+06
+74 53  1.9230770000000e+06
+54 54  5.0256406000000e+05
+55 54 -2.4218750000000e-01
+56 54 -6.2500000000000e-02
+57 54 -1.2564100000000e+05
+58 54  7.4786250000000e+04
+59 54 -2.6175210000000e+06
+73 54  7.4786375000000e+04
+74 54  7.4786250000000e+04
+75 54 -1.2564100000000e+05
+76 54  2.6175210000000e+06
+77 54 -7.4786250000000e+04
+55 55  1.5000000000000e+08
+56 55  1.2820510000000e+06
+57 55 -7.4786437000000e+04
+58 55  1.9230760000000e+06
+59 55  5.7692290000000e+06
+72 55 -7.4786312000000e+04
+73 55  9.6153850000000e+06
+74 55 -1.2179488000000e+07
+75 55 -2.6175210000000e+06
+76 55  2.8846144000000e+07
+77 55  5.7692300000000e+06
+56 56  1.4999998000000e+08
+57 56  2.6175210000000e+06
+58 56  5.7692300000000e+06
+59 56  2.8846144000000e+07
+72 56 -7.4786375000000e+04
+73 56 -1.2179487000000e+07
+74 56  9.6153840000000e+06
+75 56  7.4786375000000e+04
+76 56  5.7692310000000e+06
+77 56  1.9230770000000e+06
+57 57  5.0256412000000e+05
+58 57  2.0312500000000e-01
+59 57 -2.4218750000000e-01
+60 57 -1.2564100000000e+05
+61 57  7.4786312000000e+04
+62 57 -2.6175210000000e+06
+75 57  8.5449219000000e-04
+76 57  7.4786375000000e+04
+77 57  7.4786250000000e+04
+78 57 -1.2564100000000e+05
+79 57  2.6175210000000e+06
+80 57 -7.4786312000000e+04
+58 58  1.4999998000000e+08
+59 58  1.2820510000000e+06
+60 58 -7.4786312000000e+04
+61 58  1.9230770000000e+06
+62 58  5.7692310000000e+06
+75 58 -7.4786250000000e+04
+76 58  9.6153850000000e+06
+77 58 -1.2179488000000e+07
+78 58 -2.6175210000000e+06
+79 58  2.8846160000000e+07
+80 58  5.7692320000000e+06
+59 59  1.5000000000000e+08
+60 59  2.6175210000000e+06
+61 59  5.7692320000000e+06
+62 59  2.8846160000000e+07
+75 59 -7.4786312000000e+04
+76 59 -1.2179485000000e+07
+77 59  9.6153820000000e+06
+78 59  7.4786312000000e+04
+79 59  5.7692310000000e+06
+80 59  1.9230770000000e+06
+60 60  5.0256412000000e+05
+61 60  2.2656250000000e-01
+62 60  2.5000000000000e-01
+63 60 -1.2564100000000e+05
+64 60  7.4786375000000e+04
+65 60 -2.6175210000000e+06
+78 60  2.4414062000000e-04
+79 60  7.4786312000000e+04
+80 60  7.4786312000000e+04
+81 60 -1.2564100000000e+05
+82 60  2.6175210000000e+06
+83 60 -7.4786312000000e+04
+61 61  1.5000000000000e+08
+62 61  1.2820510000000e+06
+63 61 -7.4786312000000e+04
+64 61  1.9230770000000e+06
+65 61  5.7692300000000e+06
+78 61 -7.4786312000000e+04
+79 61  9.6153850000000e+06
+80 61 -1.2179489000000e+07
+81 61 -2.6175210000000e+06
+82 61  2.8846160000000e+07
+83 61  5.7692310000000e+06
+62 62  1.5000000000000e+08
+63 62  2.6175210000000e+06
+64 62  5.7692310000000e+06
+65 62  2.8846144000000e+07
+78 62 -7.4786312000000e+04
+79 62 -1.2179489000000e+07
+80 62  9.6153860000000e+06
+81 62  7.4786312000000e+04
+82 62  5.7692320000000e+06
+83 62  1.9230770000000e+06
+63 63  5.0256412000000e+05
+64 63  1.8750000000000e-01
+65 63 -8.2031250000000e-01
+66 63 -1.2564106000000e+05
+67 63  7.4786125000000e+04
+68 63 -2.6175220000000e+06
+81 63  3.6621094000000e-04
+82 63  7.4786500000000e+04
+83 63  7.4786187000000e+04
+84 63 -1.2564100000000e+05
+85 63  2.6175210000000e+06
+86 63 -7.4786187000000e+04
+64 64  1.5000002000000e+08
+65 64  1.2820520000000e+06
+66 64 -7.4786500000000e+04
+67 64  1.9230780000000e+06
+68 64  5.7692330000000e+06
+81 64 -7.4786250000000e+04
+82 64  9.6153880000000e+06
+83 64 -1.2179493000000e+07
+84 64 -2.6175220000000e+06
+85 64  2.8846160000000e+07
+86 64  5.7692310000000e+06
+65 65  1.5000002000000e+08
+66 65  2.6175220000000e+06
+67 65  5.7692330000000e+06
+68 65  2.8846160000000e+07
+81 65 -7.4786437000000e+04
+82 65 -1.2179487000000e+07
+83 65  9.6153850000000e+06
+84 65  7.4786437000000e+04
+85 65  5.7692310000000e+06
+86 65  1.9230770000000e+06
+66 66  5.0256425000000e+05
+67 66 -6.9531250000000e-01
+68 66 -1.5625000000000e-01
+69 66 -1.2564106000000e+05
+70 66  7.4786437000000e+04
+84 66 -8.5449219000000e-04
+85 66  7.4786312000000e+04
+86 66  7.4786312000000e+04
+87 66 -1.2564106000000e+05
+88 66  2.6175220000000e+06
+89 66 -7.4786500000000e+04
+67 67  1.5000003000000e+08
+68 67  1.2820520000000e+06
+69 67 -7.4786250000000e+04
+70 67  1.9230770000000e+06
+84 67 -7.4786312000000e+04
+85 67  9.6153820000000e+06
+86 67 -1.2179484000000e+07
+87 67 -2.6175210000000e+06
+88 67  2.8846160000000e+07
+89 67  5.7692320000000e+06
+68 68  1.5000003000000e+08
+69 68  2.6175220000000e+06
+70 68  5.7692330000000e+06
+84 68 -7.4786312000000e+04
+85 68 -1.2179484000000e+07
+86 68  9.6153820000000e+06
+87 68  7.4786187000000e+04
+88 68  5.7692310000000e+06
+89 68  1.9230770000000e+06
+69 69  2.5128212000000e+05
+70 69  4.6367594000000e+05
+87 69  9.7656250000000e-04
+88 69  7.4786375000000e+04
+89 69  7.4786375000000e+04
+90 69 -6.2820547000000e+04
+91 69  1.0769240000000e+06
+70 70  7.5000016000000e+07
+87 70 -7.4786375000000e+04
+88 70  9.6153890000000e+06
+89 70 -1.2179494000000e+07
+90 70 -1.5405990000000e+06
+91 70  1.4423084000000e+07
+71 71  7.5000000000000e+07
+72 71  2.6175210000000e+06
+73 71  5.7692300000000e+06
+74 71  2.8846144000000e+07
+92 71  9.6153831000000e+05
+72 72  5.0256406000000e+05
+73 72 -1.5625000000000e-01
+74 72  7.0312500000000e-02
+75 72 -1.2564100000000e+05
+76 72  7.4786250000000e+04
+77 72 -2.6175210000000e+06
+92 72  7.4786312000000e+04
+93 72 -1.2564100000000e+05
+94 72  2.6175210000000e+06
+95 72 -7.4786312000000e+04
+73 73  1.4999998000000e+08
+74 73  1.2820520000000e+06
+75 73 -7.4786375000000e+04
+76 73  1.9230770000000e+06
+77 73  5.7692310000000e+06
+92 73 -1.2179486000000e+07
+93 73 -2.6175210000000e+06
+94 73  2.8846144000000e+07
+95 73  5.7692300000000e+06
+74 74  1.4999998000000e+08
+75 74  2.6175210000000e+06
+76 74  5.7692300000000e+06
+77 74  2.8846144000000e+07
+92 74  9.6153840000000e+06
+93 74  7.4786375000000e+04
+94 74  5.7692300000000e+06
+95 74  1.9230760000000e+06
+75 75  5.0256406000000e+05
+76 75  7.0312500000000e-02
+77 75 -1.4843750000000e-01
+78 75 -1.2564100000000e+05
+79 75  7.4786312000000e+04
+80 75 -2.6175210000000e+06
+93 75 -8.5449219000000e-04
+94 75  7.4786375000000e+04
+95 75  7.4786250000000e+04
+96 75 -1.2564100000000e+05
+97 75  2.6175210000000e+06
+98 75 -7.4786312000000e+04
+76 76  1.4999998000000e+08
+77 76  1.2820510000000e+06
+78 76 -7.4786375000000e+04
+79 76  1.9230770000000e+06
+80 76  5.7692310000000e+06
+93 76 -7.4786250000000e+04
+94 76  9.6153820000000e+06
+95 76 -1.2179487000000e+07
+96 76 -2.6175210000000e+06
+97 76  2.8846144000000e+07
+98 76  5.7692300000000e+06
+77 77  1.4999998000000e+08
+78 77  2.6175210000000e+06
+79 77  5.7692300000000e+06
+80 77  2.8846144000000e+07
+93 77 -7.4786375000000e+04
+94 77 -1.2179484000000e+07
+95 77  9.6153830000000e+06
+96 77  7.4786312000000e+04
+97 77  5.7692300000000e+06
+98 77  1.9230770000000e+06
+78 78  5.0256412000000e+05
+79 78 -2.4218750000000e-01
+80 78 -2.5000000000000e-01
+81 78 -1.2564100000000e+05
+82 78  7.4786312000000e+04
+83 78 -2.6175210000000e+06
+96 78 -2.4414062000000e-04
+97 78  7.4786312000000e+04
+98 78  7.4786312000000e+04
+99 78 -1.2564100000000e+05
+100 78  2.6175210000000e+06
+101 78 -7.4786375000000e+04
+79 79  1.5000000000000e+08
+80 79  1.2820510000000e+06
+81 79 -7.4786312000000e+04
+82 79  1.9230770000000e+06
+83 79  5.7692320000000e+06
+96 79 -7.4786312000000e+04
+97 79  9.6153830000000e+06
+98 79 -1.2179486000000e+07
+99 79 -2.6175210000000e+06
+100 79  2.8846144000000e+07
+101 79  5.7692310000000e+06
+80 80  1.5000000000000e+08
+81 80  2.6175210000000e+06
+82 80  5.7692310000000e+06
+83 80  2.8846160000000e+07
+96 80 -7.4786312000000e+04
+97 80 -1.2179486000000e+07
+98 80  9.6153830000000e+06
+99 80  7.4786312000000e+04
+100 80  5.7692300000000e+06
+101 80  1.9230760000000e+06
+81 81  5.0256419000000e+05
+82 81  5.9375000000000e-01
+83 81 -6.0937500000000e-01
+84 81 -1.2564106000000e+05
+85 81  7.4786375000000e+04
+86 81 -2.6175220000000e+06
+99 81 -7.3242187000000e-04
+100 81  7.4786437000000e+04
+101 81  7.4786250000000e+04
+102 81 -1.2564106000000e+05
+103 81  2.6175220000000e+06
+104 81 -7.4786312000000e+04
+82 82  1.5000003000000e+08
+83 82  1.2820520000000e+06
+84 82 -7.4786375000000e+04
+85 82  1.9230770000000e+06
+86 82  5.7692330000000e+06
+99 82 -7.4786187000000e+04
+100 82  9.6153850000000e+06
+101 82 -1.2179493000000e+07
+102 82 -2.6175220000000e+06
+103 82  2.8846160000000e+07
+104 82  5.7692320000000e+06
+83 83  1.5000003000000e+08
+84 83  2.6175220000000e+06
+85 83  5.7692320000000e+06
+86 83  2.8846160000000e+07
+99 83 -7.4786500000000e+04
+100 83 -1.2179487000000e+07
+101 83  9.6153880000000e+06
+102 83  7.4786375000000e+04
+103 83  5.7692330000000e+06
+104 83  1.9230770000000e+06
+84 84  5.0256412000000e+05
+85 84  8.5937500000000e-02
+86 84  1.5781250000000e+00
+87 84 -1.2564100000000e+05
+88 84  7.4786250000000e+04
+89 84 -2.6175200000000e+06
+103 84  7.4786312000000e+04
+104 84  7.4786312000000e+04
+105 84 -1.2564100000000e+05
+106 84  2.6175210000000e+06
+107 84 -7.4786187000000e+04
+85 85  1.5000000000000e+08
+86 85  1.2820520000000e+06
+87 85 -7.4786312000000e+04
+88 85  1.9230770000000e+06
+89 85  5.7692300000000e+06
+102 85 -7.4786375000000e+04
+103 85  9.6153870000000e+06
+104 85 -1.2179490000000e+07
+105 85 -2.6175210000000e+06
+106 85  2.8846144000000e+07
+107 85  5.7692300000000e+06
+86 86  1.5000000000000e+08
+87 86  2.6175200000000e+06
+88 86  5.7692290000000e+06
+89 86  2.8846144000000e+07
+102 86 -7.4786375000000e+04
+103 86 -1.2179490000000e+07
+104 86  9.6153870000000e+06
+105 86  7.4786437000000e+04
+106 86  5.7692300000000e+06
+107 86  1.9230770000000e+06
+87 87  5.0256400000000e+05
+88 87 -1.2890625000000e+00
+89 87 -1.1250000000000e+00
+90 87 -1.2564100000000e+05
+91 87  7.4786187000000e+04
+105 87 -8.5449219000000e-04
+106 87  7.4786250000000e+04
+107 87  7.4786312000000e+04
+108 87 -1.2564100000000e+05
+109 87  2.6175200000000e+06
+110 87 -7.4786312000000e+04
+88 88  1.4999998000000e+08
+89 88  1.2820510000000e+06
+90 88 -7.4786437000000e+04
+91 88  1.9230770000000e+06
+105 88 -7.4786312000000e+04
+106 88  9.6153800000000e+06
+107 88 -1.2179482000000e+07
+108 88 -2.6175200000000e+06
+109 88  2.8846144000000e+07
+110 88  5.7692280000000e+06
+89 89  1.4999998000000e+08
+90 89  2.6175220000000e+06
+91 89  5.7692310000000e+06
+105 89 -7.4786375000000e+04
+106 89 -1.2179482000000e+07
+107 89  9.6153820000000e+06
+108 89  7.4786312000000e+04
+109 89  5.7692280000000e+06
+110 89  1.9230760000000e+06
+90 90  2.5128206000000e+05
+91 90  4.6367419000000e+05
+108 90 -8.5449219000000e-04
+109 90  7.4786250000000e+04
+110 90  7.4786312000000e+04
+111 90 -6.2820488000000e+04
+112 90  1.0769230000000e+06
+91 91  7.5000000000000e+07
+108 91 -7.4786312000000e+04
+109 91  9.6153800000000e+06
+110 91 -1.2179482000000e+07
+111 91 -1.5405980000000e+06
+112 91  1.4423071000000e+07
+92 92  7.5000000000000e+07
+93 92  2.6175210000000e+06
+94 92  5.7692310000000e+06
+95 92  2.8846160000000e+07
+113 92  9.6153850000000e+05
+93 93  5.0256412000000e+05
+94 93  7.0312500000000e-01
+95 93 -1.3281250000000e-01
+96 93 -1.2564106000000e+05
+97 93  7.4786375000000e+04
+98 93 -2.6175220000000e+06
+113 93  7.4786312000000e+04
+114 93 -1.2564106000000e+05
+115 93  2.6175220000000e+06
+116 93 -7.4786375000000e+04
+94 94  1.5000000000000e+08
+95 94  1.2820510000000e+06
+96 94 -7.4786250000000e+04
+97 94  1.9230770000000e+06
+98 94  5.7692310000000e+06
+113 94 -1.2179488000000e+07
+114 94 -2.6175220000000e+06
+115 94  2.8846160000000e+07
+116 94  5.7692320000000e+06
+95 95  1.5000000000000e+08
+96 95  2.6175220000000e+06
+97 95  5.7692320000000e+06
+98 95  2.8846160000000e+07
+113 95  9.6153840000000e+06
+114 95  7.4786250000000e+04
+115 95  5.7692320000000e+06
+116 95  1.9230770000000e+06
+96 96  5.0256412000000e+05
+97 96  2.8906250000000e-01
+98 96  3.9843750000000e-01
+99 96 -1.2564100000000e+05
+100 96  7.4786375000000e+04
+101 96 -2.6175210000000e+06
+114 96  2.4414062000000e-04
+115 96  7.4786250000000e+04
+116 96  7.4786375000000e+04
+117 96 -1.2564100000000e+05
+118 96  2.6175210000000e+06
+119 96 -7.4786312000000e+04
+97 97  1.5000000000000e+08
+98 97  1.2820510000000e+06
+99 97 -7.4786312000000e+04
+100 97  1.9230770000000e+06
+101 97  5.7692300000000e+06
+114 97 -7.4786437000000e+04
+115 97  9.6153870000000e+06
+116 97 -1.2179488000000e+07
+117 97 -2.6175210000000e+06
+118 97  2.8846160000000e+07
+119 97  5.7692310000000e+06
+98 98  1.5000000000000e+08
+99 98  2.6175210000000e+06
+100 98  5.7692310000000e+06
+101 98  2.8846144000000e+07
+114 98 -7.4786250000000e+04
+115 98 -1.2179491000000e+07
+116 98  9.6153850000000e+06
+117 98  7.4786312000000e+04
+118 98  5.7692310000000e+06
+119 98  1.9230770000000e+06
+99 99  5.0256412000000e+05
+100 99  2.5000000000000e-01
+101 99 -2.7343750000000e-01
+102 99 -1.2564100000000e+05
+103 99  7.4786187000000e+04
+104 99 -2.6175210000000e+06
+117 99  3.6621094000000e-04
+118 99  7.4786500000000e+04
+119 99  7.4786187000000e+04
+120 99 -1.2564100000000e+05
+121 99  2.6175210000000e+06
+122 99 -7.4786187000000e+04
+100 100  1.5000000000000e+08
+101 100  1.2820520000000e+06
+102 100 -7.4786437000000e+04
+103 100  1.9230780000000e+06
+104 100  5.7692310000000e+06
+117 100 -7.4786250000000e+04
+118 100  9.6153880000000e+06
+119 100 -1.2179493000000e+07
+120 100 -2.6175220000000e+06
+121 100  2.8846160000000e+07
+122 100  5.7692310000000e+06
+101 101  1.5000000000000e+08
+102 101  2.6175220000000e+06
+103 101  5.7692320000000e+06
+104 101  2.8846160000000e+07
+117 101 -7.4786437000000e+04
+118 101 -1.2179487000000e+07
+119 101  9.6153850000000e+06
+120 101  7.4786437000000e+04
+121 101  5.7692310000000e+06
+122 101  1.9230770000000e+06
+102 102  5.0256412000000e+05
+103 102 -1.5234375000000e+00
+104 102 -7.8125000000000e-02
+105 102 -1.2564100000000e+05
+106 102  7.4786250000000e+04
+107 102 -2.6175210000000e+06
+120 102 -8.5449219000000e-04
+121 102  7.4786312000000e+04
+122 102  7.4786312000000e+04
+123 102 -1.2564100000000e+05
+124 102  2.6175200000000e+06
+125 102 -7.4786250000000e+04
+103 103  1.5000000000000e+08
+104 103  1.2820520000000e+06
+105 103 -7.4786437000000e+04
+106 103  1.9230770000000e+06
+107 103  5.7692300000000e+06
+120 103 -7.4786312000000e+04
+121 103  9.6153820000000e+06
+122 103 -1.2179484000000e+07
+123 103 -2.6175200000000e+06
+124 103  2.8846144000000e+07
+125 103  5.7692280000000e+06
+104 104  1.5000000000000e+08
+105 104  2.6175210000000e+06
+106 104  5.7692300000000e+06
+107 104  2.8846144000000e+07
+120 104 -7.4786312000000e+04
+121 104 -1.2179484000000e+07
+122 104  9.6153820000000e+06
+123 104  7.4786312000000e+04
+124 104  5.7692300000000e+06
+125 104  1.9230760000000e+06
+105 105  5.0256419000000e+05
+106 105  9.4531250000000e-01
+107 105 -1.0156250000000e+00
+108 105 -1.2564106000000e+05
+109 105  7.4786625000000e+04
+110 105 -2.6175230000000e+06
+123 105 -1.2207031000000e-04
+124 105  7.4786312000000e+04
+125 105  7.4786250000000e+04
+126 105 -1.2564106000000e+05
+127 105  2.6175230000000e+06
+128 105 -7.4786625000000e+04
+106 106  1.5000002000000e+08
+107 106  1.2820510000000e+06
+108 106 -7.4786062000000e+04
+109 106  1.9230780000000e+06
+110 106  5.7692330000000e+06
+123 106 -7.4786312000000e+04
+124 106  9.6153820000000e+06
+125 106 -1.2179482000000e+07
+126 106 -2.6175220000000e+06
+127 106  2.8846160000000e+07
+128 106  5.7692340000000e+06
+107 107  1.5000002000000e+08
+108 107  2.6175220000000e+06
+109 107  5.7692350000000e+06
+110 107  2.8846160000000e+07
+123 107 -7.4786250000000e+04
+124 107 -1.2179482000000e+07
+125 107  9.6153790000000e+06
+126 107  7.4786062000000e+04
+127 107  5.7692330000000e+06
+128 107  1.9230780000000e+06
+108 108  5.0256425000000e+05
+109 108  4.2109375000000e+00
+110 108  1.6250000000000e+00
+111 108 -1.2564100000000e+05
+112 108  7.4786500000000e+04
+127 108  7.4786687000000e+04
+128 108  7.4786250000000e+04
+129 108 -1.2564119000000e+05
+130 108  2.6175240000000e+06
+131 108 -7.4786125000000e+04
+109 109  1.5000006000000e+08
+110 109  1.2820520000000e+06
+111 109 -7.4786187000000e+04
+112 109  1.9230770000000e+06
+126 109 -7.4786250000000e+04
+127 109  9.6154010000000e+06
+128 109 -1.2179514000000e+07
+129 109 -2.6175250000000e+06
+130 109  2.8846192000000e+07
+131 109  5.7692380000000e+06
+110 110  1.5000005000000e+08
+111 110  2.6175210000000e+06
+112 110  5.7692320000000e+06
+126 110 -7.4786687000000e+04
+127 110 -1.2179502000000e+07
+128 110  9.6154010000000e+06
+129 110  7.4786687000000e+04
+130 110  5.7692390000000e+06
+131 110  1.9230790000000e+06
+111 111  2.5128194000000e+05
+112 111  4.6367419000000e+05
+129 111  9.7656250000000e-04
+130 111  7.4785812000000e+04
+131 111  7.4786750000000e+04
+132 111 -6.2820441000000e+04
+133 111  1.0769220000000e+06
+112 112  7.4999952000000e+07
+129 112 -7.4786750000000e+04
+130 112  9.6153810000000e+06
+131 112 -1.2179472000000e+07
+132 112 -1.5405970000000e+06
+133 112  1.4423061000000e+07
+113 113  7.5000000000000e+07
+114 113  2.6175220000000e+06
+115 113  5.7692310000000e+06
+116 113  2.8846160000000e+07
+134 113  9.6153850000000e+05
+114 114  5.0256419000000e+05
+115 114 -4.6875000000000e-02
+116 114 -2.1093750000000e-01
+117 114 -1.2564106000000e+05
+118 114  7.4786375000000e+04
+119 114 -2.6175220000000e+06
+134 114  7.4786312000000e+04
+135 114 -1.2564106000000e+05
+136 114 -7.4786375000000e+04
+115 115  1.5000002000000e+08
+116 115  1.2820510000000e+06
+117 115 -7.4786312000000e+04
+118 115  1.9230770000000e+06
+119 115  5.7692310000000e+06
+134 115 -1.2179488000000e+07
+135 115 -2.6175220000000e+06
+136 115  5.7692320000000e+06
+116 116  1.5000002000000e+08
+117 116  2.6175220000000e+06
+118 116  5.7692320000000e+06
+119 116  2.8846160000000e+07
+134 116  9.6153840000000e+06
+135 116  7.4786250000000e+04
+136 116  1.9230770000000e+06
+117 117  5.0256419000000e+05
+118 117  7.8125000000000e-03
+119 117 -1.4843750000000e-01
+120 117 -1.2564106000000e+05
+121 117  7.4786312000000e+04
+122 117 -2.6175220000000e+06
+135 117  2.4414062000000e-04
+136 117  7.4786375000000e+04
+137 117 -1.2564100000000e+05
+138 117 -7.4786312000000e+04
+118 118  1.5000002000000e+08
+119 118  1.2820510000000e+06
+120 118 -7.4786437000000e+04
+121 118  1.9230770000000e+06
+122 118  5.7692310000000e+06
+135 118 -7.4786437000000e+04
+136 118 -1.2179488000000e+07
+137 118 -2.6175210000000e+06
+138 118  5.7692310000000e+06
+119 119  1.5000002000000e+08
+120 119  2.6175220000000e+06
+121 119  5.7692310000000e+06
+122 119  2.8846160000000e+07
+135 119 -7.4786250000000e+04
+136 119  9.6153850000000e+06
+137 119  7.4786312000000e+04
+138 119  1.9230770000000e+06
+120 120  5.0256412000000e+05
+121 120  2.3437500000000e-02
+122 120  2.8125000000000e-01
+123 120 -1.2564106000000e+05
+124 120  7.4786500000000e+04
+125 120 -2.6175220000000e+06
+137 120  2.4414062000000e-04
+138 120  7.4786375000000e+04
+139 120 -1.2564100000000e+05
+140 120 -7.4786500000000e+04
+121 121  1.5000000000000e+08
+122 121  1.2820510000000e+06
+123 121 -7.4786187000000e+04
+124 121  1.9230770000000e+06
+125 121  5.7692310000000e+06
+137 121 -7.4786437000000e+04
+138 121 -1.2179482000000e+07
+139 121 -2.6175210000000e+06
+140 121  5.7692320000000e+06
+122 122  1.5000002000000e+08
+123 122  2.6175210000000e+06
+124 122  5.7692320000000e+06
+125 122  2.8846160000000e+07
+137 122 -7.4786125000000e+04
+138 122  9.6153810000000e+06
+139 122  7.4786187000000e+04
+140 122  1.9230770000000e+06
+123 123  5.0256400000000e+05
+124 123  1.1640625000000e+00
+125 123  1.3359375000000e+00
+126 123 -1.2564100000000e+05
+127 123  7.4786312000000e+04
+128 123 -2.6175200000000e+06
+139 123  9.7656250000000e-04
+140 123  7.4786375000000e+04
+141 123 -1.2564100000000e+05
+142 123 -7.4786187000000e+04
+124 124  1.4999998000000e+08
+125 124  1.2820510000000e+06
+126 124 -7.4786312000000e+04
+127 124  1.9230760000000e+06
+128 124  5.7692280000000e+06
+139 124 -7.4786375000000e+04
+140 124 -1.2179494000000e+07
+141 124 -2.6175220000000e+06
+142 124  5.7692310000000e+06
+125 125  1.4999998000000e+08
+126 125  2.6175200000000e+06
+127 125  5.7692280000000e+06
+128 125  2.8846144000000e+07
+139 125 -7.4786312000000e+04
+140 125  9.6153890000000e+06
+141 125  7.4786500000000e+04
+142 125  1.9230770000000e+06
+126 126  5.0256406000000e+05
+127 126 -3.1093750000000e+00
+128 126 -2.7187500000000e+00
+129 126 -1.2564106000000e+05
+130 126  7.4785812000000e+04
+131 126 -2.6175220000000e+06
+141 126 -1.2207031000000e-04
+142 126  7.4786250000000e+04
+143 126 -1.2564094000000e+05
+144 126 -7.4786125000000e+04
+127 127  1.5000000000000e+08
+128 127  1.2820520000000e+06
+129 127 -7.4786937000000e+04
+130 127  1.9230780000000e+06
+131 127  5.7692350000000e+06
+141 127 -7.4786312000000e+04
+142 127 -1.2179482000000e+07
+143 127 -2.6175190000000e+06
+144 127  5.7692270000000e+06
+128 128  1.5000002000000e+08
+129 128  2.6175230000000e+06
+130 128  5.7692330000000e+06
+131 128  2.8846160000000e+07
+141 128 -7.4786250000000e+04
+142 128  9.6153790000000e+06
+143 128  7.4786375000000e+04
+144 128  1.9230750000000e+06
+129 129  5.0256425000000e+05
+130 129 -3.5390625000000e+00
+131 129  1.3046875000000e+00
+132 129 -1.2564100000000e+05
+133 129  7.4786562000000e+04
+143 129  7.3242187000000e-04
+144 129  7.4786250000000e+04
+145 129 -1.2564100000000e+05
+146 129 -7.4786562000000e+04
+130 130  1.5000005000000e+08
+131 130  1.2820500000000e+06
+132 130 -7.4786062000000e+04
+133 130  1.9230760000000e+06
+143 130 -7.4786250000000e+04
+144 130 -1.2179474000000e+07
+145 130 -2.6175200000000e+06
+146 130  5.7692300000000e+06
+131 131  1.5000000000000e+08
+132 131  2.6175200000000e+06
+133 131  5.7692300000000e+06
+143 131 -7.4786250000000e+04
+144 131  9.6153740000000e+06
+145 131  7.4786000000000e+04
+146 131  1.9230760000000e+06
+132 132  2.5128200000000e+05
+133 132  4.6367700000000e+05
+145 132  9.7656250000000e-04
+146 132  7.4786375000000e+04
+147 132 -6.2820547000000e+04
+133 133  7.4999984000000e+07
+145 133 -7.4786375000000e+04
+146 133 -1.2179494000000e+07
+147 133 -1.5405990000000e+06
+134 134  4.4230768000000e+07
+135 134  1.5405980000000e+06
+136 134  1.4423078000000e+07
+135 135  2.5128206000000e+05
+136 135 -4.6367525000000e+05
+137 135 -6.2820520000000e+04
+138 135 -1.0769230000000e+06
+136 136  7.5000000000000e+07
+137 136  1.5405980000000e+06
+138 136  1.4423078000000e+07
+137 137  2.5128206000000e+05
+138 137 -4.6367462000000e+05
+139 137 -6.2820488000000e+04
+140 137 -1.0769230000000e+06
+138 138  7.4999984000000e+07
+139 138  1.5405980000000e+06
+140 138  1.4423071000000e+07
+139 139  2.5128206000000e+05
+140 139 -4.6367625000000e+05
+141 139 -6.2820543000000e+04
+142 139 -1.0769240000000e+06
+140 140  7.5000016000000e+07
+141 140  1.5405990000000e+06
+142 140  1.4423084000000e+07
+141 141  2.5128206000000e+05
+142 141 -4.6367419000000e+05
+143 141 -6.2820488000000e+04
+144 141 -1.0769230000000e+06
+142 142  7.5000000000000e+07
+143 142  1.5405980000000e+06
+144 142  1.4423071000000e+07
+143 143  2.5128187000000e+05
+144 143 -4.6367400000000e+05
+145 143 -6.2820441000000e+04
+146 143 -1.0769220000000e+06
+144 144  7.4999936000000e+07
+145 144  1.5405970000000e+06
+146 144  1.4423061000000e+07
+145 145  2.5128200000000e+05
+146 145 -4.6367694000000e+05
+147 145 -6.2820543000000e+04
+146 146  7.4999984000000e+07
+147 146  1.5405990000000e+06
+147 147  1.2564106000000e+05
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/external/USCounties_slots.rda
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/external/USCounties_slots.rda
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/external/KNex_slots.rda
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/external/KNex_slots.rda
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/external/symA.rda
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/external/symA.rda
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/external/utm300.rua
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/external/utm300.rua	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/external/utm300.rua	(revision 2477)
@@ -0,0 +1,1295 @@
+UTM300                                                                  UTM300  
+          1290            16           122          1052           100
+RUA                      300           300          3155             1
+(20I4)          (26I3)          (3D21.15)           (3D21.15)           
+FNN              1
+   1   3   9  13  17  20  22  28  32  36  44  46  52  56  60  68  69  70  72  74
+  82  83  84  86  88  96  97  98 100 102 110 111 112 114 116 124 126 132 136 140
+ 148 150 156 160 164 172 174 178 182 186 189 191 196 201 208 217 225 242 257 279
+ 297 306 324 339 355 374 382 399 415 431 451 458 475 491 511 531 538 555 571 591
+ 611 619 637 653 669 689 697 714 729 744 763 771 775 790 812 831 833 837 842 849
+ 858 860 865 870 877 886 895 912 928 950 970 979 9971013103110511060107710931111
+11311140115711731195121512241241125712791299130813261342136013801389140614221440
+14601469147314891511153115331537154215491558156015651570157715861594161116271649
+16691677169417101732175217611778179418161836184518621878190019201929194619621984
+20042013203020462068208820972114213021522172218021842200222222422244224822532260
+22692271227622812288229723052322233723592379238724042419244124612470248725022524
+25442553257025852607262726362653266826902710271927362751277327922800281728322854
+28742883288729022924294329452949295429612970297229782980298229852987299329952997
+30053007301330153017302530273033303530373045304730533055305730653067307330753077
+30853087309330953097310431063112311431163124312631323134313631433145314931513153
+3156
+  1 51  1  2  6 51 52 56  1  3 51 53  1  4 51 54  5 10 55  6 56  6  7 11 56 57
+ 61  6  8 56 58  6  9 56 59  6  8  9 10 56 58 59 60 11 61 11 12 36 61 62 86 11
+ 13 61 63 11 14 61 64 11 13 14 15 61 63 64 65 16 17 16 18 16 19 16 18 19 20 66
+ 68 69 70 21 22 21 23 21 24 21 23 24 25 71 73 74 75 26 27 26 28 26 29 26 28 29
+ 30 76 78 79 80 31 32 31 33 31 34 31 33 34 35 81 83 84 85 36 86 36 37 41 86 87
+ 91 36 38 86 88 36 39 86 89 36 38 39 40 86 88 89 90 41 91 41 42 46 91 92 96 41
+ 43 91 93 41 44 91 94 41 43 44 45 91 93 94 95 46 96 46 47 96 97 46 48 96 98 46
+ 49 96 99 45 50100 51 56 51 52 53 54 56 51 52 53 56 58 51 52 54 56 57 59 61 51
+ 52 53 54 55 56 58 59 60  6 51 52 56 57 58 60106  6  7 11 51 52 56 57 58 59 61
+ 62 63 64 86106107111  6  8 51 52 53 56 57 58 59 60 61 63106108109  1  2  6  7
+  9 11 51 52 54 56 57 58 59 60 61 64101102106107109111  6  9 10 51 54 55 56 58
+ 59 60 61 63 64 65106108109110 11 56 57 61 62 63 65 86111 11 12 36 56 57 61 62
+ 63 64 86 87 88 89 91111112116136 11 13 56 57 58 61 62 63 64 65 86 88111113114
+  6  7 11 14 56 57 59 61 62 63 64 65 86 89111114 11 14 15 56 58 59 60 61 63 64
+ 65 86 88 89 90111113114115 16 66 67 68 70 81 82116 16 17 21 66 67 68 69 71 72
+ 73 74 76 81 82116117121 16 18 19 66 67 68 69 70 71 73 81 82 83116118119 16 17
+ 19 32 66 67 68 69 70 71 74 81 82 84116119 16 18 19 20 66 68 69 70 71 73 74 75
+ 81 83 84 85116118119120 21 67 71 72 73 75121 21 22 26 66 67 71 72 73 74 76 77
+ 78 79 81121122126 21 23 24 66 67 68 71 72 73 74 75 76 78121123124 17 21 22 24
+ 66 67 69 71 72 73 74 75 76 79116117121122124126 21 23 24 25 66 68 69 70 71 73
+ 74 75 76 78 79 80121123124125 26 72 76 77 78 80126 26 27 31 66 71 72 76 77 78
+ 79 81 82 83 84126127131 26 28 29 71 72 73 76 77 78 79 80 81 83126128129 22 26
+ 27 29 71 72 74 76 77 78 79 80 81 84121122126127129131 26 28 29 30 71 73 74 75
+ 76 78 79 80 81 83 84 85126128129130 31 66 77 81 82 83 85131 16 31 32 66 67 68
+ 69 71 76 77 81 82 83 84116131132136 31 33 34 66 68 76 77 78 81 82 83 84 85131
+133134 27 31 32 34 66 69 76 77 79 81 82 83 84 85131134 31 33 34 35 66 68 69 70
+ 76 78 79 80 81 83 84 85131133134135 36 61 62 86 87 88 90136 36 37 41 61 62 86
+ 87 88 89 91 92 93 94 96136137141 36 38 61 62 63 86 87 88 89 90 91 93136138139
+ 36 37 39 61 62 64 86 87 88 89 90 91 94136139 36 39 40 61 63 64 65 86 88 89 90
+ 91 93 94 95136138139140 41 86 87 91 92 93 95141 91 92 96 97 41 43 86 87 88 91
+ 92 93 94 95 96 98141143144 36 37 41 42 44 46 86 87 89 91 92 93 94 95 96 99136
+137141142144146 41 44 45 86 88 89 90 91 93 94 95 96 98 99100141143144145 91 96
+ 96 97 98 99 91 92 93 96 98 86 87 91 92 94 96 99 91 92 93 94 95 96 98 99100101
+106101102103104106101102103106108101102104106107109111101102103104105106108109
+110 56101102106107108110111156 56 57 61101102106107108109111112113114116156157
+161 56 58 59101102103106107108109110111113156158159 51 52 56 57 59 61101102104
+106107108109110111114151152156157159161 56 58 59 60101103104105106108109110111
+113114115156158159160 61106107111112113115116161 61 62 86106107111112113114116
+117118119121136161162166 61 63 64106107108111112113114115116118161163164 61 64
+106107109111112113114115116119156157161162164166 61 63 64 65106108109110111113
+114115116118119120161163164165 66111112116117118120121166 66 67 71111112116117
+118119121122123124126166167171 66 68 69111112113116117118119120121123166168169
+ 66 69111112114116117118119120121124161162166167169171 66 68 69 70111113114115
+116118119120121123124125166168169170 71116117121122123125126171 71 72 76116117
+121122123124126127128129131171172176 71 73 74116117118121122123124125126128171
+173174 66 67 71 72 74 76116117119121122123124125126129166167171172174176 71 73
+ 74 75116118119120121123124125126128129130171173174175 76121122126127128130131
+176 76 77 81121122126127128129131132133134136176177181 76 78 79121122123126127
+128129130131133176178179 71 72 76 77 79 81121122124126127128129130131134171172
+176177179181 76 78 79 80121123124125126128129130131133134135176178179180 81126
+127131132133135136181 66 81 82116126127131132133134136137138139141181182186 81
+ 83 84126127128131132133134135136138181183184 81 84126127129131132133134135136
+139176177181182184186 81 83 84 85126128129130131133134135136138139140181183184
+185 86131132136137138140141186 86 87 91131132136137138139141142143144146186187
+191 86 88 89131132133136137138139140141143186188189 86 89131132134136137138139
+140141144181182186187189191 86 88 89 90131133134135136138139140141143144145186
+188189190 91136137141142143145146191141142146147 91 93 94136137138141142143144
+145146148191193194 86 87 91 92 94 96136137139141142143144145146149186187191192
+194196 91 93 94 95136138139140141143144145146148149150191193194195141146146147
+148149141142143146148136137141142144146149141142143144145146148149150151156151
+152153154156151152153156158151152154156157159161151152153154155156158159160106
+151152156157158160206106107111151152156157158159161162163164166206207211106108
+109151152153156157158159160161163206208209101102106107109111151152154156157158
+159160161164201202206207209211106108109110151153154155156158159160161163164165
+206208209210111157161162163165166211111112116156157161162163164166167168169171
+211212216111113114156157158161162163164165166168211213214106107111112114116156
+157159161162163164165166169206207211212214216111113114115156158159160161163164
+165166168169170211213214215116161162166167168170171216116117121161162166167168
+169171172173174176216217221116118119161162163166167168169170171173216218219111
+112116117119121161162164166167168169170171174211212216217219221116118119120161
+163164165166168169170171173174175216218219220121166167171172173175176221121122
+126166167171172173174176177178179181221222226121123124166167168171172173174175
+176178221223224116117121122124126166167169171172173174175176179216217221222224
+226121123124125166168169170171173174175176178179180221223224225126171172176177
+178180181226126127131171172176177178179181182183184186226227231126128129171172
+173176177178179180181183226228229121122126127129131171172174176177178179180181
+184221222226227229231126128129130171173174175176178179180181183184185226228229
+230131176177181182183185186231131132136176177181182183184186187188189191231232
+236131133134176177178181182183184185186188231233234126127131132134136176177179
+181182183184185186189226227231232234236131133134135176178179180181183184185186
+188189190231233234235136181182186187188190191236136137141181182186187188189191
+192193194196236237241136138139181182183186187188189190191193236238239131132136
+137139141181182184186187188189190191194231232236237239241136138139140181183184
+185186188189190191193194195236238239240141186187191192193195241191192196197141
+143144186187188191192193194195196198241243244136137141142144146186187189191192
+193194195196199236237241242244246141143144145186188189190191193194195196198199
+200241243244245191196196197198199191192193196198186187191192194196199191192193
+194195196198199200201206201202203204206201202203206208201202204206207209211201
+202203204205206208209210156202206207208210211256156157161201202206207208209211
+212213214216256257261156158159201202203206207208209210211213256258151152156157
+159161201202204206207208209210211214251252256257259261156158159160201203204205
+206208209210211213214215256258259260161207211212213215216261161162166206207211
+212213214216217218219221261262266161163164206207208211212213214215216218261263
+156157161162164166206207209211212213214215216219256257261262264266161163164165
+206208209210211213214215216218219220261263264265166211212216217218220221266166
+167171211212216217218219221222223224226266267271166168169211212213216217218219
+220221223266268161162166167169171211212214216217218219220221224261262266267269
+271166168169170211213214215216218219220221223224225266268269270171216217221222
+223225226271171172176216217221222223224226227228229231271272276171173174216217
+218221222223224225226228271273166167171172174176216217219221222223224225226229
+266267271272274276171173174175216218219220221223224225226228229230271273274275
+176221222226227228230231276176177181221222226227228229231232233234236276277281
+176178179221222223226227228229230231233276278171172176177179181221222224226227
+228229230231234271272276277279281176178179180221223224225226228229230231233234
+235276278279280181226227231232233235236281181182186226227231232233234236237238
+239241281282286181183184226227228231232233234235236238281283176177181182184186
+226227229231232233234235236239276277281282284286181183184185226228229230231233
+234235236238239240281284285186231232236237238240286186187191231232236237238239
+241242243244246286287291186188189231232233236237238239240241243286288181182186
+187189191231232234236237238239240241244281282286287289291186188189190231233234
+235236238239240241243244245286288289290191236237241242243245246291241242246247
+191193194236237238241242243244245246248291293186187191192194196236237239241242
+243244245246249286287291292294296191193194195236238239240241243244245246248249
+250291294295241246246247248249241242243246248236237241242244246249241242243244
+245246248249250201251201202206251252256251253251254205255260206256206207211256
+257261256258256259206208209210256258259260211261211212216261262266261263261264
+211213214215261263264265216266216217221266267271266268266269216218219220266268
+269270221271221222226271272276271273271274221223224225271273274275226276226227
+231276277281276278276279226228229230276278279280231281231232236281282286281283
+281284231233234235281284285236286236237241286287291286288286289236238239240286
+288289290241291241242246291292296291293291294241243244245291294295246296246247
+296297296298296299250295300
+-.707106816579618E+000.707106745793467E+00-.844334130890272E-01
+-.696951911168316E+00-.844334130890552E-010.844333971430866E-01
+0.696951959550198E+000.844333971430866E-010.169379293548785E-01
+-.706903887803993E+00-.169379269811943E-010.706903887799719E+00
+0.245538507221060E-01-.706680324381466E+00-.245538469074249E-01
+0.706680363494609E+00-.816418512372678E+000.416234647777442E+00
+0.400261827613855E+00-.707106816579739E+000.707106745793357E+00
+-.692246657276026E-01-.700297003669988E+00-.692246686484270E-01
+0.692246561667109E-010.700297003664129E+000.692246429669856E-01
+0.201259425073776E-01-.706820307066788E+00-.201259404946509E-01
+0.706820307062134E+000.247547275541103E-01-.706673335798275E+00
+-.247547250784765E-010.706673335793667E+000.244951179721711E-01
+0.141798045683355E-19-.699515386900931E+00-.100390257306135E+00
+-.244951125432383E-010.403797585699602E-130.699515399846145E+00
+0.100390257306048E+00-.707106840518851E+000.707106721854245E+00
+-.132398684210425E-02-.707104302076665E+00-.132398682112846E-02
+0.132398661033321E-020.707104302222497E+000.132398652689601E-02
+0.251871166539414E-01-.706658056811822E+00-.251871127758866E-01
+0.706658056805146E+000.264048027660490E-01-.706613622993380E+00
+-.264047987662912E-010.706613586618012E+000.250107227346610E-01
+0.259324348882091E-18-.669582765977545E+00-.225905619309715E+00
+-.250107188007798E-010.166054197615496E-120.669582814615445E+00
+0.225905627940471E+00-.999999999999996E+00-.100000000000000E+01
+0.707106751263410E+00-.707106811109693E+000.707106751263400E+00
+-.707106811109696E+000.594184615923025E-04-.522534802243499E-12
+-.594354881940039E-04-.764126330976698E+00-.654895649435869E-04
+-.555850754291422E-100.775951072359707E-040.645066611238772E+00
+-.999999999999996E+00-.100000000000000E+010.707106751263410E+00
+-.707106811109693E+000.707106751263407E+00-.707106811109700E+00
+0.265041818209181E-04-.508541053041430E-12-.265118042346652E-04
+-.757862392871900E+00-.311410747072004E-04-.431724688636464E-10
+0.361816791523382E-040.652414431007056E+00-.999999999999996E+00
+-.100000000000000E+010.707106751263410E+00-.707106811109693E+00
+0.707106794782394E+00-.707106767590709E+000.247298538585594E-04
+0.173057137779142E-12-.247369664563574E-04-.758133034802306E+00
+-.288203567500599E-04-.373198365066270E-100.335135601768647E-04
+0.652099914402839E+00-.999999999999996E+00-.100000000000000E+01
+0.707106751263410E+00-.707106811109693E+000.707106773022893E+00
+-.707106789350199E+000.526001426328733E-04-.686257777907160E-12
+-.526151918089806E-04-.763904838719903E+00-.579153207211495E-04
+-.480634147895882E-100.685730564085902E-040.645328895826580E+00
+-.707106816579021E+000.707106745794075E+000.907453690126752E-01
+-.695363616933204E+000.907453584845728E-01-.907453530938325E-01
+0.695363616931083E+00-.907453541634382E-010.388412996851262E-01
+-.706039176488765E+00-.388412958008106E-010.706039225852471E+00
+0.405384669021764E-01-.705943788823106E+00-.405384601326821E-01
+0.705943788819880E+000.374910477226837E-010.836910668696327E-19
+-.653009130497729E+00-.268651354886250E+00-.374910441557599E-01
+0.139197855810201E-120.653009053988256E+000.268651341635424E+00
+-.707106816577767E+000.707106745795336E+000.110699028877342E+00
+-.689558863568468E+000.110699028877342E+00-.110699023342189E+00
+0.689558899694259E+00-.110699023342207E+000.353901421432703E-01
+-.706220615039452E+00-.353901386042155E-010.706220587934077E+00
+0.400455576932894E-01-.705971921162636E+00-.400455536886817E-01
+0.705971921161698E+000.397033469335430E-010.518711104785870E-19
+-.700067560303143E+00-.912639778518622E-01-.397033514193168E-01
+0.669670689866494E-130.700067476628409E+000.912639778518489E-01
+-.707106816577706E+000.707106745795397E+000.216163600604371E+00
+-.673255732353994E+00-.216163567662612E+000.673255767625957E+00
+0.343171978221466E-01-.706273565834579E+00-.343171943903884E-01
+0.706273537877586E+000.384789098875664E-01-.706059044020112E+00
+-.384789060396264E-010.706059044019181E+000.428340687803781E+00
+-.816002001388647E+000.388155882219383E+00-.707106781186546E+00
+0.707106781186546E+000.919164088258896E-12-.323903147050126E+00
+-.668411207904565E+00-.668411136933422E+00-.392397821342358E-01
+0.126741961371568E-010.848341585451701E-02-.686488249101334E+00
+-.164737403383030E-010.726794259837522E+000.253811998949423E-01
+0.427304877010395E-02-.713017416797165E+00-.242972297547323E-01
+-.379326587583946E-020.700241968358579E+00-.374966055507997E-03
+0.244954510496371E-01-.107305914771803E-020.854576884136081E-09
+-.704999716109445E+00-.101177314154959E+00-.240417637527367E-01
+0.106896353468138E-020.693652910717219E+000.101999329282549E+00
+0.369802367784965E-02-.998478946766033E-080.628213615438288E+00
+-.111695501554557E-01-.639775962557707E+000.441805243310407E+00
+0.264916681259199E-010.150179388402961E-02-.323621717853948E-03
+0.878267323059556E-020.250020432185017E-03-.492283767812116E-02
+-.406353565923736E-010.234750587315863E-02-.173455232422632E+00
+0.500624797585161E+000.467986775089445E+00-.171309845650195E-01
+0.108659111149954E+00-.500624772325725E+00-.485548310627230E+00
+0.203453546805473E-030.924723892346221E-040.596021551608855E-02
+0.144977252778252E-030.727990528604067E-040.170446169406913E-02
+-.713900928598815E-020.219802264290567E-010.370608562041904E+00
+0.207893595583177E-01-.258848244250827E-01-.903242099366874E+00
+0.922248994905455E-01-.305257817801369E-02-.700818827730815E-02
+0.191302757843644E+000.148579185954640E-040.171121650781410E-02
+0.486934889722714E-030.150620182701511E-040.124328766057256E-03
+0.239016721169981E-030.115323810912666E-030.404520413743159E-02
+0.113998101983268E-04-.207057801906026E-020.590390599498483E-01
+0.229989382973123E+000.126638864121696E-01-.636607683510642E-01
+0.320190435990360E+00-.860187903320348E+000.144893930539319E-02
+-.120356442673852E-010.311102756171715E+00-.160900125595186E-05
+-.788680156986552E-05-.220582013341250E-04-.808877643315356E-05
+0.290559263145904E-02-.124362898928145E-05-.455696078386797E-02
+0.130134687021089E+000.186761496719130E-01-.209760100786787E-01
+0.603707240598609E+000.866404279134079E-010.268410288213005E-01
+-.160761288050858E-02-.771455917360623E+00-.118795008750806E+00
+0.233433259368892E-030.357198977531906E-020.125468663142325E-01
+0.105518298214813E-01-.219409073721873E-03-.516770485999043E-03
+0.155737420002396E-020.475170697294222E-020.375437524196078E-02
+0.125599035320910E-080.160955314931229E+00-.223800543931700E-01
+-.167424614451373E+000.958946814478864E+000.161130765277663E+00
+0.196534771283384E-030.229515992283831E-020.576258431242573E-05
+0.123745953025444E-01-.106995672755502E-04-.451052406900802E-04
+-.456298622807265E-03-.275196027305474E-03-.305282850369034E+00
+0.519423576775914E+000.505241937641198E+00-.130908849130573E-01
+0.201635085589468E-01-.519423633116087E+00-.333293227117524E+00
+-.263134929283539E-020.118328199171819E-030.104150622740462E-01
+0.193141117505181E-03-.154345791282011E-030.173868931704905E-03
+0.325208290050746E-02-.373216687782401E-030.149265726829690E-01
+0.635804228599679E-010.820369767656903E-02-.212632332341540E-01
+-.863649530175426E+000.489006964790317E+00-.348933539662262E-01
+-.515727866020910E-020.944324418994364E-010.774875938152194E-04
+0.482971314170869E-020.112759618007829E-020.222168874154256E-11
+-.469066568608033E-100.220035735034216E-030.392555412688333E-02
+0.141255360917606E-030.174989934363485E-010.515531740150388E-01
+-.461588326613025E-03-.250983472579693E-010.684732202756503E+00
+-.726228124582573E+000.842387322611238E-02-.317841553099293E-03
+0.582455539039689E-02-.217823676656004E-040.446878338884266E-02
+-.200617977872690E-010.537091052490130E+000.181205202614563E+00
+-.379058590472633E-02-.114631325054326E-020.100346775148016E+00
+0.271648560515299E-010.259196853345346E-01-.272445450180131E-01
+-.728159919978982E+00-.314123286436018E+00-.938624176704406E-02
+-.362203896936131E-020.153775041043447E+000.781378322348654E-01
+0.426720954014265E-030.112760204809835E-02-.167938108847192E-02
+0.854993026183699E-010.457577468747559E-03-.644980511474331E-03
+-.215375382943762E-020.354875964291731E-050.999992692546311E+00
+0.164898274978811E-070.304934046331858E-020.228760962681150E-03
+-.247128995183060E-100.118007080764899E+00-.123564497591530E-09
+0.162728422837746E-01-.819861260960444E+000.141941206609466E+00
+0.125775224074353E+000.393535557751079E-020.178021559472064E+00
+-.141941215640452E+00-.147146706681122E+000.753144190049640E-03
+0.236859750590249E-020.447439294418169E+000.359129436315990E-02
+0.627754930398190E-01-.139244701906877E-020.214783034756772E-03
+0.131512191293389E-030.124438240310255E-040.487697648747908E+00
+-.148174054632193E-02-.535785553537011E+000.309890918116741E-03
+-.688115252161152E-01-.283340125674097E-010.310257496437506E-01
+-.461205326885983E+000.191293743934847E-020.505833990447865E+00
+0.750983511657879E-040.705267092317584E-04-.786060719406271E-05
+0.565417053429881E-020.369600487362671E-040.443122584382949E-02
+0.369600487362671E-040.389809678124690E+00-.480919973513487E-01
+0.104050264453308E-01-.489891790728507E+000.512175326664710E+00
+-.251878239510859E-010.293966079442228E-01-.374941991066111E+00
+0.641782125495638E-010.443884509856657E+000.415631588510590E-02
+0.291724739467156E-02-.315602200752062E-040.276258179505761E-12
+0.315692669405107E-040.405867061011481E+000.378690131926348E-04
+-.918882285479390E-06-.585087468913459E-04-.901978941696008E+00
+0.113474779210659E-090.132088859541395E-090.452016593238905E-08
+0.153981616917685E-03-.187604508266648E-060.449094630629618E-09
+0.238044864556349E-060.236695170296057E-02-.429542502073789E-04
+-.134103249836867E-040.103819281934490E-030.147310120826308E+00
+0.289572954091881E-010.166544091372661E-01-.414623249348314E-01
+-.271830205766233E-01-.834413463006351E-060.998136392031476E+00
+0.122395916553052E-010.632739099986892E-090.212633687143486E+00
+0.632739099986892E-09-.110266703181475E-030.137411102806595E+00
+-.541373056555355E-02-.813199727026674E+000.185364035933384E+00
+0.189529013238867E+000.865340666265890E-020.342605965282138E+00
+-.185364035366044E+00-.194177150813847E+000.294623504846971E-02
+-.481686497086705E-030.121545876488085E+00-.530804639167663E-03
+0.456286581451462E-020.286575521807902E-020.404296415827950E-03
+-.687084666871018E-010.346805266614458E-020.753574515516031E-01
+0.505627623174092E+00-.574252270940695E-02-.564511679616764E+00
+-.357473139901688E-04-.231037907805869E-01-.434238694510366E+00
+0.475492620831160E+000.115770063050651E-020.134140728510668E-02
+-.263260049701307E-030.105471222881001E-020.116593856850648E+00
+0.105471222881001E-020.922493324714324E-01-.579437302697594E-01
+0.121570291545597E+000.685873943808266E-010.273378233184083E+00
+-.204837707484476E+000.360576001215734E-02-.677988803582434E+00
+0.173174484916547E+00-.380656063886276E+000.442368547231428E+00
+-.558513583720547E-04-.823757328985934E-030.669330729666884E-01
+-.959833802074539E-030.601389213056274E-010.962184060000759E-05
+-.187827323783031E-040.360387968584401E-120.187881360370489E-04
+0.537074764821504E+00-.241847150836626E-08-.239399430153665E-10
+0.201204711161572E-080.245123711639579E-040.343859473382981E-04
+0.142820901368339E-07-.395427510919049E-04-.803141296002529E+00
+-.308798916471791E-080.372565513480860E-110.372134699667619E-08
+0.695751722977721E-04-.206823361952197E-04-.867594640014316E-07
+0.320490380387678E-040.257904527488446E+000.251527713105688E-01
+0.160670486494815E-01-.359427383128825E-01-.208315603223150E-01
+-.106749103877009E-050.998634620717329E+000.105947158447703E-01
+0.786357166775589E-090.644554062825855E-010.147441968768947E-09
+0.283415543445799E-020.685059169690794E-030.161928254063469E+00
+-.734658112367259E-02-.795436981644603E+000.112005113951728E+00
+0.116112410074604E+00-.122748344137133E-010.535385505713645E+00
+-.112005114710728E+00-.101694000626255E+000.376112318286562E-03
+0.337223222160585E-01-.160461773121821E-020.572257030714030E-02
+0.358983271090535E-020.483648722770236E-03-.374378469350919E+00
+0.491681099797348E-020.409889093974485E+000.530964917213129E+00
+-.627250620485439E-02-.595098741464305E+00-.241170615534876E-04
+-.334285861829879E-01-.157354286153396E+000.172548982335806E+00
+0.149808311102240E-020.164824307470865E-02-.307153539074260E-03
+-.106756314785166E-020.139626387190351E+00-.106756314785166E-02
+0.110156897634196E+00-.309911159440874E+000.167408292491309E+00
+0.360213501196167E+000.241963975861273E+00-.208694806147609E+00
+0.493267448076731E-02-.709971239067276E+000.237100559219863E+00
+-.131217716617825E+000.154290771975884E+00-.959074851003528E-05
+0.956731538415544E-030.794297126275660E-010.783541617392965E-03
+0.693456870140263E-01-.453325254228497E-04-.176585350383745E-04
+-.123562725125358E-120.176636156078052E-040.541350527616704E+00
+-.240773125362821E-08-.233457660732528E-110.271455532902927E-08
+0.477531482574202E-040.318748202945685E-040.168773004647976E-07
+-.366100077933934E-04-.802382883088274E+00-.189243713536815E-08
+-.175937555189488E-100.161357154454997E-080.220750984082187E-04
+-.182827311837541E-04-.810192048052132E-070.287394278084876E-04
+0.251239543599436E+000.460154655563629E-030.109020541892817E-07
+0.301020760096669E-02-.676020538863894E-03-.201397582313553E-02
+0.265255685432536E-050.999993076694352E+000.245686508966199E-03
+0.528725086162795E-100.528725086162795E-100.139137638304773E-01
+-.931476122820135E-020.187667088561186E+00-.806168464489319E-01
+-.741318518217202E-01-.150594948497854E-030.496927937442151E-02
+0.577857814421090E+000.106703220081005E-01-.779133836752166E+00
+0.806168453826879E-010.695241882699640E-01-.515203579148082E-04
+-.229418112929880E-030.809403648149187E-02-.283211984912348E-03
+0.309218219416329E-030.189421944285213E-030.177162332103893E-04
+-.436862641845423E+000.479152582846512E+00-.712381219969140E-01
+0.294435744654024E-020.780917998203279E-010.502921115640390E+00
+-.181070913767124E-02-.552926222784265E+000.443750531523610E-03
+-.985965310703518E-010.118852928374641E-030.109862679157740E-03
+-.109006539468286E-040.144672961940265E-030.716786890076843E-02
+0.144672961940265E-030.561128618870810E-02-.311695309851634E+00
+0.369140461343607E+00-.564818818963682E-010.843996016463362E-01
+0.683479449787785E-010.353180746937538E+00-.525397161080030E-01
+0.131036844385976E-01-.456640065049356E+000.644420456556119E+00
+0.559396888735261E-020.394650581663461E-02-.276030758828090E-04
+0.359262044720999E-120.276109760275352E-040.400875800538385E+00
+-.153565440406287E-06-.284270058405151E-090.171772862729932E-06
+0.153454876917201E-02-.233754388154802E-090.978810924525225E-10
+0.373622626632746E-080.130985708337576E-030.345983153605038E-04
+-.692008542158418E-06-.515924281953249E-04-.901011303111012E+00
+-.327069748284931E-04-.724156296312873E-050.719917974521585E-04
+0.165755363482073E+000.474803594620760E-020.116474496930673E-03
+0.161427927008894E+00-.319233613834862E-01-.199249049476415E+00
+0.943952542138753E+000.205279273142504E+000.363324353033546E-02
+-.108482676139213E-020.157536226523168E-010.130255045013827E-02
+0.301913162646137E-030.161243332301578E+000.606695718965107E-01
+-.397526540444055E+000.554748860175678E+000.383966542560385E+00
+-.236530864243820E-010.493155556414269E-01-.554748767500591E+00
+-.214301755749183E+00-.791692179238457E-02-.552245530472999E-03
+0.117804913038090E-010.534077055607152E-040.359651953275203E-03
+0.435838693521165E-020.413002012631367E-030.215005754443115E-01
+-.121296060755018E-010.287291230583004E-01-.295083695975163E-01
+-.936024399941001E+000.150963209808127E+00-.471083210162908E-01
+-.930017973181041E-020.310435446284620E+000.200383312665818E-03
+0.797662512256087E-020.202677154721335E-020.821695118252034E-03
+0.185995596284431E-090.953942751065062E-020.579222037124909E-04
+0.419784017723221E-01-.482975532332040E-030.904470811910962E-02
+-.574430934800443E-010.451700983218531E+00-.847632099722912E+00
+0.206216564248354E-01-.952089249595826E-030.267683914514290E+00
+-.442089263297538E-040.130227346463139E-01-.334575236633050E-01
+0.582754336569465E+000.239748154997497E+00-.232703116519158E-02
+0.632586030004597E-030.656015033332231E-010.269019293740100E-01
+0.372932091845224E-01-.227602290610941E-01-.680109638438260E+00
+-.349237624883250E+00-.320426217305454E-02-.232449893005120E-02
+0.496936332823237E-010.161945477273113E-010.379014284144202E-03
+0.396327632422365E-03-.858744763106854E-030.871345710795191E-01
+0.870146384175541E-020.110748991451490E-070.647459393211122E+00
+-.211020858629368E-01-.655608719224489E+000.387108539259607E+00
+0.241779008380115E-010.386469431151273E-020.112081023309811E+00
+-.698167490986286E+00-.112081012101691E+000.698167490986229E+00
+0.609105524539040E-040.810324884139280E-03-.604954208771893E-02
+0.822458556079886E-020.108535292536380E+000.377476685106857E-01
+-.774936024964465E-02-.787880717753179E+000.225369702812543E-02
+-.562892718869109E-03-.285497312308102E-010.604196076303872E+00
+0.134876218565383E-040.885850836022477E-030.240861803747173E-03
+0.320725483445566E-04-.245765498175867E-030.518563563274593E-03
+-.258064430088833E-030.523073530082049E-020.414286362962317E-04
+-.134296280739007E-010.454147960865441E-010.246095955438665E+00
+0.381810162664600E-01-.458578109756278E-010.309247721541881E-01
+-.840168641477295E+000.726706384663128E-03-.200805330145389E-01
+0.475756927113320E+00-.348987049372346E-050.163014746453075E-04
+-.406433530604126E-040.174811555826052E-040.416347324487490E-02
+-.503900886600453E-05-.243879091555047E-010.430018804227158E+00
+0.560591961221790E-010.114237883088519E-020.652452798290859E-02
+-.245918402416141E-020.608972012498249E-020.461425942228189E-01
+-.102539319935843E-02-.815026724296231E+00-.117156972700854E+00
+-.195325680784950E-010.236697927830689E-080.358408016308951E+00
+0.467236881616071E-01-.528487928757052E-03-.344478060267522E-03
+0.327754210659766E-020.101409566262696E-010.707106781186500E+00
+-.707106781186603E+000.662262870273973E-01-.412532285002360E+00
+0.642429494386874E+000.642429402719959E+00-.339222881485481E-01
+-.440624356497263E-020.721314558783405E+000.318354889292678E-01
+-.691029429413945E+00-.298330170970555E-020.228604569444274E-01
+-.372782349555383E-01-.271115201819383E-010.688164533706434E+00
+0.441086820619143E-01-.722376492423855E+00-.383619480806987E-01
+0.123858524819484E-020.211675332716350E-020.682478888494490E+00
+0.970441548327741E-010.390369360953282E-01-.238759561039506E-08
+-.716298578374737E+00-.933799186770630E-01-.707106781186575E+00
+0.707106781186525E+00-.167263560147883E-07-.497215731964989E+00
+-.609297473009121E+00-.609297508136205E+00-.101437921164760E+00
+0.396808464685394E-010.145837777501628E-01-.681042143793224E+00
+-.504664615069257E-010.729278738542803E+000.681269617691656E-01
+0.666444114418943E-02-.712408745146810E+00-.648638844371203E-01
+-.636842463844503E-020.695369860658179E+00-.979129339670780E-03
+0.300892878154688E-01-.298674746023331E-010.482956299067998E-07
+-.322605724633322E+00-.646186912478413E+00-.121318406636933E-01
+0.582015570576082E-010.215407605396003E+000.653173445595279E+00
+0.570507474805564E-030.942716646294706E-080.298476109835370E+00
+-.229767996041610E-01-.303221070862048E+000.602037576303353E+00
+0.675266720258527E+000.245053547811273E-020.585960686889018E-03
+0.513031006915004E-030.865194342723113E-020.787352240189772E-03
+-.123009456216638E-01-.602952293381838E-010.100813384569477E-01
+-.235623029749862E+000.486151508253275E+000.442775079628557E+00
+-.405512246939388E-010.216904069577573E+00-.486151536353640E+00
+-.472136317138705E+000.126301180815325E-010.792403668237731E-04
+0.413297540850655E-020.352171169359473E-03-.329573224578663E-04
+0.652940718111332E-03-.256262482273700E-03-.234114335976204E-01
+0.337110002433409E-010.381021013468887E+000.601463636725532E-01
+-.545256280105584E-01-.868532468572194E+000.679937091073461E-01
+-.847858651657671E-01-.411597864503930E-010.280521986517897E+00
+0.105879134718726E-040.416765143704468E-03-.123099030948993E-03
+0.301756375767690E-040.249083843067110E-030.209120900143790E-03
+0.231043094154576E-030.257036870345741E-020.228387047244176E-04
+-.574755821099979E-020.974467519929338E-010.236333894525561E+00
+0.396680034546653E-01-.132253076018475E+000.265114915419996E+00
+-.853424947855451E+000.479397847921161E-01-.427817436974369E-01
+0.335850084444527E+00-.148408460429058E-04-.748161136435617E-04
+0.110753604160756E-03-.706119611472251E-040.152624617518191E-02
+-.110951858901099E-04-.644113284807349E-020.650828991401486E-02
+0.228749967414610E+000.600635730865104E-01-.223553067564437E-01
+-.358150776105921E-070.239684957296783E+000.480094650288983E+00
+0.192145309729517E-01-.836123635137684E-01-.225899275367096E+00
+-.765138432844402E+000.313411371419374E-020.742995638243971E-02
+-.136119349521726E-010.825709237069057E-01-.389328976578801E-02
+0.308727616620548E-020.502762790374560E-010.457631940177901E-01
+0.210671082150144E-030.136670157899477E-030.177999280509586E-01
+-.174707401413546E-02-.146934442009727E-010.371048542182972E-01
+0.999042801658376E+000.917293575579656E-030.136933469979301E-03
+0.442668224180858E-030.123494540316625E-010.557234391914227E-04
+-.570137556406672E-02-.370827223466650E-01-.472433665133362E-02
+-.278122948398114E+000.410144945494006E+000.397557322797068E+00
+0.448319999663166E-030.493871784844263E+00-.410144933519769E+00
+-.425418904107767E+000.334848699759163E-010.127375877370595E-03
+0.110532019406746E-020.237091582126644E-01-.113844312723035E-03
+-.380925034819731E-040.158908676155912E-02-.494574442295410E-03
+-.136516243012434E-020.289433905657649E-010.514912248937955E-01
+-.303914167730759E-02-.422251074843907E-01-.203227767720065E+00
+0.153753347019584E+00-.917153830215156E+00-.763258755002147E-01
+0.287706323687985E+000.216506567822838E-040.829796579240233E-03
+-.283433609785619E-030.559390318691268E-030.633501377261939E-02
+0.131319120514597E-020.701963998257549E-010.905217459477781E-01
+0.357923735038388E-01-.123891945774251E+000.395903508691244E+00
+-.702671794969916E+000.557691797337480E+00-.205098607153493E-01
+0.909184509497725E-01-.190654151029481E-04-.121336165082983E-03
+0.328915099482047E-03-.149272779124686E-030.338462654696031E-02
+-.112851204297636E-04-.445463552536016E-02-.835576313571940E-02
+0.752932544467666E-010.137534847523132E+00-.259114738485208E-03
+-.563852731001187E-030.190774804903477E-020.242779688270085E-01
+-.194309000886799E-02-.285769460002899E-010.895054924400790E-02
+-.983116941827859E+000.212645158251803E-030.125707197364705E-03
+-.350836204080841E-030.430592564883796E-01-.853469359816533E-03
+-.777078218862946E-030.742620013435782E-020.734967290854320E-01
+0.381446313628261E-030.124845056146456E-030.414383331747861E-02
+-.940271526508416E-03-.404221951901942E-020.644204016897479E-03
+0.999982450334638E+000.102526910708690E-030.342667220082544E-03
+0.539407713885730E-030.112182650588275E+000.291963953692846E-02
+0.243306172940037E-020.417843161548503E-01-.339945353959363E-01
+-.797488637176752E+000.274980044994610E+000.286636867608651E+00
+-.136712222555940E+000.267568964966806E+00-.274980025426080E+00
+-.117859587300834E+00-.268224051763144E-020.846984655215149E-02
+0.104013252256216E+00-.706725077066978E-020.221871308732617E-02
+0.219868236428274E-020.201981444706414E-030.458618437592934E-02
+0.126809928213090E-01-.320380956077024E-010.204506522896203E-01
+-.148582793941879E-01-.113780442017961E+000.374335203551583E-01
+-.990721098034612E+00-.210726169380195E-010.426373790397174E-01
+0.136555208806411E-030.224198476974885E-02-.571391145031755E-03
+0.566586344120537E-020.959780379361985E-020.318911180367516E-02
+0.620827710669931E-01-.568901108942749E-02-.180691343789712E-01
+-.740521161628900E-010.209179385162360E+00-.195609548916247E+00
+0.952445669749881E+00-.250646268674595E-010.131476157327279E-01
+-.369071287024797E-04-.488185333132813E-030.346924020436468E-02
+-.801030241372621E-030.135234270359219E-01-.699427244703543E-04
+-.227371817304806E-040.305526739861381E-070.280327128925278E-04
+0.499079983149445E+00-.678543881782044E-05-.141311621891559E-04
+0.323882026853012E-040.296376197095334E-020.557320090650802E-05
+-.203285194749962E-03-.242749015745857E-03-.829871103648760E+00
+0.275295157139778E-080.407862664671703E-080.240492921342678E-07
+0.447132367465700E-03-.196841317648305E-03-.835445317130868E-04
+0.803921598880989E-030.249446072407021E+000.188844328303154E-01
+0.538455289838268E-030.291708523636470E-01-.372703108642742E-01
+-.496393478982733E-010.254758647814956E-050.997313376037241E+00
+0.179944080258892E-040.174653471249788E-01-.387280835249212E-03
+0.135120879213858E+00-.332591407056297E-030.839200840958193E-02
+0.123774549670626E+000.710355862613081E-01-.816903955833649E+00
+0.259111769955954E+000.169922195433962E+00-.967589717675854E-01
+0.295181562913193E+00-.259111775222573E+00-.121879896040359E+00
+-.170780062460303E-01-.456215445186038E-030.138493391082666E+00
+-.756584484839288E-030.462615585354142E-020.747070123653290E-02
+0.121523955801067E-020.121318890601466E-020.855595803629244E-02
+-.618607852540523E-020.306525760240591E+00-.136562251008736E-01
+-.673592315256137E+000.589580615384586E-03-.573566359288367E-01
+-.288004951243023E+000.604707526771186E+000.152712274111098E-02
+0.506016895702041E-02-.105440009914927E-02-.424305489168350E-06
+0.528751207416300E-030.254336715238593E-010.543992283805514E-03
+0.769918527154085E-010.230146570594166E-050.776291852346123E-02
+0.118061461199013E+00-.143472302037430E-010.270617786854460E+00
+-.198234957495660E+000.136950886553168E-01-.726560688324639E+00
+0.141188296603900E+00-.294523042192644E+000.472157830749985E+00
+-.110872557472870E-03-.126978546655609E-020.577296043463924E-01
+-.144384353054288E-020.752577368093954E-010.243418539483478E-04
+-.142888328684564E-04-.114490935915299E-070.161979153767801E-04
+0.390904820917777E+00-.107263660415500E-07-.465323015112817E-08
+0.223347461190187E-070.281951787649733E-040.642263470427003E-04
+0.343724131105744E-06-.989576291726829E-04-.832242768277343E+00
+-.120177009576371E-070.103799950061146E-090.199722827564297E-07
+0.126564714211728E-03-.692324238576580E-04-.138592840130219E-05
+0.152324103553164E-030.393147982873812E+000.154917438959898E-01
+0.104654297961220E-040.278259108674488E-01-.303490991488291E-01
+-.354216368215474E-01-.374358936472513E-060.998306540843242E+00
+0.583345098154626E-030.139166982303768E-01-.219188756453223E-02
+0.757662900455562E-01-.152524631871661E-03-.321278040358060E-02
+0.320493204006391E+000.101985556245574E+00-.783316817911260E+00
+0.276533341997327E+000.164610994180330E+000.186915934215290E-01
+0.109466950808409E+00-.276533344763605E+00-.262128799339971E+00
+-.711582411610634E-020.316741118718987E-020.798075059151104E-01
+-.549305914149587E-020.680591161936855E-020.103957194354297E-01
+0.165449572551216E-02-.297305272856413E+000.133512169424708E-01
+0.620313041634109E+000.288681103087594E+00-.177630992643315E-01
+-.657895338706556E+000.101100937639440E-02-.995075900155844E-01
+0.378031371560238E-03-.715073997670865E-020.226932302359274E-02
+0.680513181941886E-02-.134886288914828E-02-.489664457071443E-05
+-.115741943188504E-020.340181330921379E-01-.112000827068954E-02
+0.949249299187529E-01-.963143805549435E-05-.279314130074537E+00
+0.159118172145863E+000.440690486502383E+000.219264647394360E+00
+-.223531848223986E+000.209613224177962E-01-.730529530601576E+00
+0.216119903392971E+000.149639207047947E-01-.229194735289877E-01
+-.501177261368179E-040.297277225627281E-020.694032145798862E-01
+0.257686371432962E-020.885479588062585E-01-.207970163074130E-03
+-.138923090909384E-04-.127238716380106E-070.157058480423797E-04
+0.409492189251564E+00-.102996885080796E-07-.678584712436506E-10
+0.157848450480880E-070.936451399983214E-040.583579087160737E-04
+0.356385494683888E-06-.910641984638006E-04-.829776111590451E+00
+-.749823348792695E-08-.249102776330744E-080.140200580837383E-07
+0.281551872354774E-04-.595312905301544E-04-.125463596060752E-05
+0.134246582370566E-030.379193497185602E+000.426249993318591E-03
+0.138136677625042E-030.600027532935093E-02-.104715937420707E-02
+-.410412425692858E-020.360816358907135E-030.999972748532237E+00
+0.815344840941258E-040.470003277126032E-03-.975581912704339E-03
+-.758387765641282E-030.311201162620555E-010.163127700276862E-03
+-.379406664406015E-010.655778353245633E+000.196424421346421E-01
+-.478876541054886E+000.310326047253723E+000.286814367728409E+00
+0.475138107439813E-02-.411328427070017E-01-.310326040307785E+00
+-.244615833492320E+000.880585133137490E-02-.212605409102574E-02
+0.364624809606826E-01-.259201452975158E-020.224527879066681E-02
+0.209234382545644E-020.156319489577705E-03-.307758905489842E-01
+0.220261326059213E-010.671643419853845E-010.118321296739216E+00
+-.103277528307138E-01-.428144170934312E+000.286625510817101E-01
+-.869306495280380E+00-.510672066662528E-010.193647111457262E+00
+-.378647105337771E-040.317666846458886E-02-.835552638858626E-03
+0.701619192360112E-020.105374907692704E-01-.522925349009331E-01
+0.132709858923520E+000.526721064437783E-01-.202405945294266E-01
+-.725368516726221E-010.194688239718319E+00-.189260055568609E+00
+0.946300940701786E+000.792544711088228E-02-.355764043826012E-01
+-.246135745872575E-030.304975551354759E-020.420239640621067E-02
+0.261040112096898E-020.218379335165771E-01-.341978135298371E-03
+-.172457015309441E-040.431356008346286E-070.219590871210806E-04
+0.442659543701007E+000.620442416979269E-090.258920030491552E-08
+0.168861954232395E-070.306596243662881E-030.323138773456644E-04
+-.960348097112365E-04-.218166081265305E-03-.838067704175618E+00
+-.589914917310024E-05-.416409183798882E-050.216992518203371E-04
+0.171734903009034E-02-.172262703654395E-03-.255366933603604E-04
+0.588840143324276E-030.318891160231964E+000.323051769754980E-03
+0.527812440603705E-030.184483412376782E-010.172904899351989E-02
+-.209517265408227E-010.158263229092178E-010.999483262596492E+00
+0.789622357502747E-090.215857232441392E-03-.225609164740967E-02
+0.149823816969244E-01-.499062773662014E-03-.236548692000563E-01
+0.363896924656256E+000.107483034761124E+00-.391270672966822E+00
+0.502192301820578E+000.405412180298002E+00-.678056199914652E-01
+-.960614884631456E-02-.502192338841198E+00-.169129058584629E+00
+0.276901186419182E-02-.169243266660495E-020.927155007066666E-02
+0.145412623807367E-030.264674993738985E-040.763553538678154E-03
+-.274044971065333E-03-.206553196141291E+000.192544222065392E-01
+0.710409976253818E+000.130366138371823E+00-.228795553119039E-01
+-.549279079167324E+000.144877887368590E-01-.339041201676814E+00
+-.242405803695270E-010.131562971065629E+00-.258376806382172E-05
+0.656278446202110E-03-.236769424458550E-030.141355471070267E-02
+0.105244043606728E-01-.660332708148621E-010.210625908749795E+00
+0.206019596480891E+000.666155188911710E-01-.131785375279779E+00
+0.629358709986443E-01-.579139160435087E+000.687848108070714E+00
+0.249885689824524E-020.272623878087522E+00-.189083942331165E-03
+0.144332387792429E-02-.964970276958600E-040.142997186912260E-02
+0.905906105727050E-02-.335003383098555E-03-.761567012733616E-02
+-.106277964677985E-010.104274987796965E+000.200717863329688E+00
+0.167157754026795E-030.800103307358312E-04-.239487412514881E-03
+0.288613812865254E-01-.280311412689388E-02-.102833078885913E-01
+-.246652115998060E-02-.958907097949439E+00-.199282635800055E-03
+-.133451307121677E-030.122389068203788E-020.121150111192682E-01
+-.553097739420755E-02-.738697421077239E-030.291299759234546E-01
+0.164877272058817E+000.176933543460421E-020.636048637279320E-08
+0.386389399803415E+000.837523572201287E-02-.392389715572957E+00
+0.177968659061121E+000.815465158463628E+000.145621272878538E-07
+0.199985867714712E-020.195851833059782E+00-.679442478235078E+00
+-.195851722041146E+000.679442478235217E+00-.357201584439584E-05
+0.104508299723225E-03-.430429753409975E-04-.161992044701792E-01
+0.665913332291113E-020.627943984135420E-010.158766162588137E+00
+-.580681991929644E-02-.725442566426469E+000.389377340629332E-03
+-.543997834523727E-02-.141418550919330E+000.651316976488143E+00
+0.103704333512308E-040.760162068660251E-04-.215295048130131E-04
+0.814462510058118E-04-.624103587955855E-030.512727498773690E-03
+-.655337427526513E-030.405937494843178E-020.105205018006757E-03
+-.430493797466982E-010.888089058101809E-010.296501401773398E+00
+0.820849426591335E-01-.704003772035664E-010.934683955500087E-02
+-.849557747276744E+000.299284353890857E-01-.307351278117629E-01
+0.408597009486543E+00-.477326696952231E-040.203748305369640E-03
+0.145051551564250E-030.213311096242107E-030.268327332614296E-02
+-.611874011102725E-04-.337262668853664E-010.924166207019878E-02
+0.621949633428841E+000.161210309761146E+000.165557847623496E-02
+0.133402559164063E-02-.540323718323402E-020.349527344820291E-01
+0.158972038010233E-01-.191896754436189E-01-.167295225035774E+00
+-.680665052123196E+00-.120576509551053E-01-.194282041054332E-07
+0.106218810781638E+000.201171754213052E+00-.152846247993426E-01
+0.126495382860975E-020.105728483537333E+000.171716077268080E+00
+0.707106781186532E+00-.707106781186564E+000.179199321427276E+00
+-.621672299758036E+000.539171163068275E+000.539171226818681E+00
+-.150859012548334E+00-.346779801559453E-020.696421358249040E+00
+0.147705689688260E+00-.685864311448068E+00-.549676070744279E-02
+0.256758327647866E-01-.750726041803840E-01-.317246623417171E-01
+0.668536882366567E+000.938655702018445E-01-.732745439276634E+00
+0.170870172221987E-010.583898068138768E-010.619301667958476E-01
+0.600138230146652E-010.677664207154702E+000.385190232285779E-01
+0.619119497642184E-07-.339323566159786E+00-.642657517212704E+00
+-.707106781186557E+000.707106781186543E+00-.245736663857741E-07
+-.487017594237811E+00-.613791894359277E+00-.613791883445462E+00
+-.966069207569462E-010.429174371243619E-010.113832073170950E-01
+-.678381985760620E+00-.504298591343777E-010.731630526211845E+00
+0.635386735290795E-010.125742853429528E-01-.716745907330516E+00
+-.583613871779776E-01-.110212329091957E-010.691772730437950E+00
+-.173175445674593E-020.383841621124299E-01-.110416382473008E-01
+0.256741288464596E-07-.453880443429687E+00-.554991234753238E+00
+-.318174114684711E-010.218019157967283E-010.404853975196401E+00
+0.564789870930429E+000.102068503593475E-020.285623013061450E-07
+0.492754819127494E+00-.203842046987441E-01-.499362468921001E+00
+0.587824361647918E+000.402336839078275E+000.918169007117501E-03
+0.700012494926306E-040.377013393139683E-020.158061746585615E-03
+-.923345838286210E-02-.465479735545722E-010.161317275038019E-01
+-.241725710157609E+000.498377849088563E+000.419438718550452E+00
+-.424078491233497E-010.210523737367770E+00-.498377789898282E+00
+-.469006127421801E+000.159157362192407E-010.971442723612329E-04
+0.370429343061676E-020.185402222885231E-030.140361401801025E-04
+0.454359178768059E-030.828774296805545E-04-.312157931261559E-01
+0.221644959830577E-010.467147250894710E+000.605956757459247E-01
+-.286080598138955E-01-.839766996204144E+000.216291917452147E-01
+-.219985152720672E-01-.281124096984636E-010.262424344259733E+00
+0.116417805123626E-040.267635114197098E-03-.672215219544455E-04
+-.813735173184751E-06-.398866592646904E-050.204362284917030E-04
+-.409081302153415E-050.158462400066490E-02-.628949975187434E-06
+-.111533654039953E-010.945756611763469E-010.309305220492670E+00
+0.491707927664971E-01-.110293923293886E+000.131202023612183E+00
+-.859274284355457E+000.187676429483093E-01-.364156143118406E-01
+0.351325562001735E+000.302673825658693E-050.179685592317993E-04
+0.140441788487869E-030.172457286836458E-040.142844320681775E-02
+0.256541507301178E-05-.135974180846842E-02-.135228523273871E-02
+0.124160279154033E-010.226781889854867E-01-.333271203637093E-01
+-.223082863493948E-070.394082533781187E+000.481872165055281E+00
+0.354794598302177E-01-.290941802402022E-01-.430896016118760E+00
+-.640798137718591E+000.185037448827823E-020.962525823705057E-02
+-.494931284124744E-020.815259078185888E-01-.366652507262709E-02
+0.308654674398379E-020.634740521082287E-010.386973240214517E-01
+0.920203922416232E-030.108629350498719E+00-.143184031301651E-01
+-.103310610340044E+000.268157434783449E+000.951507667518300E+00
+0.667459177312360E-020.957709173457184E-030.603352690579251E-03
+0.211234307770364E-01-.913404167729270E-04-.490567395888047E-02
+-.312206895692159E-01-.377826865054100E-02-.253367241251457E+00
+0.457238405489630E+000.431443403923000E+00-.580916488736549E-02
+0.327729924464284E+00-.457238455836453E+00-.470035771580013E+00
+0.286160495778913E-010.162251095002671E-020.295291942973934E-01
+-.510593888156111E-030.133176045858044E-030.288550864294607E-02
+0.326671120515064E-03-.119940694302481E-010.493611977238944E-01
+0.200835967502284E+000.375222748159743E-01-.763181518223535E-01
+-.607170442032405E+000.141924071866228E+00-.357268263812569E+00
+-.111584072433367E+000.648806072874006E+000.101939051155568E-03
+0.200605309319850E-02-.579965588212036E-030.258630208821450E-05
+0.168217775562306E-040.144330153595768E-030.232887229287876E-04
+0.675044602369196E-020.135607924906647E-05-.512253262244723E-03
+0.115533485002037E+000.143965680843651E+000.283648332042478E-01
+-.214797768570874E+000.391457522572237E+00-.810085558883003E+00
+0.188501006513896E+00-.442767460955475E-010.268178435111368E+00
+-.134851379999611E-04-.906524042141700E-040.706947400427236E-03
+-.102644794357619E-030.682221155305948E-02-.107940584113467E-04
+0.116235358609001E-030.166025085883410E-020.156776146399450E-02
+0.189682979375326E+00-.361695504819792E-02-.346080365688096E-02
+0.364161680538411E-010.123107662892829E+000.479565835504608E-02
+-.696332330928824E-01-.557688540661065E-01-.907343267826924E+00
+0.167427784956671E-020.249525019706888E-02-.429288818316120E-02
+0.715872231770214E-01-.122267448202732E-01-.590040106779471E-02
+0.156528369965063E+000.293967791211871E+000.175081783184165E-02
+0.771184964438607E-030.221373065832482E-01-.621763107712101E-02
+-.194592641016047E-010.714969543950864E-020.999514994545450E+00
+0.597860704577673E-030.269402465479075E-020.515023791883851E-02
+0.121292326773534E+00-.392528020472177E-020.118992126450666E-02
+0.157395445789034E-01-.394082381129670E-01-.733003478782031E+00
+0.337599559770288E+000.349142686729564E+00-.139463400368514E+00
+0.227145186540549E+00-.337599510291875E+00-.916649623724561E-01
+-.382942486348092E-020.925240648625014E-020.129158226356516E+00
+-.853888047471263E-020.140096596740043E-020.126071176579125E-01
+0.124720535117440E-020.303634316616343E-020.377300486494654E-01
+-.294767602556083E-010.567360891048372E-01-.465498595571141E-01
+-.420230611207414E+000.880228217424541E-01-.881922252676869E+00
+-.505991235370717E-010.165262464703570E+000.146288106742103E-02
+0.119437537909616E-01-.215022129020119E-020.937096633811036E-05
+0.160932871380580E-030.293463833607639E-020.286155735433417E-03
+0.429322788825650E-010.194015643940606E-040.838523134684283E-02
+0.161717170334286E+00-.203051876371348E-02-.246917146462747E-01
+-.230101940514772E+000.430203686138714E+00-.518676737549693E+00
+0.666606010923658E+00-.696498178573828E-010.109439876538281E+00
+-.849241779494426E-04-.807577859098053E-030.152659284083099E-01
+-.110538323322089E-020.532650783719748E-01-.106908413345438E-03
+0.521037564689083E-050.395491098356925E-040.916942038480008E-04
+0.267445501897429E+00-.146929108520377E-04-.414381105364060E-04
+0.883752978684304E-040.203583744031505E-020.552720532282201E-03
+-.353106948059371E-03-.268158909150081E-02-.877321689364557E+00
+0.129483762335851E-060.943389430578574E-07-.520801832045056E-07
+0.542619061617278E-03-.897761281568731E-03-.531645372045277E-03
+0.721153625769991E-020.398389736428573E+000.339439726157846E-01
+0.127008998561281E-020.558849142773434E-01-.700047885835571E-01
+-.972864026383786E-010.120387721105454E-030.990042699494239E+00
+0.104923379909149E-030.342517600102390E-01-.374697094457425E-03
+0.152312877545830E+00-.478817790311942E-030.872860861790242E-02
+0.999657868488493E-010.761029238391244E-01-.789918683778005E+00
+0.312925273563142E+000.179124695926111E+00-.106456692876792E+00
+0.254396861436815E+00-.312925287652934E+00-.969397708740387E-01
+-.205315405806358E-010.172023645205085E-030.152210304270155E+00
+-.330338109710651E-030.459563407489116E-020.143990070124588E-01
+0.222644377622351E-020.800563370830329E-030.104489137273485E-01
+-.602561369632559E-020.201418904467542E+00-.171281646426121E-01
+-.737384008805705E+000.102553883472058E-02-.588018158817250E-01
+-.181397584082343E+000.615273770267933E+000.216302320816593E-02
+0.949387888312259E-02-.138702989735942E-020.152795495644916E-04
+0.225359384945996E-030.225891473319397E-010.262583707734798E-03
+0.105723087052347E+00-.263236897139808E-050.655669812546020E-02
+0.110649523915327E+00-.129806789078049E-010.165077126998700E+00
+-.192799365643284E+000.282186057827035E-01-.807718334950653E+00
+0.102142581525374E+00-.192428566915823E+000.444747023264972E+00
+-.548606964381622E-04-.567233548395388E-030.635340804994158E-01
+-.626317548109333E-030.945045541747214E-010.789273378979099E-05
+-.288979693703195E-04-.182319839053481E-060.443515421301361E-04
+0.379919944695107E+00-.409896592504587E-07-.502833020468807E-07
+0.120494589988032E-060.308036843749235E-040.140521908879047E-03
+0.816277654525576E-05-.295259341239829E-03-.861438578734898E+00
+-.277471726737075E-070.876533127563630E-090.662575211226712E-07
+0.129028505756325E-03-.126377308405864E-03-.370449666662370E-04
+0.550391609228765E-030.337022199602707E+000.254458699117238E-01
+0.592584625065294E-040.514303172879869E-01-.512809050778411E-01
+-.660648944428663E-010.951604713061685E-040.994540487621631E+00
+0.100924642958156E-020.245217454649157E-010.184864876070133E-02
+0.884721194989155E-01-.324244362088066E-02-.510930961910458E-02
+0.303062330901710E+000.112878700333972E+00-.734565742176333E+00
+0.347055364976695E+000.162412105382276E+00-.955021556489723E-03
+0.848583542242443E-01-.347055368580516E+00-.250105923935497E+00
+-.111169531807995E-010.355726590647559E-020.103808638914381E+00
+-.419452883677787E-020.629179201941255E-020.186690274364628E-01
+0.284594451775678E-02-.187651556580809E+000.162329962057502E-01
+0.630915974421175E+000.187697560444679E+00-.210296554317769E-01
+-.720224407521837E+000.223339360929664E-02-.104660843730164E+00
+-.610626897833574E-020.229830867380655E-010.282458435792497E-02
+0.118792023957512E-01-.170210445347221E-020.280196207015836E-05
+-.279505004776387E-030.277071634101624E-01-.228909652598038E-03
+0.119275380848415E+000.132437572800541E-04-.187601509624841E+00
+0.141896128311551E+000.422365578665326E+000.128760036033913E+00
+-.204838957235195E+000.434078772092150E-01-.806694510076191E+00
+0.157787515993729E+000.591835161997387E-020.747010198847334E-02
+-.805107391111651E-050.638873231222047E-030.680896813628902E-01
+0.535850756882113E-030.102376722309374E+00-.412953070633613E-04
+-.276931733144833E-04-.197474903775786E-060.430124026148356E-04
+0.398149815745455E+00-.263184149901006E-07-.620746678004172E-09
+0.576570088020053E-070.103875521776964E-030.125421883145019E-03
+0.739661812433390E-05-.270405853635920E-03-.857409440491406E+00
+-.277976071921764E-07-.193794904133083E-070.662509931437069E-07
+0.348154383702452E-04-.110067008670377E-03-.330352097595245E-04
+0.493295101362000E-030.326075781848338E+000.261637800500639E-02
+0.593341606111460E-030.314880806247675E-01-.856875384808786E-02
+-.235422243388757E-010.258747526082075E-020.999168100504882E+00
+0.319275874645435E-030.547296896534694E-02-.116992826176418E-02
+0.338370513154134E-01-.142777025302056E-02-.406778354377311E-01
+0.504020403061023E+000.882092418045004E-01-.541496381623848E+00
+0.411585398853575E+000.256567719316976E+00-.245588779787715E-01
+0.823411976718524E-02-.411585419791624E+00-.183646426853795E+00
+-.192903059548171E-020.123785362328905E-030.558759547771277E-01
+-.250818717172438E-020.733379618122733E-030.955412980135956E-02
+0.892865110995397E-03-.540490019218027E-010.372660426311295E-01
+0.185501518436011E+000.158352234759734E+00-.216219089020215E-01
+-.753414549089406E+000.241909096941899E-01-.408978751559392E+00
+-.892679382602970E-010.438255593031304E+000.202475991596905E-02
+0.108697778577146E-01-.151558617647810E-020.158189155579921E-04
+-.273419002779876E-030.226951112635693E-02-.192207014371830E-03
+0.576369410134945E-010.124942742956545E-04-.131329073179166E+00
+0.305611774621079E+000.254739263535127E+000.552445048191232E-01
+-.164344958886550E+000.206564820276684E+00-.662834178384440E+00
+0.544315066876567E+00-.396148205477567E-020.698461846680987E-01
+-.954984862955493E-040.123919551849472E-020.329652662042095E-01
+0.103982753519749E-020.824191920632282E-01-.137575992812755E-03
+-.118262824998473E-040.123526003258420E-040.707450826197362E-04
+0.199578367733588E+000.363708976451750E-070.321899201930129E-07
+-.250041569150016E-080.225985817010339E-030.399465008189380E-03
+-.383274536444598E-04-.146616509322618E-02-.883662801063188E+00
+-.664010684521299E-05-.735402308780296E-050.216923907460852E-04
+0.824256599274688E-03-.523153796336422E-03-.266383346326575E-03
+0.361288604263049E-020.423428960439017E+000.173851036205211E-02
+0.222870073788660E-020.147323973899202E+00-.145602763087638E-02
+-.153553351053440E+000.124330762289657E+000.969144432517211E+00
+-.670088769709058E-080.279928963613627E-02-.535336505050603E-03
+0.571786431162824E-020.501111613013933E-04-.375294159509387E-01
+0.286470981196203E+000.189845534980769E+00-.635875367893217E+00
+0.398691041336605E+000.186217324361401E+00-.114177856312955E+00
+0.244995441534964E+00-.398691042678259E+000.213291086621552E+00
+-.702759278074976E-01-.285865195571977E-030.607323396528475E-02
+0.177522666938543E-030.232624905150071E-040.871528520081471E-03
+0.104242811764133E-03-.117190708001031E+000.172804418631202E-01
+0.531354146114651E+000.147827925084915E+00-.173568415846287E-01
+-.754028144632404E+000.362393328445694E-02-.504753734217587E-01
+-.606045340700605E-010.326623017330199E+000.140948202581589E-03
+0.702783387652478E-03-.107036079108171E-030.590209447893790E-07
+-.908741189140752E-06-.537857176299051E-04-.821800159702671E-06
+0.742259477778545E-020.175891555799017E-06-.127575373639961E+00
+0.173884621836369E+000.488642885545859E+000.101063732588886E+00
+-.130420282060893E+000.415306618536464E-01-.760148095701464E+00
+0.976580937993439E-01-.254359609712527E-010.312471985413515E+00
+-.574123283391161E-060.433910605356674E-050.205862756366894E-02
+0.430410468022567E-050.783406586305063E-02-.778456164311075E-06
+-.423214058359036E-030.919140921167062E-030.661874120526856E-02
+0.117109755045484E+000.562189141098998E-030.519894877621451E-03
+-.109887397286355E-020.184158676355906E-010.128559805126469E-01
+-.985063481572301E-02-.793770939849137E-01-.885499725592162E+00
+-.183772385564369E-02-.887523056274150E-030.105538790154888E-01
+0.403343983135072E-01-.178576536206106E-01-.109963830700987E-01
+0.165007678884550E+000.407206303906568E+000.306348529486999E-02
+0.239930764984804E-070.601420059751685E+00-.141146313644592E-02
+-.605225595551520E+000.230075880325225E+000.468016488374206E+00
+0.318887906876394E-020.194968143237539E+00-.679696569745449E+00
+-.194968123740749E+000.679696569745495E+000.433921650703326E-05
+0.686239809673315E-040.134914310172025E-04-.158714965443381E-01
+0.332719906827371E-020.784843725910340E-010.139678381750007E+00
+-.317681035662774E-02-.734092568722168E+000.988288218555025E-04
+-.128106164851903E-02-.122669376425973E+000.648163369247435E+00
+0.894069909141543E-050.405720798599522E-04-.531085987799746E-05
+-.171919591025308E-050.803049222354254E-050.130444794348500E-04
+0.861156968395583E-050.110231449582210E-02-.248231645536447E-05
+-.375937616255964E-010.355819759338922E-010.229692292043488E+00
+0.108667338908260E+00-.264758743157882E-010.393712049859257E-02
+-.813756878731386E+000.512266270133843E-02-.668002364102831E-01
+0.515117604605447E+000.492260750079268E-05-.272219895394282E-04
+0.208694217366870E-03-.283952525261720E-040.917376031998474E-03
+0.581122815426736E-05-.455060985419248E-02-.919535789492620E-03
+0.349190607723191E-010.763767596648188E-010.265591381650204E-02
+0.521301039994967E-02-.401859423332637E-020.732525315960548E-01
+0.535241281320955E-01-.115977550287200E-01-.375723852306493E+00
+-.771464840486708E+00-.315965957352218E-01-.143459287868964E-07
+0.227393868069098E+000.322787116054316E+00-.215711586956064E-01
+0.108257024347966E-020.242983985741911E+000.178264096966029E+00
+0.707106766183749E+00-.707106796189347E+000.177843854234752E+00
+-.619997921177283E+000.540358273709987E+000.540358286028759E+00
+-.131869994779899E+00-.196304501085975E-020.698246561864295E+00
+0.130169226789683E+00-.691457997403106E+00-.128013211249068E-01
+0.546427753459058E-01-.934052075111080E-01-.664941001276631E-01
+0.678859335665877E+000.119191372805422E+00-.713195424947486E+00
+-.404938617540185E-010.181062659918079E-010.232791185547601E-01
+0.321138225103363E+000.619279730616487E+000.570137931646475E-01
+0.258785337293530E-07-.410315942496114E+00-.582446223508185E+00
+-.707106781186560E+000.707106781186535E+00-.721341536320415E-08
+-.428989822532113E+00-.636689094459996E+00-.636689104237412E+00
+-.722614261203267E-010.282343743720400E-010.938364903717614E-02
+-.678889534403801E+00-.334569836275536E-010.732874066643181E+00
+0.490057224614373E-010.139296369817684E-01-.713288124764123E+00
+-.453244904721617E-01-.128587843097479E-010.697424647376202E+00
+-.191282821385874E-020.400397255563485E-01-.392330176179403E-02
+0.585593361868326E-08-.614848650012675E+00-.364459981119449E+00
+-.378769195029760E-010.669732104564358E-020.591610797545009E+00
+0.368820602608620E+000.123195855168806E-020.621112322271792E+00
+-.142906888883486E-01-.629115104083898E+000.451903369348001E+00
+0.118349072475903E+00-.110429569969675E-070.218385917379393E-02
+0.474020131646410E-040.341856293650974E-020.106540652945231E-03
+-.645360819374788E-02-.383127542619521E-010.125973858299685E-01
+-.215314667589504E+000.493886045857771E+000.440903158857425E+00
+-.363141787614656E-010.220456050264233E+00-.493886011421948E+00
+-.468226459066813E+000.231829628021786E-01-.362744711248249E-04
+0.492042069801937E-020.330696552912518E-040.202644371713308E-04
+0.496659907643311E-030.736840121878654E-04-.198191879706170E-01
+0.183303009260840E-010.449742417866469E+000.410829172385245E-01
+-.221035301005096E-01-.845083570129830E+000.229988122217302E-01
+-.633862858502668E-02-.190597419343020E-010.282360542508567E+00
+-.915253709884024E-050.467860617318541E-03-.936082013898601E-06
+-.471900999515919E-050.360154552581113E-04-.445382936066878E-05
+0.161761440053278E-02-.699826636234017E-06-.100518297978727E-01
+0.813344640279481E-010.322240982462986E+000.365348966340719E-01
+-.898377311847809E-010.138505009350467E+00-.847528994615232E+00
+0.484822858208514E-02-.286713955100532E-010.376428436355344E+00
+0.305214288653784E-050.181194673226224E-040.148033919232344E-03
+0.173905350410810E-040.178925671284225E-020.258695791232144E-05
+-.135493060354600E-02-.135066372724518E-020.135603142952304E-01
+0.185868253362159E-01-.352836497074884E-01-.511901396462545E-08
+0.541814512743478E+000.321167993263074E+000.399514083113646E-01
+-.879433456844653E-02-.619330290540681E+00-.454991628886887E+00
+-.105596987591205E-020.705649764873231E-020.285295653675024E-01
+0.585189397982255E-01-.120981119976275E-02-.164054205324875E-07
+0.605748606344640E-010.359064075394220E-010.286188393180971E-02
+0.302723797596224E+00-.393634811399195E-01-.303819324099225E+00
+0.770938930261185E+000.468969096158830E+000.138220192540853E-01
+0.495490516333219E-020.992452014486792E-030.282067170458185E-01
+-.526320537210620E-03-.626140892699711E-02-.420916642531304E-01
+-.372664848981284E-02-.271564230509885E+000.464750601983194E+00
+0.441452754120364E+00-.154463635706786E-010.286305584915958E+00
+-.464750603183541E+00-.459710281950070E+000.276903753399330E-01
+0.164107973795033E-020.494331015087113E-01-.288169856338215E-02
+0.181384528842341E-030.371596182844276E-020.528440319457944E-03
+-.941885934972875E-020.370997823273176E-010.231848896187434E+00
+0.366243340421597E-01-.532260858845199E-01-.799048803738820E+00
+0.134190051866849E+00-.785968234612202E-01-.524280946553506E-01
+0.524565851490170E+00-.969902988985165E-040.332166998097683E-02
+0.178393887634442E-050.113533332194821E-040.181974060923368E-03
+0.139673311333751E-040.748922993006937E-020.105594089085603E-05
+-.125119713273718E-020.902096536931047E-010.147246951099762E+00
+0.149737886688360E-01-.133913301824410E+000.418936033466391E+00
+-.811341515728799E+000.369333524141069E-01-.333282371384749E-01
+0.340069402844183E+00-.681313090765745E-05-.458006071986632E-04
+0.684063550008274E-03-.518596031454553E-040.780440694537957E-02
+-.545350364764260E-05-.188819474609356E-020.169410258829227E-02
+0.212175769390214E-010.173958315025131E+00-.797638722213490E-02
+-.293947799718114E-020.113587530023477E+000.109694252187022E+00
+0.142919996767946E-01-.337701654742926E-01-.209384087697011E+00
+-.845567642095652E+000.201133506974394E-020.616308901856066E-02
+-.971356627744613E-020.292603070320401E-01-.560758539688166E-02
+-.946440555507977E-070.280843258259704E+000.322810651789196E+00
+0.100624941112454E-010.259672364681204E-020.817713789100689E-01
+-.378487363357314E-01-.713365278141413E-010.523743917330373E-01
+0.991717031383619E+000.197738512819566E-020.208413168788660E-01
+0.650446596813922E-020.135072660963680E+00-.621746918612862E-02
+-.966281355133967E-03-.918875977233796E-02-.289501236543810E-01
+-.685382822420014E+000.361708105505221E+000.357137550448023E+00
+-.266613412827571E-010.782040935170842E-01-.361708121793891E+00
+-.239799476892995E+00-.985520373764162E-030.124217593525461E-01
+0.238575082904427E+00-.196146477726306E-010.488773826113334E-02
+0.349527507620209E-010.379484360472854E-02-.190335388122274E-02
+0.447950884527639E-010.432841152042769E-010.388755048096654E-01
+-.538304662046303E-01-.789807137487042E+000.235705022604824E+00
+-.513957403747273E+00-.370616288007413E-010.209032049105300E+00
+-.288368196965015E-020.432040578288786E-010.127521601121691E-04
+0.168677884713730E-030.617877501892261E-020.276772111811215E-03
+0.600611597756269E-010.241666265834041E-040.303528049568012E-02
+0.942997003617236E-010.379042102331497E-01-.330454305947829E-01
+-.128113287104398E+000.555973181880454E+00-.775895571131535E+00
+0.198144727494078E+00-.310709714778411E-010.100592357864689E+00
+-.672609772397682E-04-.639611891632221E-030.104051260731826E-01
+-.875477524731695E-030.832817668969010E-01-.846727903271358E-04
+-.207408821420728E-030.486560668082637E-050.979491912068454E-03
+0.277397787870578E+00-.138842323987768E-04-.406202819318755E-04
+0.110309257668976E-030.939959189060195E-030.569551259786794E-03
+-.294882488065178E-03-.498973942338665E-02-.880817149857464E+00
+0.187425605060980E-060.501129676429758E-06-.300671605978139E-06
+0.241872213478973E-03-.255178043170943E-03-.120288168640803E-07
+0.127780982294317E-010.383433180051282E+000.725838932670944E-01
+0.252083195843648E-020.117006173486548E+00-.223393012118206E+00
+-.208342404872242E+000.234209847200587E-020.930605964661460E+00
+0.173828081375503E-030.147277990800831E+000.181434246890757E-03
+0.170536287384264E+00-.309107241232440E-030.259166691097343E-02
+0.267966291631130E-010.188199924025729E-01-.669691184768908E+00
+0.369388402445399E+000.298437454764436E+00-.279860191285971E-01
+0.602660083184696E-01-.369388385141567E+00-.248022967896360E+00
+-.464439367770653E-020.500024221342130E-030.305677755406208E+00
+-.444449132690379E-030.124526942124952E-010.412389063954632E-01
+0.477962868100348E-020.121324350674267E-030.172316413671693E-01
+0.206626091962812E-020.826042674682101E-01-.291949989074805E-01
+-.807935585115537E+000.719562126724321E-02-.844418266345479E-01
+-.865202850613294E-010.565496269575906E+00-.854734894082898E-02
+0.534551683245710E-010.248113583813972E-040.284156083985196E-03
+0.468661828942036E-010.323108007624496E-030.188307985273998E+00
+-.544725160151694E-050.322850342593503E-020.113497207464359E+00
+0.155469184155135E-01-.196939954403634E+00-.194657514389626E+00
+0.969404504569904E-01-.859164413239739E+000.872264017923245E-01
+-.388952182996452E-010.189593190383465E+00-.795671796675343E-04
+-.822688558144623E-030.606453458049934E-01-.908377415704067E-03
+0.276089968873254E+000.114472964265622E-04-.488773078956015E-04
+-.396188336235372E-050.999659673670207E-040.310777183676489E+00
+-.571298251501996E-07-.143066131598022E-060.317328824163547E-06
+0.183060084594285E-040.886359900474387E-040.190300654410858E-04
+-.393117861683414E-03-.877646247157486E+00-.373857766313145E-07
+0.404625131158292E-080.185231894502927E-060.706529209549547E-04
+-.204895952319792E-04-.194471437864013E-080.102610554232600E-02
+0.364901867847999E+000.517095658659024E-010.980626985835659E-04
+0.109751994430230E+00-.156570782738845E+00-.139532788543006E+00
+0.213245059817445E-020.964892906217063E+000.251687159024994E-02
+0.101329163413399E+000.277117162597201E-020.118636768143132E+00
+-.352176514804628E-02-.151217924652192E-020.119996119063301E+00
+0.301941926097845E-01-.609479618054216E+000.407610676820285E+00
+0.303999762041851E+000.761324043901745E-020.710147150771023E-02
+-.407610668100491E+00-.356147653325360E+00-.939570530183214E-03
+0.763317786414497E-020.217680817050759E+00-.493762301165418E-02
+0.146000447120399E-010.479479620035907E-010.566504813998350E-02
+-.844499638835638E-010.256283929519846E-010.544801062552938E+00
+0.737368671651306E-01-.326618131262042E-01-.812123287123367E+00
+0.154297518539648E-01-.144246520083369E+00-.462193369264405E-02
+0.445557502386635E-01-.935867171427351E-020.605927338092271E-01
+-.336190661502138E-050.199412672691505E-030.450587704881531E-01
+0.172855825862255E-030.183127683802625E+00-.139506417990564E-04
+-.371032128812401E-010.136441962315432E+000.173292355829121E+00
+-.191031363946136E+00-.181314220103855E+000.140001406724419E+00
+-.858012964858887E+000.124946578064121E+000.319424061996110E-02
+0.399157810449760E-010.690865516433771E-05-.548226189109581E-03
+0.563223050755544E-01-.459820360442181E-030.262427675882098E+00
+0.354360602071234E-04-.450936989333873E-04-.377667649549115E-05
+0.945332035517973E-040.319025562226798E+00-.368743805844936E-07
+-.308404229414676E-080.169494334962014E-060.602269526486935E-04
+0.812755972306230E-040.174914793561078E-04-.370843264734492E-03
+-.875757998566261E+00-.335945798006633E-07-.675440572999075E-07
+0.170899586778266E-060.198556153617846E-04-.186285422087375E-04
+-.200657120064962E-080.932994787873637E-030.362311452102434E+00
+0.191936222893093E-010.258518345891082E-020.109774305627631E+00
+-.678956495743090E-01-.847535774245336E-010.232392489249417E-01
+0.986521218946578E+000.106117819809660E-020.449024629045529E-01
+0.124017224428534E-030.574386556615052E-01-.199965617249553E-02
+-.247780638305697E-010.321522084088771E+000.379770340137811E-01
+-.428306904638573E+000.454704028913566E+000.379204249645586E+00
+-.148852886838934E-02-.367461131823450E-01-.454704049118167E+00
+-.369132510355556E+000.664495198760334E-020.334719861886340E-02
+0.113293303776695E+00-.281077382106382E-020.819596959668489E-02
+0.379111551975742E-010.321568225388857E-02-.459084942734722E-01
+0.541417868140426E-010.284992838760775E+000.576708222071649E-01
+-.319166382924372E-01-.850884680215138E+000.981709154419468E-01
+-.314558014739248E+00-.238292299646862E-010.267247900942539E+00
+-.476409274846684E-020.572696388851242E-01-.253434325420875E-05
+0.314019523401166E-040.175619612277255E-010.268781992242801E-04
+0.102137732079325E+00-.352118389928833E-05-.431151846300100E-01
+0.194195952369355E+000.171383771689655E+00-.727889707064056E-01
+-.105037796330727E+000.373070405104482E+00-.832876291198495E+00
+0.185201328324870E+00-.210719287242549E-020.883704590081362E-01
+0.759148616038630E-05-.985068757445580E-040.241611227450762E-01
+-.826584349992673E-040.168592324349136E+000.109363536546192E-04
+-.140286296725473E-03-.128215836815657E-040.494558244488533E-03
+0.280847654126040E+000.321515679088376E-070.120434247248497E-06
+-.156044392922250E-070.887469968549317E-040.309083310171081E-03
+-.137384777211738E-04-.226540409047954E-02-.880128001169638E+00
+-.382651653993193E-05-.108131101348007E-040.233963836825757E-04
+0.270492489874145E-03-.122252666299678E-030.612356227618477E-02
+0.382695975727179E+000.732428021226023E-020.547713996664140E-02
+0.396049984501415E+00-.481141822977436E-01-.405642629586525E+00
+0.635749564952352E+000.521347508869209E+000.148024935841334E-01
+-.301295407799686E-030.723544959371664E-020.207642865415858E-03
+-.348694792387385E-010.263550631173699E+000.889595566279424E-01
+-.418984214602752E+000.500266357695299E+000.408119429597393E+00
+-.363233885356471E-010.804413318688337E-01-.500266373002098E+00
+-.265517664767941E+00-.164627094124487E-01-.292271209593851E-03
+0.124794323490641E-010.336449804275239E-030.498076969884902E-03
+0.271691736959086E-020.231277279264080E-03-.567655532785492E-01
+0.271848648436447E-010.503661384603298E+000.655366565640398E-01
+-.243230693129746E-01-.789632788520066E+000.183179034548534E-01
+-.311651765431028E-01-.255025625534976E-010.334633855693646E+00
+-.190063900887600E-030.353945762482508E-02-.977710956462515E-05
+0.746309618330485E-040.131595722141013E-020.739405964402529E-04
+0.119008502370693E-01-.173222930707446E-04-.555999356456072E-01
+0.142824249504943E+000.430859451845448E+000.458944077528358E-01
+-.115195465102762E+000.132957232431433E+00-.828429389734122E+00
+0.298427846700954E-01-.960653777292320E-020.264770324901898E+00
+0.294775292625976E-04-.222797414239782E-030.199648632405749E-02
+-.221026344617562E-030.169463786498493E-010.399691019732668E-04
+-.412776023938866E-020.252572320635840E-030.233873710864906E-01
+0.259719891251546E+000.415140740182975E-030.113529818985204E-02
+-.174804710873652E-020.578214115132270E-020.122117368574587E-01
+-.751426870967600E-02-.124904020763724E+00-.845228958797211E+00
+-.212620236485092E-02-.168622369330729E-020.211514253839871E-01
+0.215369670240951E-01-.534820692965796E-02-.144346899834284E-06
+0.267863054400291E+000.359203496211911E+000.331086374854943E-02
+-.845474757581534E-080.632504086378518E+00-.235118751978227E-01
+-.638143102372112E+000.422974828693201E+000.114871343439142E+00
+0.183672600439000E-070.671269422302639E-020.141774326820363E+00
+-.692748182182047E+00-.141774300990027E+000.692748182182314E+00
+0.481957392698951E-040.270388157735588E-030.258091963527867E-04
+-.154613472923139E-010.788913409868525E-020.166281063480095E+00
+0.631548573348084E-01-.719098717124253E-02-.783605853008467E+00
+0.133352995840027E-02-.155351765852490E-02-.469231283040379E-01
+0.593097595003567E+00-.145124296629042E-040.363129440721168E-03
+-.755130544285567E-050.322329789563514E-040.162865732101339E-03
+0.337458039242355E-040.188676716333058E-02-.967983875236429E-05
+-.280294852982924E-010.560451599699661E-010.283514625914695E+00
+0.623656558031793E-01-.513514652564355E-010.206258387156799E-01
+-.826238746166489E+000.239687498883366E-02-.329344008682935E-01
+0.474308373685584E+000.161872833336829E-04-.895145426991688E-04
+0.315360387518861E-03-.933730942829438E-040.280130679481694E-02
+0.191092696904015E-04-.835451218901018E-02-.224824288339140E-02
+0.516928270523294E-010.109704348827131E+000.108269387812490E-02
+0.107731305293616E-010.427800356853278E-020.368562069578784E-01
+0.485484135495873E-01-.102507986038446E-01-.552216485696899E+00
+-.594260620325315E+00-.316691755671850E-01-.132825140699132E-07
+0.364597166754599E+000.174700089420081E+00-.717406486290489E-02
+0.359222945921040E+000.172123612118179E+000.707106781186543E+00
+-.707106781186557E+000.101992154740172E+00-.498361637024495E+00
+0.608782920354223E+000.608782912866900E+00-.563724703278934E-01
+-.438434828311532E-020.716766147603742E+000.537258122841962E-01
+-.692937766919190E+00-.627170199294769E-020.346820800292373E-01
+-.597760582014308E-01-.390085053120361E-010.691950856253261E+00
+0.704045963162265E-01-.714079956171652E+00-.518737623309080E-01
+0.761022812732684E-020.159550167655143E-010.604843345813386E+00
+0.321896613542082E+000.567209593954754E-010.237137403293247E-07
+-.653010405795925E+00-.312895948443595E+000.707106728865803E+00
+-.707106833507286E+000.115866760025710E+000.687858841009181E+00
+0.115866760025706E+00-.115866777390875E+00-.687858841015537E+00
+-.115866765820121E+000.199959993541363E-01-.999800060016923E+00
+0.199959993541364E-01-.999800060016920E+000.591447559760272E+00
+-.774079952713837E+000.225809678402336E+000.707106745792210E+00
+-.707106816580882E+000.102933637605961E+000.691960495020240E+00
+0.102933654691574E+00-.102933654674223E+00-.691960495026485E+00
+-.102933660046180E+000.199959993541364E-01-.999800060016920E+00
+0.199960012762684E-01-.999800059978472E+00-.127452310568665E-01
+-.132034018886979E-060.193643357350621E+000.641757529728320E+00
+0.127452468624267E-010.175461378776522E-06-.638150377049360E+00
+-.378270719499168E+000.707106745792551E+00-.707106816580538E+00
+0.735498311658631E-010.699414631300659E+000.735498231523910E-01
+-.735498255093039E-01-.699414659275387E+00-.735498261761447E-01
+0.199960012762683E-01-.999800059978476E+000.199960003152027E-01
+-.999800059997703E+00-.793687288626499E-02-.801466233668395E-07
+0.109332282606681E+000.788133320380449E+000.793689353370808E-02
+0.133933796941923E-06-.397501359005163E+00-.456901524012506E+00
+0.707106745794469E+00-.707106816578630E+000.677577761723365E-01
+0.700583874311953E+000.677577840360550E-01-.677577956934772E-01
+-.700583874313761E+00-.677577869993615E-010.199960022373348E-01
+-.999800059959256E+000.199960012762687E-01-.999800059978472E+00
+-.319883555175909E-03-.118986023366735E-070.281838347380330E-02
+0.876754646848632E+000.319884871920509E-030.150806759592284E-07
+-.160183057271965E-01-.480662620945026E+000.707106745795564E+00
+-.707106816577532E+00-.890947474946424E-020.706994528505650E+00
+-.890947463346475E-020.890947671897219E-02-.706994499014701E+00
+0.890947653156449E-020.199960022373347E-01-.999800059959259E+00
+0.199960012762683E-01-.999800059978472E+00-.260858972545533E-04
+-.191844269302226E-080.122620469735823E-030.885535385661900E+00
+0.260860624298151E-040.247588712962808E-08-.130637283259506E-02
+-.464570078388519E+000.707106732355502E+00-.707106830017597E+00
+-.541723283909854E-010.702944338249317E+00-.541723317379545E-01
+0.541723443718538E-01-.702944299891371E+000.541723452463965E-01
+0.199960003152022E-01-.999800059997696E+000.199959993541364E-01
+-.999800060016920E+00-.239127687416373E-04-.151460465105004E-08
+0.115672896862657E-030.885262435736919E+000.239129677845735E-04
+0.257585781747041E-08-.119766065837865E-02-.465090282588456E+00
+0.707106725206366E+00-.707106837166720E+00-.919589760709782E-01
+0.695044669841039E+00-.919589734520017E-010.919589804407779E-01
+-.695044669843202E+000.919589782786625E-010.199960022373347E-01
+-.999800059959252E+000.199960022373348E-01-.999800059959256E+00
+-.151924628664646E-03-.510312341108572E-080.114456686280757E-02
+0.879637007792521E+000.151925412556267E-03-.760985148748386E-02
+-.475583292900870E+000.707106745794441E+00-.707106816578655E+00
+-.123882094148375E+000.685059468109205E+00-.123882083877434E+00
+0.123882100598866E+00-.685059436248697E+000.123882101836301E+00
+0.199960012762683E-01-.999800059978476E+000.199960012762682E-01
+-.999800059978480E+00-.678767592186647E-02-.117643398718500E-06
+0.687172030420897E-010.819622591650248E+000.678770879243693E-02
+0.183330445795151E-06-.339959963271509E+00-.455885765406123E+00
+0.707106745794739E+00-.707106816578357E+00-.139007785337744E+00
+0.679230170872582E+00-.139007785337747E+000.139007815139815E+00
+-.679230226703378E+000.139007815139786E+000.199960003152020E-01
+-.999800059997686E+000.199960003152021E-01-.999800059997696E+00
+-.141044682813303E-01-.262174622790849E-060.157938172071501E+00
+0.601128701028703E+000.141045167897438E-01-.706247527620910E+00
+-.338402681597202E+000.707106745794821E+00-.707106816578275E+00
+-.267856550417132E+000.654410317897785E+000.267856566195439E+00
+-.654410317899671E+000.199960012762682E-01-.999800059978476E+00
+0.199960012762681E-01-.999800059978476E+000.593949158047806E+00
+0.223352700169129E+00-.772876425427416E+00
+0.202394105899437E-120.274823389968666E-14-.554892366794151E-15
+-.819274160312709E-15-.668810055472496E-160.212241558104048E-12
+0.526299506130443E-14-.489385623532121E-15-.677032376568762E-15
+-.451623379287585E-150.374666605049989E-120.222425138831361E-13
+-.181544572943050E-14-.147988975572570E-14-.186104552378963E-14
+0.000000000000000E+000.000000000000000E+000.435189840959789E-14
+-.382967060044728E-130.505291153767714E-160.000000000000000E+00
+0.000000000000000E+000.435189840959789E-14-.226298717299133E-13
+0.121146683837838E-140.000000000000000E+000.000000000000000E+00
+0.435189840959789E-140.130556952287927E-130.445674391403092E-14
+0.000000000000000E+000.000000000000000E+000.435189840959789E-14
+-.783341737833116E-140.234227328474855E-140.108206124046458E-12
+-.215883859283577E-14-.403946870939676E-15-.686616926286516E-15
+-.862012111631899E-150.303533244284811E-130.138010344467711E-14
+-.404018824222715E-15-.286385196638407E-15-.390704401891710E-15
+0.273411624622911E-13-.765610157434584E-15-.268141684612874E-15
+-.132194093079351E-15-.601621965854667E-150.000000000000000E+00
+0.384762796083885E-13-.193731562836694E-15-.413645768293773E-14
+-.114278485295537E-050.807508878162117E-13-.380818779406990E-13
+0.223648500602427E-14-.909889585701067E-140.331562834926780E-05
+0.285043306029678E-12-.207058352673703E-13-.636970533077854E-14
+0.524252010357629E-140.269297853105648E-050.171627453082871E-14
+0.717975632069722E-14-.527448437137286E-140.464287948246645E-13
+0.771098257180396E-080.234809096656618E-14-.359395808792810E-14
+0.665552106043155E-140.757280959611803E-140.143718570281886E-11
+0.222572869532307E-14-.139716009607018E-130.780446860517369E-15
+0.362157028369366E-130.536540168957500E-100.307875265929601E-14
+-.705504318733115E-140.337799402074240E-140.500401555294291E-13
+0.426280731858752E-080.913287848754867E-130.103614716445489E-13
+-.522859350784418E-140.499148370186354E-140.478624017132153E-05
+0.121456366975691E-130.101624213254850E-140.216701101200512E-14
+-.345271197980365E-140.110880789697911E-050.301216196618491E-14
+-.540428228214019E-14-.222140164388316E-140.434955330079947E-15
+-.160601989555048E-050.157559231112031E-130.420001628718037E-12
+0.150572252957974E-13-.606223423353496E-13-.281774303279372E-03
+-.161762764929301E-12-.342092744508673E-120.108249355143259E-12
+-.615731698119600E-120.114252946436998E-030.846620542762694E-13
+-.152621157809399E-12-.109809342763844E-12-.217943874621490E-12
+0.797723962847499E-050.180888084740301E-130.122644376958020E-12
+0.888551767886481E-130.204169584974151E-120.639904466172473E-07
+0.102694065070745E-130.185542222646612E-13-.980356568716921E-14
+0.213689007015383E-130.148657983204524E-100.938171534597355E-14
+0.386707150480676E-130.185686924559307E-130.629279530815653E-13
+0.178538186267594E-090.303591605636916E-130.247507485473141E-12
+0.601948765785340E-130.259328208787118E-130.825012119453497E-07
+0.165489865824259E-130.126909717971805E-12-.809972621173125E-15
+0.260221066762617E-120.440673145488575E-04-.577391192374903E-13
+-.141685739715840E-13-.898379506962308E-14-.587589075806416E-13
+0.854336895419281E-040.695114309023588E-14-.183400756501765E-12
+-.351268034790456E-13-.212800439402798E-13-.786196346629773E-03
+0.231704757800883E-140.428729786047385E-12-.921006657969298E-13
+-.722393149668797E-13-.500822403978593E-04-.114151854183011E-12
+-.219912598762636E-120.126673756206235E-12-.382620831589828E-12
+0.297225488674877E-040.234508048410960E-12-.218856288176897E-12
+-.406403766139363E-12-.198463290029409E-120.217128723459237E-04
+0.756454004598282E-130.728205498076627E-130.218097882502026E-12
+0.166565512837028E-120.194699855455599E-060.325953303999443E-13
+0.141059018716547E-120.163148755045124E-140.168350227066847E-13
+0.364655761535216E-100.318693236147873E-130.629300865896806E-12
+0.832072227609808E-130.104391586556431E-120.219566882979375E-08
+0.966294840559207E-130.105322792611619E-120.154817975688185E-11
+-.129150687222302E-120.159284559755380E-060.255359618793750E-12
+-.669568573719880E-12-.140319512989452E-11-.148808193119654E-11
+0.174243935653877E-040.235964900478605E-13-.158921691210278E-14
+0.427286687073893E-13-.383875253964354E-130.209458122839295E-04
+0.695114255617233E-15-.778936609739444E-12-.555263495967613E-13
+0.178057460686566E-12-.931728111057866E-040.162193337546363E-14
+0.192082021351027E-12-.338830504552759E-13-.259959064560709E-13
+-.102908168635522E-040.119780901141838E-12-.705626182733349E-13
+0.477777856036666E-13-.122188353215107E-120.628204494195552E-05
+0.360502341905674E-12-.158458353411481E-12-.107460877005768E-12
+-.543852067739607E-130.999832651169842E-050.223928511470390E-12
+0.219031617335137E-130.683930191759728E-130.993011534250549E-13
+0.421065904949251E-070.795593192526987E-130.200393330802057E-14
+-.544643938855520E-14-.129085088280889E-130.307220157212393E-10
+0.769647462983260E-13-.708645844756138E-130.190209280278036E-13
+0.140249871726619E-15-.129729632851381E-080.200188825456105E-12
+0.416378030603160E-130.430348021674659E-13-.704010864682257E-14
+0.216263094106671E-080.146886604283455E-120.841533706518667E-13
+-.661595658689806E-13-.941058011231196E-140.391430381205002E-05
+-.756476598943381E-13-.606765392737815E-140.229242559524678E-13
+-.319044605764485E-130.548350629631716E-050.695114303103693E-15
+-.146061553715816E-12-.276900163448222E-130.327090370418689E-14
+-.241110654148327E-040.497470124823223E-120.178190122707317E-13
+-.335610877544072E-150.269804823123547E-15-.754610311602206E-14
+0.504652984537124E-120.132811426043152E-130.276385428565550E-15
+0.171095749713042E-15-.565706170888985E-090.495616483348267E-12
+0.270460386923519E-140.213967823565366E-160.114116167083434E-15
+-.307378214952379E-090.148059343055948E-120.704938251717327E-15
+0.796554343080852E-160.134418545397471E-15-.214702302708836E-10
+0.264143427774681E-13-.393383383587686E-15-.224429000369457E-15
+-.166387009518229E-15-.956414562064006E-130.275728664863706E-13
+-.252625379126553E-140.290067003721533E-16-.372943254642494E-16
+-.292904363272568E-110.108669533011201E-12-.373828633891879E-14
+-.135252686834076E-150.811516121004296E-16-.248539101337132E-10
+0.179802895868020E-12-.101106161740470E-13-.776828549128017E-16
+-.185243730945928E-15-.969762553748463E-090.132071717589703E-12
+-.156903353468787E-14-.269565415329845E-15-.275066750336520E-16
+-.168359295253083E-080.123035231649352E-12-.239352379930970E-14
+-.225554746116851E-150.935226996093998E-16-.392547043891108E-14
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/external/pores_1.mtx
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/external/pores_1.mtx	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/external/pores_1.mtx	(revision 2477)
@@ -0,0 +1,182 @@
+%%MatrixMarket matrix coordinate real general
+30 30 180
+1 1 -9.4810113490000e+02
+2 1 -7.1785016460000e+06
+3 1  4.7312729960000e+00
+4 1  3.5742618540000e+04
+11 1  9.4625459920000e+02
+12 1  7.1341308750000e+06
+1 2  2.3349693090000e+04
+2 2 -2.4613410870000e+07
+3 2 -3.0051645960000e+03
+4 2  1.2934346290000e+07
+11 2 -3.6807151210000e+03
+12 2  6.1495431850000e+06
+1 3  4.7312729960000e+00
+2 3  3.5670210950000e+04
+3 3 -3.1208606780000e+03
+4 3 -3.2500820450000e+06
+5 3  1.5522075550000e+01
+6 3  1.6287803340000e+04
+13 3  3.1044151100000e+03
+14 3  3.1914882100000e+06
+3 4  2.9953986350000e+04
+4 4 -1.0035133800000e+07
+5 4 -7.8658863460000e+03
+6 4  6.3330904920000e+06
+13 4 -5.2284380090000e+03
+14 4 -1.1610330070000e+06
+3 5  1.5522075550000e+01
+4 5  1.5956339430000e+04
+5 5 -5.9720828860000e+03
+6 5 -1.6395834630000e+06
+7 5  2.9661271480000e+01
+8 5  8.7000917550000e+03
+15 5  5.9322542970000e+03
+16 5  1.6097273710000e+06
+5 6  1.7473258330000e+04
+6 6 -4.1182170880000e+06
+7 6 -2.7076007450000e+02
+8 6 -7.3466724480000e+04
+15 6 -4.0817635000000e+01
+16 6 -1.1075258970000e+04
+5 7  2.9661271480000e+01
+6 7  8.0481454440000e+03
+7 7 -5.9475459880000e+03
+8 7 -1.3740635160000e+06
+9 7  2.9419951740000e+01
+10 7  6.7909579670000e+03
+17 7  5.8839903490000e+03
+18 7  1.3581915900000e+06
+7 8  1.1788389530000e+01
+8 8 -6.0472270900000e+03
+10 8  7.0730320960000e+02
+18 8  7.7968763160000e+01
+7 9  2.9419951740000e+01
+8 9  6.7909579510000e+03
+9 9 -5.9713573530000e+03
+10 9 -1.3323692060000e+06
+19 9  5.9491819500000e+03
+20 9  1.3189422360000e+06
+9 10  1.8213815350000e+04
+10 10 -2.5059847620000e+06
+19 10 -2.4969274700000e+02
+20 10 -5.5328319620000e+04
+1 11  9.4625459920000e+02
+2 11  7.1340421910000e+06
+11 11 -2.7807437790000e+03
+12 11 -7.7182097420000e+06
+13 11  4.4060542710000e+00
+14 11  1.4480734490000e+03
+21 11  1.8358559460000e+03
+22 11  5.7572487430000e+05
+11 12  2.5797297290000e+04
+12 12 -9.2407184210000e+06
+13 12 -1.1588958390000e+02
+14 12  2.3027380050000e+05
+21 12 -6.8657039450000e+02
+22 12  7.1253609460000e+05
+3 13  3.1044151100000e+03
+4 13  3.1912678870000e+06
+11 13  4.4060542710000e+00
+12 13  1.3807829320000e+03
+13 13 -4.7848602210000e+03
+14 13 -3.5808334290000e+06
+15 13  3.9963378410000e+00
+16 13  9.2558550540000e+02
+23 13  1.6651407670000e+03
+24 13  3.8566062220000e+05
+13 14  1.8139423920000e+01
+14 14 -8.4585448840000e+03
+16 14  1.0738622860000e+02
+24 14  2.6158080350000e+02
+5 15  5.9322542970000e+03
+6 15  1.6096290890000e+06
+13 15  3.9963378410000e+00
+14 15  9.2558549330000e+02
+15 15 -7.6610458140000e+03
+16 15 -2.0016469780000e+06
+17 15  4.1131980110000e+00
+18 15  9.3265571700000e+02
+25 15  1.7138325050000e+03
+26 15  3.8860654870000e+05
+15 16  1.8316189080000e+01
+16 16 -8.4066950400000e+03
+18 16  1.0674546920000e+02
+26 16  8.0723176430000e+01
+7 17  5.8839903490000e+03
+8 17  1.3581915900000e+06
+15 17  4.1131980110000e+00
+16 17  9.3265571690000e+02
+17 17 -7.6966204670000e+03
+18 17 -1.7682272950000e+06
+19 17  4.3138675330000e+00
+20 17  9.7583624590000e+02
+27 17  1.7974448050000e+03
+28 17  4.0659843580000e+05
+17 18  1.8104876340000e+01
+18 18 -8.2868969120000e+03
+20 18  1.0561495530000e+02
+28 18  5.1700319220000e+01
+9 19  5.9491819500000e+03
+10 19  1.3182531100000e+06
+17 19  4.3138675330000e+00
+18 19  9.7583624590000e+02
+19 19 -7.8034482760000e+03
+20 19 -1.7423949200000e+06
+29 19  1.8608642830000e+03
+30 19  4.1338216070000e+05
+19 20  2.7213686810000e+04
+20 20 -3.7862462010000e+06
+29 20 -2.7268589770000e+02
+30 20 -6.0465513710000e+04
+11 21  1.8358559460000e+03
+12 21  5.7532622180000e+05
+21 21 -1.8730197800000e+03
+22 21 -5.8390768360000e+05
+23 21  2.5519125110000e+01
+24 21  5.8925928100000e+03
+21 22  3.0689873960000e+01
+22 22 -1.4220855320000e+04
+24 22  5.2041902550000e+02
+13 23  1.6651407670000e+03
+14 23  3.8566062220000e+05
+21 23  2.5519125110000e+01
+22 23  5.8925927520000e+03
+23 23 -1.7282309830000e+03
+24 23 -4.0006143080000e+05
+25 23  2.5979289500000e+01
+26 23  5.8831777310000e+03
+23 24  3.1037943720000e+01
+24 24 -1.4640445490000e+04
+26 24  7.0608811070000e+02
+15 25  1.7138325050000e+03
+16 25  3.8860654870000e+05
+23 25  2.5979289500000e+01
+24 25  5.8831777300000e+03
+25 25 -1.7785733520000e+03
+26 25 -4.0325726390000e+05
+27 25  2.7334717910000e+01
+28 25  6.1828826750000e+03
+25 26  3.0617826380000e+01
+26 26 -1.4459345430000e+04
+28 26  7.1015603570000e+02
+17 27  1.7974448050000e+03
+18 27  4.0659843580000e+05
+25 27  2.7334717910000e+01
+26 27  6.1828826750000e+03
+27 27 -1.8647846840000e+03
+28 27 -4.2182964720000e+05
+29 27  2.8739153910000e+01
+30 27  6.5001941810000e+03
+27 28  3.0184152090000e+01
+28 28 -1.4268956760000e+04
+30 28  7.1493041500000e+02
+19 29  1.8608642830000e+03
+20 29  4.1262902020000e+05
+27 29  2.8739153910000e+01
+28 29  6.5001941810000e+03
+29 29 -1.8714356470000e+03
+30 29 -4.3693045430000e+05
+29 30  4.4912526670000e+04
+30 30 -6.3991790180000e+06
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/external/wrong.mtx
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/external/wrong.mtx	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/external/wrong.mtx	(revision 2477)
@@ -0,0 +1,4 @@
+%%MatrixMarket matrix coordinate integer general
+2 3 2
+0 1 1
+1 3 4
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/external/symW.rda
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/external/symW.rda
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/include/Matrix_stubs.c
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/include/Matrix_stubs.c	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/include/Matrix_stubs.c	(revision 2477)
@@ -0,0 +1,723 @@
+#include <Rconfig.h>
+#include <Rinternals.h>
+#include <R_ext/Rdynload.h>
+#include <R_ext/Print.h>
+#include <Rversion.h>
+#include "cholmod.h"
+#include "Matrix.h"
+
+#ifdef	__cplusplus
+extern "C" {
+// and  bool is defined
+#else
+# define bool Rboolean
+#endif
+
+#ifdef HAVE_VISIBILITY_ATTRIBUTE
+# define attribute_hidden __attribute__ ((visibility ("hidden")))
+#else
+# define attribute_hidden
+#endif
+
+CHM_DN attribute_hidden
+M_as_cholmod_dense(CHM_DN ans, SEXP x)
+{
+    static CHM_DN(*fun)(CHM_DN,SEXP) = NULL;
+    if(fun == NULL)
+	fun = (CHM_DN(*)(CHM_DN,SEXP))
+	    R_GetCCallable("Matrix", "as_cholmod_dense");
+    return fun(ans, x);
+}
+
+CHM_FR attribute_hidden
+M_as_cholmod_factor(CHM_FR ans, SEXP x)
+{
+    static CHM_FR(*fun)(CHM_FR,SEXP) = NULL;
+    if(fun == NULL)
+	fun = (CHM_FR(*)(CHM_FR,SEXP))
+	    R_GetCCallable("Matrix", "as_cholmod_factor");
+    return fun(ans, x);
+}
+
+CHM_SP attribute_hidden
+M_as_cholmod_sparse(CHM_SP ans, SEXP x, Rboolean check_Udiag, Rboolean sort_in_place)
+{
+    static CHM_SP(*fun)(CHM_SP,SEXP,Rboolean,Rboolean)= NULL;
+    if(fun == NULL)
+	fun = (CHM_SP(*)(CHM_SP,SEXP,Rboolean,Rboolean))
+	    R_GetCCallable("Matrix", "as_cholmod_sparse");
+    return fun(ans, x, check_Udiag, sort_in_place);
+}
+
+CHM_TR attribute_hidden
+M_as_cholmod_triplet(CHM_TR ans, SEXP x, Rboolean check_Udiag)
+{
+    static CHM_TR(*fun)(CHM_TR,SEXP,Rboolean)= NULL;
+    if(fun == NULL)
+	fun = (CHM_TR(*)(CHM_TR,SEXP,Rboolean))
+	    R_GetCCallable("Matrix", "as_cholmod_triplet");
+    return fun(ans, x, check_Udiag);
+}
+
+SEXP attribute_hidden
+M_Csparse_diagU2N(SEXP x)
+{
+    static SEXP(*fun)(SEXP) = NULL;
+    if(fun == NULL)
+	fun = (SEXP(*)(SEXP))
+	    R_GetCCallable("Matrix", "Csparse_diagU2N");
+    return fun(x);
+}
+
+SEXP attribute_hidden
+M_chm_factor_to_SEXP(const_CHM_FR f, int dofree)
+{
+    static SEXP(*fun)(const_CHM_FR,int) = NULL;
+    if(fun == NULL)
+	fun = (SEXP(*)(const_CHM_FR,int))
+	    R_GetCCallable("Matrix", "chm_factor_to_SEXP");
+    return fun(f, dofree);
+}
+
+double attribute_hidden
+M_chm_factor_ldetL2(const_CHM_FR f)
+{
+    static double(*fun)(const_CHM_FR) = NULL;
+    if(fun == NULL)
+	fun = (double(*)(const_CHM_FR))
+	    R_GetCCallable("Matrix", "chm_factor_ldetL2");
+    return fun(f);
+}
+
+CHM_FR attribute_hidden
+M_chm_factor_update(CHM_FR f, const_CHM_SP A, double mult)
+{
+    static CHM_FR(*fun)(CHM_FR,const_CHM_SP,double) = NULL;
+    if(fun == NULL)
+	fun = (CHM_FR(*)(CHM_FR,const_CHM_SP,double))
+	    R_GetCCallable("Matrix", "chm_factor_update");
+    return fun(f, A, mult);
+}
+
+SEXP attribute_hidden
+M_chm_sparse_to_SEXP(const_CHM_SP a, int dofree,
+		     int uploT, int Rkind, const char *diag, SEXP dn)
+{
+    static SEXP(*fun)(const_CHM_SP,int,int,int,const char*,SEXP) = NULL;
+    if(fun == NULL)
+	fun = (SEXP(*)(const_CHM_SP,int,int,int,const char*,SEXP))
+	    R_GetCCallable("Matrix", "chm_sparse_to_SEXP");
+    return fun(a, dofree, uploT, Rkind, diag, dn);
+}
+
+SEXP attribute_hidden
+M_chm_triplet_to_SEXP(const CHM_TR a, int dofree,
+		      int uploT, int Rkind, const char *diag, SEXP dn)
+{
+    static SEXP(*fun)(const CHM_TR,int,int,int,const char*,SEXP) = NULL;
+    if(fun == NULL)
+	fun = (SEXP(*)(const CHM_TR,int,int,int,const char*,SEXP))
+	    R_GetCCallable("Matrix", "chm_triplet_to_SEXP");
+    return fun(a, dofree, uploT, Rkind, diag, dn);
+}
+
+CHM_SP attribute_hidden
+M_cholmod_aat(const_CHM_SP A, int *fset, size_t fsize,
+	      int mode, CHM_CM Common)
+{
+    static CHM_SP(*fun)(const_CHM_SP,int*,size_t,
+			int,CHM_CM) = NULL;
+    if(fun == NULL)
+	fun = (CHM_SP(*)(const_CHM_SP,int*,size_t,
+			 int,CHM_CM))
+	    R_GetCCallable("Matrix", "cholmod_aat");
+    return fun(A, fset, fsize, mode, Common);
+}
+
+int attribute_hidden
+M_cholmod_band_inplace(CHM_SP A, int k1, int k2, int mode,
+		       CHM_CM Common)
+{
+    static int(*fun)(CHM_SP,int,int,int,CHM_CM) = NULL;
+    if (fun == NULL)
+	fun = (int(*)(CHM_SP,int,int,int,CHM_CM))
+	    R_GetCCallable("Matrix", "cholmod_band_inplace");
+    return fun(A, k1, k2, mode, Common);
+}
+
+CHM_SP attribute_hidden
+M_cholmod_add(const_CHM_SP A, const_CHM_SP B,
+	      double alpha[2], double beta[2], int values,
+	      int sorted, CHM_CM Common)
+{
+    static CHM_SP(*fun)(const_CHM_SP,const_CHM_SP,
+			double*,double*,int,int,
+			CHM_CM) = NULL;
+    if (fun == NULL)
+	fun = (CHM_SP(*)(const_CHM_SP,const_CHM_SP,
+			 double*,double*,int,int,
+			 CHM_CM))
+	    R_GetCCallable("Matrix", "cholmod_add");
+    return fun(A, B, alpha, beta, values, sorted, Common);
+}
+
+CHM_DN attribute_hidden
+M_cholmod_allocate_dense(size_t nrow, size_t ncol, size_t d,
+			 int xtype, CHM_CM Common)
+{
+    static CHM_DN(*fun)(size_t,size_t,size_t,
+			int,CHM_CM) = NULL;
+    if (fun == NULL)
+	fun = (CHM_DN(*)(size_t,size_t,size_t,
+			 int,CHM_CM))
+	    R_GetCCallable("Matrix", "cholmod_allocate_dense");
+    return fun(nrow, ncol, d, xtype, Common);
+}
+
+CHM_SP attribute_hidden
+M_cholmod_allocate_sparse(size_t nrow, size_t ncol, size_t nzmax,
+			  int sorted, int packed, int stype,
+			  int xtype, CHM_CM Common)
+{
+    static CHM_SP(*fun)(size_t,size_t,size_t,int,int,
+			int,int,CHM_CM) = NULL;
+    if (fun == NULL)
+	fun = (CHM_SP(*)
+	       (size_t,size_t,size_t,int,int,int,int,CHM_CM))
+	    R_GetCCallable("Matrix", "cholmod_allocate_sparse");
+    return fun(nrow,ncol,nzmax,sorted,packed,stype,xtype,Common);
+}
+
+CHM_TR attribute_hidden
+M_cholmod_allocate_triplet(size_t nrow, size_t ncol, size_t nzmax,
+			   int stype, int xtype, CHM_CM Common)
+{
+    static CHM_TR(*fun)(size_t,size_t,size_t, int,int,CHM_CM) = NULL;
+    if (fun == NULL)
+	fun = (CHM_TR(*)(size_t,size_t,size_t,int,int,CHM_CM))
+	    R_GetCCallable("Matrix", "cholmod_allocate_triplet");
+    return fun(nrow,ncol,nzmax,stype,xtype,Common);
+}
+
+CHM_SP attribute_hidden
+M_cholmod_triplet_to_sparse(const cholmod_triplet* T, int nzmax,
+			    CHM_CM Common)
+{
+    static CHM_SP(*fun)(const cholmod_triplet*,int,CHM_CM) = NULL;
+    if (fun == NULL)
+	fun = (CHM_SP(*)(const cholmod_triplet*,int,CHM_CM))
+	    R_GetCCallable("Matrix", "cholmod_triplet_to_sparse");
+    return fun(T, nzmax, Common);
+}
+
+CHM_TR attribute_hidden
+M_cholmod_sparse_to_triplet(const_CHM_SP A, CHM_CM Common)
+{
+    static CHM_TR(*fun)(const_CHM_SP,CHM_CM) = NULL;
+    if (fun == NULL)
+	fun = (CHM_TR(*)(const_CHM_SP,CHM_CM))
+	    R_GetCCallable("Matrix", "cholmod_sparse_to_triplet");
+    return fun(A, Common);
+}
+
+CHM_DN attribute_hidden
+M_cholmod_sparse_to_dense(const_CHM_SP A, CHM_CM Common)
+{
+    static CHM_DN(*fun)(const_CHM_SP,CHM_CM) = NULL;
+    if (fun == NULL)
+	fun = (CHM_DN(*)(const_CHM_SP,CHM_CM))
+	    R_GetCCallable("Matrix", "cholmod_sparse_to_dense");
+    return fun(A, Common);
+}
+
+CHM_FR attribute_hidden
+M_cholmod_analyze(const_CHM_SP A, CHM_CM Common)
+{
+    static CHM_FR(*fun)(const_CHM_SP,CHM_CM) = NULL;
+    if (fun == NULL)
+	fun = (CHM_FR(*)(const_CHM_SP,CHM_CM))
+	    R_GetCCallable("Matrix", "cholmod_analyze");
+    return fun(A, Common);
+}
+
+CHM_FR attribute_hidden
+M_cholmod_analyze_p(const_CHM_SP A, int *Perm, int *fset,
+		    size_t fsize, CHM_CM Common)
+{
+    static CHM_FR(*fun)(const_CHM_SP,int*,int*,size_t,
+			CHM_CM) = NULL;
+    if (fun == NULL)
+	fun = (CHM_FR(*)(const_CHM_SP,int*,int*,
+			 size_t,CHM_CM))
+	    R_GetCCallable("Matrix", "cholmod_analyze_p");
+    return fun(A, Perm, fset, fsize, Common);
+}
+
+CHM_SP attribute_hidden
+M_cholmod_copy(const_CHM_SP A, int stype,
+	       int mode, CHM_CM Common)
+{
+    static CHM_SP(*fun)(const_CHM_SP,int,int,CHM_CM) = NULL;
+    if (fun == NULL)
+	fun = (CHM_SP(*)(const_CHM_SP,int,int,CHM_CM))
+	    R_GetCCallable("Matrix", "cholmod_copy");
+    return fun(A, stype, mode, Common);
+}
+
+CHM_DN attribute_hidden
+M_cholmod_copy_dense(const_CHM_DN  A, CHM_CM Common)
+{
+    static CHM_DN(*fun)(const_CHM_DN,CHM_CM) = NULL;
+    if (fun == NULL)
+	fun = (CHM_DN(*)(const_CHM_DN,CHM_CM))
+	    R_GetCCallable("Matrix", "cholmod_copy_dense");
+    return fun(A, Common);
+}
+
+CHM_FR attribute_hidden
+M_cholmod_copy_factor(const_CHM_FR L, CHM_CM Common)
+{
+    static CHM_FR(*fun)(const_CHM_FR,CHM_CM) = NULL;
+    if (fun == NULL)
+	fun = (CHM_FR(*)(const_CHM_FR,CHM_CM))
+	    R_GetCCallable("Matrix", "cholmod_copy_factor");
+    return fun(L, Common);
+}
+
+int attribute_hidden
+M_cholmod_change_factor(int to_xtype, int to_ll, int to_super, int to_packed,
+			int to_monotonic, CHM_FR L, CHM_CM Common)
+{
+    static int(*fun)(int,int,int,int,int,CHM_FR,CHM_CM) = NULL;
+    if (fun == NULL)
+	fun = (int(*)(int,int,int,int,int,CHM_FR,CHM_CM))
+	    R_GetCCallable("Matrix", "cholmod_change_factor");
+    return fun(to_xtype, to_ll, to_super, to_packed, to_monotonic, L, Common);
+}
+
+CHM_SP attribute_hidden
+M_cholmod_copy_sparse(const_CHM_SP A, CHM_CM Common)
+{
+    static CHM_SP(*fun)(const_CHM_SP,CHM_CM) = NULL;
+    if (fun == NULL)
+	fun = (CHM_SP(*)(const_CHM_SP,CHM_CM))
+	    R_GetCCallable("Matrix", "cholmod_copy_sparse");
+    return fun(A, Common);
+}
+
+CHM_SP attribute_hidden
+M_cholmod_factor_to_sparse(const_CHM_FR L, CHM_CM Common)
+{
+    static CHM_SP(*fun)(const_CHM_FR,CHM_CM) = NULL;
+    if (fun == NULL)
+	fun = (CHM_SP(*)(const_CHM_FR,CHM_CM))
+	    R_GetCCallable("Matrix", "cholmod_factor_to_sparse");
+    return fun(L, Common);
+}
+
+CHM_SP attribute_hidden
+M_cholmod_submatrix(const_CHM_SP A, int *rset, int rsize, int *cset,
+		    int csize, int values, int sorted, CHM_CM Common)
+{
+    static CHM_SP(*fun)(const_CHM_SP,int*,int,int*,int,
+			int,int,CHM_CM) = NULL;
+    if (fun == NULL)
+	fun = (CHM_SP(*)(const_CHM_SP,int*,int,int*,
+			 int,int,int,CHM_CM))
+	    R_GetCCallable("Matrix", "cholmod_submatrix");
+    return fun(A, rset, rsize, cset, csize, values, sorted, Common);
+}
+
+CHM_SP attribute_hidden
+M_cholmod_dense_to_sparse(const_CHM_DN  X, int values, CHM_CM Common)
+{
+    static CHM_SP(*fun)(const_CHM_DN,int,CHM_CM) = NULL;
+    if (fun == NULL)
+	fun = (CHM_SP(*)(const_CHM_DN,int,CHM_CM))
+	    R_GetCCallable("Matrix", "cholmod_dense_to_sparse");
+    return fun(X, values, Common);
+}
+
+int attribute_hidden
+M_cholmod_factorize(const_CHM_SP A, CHM_FR L, CHM_CM Common)
+{
+    static int(*fun)(const_CHM_SP,CHM_FR,CHM_CM) = NULL;
+    if (fun == NULL)
+	fun = (int(*)(const_CHM_SP,CHM_FR,CHM_CM))
+	    R_GetCCallable("Matrix", "cholmod_factorize");
+    return fun(A, L, Common);
+}
+
+int attribute_hidden
+M_cholmod_factorize_p(const_CHM_SP A, double *beta, int *fset,
+		      size_t fsize, CHM_FR L,
+		      CHM_CM Common)
+{
+    static int(*fun)(const_CHM_SP,double*,int*,size_t,
+		     CHM_FR,CHM_CM) = NULL;
+    if (fun == NULL)
+	fun = (int(*)(const_CHM_SP,double*,int*,size_t,
+		      CHM_FR,CHM_CM))
+	    R_GetCCallable("Matrix", "cholmod_factorize_p");
+    return fun(A, beta, fset, fsize, L, Common);
+}
+
+int attribute_hidden
+M_cholmod_finish(CHM_CM Common)
+{
+
+    static int(*fun)(CHM_CM) = NULL;
+    if (fun == NULL)
+	fun = (int(*)(CHM_CM))
+	    R_GetCCallable("Matrix", "cholmod_finish");
+    return fun(Common);
+}
+
+int attribute_hidden
+M_cholmod_sort(CHM_SP A, CHM_CM Common)
+{
+    static int(*fun)(CHM_SP,CHM_CM) = NULL;
+    if (fun == NULL)
+	fun = (int(*)(CHM_SP,CHM_CM))
+	    R_GetCCallable("Matrix", "cholmod_sort");
+    return fun(A, Common);
+}
+
+int attribute_hidden
+M_cholmod_free_dense(CHM_DN  *A, CHM_CM Common)
+{
+    static int(*fun)(CHM_DN*,CHM_CM) = NULL;
+    if (fun == NULL)
+	fun = (int(*)(CHM_DN*,CHM_CM))
+	    R_GetCCallable("Matrix", "cholmod_free_dense");
+    return fun(A, Common);
+}
+
+int attribute_hidden
+M_cholmod_free_factor(CHM_FR *L, CHM_CM Common)
+{
+    static int(*fun)(CHM_FR*,CHM_CM) = NULL;
+    if (fun == NULL)
+	fun = (int(*)(CHM_FR*,CHM_CM))
+	    R_GetCCallable("Matrix", "cholmod_free_factor");
+    return fun(L, Common);
+}
+
+int attribute_hidden
+M_cholmod_free_sparse(CHM_SP *A, CHM_CM Common)
+{
+    static int(*fun)(CHM_SP*,CHM_CM) = NULL;
+    if (fun == NULL)
+	fun = (int(*)(CHM_SP*,CHM_CM))
+	    R_GetCCallable("Matrix", "cholmod_free_sparse");
+    return fun(A, Common);
+}
+
+int attribute_hidden
+M_cholmod_free_triplet(cholmod_triplet **T, CHM_CM Common)
+{
+    static int(*fun)(cholmod_triplet**,CHM_CM) = NULL;
+    if (fun == NULL)
+	fun = (int(*)(cholmod_triplet**,CHM_CM))
+	    R_GetCCallable("Matrix", "cholmod_free_triplet");
+    return fun(T, Common);
+}
+
+long attribute_hidden
+M_cholmod_nnz(const_CHM_SP A, CHM_CM Common)
+{
+    static long(*fun)(const_CHM_SP,CHM_CM) = NULL;
+    if (fun == NULL)
+	fun = (long(*)(const_CHM_SP,CHM_CM))
+	    R_GetCCallable("Matrix", "cholmod_nnz");
+    return fun(A, Common);
+}
+
+int attribute_hidden
+M_cholmod_sdmult(const_CHM_SP A, int transpose,
+		 const double *alpha, const double *beta,
+		 const_CHM_DN X, CHM_DN  Y,
+		 CHM_CM Common)
+{
+    static int(*fun)(const_CHM_SP,int,const double*,
+		     const double*,const_CHM_DN,
+		     CHM_DN,CHM_CM) = NULL;
+    if (fun == NULL)
+	fun = (int(*)(const_CHM_SP,int,const double*,
+		      const double*, const_CHM_DN,
+		      CHM_DN,CHM_CM))
+	    R_GetCCallable("Matrix", "cholmod_sdmult");
+    return fun(A, transpose, alpha, beta, X, Y, Common);
+}
+
+CHM_SP attribute_hidden
+M_cholmod_ssmult(const_CHM_SP A, const_CHM_SP B,
+		 int stype, int values, int sorted,
+		 CHM_CM Common)
+{
+    static CHM_SP(*fun)(const_CHM_SP,const_CHM_SP,
+			int,int,int,CHM_CM) = NULL;
+    if (fun == NULL)
+	fun = (CHM_SP(*)(const_CHM_SP,const_CHM_SP,
+			 int,int,int,CHM_CM))
+	    R_GetCCallable("Matrix", "cholmod_ssmult");
+    return fun(A, B, stype, values, sorted, Common);
+}
+
+CHM_DN attribute_hidden
+M_cholmod_solve(int sys, const_CHM_FR L,
+		const_CHM_DN B, CHM_CM Common)
+{
+    static CHM_DN(*fun)(int,const_CHM_FR,const_CHM_DN,
+			CHM_CM) = NULL;
+    if (fun == NULL)
+	fun = (CHM_DN(*)(int,const_CHM_FR,const_CHM_DN,
+			 CHM_CM))
+	    R_GetCCallable("Matrix", "cholmod_solve");
+    return fun(sys, L, B, Common);
+}
+
+
+/* Feature Requests #6064, 2015-03-27
+  https://r-forge.r-project.org/tracker/?func=detail&atid=297&aid=6064&group_id=61
+*/
+int attribute_hidden
+M_cholmod_solve2(int sys,
+		 CHM_FR L,
+		 CHM_DN B, // right
+		 CHM_DN *X,// solution
+		 CHM_DN *Yworkspace,
+		 CHM_DN *Eworkspace,
+		 cholmod_common *c)
+{
+    static int(*fun)(
+	int,
+	const_CHM_FR, // L
+	const_CHM_DN, // B
+	CHM_SP, // Bset
+	CHM_DN*, // X
+	CHM_DN*, // Xset
+	CHM_DN*, // Y
+	CHM_DN*, // E
+	cholmod_common*) = NULL;
+
+    // Source: ../../src/CHOLMOD/Cholesky/cholmod_solve.c
+    if (fun == NULL)
+	fun = (int(*)(int,
+		      const_CHM_FR, // L
+		      const_CHM_DN, // B
+		      CHM_SP, // Bset
+		      CHM_DN*, // X
+		      CHM_DN*, // Xset
+		      CHM_DN*, // Y
+		      CHM_DN*, // E
+		      cholmod_common*)
+	    )R_GetCCallable("Matrix", "cholmod_solve2");
+
+    return fun(sys, L, B, NULL,
+	       X, NULL, Yworkspace, Eworkspace, c);
+}
+
+CHM_SP attribute_hidden
+M_cholmod_speye(size_t nrow, size_t ncol,
+		int xtype, CHM_CM Common)
+{
+    static CHM_SP(*fun)(size_t,size_t,int,CHM_CM) = NULL;
+    if (fun == NULL)
+	fun = (CHM_SP(*)(size_t,size_t,int,CHM_CM))
+	    R_GetCCallable("Matrix", "cholmod_speye");
+    return fun(nrow, ncol, xtype, Common);
+}
+
+CHM_SP attribute_hidden
+M_cholmod_spsolve(int sys, const_CHM_FR L,
+		  const_CHM_SP B, CHM_CM Common)
+{
+    static CHM_SP(*fun)(int,const_CHM_FR,
+			const_CHM_SP, CHM_CM) = NULL;
+    if (fun == NULL)
+	fun = (CHM_SP(*)(int,const_CHM_FR,
+			 const_CHM_SP, CHM_CM))
+	    R_GetCCallable("Matrix", "cholmod_spsolve");
+    return fun(sys, L, B, Common);
+}
+
+int attribute_hidden
+M_cholmod_defaults (CHM_CM Common)
+{
+    static int(*fun)(CHM_CM) = NULL;
+    if (fun == NULL)
+	fun = (int(*)(CHM_CM))
+	    R_GetCCallable("Matrix", "cholmod_defaults");
+    return fun(Common);
+}
+
+int attribute_hidden
+M_cholmod_updown(int update, const_CHM_SP C,
+				const_CHM_FR L, CHM_CM Common)
+{
+	static int(*fun)(int,const_CHM_SP,const_CHM_FR,
+						CHM_CM) = NULL;
+	if (fun == NULL)
+		fun = (int(*)(int,const_CHM_SP,const_CHM_FR,
+							CHM_CM))
+		R_GetCCallable("Matrix", "cholmod_updown");
+	return fun(update, C, L, Common);
+}
+
+/* extern cholmod_common c; */
+
+void attribute_hidden
+M_R_cholmod_error(int status, const char *file, int line, const char *message)
+{
+/* NB: keep in sync with R_cholmod_error(), ../../src/chm_common.c */
+
+    if(status < 0) {
+/* Note: Matrix itself uses CHM_set_common_env, CHM_store_common
+ *   and CHM_restore_common to preserve settings through error calls.
+ *  Consider defining your own error handler, *and* possibly restoring
+ *  *your* version of the cholmod_common that *you* use.
+ */
+	error("Cholmod error '%s' at file '%s', line %d", message, file, line);
+    }
+    else
+	warning("Cholmod warning '%s' at file '%s', line %d",
+		message, file, line);
+}
+
+#if 0  /* no longer used */
+/* just to get 'int' instead of 'void' as required by CHOLMOD's print_function */
+static int
+R_cholmod_printf(const char* fmt, ...)
+{
+    va_list(ap);
+
+    va_start(ap, fmt);
+    Rprintf((char *)fmt, ap);
+    va_end(ap);
+    return 0;
+}
+#endif
+
+int attribute_hidden
+M_R_cholmod_start(CHM_CM Common)
+{
+    int val;
+    static int(*fun)(CHM_CM) = NULL;
+    if (fun == NULL)
+	fun = (int(*)(CHM_CM))
+	    R_GetCCallable("Matrix", "cholmod_start");
+    val = fun(Common);
+/*-- NB: keep in sync with  R_cholmod_start() --> ../../src/chm_common.c */
+    /* do not allow CHOLMOD printing - currently */
+    Common->print_function = NULL;/* was  R_cholmod_printf; /.* Rprintf gives warning */
+/* Consider using your own error handler: */
+    Common->error_handler = M_R_cholmod_error;
+    return val;
+}
+
+CHM_SP attribute_hidden
+M_cholmod_transpose(const_CHM_SP A, int values, CHM_CM Common)
+{
+    static CHM_SP(*fun)(const_CHM_SP,int,CHM_CM) = NULL;
+    if (fun == NULL)
+	fun = (CHM_SP(*)(const_CHM_SP,int,CHM_CM))
+	    R_GetCCallable("Matrix", "cholmod_transpose");
+    return fun(A, values, Common);
+}
+
+CHM_SP attribute_hidden
+M_cholmod_vertcat(const_CHM_SP A, const_CHM_SP B, int values, CHM_CM Common)
+{
+    static CHM_SP(*fun)(const_CHM_SP,const_CHM_SP,int,CHM_CM) = NULL;
+    if (fun == NULL)
+	fun = (CHM_SP(*)(const_CHM_SP,const_CHM_SP, int, CHM_CM))
+	    R_GetCCallable("Matrix", "cholmod_vertcat");
+    return fun(A, B, values, Common);
+}
+
+SEXP attribute_hidden
+M_dpoMatrix_chol(SEXP x)
+{
+    static SEXP(*fun)(SEXP) = NULL;
+    if (fun == NULL)
+	fun = (SEXP(*)(SEXP))
+	    R_GetCCallable("Matrix", "dpoMatrix_chol");
+    return fun(x);
+}
+
+CHM_DN attribute_hidden
+M_numeric_as_chm_dense(CHM_DN ans, double *v, int nr, int nc)
+{
+    static CHM_DN(*fun)(CHM_DN,double*,int,int) = NULL;
+    if (fun == NULL)
+	fun = (CHM_DN(*)(CHM_DN,double*,int,int))
+	    R_GetCCallable("Matrix", "numeric_as_chm_dense");
+    return fun(ans, v, nr, nc);
+}
+
+int attribute_hidden
+M_cholmod_scale(const_CHM_DN S, int scale, CHM_SP A,
+		CHM_CM Common)
+{
+    static int(*fun)(const_CHM_DN,int,CHM_SP, CHM_CM) = NULL;
+    if (fun == NULL)
+	fun = (int(*)(const_CHM_DN,int,CHM_SP, CHM_CM))
+	    R_GetCCallable("Matrix", "cholmod_scale");
+    return fun(S, scale, A, Common);
+}
+
+
+// for now still *export*  M_Matrix_check_class_etc()
+int M_Matrix_check_class_etc(SEXP x, const char **valid)
+{
+    REprintf("M_Matrix_check_class_etc() is deprecated; use R_check_class_etc() instead");
+    return R_check_class_etc(x, valid);
+}
+
+const char *Matrix_valid_ge_dense[] = { MATRIX_VALID_ge_dense, ""};
+const char *Matrix_valid_ddense[] = { MATRIX_VALID_ddense, ""};
+const char *Matrix_valid_ldense[] = { MATRIX_VALID_ldense, ""};
+const char *Matrix_valid_ndense[] = { MATRIX_VALID_ndense, ""};
+const char *Matrix_valid_dense[] = {
+    MATRIX_VALID_ddense,
+    MATRIX_VALID_ldense,
+    MATRIX_VALID_ndense, ""};
+
+const char *Matrix_valid_Csparse[] = { MATRIX_VALID_Csparse, ""};
+const char *Matrix_valid_triplet[] = { MATRIX_VALID_Tsparse, ""};
+const char *Matrix_valid_Rsparse[] = { MATRIX_VALID_Rsparse, ""};
+const char *Matrix_valid_CHMfactor[]={ MATRIX_VALID_CHMfactor, ""};
+
+bool Matrix_isclass_Csparse(SEXP x) {
+    return R_check_class_etc(x, Matrix_valid_Csparse) >= 0;
+}
+
+bool Matrix_isclass_triplet(SEXP x) {
+    return R_check_class_etc(x, Matrix_valid_triplet) >= 0;
+}
+
+bool Matrix_isclass_ge_dense(SEXP x) {
+    return R_check_class_etc(x, Matrix_valid_ge_dense) >= 0;
+}
+bool Matrix_isclass_ddense(SEXP x) {
+    return R_check_class_etc(x, Matrix_valid_ddense) >= 0;
+}
+bool Matrix_isclass_ldense(SEXP x) {
+    return R_check_class_etc(x, Matrix_valid_ldense) >= 0;
+}
+bool Matrix_isclass_ndense(SEXP x) {
+    return R_check_class_etc(x, Matrix_valid_ndense) >= 0;
+}
+bool Matrix_isclass_dense(SEXP x) {
+    return R_check_class_etc(x, Matrix_valid_dense) >= 0;
+}
+
+bool Matrix_isclass_CHMfactor(SEXP x) {
+    return R_check_class_etc(x, Matrix_valid_CHMfactor) >= 0;
+}
+
+#ifdef	__cplusplus
+}
+#endif
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/include/Matrix.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/include/Matrix.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/include/Matrix.h	(revision 2477)
@@ -0,0 +1,134 @@
+#ifndef MATRIX_H
+#define MATRIX_H
+
+#ifdef	__cplusplus
+extern "C" {
+// and  bool is defined
+#else
+# define bool Rboolean
+#endif
+
+// From ../../src/Mutils.h :
+#ifdef __GNUC__
+# undef alloca
+# define alloca(x) __builtin_alloca((x))
+#elif defined(__sun) || defined(_AIX)
+/* this is necessary (and sufficient) for Solaris 10 and AIX 6: */
+# include <alloca.h>
+#endif
+/* For R >= 3.2.2, the 'elif' above shall be replaced by
+#elif defined(HAVE_ALLOCA_H)
+*/
+
+#include <Rdefines.h>
+#include <Rconfig.h>
+#include "cholmod.h" //--->  M_cholmod_*() declarations
+
+#ifdef HAVE_VISIBILITY_ATTRIBUTE
+# define attribute_hidden __attribute__ ((visibility ("hidden")))
+#else
+# define attribute_hidden
+#endif
+
+// Copied from ../../src/Mutils.h ----------------------------------------
+#define MATRIX_VALID_ge_dense			\
+        "dmatrix", "dgeMatrix",			\
+	"lmatrix", "lgeMatrix",			\
+	"nmatrix", "ngeMatrix",			\
+	"zmatrix", "zgeMatrix"
+
+#define MATRIX_VALID_ddense					\
+		    "dgeMatrix", "dtrMatrix",			\
+		    "dsyMatrix", "dpoMatrix", "ddiMatrix",	\
+		    "dtpMatrix", "dspMatrix", "dppMatrix",	\
+		    /* sub classes of those above:*/		\
+		    /* dtr */ "Cholesky", "LDL", "BunchKaufman",\
+		    /* dtp */ "pCholesky", "pBunchKaufman",	\
+		    /* dpo */ "corMatrix"
+
+#define MATRIX_VALID_ldense			\
+		    "lgeMatrix", "ltrMatrix",	\
+		    "lsyMatrix", "ldiMatrix",	\
+		    "ltpMatrix", "lspMatrix"
+
+#define MATRIX_VALID_ndense			\
+		    "ngeMatrix", "ntrMatrix",	\
+		    "nsyMatrix",		\
+		    "ntpMatrix", "nspMatrix"
+
+#define MATRIX_VALID_dCsparse			\
+ "dgCMatrix", "dsCMatrix", "dtCMatrix"
+#define MATRIX_VALID_nCsparse			\
+ "ngCMatrix", "nsCMatrix", "ntCMatrix"
+
+#define MATRIX_VALID_Csparse			\
+    MATRIX_VALID_dCsparse,			\
+ "lgCMatrix", "lsCMatrix", "ltCMatrix",		\
+    MATRIX_VALID_nCsparse,			\
+ "zgCMatrix", "zsCMatrix", "ztCMatrix"
+
+#define MATRIX_VALID_Tsparse			\
+ "dgTMatrix", "dsTMatrix", "dtTMatrix",		\
+ "lgTMatrix", "lsTMatrix", "ltTMatrix",		\
+ "ngTMatrix", "nsTMatrix", "ntTMatrix",		\
+ "zgTMatrix", "zsTMatrix", "ztTMatrix"
+
+#define MATRIX_VALID_Rsparse			\
+ "dgRMatrix", "dsRMatrix", "dtRMatrix",		\
+ "lgRMatrix", "lsRMatrix", "ltRMatrix",		\
+ "ngRMatrix", "nsRMatrix", "ntRMatrix",		\
+ "zgRMatrix", "zsRMatrix", "ztRMatrix"
+
+#define MATRIX_VALID_tri_Csparse		\
+   "dtCMatrix", "ltCMatrix", "ntCMatrix", "ztCMatrix"
+
+#define MATRIX_VALID_CHMfactor "dCHMsuper", "dCHMsimpl", "nCHMsuper", "nCHMsimpl"
+
+CHM_SP M_as_cholmod_sparse (CHM_SP ans, SEXP x, Rboolean check_Udiag, Rboolean sort_in_place);
+CHM_TR M_as_cholmod_triplet(CHM_TR ans, SEXP x, Rboolean check_Udiag);
+CHM_DN M_as_cholmod_dense(CHM_DN ans, SEXP x);
+CHM_DN M_numeric_as_chm_dense(CHM_DN ans, double *v, int nr, int nc);
+CHM_FR M_as_cholmod_factor(CHM_FR ans, SEXP x);
+double M_chm_factor_ldetL2(const_CHM_FR f);
+CHM_FR M_chm_factor_update(CHM_FR f, const_CHM_SP A, double mult);
+
+#define AS_CHM_DN(x) M_as_cholmod_dense((CHM_DN)alloca(sizeof(cholmod_dense)), x )
+#define AS_CHM_FR(x) M_as_cholmod_factor((CHM_FR)alloca(sizeof(cholmod_factor)), x )
+
+#define AS_CHM_SP(x) M_as_cholmod_sparse ((CHM_SP)alloca(sizeof(cholmod_sparse)), x, (Rboolean)TRUE, (Rboolean)FALSE)
+#define AS_CHM_TR(x) M_as_cholmod_triplet((CHM_TR)alloca(sizeof(cholmod_triplet)),x, (Rboolean)TRUE)
+/* the non-diagU2N-checking versions : */
+#define AS_CHM_SP__(x) M_as_cholmod_sparse ((CHM_SP)alloca(sizeof(cholmod_sparse)), x, (Rboolean)FALSE, (Rboolean)FALSE)
+#define AS_CHM_TR__(x) M_as_cholmod_triplet((CHM_TR)alloca(sizeof(cholmod_triplet)), x, (Rboolean)FALSE)
+
+#define N_AS_CHM_DN(x,nr,nc) M_numeric_as_chm_dense((CHM_DN)alloca(sizeof(cholmod_dense)), x , nr, nc )
+
+SEXP M_Csparse_diagU2N(SEXP x);
+SEXP M_chm_factor_to_SEXP(const_CHM_FR f, int dofree);
+SEXP M_chm_sparse_to_SEXP(const_CHM_SP a, int dofree, int uploT, int Rkind,
+			  const char *diag, SEXP dn);
+SEXP M_chm_triplet_to_SEXP(const CHM_TR a, int dofree, int uploT, int Rkind,
+			   const char* diag, SEXP dn);
+
+SEXP M_dpoMatrix_chol(SEXP x);
+
+int M_Matrix_check_class_etc(SEXP x, const char **valid);
+
+// ./Matrix_stubs.c   "illustrative example code" (of the above):
+bool Matrix_isclass_Csparse(SEXP x);
+bool Matrix_isclass_triplet(SEXP x);
+bool Matrix_isclass_ge_dense(SEXP x);
+bool Matrix_isclass_ddense(SEXP x);
+bool Matrix_isclass_ldense(SEXP x);
+bool Matrix_isclass_ndense(SEXP x);
+bool Matrix_isclass_dense(SEXP x);
+bool Matrix_isclass_CHMfactor(SEXP x);
+
+
+/* TODO:  Utilities for C level of model_matrix(*, sparse) */
+
+#ifdef	__cplusplus
+}
+#endif
+
+#endif /* MATRIX_H */
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/include/cholmod.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/include/cholmod.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/include/cholmod.h	(revision 2477)
@@ -0,0 +1,1038 @@
+#ifndef MATRIX_CHOLMOD_H
+#define MATRIX_CHOLMOD_H
+
+#include <stddef.h>
+#include <limits.h>
+
+#ifdef	__cplusplus
+extern "C" {
+#endif
+
+// from ../../src/UFconfig/UFconfig.h - line 51 :
+#ifndef UF_long
+
+#ifdef _WIN64
+
+#define UF_long __int64
+#define UF_long_max _I64_MAX
+#define UF_long_idd "I64d"
+
+#else
+
+#define UF_long long
+#define UF_long_max LONG_MAX
+#define UF_long_idd "ld"
+
+#endif
+#define UF_long_id "%" UF_long_idd
+#endif
+
+#define CHOLMOD_HAS_VERSION_FUNCTION
+
+#define CHOLMOD_DATE "April 25, 2013"
+#define CHOLMOD_VER_CODE(main,sub) ((main) * 1000 + (sub))
+#define CHOLMOD_MAIN_VERSION 2
+#define CHOLMOD_SUB_VERSION 1
+#define CHOLMOD_SUBSUB_VERSION 2
+#define CHOLMOD_VERSION \
+    CHOLMOD_VER_CODE(CHOLMOD_MAIN_VERSION,CHOLMOD_SUB_VERSION)
+// from ../../src/CHOLMOD/Include/cholmod_core.h - line 275 :
+/* Each CHOLMOD object has its own type code. */
+
+#define CHOLMOD_COMMON 0
+#define CHOLMOD_SPARSE 1
+#define CHOLMOD_FACTOR 2
+#define CHOLMOD_DENSE 3
+#define CHOLMOD_TRIPLET 4
+
+/* ========================================================================== */
+/* === CHOLMOD Common ======================================================= */
+/* ========================================================================== */
+
+/* itype defines the types of integer used: */
+#define CHOLMOD_INT 0		/* all integer arrays are int */
+#define CHOLMOD_INTLONG 1	/* most are int, some are SuiteSparse_long */
+#define CHOLMOD_LONG 2		/* all integer arrays are SuiteSparse_long */
+
+/* The itype of all parameters for all CHOLMOD routines must match.
+ * FUTURE WORK: CHOLMOD_INTLONG is not yet supported.
+ */
+
+/* dtype defines what the numerical type is (double or float): */
+#define CHOLMOD_DOUBLE 0	/* all numerical values are double */
+#define CHOLMOD_SINGLE 1	/* all numerical values are float */
+
+/* The dtype of all parameters for all CHOLMOD routines must match.
+ *
+ * Scalar floating-point values are always passed as double arrays of size 2
+ * (for the real and imaginary parts).  They are typecast to float as needed.
+ * FUTURE WORK: the float case is not supported yet.
+ */
+
+/* xtype defines the kind of numerical values used: */
+#define CHOLMOD_PATTERN 0	/* pattern only, no numerical values */
+#define CHOLMOD_REAL 1		/* a real matrix */
+#define CHOLMOD_COMPLEX 2	/* a complex matrix (ANSI C99 compatible) */
+#define CHOLMOD_ZOMPLEX 3	/* a complex matrix (MATLAB compatible) */
+
+/* Definitions for cholmod_common: */
+#define CHOLMOD_MAXMETHODS 9	/* maximum number of different methods that */
+				/* cholmod_analyze can try. Must be >= 9. */
+
+/* Common->status values.  zero means success, negative means a fatal error,
+ * positive is a warning. */
+#define CHOLMOD_OK 0			/* success */
+#define CHOLMOD_NOT_INSTALLED (-1)	/* failure: method not installed */
+#define CHOLMOD_OUT_OF_MEMORY (-2)	/* failure: out of memory */
+#define CHOLMOD_TOO_LARGE (-3)		/* failure: integer overflow occured */
+#define CHOLMOD_INVALID (-4)		/* failure: invalid input */
+#define CHOLMOD_GPU_PROBLEM (-5)        /* failure: GPU fatal error */
+#define CHOLMOD_NOT_POSDEF (1)		/* warning: matrix not pos. def. */
+#define CHOLMOD_DSMALL (2)		/* warning: D for LDL'  or diag(L) or */
+					/* LL' has tiny absolute value */
+
+/* ordering method (also used for L->ordering) */
+#define CHOLMOD_NATURAL 0	/* use natural ordering */
+#define CHOLMOD_GIVEN 1		/* use given permutation */
+#define CHOLMOD_AMD 2		/* use minimum degree (AMD) */
+#define CHOLMOD_METIS 3		/* use METIS' nested dissection */
+#define CHOLMOD_NESDIS 4	/* use CHOLMOD's version of nested dissection:*/
+				/* node bisector applied recursively, followed
+				 * by constrained minimum degree (CSYMAMD or
+				 * CCOLAMD) */
+#define CHOLMOD_COLAMD 5	/* use AMD for A, COLAMD for A*A' */
+
+/* POSTORDERED is not a method, but a result of natural ordering followed by a
+ * weighted postorder.  It is used for L->ordering, not method [ ].ordering. */
+#define CHOLMOD_POSTORDERED 6	/* natural ordering, postordered. */
+
+/* supernodal strategy (for Common->supernodal) */
+#define CHOLMOD_SIMPLICIAL 0	/* always do simplicial */
+#define CHOLMOD_AUTO 1		/* select simpl/super depending on matrix */
+#define CHOLMOD_SUPERNODAL 2	/* always do supernodal */
+
+typedef struct cholmod_common_struct
+{
+    /* ---------------------------------------------------------------------- */
+    /* parameters for symbolic/numeric factorization and update/downdate */
+    /* ---------------------------------------------------------------------- */
+
+    double dbound ;	/* Smallest absolute value of diagonal entries of D
+			 * for LDL' factorization and update/downdate/rowadd/
+	* rowdel, or the diagonal of L for an LL' factorization.
+	* Entries in the range 0 to dbound are replaced with dbound.
+	* Entries in the range -dbound to 0 are replaced with -dbound.  No
+	* changes are made to the diagonal if dbound <= 0.  Default: zero */
+
+    double grow0 ;	/* For a simplicial factorization, L->i and L->x can
+			 * grow if necessary.  grow0 is the factor by which
+	* it grows.  For the initial space, L is of size MAX (1,grow0) times
+	* the required space.  If L runs out of space, the new size of L is
+	* MAX(1.2,grow0) times the new required space.   If you do not plan on
+	* modifying the LDL' factorization in the Modify module, set grow0 to
+	* zero (or set grow2 to 0, see below).  Default: 1.2 */
+
+    double grow1 ;
+
+    size_t grow2 ;	/* For a simplicial factorization, each column j of L
+			 * is initialized with space equal to
+	* grow1*L->ColCount[j] + grow2.  If grow0 < 1, grow1 < 1, or grow2 == 0,
+	* then the space allocated is exactly equal to L->ColCount[j].  If the
+	* column j runs out of space, it increases to grow1*need + grow2 in
+	* size, where need is the total # of nonzeros in that column.  If you do
+	* not plan on modifying the factorization in the Modify module, set
+	* grow2 to zero.  Default: grow1 = 1.2, grow2 = 5. */
+
+    size_t maxrank ;	/* rank of maximum update/downdate.  Valid values:
+			 * 2, 4, or 8.  A value < 2 is set to 2, and a
+	* value > 8 is set to 8.  It is then rounded up to the next highest
+	* power of 2, if not already a power of 2.  Workspace (Xwork, below) of
+	* size nrow-by-maxrank double's is allocated for the update/downdate.
+	* If an update/downdate of rank-k is requested, with k > maxrank,
+	* it is done in steps of maxrank.  Default: 8, which is fastest.
+	* Memory usage can be reduced by setting maxrank to 2 or 4.
+	*/
+
+    double supernodal_switch ;	/* supernodal vs simplicial factorization */
+    int supernodal ;		/* If Common->supernodal <= CHOLMOD_SIMPLICIAL
+				 * (0) then cholmod_analyze performs a
+	* simplicial analysis.  If >= CHOLMOD_SUPERNODAL (2), then a supernodal
+	* analysis is performed.  If == CHOLMOD_AUTO (1) and
+	* flop/nnz(L) < Common->supernodal_switch, then a simplicial analysis
+	* is done.  A supernodal analysis done otherwise.
+	* Default:  CHOLMOD_AUTO.  Default supernodal_switch = 40 */
+
+    int final_asis ;	/* If TRUE, then ignore the other final_* parameters
+			 * (except for final_pack).
+			 * The factor is left as-is when done.  Default: TRUE.*/
+
+    int final_super ;	/* If TRUE, leave a factor in supernodal form when
+			 * supernodal factorization is finished.  If FALSE,
+			 * then convert to a simplicial factor when done.
+			 * Default: TRUE */
+
+    int final_ll ;	/* If TRUE, leave factor in LL' form when done.
+			 * Otherwise, leave in LDL' form.  Default: FALSE */
+
+    int final_pack ;	/* If TRUE, pack the columns when done.  If TRUE, and
+			 * cholmod_factorize is called with a symbolic L, L is
+	* allocated with exactly the space required, using L->ColCount.  If you
+	* plan on modifying the factorization, set Common->final_pack to FALSE,
+	* and each column will be given a little extra slack space for future
+	* growth in fill-in due to updates.  Default: TRUE */
+
+    int final_monotonic ;   /* If TRUE, ensure columns are monotonic when done.
+			 * Default: TRUE */
+
+    int final_resymbol ;/* if cholmod_factorize performed a supernodal
+			 * factorization, final_resymbol is true, and
+	* final_super is FALSE (convert a simplicial numeric factorization),
+	* then numerically zero entries that resulted from relaxed supernodal
+	* amalgamation are removed.  This does not remove entries that are zero
+	* due to exact numeric cancellation, since doing so would break the
+	* update/downdate rowadd/rowdel routines.  Default: FALSE. */
+
+    /* supernodal relaxed amalgamation parameters: */
+    double zrelax [3] ;
+    size_t nrelax [3] ;
+
+	/* Let ns be the total number of columns in two adjacent supernodes.
+	 * Let z be the fraction of zero entries in the two supernodes if they
+	 * are merged (z includes zero entries from prior amalgamations).  The
+	 * two supernodes are merged if:
+	 *    (ns <= nrelax [0]) || (no new zero entries added) ||
+	 *    (ns <= nrelax [1] && z < zrelax [0]) ||
+	 *    (ns <= nrelax [2] && z < zrelax [1]) || (z < zrelax [2])
+	 *
+	 * Default parameters result in the following rule:
+	 *    (ns <= 4) || (no new zero entries added) ||
+	 *    (ns <= 16 && z < 0.8) || (ns <= 48 && z < 0.1) || (z < 0.05)
+	 */
+
+    int prefer_zomplex ;    /* X = cholmod_solve (sys, L, B, Common) computes
+			     * x=A\b or solves a related system.  If L and B are
+	 * both real, then X is real.  Otherwise, X is returned as
+	 * CHOLMOD_COMPLEX if Common->prefer_zomplex is FALSE, or
+	 * CHOLMOD_ZOMPLEX if Common->prefer_zomplex is TRUE.  This parameter
+	 * is needed because there is no supernodal zomplex L.  Suppose the
+	 * caller wants all complex matrices to be stored in zomplex form
+	 * (MATLAB, for example).  A supernodal L is returned in complex form
+	 * if A is zomplex.  B can be real, and thus X = cholmod_solve (L,B)
+	 * should return X as zomplex.  This cannot be inferred from the input
+	 * arguments L and B.  Default: FALSE, since all data types are
+	 * supported in CHOLMOD_COMPLEX form and since this is the native type
+	 * of LAPACK and the BLAS.  Note that the MATLAB/cholmod.c mexFunction
+	 * sets this parameter to TRUE, since MATLAB matrices are in
+	 * CHOLMOD_ZOMPLEX form.
+	 */
+
+    int prefer_upper ;	    /* cholmod_analyze and cholmod_factorize work
+			     * fastest when a symmetric matrix is stored in
+	 * upper triangular form when a fill-reducing ordering is used.  In
+	 * MATLAB, this corresponds to how x=A\b works.  When the matrix is
+	 * ordered as-is, they work fastest when a symmetric matrix is in lower
+	 * triangular form.  In MATLAB, R=chol(A) does the opposite.  This
+	 * parameter affects only how cholmod_read returns a symmetric matrix.
+	 * If TRUE (the default case), a symmetric matrix is always returned in
+	 * upper-triangular form (A->stype = 1).  */
+
+    int quick_return_if_not_posdef ;	/* if TRUE, the supernodal numeric
+					 * factorization will return quickly if
+	* the matrix is not positive definite.  Default: FALSE. */
+
+    /* ---------------------------------------------------------------------- */
+    /* printing and error handling options */
+    /* ---------------------------------------------------------------------- */
+
+    int print ;		/* print level. Default: 3 */
+    int precise ;	/* if TRUE, print 16 digits.  Otherwise print 5 */
+    int (*print_function) (const char *, ...) ;	/* pointer to printf */
+
+    int try_catch ;	/* if TRUE, then ignore errors; CHOLMOD is in the middle
+			 * of a try/catch block.  No error message is printed
+	 * and the Common->error_handler function is not called. */
+
+    void (*error_handler) (int status, const char *file,
+        int line, const char *message) ;
+
+	/* Common->error_handler is the user's error handling routine.  If not
+	 * NULL, this routine is called if an error occurs in CHOLMOD.  status
+	 * can be CHOLMOD_OK (0), negative for a fatal error, and positive for
+	 * a warning. file is a string containing the name of the source code
+	 * file where the error occured, and line is the line number in that
+	 * file.  message is a string describing the error in more detail. */
+
+    /* ---------------------------------------------------------------------- */
+    /* ordering options */
+    /* ---------------------------------------------------------------------- */
+
+    /* The cholmod_analyze routine can try many different orderings and select
+     * the best one.  It can also try one ordering method multiple times, with
+     * different parameter settings.  The default is to use three orderings,
+     * the user's permutation (if provided), AMD which is the fastest ordering
+     * and generally gives good fill-in, and METIS.  CHOLMOD's nested dissection
+     * (METIS with a constrained AMD) usually gives a better ordering than METIS
+     * alone (by about 5% to 10%) but it takes more time.
+     *
+     * If you know the method that is best for your matrix, set Common->nmethods
+     * to 1 and set Common->method [0] to the set of parameters for that method.
+     * If you set it to 1 and do not provide a permutation, then only AMD will
+     * be called.
+     *
+     * If METIS is not available, the default # of methods tried is 2 (the user
+     * permutation, if any, and AMD).
+     *
+     * To try other methods, set Common->nmethods to the number of methods you
+     * want to try.  The suite of default methods and their parameters is
+     * described in the cholmod_defaults routine, and summarized here:
+     *
+     *	    Common->method [i]:
+     *	    i = 0: user-provided ordering (cholmod_analyze_p only)
+     *	    i = 1: AMD (for both A and A*A')
+     *	    i = 2: METIS
+     *	    i = 3: CHOLMOD's nested dissection (NESDIS), default parameters
+     *	    i = 4: natural
+     *	    i = 5: NESDIS with nd_small = 20000
+     *	    i = 6: NESDIS with nd_small = 4, no constrained minimum degree
+     *	    i = 7: NESDIS with no dense node removal
+     *	    i = 8: AMD for A, COLAMD for A*A'
+     *
+     * You can modify the suite of methods you wish to try by modifying
+     * Common.method [...] after calling cholmod_start or cholmod_defaults.
+     *
+     * For example, to use AMD, followed by a weighted postordering:
+     *
+     *	    Common->nmethods = 1 ;
+     *	    Common->method [0].ordering = CHOLMOD_AMD ;
+     *	    Common->postorder = TRUE ;
+     *
+     * To use the natural ordering (with no postordering):
+     *
+     *	    Common->nmethods = 1 ;
+     *	    Common->method [0].ordering = CHOLMOD_NATURAL ;
+     *	    Common->postorder = FALSE ;
+     *
+     * If you are going to factorize hundreds or more matrices with the same
+     * nonzero pattern, you may wish to spend a great deal of time finding a
+     * good permutation.  In this case, try setting Common->nmethods to 9.
+     * The time spent in cholmod_analysis will be very high, but you need to
+     * call it only once.
+     *
+     * cholmod_analyze sets Common->current to a value between 0 and nmethods-1.
+     * Each ordering method uses the set of options defined by this parameter.
+     */
+
+    int nmethods ;	/* The number of ordering methods to try.  Default: 0.
+			 * nmethods = 0 is a special case.  cholmod_analyze
+	* will try the user-provided ordering (if given) and AMD.  Let fl and
+	* lnz be the flop count and nonzeros in L from AMD's ordering.  Let
+	* anz be the number of nonzeros in the upper or lower triangular part
+	* of the symmetric matrix A.  If fl/lnz < 500 or lnz/anz < 5, then this
+	* is a good ordering, and METIS is not attempted.  Otherwise, METIS is
+	* tried.   The best ordering found is used.  If nmethods > 0, the
+	* methods used are given in the method[ ] array, below.  The first
+	* three methods in the default suite of orderings is (1) use the given
+	* permutation (if provided), (2) use AMD, and (3) use METIS.  Maximum
+	* allowed value is CHOLMOD_MAXMETHODS.  */
+
+    int current ;	/* The current method being tried.  Default: 0.  Valid
+			 * range is 0 to nmethods-1. */
+
+    int selected ;	/* The best method found. */
+
+    /* The suite of ordering methods and parameters: */
+
+    struct cholmod_method_struct
+    {
+	/* statistics for this method */
+	double lnz ;	    /* nnz(L) excl. zeros from supernodal amalgamation,
+			     * for a "pure" L */
+
+	double fl ;	    /* flop count for a "pure", real simplicial LL'
+			     * factorization, with no extra work due to
+	    * amalgamation.  Subtract n to get the LDL' flop count.   Multiply
+	    * by about 4 if the matrix is complex or zomplex. */
+
+	/* ordering method parameters */
+	double prune_dense ;/* dense row/col control for AMD, SYMAMD, CSYMAMD,
+			     * and NESDIS (cholmod_nested_dissection).  For a
+	    * symmetric n-by-n matrix, rows/columns with more than
+	    * MAX (16, prune_dense * sqrt (n)) entries are removed prior to
+	    * ordering.  They appear at the end of the re-ordered matrix.
+	    *
+	    * If prune_dense < 0, only completely dense rows/cols are removed.
+	    *
+	    * This paramater is also the dense column control for COLAMD and
+	    * CCOLAMD.  For an m-by-n matrix, columns with more than
+	    * MAX (16, prune_dense * sqrt (MIN (m,n))) entries are removed prior
+	    * to ordering.  They appear at the end of the re-ordered matrix.
+	    * CHOLMOD factorizes A*A', so it calls COLAMD and CCOLAMD with A',
+	    * not A.  Thus, this parameter affects the dense *row* control for
+	    * CHOLMOD's matrix, and the dense *column* control for COLAMD and
+	    * CCOLAMD.
+	    *
+	    * Removing dense rows and columns improves the run-time of the
+	    * ordering methods.  It has some impact on ordering quality
+	    * (usually minimal, sometimes good, sometimes bad).
+	    *
+	    * Default: 10. */
+
+	double prune_dense2 ;/* dense row control for COLAMD and CCOLAMD.
+			    *  Rows with more than MAX (16, dense2 * sqrt (n))
+	    * for an m-by-n matrix are removed prior to ordering.  CHOLMOD's
+	    * matrix is transposed before ordering it with COLAMD or CCOLAMD,
+	    * so this controls the dense *columns* of CHOLMOD's matrix, and
+	    * the dense *rows* of COLAMD's or CCOLAMD's matrix.
+	    *
+	    * If prune_dense2 < 0, only completely dense rows/cols are removed.
+	    *
+	    * Default: -1.  Note that this is not the default for COLAMD and
+	    * CCOLAMD.  -1 is best for Cholesky.  10 is best for LU.  */
+
+	double nd_oksep ;   /* in NESDIS, when a node separator is computed, it
+			     * discarded if nsep >= nd_oksep*n, where nsep is
+	    * the number of nodes in the separator, and n is the size of the
+	    * graph being cut.  Valid range is 0 to 1.  If 1 or greater, the
+	    * separator is discarded if it consists of the entire graph.
+	    * Default: 1 */
+
+	double other1 [4] ; /* future expansion */
+
+	size_t nd_small ;    /* do not partition graphs with fewer nodes than
+			     * nd_small, in NESDIS.  Default: 200 (same as
+			     * METIS) */
+
+	size_t other2 [4] ; /* future expansion */
+
+	int aggressive ;    /* Aggresive absorption in AMD, COLAMD, SYMAMD,
+			     * CCOLAMD, and CSYMAMD.  Default: TRUE */
+
+	int order_for_lu ;  /* CCOLAMD can be optimized to produce an ordering
+			     * for LU or Cholesky factorization.  CHOLMOD only
+	    * performs a Cholesky factorization.  However, you may wish to use
+	    * CHOLMOD as an interface for CCOLAMD but use it for your own LU
+	    * factorization.  In this case, order_for_lu should be set to FALSE.
+	    * When factorizing in CHOLMOD itself, you should *** NEVER *** set
+	    * this parameter FALSE.  Default: TRUE. */
+
+	int nd_compress ;   /* If TRUE, compress the graph and subgraphs before
+			     * partitioning them in NESDIS.  Default: TRUE */
+
+	int nd_camd ;	    /* If 1, follow the nested dissection ordering
+			     * with a constrained minimum degree ordering that
+	    * respects the partitioning just found (using CAMD).  If 2, use
+	    * CSYMAMD instead.  If you set nd_small very small, you may not need
+	    * this ordering, and can save time by setting it to zero (no
+	    * constrained minimum degree ordering).  Default: 1. */
+
+	int nd_components ; /* The nested dissection ordering finds a node
+			     * separator that splits the graph into two parts,
+	    * which may be unconnected.  If nd_components is TRUE, each of
+	    * these connected components is split independently.  If FALSE,
+	    * each part is split as a whole, even if it consists of more than
+	    * one connected component.  Default: FALSE */
+
+	/* fill-reducing ordering to use */
+	int ordering ;
+
+	size_t other3 [4] ; /* future expansion */
+
+    } method [CHOLMOD_MAXMETHODS + 1] ;
+
+    int postorder ;	/* If TRUE, cholmod_analyze follows the ordering with a
+			 * weighted postorder of the elimination tree.  Improves
+	* supernode amalgamation.  Does not affect fundamental nnz(L) and
+	* flop count.  Default: TRUE. */
+
+    /* ---------------------------------------------------------------------- */
+    /* memory management routines */
+    /* ---------------------------------------------------------------------- */
+
+    void *(*malloc_memory) (size_t) ;		/* pointer to malloc */
+    void *(*realloc_memory) (void *, size_t) ;  /* pointer to realloc */
+    void (*free_memory) (void *) ;		/* pointer to free */
+    void *(*calloc_memory) (size_t, size_t) ;	/* pointer to calloc */
+
+    /* ---------------------------------------------------------------------- */
+    /* routines for complex arithmetic */
+    /* ---------------------------------------------------------------------- */
+
+    int (*complex_divide) (double ax, double az, double bx, double bz,
+	    double *cx, double *cz) ;
+
+	/* flag = complex_divide (ax, az, bx, bz, &cx, &cz) computes the complex
+	 * division c = a/b, where ax and az hold the real and imaginary part
+	 * of a, and b and c are stored similarly.  flag is returned as 1 if
+	 * a divide-by-zero occurs, or 0 otherwise.  By default, the function
+	 * pointer Common->complex_divide is set equal to cholmod_divcomplex.
+	 */
+
+    double (*hypotenuse) (double x, double y) ;
+
+	/* s = hypotenuse (x,y) computes s = sqrt (x*x + y*y), but does so more
+	 * accurately.  By default, the function pointer Common->hypotenuse is
+	 * set equal to cholmod_hypot.  See also the hypot function in the C99
+	 * standard, which has an identical syntax and function.  If you have
+	 * a C99-compliant compiler, you can set Common->hypotenuse = hypot.  */
+
+    /* ---------------------------------------------------------------------- */
+    /* METIS workarounds */
+    /* ---------------------------------------------------------------------- */
+
+    double metis_memory ;   /* This is a parameter for CHOLMOD's interface to
+			     * METIS, not a parameter to METIS itself.  METIS
+	* uses an amount of memory that is difficult to estimate precisely
+	* beforehand.  If it runs out of memory, it terminates your program.
+	* All routines in CHOLMOD except for CHOLMOD's interface to METIS
+	* return an error status and safely return to your program if they run
+	* out of memory.  To mitigate this problem, the CHOLMOD interface
+	* can allocate a single block of memory equal in size to an empirical
+	* upper bound of METIS's memory usage times the Common->metis_memory
+	* parameter, and then immediately free it.  It then calls METIS.  If
+	* this pre-allocation fails, it is possible that METIS will fail as
+	* well, and so CHOLMOD returns with an out-of-memory condition without
+	* calling METIS.
+	*
+	* METIS_NodeND (used in the CHOLMOD_METIS ordering option) with its
+	* default parameter settings typically uses about (4*nz+40n+4096)
+	* times sizeof(int) memory, where nz is equal to the number of entries
+	* in A for the symmetric case or AA' if an unsymmetric matrix is
+	* being ordered (where nz includes both the upper and lower parts
+	* of A or AA').  The observed "upper bound" (with 2 exceptions),
+	* measured in an instrumented copy of METIS 4.0.1 on thousands of
+	* matrices, is (10*nz+50*n+4096) * sizeof(int).  Two large matrices
+	* exceeded this bound, one by almost a factor of 2 (Gupta/gupta2).
+	*
+	* If your program is terminated by METIS, try setting metis_memory to
+	* 2.0, or even higher if needed.  By default, CHOLMOD assumes that METIS
+	* does not have this problem (so that CHOLMOD will work correctly when
+	* this issue is fixed in METIS).  Thus, the default value is zero.
+	* This work-around is not guaranteed anyway.
+	*
+	* If a matrix exceeds this predicted memory usage, AMD is attempted
+	* instead.  It, too, may run out of memory, but if it does so it will
+	* not terminate your program.
+	*/
+
+    double metis_dswitch ;	/* METIS_NodeND in METIS 4.0.1 gives a seg */
+    size_t metis_nswitch ;	/* fault with one matrix of order n = 3005 and
+				 * nz = 6,036,025.  This is a very dense graph.
+     * The workaround is to use AMD instead of METIS for matrices of dimension
+     * greater than Common->metis_nswitch (default 3000) or more and with
+     * density of Common->metis_dswitch (default 0.66) or more.
+     * cholmod_nested_dissection has no problems with the same matrix, even
+     * though it uses METIS_NodeComputeSeparator on this matrix.  If this
+     * seg fault does not affect you, set metis_nswitch to zero or less,
+     * and CHOLMOD will not switch to AMD based just on the density of the
+     * matrix (it will still switch to AMD if the metis_memory parameter
+     * causes the switch).
+     */
+
+    /* ---------------------------------------------------------------------- */
+    /* workspace */
+    /* ---------------------------------------------------------------------- */
+
+    /* CHOLMOD has several routines that take less time than the size of
+     * workspace they require.  Allocating and initializing the workspace would
+     * dominate the run time, unless workspace is allocated and initialized
+     * just once.  CHOLMOD allocates this space when needed, and holds it here
+     * between calls to CHOLMOD.  cholmod_start sets these pointers to NULL
+     * (which is why it must be the first routine called in CHOLMOD).
+     * cholmod_finish frees the workspace (which is why it must be the last
+     * call to CHOLMOD).
+     */
+
+    size_t nrow ;	/* size of Flag and Head */
+    UF_long mark ;	/* mark value for Flag array */
+    size_t iworksize ;	/* size of Iwork.  Upper bound: 6*nrow+ncol */
+    size_t xworksize ;	/* size of Xwork,  in bytes.
+			 * maxrank*nrow*sizeof(double) for update/downdate.
+			 * 2*nrow*sizeof(double) otherwise */
+
+    /* initialized workspace: contents needed between calls to CHOLMOD */
+    void *Flag ;	/* size nrow, an integer array.  Kept cleared between
+			 * calls to cholmod rouines (Flag [i] < mark) */
+
+    void *Head ;	/* size nrow+1, an integer array. Kept cleared between
+			 * calls to cholmod routines (Head [i] = EMPTY) */
+
+    void *Xwork ; 	/* a double array.  Its size varies.  It is nrow for
+			 * most routines (cholmod_rowfac, cholmod_add,
+	* cholmod_aat, cholmod_norm, cholmod_ssmult) for the real case, twice
+	* that when the input matrices are complex or zomplex.  It is of size
+	* 2*nrow for cholmod_rowadd and cholmod_rowdel.  For cholmod_updown,
+	* its size is maxrank*nrow where maxrank is 2, 4, or 8.  Kept cleared
+	* between calls to cholmod (set to zero). */
+
+    /* uninitialized workspace, contents not needed between calls to CHOLMOD */
+    void *Iwork ;	/* size iworksize, 2*nrow+ncol for most routines,
+			 * up to 6*nrow+ncol for cholmod_analyze. */
+
+    int itype ;		/* If CHOLMOD_LONG, Flag, Head, and Iwork are UF_long.
+			 * Otherwise all three arrays are int. */
+
+    int dtype ;		/* double or float */
+
+	/* Common->itype and Common->dtype are used to define the types of all
+	 * sparse matrices, triplet matrices, dense matrices, and factors
+	 * created using this Common struct.  The itypes and dtypes of all
+	 * parameters to all CHOLMOD routines must match.  */
+
+    int no_workspace_reallocate ;   /* this is an internal flag, used as a
+	* precaution by cholmod_analyze.  It is normally false.  If true,
+	* cholmod_allocate_work is not allowed to reallocate any workspace;
+	* they must use the existing workspace in Common (Iwork, Flag, Head,
+	* and Xwork).  Added for CHOLMOD v1.1 */
+
+    /* ---------------------------------------------------------------------- */
+    /* statistics */
+    /* ---------------------------------------------------------------------- */
+
+    /* fl and lnz are set only in cholmod_analyze and cholmod_rowcolcounts,
+     * in the Cholesky modudle.  modfl is set only in the Modify module. */
+
+    int status ;	    /* error code */
+    double fl ;		    /* LL' flop count from most recent analysis */
+    double lnz ;	    /* fundamental nz in L */
+    double anz ;	    /* nonzeros in tril(A) if A is symmetric/lower,
+			     * triu(A) if symmetric/upper, or tril(A*A') if
+			     * unsymmetric, in last call to cholmod_analyze. */
+    double modfl ;	    /* flop count from most recent update/downdate/
+			     * rowadd/rowdel (excluding flops to modify the
+			     * solution to Lx=b, if computed) */
+    size_t malloc_count ;   /* # of objects malloc'ed minus the # free'd*/
+    size_t memory_usage ;   /* peak memory usage in bytes */
+    size_t memory_inuse ;   /* current memory usage in bytes */
+
+    double nrealloc_col ;   /* # of column reallocations */
+    double nrealloc_factor ;/* # of factor reallocations due to col. reallocs */
+    double ndbounds_hit ;   /* # of times diagonal modified by dbound */
+
+    double rowfacfl ;	    /* # of flops in last call to cholmod_rowfac */
+    double aatfl ;	    /* # of flops to compute A(:,f)*A(:,f)' */
+
+    /* ---------------------------------------------------------------------- */
+    /* future expansion */
+    /* ---------------------------------------------------------------------- */
+
+    /* To allow CHOLMOD to be updated without recompiling the user application,
+     * additional space is set aside here for future statistics, parameters,
+     * and workspace.  Note:  additional entries were added in v1.1 to the
+     * method array, above, and thus v1.0 and v1.1 are not binary compatible.
+     *
+     * v1.1 to the current version are binary compatible.
+     */
+
+    /* ---------------------------------------------------------------------- */
+    double other1 [10] ;
+
+    double SPQR_xstat [4] ;     /* for SuiteSparseQR statistics */
+
+    /* SuiteSparseQR control parameters: */
+    double SPQR_grain ;         /* task size is >= max (total flops / grain) */
+    double SPQR_small ;         /* task size is >= small */
+
+    /* ---------------------------------------------------------------------- */
+    UF_long SPQR_istat [10] ;   /* for SuiteSparseQR statistics */
+    UF_long other2 [6] ;        /* reduced from size 16 in v1.6 */
+
+    /* ---------------------------------------------------------------------- */
+    int other3 [10] ;       /* reduced from size 16 in v1.1. */
+
+    int prefer_binary ;	    /* cholmod_read_triplet converts a symmetric
+			     * pattern-only matrix into a real matrix.  If
+	* prefer_binary is FALSE, the diagonal entries are set to 1 + the degree
+	* of the row/column, and off-diagonal entries are set to -1 (resulting
+	* in a positive definite matrix if the diagonal is zero-free).  Most
+	* symmetric patterns are the pattern a positive definite matrix.  If
+	* this parameter is TRUE, then the matrix is returned with a 1 in each
+	* entry, instead.  Default: FALSE.  Added in v1.3. */
+
+    /* control parameter (added for v1.2): */
+    int default_nesdis ;    /* Default: FALSE.  If FALSE, then the default
+			     * ordering strategy (when Common->nmethods == 0)
+	* is to try the given ordering (if present), AMD, and then METIS if AMD
+	* reports high fill-in.  If Common->default_nesdis is TRUE then NESDIS
+	* is used instead in the default strategy. */
+
+    /* statistic (added for v1.2): */
+    int called_nd ;	    /* TRUE if the last call to
+			     * cholmod_analyze called NESDIS or METIS. */
+
+    int blas_ok ;           /* FALSE if BLAS int overflow; TRUE otherwise */
+
+    /* SuiteSparseQR control parameters: */
+    int SPQR_shrink ;        /* controls stack realloc method */
+    int SPQR_nthreads ;      /* number of TBB threads, 0 = auto */
+
+    /* ---------------------------------------------------------------------- */
+    size_t  other4 [16] ;
+
+    /* ---------------------------------------------------------------------- */
+    void   *other5 [16] ;
+
+} cholmod_common ;
+
+// in ../../src/CHOLMOD/Include/cholmod_core.h  skip forward to - line 1114 :
+/* A sparse matrix stored in compressed-column form. */
+
+typedef struct cholmod_sparse_struct
+{
+    size_t nrow ;	/* the matrix is nrow-by-ncol */
+    size_t ncol ;
+    size_t nzmax ;	/* maximum number of entries in the matrix */
+
+    /* pointers to int or UF_long: */
+    void *p ;		/* p [0..ncol], the column pointers */
+    void *i ;		/* i [0..nzmax-1], the row indices */
+
+    /* for unpacked matrices only: */
+    void *nz ;		/* nz [0..ncol-1], the # of nonzeros in each col.  In
+			 * packed form, the nonzero pattern of column j is in
+	* A->i [A->p [j] ... A->p [j+1]-1].  In unpacked form, column j is in
+	* A->i [A->p [j] ... A->p [j]+A->nz[j]-1] instead.  In both cases, the
+	* numerical values (if present) are in the corresponding locations in
+	* the array x (or z if A->xtype is CHOLMOD_ZOMPLEX). */
+
+    /* pointers to double or float: */
+    void *x ;		/* size nzmax or 2*nzmax, if present */
+    void *z ;		/* size nzmax, if present */
+
+    int stype ;		/* Describes what parts of the matrix are considered:
+			 *
+	* 0:  matrix is "unsymmetric": use both upper and lower triangular parts
+	*     (the matrix may actually be symmetric in pattern and value, but
+	*     both parts are explicitly stored and used).  May be square or
+	*     rectangular.
+	* >0: matrix is square and symmetric, use upper triangular part.
+	*     Entries in the lower triangular part are ignored.
+	* <0: matrix is square and symmetric, use lower triangular part.
+	*     Entries in the upper triangular part are ignored.
+	*
+	* Note that stype>0 and stype<0 are different for cholmod_sparse and
+	* cholmod_triplet.  See the cholmod_triplet data structure for more
+	* details.
+	*/
+
+    int itype ;		/* CHOLMOD_INT:     p, i, and nz are int.
+			 * CHOLMOD_INTLONG: p is UF_long, i and nz are int.
+			 * CHOLMOD_LONG:    p, i, and nz are UF_long.  */
+
+    int xtype ;		/* pattern, real, complex, or zomplex */
+    int dtype ;		/* x and z are double or float */
+    int sorted ;	/* TRUE if columns are sorted, FALSE otherwise */
+    int packed ;	/* TRUE if packed (nz ignored), FALSE if unpacked
+			 * (nz is required) */
+
+} cholmod_sparse ;
+
+// in ../../src/CHOLMOD/Include/cholmod_core.h  skip forward to - line 1554 :
+/* A symbolic and numeric factorization, either simplicial or supernodal.
+ * In all cases, the row indices in the columns of L are kept sorted. */
+
+typedef struct cholmod_factor_struct
+{
+    /* ---------------------------------------------------------------------- */
+    /* for both simplicial and supernodal factorizations */
+    /* ---------------------------------------------------------------------- */
+
+    size_t n ;		/* L is n-by-n */
+
+    size_t minor ;	/* If the factorization failed, L->minor is the column
+			 * at which it failed (in the range 0 to n-1).  A value
+			 * of n means the factorization was successful or
+			 * the matrix has not yet been factorized. */
+
+    /* ---------------------------------------------------------------------- */
+    /* symbolic ordering and analysis */
+    /* ---------------------------------------------------------------------- */
+
+    void *Perm ;	/* size n, permutation used */
+    void *ColCount ;	/* size n, column counts for simplicial L */
+
+    void *IPerm ;       /* size n, inverse permutation.  Only created by
+                         * cholmod_solve2 if Bset is used. */
+
+    /* ---------------------------------------------------------------------- */
+    /* simplicial factorization */
+    /* ---------------------------------------------------------------------- */
+
+    size_t nzmax ;	/* size of i and x */
+
+    void *p ;		/* p [0..ncol], the column pointers */
+    void *i ;		/* i [0..nzmax-1], the row indices */
+    void *x ;		/* x [0..nzmax-1], the numerical values */
+    void *z ;
+    void *nz ;		/* nz [0..ncol-1], the # of nonzeros in each column.
+			 * i [p [j] ... p [j]+nz[j]-1] contains the row indices,
+			 * and the numerical values are in the same locatins
+			 * in x. The value of i [p [k]] is always k. */
+
+    void *next ;	/* size ncol+2. next [j] is the next column in i/x */
+    void *prev ;	/* size ncol+2. prev [j] is the prior column in i/x.
+			 * head of the list is ncol+1, and the tail is ncol. */
+
+    /* ---------------------------------------------------------------------- */
+    /* supernodal factorization */
+    /* ---------------------------------------------------------------------- */
+
+    /* Note that L->x is shared with the simplicial data structure.  L->x has
+     * size L->nzmax for a simplicial factor, and size L->xsize for a supernodal
+     * factor. */
+
+    size_t nsuper ;	/* number of supernodes */
+    size_t ssize ;	/* size of s, integer part of supernodes */
+    size_t xsize ;	/* size of x, real part of supernodes */
+    size_t maxcsize ;	/* size of largest update matrix */
+    size_t maxesize ;	/* max # of rows in supernodes, excl. triangular part */
+
+    void *super ;	/* size nsuper+1, first col in each supernode */
+    void *pi ;		/* size nsuper+1, pointers to integer patterns */
+    void *px ;		/* size nsuper+1, pointers to real parts */
+    void *s ;		/* size ssize, integer part of supernodes */
+
+    /* ---------------------------------------------------------------------- */
+    /* factorization type */
+    /* ---------------------------------------------------------------------- */
+
+    int ordering ;	/* ordering method used */
+
+    int is_ll ;		/* TRUE if LL', FALSE if LDL' */
+    int is_super ;	/* TRUE if supernodal, FALSE if simplicial */
+    int is_monotonic ;	/* TRUE if columns of L appear in order 0..n-1.
+			 * Only applicable to simplicial numeric types. */
+
+    /* There are 8 types of factor objects that cholmod_factor can represent
+     * (only 6 are used):
+     *
+     * Numeric types (xtype is not CHOLMOD_PATTERN)
+     * --------------------------------------------
+     *
+     * simplicial LDL':  (is_ll FALSE, is_super FALSE).  Stored in compressed
+     *	    column form, using the simplicial components above (nzmax, p, i,
+     *	    x, z, nz, next, and prev).  The unit diagonal of L is not stored,
+     *	    and D is stored in its place.  There are no supernodes.
+     *
+     * simplicial LL': (is_ll TRUE, is_super FALSE).  Uses the same storage
+     *	    scheme as the simplicial LDL', except that D does not appear.
+     *	    The first entry of each column of L is the diagonal entry of
+     *	    that column of L.
+     *
+     * supernodal LDL': (is_ll FALSE, is_super TRUE).  Not used.
+     *	    FUTURE WORK:  add support for supernodal LDL'
+     *
+     * supernodal LL': (is_ll TRUE, is_super TRUE).  A supernodal factor,
+     *	    using the supernodal components described above (nsuper, ssize,
+     *	    xsize, maxcsize, maxesize, super, pi, px, s, x, and z).
+     *
+     *
+     * Symbolic types (xtype is CHOLMOD_PATTERN)
+     * -----------------------------------------
+     *
+     * simplicial LDL': (is_ll FALSE, is_super FALSE).  Nothing is present
+     *	    except Perm and ColCount.
+     *
+     * simplicial LL': (is_ll TRUE, is_super FALSE).  Identical to the
+     *	    simplicial LDL', except for the is_ll flag.
+     *
+     * supernodal LDL': (is_ll FALSE, is_super TRUE).  Not used.
+     *	    FUTURE WORK:  add support for supernodal LDL'
+     *
+     * supernodal LL': (is_ll TRUE, is_super TRUE).  A supernodal symbolic
+     *	    factorization.  The simplicial symbolic information is present
+     *	    (Perm and ColCount), as is all of the supernodal factorization
+     *	    except for the numerical values (x and z).
+     */
+
+    int itype ; /* The integer arrays are Perm, ColCount, p, i, nz,
+                 * next, prev, super, pi, px, and s.  If itype is
+		 * CHOLMOD_INT, all of these are int arrays.
+		 * CHOLMOD_INTLONG: p, pi, px are SuiteSparse_long, others int.
+		 * CHOLMOD_LONG:    all integer arrays are SuiteSparse_long. */
+    int xtype ; /* pattern, real, complex, or zomplex */
+    int dtype ; /* x and z double or float */
+
+} cholmod_factor ;
+
+// in ../../src/CHOLMOD/Include/cholmod_core.h  skip forward to - line 1836 :
+/* A dense matrix in column-oriented form.  It has no itype since it contains
+ * no integers.  Entry in row i and column j is located in x [i+j*d].
+ */
+
+typedef struct cholmod_dense_struct
+{
+    size_t nrow ;	/* the matrix is nrow-by-ncol */
+    size_t ncol ;
+    size_t nzmax ;	/* maximum number of entries in the matrix */
+    size_t d ;		/* leading dimension (d >= nrow must hold) */
+    void *x ;		/* size nzmax or 2*nzmax, if present */
+    void *z ;		/* size nzmax, if present */
+    int xtype ;		/* pattern, real, complex, or zomplex */
+    int dtype ;		/* x and z double or float */
+
+} cholmod_dense ;
+
+// in ../../src/CHOLMOD/Include/cholmod_core.h  skip forward to - line 2033 :
+/* A sparse matrix stored in triplet form. */
+
+typedef struct cholmod_triplet_struct
+{
+    size_t nrow ;	/* the matrix is nrow-by-ncol */
+    size_t ncol ;
+    size_t nzmax ;	/* maximum number of entries in the matrix */
+    size_t nnz ;	/* number of nonzeros in the matrix */
+
+    void *i ;		/* i [0..nzmax-1], the row indices */
+    void *j ;		/* j [0..nzmax-1], the column indices */
+    void *x ;		/* size nzmax or 2*nzmax, if present */
+    void *z ;		/* size nzmax, if present */
+
+    int stype ;		/* Describes what parts of the matrix are considered:
+			 *
+	* 0:  matrix is "unsymmetric": use both upper and lower triangular parts
+	*     (the matrix may actually be symmetric in pattern and value, but
+	*     both parts are explicitly stored and used).  May be square or
+	*     rectangular.
+	* >0: matrix is square and symmetric.  Entries in the lower triangular
+	*     part are transposed and added to the upper triangular part when
+	*     the matrix is converted to cholmod_sparse form.
+	* <0: matrix is square and symmetric.  Entries in the upper triangular
+	*     part are transposed and added to the lower triangular part when
+	*     the matrix is converted to cholmod_sparse form.
+	*
+	* Note that stype>0 and stype<0 are different for cholmod_sparse and
+	* cholmod_triplet.  The reason is simple.  You can permute a symmetric
+	* triplet matrix by simply replacing a row and column index with their
+	* new row and column indices, via an inverse permutation.  Suppose
+	* P = L->Perm is your permutation, and Pinv is an array of size n.
+	* Suppose a symmetric matrix A is represent by a triplet matrix T, with
+	* entries only in the upper triangular part.  Then the following code:
+	*
+	*	Ti = T->i ;
+	*	Tj = T->j ;
+	*	for (k = 0 ; k < n  ; k++) Pinv [P [k]] = k ;
+	*	for (k = 0 ; k < nz ; k++) Ti [k] = Pinv [Ti [k]] ;
+	*	for (k = 0 ; k < nz ; k++) Tj [k] = Pinv [Tj [k]] ;
+	*
+	* creates the triplet form of C=P*A*P'.  However, if T initially
+	* contains just the upper triangular entries (T->stype = 1), after
+	* permutation it has entries in both the upper and lower triangular
+	* parts.  These entries should be transposed when constructing the
+	* cholmod_sparse form of A, which is what cholmod_triplet_to_sparse
+	* does.  Thus:
+	*
+	*	C = cholmod_triplet_to_sparse (T, 0, &Common) ;
+	*
+	* will return the matrix C = P*A*P'.
+	*
+	* Since the triplet matrix T is so simple to generate, it's quite easy
+	* to remove entries that you do not want, prior to converting T to the
+	* cholmod_sparse form.  So if you include these entries in T, CHOLMOD
+	* assumes that there must be a reason (such as the one above).  Thus,
+	* no entry in a triplet matrix is ever ignored.
+	*/
+
+    int itype ; /* CHOLMOD_LONG: i and j are SuiteSparse_long.  Otherwise int */
+    int xtype ; /* pattern, real, complex, or zomplex */
+    int dtype ; /* x and z are double or float */
+
+} cholmod_triplet ;
+
+// -------- our (Matrix)  short and const_ forms of of the pointers :
+typedef       cholmod_common*        CHM_CM;
+typedef       cholmod_dense*         CHM_DN;
+typedef const cholmod_dense*   const_CHM_DN;
+typedef       cholmod_factor*        CHM_FR;
+typedef const cholmod_factor*  const_CHM_FR;
+typedef       cholmod_sparse*        CHM_SP;
+typedef const cholmod_sparse*  const_CHM_SP;
+typedef       cholmod_triplet*       CHM_TR;
+typedef const cholmod_triplet* const_CHM_TR;
+
+
+// --------- Matrix ("M_") R ("R_") pkg  routines "re-exported": ---------------
+
+int M_R_cholmod_start(CHM_CM);
+void M_R_cholmod_error(int status, const char *file, int line, const char *message);
+int M_cholmod_finish(CHM_CM);
+
+CHM_SP M_cholmod_allocate_sparse(size_t nrow, size_t ncol,
+				 size_t nzmax, int sorted,
+				 int packed, int stype, int xtype,
+				 CHM_CM);
+int M_cholmod_free_factor(CHM_FR *L, CHM_CM);
+int M_cholmod_free_dense(CHM_DN *A, CHM_CM);
+int M_cholmod_free_sparse(CHM_SP *A, CHM_CM);
+int M_cholmod_free_triplet(CHM_TR *T, CHM_CM);
+
+long M_cholmod_nnz(const_CHM_SP, CHM_CM);
+CHM_SP M_cholmod_speye(size_t nrow, size_t ncol, int xtype, CHM_CM);
+CHM_SP M_cholmod_transpose(const_CHM_SP, int values, CHM_CM);
+int M_cholmod_sort(CHM_SP A, CHM_CM);
+CHM_SP M_cholmod_vertcat(const_CHM_SP, const_CHM_SP, int values, CHM_CM);
+CHM_SP M_cholmod_copy(const_CHM_SP, int stype, int mode, CHM_CM);
+CHM_SP M_cholmod_add(const_CHM_SP, const_CHM_SP, double alpha [2], double beta [2],
+		     int values, int sorted, CHM_CM);
+
+// from ../../src/CHOLMOD/Include/cholmod_cholesky.h - line 178 :
+#define CHOLMOD_A    0		/* solve Ax=b */
+#define CHOLMOD_LDLt 1		/* solve LDL'x=b */
+#define CHOLMOD_LD   2		/* solve LDx=b */
+#define CHOLMOD_DLt  3		/* solve DL'x=b */
+#define CHOLMOD_L    4		/* solve Lx=b */
+#define CHOLMOD_Lt   5		/* solve L'x=b */
+#define CHOLMOD_D    6		/* solve Dx=b */
+#define CHOLMOD_P    7		/* permute x=Px */
+#define CHOLMOD_Pt   8		/* permute x=P'x */
+
+CHM_DN M_cholmod_solve(int, const_CHM_FR, const_CHM_DN, CHM_CM);
+CHM_SP M_cholmod_spsolve(int, const_CHM_FR, const_CHM_SP, CHM_CM);
+int M_cholmod_sdmult(const_CHM_SP, int, const double*, const double*,
+		     const_CHM_DN, CHM_DN Y, CHM_CM);
+CHM_SP M_cholmod_ssmult(const_CHM_SP, const_CHM_SP, int, int, int,
+			CHM_CM);
+int M_cholmod_factorize(const_CHM_SP, CHM_FR L, CHM_CM);
+int M_cholmod_factorize_p(const_CHM_SP, double *beta, int *fset,
+			  size_t fsize, CHM_FR L, CHM_CM);
+CHM_SP M_cholmod_copy_sparse(const_CHM_SP, CHM_CM);
+CHM_DN M_cholmod_copy_dense(const_CHM_DN, CHM_CM);
+CHM_SP M_cholmod_aat(const_CHM_SP, int *fset, size_t fsize, int mode,
+		     CHM_CM);
+int M_cholmod_band_inplace(CHM_SP A, int k1, int k2, int mode, CHM_CM);
+CHM_SP M_cholmod_add(const_CHM_SP, const_CHM_SP, double alpha[2], double beta[2],
+		     int values, int sorted, CHM_CM);
+CHM_DN M_cholmod_allocate_dense(size_t nrow, size_t ncol, size_t d,
+				int xtype, CHM_CM);
+CHM_FR M_cholmod_analyze(const_CHM_SP, CHM_CM);
+CHM_FR M_cholmod_analyze_p(const_CHM_SP, int *Perm, int *fset,
+				    size_t fsize, CHM_CM);
+int M_cholmod_change_factor(int to_xtype, int to_ll, int to_super,
+			    int to_packed, int to_monotonic,
+			    CHM_FR L, CHM_CM);
+CHM_FR M_cholmod_copy_factor(const_CHM_FR, CHM_CM);
+CHM_SP M_cholmod_factor_to_sparse(const_CHM_FR, CHM_CM);
+CHM_SP M_cholmod_dense_to_sparse(const_CHM_DN, int values, CHM_CM);
+int M_cholmod_defaults (CHM_CM);
+CHM_SP M_cholmod_triplet_to_sparse(const cholmod_triplet*, int nzmax, CHM_CM);
+CHM_SP M_cholmod_submatrix(const_CHM_SP, int *rset, int rsize, int *cset,
+			   int csize, int values, int sorted,
+			   CHM_CM);
+CHM_TR M_cholmod_sparse_to_triplet(const_CHM_SP, CHM_CM);
+CHM_DN M_cholmod_sparse_to_dense(const_CHM_SP, CHM_CM);
+CHM_TR M_cholmod_allocate_triplet (size_t nrow, size_t ncol, size_t nzmax,
+				   int stype, int xtype, CHM_CM);
+
+// from ../../src/CHOLMOD/Include/cholmod_matrixops.h - line 107 :
+/* scaling modes, selected by the scale input parameter: */
+#define CHOLMOD_SCALAR 0	/* A = s*A */
+#define CHOLMOD_ROW 1		/* A = diag(s)*A */
+#define CHOLMOD_COL 2		/* A = A*diag(s) */
+#define CHOLMOD_SYM 3		/* A = diag(s)*A*diag(s) */
+
+int M_cholmod_scale(const_CHM_DN, int scale, CHM_SP, CHM_CM);
+
+#ifdef	__cplusplus
+}
+#endif
+
+#endif  /* MATRIX_CHOLMOD_H */
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/Meta/data.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/Meta/data.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/Meta/package.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/Meta/package.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/Meta/nsInfo.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/Meta/nsInfo.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/Meta/hsearch.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/Meta/hsearch.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/Meta/links.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/Meta/links.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/Meta/Rd.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/Meta/Rd.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/Meta/vignette.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/Meta/vignette.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/help/AnIndex
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/help/AnIndex	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/help/AnIndex	(revision 2477)
@@ -0,0 +1,2234 @@
+!,ldenseMatrix-method	ldenseMatrix-class
+!,ldiMatrix-method	ldiMatrix-class
+!,lgeMatrix-method	lgeMatrix-class
+!,lsparseMatrix-method	lsparseMatrix-classes
+!,ltpMatrix-method	ltrMatrix-class
+!,ltrMatrix-method	ltrMatrix-class
+!,Matrix-method	Matrix-class
+!,ndenseMatrix-method	ndenseMatrix-class
+!,ngeMatrix-method	ngeMatrix-class
+!,nsparseMatrix-method	nsparseMatrix-classes
+!,ntpMatrix-method	ntrMatrix-class
+!,ntrMatrix-method	ntrMatrix-class
+!,sparseVector-method	sparseVector-class
+%%,ddiMatrix,ddenseMatrix-method	diagonalMatrix-class
+%%,ddiMatrix,ldenseMatrix-method	diagonalMatrix-class
+%%,ddiMatrix,Matrix-method	diagonalMatrix-class
+%%,ddiMatrix,ndenseMatrix-method	diagonalMatrix-class
+%%,ldiMatrix,ddenseMatrix-method	diagonalMatrix-class
+%%,ldiMatrix,ldenseMatrix-method	diagonalMatrix-class
+%%,ldiMatrix,Matrix-method	diagonalMatrix-class
+%%,ldiMatrix,ndenseMatrix-method	diagonalMatrix-class
+%&%	boolean-matprod
+%&%,ANY,ANY-method	boolean-matprod
+%&%,ANY,Matrix-method	boolean-matprod
+%&%,ANY,matrix-method	boolean-matprod
+%&%,CsparseMatrix,diagonalMatrix-method	boolean-matprod
+%&%,diagonalMatrix,CsparseMatrix-method	boolean-matprod
+%&%,diagonalMatrix,diagonalMatrix-method	boolean-matprod
+%&%,diagonalMatrix,geMatrix-method	boolean-matprod
+%&%,diagonalMatrix,sparseMatrix-method	boolean-matprod
+%&%,geMatrix,diagonalMatrix-method	boolean-matprod
+%&%,Matrix,ANY-method	boolean-matprod
+%&%,matrix,ANY-method	boolean-matprod
+%&%,Matrix,Matrix-method	boolean-matprod
+%&%,matrix,matrix-method	boolean-matprod
+%&%,mMatrix,mMatrix-method	boolean-matprod
+%&%,mMatrix,nMatrix-method	boolean-matprod
+%&%,mMatrix,sparseVector-method	boolean-matprod
+%&%,nCsparseMatrix,nCsparseMatrix-method	boolean-matprod
+%&%,nCsparseMatrix,nsparseMatrix-method	boolean-matprod
+%&%,nMatrix,mMatrix-method	boolean-matprod
+%&%,nMatrix,nMatrix-method	boolean-matprod
+%&%,nMatrix,nsparseMatrix-method	boolean-matprod
+%&%,nsparseMatrix,nCsparseMatrix-method	boolean-matprod
+%&%,nsparseMatrix,nMatrix-method	boolean-matprod
+%&%,nsparseMatrix,nsparseMatrix-method	boolean-matprod
+%&%,numLike,sparseVector-method	boolean-matprod
+%&%,sparseMatrix,diagonalMatrix-method	boolean-matprod
+%&%,sparseVector,mMatrix-method	boolean-matprod
+%&%,sparseVector,numLike-method	boolean-matprod
+%&%,sparseVector,sparseVector-method	boolean-matprod
+%&%-methods	boolean-matprod
+%*%	matrix-products
+%*%,ANY,Matrix-method	matrix-products
+%*%,ANY,TsparseMatrix-method	matrix-products
+%*%,CsparseMatrix,CsparseMatrix-method	matrix-products
+%*%,CsparseMatrix,ddenseMatrix-method	matrix-products
+%*%,CsparseMatrix,diagonalMatrix-method	matrix-products
+%*%,CsparseMatrix,matrix-method	matrix-products
+%*%,CsparseMatrix,numLike-method	matrix-products
+%*%,ddenseMatrix,CsparseMatrix-method	matrix-products
+%*%,ddenseMatrix,ddenseMatrix-method	matrix-products
+%*%,ddenseMatrix,dsparseMatrix-method	matrix-products
+%*%,ddenseMatrix,dsyMatrix-method	matrix-products
+%*%,ddenseMatrix,dtrMatrix-method	matrix-products
+%*%,ddenseMatrix,ldenseMatrix-method	matrix-products
+%*%,ddenseMatrix,matrix-method	matrix-products
+%*%,ddenseMatrix,ndenseMatrix-method	matrix-products
+%*%,denseMatrix,diagonalMatrix-method	matrix-products
+%*%,dgeMatrix,dgeMatrix-method	matrix-products
+%*%,dgeMatrix,diagonalMatrix-method	matrix-products
+%*%,dgeMatrix,dsparseMatrix-method	matrix-products
+%*%,dgeMatrix,dtpMatrix-method	matrix-products
+%*%,dgeMatrix,matrix-method	matrix-products
+%*%,dgeMatrix,numLike-method	matrix-products
+%*%,diagonalMatrix,CsparseMatrix-method	matrix-products
+%*%,diagonalMatrix,denseMatrix-method	matrix-products
+%*%,diagonalMatrix,dgeMatrix-method	matrix-products
+%*%,diagonalMatrix,diagonalMatrix-method	matrix-products
+%*%,diagonalMatrix,lgeMatrix-method	matrix-products
+%*%,diagonalMatrix,matrix-method	matrix-products
+%*%,diagonalMatrix,sparseMatrix-method	matrix-products
+%*%,dMatrix,integer-method	matrix-products
+%*%,dMatrix,lMatrix-method	matrix-products
+%*%,dMatrix,nMatrix-method	matrix-products
+%*%,dsparseMatrix,ddenseMatrix-method	matrix-products
+%*%,dsparseMatrix,dgeMatrix-method	matrix-products
+%*%,dspMatrix,ddenseMatrix-method	matrix-products
+%*%,dspMatrix,matrix-method	matrix-products
+%*%,dsyMatrix,ddenseMatrix-method	matrix-products
+%*%,dsyMatrix,dsyMatrix-method	matrix-products
+%*%,dsyMatrix,matrix-method	matrix-products
+%*%,dtpMatrix,ddenseMatrix-method	matrix-products
+%*%,dtpMatrix,matrix-method	matrix-products
+%*%,dtrMatrix,ddenseMatrix-method	matrix-products
+%*%,dtrMatrix,dtrMatrix-method	matrix-products
+%*%,dtrMatrix,matrix-method	matrix-products
+%*%,indMatrix,indMatrix-method	matrix-products
+%*%,indMatrix,Matrix-method	matrix-products
+%*%,indMatrix,matrix-method	matrix-products
+%*%,integer,dMatrix-method	matrix-products
+%*%,ldenseMatrix,ddenseMatrix-method	matrix-products
+%*%,ldenseMatrix,ldenseMatrix-method	matrix-products
+%*%,ldenseMatrix,lsparseMatrix-method	matrix-products
+%*%,ldenseMatrix,matrix-method	matrix-products
+%*%,ldenseMatrix,ndenseMatrix-method	matrix-products
+%*%,lgCMatrix,lgCMatrix-method	matrix-products
+%*%,lgeMatrix,diagonalMatrix-method	matrix-products
+%*%,lMatrix,dMatrix-method	matrix-products
+%*%,lMatrix,lMatrix-method	matrix-products
+%*%,lMatrix,nMatrix-method	matrix-products
+%*%,lsparseMatrix,ldenseMatrix-method	matrix-products
+%*%,lsparseMatrix,lsparseMatrix-method	matrix-products
+%*%,Matrix,ANY-method	matrix-products
+%*%,matrix,CsparseMatrix-method	matrix-products
+%*%,matrix,ddenseMatrix-method	matrix-products
+%*%,matrix,dgeMatrix-method	matrix-products
+%*%,matrix,diagonalMatrix-method	matrix-products
+%*%,matrix,dsyMatrix-method	matrix-products
+%*%,matrix,dtpMatrix-method	matrix-products
+%*%,matrix,dtrMatrix-method	matrix-products
+%*%,Matrix,indMatrix-method	matrix-products
+%*%,matrix,indMatrix-method	matrix-products
+%*%,matrix,ldenseMatrix-method	matrix-products
+%*%,Matrix,matrix-method	matrix-products
+%*%,matrix,Matrix-method	matrix-products
+%*%,matrix,ndenseMatrix-method	matrix-products
+%*%,Matrix,numLike-method	matrix-products
+%*%,Matrix,pMatrix-method	matrix-products
+%*%,matrix,pMatrix-method	matrix-products
+%*%,matrix,sparseMatrix-method	matrix-products
+%*%,Matrix,TsparseMatrix-method	matrix-products
+%*%,mMatrix,sparseVector-method	matrix-products
+%*%,ndenseMatrix,ddenseMatrix-method	matrix-products
+%*%,ndenseMatrix,ldenseMatrix-method	matrix-products
+%*%,ndenseMatrix,matrix-method	matrix-products
+%*%,ndenseMatrix,ndenseMatrix-method	matrix-products
+%*%,ndenseMatrix,nsparseMatrix-method	matrix-products
+%*%,ngCMatrix,ngCMatrix-method	matrix-products
+%*%,nMatrix,dMatrix-method	matrix-products
+%*%,nMatrix,lMatrix-method	matrix-products
+%*%,nMatrix,nMatrix-method	matrix-products
+%*%,nsparseMatrix,ndenseMatrix-method	matrix-products
+%*%,nsparseMatrix,nsparseMatrix-method	matrix-products
+%*%,numLike,CsparseMatrix-method	matrix-products
+%*%,numLike,dgeMatrix-method	matrix-products
+%*%,numLike,Matrix-method	matrix-products
+%*%,numLike,sparseVector-method	matrix-products
+%*%,pMatrix,Matrix-method	matrix-products
+%*%,pMatrix,matrix-method	matrix-products
+%*%,pMatrix,pMatrix-method	matrix-products
+%*%,sparseMatrix,diagonalMatrix-method	matrix-products
+%*%,sparseMatrix,matrix-method	matrix-products
+%*%,sparseVector,mMatrix-method	matrix-products
+%*%,sparseVector,numLike-method	matrix-products
+%*%,sparseVector,sparseVector-method	matrix-products
+%*%,TsparseMatrix,ANY-method	matrix-products
+%*%,TsparseMatrix,Matrix-method	matrix-products
+%*%,TsparseMatrix,TsparseMatrix-method	matrix-products
+%*%-methods	matrix-products
+%/%,ddiMatrix,ddenseMatrix-method	diagonalMatrix-class
+%/%,ddiMatrix,ldenseMatrix-method	diagonalMatrix-class
+%/%,ddiMatrix,Matrix-method	diagonalMatrix-class
+%/%,ddiMatrix,ndenseMatrix-method	diagonalMatrix-class
+%/%,ldiMatrix,ddenseMatrix-method	diagonalMatrix-class
+%/%,ldiMatrix,ldenseMatrix-method	diagonalMatrix-class
+%/%,ldiMatrix,Matrix-method	diagonalMatrix-class
+%/%,ldiMatrix,ndenseMatrix-method	diagonalMatrix-class
+&,ddenseMatrix,ddiMatrix-method	diagonalMatrix-class
+&,ddenseMatrix,ldiMatrix-method	diagonalMatrix-class
+&,ddiMatrix,ddenseMatrix-method	diagonalMatrix-class
+&,ddiMatrix,ldenseMatrix-method	diagonalMatrix-class
+&,ddiMatrix,Matrix-method	diagonalMatrix-class
+&,ddiMatrix,ndenseMatrix-method	diagonalMatrix-class
+&,ldenseMatrix,ddiMatrix-method	diagonalMatrix-class
+&,ldenseMatrix,ldiMatrix-method	diagonalMatrix-class
+&,ldiMatrix,ddenseMatrix-method	diagonalMatrix-class
+&,ldiMatrix,ldenseMatrix-method	diagonalMatrix-class
+&,ldiMatrix,Matrix-method	diagonalMatrix-class
+&,ldiMatrix,ndenseMatrix-method	diagonalMatrix-class
+&,Matrix,ddiMatrix-method	diagonalMatrix-class
+&,Matrix,ldiMatrix-method	diagonalMatrix-class
+&,ndenseMatrix,ddiMatrix-method	diagonalMatrix-class
+&,ndenseMatrix,ldiMatrix-method	diagonalMatrix-class
+*,ddenseMatrix,ddiMatrix-method	diagonalMatrix-class
+*,ddenseMatrix,ldiMatrix-method	diagonalMatrix-class
+*,ddiMatrix,ddenseMatrix-method	diagonalMatrix-class
+*,ddiMatrix,ldenseMatrix-method	diagonalMatrix-class
+*,ddiMatrix,Matrix-method	diagonalMatrix-class
+*,ddiMatrix,ndenseMatrix-method	diagonalMatrix-class
+*,ldenseMatrix,ddiMatrix-method	diagonalMatrix-class
+*,ldenseMatrix,ldiMatrix-method	diagonalMatrix-class
+*,ldiMatrix,ddenseMatrix-method	diagonalMatrix-class
+*,ldiMatrix,ldenseMatrix-method	diagonalMatrix-class
+*,ldiMatrix,Matrix-method	diagonalMatrix-class
+*,ldiMatrix,ndenseMatrix-method	diagonalMatrix-class
+*,Matrix,ddiMatrix-method	diagonalMatrix-class
+*,Matrix,ldiMatrix-method	diagonalMatrix-class
+*,ndenseMatrix,ddiMatrix-method	diagonalMatrix-class
+*,ndenseMatrix,ldiMatrix-method	diagonalMatrix-class
++,dgTMatrix,dgTMatrix-method	dgTMatrix-class
++,Matrix,missing-method	Matrix-class
+-,ddiMatrix,missing-method	diagonalMatrix-class
+-,denseMatrix,missing-method	denseMatrix-class
+-,dsparseVector,missing-method	sparseVector-class
+-,indMatrix,missing-method	indMatrix-class
+-,ldiMatrix,missing-method	diagonalMatrix-class
+-,lsparseMatrix,missing-method	lsparseMatrix-classes
+-,Matrix,missing-method	Matrix-class
+-,nsparseMatrix,missing-method	nsparseMatrix-classes
+-,pMatrix,missing-method	pMatrix-class
+-,sparseMatrix,missing-method	sparseMatrix-class
+.bdiag	bdiag
+.diagU2N	diagU2N
+.dsy2mat	dsyMatrix-class
+.formatSparseSimple	formatSparseM
+.sparseDiagonal	Diagonal
+.SuiteSparse_version	Cholesky
+.symDiagonal	Diagonal
+.updateCHMfactor	CHMfactor-class
+.validateCsparse	CsparseMatrix-class
+/,ddiMatrix,ddenseMatrix-method	diagonalMatrix-class
+/,ddiMatrix,ldenseMatrix-method	diagonalMatrix-class
+/,ddiMatrix,Matrix-method	diagonalMatrix-class
+/,ddiMatrix,ndenseMatrix-method	diagonalMatrix-class
+/,ldiMatrix,ddenseMatrix-method	diagonalMatrix-class
+/,ldiMatrix,ldenseMatrix-method	diagonalMatrix-class
+/,ldiMatrix,Matrix-method	diagonalMatrix-class
+/,ldiMatrix,ndenseMatrix-method	diagonalMatrix-class
+abIndex-class	abIndex-class
+abIseq	abIseq
+abIseq1	abIseq
+all,ddiMatrix-method	diagonalMatrix-class
+all,ldenseMatrix-method	all-methods
+all,ldiMatrix-method	diagonalMatrix-class
+all,lsparseMatrix-method	all-methods
+all,lsyMatrix-method	all-methods
+all,Matrix-method	all-methods
+all,nsparseMatrix-method	nsparseMatrix-classes
+all-methods	all-methods
+all.equal,abIndex,abIndex-method	all.equal-methods
+all.equal,abIndex,numLike-method	all.equal-methods
+all.equal,ANY,Matrix-method	all.equal-methods
+all.equal,ANY,sparseMatrix-method	all.equal-methods
+all.equal,ANY,sparseVector-method	all.equal-methods
+all.equal,Matrix,ANY-method	all.equal-methods
+all.equal,Matrix,Matrix-method	all.equal-methods
+all.equal,numLike,abIndex-method	all.equal-methods
+all.equal,sparseMatrix,ANY-method	all.equal-methods
+all.equal,sparseMatrix,sparseMatrix-method	all.equal-methods
+all.equal,sparseMatrix,sparseVector-method	all.equal-methods
+all.equal,sparseVector,ANY-method	all.equal-methods
+all.equal,sparseVector,sparseMatrix-method	all.equal-methods
+all.equal,sparseVector,sparseVector-method	all.equal-methods
+all.equal-methods	all.equal-methods
+any,ddiMatrix-method	diagonalMatrix-class
+any,ldiMatrix-method	diagonalMatrix-class
+any,lMatrix-method	all-methods
+any,Matrix-method	all-methods
+any,nsparseMatrix-method	nsparseMatrix-classes
+anyDuplicatedT	uniqTsparse
+anyNA,dMatrix-method	is.na-methods
+anyNA,iMatrix-method	is.na-methods
+anyNA,lMatrix-method	is.na-methods
+anyNA,ndenseMatrix-method	is.na-methods
+anyNA,nsparseMatrix-method	is.na-methods
+anyNA,nsparseVector-method	is.na-methods
+anyNA,sparseVector-method	is.na-methods
+anyNA,xMatrix-method	is.na-methods
+anyNA,zMatrix-method	is.na-methods
+Arith,abIndex,abIndex-method	abIndex-class
+Arith,abIndex,numLike-method	abIndex-class
+Arith,CsparseMatrix,CsparseMatrix-method	CsparseMatrix-class
+Arith,CsparseMatrix,numeric-method	CsparseMatrix-class
+Arith,ddenseMatrix,ddenseMatrix-method	ddenseMatrix-class
+Arith,ddenseMatrix,logical-method	ddenseMatrix-class
+Arith,ddenseMatrix,numeric-method	ddenseMatrix-class
+Arith,ddenseMatrix,sparseVector-method	sparseVector-class
+Arith,ddiMatrix,logical-method	diagonalMatrix-class
+Arith,ddiMatrix,numeric-method	diagonalMatrix-class
+Arith,dgCMatrix,dgCMatrix-method	dgCMatrix-class
+Arith,dgCMatrix,logical-method	dgCMatrix-class
+Arith,dgCMatrix,numeric-method	dgCMatrix-class
+Arith,dgeMatrix,dgeMatrix-method	dgeMatrix-class
+Arith,dgeMatrix,logical-method	dgeMatrix-class
+Arith,dgeMatrix,numeric-method	dgeMatrix-class
+Arith,dgeMatrix,sparseVector-method	sparseVector-class
+Arith,dMatrix,dMatrix-method	dMatrix-class
+Arith,dpoMatrix,logical-method	dpoMatrix-class
+Arith,dpoMatrix,numeric-method	dpoMatrix-class
+Arith,dppMatrix,logical-method	dpoMatrix-class
+Arith,dppMatrix,numeric-method	dpoMatrix-class
+Arith,dsCMatrix,dsCMatrix-method	dsCMatrix-class
+Arith,dsparseMatrix,logical-method	dsparseMatrix-class
+Arith,dsparseMatrix,numeric-method	dsparseMatrix-class
+Arith,dsparseVector,dsparseVector-method	sparseVector-class
+Arith,dtCMatrix,dtCMatrix-method	dtCMatrix-class
+Arith,ldiMatrix,logical-method	diagonalMatrix-class
+Arith,ldiMatrix,numeric-method	diagonalMatrix-class
+Arith,lgCMatrix,lgCMatrix-method	lsparseMatrix-classes
+Arith,lgeMatrix,lgeMatrix-method	lgeMatrix-class
+Arith,lgTMatrix,lgTMatrix-method	lsparseMatrix-classes
+Arith,lMatrix,logical-method	dMatrix-class
+Arith,lMatrix,numeric-method	dMatrix-class
+Arith,logical,ddenseMatrix-method	ddenseMatrix-class
+Arith,logical,ddiMatrix-method	diagonalMatrix-class
+Arith,logical,dgCMatrix-method	dgCMatrix-class
+Arith,logical,dgeMatrix-method	dgeMatrix-class
+Arith,logical,dpoMatrix-method	dpoMatrix-class
+Arith,logical,dppMatrix-method	dpoMatrix-class
+Arith,logical,dsparseMatrix-method	dsparseMatrix-class
+Arith,logical,ldiMatrix-method	diagonalMatrix-class
+Arith,logical,lMatrix-method	dMatrix-class
+Arith,logical,nMatrix-method	nMatrix-class
+Arith,lsparseMatrix,Matrix-method	lsparseMatrix-classes
+Arith,Matrix,lsparseMatrix-method	lsparseMatrix-classes
+Arith,Matrix,Matrix-method	Matrix-class
+Arith,Matrix,nsparseMatrix-method	nsparseMatrix-classes
+Arith,ngeMatrix,ngeMatrix-method	ngeMatrix-class
+Arith,nMatrix,logical-method	nMatrix-class
+Arith,nMatrix,numeric-method	nMatrix-class
+Arith,nsparseMatrix,Matrix-method	nsparseMatrix-classes
+Arith,numeric,CsparseMatrix-method	CsparseMatrix-class
+Arith,numeric,ddenseMatrix-method	ddenseMatrix-class
+Arith,numeric,ddiMatrix-method	diagonalMatrix-class
+Arith,numeric,dgCMatrix-method	dgCMatrix-class
+Arith,numeric,dgeMatrix-method	dgeMatrix-class
+Arith,numeric,dpoMatrix-method	dpoMatrix-class
+Arith,numeric,dppMatrix-method	dpoMatrix-class
+Arith,numeric,dsparseMatrix-method	dsparseMatrix-class
+Arith,numeric,ldiMatrix-method	diagonalMatrix-class
+Arith,numeric,lMatrix-method	dMatrix-class
+Arith,numeric,nMatrix-method	nMatrix-class
+Arith,numLike,abIndex-method	abIndex-class
+Arith,sparseVector,ddenseMatrix-method	sparseVector-class
+Arith,sparseVector,dgeMatrix-method	sparseVector-class
+Arith,sparseVector,sparseVector-method	sparseVector-class
+Arith,triangularMatrix,diagonalMatrix-method	diagonalMatrix-class
+as.array,Matrix-method	Matrix-class
+as.integer,abIndex-method	abIndex-class
+as.logical,ldenseMatrix-method	ldenseMatrix-class
+as.logical,Matrix-method	Matrix-class
+as.logical,ndenseMatrix-method	ndenseMatrix-class
+as.logical,sparseVector-method	sparseVector-class
+as.matrix,Matrix-method	Matrix-class
+as.numeric,abIndex-method	abIndex-class
+as.numeric,ddenseMatrix-method	ddenseMatrix-class
+as.numeric,Matrix-method	Matrix-class
+as.numeric,sparseVector-method	sparseVector-class
+as.vector,abIndex-method	abIndex-class
+as.vector,dgCMatrix-method	dgCMatrix-class
+as.vector,dgeMatrix-method	dgeMatrix-class
+as.vector,diagonalMatrix-method	diagonalMatrix-class
+as.vector,dsCMatrix-method	dsCMatrix-class
+as.vector,ldenseMatrix-method	ldenseMatrix-class
+as.vector,lgeMatrix-method	lgeMatrix-class
+as.vector,Matrix-method	Matrix-class
+as.vector,ndenseMatrix-method	ndenseMatrix-class
+as.vector,ngeMatrix-method	ngeMatrix-class
+as.vector,sparseVector-method	sparseVector-class
+atomicVector-class	atomicVector-class
+band	band
+band,CsparseMatrix-method	band
+band,ddenseMatrix-method	band
+band,denseMatrix-method	band
+band,matrix-method	band
+band,RsparseMatrix-method	band
+band,TsparseMatrix-method	band
+band-methods	band
+bandSparse	bandSparse
+bdiag	bdiag
+BunchKaufman	BunchKaufman-methods
+BunchKaufman,dspMatrix-method	BunchKaufman-methods
+BunchKaufman,dsyMatrix-method	BunchKaufman-methods
+BunchKaufman-class	Cholesky-class
+BunchKaufman-methods	BunchKaufman-methods
+c.abIndex	abIseq
+CAex	CAex
+cBind	cBind
+cbind2,ANY,Matrix-method	Matrix-class
+cbind2,atomicVector,ddiMatrix-method	diagonalMatrix-class
+cbind2,atomicVector,ldiMatrix-method	diagonalMatrix-class
+cbind2,atomicVector,Matrix-method	Matrix-class
+cbind2,ddiMatrix,atomicVector-method	diagonalMatrix-class
+cbind2,ddiMatrix,matrix-method	diagonalMatrix-class
+cbind2,denseMatrix,denseMatrix-method	denseMatrix-class
+cbind2,denseMatrix,matrix-method	denseMatrix-class
+cbind2,denseMatrix,numeric-method	denseMatrix-class
+cbind2,denseMatrix,sparseMatrix-method	sparseMatrix-class
+cbind2,diagonalMatrix,sparseMatrix-method	diagonalMatrix-class
+cbind2,ldiMatrix,atomicVector-method	diagonalMatrix-class
+cbind2,ldiMatrix,matrix-method	diagonalMatrix-class
+cbind2,Matrix,ANY-method	Matrix-class
+cbind2,Matrix,atomicVector-method	Matrix-class
+cbind2,matrix,ddiMatrix-method	diagonalMatrix-class
+cbind2,matrix,denseMatrix-method	denseMatrix-class
+cbind2,matrix,ldiMatrix-method	diagonalMatrix-class
+cbind2,Matrix,Matrix-method	Matrix-class
+cbind2,Matrix,missing-method	Matrix-class
+cbind2,Matrix,NULL-method	Matrix-class
+cbind2,matrix,sparseMatrix-method	sparseMatrix-class
+cbind2,NULL,Matrix-method	Matrix-class
+cbind2,numeric,denseMatrix-method	denseMatrix-class
+cbind2,numeric,sparseMatrix-method	sparseMatrix-class
+cbind2,sparseMatrix,denseMatrix-method	sparseMatrix-class
+cbind2,sparseMatrix,diagonalMatrix-method	diagonalMatrix-class
+cbind2,sparseMatrix,matrix-method	sparseMatrix-class
+cbind2,sparseMatrix,numeric-method	sparseMatrix-class
+cbind2,sparseMatrix,sparseMatrix-method	sparseMatrix-class
+CHMfactor-class	CHMfactor-class
+CHMsimpl-class	CHMfactor-class
+CHMsuper-class	CHMfactor-class
+chol	chol
+chol,ddenseMatrix-method	chol
+chol,ddiMatrix-method	chol
+chol,dgeMatrix-method	chol
+chol,dpoMatrix-method	chol
+chol,dppMatrix-method	chol
+chol,dsCMatrix-method	chol
+chol,dsparseMatrix-method	chol
+chol,ldiMatrix-method	chol
+chol,lsCMatrix-method	chol
+chol,Matrix-method	chol
+chol,nsCMatrix-method	chol
+chol-methods	chol
+chol2inv,ANY-method	chol2inv-methods
+chol2inv,CHMfactor-method	chol2inv-methods
+chol2inv,denseMatrix-method	chol2inv-methods
+chol2inv,diagonalMatrix-method	diagonalMatrix-class
+chol2inv,dtrMatrix-method	chol2inv-methods
+chol2inv,sparseMatrix-method	chol2inv-methods
+chol2inv-methods	chol2inv-methods
+Cholesky	Cholesky
+Cholesky,CsparseMatrix-method	Cholesky
+Cholesky,dsCMatrix-method	Cholesky
+Cholesky,Matrix-method	Cholesky
+Cholesky,nsparseMatrix-method	Cholesky
+Cholesky,sparseMatrix-method	Cholesky
+Cholesky-class	Cholesky-class
+CholeskyFactorization-class	MatrixFactorization-class
+coerce,abIndex,integer-method	abIndex-class
+coerce,abIndex,numeric-method	abIndex-class
+coerce,abIndex,seqMat-method	abIndex-class
+coerce,abIndex,vector-method	abIndex-class
+coerce,ANY,denseMatrix-method	denseMatrix-class
+coerce,ANY,Matrix-method	Matrix-class
+coerce,ANY,nsparseVector-method	sparseVector-class
+coerce,ANY,sparseMatrix-method	sparseMatrix-class
+coerce,ANY,sparseVector-method	sparseVector-class
+coerce,atomicVector,dsparseVector-method	sparseVector-class
+coerce,atomicVector,sparseVector-method	sparseVector-class
+coerce,BunchKaufman,lMatrix-method	Cholesky-class
+coerce,CHMfactor,Matrix-method	CHMfactor-class
+coerce,CHMfactor,pMatrix-method	CHMfactor-class
+coerce,CHMfactor,sparseMatrix-method	CHMfactor-class
+coerce,CHMfactor,triangularMatrix-method	CHMfactor-class
+coerce,Cholesky,lMatrix-method	Cholesky-class
+coerce,CsparseMatrix,denseMatrix-method	CsparseMatrix-class
+coerce,CsparseMatrix,lMatrix-method	CsparseMatrix-class
+coerce,CsparseMatrix,lsparseMatrix-method	CsparseMatrix-class
+coerce,CsparseMatrix,matrix.coo-method	SparseM-conv
+coerce,CsparseMatrix,matrix.csc-method	SparseM-conv
+coerce,CsparseMatrix,matrix.csr-method	SparseM-conv
+coerce,CsparseMatrix,nMatrix-method	CsparseMatrix-class
+coerce,CsparseMatrix,nsparseMatrix-method	CsparseMatrix-class
+coerce,CsparseMatrix,sparseVector-method	sparseVector-class
+coerce,CsparseMatrix,symmetricMatrix-method	symmetricMatrix-class
+coerce,CsparseMatrix,TsparseMatrix-method	CsparseMatrix-class
+coerce,ddenseMatrix,dgeMatrix-method	ddenseMatrix-class
+coerce,ddenseMatrix,matrix-method	ddenseMatrix-class
+coerce,ddiMatrix,CsparseMatrix-method	diagonalMatrix-class
+coerce,ddiMatrix,ddenseMatrix-method	diagonalMatrix-class
+coerce,ddiMatrix,dgeMatrix-method	diagonalMatrix-class
+coerce,ddiMatrix,dsparseMatrix-method	diagonalMatrix-class
+coerce,ddiMatrix,matrix-method	diagonalMatrix-class
+coerce,ddiMatrix,symmetricMatrix-method	diagonalMatrix-class
+coerce,ddiMatrix,triangularMatrix-method	diagonalMatrix-class
+coerce,ddiMatrix,TsparseMatrix-method	diagonalMatrix-class
+coerce,denseMatrix,CsparseMatrix-method	denseMatrix-class
+coerce,denseMatrix,generalMatrix-method	denseMatrix-class
+coerce,denseMatrix,RsparseMatrix-method	RsparseMatrix-class
+coerce,denseMatrix,sparseMatrix-method	denseMatrix-class
+coerce,denseMatrix,symmetricMatrix-method	symmetricMatrix-class
+coerce,denseMatrix,TsparseMatrix-method	denseMatrix-class
+coerce,dgCMatrix,dgeMatrix-method	dgCMatrix-class
+coerce,dgCMatrix,dgTMatrix-method	dgCMatrix-class
+coerce,dgCMatrix,dsCMatrix-method	dgCMatrix-class
+coerce,dgCMatrix,dtCMatrix-method	dgCMatrix-class
+coerce,dgCMatrix,lgCMatrix-method	dgCMatrix-class
+coerce,dgCMatrix,matrix-method	dgCMatrix-class
+coerce,dgCMatrix,matrix.csc-method	SparseM-conv
+coerce,dgCMatrix,ngCMatrix-method	dgCMatrix-class
+coerce,dgCMatrix,vector-method	dgCMatrix-class
+coerce,dgeMatrix,dgCMatrix-method	dgCMatrix-class
+coerce,dgeMatrix,dgTMatrix-method	dgTMatrix-class
+coerce,dgeMatrix,dsCMatrix-method	dsCMatrix-class
+coerce,dgeMatrix,dspMatrix-method	dsyMatrix-class
+coerce,dgeMatrix,dsTMatrix-method	dsCMatrix-class
+coerce,dgeMatrix,dsyMatrix-method	dsyMatrix-class
+coerce,dgeMatrix,dtrMatrix-method	dtrMatrix-class
+coerce,dgeMatrix,lgeMatrix-method	dgeMatrix-class
+coerce,dgeMatrix,matrix-method	dgeMatrix-class
+coerce,dgeMatrix,triangularMatrix-method	dgeMatrix-class
+coerce,dgRMatrix,matrix.csr-method	SparseM-conv
+coerce,dgTMatrix,dgCMatrix-method	dgTMatrix-class
+coerce,dgTMatrix,dgeMatrix-method	dgTMatrix-class
+coerce,dgTMatrix,dsTMatrix-method	dgTMatrix-class
+coerce,dgTMatrix,dtCMatrix-method	dgTMatrix-class
+coerce,dgTMatrix,dtTMatrix-method	dgTMatrix-class
+coerce,dgTMatrix,graphNEL-method	graph2T
+coerce,dgTMatrix,matrix-method	dgTMatrix-class
+coerce,dgTMatrix,matrix.coo-method	SparseM-conv
+coerce,dgTMatrix,symmetricMatrix-method	dgTMatrix-class
+coerce,dgTMatrix,triangularMatrix-method	dgTMatrix-class
+coerce,diagonalMatrix,denseMatrix-method	diagonalMatrix-class
+coerce,diagonalMatrix,generalMatrix-method	diagonalMatrix-class
+coerce,diagonalMatrix,matrix-method	diagonalMatrix-class
+coerce,diagonalMatrix,nMatrix-method	diagonalMatrix-class
+coerce,diagonalMatrix,nsparseMatrix-method	diagonalMatrix-class
+coerce,diagonalMatrix,sparseVector-method	sparseVector-class
+coerce,dMatrix,lMatrix-method	dMatrix-class
+coerce,dMatrix,nMatrix-method	nMatrix-class
+coerce,dpoMatrix,corMatrix-method	dpoMatrix-class
+coerce,dpoMatrix,dppMatrix-method	dpoMatrix-class
+coerce,dpoMatrix,lMatrix-method	dpoMatrix-class
+coerce,dpoMatrix,nMatrix-method	dpoMatrix-class
+coerce,dppMatrix,CsparseMatrix-method	dpoMatrix-class
+coerce,dppMatrix,dpoMatrix-method	dpoMatrix-class
+coerce,dppMatrix,lMatrix-method	dpoMatrix-class
+coerce,dppMatrix,nMatrix-method	dpoMatrix-class
+coerce,dppMatrix,sparseMatrix-method	dpoMatrix-class
+coerce,dsCMatrix,denseMatrix-method	dsCMatrix-class
+coerce,dsCMatrix,dgCMatrix-method	dsCMatrix-class
+coerce,dsCMatrix,dgeMatrix-method	dsCMatrix-class
+coerce,dsCMatrix,dgTMatrix-method	dsCMatrix-class
+coerce,dsCMatrix,dsRMatrix-method	dsCMatrix-class
+coerce,dsCMatrix,dsTMatrix-method	dsCMatrix-class
+coerce,dsCMatrix,dsyMatrix-method	dsCMatrix-class
+coerce,dsCMatrix,generalMatrix-method	dsCMatrix-class
+coerce,dsCMatrix,lsCMatrix-method	dsCMatrix-class
+coerce,dsCMatrix,matrix-method	dsCMatrix-class
+coerce,dsCMatrix,nsCMatrix-method	dsCMatrix-class
+coerce,dsCMatrix,vector-method	dsCMatrix-class
+coerce,dsparseMatrix,matrix.csr-method	SparseM-conv
+coerce,dspMatrix,CsparseMatrix-method	dsyMatrix-class
+coerce,dspMatrix,dpoMatrix-method	dpoMatrix-class
+coerce,dspMatrix,dppMatrix-method	dpoMatrix-class
+coerce,dspMatrix,dsyMatrix-method	dsyMatrix-class
+coerce,dspMatrix,lspMatrix-method	dsyMatrix-class
+coerce,dspMatrix,matrix-method	dsyMatrix-class
+coerce,dspMatrix,sparseMatrix-method	dsyMatrix-class
+coerce,dsTMatrix,dgeMatrix-method	dsCMatrix-class
+coerce,dsTMatrix,dgTMatrix-method	dsCMatrix-class
+coerce,dsTMatrix,dsCMatrix-method	dsCMatrix-class
+coerce,dsTMatrix,dsyMatrix-method	dsCMatrix-class
+coerce,dsTMatrix,lsTMatrix-method	dsCMatrix-class
+coerce,dsTMatrix,matrix-method	dsCMatrix-class
+coerce,dsyMatrix,corMatrix-method	dsyMatrix-class
+coerce,dsyMatrix,dpoMatrix-method	dsyMatrix-class
+coerce,dsyMatrix,dsCMatrix-method	dsCMatrix-class
+coerce,dsyMatrix,dspMatrix-method	dsyMatrix-class
+coerce,dsyMatrix,dsTMatrix-method	dsCMatrix-class
+coerce,dsyMatrix,lsyMatrix-method	dsyMatrix-class
+coerce,dsyMatrix,matrix-method	dsyMatrix-class
+coerce,dtCMatrix,denseMatrix-method	dtCMatrix-class
+coerce,dtCMatrix,dgCMatrix-method	dtCMatrix-class
+coerce,dtCMatrix,dgeMatrix-method	dtCMatrix-class
+coerce,dtCMatrix,dgTMatrix-method	dtCMatrix-class
+coerce,dtCMatrix,dsCMatrix-method	dtCMatrix-class
+coerce,dtCMatrix,dtRMatrix-method	dsCMatrix-class
+coerce,dtCMatrix,dtrMatrix-method	dtCMatrix-class
+coerce,dtCMatrix,dtTMatrix-method	dtCMatrix-class
+coerce,dtCMatrix,ltCMatrix-method	dtCMatrix-class
+coerce,dtCMatrix,matrix-method	dtCMatrix-class
+coerce,dtCMatrix,ntCMatrix-method	dtCMatrix-class
+coerce,dtCMatrix,TsparseMatrix-method	dtCMatrix-class
+coerce,dtpMatrix,dtrMatrix-method	dtpMatrix-class
+coerce,dtpMatrix,dtTMatrix-method	dtpMatrix-class
+coerce,dtpMatrix,ltpMatrix-method	dtpMatrix-class
+coerce,dtpMatrix,matrix-method	dtpMatrix-class
+coerce,dtrMatrix,CsparseMatrix-method	dtrMatrix-class
+coerce,dtrMatrix,dtpMatrix-method	dtrMatrix-class
+coerce,dtrMatrix,ltrMatrix-method	dtrMatrix-class
+coerce,dtrMatrix,matrix-method	dtrMatrix-class
+coerce,dtrMatrix,sparseMatrix-method	dtrMatrix-class
+coerce,dtTMatrix,dgeMatrix-method	dtCMatrix-class
+coerce,dtTMatrix,dgTMatrix-method	dtCMatrix-class
+coerce,dtTMatrix,dtCMatrix-method	dtCMatrix-class
+coerce,dtTMatrix,dtrMatrix-method	dtCMatrix-class
+coerce,dtTMatrix,generalMatrix-method	dtCMatrix-class
+coerce,dtTMatrix,matrix-method	dtCMatrix-class
+coerce,factor,dgCMatrix-method	dgCMatrix-class
+coerce,factor,sparseMatrix-method	sparseMatrix-class
+coerce,graph,CsparseMatrix-method	graph2T
+coerce,graph,Matrix-method	graph2T
+coerce,graph,sparseMatrix-method	graph2T
+coerce,graphAM,sparseMatrix-method	graph2T
+coerce,graphNEL,CsparseMatrix-method	graph2T
+coerce,graphNEL,dsCMatrix-method	dsCMatrix-class
+coerce,graphNEL,TsparseMatrix-method	graph2T
+coerce,indMatrix,CsparseMatrix-method	indMatrix-class
+coerce,indMatrix,dMatrix-method	indMatrix-class
+coerce,indMatrix,dsparseMatrix-method	indMatrix-class
+coerce,indMatrix,lMatrix-method	indMatrix-class
+coerce,indMatrix,lsparseMatrix-method	indMatrix-class
+coerce,indMatrix,matrix-method	indMatrix-class
+coerce,indMatrix,ngeMatrix-method	indMatrix-class
+coerce,indMatrix,ngTMatrix-method	indMatrix-class
+coerce,indMatrix,nMatrix-method	indMatrix-class
+coerce,indMatrix,nsparseMatrix-method	indMatrix-class
+coerce,indMatrix,TsparseMatrix-method	indMatrix-class
+coerce,integer,indMatrix-method	indMatrix-class
+coerce,integer,pMatrix-method	pMatrix-class
+coerce,ldenseMatrix,matrix-method	ldenseMatrix-class
+coerce,ldiMatrix,CsparseMatrix-method	diagonalMatrix-class
+coerce,ldiMatrix,ldenseMatrix-method	diagonalMatrix-class
+coerce,ldiMatrix,lgCMatrix-method	ldiMatrix-class
+coerce,ldiMatrix,lgTMatrix-method	ldiMatrix-class
+coerce,ldiMatrix,lsparseMatrix-method	diagonalMatrix-class
+coerce,ldiMatrix,symmetricMatrix-method	diagonalMatrix-class
+coerce,ldiMatrix,triangularMatrix-method	diagonalMatrix-class
+coerce,ldiMatrix,TsparseMatrix-method	diagonalMatrix-class
+coerce,lgCMatrix,dgCMatrix-method	lsparseMatrix-classes
+coerce,lgCMatrix,lgeMatrix-method	lsparseMatrix-classes
+coerce,lgCMatrix,lgTMatrix-method	lsparseMatrix-classes
+coerce,lgCMatrix,lsCMatrix-method	lsparseMatrix-classes
+coerce,lgCMatrix,ltCMatrix-method	lsparseMatrix-classes
+coerce,lgCMatrix,matrix-method	lsparseMatrix-classes
+coerce,lgeMatrix,dgeMatrix-method	lgeMatrix-class
+coerce,lgeMatrix,lgCMatrix-method	lgeMatrix-class
+coerce,lgeMatrix,lgTMatrix-method	lgeMatrix-class
+coerce,lgeMatrix,lspMatrix-method	lgeMatrix-class
+coerce,lgeMatrix,lsyMatrix-method	lgeMatrix-class
+coerce,lgeMatrix,ltpMatrix-method	lgeMatrix-class
+coerce,lgeMatrix,ltrMatrix-method	lgeMatrix-class
+coerce,lgeMatrix,matrix-method	lgeMatrix-class
+coerce,lgeMatrix,triangularMatrix-method	triangularMatrix-class
+coerce,lgTMatrix,dgTMatrix-method	lsparseMatrix-classes
+coerce,lgTMatrix,lgCMatrix-method	lsparseMatrix-classes
+coerce,lgTMatrix,lgeMatrix-method	lsparseMatrix-classes
+coerce,lgTMatrix,lsCMatrix-method	lsparseMatrix-classes
+coerce,lgTMatrix,ltTMatrix-method	lsparseMatrix-classes
+coerce,lgTMatrix,matrix-method	lsparseMatrix-classes
+coerce,lgTMatrix,symmetricMatrix-method	lsparseMatrix-classes
+coerce,lgTMatrix,triangularMatrix-method	lsparseMatrix-classes
+coerce,list,indMatrix-method	indMatrix-class
+coerce,lMatrix,dgCMatrix-method	dMatrix-class
+coerce,lMatrix,dMatrix-method	dMatrix-class
+coerce,lMatrix,nMatrix-method	nMatrix-class
+coerce,logical,abIndex-method	abIndex-class
+coerce,lsCMatrix,dgTMatrix-method	lsparseMatrix-classes
+coerce,lsCMatrix,dsCMatrix-method	lsparseMatrix-classes
+coerce,lsCMatrix,generalMatrix-method	lsparseMatrix-classes
+coerce,lsCMatrix,lgCMatrix-method	lsparseMatrix-classes
+coerce,lsCMatrix,lgTMatrix-method	lsparseMatrix-classes
+coerce,lsCMatrix,lsTMatrix-method	lsparseMatrix-classes
+coerce,lsCMatrix,matrix-method	lsparseMatrix-classes
+coerce,lsparseMatrix,dsparseMatrix-method	lsparseMatrix-classes
+coerce,lsparseMatrix,matrix-method	lsparseMatrix-classes
+coerce,lspMatrix,dspMatrix-method	lsyMatrix-class
+coerce,lspMatrix,lgeMatrix-method	lsyMatrix-class
+coerce,lspMatrix,lsyMatrix-method	lsyMatrix-class
+coerce,lsTMatrix,dsTMatrix-method	lsparseMatrix-classes
+coerce,lsTMatrix,lgCMatrix-method	lsparseMatrix-classes
+coerce,lsTMatrix,lgTMatrix-method	lsparseMatrix-classes
+coerce,lsTMatrix,lsCMatrix-method	lsparseMatrix-classes
+coerce,lsTMatrix,lsyMatrix-method	lsparseMatrix-classes
+coerce,lsTMatrix,matrix-method	lsparseMatrix-classes
+coerce,lsyMatrix,dsyMatrix-method	lsyMatrix-class
+coerce,lsyMatrix,lgeMatrix-method	lsyMatrix-class
+coerce,lsyMatrix,lspMatrix-method	lsyMatrix-class
+coerce,ltCMatrix,dMatrix-method	lsparseMatrix-classes
+coerce,ltCMatrix,dtCMatrix-method	lsparseMatrix-classes
+coerce,ltCMatrix,lgCMatrix-method	lsparseMatrix-classes
+coerce,ltCMatrix,ltTMatrix-method	lsparseMatrix-classes
+coerce,ltCMatrix,matrix-method	lsparseMatrix-classes
+coerce,ltpMatrix,dtpMatrix-method	ltrMatrix-class
+coerce,ltpMatrix,lgeMatrix-method	ltrMatrix-class
+coerce,ltpMatrix,ltrMatrix-method	ltrMatrix-class
+coerce,ltrMatrix,dtrMatrix-method	ltrMatrix-class
+coerce,ltrMatrix,lgeMatrix-method	ltrMatrix-class
+coerce,ltrMatrix,ltpMatrix-method	ltrMatrix-class
+coerce,ltTMatrix,dtTMatrix-method	lsparseMatrix-classes
+coerce,ltTMatrix,generalMatrix-method	lsparseMatrix-classes
+coerce,ltTMatrix,lgCMatrix-method	lsparseMatrix-classes
+coerce,ltTMatrix,lgTMatrix-method	lsparseMatrix-classes
+coerce,ltTMatrix,ltCMatrix-method	lsparseMatrix-classes
+coerce,ltTMatrix,ltrMatrix-method	lsparseMatrix-classes
+coerce,ltTMatrix,matrix-method	lsparseMatrix-classes
+coerce,Matrix,complex-method	Matrix-class
+coerce,Matrix,corMatrix-method	dpoMatrix-class
+coerce,matrix,corMatrix-method	dpoMatrix-class
+coerce,Matrix,CsparseMatrix-method	Matrix-class
+coerce,matrix,CsparseMatrix-method	CsparseMatrix-class
+coerce,Matrix,denseMatrix-method	Matrix-class
+coerce,matrix,dgCMatrix-method	dgCMatrix-class
+coerce,matrix,dgeMatrix-method	dgeMatrix-class
+coerce,matrix,dgRMatrix-method	RsparseMatrix-class
+coerce,matrix,dgTMatrix-method	dgTMatrix-class
+coerce,Matrix,diagonalMatrix-method	diagonalMatrix-class
+coerce,matrix,diagonalMatrix-method	diagonalMatrix-class
+coerce,Matrix,dpoMatrix-method	dpoMatrix-class
+coerce,matrix,dpoMatrix-method	dpoMatrix-class
+coerce,Matrix,dppMatrix-method	dpoMatrix-class
+coerce,matrix,dppMatrix-method	dpoMatrix-class
+coerce,matrix,dsCMatrix-method	dsCMatrix-class
+coerce,matrix,dspMatrix-method	dsyMatrix-class
+coerce,matrix,dsTMatrix-method	dsCMatrix-class
+coerce,matrix,dsyMatrix-method	dsyMatrix-class
+coerce,matrix,dtCMatrix-method	dtCMatrix-class
+coerce,matrix,dtpMatrix-method	dtpMatrix-class
+coerce,matrix,dtrMatrix-method	dtrMatrix-class
+coerce,matrix,dtTMatrix-method	dtCMatrix-class
+coerce,matrix,indMatrix-method	indMatrix-class
+coerce,Matrix,integer-method	Matrix-class
+coerce,matrix,ldenseMatrix-method	ldenseMatrix-class
+coerce,matrix,lgCMatrix-method	lsparseMatrix-classes
+coerce,matrix,lgeMatrix-method	lgeMatrix-class
+coerce,matrix,lgTMatrix-method	lsparseMatrix-classes
+coerce,matrix,lMatrix-method	dMatrix-class
+coerce,Matrix,logical-method	Matrix-class
+coerce,matrix,lsCMatrix-method	lsparseMatrix-classes
+coerce,matrix,lspMatrix-method	lsyMatrix-class
+coerce,matrix,lsyMatrix-method	lsyMatrix-class
+coerce,matrix,ltCMatrix-method	lsparseMatrix-classes
+coerce,matrix,ltpMatrix-method	ltrMatrix-class
+coerce,matrix,ltrMatrix-method	ltrMatrix-class
+coerce,matrix,ltTMatrix-method	lsparseMatrix-classes
+coerce,Matrix,matrix-method	Matrix-class
+coerce,matrix,Matrix-method	Matrix-class
+coerce,matrix,ndenseMatrix-method	ndenseMatrix-class
+coerce,matrix,ngCMatrix-method	nsparseMatrix-classes
+coerce,matrix,ngeMatrix-method	ngeMatrix-class
+coerce,matrix,ngTMatrix-method	nsparseMatrix-classes
+coerce,matrix,nMatrix-method	nMatrix-class
+coerce,matrix,nspMatrix-method	nsyMatrix-class
+coerce,matrix,nsyMatrix-method	nsyMatrix-class
+coerce,matrix,ntCMatrix-method	nsparseMatrix-classes
+coerce,matrix,ntpMatrix-method	ntrMatrix-class
+coerce,matrix,ntrMatrix-method	ntrMatrix-class
+coerce,matrix,ntTMatrix-method	nsparseMatrix-classes
+coerce,Matrix,numeric-method	Matrix-class
+coerce,matrix,pMatrix-method	pMatrix-class
+coerce,matrix,RsparseMatrix-method	RsparseMatrix-class
+coerce,Matrix,sparseMatrix-method	Matrix-class
+coerce,matrix,symmetricMatrix-method	symmetricMatrix-class
+coerce,matrix,triangularMatrix-method	triangularMatrix-class
+coerce,Matrix,TsparseMatrix-method	TsparseMatrix-class
+coerce,matrix,TsparseMatrix-method	TsparseMatrix-class
+coerce,Matrix,vector-method	Matrix-class
+coerce,matrix.coo,CsparseMatrix-method	SparseM-conv
+coerce,matrix.coo,dgCMatrix-method	SparseM-conv
+coerce,matrix.coo,dgTMatrix-method	SparseM-conv
+coerce,matrix.coo,Matrix-method	SparseM-conv
+coerce,matrix.coo,TsparseMatrix-method	SparseM-conv
+coerce,matrix.csc,CsparseMatrix-method	SparseM-conv
+coerce,matrix.csc,dgCMatrix-method	SparseM-conv
+coerce,matrix.csc,Matrix-method	SparseM-conv
+coerce,matrix.csc,TsparseMatrix-method	SparseM-conv
+coerce,matrix.csr,CsparseMatrix-method	SparseM-conv
+coerce,matrix.csr,dgCMatrix-method	SparseM-conv
+coerce,matrix.csr,dgRMatrix-method	SparseM-conv
+coerce,matrix.csr,Matrix-method	SparseM-conv
+coerce,matrix.csr,RsparseMatrix-method	SparseM-conv
+coerce,matrix.csr,TsparseMatrix-method	SparseM-conv
+coerce,ndenseMatrix,CsparseMatrix-method	ndenseMatrix-class
+coerce,ndenseMatrix,ldenseMatrix-method	ndenseMatrix-class
+coerce,ndenseMatrix,matrix-method	ndenseMatrix-class
+coerce,ndenseMatrix,nsparseMatrix-method	ndenseMatrix-class
+coerce,ndenseMatrix,sparseMatrix-method	ndenseMatrix-class
+coerce,ndenseMatrix,TsparseMatrix-method	ndenseMatrix-class
+coerce,ngCMatrix,dgCMatrix-method	nsparseMatrix-classes
+coerce,ngCMatrix,dMatrix-method	nsparseMatrix-classes
+coerce,ngCMatrix,dsparseMatrix-method	nsparseMatrix-classes
+coerce,ngCMatrix,lgCMatrix-method	nsparseMatrix-classes
+coerce,ngCMatrix,lMatrix-method	nsparseMatrix-classes
+coerce,ngCMatrix,lsparseMatrix-method	nsparseMatrix-classes
+coerce,ngCMatrix,matrix-method	nsparseMatrix-classes
+coerce,ngCMatrix,ngeMatrix-method	nsparseMatrix-classes
+coerce,ngCMatrix,ngTMatrix-method	nsparseMatrix-classes
+coerce,ngCMatrix,ntCMatrix-method	nsparseMatrix-classes
+coerce,ngeMatrix,dgeMatrix-method	ngeMatrix-class
+coerce,ngeMatrix,lgeMatrix-method	ndenseMatrix-class
+coerce,ngeMatrix,matrix-method	ngeMatrix-class
+coerce,ngeMatrix,ngCMatrix-method	ngeMatrix-class
+coerce,ngeMatrix,ngTMatrix-method	ngeMatrix-class
+coerce,ngeMatrix,nspMatrix-method	ngeMatrix-class
+coerce,ngeMatrix,nsyMatrix-method	ngeMatrix-class
+coerce,ngeMatrix,ntpMatrix-method	ngeMatrix-class
+coerce,ngeMatrix,ntrMatrix-method	ngeMatrix-class
+coerce,ngeMatrix,triangularMatrix-method	triangularMatrix-class
+coerce,ngTMatrix,dgTMatrix-method	nsparseMatrix-classes
+coerce,ngTMatrix,dMatrix-method	nsparseMatrix-classes
+coerce,ngTMatrix,dsparseMatrix-method	nsparseMatrix-classes
+coerce,ngTMatrix,generalMatrix-method	nsparseMatrix-classes
+coerce,ngTMatrix,lgeMatrix-method	nsparseMatrix-classes
+coerce,ngTMatrix,lgTMatrix-method	nsparseMatrix-classes
+coerce,ngTMatrix,lMatrix-method	nsparseMatrix-classes
+coerce,ngTMatrix,matrix-method	nsparseMatrix-classes
+coerce,ngTMatrix,ngCMatrix-method	nsparseMatrix-classes
+coerce,ngTMatrix,ngeMatrix-method	nsparseMatrix-classes
+coerce,ngTMatrix,ntTMatrix-method	nsparseMatrix-classes
+coerce,ngTMatrix,symmetricMatrix-method	nsparseMatrix-classes
+coerce,ngTMatrix,triangularMatrix-method	nsparseMatrix-classes
+coerce,nMatrix,dMatrix-method	nMatrix-class
+coerce,nMatrix,indMatrix-method	indMatrix-class
+coerce,nMatrix,lMatrix-method	nMatrix-class
+coerce,nMatrix,matrix-method	nMatrix-class
+coerce,nMatrix,pMatrix-method	pMatrix-class
+coerce,nsCMatrix,dMatrix-method	nsparseMatrix-classes
+coerce,nsCMatrix,dsCMatrix-method	nsparseMatrix-classes
+coerce,nsCMatrix,dsparseMatrix-method	nsparseMatrix-classes
+coerce,nsCMatrix,generalMatrix-method	nsparseMatrix-classes
+coerce,nsCMatrix,lMatrix-method	nsparseMatrix-classes
+coerce,nsCMatrix,lsCMatrix-method	nsparseMatrix-classes
+coerce,nsCMatrix,lsparseMatrix-method	nsparseMatrix-classes
+coerce,nsCMatrix,matrix-method	nsparseMatrix-classes
+coerce,nsCMatrix,ngCMatrix-method	nsparseMatrix-classes
+coerce,nsCMatrix,nsTMatrix-method	nsparseMatrix-classes
+coerce,nsparseMatrix,dsparseMatrix-method	nsparseMatrix-classes
+coerce,nsparseVector,dsparseVector-method	sparseVector-class
+coerce,nsparseVector,isparseVector-method	sparseVector-class
+coerce,nsparseVector,lsparseVector-method	sparseVector-class
+coerce,nsparseVector,zsparseVector-method	sparseVector-class
+coerce,nspMatrix,dspMatrix-method	nsyMatrix-class
+coerce,nspMatrix,lspMatrix-method	ndenseMatrix-class
+coerce,nspMatrix,ngeMatrix-method	nsyMatrix-class
+coerce,nspMatrix,nsyMatrix-method	nsyMatrix-class
+coerce,nsTMatrix,dsTMatrix-method	nsparseMatrix-classes
+coerce,nsTMatrix,matrix-method	nsparseMatrix-classes
+coerce,nsTMatrix,ngCMatrix-method	nsparseMatrix-classes
+coerce,nsTMatrix,ngTMatrix-method	nsparseMatrix-classes
+coerce,nsTMatrix,nsCMatrix-method	nsparseMatrix-classes
+coerce,nsTMatrix,nsyMatrix-method	nsparseMatrix-classes
+coerce,nsyMatrix,dsyMatrix-method	nsyMatrix-class
+coerce,nsyMatrix,lsyMatrix-method	ndenseMatrix-class
+coerce,nsyMatrix,ngeMatrix-method	nsyMatrix-class
+coerce,nsyMatrix,nspMatrix-method	nsyMatrix-class
+coerce,ntCMatrix,dMatrix-method	nsparseMatrix-classes
+coerce,ntCMatrix,dsparseMatrix-method	nsparseMatrix-classes
+coerce,ntCMatrix,dtCMatrix-method	nsparseMatrix-classes
+coerce,ntCMatrix,lMatrix-method	nsparseMatrix-classes
+coerce,ntCMatrix,lsparseMatrix-method	nsparseMatrix-classes
+coerce,ntCMatrix,ltCMatrix-method	nsparseMatrix-classes
+coerce,ntCMatrix,matrix-method	nsparseMatrix-classes
+coerce,ntCMatrix,ngCMatrix-method	nsparseMatrix-classes
+coerce,ntCMatrix,TsparseMatrix-method	nsparseMatrix-classes
+coerce,ntpMatrix,dtpMatrix-method	ntrMatrix-class
+coerce,ntpMatrix,ltpMatrix-method	ndenseMatrix-class
+coerce,ntpMatrix,ngeMatrix-method	ntrMatrix-class
+coerce,ntpMatrix,ntrMatrix-method	ntrMatrix-class
+coerce,ntrMatrix,dtrMatrix-method	ntrMatrix-class
+coerce,ntrMatrix,ltrMatrix-method	ndenseMatrix-class
+coerce,ntrMatrix,ngeMatrix-method	ntrMatrix-class
+coerce,ntrMatrix,ntpMatrix-method	ntrMatrix-class
+coerce,ntTMatrix,dtTMatrix-method	nsparseMatrix-classes
+coerce,ntTMatrix,generalMatrix-method	nsparseMatrix-classes
+coerce,ntTMatrix,matrix-method	nsparseMatrix-classes
+coerce,ntTMatrix,ngCMatrix-method	nsparseMatrix-classes
+coerce,ntTMatrix,ngTMatrix-method	nsparseMatrix-classes
+coerce,ntTMatrix,ntCMatrix-method	nsparseMatrix-classes
+coerce,ntTMatrix,ntrMatrix-method	nsparseMatrix-classes
+coerce,numeric,abIndex-method	abIndex-class
+coerce,numeric,CsparseMatrix-method	CsparseMatrix-class
+coerce,numeric,indMatrix-method	indMatrix-class
+coerce,numeric,pMatrix-method	pMatrix-class
+coerce,numeric,seqMat-method	abIndex-class
+coerce,numeric,TsparseMatrix-method	TsparseMatrix-class
+coerce,numLike,dgeMatrix-method	dgeMatrix-class
+coerce,pBunchKaufman,lMatrix-method	Cholesky-class
+coerce,pCholesky,lMatrix-method	Cholesky-class
+coerce,pMatrix,CsparseMatrix-method	pMatrix-class
+coerce,pMatrix,dMatrix-method	pMatrix-class
+coerce,pMatrix,dsparseMatrix-method	pMatrix-class
+coerce,pMatrix,lMatrix-method	pMatrix-class
+coerce,pMatrix,matrix-method	pMatrix-class
+coerce,pMatrix,ngeMatrix-method	pMatrix-class
+coerce,pMatrix,ngTMatrix-method	pMatrix-class
+coerce,pMatrix,nMatrix-method	pMatrix-class
+coerce,pMatrix,nsparseMatrix-method	pMatrix-class
+coerce,pMatrix,TsparseMatrix-method	pMatrix-class
+coerce,RsparseMatrix,CsparseMatrix-method	RsparseMatrix-class
+coerce,RsparseMatrix,denseMatrix-method	RsparseMatrix-class
+coerce,RsparseMatrix,dgeMatrix-method	RsparseMatrix-class
+coerce,RsparseMatrix,dMatrix-method	RsparseMatrix-class
+coerce,RsparseMatrix,dsparseMatrix-method	RsparseMatrix-class
+coerce,RsparseMatrix,generalMatrix-method	RsparseMatrix-class
+coerce,RsparseMatrix,lMatrix-method	RsparseMatrix-class
+coerce,RsparseMatrix,lsparseMatrix-method	RsparseMatrix-class
+coerce,RsparseMatrix,matrix-method	RsparseMatrix-class
+coerce,RsparseMatrix,nMatrix-method	RsparseMatrix-class
+coerce,RsparseMatrix,nsparseMatrix-method	RsparseMatrix-class
+coerce,RsparseMatrix,TsparseMatrix-method	RsparseMatrix-class
+coerce,seqMat,abIndex-method	abIndex-class
+coerce,seqMat,numeric-method	abIndex-class
+coerce,sparseMatrix,generalMatrix-method	sparseMatrix-class
+coerce,sparseMatrix,graph-method	graph2T
+coerce,sparseMatrix,graphNEL-method	graph2T
+coerce,sparseMatrix,indMatrix-method	indMatrix-class
+coerce,sparseMatrix,pMatrix-method	pMatrix-class
+coerce,sparseMatrix,RsparseMatrix-method	RsparseMatrix-class
+coerce,sparseMatrix,sparseVector-method	sparseVector-class
+coerce,sparseMatrix,symmetricMatrix-method	sparseMatrix-class
+coerce,sparseMatrix,triangularMatrix-method	sparseMatrix-class
+coerce,sparseVector,CsparseMatrix-method	sparseVector-class
+coerce,sparseVector,integer-method	sparseVector-class
+coerce,sparseVector,logical-method	sparseVector-class
+coerce,sparseVector,Matrix-method	sparseVector-class
+coerce,sparseVector,numeric-method	sparseVector-class
+coerce,sparseVector,sparseMatrix-method	sparseVector-class
+coerce,sparseVector,TsparseMatrix-method	sparseVector-class
+coerce,sparseVector,vector-method	sparseVector-class
+coerce,table,sparseMatrix-method	sparseMatrix-class
+coerce,triangularMatrix,symmetricMatrix-method	triangularMatrix-class
+coerce,TsparseMatrix,CsparseMatrix-method	TsparseMatrix-class
+coerce,TsparseMatrix,graphNEL-method	graph2T
+coerce,TsparseMatrix,lMatrix-method	TsparseMatrix-class
+coerce,TsparseMatrix,lsparseMatrix-method	TsparseMatrix-class
+coerce,TsparseMatrix,matrix-method	TsparseMatrix-class
+coerce,TsparseMatrix,nMatrix-method	TsparseMatrix-class
+coerce,TsparseMatrix,nsparseMatrix-method	TsparseMatrix-class
+coerce,TsparseMatrix,sparseVector-method	sparseVector-class
+coerce,xsparseVector,dsparseVector-method	sparseVector-class
+coerce,xsparseVector,isparseVector-method	sparseVector-class
+coerce,xsparseVector,lsparseVector-method	sparseVector-class
+coerce,xsparseVector,nsparseVector-method	sparseVector-class
+coerce,xsparseVector,zsparseVector-method	sparseVector-class
+colMeans	colSums
+colMeans,CsparseMatrix-method	colSums
+colMeans,ddenseMatrix-method	colSums
+colMeans,denseMatrix-method	colSums
+colMeans,dgCMatrix-method	colSums
+colMeans,dgeMatrix-method	dgeMatrix-class
+colMeans,diagonalMatrix-method	colSums
+colMeans,igCMatrix-method	colSums
+colMeans,indMatrix-method	indMatrix-class
+colMeans,lgCMatrix-method	colSums
+colMeans,ngCMatrix-method	colSums
+colMeans,RsparseMatrix-method	colSums
+colMeans,TsparseMatrix-method	colSums
+colSums	colSums
+colSums,CsparseMatrix-method	colSums
+colSums,ddenseMatrix-method	colSums
+colSums,denseMatrix-method	colSums
+colSums,dgCMatrix-method	colSums
+colSums,dgeMatrix-method	dgeMatrix-class
+colSums,diagonalMatrix-method	colSums
+colSums,igCMatrix-method	colSums
+colSums,indMatrix-method	indMatrix-class
+colSums,lgCMatrix-method	colSums
+colSums,ngCMatrix-method	colSums
+colSums,RsparseMatrix-method	colSums
+colSums,TsparseMatrix-method	colSums
+Compare,CsparseMatrix,CsparseMatrix-method	CsparseMatrix-class
+Compare,dMatrix,logical-method	dMatrix-class
+Compare,dMatrix,numeric-method	dMatrix-class
+Compare,lgeMatrix,lgeMatrix-method	lgeMatrix-class
+Compare,lMatrix,logical-method	dMatrix-class
+Compare,lMatrix,numeric-method	dMatrix-class
+Compare,logical,dMatrix-method	dMatrix-class
+Compare,logical,lMatrix-method	dMatrix-class
+Compare,logical,nMatrix-method	nMatrix-class
+Compare,lsparseMatrix,lsparseMatrix-method	lsparseMatrix-classes
+Compare,ngeMatrix,ngeMatrix-method	ngeMatrix-class
+Compare,nMatrix,logical-method	nMatrix-class
+Compare,nMatrix,nMatrix-method	nMatrix-class
+Compare,nMatrix,numeric-method	nMatrix-class
+Compare,numeric,dMatrix-method	dMatrix-class
+Compare,numeric,lMatrix-method	dMatrix-class
+Compare,numeric,nMatrix-method	nMatrix-class
+Compare,triangularMatrix,diagonalMatrix-method	diagonalMatrix-class
+compMatrix-class	compMatrix-class
+condest	condest
+corMatrix-class	dpoMatrix-class
+cov2cor,Matrix-method	Matrix-class
+cov2cor,sparseMatrix-method	sparseMatrix-class
+crossprod	matrix-products
+crossprod,ANY,Matrix-method	matrix-products
+crossprod,ANY,TsparseMatrix-method	matrix-products
+crossprod,CsparseMatrix,CsparseMatrix-method	matrix-products
+crossprod,CsparseMatrix,ddenseMatrix-method	matrix-products
+crossprod,CsparseMatrix,diagonalMatrix-method	matrix-products
+crossprod,CsparseMatrix,matrix-method	matrix-products
+crossprod,CsparseMatrix,missing-method	matrix-products
+crossprod,CsparseMatrix,numLike-method	matrix-products
+crossprod,ddenseMatrix,CsparseMatrix-method	matrix-products
+crossprod,ddenseMatrix,ddenseMatrix-method	matrix-products
+crossprod,ddenseMatrix,dgCMatrix-method	matrix-products
+crossprod,ddenseMatrix,dsparseMatrix-method	matrix-products
+crossprod,ddenseMatrix,ldenseMatrix-method	matrix-products
+crossprod,ddenseMatrix,matrix-method	matrix-products
+crossprod,ddenseMatrix,missing-method	matrix-products
+crossprod,ddenseMatrix,ndenseMatrix-method	matrix-products
+crossprod,dgCMatrix,dgeMatrix-method	matrix-products
+crossprod,dgeMatrix,dgeMatrix-method	matrix-products
+crossprod,dgeMatrix,dsparseMatrix-method	matrix-products
+crossprod,dgeMatrix,matrix-method	matrix-products
+crossprod,dgeMatrix,missing-method	matrix-products
+crossprod,dgeMatrix,numLike-method	matrix-products
+crossprod,diagonalMatrix,CsparseMatrix-method	matrix-products
+crossprod,diagonalMatrix,dgeMatrix-method	matrix-products
+crossprod,diagonalMatrix,diagonalMatrix-method	matrix-products
+crossprod,diagonalMatrix,lgeMatrix-method	matrix-products
+crossprod,diagonalMatrix,matrix-method	matrix-products
+crossprod,diagonalMatrix,missing-method	matrix-products
+crossprod,diagonalMatrix,sparseMatrix-method	matrix-products
+crossprod,dsparseMatrix,ddenseMatrix-method	matrix-products
+crossprod,dsparseMatrix,dgeMatrix-method	matrix-products
+crossprod,dtpMatrix,ddenseMatrix-method	matrix-products
+crossprod,dtpMatrix,matrix-method	matrix-products
+crossprod,dtrMatrix,ddenseMatrix-method	matrix-products
+crossprod,dtrMatrix,dtrMatrix-method	matrix-products
+crossprod,dtrMatrix,matrix-method	matrix-products
+crossprod,dtrMatrix,missing-method	matrix-products
+crossprod,indMatrix,indMatrix-method	matrix-products
+crossprod,indMatrix,Matrix-method	matrix-products
+crossprod,indMatrix,matrix-method	matrix-products
+crossprod,indMatrix,missing-method	matrix-products
+crossprod,ldenseMatrix,ddenseMatrix-method	matrix-products
+crossprod,ldenseMatrix,ldenseMatrix-method	matrix-products
+crossprod,ldenseMatrix,lsparseMatrix-method	matrix-products
+crossprod,ldenseMatrix,matrix-method	matrix-products
+crossprod,ldenseMatrix,missing-method	matrix-products
+crossprod,ldenseMatrix,ndenseMatrix-method	matrix-products
+crossprod,lgCMatrix,missing-method	matrix-products
+crossprod,lgTMatrix,missing-method	matrix-products
+crossprod,lsparseMatrix,ldenseMatrix-method	matrix-products
+crossprod,lsparseMatrix,lsparseMatrix-method	matrix-products
+crossprod,lsparseMatrix,missing-method	matrix-products
+crossprod,lsparseMatrix-method	matrix-products
+crossprod,Matrix,ANY-method	matrix-products
+crossprod,matrix,CsparseMatrix-method	matrix-products
+crossprod,matrix,dgeMatrix-method	matrix-products
+crossprod,matrix,diagonalMatrix-method	matrix-products
+crossprod,matrix,dtrMatrix-method	matrix-products
+crossprod,Matrix,Matrix-method	matrix-products
+crossprod,Matrix,matrix-method	matrix-products
+crossprod,matrix,Matrix-method	matrix-products
+crossprod,Matrix,missing-method	matrix-products
+crossprod,Matrix,numLike-method	matrix-products
+crossprod,Matrix,TsparseMatrix-method	matrix-products
+crossprod,mMatrix,sparseVector-method	matrix-products
+crossprod,ndenseMatrix,ddenseMatrix-method	matrix-products
+crossprod,ndenseMatrix,ldenseMatrix-method	matrix-products
+crossprod,ndenseMatrix,matrix-method	matrix-products
+crossprod,ndenseMatrix,missing-method	matrix-products
+crossprod,ndenseMatrix,ndenseMatrix-method	matrix-products
+crossprod,ndenseMatrix,nsparseMatrix-method	matrix-products
+crossprod,ngCMatrix,missing-method	matrix-products
+crossprod,ngTMatrix,missing-method	matrix-products
+crossprod,nsparseMatrix,missing-method	matrix-products
+crossprod,nsparseMatrix,ndenseMatrix-method	matrix-products
+crossprod,nsparseMatrix,nsparseMatrix-method	matrix-products
+crossprod,nsparseMatrix-method	matrix-products
+crossprod,numLike,CsparseMatrix-method	matrix-products
+crossprod,numLike,dgeMatrix-method	matrix-products
+crossprod,numLike,Matrix-method	matrix-products
+crossprod,numLike,sparseVector-method	matrix-products
+crossprod,pMatrix,Matrix-method	matrix-products
+crossprod,pMatrix,matrix-method	matrix-products
+crossprod,pMatrix,missing-method	matrix-products
+crossprod,pMatrix,pMatrix-method	matrix-products
+crossprod,sparseMatrix,diagonalMatrix-method	matrix-products
+crossprod,sparseVector,missing-method	matrix-products
+crossprod,sparseVector,mMatrix-method	matrix-products
+crossprod,sparseVector,numLike-method	matrix-products
+crossprod,sparseVector,sparseVector-method	matrix-products
+crossprod,symmetricMatrix,ANY-method	matrix-products
+crossprod,symmetricMatrix,Matrix-method	matrix-products
+crossprod,symmetricMatrix,missing-method	matrix-products
+crossprod,TsparseMatrix,ANY-method	matrix-products
+crossprod,TsparseMatrix,Matrix-method	matrix-products
+crossprod,TsparseMatrix,missing-method	matrix-products
+crossprod,TsparseMatrix,TsparseMatrix-method	matrix-products
+crossprod-methods	matrix-products
+CsparseMatrix-class	CsparseMatrix-class
+dCHMsimpl-class	CHMfactor-class
+dCHMsuper-class	CHMfactor-class
+ddenseMatrix-class	ddenseMatrix-class
+ddiMatrix-class	ddiMatrix-class
+denseLU-class	LU-class
+denseMatrix-class	denseMatrix-class
+det	Matrix-class
+determinant,CHMfactor,logical-method	CHMfactor-class
+determinant,CHMfactor,missing-method	CHMfactor-class
+determinant,ddenseMatrix,logical-method	ddenseMatrix-class
+determinant,ddenseMatrix,missing-method	ddenseMatrix-class
+determinant,dgCMatrix,logical-method	sparseMatrix-class
+determinant,dgeMatrix,logical-method	dgeMatrix-class
+determinant,dgeMatrix,missing-method	dgeMatrix-class
+determinant,diagonalMatrix,logical-method	diagonalMatrix-class
+determinant,dpoMatrix,logical-method	dpoMatrix-class
+determinant,dpoMatrix,missing-method	dpoMatrix-class
+determinant,dppMatrix,logical-method	dpoMatrix-class
+determinant,dppMatrix,missing-method	dpoMatrix-class
+determinant,dsCMatrix,logical-method	dsCMatrix-class
+determinant,dsCMatrix,missing-method	dsCMatrix-class
+determinant,dsparseMatrix,logical-method	sparseMatrix-class
+determinant,dtCMatrix,logical-method	sparseMatrix-class
+determinant,dtpMatrix,logical-method	dtpMatrix-class
+determinant,dtpMatrix,missing-method	dtpMatrix-class
+determinant,dtrMatrix,logical-method	dtrMatrix-class
+determinant,dtrMatrix,missing-method	dtrMatrix-class
+determinant,indMatrix,logical-method	indMatrix-class
+determinant,Matrix,logical-method	Matrix-class
+determinant,Matrix,missing-method	Matrix-class
+determinant,pMatrix,logical-method	pMatrix-class
+determinant,sparseMatrix,logical-method	sparseMatrix-class
+determinant,sparseMatrix,missing-method	sparseMatrix-class
+dgCMatrix-class	dgCMatrix-class
+dgeMatrix-class	dgeMatrix-class
+dgRMatrix-class	dgRMatrix-class
+dgTMatrix-class	dgTMatrix-class
+diag,CsparseMatrix-method	CsparseMatrix-class
+diag,ddenseMatrix-method	ddenseMatrix-class
+diag,dgCMatrix-method	dgCMatrix-class
+diag,dgeMatrix-method	dgeMatrix-class
+diag,dgRMatrix-method	dgRMatrix-class
+diag,diagonalMatrix-method	diagonalMatrix-class
+diag,dspMatrix-method	dsyMatrix-class
+diag,dsyMatrix-method	dsyMatrix-class
+diag,dtpMatrix-method	dtpMatrix-class
+diag,dtrMatrix-method	dtrMatrix-class
+diag,ldenseMatrix-method	ldenseMatrix-class
+diag,lgeMatrix-method	lgeMatrix-class
+diag,lspMatrix-method	lsyMatrix-class
+diag,lsyMatrix-method	lsyMatrix-class
+diag,ltpMatrix-method	ltrMatrix-class
+diag,ltrMatrix-method	ltrMatrix-class
+diag,Matrix-method	Matrix-class
+diag,ndenseMatrix-method	ndenseMatrix-class
+diag,sparseMatrix-method	sparseMatrix-class
+diag<-,dgeMatrix-method	dgeMatrix-class
+diag<-,dspMatrix-method	dsyMatrix-class
+diag<-,dsyMatrix-method	dsyMatrix-class
+diag<-,dtpMatrix-method	dtpMatrix-class
+diag<-,dtrMatrix-method	dtrMatrix-class
+diag<-,lgeMatrix-method	lgeMatrix-class
+diag<-,lspMatrix-method	lsyMatrix-class
+diag<-,lsyMatrix-method	lsyMatrix-class
+diag<-,ltpMatrix-method	ltrMatrix-class
+diag<-,ltrMatrix-method	ltrMatrix-class
+diag<-,ngeMatrix-method	ngeMatrix-class
+diag<-,nspMatrix-method	nsyMatrix-class
+diag<-,nsyMatrix-method	nsyMatrix-class
+diag<-,ntpMatrix-method	ntrMatrix-class
+diag<-,ntrMatrix-method	ntrMatrix-class
+diagN2U	diagU2N
+Diagonal	Diagonal
+diagonalMatrix-class	diagonalMatrix-class
+diagU2N	diagU2N
+diff,Matrix-method	Matrix-class
+dim,dgCMatrix-method	dgCMatrix-class
+dim,dgeMatrix-method	dgeMatrix-class
+dim,dgRMatrix-method	dgRMatrix-class
+dim,Matrix-method	Matrix-class
+dim,MatrixFactorization-method	MatrixFactorization-class
+dim<-,denseMatrix-method	denseMatrix-class
+dim<-,Matrix-method	Matrix-class
+dim<-,sparseMatrix-method	sparseMatrix-class
+dim<-,sparseVector-method	sparseVector-class
+dimnames,dgeMatrix-method	dgeMatrix-class
+dimnames,Matrix-method	Matrix-class
+dimnames,symmetricMatrix-method	symmetricMatrix-class
+dimnames<-,compMatrix,list-method	compMatrix-class
+dimnames<-,compMatrix,NULL-method	compMatrix-class
+dimnames<-,Matrix,list-method	Matrix-class
+dimnames<-,Matrix,NULL-method	Matrix-class
+dMatrix-class	dMatrix-class
+dpoMatrix-class	dpoMatrix-class
+dppMatrix-class	dpoMatrix-class
+drop,abIndex-method	abIndex-class
+drop,Matrix-method	Matrix-class
+drop0	drop0
+dsCMatrix-class	dsCMatrix-class
+dsparseMatrix-class	dsparseMatrix-class
+dsparseVector-class	sparseVector-class
+dspMatrix-class	dsyMatrix-class
+dsRMatrix-class	dsRMatrix-class
+dsTMatrix-class	dsCMatrix-class
+dsyMatrix-class	dsyMatrix-class
+dtCMatrix-class	dtCMatrix-class
+dtpMatrix-class	dtpMatrix-class
+dtRMatrix-class	dtRMatrix-class-def
+dtrMatrix-class	dtrMatrix-class
+dtTMatrix-class	dtCMatrix-class
+eigen,dgeMatrix,logical-method	dgeMatrix-class
+eigen,dgeMatrix,missing-method	dgeMatrix-class
+expand	expand
+expand,CHMfactor-method	CHMfactor-class
+expand,denseLU-method	LU-class
+expand,MatrixFactorization-method	MatrixFactorization-class
+expand,sparseLU-method	sparseLU-class
+expm	expm
+expm,ddiMatrix-method	expm
+expm,dgeMatrix-method	expm
+expm,dMatrix-method	expm
+expm,Matrix-method	expm
+expm,matrix-method	expm
+expm,symmetricMatrix-method	expm
+expm,triangularMatrix-method	expm
+fac2Sparse	sparse.model.matrix
+fac2sparse	sparse.model.matrix
+facmul	facmul
+facmul.default	facmul
+forceSymmetric	forceSymmetric
+forceSymmetric,corMatrix,character-method	forceSymmetric
+forceSymmetric,corMatrix,missing-method	forceSymmetric
+forceSymmetric,CsparseMatrix,ANY-method	forceSymmetric
+forceSymmetric,denseMatrix,character-method	forceSymmetric
+forceSymmetric,denseMatrix,missing-method	forceSymmetric
+forceSymmetric,dpoMatrix,character-method	forceSymmetric
+forceSymmetric,dpoMatrix,missing-method	forceSymmetric
+forceSymmetric,dppMatrix,character-method	forceSymmetric
+forceSymmetric,dppMatrix,missing-method	forceSymmetric
+forceSymmetric,dsCMatrix,character-method	forceSymmetric
+forceSymmetric,dsCMatrix,missing-method	forceSymmetric
+forceSymmetric,dspMatrix,character-method	forceSymmetric
+forceSymmetric,dspMatrix,missing-method	forceSymmetric
+forceSymmetric,dsRMatrix,character-method	forceSymmetric
+forceSymmetric,dsRMatrix,missing-method	forceSymmetric
+forceSymmetric,dsTMatrix,character-method	forceSymmetric
+forceSymmetric,dsTMatrix,missing-method	forceSymmetric
+forceSymmetric,dsyMatrix,character-method	forceSymmetric
+forceSymmetric,dsyMatrix,missing-method	forceSymmetric
+forceSymmetric,lsCMatrix,character-method	forceSymmetric
+forceSymmetric,lsCMatrix,missing-method	forceSymmetric
+forceSymmetric,lspMatrix,character-method	forceSymmetric
+forceSymmetric,lspMatrix,missing-method	forceSymmetric
+forceSymmetric,lsRMatrix,character-method	forceSymmetric
+forceSymmetric,lsRMatrix,missing-method	forceSymmetric
+forceSymmetric,lsTMatrix,character-method	forceSymmetric
+forceSymmetric,lsTMatrix,missing-method	forceSymmetric
+forceSymmetric,lsyMatrix,character-method	forceSymmetric
+forceSymmetric,lsyMatrix,missing-method	forceSymmetric
+forceSymmetric,matrix,ANY-method	forceSymmetric
+forceSymmetric,Matrix,missing-method	forceSymmetric
+forceSymmetric,nsCMatrix,character-method	forceSymmetric
+forceSymmetric,nsCMatrix,missing-method	forceSymmetric
+forceSymmetric,nspMatrix,character-method	forceSymmetric
+forceSymmetric,nspMatrix,missing-method	forceSymmetric
+forceSymmetric,nsRMatrix,character-method	forceSymmetric
+forceSymmetric,nsRMatrix,missing-method	forceSymmetric
+forceSymmetric,nsTMatrix,character-method	forceSymmetric
+forceSymmetric,nsTMatrix,missing-method	forceSymmetric
+forceSymmetric,nsyMatrix,character-method	forceSymmetric
+forceSymmetric,nsyMatrix,missing-method	forceSymmetric
+forceSymmetric,sparseMatrix,ANY-method	forceSymmetric
+format,sparseMatrix-method	sparseMatrix-class
+formatSparseM	formatSparseM
+formatSpMatrix	printSpMatrix
+gamma,dgCMatrix-method	dgCMatrix-class
+gamma,dMatrix-method	dMatrix-class
+generalMatrix-class	generalMatrix-class
+graph2T	graph2T
+head,Matrix-method	Matrix-class
+head,sparseVector-method	sparseVector-class
+Hilbert	Hilbert
+image,ANY-method	image-methods
+image,CHMfactor-method	image-methods
+image,dgCMatrix-method	image-methods
+image,dgRMatrix-method	image-methods
+image,dgTMatrix-method	image-methods
+image,dsparseMatrix-method	image-methods
+image,lsparseMatrix-method	image-methods
+image,Matrix-method	image-methods
+image,nsparseMatrix-method	image-methods
+image-methods	image-methods
+iMatrix-class	unused-classes
+index-class	index-class
+indMatrix-class	indMatrix-class
+invPerm	invPerm
+is.finite,abIndex-method	abIndex-class
+is.finite,ddenseMatrix-method	is.na-methods
+is.finite,dgeMatrix-method	is.na-methods
+is.finite,diagonalMatrix-method	is.na-methods
+is.finite,dsparseMatrix-method	is.na-methods
+is.finite,indMatrix-method	is.na-methods
+is.finite,lMatrix-method	is.na-methods
+is.finite,nMatrix-method	is.na-methods
+is.finite,nsparseVector-method	sparseVector-class
+is.finite,sparseVector-method	sparseVector-class
+is.infinite,abIndex-method	abIndex-class
+is.infinite,ddenseMatrix-method	is.na-methods
+is.infinite,diagonalMatrix-method	is.na-methods
+is.infinite,dsparseMatrix-method	is.na-methods
+is.infinite,indMatrix-method	is.na-methods
+is.infinite,lMatrix-method	is.na-methods
+is.infinite,nMatrix-method	is.na-methods
+is.infinite,nsparseVector-method	sparseVector-class
+is.infinite,sparseVector-method	sparseVector-class
+is.na,abIndex-method	abIndex-class
+is.na,denseMatrix-method	is.na-methods
+is.na,indMatrix-method	is.na-methods
+is.na,nsparseMatrix-method	nsparseMatrix-classes
+is.na,nsparseVector-method	sparseVector-class
+is.na,sparseMatrix-method	is.na-methods
+is.na,sparseVector-method	sparseVector-class
+is.na-methods	is.na-methods
+is.null.DN	is.null.DN
+isDiagonal	isTriangular
+isDiagonal,denseMatrix-method	isTriangular
+isDiagonal,diagonalMatrix-method	isTriangular
+isDiagonal,matrix-method	isTriangular
+isDiagonal,sparseMatrix-method	isTriangular
+isDiagonal,symmetricMatrix-method	isTriangular
+isDiagonal,triangularMatrix-method	isTriangular
+isDiagonal-methods	isTriangular
+isLDL	CHMfactor-class
+isparseVector-class	sparseVector-class
+isSymmetric,denseMatrix-method	isSymmetric-methods
+isSymmetric,dgCMatrix-method	dgCMatrix-class
+isSymmetric,diagonalMatrix-method	isSymmetric-methods
+isSymmetric,indMatrix-method	indMatrix-class
+isSymmetric,sparseMatrix-method	isSymmetric-methods
+isSymmetric,symmetricMatrix-method	isSymmetric-methods
+isSymmetric,triangularMatrix-method	isSymmetric-methods
+isSymmetric-methods	isSymmetric-methods
+isTriangular	isTriangular
+isTriangular,BunchKaufman-method	isTriangular
+isTriangular,Cholesky-method	isTriangular
+isTriangular,CsparseMatrix-method	isTriangular
+isTriangular,denseMatrix-method	isTriangular
+isTriangular,diagonalMatrix-method	isTriangular
+isTriangular,dtCMatrix-method	isTriangular
+isTriangular,dtpMatrix-method	isTriangular
+isTriangular,dtRMatrix-method	isTriangular
+isTriangular,dtrMatrix-method	isTriangular
+isTriangular,dtTMatrix-method	isTriangular
+isTriangular,ltCMatrix-method	isTriangular
+isTriangular,ltpMatrix-method	isTriangular
+isTriangular,ltRMatrix-method	isTriangular
+isTriangular,ltrMatrix-method	isTriangular
+isTriangular,ltTMatrix-method	isTriangular
+isTriangular,matrix-method	isTriangular
+isTriangular,ntCMatrix-method	isTriangular
+isTriangular,ntpMatrix-method	isTriangular
+isTriangular,ntRMatrix-method	isTriangular
+isTriangular,ntrMatrix-method	isTriangular
+isTriangular,ntTMatrix-method	isTriangular
+isTriangular,pBunchKaufman-method	isTriangular
+isTriangular,pCholesky-method	isTriangular
+isTriangular,triangularMatrix-method	isTriangular
+isTriangular,TsparseMatrix-method	isTriangular
+isTriangular-methods	isTriangular
+KhatriRao	KhatriRao
+KNex	KNex
+kronecker,ANY,diagonalMatrix-method	kronecker-methods
+kronecker,ANY,Matrix-method	kronecker-methods
+kronecker,ANY,sparseMatrix-method	kronecker-methods
+kronecker,dgTMatrix,dgTMatrix-method	kronecker-methods
+kronecker,dgTMatrix,dtTMatrix-method	kronecker-methods
+kronecker,diagonalMatrix,ANY-method	kronecker-methods
+kronecker,diagonalMatrix,Matrix-method	kronecker-methods
+kronecker,dsparseMatrix,dsparseMatrix-method	kronecker-methods
+kronecker,dtTMatrix,dgTMatrix-method	kronecker-methods
+kronecker,dtTMatrix,dtTMatrix-method	kronecker-methods
+kronecker,indMatrix,indMatrix-method	kronecker-methods
+kronecker,Matrix,ANY-method	kronecker-methods
+kronecker,Matrix,diagonalMatrix-method	kronecker-methods
+kronecker,sparseMatrix,ANY-method	kronecker-methods
+kronecker,sparseMatrix,TsparseMatrix-method	kronecker-methods
+kronecker,TsparseMatrix,sparseMatrix-method	kronecker-methods
+kronecker,TsparseMatrix,TsparseMatrix-method	kronecker-methods
+kronecker-methods	kronecker-methods
+ldenseMatrix-class	ldenseMatrix-class
+ldiMatrix-class	ldiMatrix-class
+length,abIndex-method	abIndex-class
+length,Matrix-method	Matrix-class
+length,sparseVector-method	sparseVector-class
+lgamma,dgCMatrix-method	dgCMatrix-class
+lgamma,dMatrix-method	dMatrix-class
+lgCMatrix-class	lsparseMatrix-classes
+lgeMatrix-class	lgeMatrix-class
+lgRMatrix-class	lsparseMatrix-classes
+lgTMatrix-class	lsparseMatrix-classes
+lMatrix-class	dMatrix-class
+log,dgCMatrix-method	dgCMatrix-class
+log,dMatrix-method	dMatrix-class
+Logic,ANY,Matrix-method	Matrix-class
+Logic,CsparseMatrix,CsparseMatrix-method	CsparseMatrix-class
+Logic,dMatrix,logical-method	dMatrix-class
+Logic,dMatrix,numeric-method	dMatrix-class
+Logic,dMatrix,sparseVector-method	sparseVector-class
+Logic,ldenseMatrix,lsparseMatrix-method	ldenseMatrix-class
+Logic,lgCMatrix,lgCMatrix-method	lsparseMatrix-classes
+Logic,lgeMatrix,lgeMatrix-method	lgeMatrix-class
+Logic,lgTMatrix,lgTMatrix-method	lsparseMatrix-classes
+Logic,lMatrix,logical-method	dMatrix-class
+Logic,lMatrix,numeric-method	dMatrix-class
+Logic,lMatrix,sparseVector-method	sparseVector-class
+Logic,logical,dMatrix-method	dMatrix-class
+Logic,logical,lMatrix-method	dMatrix-class
+Logic,logical,Matrix-method	Matrix-class
+Logic,logical,nMatrix-method	nMatrix-class
+Logic,lsCMatrix,lsCMatrix-method	lsparseMatrix-classes
+Logic,lsparseMatrix,ldenseMatrix-method	ldenseMatrix-class
+Logic,lsparseMatrix,lsparseMatrix-method	lsparseMatrix-classes
+Logic,lsparseVector,lsparseVector-method	sparseVector-class
+Logic,ltCMatrix,ltCMatrix-method	lsparseMatrix-classes
+Logic,Matrix,ANY-method	Matrix-class
+Logic,Matrix,logical-method	Matrix-class
+Logic,Matrix,nMatrix-method	nMatrix-class
+Logic,ngeMatrix,ngeMatrix-method	ngeMatrix-class
+Logic,nMatrix,logical-method	nMatrix-class
+Logic,nMatrix,Matrix-method	nMatrix-class
+Logic,nMatrix,nMatrix-method	nMatrix-class
+Logic,nMatrix,numeric-method	nMatrix-class
+Logic,nMatrix,sparseVector-method	sparseVector-class
+Logic,nsparseVector,nsparseVector-method	sparseVector-class
+Logic,numeric,dMatrix-method	dMatrix-class
+Logic,numeric,lMatrix-method	dMatrix-class
+Logic,numeric,nMatrix-method	nMatrix-class
+Logic,sparseVector,dMatrix-method	sparseVector-class
+Logic,sparseVector,lMatrix-method	sparseVector-class
+Logic,sparseVector,nMatrix-method	sparseVector-class
+Logic,sparseVector,sparseVector-method	sparseVector-class
+Logic,triangularMatrix,diagonalMatrix-method	diagonalMatrix-class
+lsCMatrix-class	lsparseMatrix-classes
+lsparseMatrix-class	lsparseMatrix-classes
+lsparseVector-class	sparseVector-class
+lspMatrix-class	lsyMatrix-class
+lsRMatrix-class	lsparseMatrix-classes
+lsTMatrix-class	lsparseMatrix-classes
+lsyMatrix-class	lsyMatrix-class
+ltCMatrix-class	lsparseMatrix-classes
+ltpMatrix-class	ltrMatrix-class
+ltRMatrix-class	lsparseMatrix-classes
+ltrMatrix-class	ltrMatrix-class
+ltTMatrix-class	lsparseMatrix-classes
+lu	lu
+lu,ddenseMatrix-method	ddenseMatrix-class
+lu,dgCMatrix-method	lu
+lu,dgeMatrix-method	lu
+lu,dsparseMatrix-method	dsparseMatrix-class
+lu,dtCMatrix-method	lu
+lu,matrix-method	lu
+lu,sparseMatrix-method	sparseMatrix-class
+LU-class	LU-class
+Math,CsparseMatrix-method	CsparseMatrix-class
+Math,ddenseMatrix-method	ddenseMatrix-class
+Math,denseMatrix-method	denseMatrix-class
+Math,dgCMatrix-method	dgCMatrix-class
+Math,dgeMatrix-method	dgeMatrix-class
+Math,diagonalMatrix-method	diagonalMatrix-class
+Math,sparseMatrix-method	sparseMatrix-class
+Math,sparseVector-method	sparseVector-class
+Math2,dMatrix-method	dMatrix-class
+Math2,dsparseVector-method	sparseVector-class
+Math2,Matrix-method	Matrix-class
+Math2,sparseVector-method	sparseVector-class
+Matrix	Matrix
+Matrix-class	Matrix-class
+MatrixClass	MatrixClass
+MatrixFactorization-class	MatrixFactorization-class
+mean,Matrix-method	Matrix-class
+mean,sparseMatrix-method	sparseMatrix-class
+mean,sparseVector-method	sparseVector-class
+nCHMsimpl-class	CHMfactor-class
+nCHMsuper-class	CHMfactor-class
+ndenseMatrix-class	ndenseMatrix-class
+nearPD	nearPD
+ngCMatrix-class	nsparseMatrix-classes
+ngeMatrix-class	ngeMatrix-class
+ngRMatrix-class	nsparseMatrix-classes
+ngTMatrix-class	nsparseMatrix-classes
+nMatrix-class	nMatrix-class
+nnzero	nnzero
+nnzero,ANY-method	nnzero
+nnzero,CHMfactor-method	nnzero
+nnzero,denseMatrix-method	nnzero
+nnzero,diagonalMatrix-method	nnzero
+nnzero,indMatrix-method	nnzero
+nnzero,sparseMatrix-method	nnzero
+norm	norm
+norm,ANY,missing-method	norm
+norm,ddenseMatrix,character-method	ddenseMatrix-class
+norm,ddenseMatrix,missing-method	ddenseMatrix-class
+norm,dgeMatrix,character-method	dgeMatrix-class
+norm,dgeMatrix,missing-method	dgeMatrix-class
+norm,diagonalMatrix,character-method	diagonalMatrix-class
+norm,dspMatrix,character-method	dsyMatrix-class
+norm,dspMatrix,missing-method	dsyMatrix-class
+norm,dsyMatrix,character-method	dsyMatrix-class
+norm,dsyMatrix,missing-method	dsyMatrix-class
+norm,dtpMatrix,character-method	dtpMatrix-class
+norm,dtpMatrix,missing-method	dtpMatrix-class
+norm,dtrMatrix,character-method	dtrMatrix-class
+norm,dtrMatrix,missing-method	dtrMatrix-class
+norm,ldenseMatrix,character-method	ldenseMatrix-class
+norm,Matrix,character-method	norm
+norm,matrix,character-method	norm
+norm,ndenseMatrix,character-method	ndenseMatrix-class
+norm,sparseMatrix,character-method	sparseMatrix-class
+nsCMatrix-class	nsparseMatrix-classes
+nsparseMatrix-class	nsparseMatrix-classes
+nsparseVector-class	sparseVector-class
+nspMatrix-class	nsyMatrix-class
+nsRMatrix-class	nsparseMatrix-classes
+nsTMatrix-class	nsparseMatrix-classes
+nsyMatrix-class	nsyMatrix-class
+ntCMatrix-class	nsparseMatrix-classes
+ntpMatrix-class	ntrMatrix-class
+ntRMatrix-class	nsparseMatrix-classes
+ntrMatrix-class	ntrMatrix-class
+ntTMatrix-class	nsparseMatrix-classes
+number-class	number-class
+onenormest	condest
+Ops,abIndex,abIndex-method	abIndex-class
+Ops,abIndex,ANY-method	abIndex-class
+Ops,abIndex,numeric-method	abIndex-class
+Ops,ANY,abIndex-method	abIndex-class
+Ops,ANY,ddiMatrix-method	diagonalMatrix-class
+Ops,ANY,ldiMatrix-method	diagonalMatrix-class
+Ops,ANY,Matrix-method	Matrix-class
+Ops,ANY,sparseVector-method	sparseVector-class
+Ops,atomicVector,sparseVector-method	sparseVector-class
+Ops,ddiMatrix,ANY-method	diagonalMatrix-class
+Ops,ddiMatrix,ddiMatrix-method	diagonalMatrix-class
+Ops,ddiMatrix,diagonalMatrix-method	diagonalMatrix-class
+Ops,ddiMatrix,dMatrix-method	diagonalMatrix-class
+Ops,ddiMatrix,ldiMatrix-method	diagonalMatrix-class
+Ops,ddiMatrix,logical-method	diagonalMatrix-class
+Ops,ddiMatrix,Matrix-method	diagonalMatrix-class
+Ops,ddiMatrix,numeric-method	diagonalMatrix-class
+Ops,ddiMatrix,sparseMatrix-method	diagonalMatrix-class
+Ops,diagonalMatrix,ddiMatrix-method	diagonalMatrix-class
+Ops,diagonalMatrix,diagonalMatrix-method	diagonalMatrix-class
+Ops,diagonalMatrix,sparseMatrix-method	sparseMatrix-class
+Ops,diagonalMatrix,triangularMatrix-method	diagonalMatrix-class
+Ops,dMatrix,ddiMatrix-method	diagonalMatrix-class
+Ops,dMatrix,dMatrix-method	dMatrix-class
+Ops,dMatrix,ldiMatrix-method	diagonalMatrix-class
+Ops,dMatrix,lMatrix-method	dMatrix-class
+Ops,dMatrix,nMatrix-method	dMatrix-class
+Ops,dpoMatrix,logical-method	dpoMatrix-class
+Ops,dpoMatrix,numeric-method	dpoMatrix-class
+Ops,dppMatrix,logical-method	dpoMatrix-class
+Ops,dppMatrix,numeric-method	dpoMatrix-class
+Ops,dsparseMatrix,nsparseMatrix-method	nsparseMatrix-classes
+Ops,ldenseMatrix,ldenseMatrix-method	ldenseMatrix-class
+Ops,ldiMatrix,ANY-method	diagonalMatrix-class
+Ops,ldiMatrix,ddiMatrix-method	diagonalMatrix-class
+Ops,ldiMatrix,dMatrix-method	diagonalMatrix-class
+Ops,ldiMatrix,ldiMatrix-method	diagonalMatrix-class
+Ops,ldiMatrix,logical-method	diagonalMatrix-class
+Ops,ldiMatrix,Matrix-method	diagonalMatrix-class
+Ops,ldiMatrix,numeric-method	diagonalMatrix-class
+Ops,ldiMatrix,sparseMatrix-method	diagonalMatrix-class
+Ops,lMatrix,dMatrix-method	dMatrix-class
+Ops,lMatrix,lMatrix-method	dMatrix-class
+Ops,lMatrix,nMatrix-method	nMatrix-class
+Ops,lMatrix,numeric-method	dMatrix-class
+Ops,logical,ddiMatrix-method	diagonalMatrix-class
+Ops,logical,dpoMatrix-method	dpoMatrix-class
+Ops,logical,dppMatrix-method	dpoMatrix-class
+Ops,logical,ldiMatrix-method	diagonalMatrix-class
+Ops,logical,Matrix-method	Matrix-class
+Ops,lsparseMatrix,lsparseMatrix-method	lsparseMatrix-classes
+Ops,lsparseMatrix,nsparseMatrix-method	nsparseMatrix-classes
+Ops,Matrix,ANY-method	Matrix-class
+Ops,Matrix,ddiMatrix-method	diagonalMatrix-class
+Ops,Matrix,ldiMatrix-method	diagonalMatrix-class
+Ops,Matrix,logical-method	Matrix-class
+Ops,Matrix,Matrix-method	Matrix-class
+Ops,Matrix,matrix-method	Matrix-class
+Ops,matrix,Matrix-method	Matrix-class
+Ops,Matrix,sparseVector-method	sparseVector-class
+Ops,ndenseMatrix,ndenseMatrix-method	ndenseMatrix-class
+Ops,nMatrix,dMatrix-method	dMatrix-class
+Ops,nMatrix,lMatrix-method	nMatrix-class
+Ops,nMatrix,numeric-method	nMatrix-class
+Ops,nsparseMatrix,dsparseMatrix-method	nsparseMatrix-classes
+Ops,nsparseMatrix,lsparseMatrix-method	nsparseMatrix-classes
+Ops,nsparseMatrix,sparseMatrix-method	nsparseMatrix-classes
+Ops,numeric,abIndex-method	abIndex-class
+Ops,numeric,ddiMatrix-method	diagonalMatrix-class
+Ops,numeric,dpoMatrix-method	dpoMatrix-class
+Ops,numeric,dppMatrix-method	dpoMatrix-class
+Ops,numeric,ldiMatrix-method	diagonalMatrix-class
+Ops,numeric,lMatrix-method	dMatrix-class
+Ops,numeric,nMatrix-method	nMatrix-class
+Ops,numeric,sparseMatrix-method	sparseMatrix-class
+Ops,sparseMatrix,ddiMatrix-method	diagonalMatrix-class
+Ops,sparseMatrix,diagonalMatrix-method	sparseMatrix-class
+Ops,sparseMatrix,ldiMatrix-method	diagonalMatrix-class
+Ops,sparseMatrix,nsparseMatrix-method	nsparseMatrix-classes
+Ops,sparseMatrix,numeric-method	sparseMatrix-class
+Ops,sparseMatrix,sparseMatrix-method	sparseMatrix-class
+Ops,sparseVector,ANY-method	sparseVector-class
+Ops,sparseVector,atomicVector-method	sparseVector-class
+Ops,sparseVector,Matrix-method	sparseVector-class
+Ops,sparseVector,sparseVector-method	sparseVector-class
+pack	unpack
+pack,matrix-method	unpack
+pack,sparseMatrix-method	unpack
+pack,symmetricMatrix-method	unpack
+pack,triangularMatrix-method	unpack
+pBunchKaufman-class	Cholesky-class
+pCholesky-class	Cholesky-class
+pMatrix-class	pMatrix-class
+print,diagonalMatrix-method	diagonalMatrix-class
+print,sparseMatrix-method	sparseMatrix-class
+print.Matrix	Matrix-class
+print.sparseMatrix	sparseMatrix-class
+printSpMatrix	printSpMatrix
+printSpMatrix2	printSpMatrix
+prod,ddiMatrix-method	diagonalMatrix-class
+prod,ldiMatrix-method	diagonalMatrix-class
+qr	qr-methods
+qr,dgCMatrix-method	qr-methods
+qr,sparseMatrix-method	qr-methods
+qr-methods	qr-methods
+qr.coef,sparseQR,ddenseMatrix-method	sparseQR-class
+qr.coef,sparseQR,Matrix-method	sparseQR-class
+qr.coef,sparseQR,matrix-method	sparseQR-class
+qr.coef,sparseQR,numeric-method	sparseQR-class
+qr.fitted,sparseQR,ddenseMatrix-method	sparseQR-class
+qr.fitted,sparseQR,Matrix-method	sparseQR-class
+qr.fitted,sparseQR,matrix-method	sparseQR-class
+qr.fitted,sparseQR,numeric-method	sparseQR-class
+qr.Q	sparseQR-class
+qr.Q,sparseQR-method	sparseQR-class
+qr.qty,sparseQR,ddenseMatrix-method	sparseQR-class
+qr.qty,sparseQR,Matrix-method	sparseQR-class
+qr.qty,sparseQR,matrix-method	sparseQR-class
+qr.qty,sparseQR,numeric-method	sparseQR-class
+qr.qy,sparseQR,ddenseMatrix-method	sparseQR-class
+qr.qy,sparseQR,Matrix-method	sparseQR-class
+qr.qy,sparseQR,matrix-method	sparseQR-class
+qr.qy,sparseQR,numeric-method	sparseQR-class
+qr.R,sparseQR-method	sparseQR-class
+qr.resid,sparseQR,ddenseMatrix-method	sparseQR-class
+qr.resid,sparseQR,Matrix-method	sparseQR-class
+qr.resid,sparseQR,matrix-method	sparseQR-class
+qr.resid,sparseQR,numeric-method	sparseQR-class
+qrR	qr-methods
+rankMatrix	rankMatrix
+rBind	cBind
+rbind2,ANY,Matrix-method	Matrix-class
+rbind2,atomicVector,ddiMatrix-method	diagonalMatrix-class
+rbind2,atomicVector,ldiMatrix-method	diagonalMatrix-class
+rbind2,atomicVector,Matrix-method	Matrix-class
+rbind2,ddiMatrix,atomicVector-method	diagonalMatrix-class
+rbind2,ddiMatrix,matrix-method	diagonalMatrix-class
+rbind2,denseMatrix,denseMatrix-method	denseMatrix-class
+rbind2,denseMatrix,matrix-method	denseMatrix-class
+rbind2,denseMatrix,numeric-method	denseMatrix-class
+rbind2,denseMatrix,sparseMatrix-method	sparseMatrix-class
+rbind2,diagonalMatrix,sparseMatrix-method	diagonalMatrix-class
+rbind2,indMatrix,indMatrix-method	indMatrix-class
+rbind2,ldiMatrix,atomicVector-method	diagonalMatrix-class
+rbind2,ldiMatrix,matrix-method	diagonalMatrix-class
+rbind2,Matrix,ANY-method	Matrix-class
+rbind2,Matrix,atomicVector-method	Matrix-class
+rbind2,matrix,ddiMatrix-method	diagonalMatrix-class
+rbind2,matrix,denseMatrix-method	denseMatrix-class
+rbind2,matrix,ldiMatrix-method	diagonalMatrix-class
+rbind2,Matrix,Matrix-method	Matrix-class
+rbind2,Matrix,missing-method	Matrix-class
+rbind2,Matrix,NULL-method	Matrix-class
+rbind2,matrix,sparseMatrix-method	sparseMatrix-class
+rbind2,NULL,Matrix-method	Matrix-class
+rbind2,numeric,denseMatrix-method	denseMatrix-class
+rbind2,numeric,sparseMatrix-method	sparseMatrix-class
+rbind2,sparseMatrix,denseMatrix-method	sparseMatrix-class
+rbind2,sparseMatrix,diagonalMatrix-method	diagonalMatrix-class
+rbind2,sparseMatrix,matrix-method	sparseMatrix-class
+rbind2,sparseMatrix,numeric-method	sparseMatrix-class
+rbind2,sparseMatrix,sparseMatrix-method	sparseMatrix-class
+rcond	rcond
+rcond,ANY,missing-method	rcond
+rcond,ddenseMatrix,character-method	ddenseMatrix-class
+rcond,ddenseMatrix,missing-method	ddenseMatrix-class
+rcond,denseMatrix,character-method	denseMatrix-class
+rcond,dgeMatrix,character-method	dgeMatrix-class
+rcond,dgeMatrix,missing-method	dgeMatrix-class
+rcond,dpoMatrix,character-method	dpoMatrix-class
+rcond,dpoMatrix,missing-method	dpoMatrix-class
+rcond,dppMatrix,character-method	dpoMatrix-class
+rcond,dppMatrix,missing-method	dpoMatrix-class
+rcond,dspMatrix,character-method	dsyMatrix-class
+rcond,dspMatrix,missing-method	dsyMatrix-class
+rcond,dsyMatrix,character-method	dsyMatrix-class
+rcond,dsyMatrix,missing-method	dsyMatrix-class
+rcond,dtpMatrix,character-method	dtpMatrix-class
+rcond,dtpMatrix,missing-method	dtpMatrix-class
+rcond,dtrMatrix,character-method	dtrMatrix-class
+rcond,dtrMatrix,missing-method	dtrMatrix-class
+rcond,ldenseMatrix,character-method	rcond
+rcond,Matrix,character-method	rcond
+rcond,ndenseMatrix,character-method	rcond
+rcond,sparseMatrix,character-method	rcond
+readHB	externalFormats
+readMM	externalFormats
+rep,sparseVector-method	sparseVector-class
+rep2abI	rep2abI
+replValue-class	replValue-class
+rleDiff-class	rleDiff-class
+round,dgCMatrix,numeric-method	dgCMatrix-class
+rowMeans	colSums
+rowMeans,CsparseMatrix-method	colSums
+rowMeans,ddenseMatrix-method	colSums
+rowMeans,denseMatrix-method	colSums
+rowMeans,dgCMatrix-method	colSums
+rowMeans,dgeMatrix-method	dgeMatrix-class
+rowMeans,diagonalMatrix-method	colSums
+rowMeans,igCMatrix-method	colSums
+rowMeans,indMatrix-method	indMatrix-class
+rowMeans,lgCMatrix-method	colSums
+rowMeans,ngCMatrix-method	colSums
+rowMeans,RsparseMatrix-method	colSums
+rowMeans,TsparseMatrix-method	colSums
+rowSums	colSums
+rowSums,CsparseMatrix-method	colSums
+rowSums,ddenseMatrix-method	colSums
+rowSums,denseMatrix-method	colSums
+rowSums,dgCMatrix-method	colSums
+rowSums,dgeMatrix-method	dgeMatrix-class
+rowSums,diagonalMatrix-method	colSums
+rowSums,igCMatrix-method	colSums
+rowSums,indMatrix-method	indMatrix-class
+rowSums,lgCMatrix-method	colSums
+rowSums,ngCMatrix-method	colSums
+rowSums,RsparseMatrix-method	colSums
+rowSums,TsparseMatrix-method	colSums
+rsparsematrix	rsparsematrix
+RsparseMatrix-class	RsparseMatrix-class
+Schur	Schur
+Schur,dgeMatrix,logical-method	Schur
+Schur,dgeMatrix,missing-method	Schur
+Schur,diagonalMatrix,logical-method	Schur
+Schur,diagonalMatrix,missing-method	Schur
+Schur,dsyMatrix,ANY-method	Schur
+Schur,generalMatrix,logical-method	Schur
+Schur,generalMatrix,missing-method	Schur
+Schur,matrix,logical-method	Schur
+Schur,matrix,missing-method	Schur
+Schur,symmetricMatrix,logical-method	Schur
+Schur,symmetricMatrix,missing-method	Schur
+Schur,triangularMatrix,logical-method	Schur
+Schur,triangularMatrix,missing-method	Schur
+Schur-class	Schur-class
+seqMat-class	abIndex-class
+show,abIndex-method	abIndex-class
+show,BunchKaufman-method	Cholesky-class
+show,ddenseMatrix-method	ddenseMatrix-class
+show,denseMatrix-method	denseMatrix-class
+show,diagonalMatrix-method	diagonalMatrix-class
+show,dMatrix-method	dMatrix-class
+show,dsyMatrix-method	dsyMatrix-class
+show,dtrMatrix-method	dtrMatrix-class
+show,Matrix-method	Matrix-class
+show,MatrixFactorization-method	MatrixFactorization-class
+show,nMatrix-method	nMatrix-class
+show,pBunchKaufman-method	Cholesky-class
+show,rleDiff-method	rleDiff-class
+show,sparseMatrix-method	sparseMatrix-class
+show,sparseVector-method	sparseVector-class
+signif,dgCMatrix,numeric-method	dgCMatrix-class
+skewpart	symmpart
+skewpart,ddenseMatrix-method	symmpart
+skewpart,denseMatrix-method	symmpart
+skewpart,diagonalMatrix-method	symmpart
+skewpart,Matrix-method	symmpart
+skewpart,matrix-method	symmpart
+skewpart,symmetricMatrix-method	symmpart
+skewpart-methods	symmpart
+solve	solve-methods
+solve,ANY,Matrix-method	solve-methods
+solve,CHMfactor,ANY-method	solve-methods
+solve,CHMfactor,ddenseMatrix-method	solve-methods
+solve,CHMfactor,diagonalMatrix-method	solve-methods
+solve,CHMfactor,dsparseMatrix-method	solve-methods
+solve,CHMfactor,matrix-method	solve-methods
+solve,CHMfactor,missing-method	solve-methods
+solve,CHMfactor,numeric-method	solve-methods
+solve,ddenseMatrix,ANY-method	solve-methods
+solve,ddenseMatrix,Matrix-method	solve-methods
+solve,ddenseMatrix,matrix-method	solve-methods
+solve,ddenseMatrix,missing-method	solve-methods
+solve,ddenseMatrix,numeric-method	solve-methods
+solve,denseLU,missing-method	solve-methods
+solve,dgCMatrix,ddenseMatrix-method	solve-methods
+solve,dgCMatrix,dsparseMatrix-method	solve-methods
+solve,dgCMatrix,matrix-method	solve-methods
+solve,dgCMatrix,missing-method	solve-methods
+solve,dgeMatrix,ddenseMatrix-method	solve-methods
+solve,dgeMatrix,matrix-method	solve-methods
+solve,dgeMatrix,missing-method	solve-methods
+solve,dgeMatrix,sparseMatrix-method	solve-methods
+solve,diagonalMatrix,Matrix-method	solve-methods
+solve,diagonalMatrix,matrix-method	solve-methods
+solve,diagonalMatrix,missing-method	solve-methods
+solve,dpoMatrix,dgeMatrix-method	solve-methods
+solve,dpoMatrix,matrix-method	solve-methods
+solve,dpoMatrix,missing-method	solve-methods
+solve,dppMatrix,dgeMatrix-method	solve-methods
+solve,dppMatrix,integer-method	solve-methods
+solve,dppMatrix,matrix-method	solve-methods
+solve,dppMatrix,missing-method	solve-methods
+solve,dsCMatrix,ddenseMatrix-method	solve-methods
+solve,dsCMatrix,denseMatrix-method	solve-methods
+solve,dsCMatrix,dsparseMatrix-method	solve-methods
+solve,dsCMatrix,matrix-method	solve-methods
+solve,dsCMatrix,missing-method	solve-methods
+solve,dsCMatrix,numeric-method	solve-methods
+solve,dspMatrix,ddenseMatrix-method	solve-methods
+solve,dspMatrix,matrix-method	solve-methods
+solve,dspMatrix,missing-method	solve-methods
+solve,dsyMatrix,ddenseMatrix-method	solve-methods
+solve,dsyMatrix,denseMatrix-method	solve-methods
+solve,dsyMatrix,matrix-method	solve-methods
+solve,dsyMatrix,missing-method	solve-methods
+solve,dtCMatrix,CsparseMatrix-method	solve-methods
+solve,dtCMatrix,dgeMatrix-method	solve-methods
+solve,dtCMatrix,matrix-method	solve-methods
+solve,dtCMatrix,missing-method	solve-methods
+solve,dtCMatrix,numeric-method	solve-methods
+solve,dtpMatrix,ddenseMatrix-method	solve-methods
+solve,dtpMatrix,matrix-method	solve-methods
+solve,dtpMatrix,missing-method	solve-methods
+solve,dtrMatrix,ddenseMatrix-method	solve-methods
+solve,dtrMatrix,dMatrix-method	solve-methods
+solve,dtrMatrix,Matrix-method	solve-methods
+solve,dtrMatrix,matrix-method	solve-methods
+solve,dtrMatrix,missing-method	solve-methods
+solve,Matrix,ANY-method	solve-methods
+solve,Matrix,diagonalMatrix-method	solve-methods
+solve,Matrix,matrix-method	solve-methods
+solve,matrix,Matrix-method	solve-methods
+solve,Matrix,missing-method	solve-methods
+solve,Matrix,numeric-method	solve-methods
+solve,Matrix,pMatrix-method	solve-methods
+solve,Matrix,sparseVector-method	solve-methods
+solve,MatrixFactorization,ANY-method	solve-methods
+solve,MatrixFactorization,missing-method	solve-methods
+solve,MatrixFactorization,numeric-method	solve-methods
+solve,pMatrix,Matrix-method	solve-methods
+solve,pMatrix,matrix-method	solve-methods
+solve,pMatrix,missing-method	solve-methods
+solve,sparseQR,ANY-method	solve-methods
+solve,TsparseMatrix,ANY-method	solve-methods
+solve,TsparseMatrix,missing-method	solve-methods
+solve-methods	solve-methods
+sparse.model.matrix	sparse.model.matrix
+sparseLU-class	sparseLU-class
+SparseM-coerce-methods	SparseM-conv
+sparseMatrix	sparseMatrix
+sparseMatrix-class	sparseMatrix-class
+sparseQR-class	sparseQR-class
+sparseVector	sparseVector
+sparseVector-class	sparseVector-class
+spMatrix	spMatrix
+Subassign-methods	Subassign-methods
+sum,ddiMatrix-method	diagonalMatrix-class
+sum,ldiMatrix-method	diagonalMatrix-class
+Summary,abIndex-method	abIndex-class
+Summary,ddenseMatrix-method	ddenseMatrix-class
+Summary,ddiMatrix-method	diagonalMatrix-class
+summary,diagonalMatrix-method	diagonalMatrix-class
+Summary,dsparseMatrix-method	dsparseMatrix-class
+Summary,indMatrix-method	indMatrix-class
+Summary,ldenseMatrix-method	ldenseMatrix-class
+Summary,ldiMatrix-method	diagonalMatrix-class
+Summary,lMatrix-method	dMatrix-class
+Summary,Matrix-method	Matrix-class
+Summary,ndenseMatrix-method	ndenseMatrix-class
+Summary,nMatrix-method	nMatrix-class
+Summary,nsparseVector-method	sparseVector-class
+Summary,pMatrix-method	pMatrix-class
+summary,sparseMatrix-method	sparseMatrix-class
+Summary,sparseVector-method	sparseVector-class
+symmetricMatrix-class	symmetricMatrix-class
+symmpart	symmpart
+symmpart,ddenseMatrix-method	symmpart
+symmpart,denseMatrix-method	symmpart
+symmpart,diagonalMatrix-method	symmpart
+symmpart,Matrix-method	symmpart
+symmpart,matrix-method	symmpart
+symmpart,symmetricMatrix-method	symmpart
+symmpart-methods	symmpart
+t,CsparseMatrix-method	CsparseMatrix-class
+t,ddenseMatrix-method	ddenseMatrix-class
+t,dgCMatrix-method	dgCMatrix-class
+t,dgeMatrix-method	dgeMatrix-class
+t,dgRMatrix-method	dgRMatrix-class
+t,diagonalMatrix-method	diagonalMatrix-class
+t,dppMatrix-method	dpoMatrix-class
+t,dsCMatrix-method	dsCMatrix-class
+t,dspMatrix-method	dsyMatrix-class
+t,dsTMatrix-method	dsCMatrix-class
+t,dsyMatrix-method	dsyMatrix-class
+t,dtCMatrix-method	dtCMatrix-class
+t,dtpMatrix-method	dtpMatrix-class
+t,dtrMatrix-method	dtrMatrix-class
+t,dtTMatrix-method	dtCMatrix-class
+t,indMatrix-method	indMatrix-class
+t,lgCMatrix-method	lsparseMatrix-classes
+t,lgeMatrix-method	lgeMatrix-class
+t,lgTMatrix-method	lsparseMatrix-classes
+t,lsCMatrix-method	lsparseMatrix-classes
+t,lspMatrix-method	lsyMatrix-class
+t,lsTMatrix-method	lsparseMatrix-classes
+t,lsyMatrix-method	lsyMatrix-class
+t,ltCMatrix-method	lsparseMatrix-classes
+t,ltpMatrix-method	ltrMatrix-class
+t,ltrMatrix-method	ltrMatrix-class
+t,ltTMatrix-method	lsparseMatrix-classes
+t,Matrix-method	Matrix-class
+t,ngCMatrix-method	nsparseMatrix-classes
+t,ngeMatrix-method	ngeMatrix-class
+t,ngTMatrix-method	nsparseMatrix-classes
+t,nsCMatrix-method	nsparseMatrix-classes
+t,nspMatrix-method	nsyMatrix-class
+t,nsTMatrix-method	nsparseMatrix-classes
+t,nsyMatrix-method	nsyMatrix-class
+t,ntCMatrix-method	nsparseMatrix-classes
+t,ntpMatrix-method	ntrMatrix-class
+t,ntrMatrix-method	ntrMatrix-class
+t,ntTMatrix-method	nsparseMatrix-classes
+t,pMatrix-method	pMatrix-class
+t,RsparseMatrix-method	RsparseMatrix-class
+t,sparseVector-method	sparseVector-class
+t,TsparseMatrix-method	TsparseMatrix-class
+T2graph	graph2T
+tail,Matrix-method	Matrix-class
+tail,sparseVector-method	sparseVector-class
+tcrossprod	matrix-products
+tcrossprod,ANY,Matrix-method	matrix-products
+tcrossprod,ANY,symmetricMatrix-method	matrix-products
+tcrossprod,ANY,TsparseMatrix-method	matrix-products
+tcrossprod,CsparseMatrix,CsparseMatrix-method	matrix-products
+tcrossprod,CsparseMatrix,ddenseMatrix-method	matrix-products
+tcrossprod,CsparseMatrix,diagonalMatrix-method	matrix-products
+tcrossprod,CsparseMatrix,matrix-method	matrix-products
+tcrossprod,CsparseMatrix,missing-method	matrix-products
+tcrossprod,CsparseMatrix,numLike-method	matrix-products
+tcrossprod,ddenseMatrix,CsparseMatrix-method	matrix-products
+tcrossprod,ddenseMatrix,ddenseMatrix-method	matrix-products
+tcrossprod,ddenseMatrix,dsCMatrix-method	matrix-products
+tcrossprod,ddenseMatrix,dtrMatrix-method	matrix-products
+tcrossprod,ddenseMatrix,ldenseMatrix-method	matrix-products
+tcrossprod,ddenseMatrix,lsCMatrix-method	matrix-products
+tcrossprod,ddenseMatrix,matrix-method	matrix-products
+tcrossprod,ddenseMatrix,missing-method	matrix-products
+tcrossprod,ddenseMatrix,ndenseMatrix-method	matrix-products
+tcrossprod,ddenseMatrix,nsCMatrix-method	matrix-products
+tcrossprod,dgeMatrix,dgeMatrix-method	matrix-products
+tcrossprod,dgeMatrix,diagonalMatrix-method	matrix-products
+tcrossprod,dgeMatrix,matrix-method	matrix-products
+tcrossprod,dgeMatrix,missing-method	matrix-products
+tcrossprod,dgeMatrix,numLike-method	matrix-products
+tcrossprod,diagonalMatrix,CsparseMatrix-method	matrix-products
+tcrossprod,diagonalMatrix,diagonalMatrix-method	matrix-products
+tcrossprod,diagonalMatrix,matrix-method	matrix-products
+tcrossprod,diagonalMatrix,missing-method	matrix-products
+tcrossprod,diagonalMatrix,sparseMatrix-method	matrix-products
+tcrossprod,dtrMatrix,dtrMatrix-method	matrix-products
+tcrossprod,indMatrix,indMatrix-method	matrix-products
+tcrossprod,indMatrix,missing-method	matrix-products
+tcrossprod,ldenseMatrix,ddenseMatrix-method	matrix-products
+tcrossprod,ldenseMatrix,ldenseMatrix-method	matrix-products
+tcrossprod,ldenseMatrix,matrix-method	matrix-products
+tcrossprod,ldenseMatrix,missing-method	matrix-products
+tcrossprod,ldenseMatrix,ndenseMatrix-method	matrix-products
+tcrossprod,lgCMatrix,missing-method	matrix-products
+tcrossprod,lgeMatrix,diagonalMatrix-method	matrix-products
+tcrossprod,lgTMatrix,missing-method	matrix-products
+tcrossprod,lsparseMatrix,missing-method	matrix-products
+tcrossprod,Matrix,ANY-method	matrix-products
+tcrossprod,matrix,CsparseMatrix-method	matrix-products
+tcrossprod,matrix,dgeMatrix-method	matrix-products
+tcrossprod,matrix,diagonalMatrix-method	matrix-products
+tcrossprod,matrix,dsCMatrix-method	matrix-products
+tcrossprod,matrix,dtrMatrix-method	matrix-products
+tcrossprod,Matrix,indMatrix-method	matrix-products
+tcrossprod,matrix,indMatrix-method	matrix-products
+tcrossprod,matrix,lsCMatrix-method	matrix-products
+tcrossprod,Matrix,Matrix-method	matrix-products
+tcrossprod,Matrix,matrix-method	matrix-products
+tcrossprod,matrix,Matrix-method	matrix-products
+tcrossprod,Matrix,missing-method	matrix-products
+tcrossprod,matrix,nsCMatrix-method	matrix-products
+tcrossprod,Matrix,numLike-method	matrix-products
+tcrossprod,Matrix,pMatrix-method	matrix-products
+tcrossprod,matrix,pMatrix-method	matrix-products
+tcrossprod,Matrix,symmetricMatrix-method	matrix-products
+tcrossprod,Matrix,TsparseMatrix-method	matrix-products
+tcrossprod,mMatrix,sparseVector-method	matrix-products
+tcrossprod,ndenseMatrix,ddenseMatrix-method	matrix-products
+tcrossprod,ndenseMatrix,ldenseMatrix-method	matrix-products
+tcrossprod,ndenseMatrix,matrix-method	matrix-products
+tcrossprod,ndenseMatrix,missing-method	matrix-products
+tcrossprod,ndenseMatrix,ndenseMatrix-method	matrix-products
+tcrossprod,ngCMatrix,missing-method	matrix-products
+tcrossprod,ngTMatrix,missing-method	matrix-products
+tcrossprod,nsparseMatrix,missing-method	matrix-products
+tcrossprod,numLike,CsparseMatrix-method	matrix-products
+tcrossprod,numLike,dgeMatrix-method	matrix-products
+tcrossprod,numLike,Matrix-method	matrix-products
+tcrossprod,numLike,sparseVector-method	matrix-products
+tcrossprod,pMatrix,missing-method	matrix-products
+tcrossprod,pMatrix,pMatrix-method	matrix-products
+tcrossprod,sparseMatrix,diagonalMatrix-method	matrix-products
+tcrossprod,sparseMatrix,sparseVector-method	matrix-products
+tcrossprod,sparseVector,missing-method	matrix-products
+tcrossprod,sparseVector,mMatrix-method	matrix-products
+tcrossprod,sparseVector,numLike-method	matrix-products
+tcrossprod,sparseVector,sparseMatrix-method	matrix-products
+tcrossprod,sparseVector,sparseVector-method	matrix-products
+tcrossprod,TsparseMatrix,ANY-method	matrix-products
+tcrossprod,TsparseMatrix,Matrix-method	matrix-products
+tcrossprod,TsparseMatrix,missing-method	matrix-products
+tcrossprod,TsparseMatrix,TsparseMatrix-method	matrix-products
+tcrossprod-methods	matrix-products
+toeplitz,sparseVector-method	sparseVector-class
+triangularMatrix-class	triangularMatrix-class
+tril	band
+tril,CsparseMatrix-method	band
+tril,ddenseMatrix-method	band
+tril,denseMatrix-method	band
+tril,diagonalMatrix-method	band
+tril,dsCMatrix-method	band
+tril,dtCMatrix-method	band
+tril,dtpMatrix-method	band
+tril,dtRMatrix-method	band
+tril,dtrMatrix-method	band
+tril,dtTMatrix-method	band
+tril,itCMatrix-method	band
+tril,itRMatrix-method	band
+tril,itTMatrix-method	band
+tril,lsCMatrix-method	band
+tril,ltCMatrix-method	band
+tril,ltpMatrix-method	band
+tril,ltRMatrix-method	band
+tril,ltrMatrix-method	band
+tril,ltTMatrix-method	band
+tril,matrix-method	band
+tril,nsCMatrix-method	band
+tril,ntCMatrix-method	band
+tril,ntpMatrix-method	band
+tril,ntRMatrix-method	band
+tril,ntrMatrix-method	band
+tril,ntTMatrix-method	band
+tril,RsparseMatrix-method	band
+tril,TsparseMatrix-method	band
+tril-methods	band
+triu	band
+triu,CsparseMatrix-method	band
+triu,ddenseMatrix-method	band
+triu,denseMatrix-method	band
+triu,diagonalMatrix-method	band
+triu,dsCMatrix-method	band
+triu,dtCMatrix-method	band
+triu,dtpMatrix-method	band
+triu,dtRMatrix-method	band
+triu,dtrMatrix-method	band
+triu,dtTMatrix-method	band
+triu,itCMatrix-method	band
+triu,itRMatrix-method	band
+triu,itTMatrix-method	band
+triu,lsCMatrix-method	band
+triu,ltCMatrix-method	band
+triu,ltpMatrix-method	band
+triu,ltRMatrix-method	band
+triu,ltrMatrix-method	band
+triu,ltTMatrix-method	band
+triu,matrix-method	band
+triu,nsCMatrix-method	band
+triu,ntCMatrix-method	band
+triu,ntpMatrix-method	band
+triu,ntRMatrix-method	band
+triu,ntrMatrix-method	band
+triu,ntTMatrix-method	band
+triu,RsparseMatrix-method	band
+triu,TsparseMatrix-method	band
+triu-methods	band
+TsparseMatrix-class	TsparseMatrix-class
+uniqTsparse	uniqTsparse
+unname,Matrix,missing-method	Matrix-class
+unname,Matrix-method	Matrix-class
+unpack	unpack
+unpack,dspMatrix-method	unpack
+unpack,dtpMatrix-method	unpack
+unpack,sparseMatrix-method	unpack
+unpack,symmetricMatrix-method	unpack
+unpack,triangularMatrix-method	unpack
+update,CHMfactor-method	CHMfactor-class
+updown	updown
+updown,ANY,ANY,ANY-method	updown
+updown,character,mMatrix,CHMfactor-method	updown
+updown,logical,mMatrix,CHMfactor-method	updown
+updown-methods	updown
+USCounties	USCounties
+which,ldenseMatrix-method	ldenseMatrix-class
+which,ldiMatrix-method	diagonalMatrix-class
+which,lgTMatrix-method	lsparseMatrix-classes
+which,lsparseMatrix-method	lsparseMatrix-classes
+which,lsparseVector-method	lsparseMatrix-classes
+which,lsTMatrix-method	lsparseMatrix-classes
+which,ltTMatrix-method	lsparseMatrix-classes
+which,ndenseMatrix-method	ndenseMatrix-class
+which,ngTMatrix-method	nsparseMatrix-classes
+which,nsparseMatrix-method	nsparseMatrix-classes
+which,nsparseVector-method	nsparseMatrix-classes
+which,nsTMatrix-method	nsparseMatrix-classes
+which,ntTMatrix-method	nsparseMatrix-classes
+writeMM	externalFormats
+writeMM,CsparseMatrix-method	externalFormats
+writeMM,sparseMatrix-method	externalFormats
+xsparseVector-class	sparseVector-class
+zapsmall,dMatrix-method	dMatrix-class
+zMatrix-class	unused-classes
+zsparseVector-class	sparseVector-class
+[,abIndex,index,ANY,ANY-method	abIndex-class
+[,CsparseMatrix,index,index,logical-method	Xtrct-methods
+[,CsparseMatrix,index,missing,logical-method	Xtrct-methods
+[,CsparseMatrix,missing,index,logical-method	Xtrct-methods
+[,denseMatrix,index,index,logical-method	Xtrct-methods
+[,denseMatrix,index,missing,logical-method	Xtrct-methods
+[,denseMatrix,matrix,missing,ANY-method	Xtrct-methods
+[,denseMatrix,matrix,missing,missing-method	Xtrct-methods
+[,denseMatrix,missing,index,logical-method	Xtrct-methods
+[,diagonalMatrix,index,index,logical-method	Xtrct-methods
+[,diagonalMatrix,index,missing,logical-method	Xtrct-methods
+[,diagonalMatrix,missing,index,logical-method	Xtrct-methods
+[,dMatrix,lMatrix,missing,ANY-method	dMatrix-class
+[,dMatrix,logical,missing,ANY-method	dMatrix-class
+[,indMatrix,index,missing,logical-method	Xtrct-methods
+[,Matrix,ANY,ANY,ANY-method	Xtrct-methods
+[,Matrix,index,index,missing-method	Xtrct-methods
+[,Matrix,index,missing,missing-method	Xtrct-methods
+[,Matrix,lMatrix,missing,ANY-method	Xtrct-methods
+[,Matrix,lMatrix,missing,missing-method	Xtrct-methods
+[,Matrix,logical,missing,ANY-method	Xtrct-methods
+[,Matrix,logical,missing,missing-method	Xtrct-methods
+[,Matrix,matrix,missing,ANY-method	Xtrct-methods
+[,Matrix,matrix,missing,missing-method	Xtrct-methods
+[,Matrix,missing,index,missing-method	Xtrct-methods
+[,Matrix,missing,missing,ANY-method	Xtrct-methods
+[,sparseMatrix,index,index,logical-method	Xtrct-methods
+[,sparseMatrix,index,missing,logical-method	Xtrct-methods
+[,sparseMatrix,missing,index,logical-method	Xtrct-methods
+[,sparseVector,index,ANY,ANY-method	sparseVector-class
+[,sparseVector,lsparseVector,ANY,ANY-method	sparseVector-class
+[,sparseVector,nsparseVector,ANY,ANY-method	sparseVector-class
+[,TsparseMatrix,index,index,logical-method	Xtrct-methods
+[,TsparseMatrix,index,missing,logical-method	Xtrct-methods
+[,TsparseMatrix,missing,index,logical-method	Xtrct-methods
+[-methods	Xtrct-methods
+[<-,CsparseMatrix,index,index,replValue-method	Subassign-methods
+[<-,CsparseMatrix,index,index,sparseVector-method	Subassign-methods
+[<-,CsparseMatrix,index,missing,replValue-method	Subassign-methods
+[<-,CsparseMatrix,index,missing,sparseVector-method	Subassign-methods
+[<-,CsparseMatrix,ldenseMatrix,missing,replValue-method	Subassign-methods
+[<-,CsparseMatrix,lsparseMatrix,missing,replValue-method	Subassign-methods
+[<-,CsparseMatrix,Matrix,missing,replValue-method	Subassign-methods
+[<-,CsparseMatrix,matrix,missing,replValue-method	Subassign-methods
+[<-,CsparseMatrix,missing,index,replValue-method	Subassign-methods
+[<-,CsparseMatrix,missing,index,sparseVector-method	Subassign-methods
+[<-,CsparseMatrix,ndenseMatrix,missing,replValue-method	Subassign-methods
+[<-,CsparseMatrix,nsparseMatrix,missing,replValue-method	Subassign-methods
+[<-,denseMatrix,index,index,replValue-method	Subassign-methods
+[<-,denseMatrix,index,missing,replValue-method	Subassign-methods
+[<-,denseMatrix,matrix,missing,replValue-method	Subassign-methods
+[<-,denseMatrix,missing,index,replValue-method	Subassign-methods
+[<-,denseMatrix,missing,missing,ANY-method	Subassign-methods
+[<-,diagonalMatrix,index,index,replValue-method	Subassign-methods
+[<-,diagonalMatrix,index,index,sparseMatrix-method	Subassign-methods
+[<-,diagonalMatrix,index,index,sparseVector-method	Subassign-methods
+[<-,diagonalMatrix,index,missing,replValue-method	Subassign-methods
+[<-,diagonalMatrix,index,missing,sparseMatrix-method	Subassign-methods
+[<-,diagonalMatrix,index,missing,sparseVector-method	Subassign-methods
+[<-,diagonalMatrix,matrix,missing,replValue-method	Subassign-methods
+[<-,diagonalMatrix,missing,index,replValue-method	Subassign-methods
+[<-,diagonalMatrix,missing,index,sparseMatrix-method	Subassign-methods
+[<-,diagonalMatrix,missing,index,sparseVector-method	Subassign-methods
+[<-,diagonalMatrix,missing,missing,ANY-method	Subassign-methods
+[<-,indMatrix,index,ANY,ANY-method	Subassign-methods
+[<-,indMatrix,missing,index,ANY-method	Subassign-methods
+[<-,indMatrix,missing,missing,ANY-method	Subassign-methods
+[<-,Matrix,ANY,ANY,ANY-method	Subassign-methods
+[<-,Matrix,ANY,ANY,Matrix-method	Subassign-methods
+[<-,Matrix,ANY,ANY,matrix-method	Subassign-methods
+[<-,Matrix,ANY,missing,Matrix-method	Subassign-methods
+[<-,Matrix,ANY,missing,matrix-method	Subassign-methods
+[<-,Matrix,ldenseMatrix,missing,replValue-method	Subassign-methods
+[<-,Matrix,lsparseMatrix,missing,replValue-method	Subassign-methods
+[<-,Matrix,matrix,missing,replValue-method	Subassign-methods
+[<-,Matrix,missing,ANY,Matrix-method	Subassign-methods
+[<-,Matrix,missing,ANY,matrix-method	Subassign-methods
+[<-,Matrix,ndenseMatrix,missing,replValue-method	Subassign-methods
+[<-,Matrix,nsparseMatrix,missing,replValue-method	Subassign-methods
+[<-,RsparseMatrix,index,index,replValue-method	Subassign-methods
+[<-,RsparseMatrix,index,index,sparseVector-method	Subassign-methods
+[<-,RsparseMatrix,index,missing,replValue-method	Subassign-methods
+[<-,RsparseMatrix,index,missing,sparseVector-method	Subassign-methods
+[<-,RsparseMatrix,matrix,missing,replValue-method	Subassign-methods
+[<-,RsparseMatrix,missing,index,replValue-method	Subassign-methods
+[<-,RsparseMatrix,missing,index,sparseVector-method	Subassign-methods
+[<-,sparseMatrix,ANY,ANY,sparseMatrix-method	Subassign-methods
+[<-,sparseMatrix,ANY,missing,sparseMatrix-method	Subassign-methods
+[<-,sparseMatrix,missing,ANY,sparseMatrix-method	Subassign-methods
+[<-,sparseMatrix,missing,missing,ANY-method	Subassign-methods
+[<-,sparseVector,index,missing,replValue-method	sparseVector-class
+[<-,sparseVector,sparseVector,missing,replValue-method	sparseVector-class
+[<-,TsparseMatrix,index,index,replValue-method	Subassign-methods
+[<-,TsparseMatrix,index,index,sparseVector-method	Subassign-methods
+[<-,TsparseMatrix,index,missing,replValue-method	Subassign-methods
+[<-,TsparseMatrix,index,missing,sparseVector-method	Subassign-methods
+[<-,TsparseMatrix,lMatrix,missing,replValue-method	Subassign-methods
+[<-,TsparseMatrix,Matrix,missing,replValue-method	Subassign-methods
+[<-,TsparseMatrix,matrix,missing,replValue-method	Subassign-methods
+[<-,TsparseMatrix,missing,index,replValue-method	Subassign-methods
+[<-,TsparseMatrix,missing,index,sparseVector-method	Subassign-methods
+[<-,TsparseMatrix,nMatrix,missing,replValue-method	Subassign-methods
+[<--methods	Subassign-methods
+^,ddenseMatrix,ddiMatrix-method	diagonalMatrix-class
+^,ddenseMatrix,ldiMatrix-method	diagonalMatrix-class
+^,ddiMatrix,ddenseMatrix-method	diagonalMatrix-class
+^,ddiMatrix,ldenseMatrix-method	diagonalMatrix-class
+^,ddiMatrix,Matrix-method	diagonalMatrix-class
+^,ddiMatrix,ndenseMatrix-method	diagonalMatrix-class
+^,ldenseMatrix,ddiMatrix-method	diagonalMatrix-class
+^,ldenseMatrix,ldiMatrix-method	diagonalMatrix-class
+^,ldiMatrix,ddenseMatrix-method	diagonalMatrix-class
+^,ldiMatrix,ldenseMatrix-method	diagonalMatrix-class
+^,ldiMatrix,Matrix-method	diagonalMatrix-class
+^,ldiMatrix,ndenseMatrix-method	diagonalMatrix-class
+^,Matrix,ddiMatrix-method	diagonalMatrix-class
+^,Matrix,ldiMatrix-method	diagonalMatrix-class
+^,ndenseMatrix,ddiMatrix-method	diagonalMatrix-class
+^,ndenseMatrix,ldiMatrix-method	diagonalMatrix-class
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/help/paths.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/help/paths.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/help/aliases.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/help/aliases.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/help/Matrix.rdb
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/help/Matrix.rdb
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/help/Matrix.rdx
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/help/Matrix.rdx
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/R/Matrix.rdb
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/R/Matrix.rdb
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/R/Matrix.rdx
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/R/Matrix.rdx
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/R/Matrix
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/R/Matrix	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/R/Matrix	(revision 2477)
@@ -0,0 +1,27 @@
+#  File share/R/nspackloader.R
+#  Part of the R package, http://www.R-project.org
+#
+#  Copyright (C) 1995-2012 The R Core Team
+#
+#  This program is free software; you can redistribute it and/or modify
+#  it under the terms of the GNU General Public License as published by
+#  the Free Software Foundation; either version 2 of the License, or
+#  (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  A copy of the GNU General Public License is available at
+#  http://www.r-project.org/Licenses/
+
+local({
+    info <- loadingNamespaceInfo()
+    pkg <- info$pkgname
+    ns <- .getNamespace(as.name(pkg))
+    if (is.null(ns))
+        stop("cannot find namespace environment for ", pkg, domain = NA);
+    dbbase <- file.path(info$libname, pkg, "R", pkg)
+    lazyLoad(dbbase, ns, filter = function(n) n != ".__NAMESPACE__.")
+})
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/tests/Simple.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/tests/Simple.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/tests/Simple.R	(revision 2477)
@@ -0,0 +1,1052 @@
+#### Currently a collection of simple tests
+##	(since 'Matrix' takes long to load, rather have fewer source files!)
+
+##-------- *BEFORE* attaching Matrix: --------------------------------
+str(Matrix::Matrix)# -> load the namespace
+T <- new("ngTMatrix", i=0L, j=2L, Dim = c(2L,6L))
+T
+as(T, "CsparseMatrix")
+## gave Error in asMethod(object) : could not find function ".M.classEnv"
+## from  0.999375-23 to *-25
+
+## another even shorter version of this:
+n <- new("dgCMatrix")
+n
+## this:
+m <- Matrix::Matrix(cbind(1,0,diag(x=2:4)))
+m
+##--------------------------------------------------------------------
+
+library(Matrix)
+
+source(system.file("test-tools.R", package = "Matrix"))# identical3() etc
+
+if(interactive()) {
+    options(error = recover, warn = 1)
+} else options(Matrix.verbose = TRUE, warn = 1)# to show Matrix.msg()s
+
+### Matrix() ''smartness''
+(d4 <- Matrix(diag(4)))
+(z4 <- Matrix(0*diag(4)))
+(o4 <- Matrix(1+diag(4)))
+(tr <- Matrix(cbind(1,0:1)))
+(M4 <- Matrix(m4 <- cbind(0,rbind(6*diag(3),0))))
+dM4 <- Matrix(M4, sparse = FALSE)
+d4. <- diag(4); dimnames(d4.) <- dns <- rep(list(LETTERS[1:4]), 2)
+stopifnot(identical(dimnames(d4 <- Matrix(d4.)), dns),
+          identical3(d4, as(d4., "Matrix"), as(d4., "diagonalMatrix")))
+class(mN <-  Matrix(NA, 3,4)) # NA *is* logical
+validObject(Matrix(NA))
+bd4 <- bdiag(M4,dM4,M4)
+stopifnotValid(o4, "dsyMatrix")
+stopifnotValid(M4, "dtCMatrix")
+stopifnot(validObject(dM4), validObject(mN),
+          identical(bdiag(M4), bdiag(dM4)),
+          identical(bd4@p, c(0L,0:3,3:6,6:9)),
+          identical(bd4@i, c(0:2, 4:6, 8:10)), bd4@x == 6
+          )
+assert.EQ.mat(dM4, m4)
+assert.EQ.mat(M4^M4, m4^m4)
+assert.EQ.mat(mN, matrix(NA, 3,4))
+assert.EQ.mat(bdiag(diag(4)), diag(4))
+sL <- Matrix(, 3,4, sparse=TRUE)# -> "lgC"
+trS <- Matrix(tr, sparse=TRUE)# failed in 0.9975-11
+stopifnotValid(d4, "diagonalMatrix");   stopifnotValid(z4,  "diagonalMatrix")
+stopifnotValid(tr, "triangularMatrix"); stopifnotValid(trS, "triangularMatrix")
+stopifnot(all(is.na(sL@x)), ## not yet:  all(is.na(sL)),
+          !any(sL, na.rm=TRUE), all(!sL, na.rm=TRUE),
+          validObject(Matrix(c(NA,0), 4, 3, byrow = TRUE)),
+          validObject(Matrix(c(NA,0), 4, 4)))
+stopifnotValid(Matrix(c(NA,0,0,0), 4, 4), "sparseMatrix")
+I <- i1 <- I1 <- Diagonal(1)
+I1[1,1] <- i1[1, ] <- I [ ,1] <- NA
+stopifnot(identical3(I,i1,I1))
+image(d4) # gave infinite recursion
+
+## Steve Walker, Mar 12, 2014:
+n <- 7
+(M <- triu(Matrix(seq_len(n^2), n, sparse=TRUE)))
+im <- image(M) # should be an n-by-n image plot, but is not
+stopifnot(n == diff(sort(im$y.limits)))
+## ylimits were too small (by 1 on each side)
+
+assertError( Matrix(factor(letters)) )
+mlp <- matrix(.leap.seconds)## 24 x 1 numeric matrix
+Mlp <- Matrix(.leap.seconds)
+assert.EQ.mat(Mlp, mlp)
+if(FALSE) { ## TODO -- once R itself does better ...
+    .Leap.seconds <- as.POSIXlt(.leap.seconds)
+    mLp <- matrix(.Leap.seconds)##  24 x 1  list each of length 24 -- yuck!!!
+    MLp <- Matrix(.Leap.seconds)## --> error (for now)
+}
+
+E <- rep(c(TRUE,NA,TRUE), length=8)
+F <- new("nsparseVector", length = 8L, i = c(2L, 5L, 8L))
+e <- as(E, "sparseVector"); f <- as(F,"lsparseVector")
+Fv <- as.vector(F, "any") # failed in Matrix <= 1.2.0, and base::as.vector(.) failed too:
+stopifnot(E | as.vector(F), identical(E | F, F | E),
+	  all(e | f), all(E | F), # <- failed  Ops.spv.spv
+	  identical(Fv, base::as.vector(F)),
+	  is.logical(Fv), which(Fv) == c(2,5,8))
+
+dT <- new("dgTMatrix",
+	  i = c(1:2,1:2), j=rep(1:2, each=2), Dim = c(4L, 4L), x = c(1, 1, NA, 2))
+dt <- new("dtTMatrix", i = 0:3, j = 0:3, Dim = c(4L, 4L), x = c(1,0,0,0),
+	  uplo = "U", diag = "N")
+c1 <- as(dT, "CsparseMatrix")
+c2 <- as(dt, "CsparseMatrix")
+isValid(lc <- c1 > c2,"lgCMatrix")
+isValid(lt <- dT > dt,"lgCMatrix")
+stopifnot(identical(lc,lt))
+
+M <- Diagonal(4); M[1,2] <- 2 ; M
+cM <- crossprod(M) # >> as_cholmod_l_triplet(): could not reallocate for internal diagU2N()
+stopifnot(identical(cM, tcrossprod(t(M))))
+
+if(doExtras) { ## formerly in MM-only's ./AAA_latest.R
+    ## 2010-11-29 --- prompted by BDR:
+    mlp <- matrix(.leap.seconds)## 24 x 1 numeric matrix
+    Mlp <- Matrix(.leap.seconds)
+    assert.EQ.mat(Mlp, mlp)
+
+    S.na <- spMatrix(3, 4, c(1,2,3), c(2,3,3), c(NA,1,0))
+    show(S.na <- S.na - 2 * S.na)
+    show(L <- S.na != 0)
+
+    M0 <- Matrix(0, 3, 4)
+    show(Ln0 <- S.na != rep(0, prod(dim(L))))
+    stopifnot(Q.eq(L, Ln0), identical(Ln0, M0 != S.na))
+}## (doExtras) only
+
+### Unit-diagonal and unitriangular  {methods need diagU2N() or similar}
+I <- Diagonal(3)
+(T <- as(I,"TsparseMatrix")) # unitriangular
+(C <- as(I,"CsparseMatrix")) #   (ditto)
+lT <- as(T,"lMatrix")
+lC <- as(C,"lMatrix")
+stopifnot(
+    identical((n0 <- I != 0), Diagonal(3, TRUE)), I@diag == "U",
+    identical(n0, I & TRUE), identical(n0, I | FALSE),
+    identical(n0, TRUE & I), identical(n0, FALSE | I),
+    all(n0 == !(I == 0)), all(I == n0), identical(n0 == I, I == n0)
+    ,
+    identical4(lT, as(Diagonal(3, x=TRUE),"TsparseMatrix"), T & TRUE, TRUE & T),
+    identical4(lC, as(Diagonal(3, x=TRUE),"CsparseMatrix"), C & TRUE, TRUE & C),
+    identical3(lT, T | FALSE, FALSE | T),
+    identical3(lC, C | FALSE, FALSE | C),
+    TRUE)
+I[,1] <- NA; I[2,2] <- NA ; I[3,] <- NaN
+stopifnotValid(I, "sparseMatrix")
+I # gave error in printSpMatrix() - because of R bug in format.info()
+
+L <- spMatrix(9, 30, i = rep(1:9, 3), 1:27, (1:27) %% 4 != 1)
+M <- drop0(crossprod(L))
+diag(M) <- diag(M) + 5 # to make it pos.def.
+M. <- M[1:12,1:12] # small ex
+N3 <- as(Matrix(upper.tri(diag(3))), "nMatrix")
+stopifnotValid(bdN <- bdiag(N3, N3),"nsparseMatrix")
+
+stopifnot(identical(L, L == TRUE), ## used to give infinite recursion
+          all(drop0((0 - L) != 0) == drop0(L)))
+L[sample(length(L), 10)] <- NA
+ll <- as(L,"logical")
+stopifnot(all.equal(mean(L,  na.rm=TRUE),
+		    mean(ll, na.rm=TRUE), tol= 1e-14),
+	  all.equal(mean(L,  na.rm=TRUE, trim=1/4),# <- with a warning
+		    mean(ll, na.rm=TRUE, trim=1/4), tol= 1e-14))
+
+
+## Examples where  is.na(.) was wrong:
+validObject(sc <- new("dsCMatrix", i=as.integer(c(0,0:1,1:2,0:1,3)), Dim=c(4L,4L),
+                      p = c(0L,1L,3L,5L,8L), x = c(0,NA,NA,0:1,0,NA,1)))
+validObject(gc <- as(sc, "generalMatrix"))
+
+stopifnot(isSymmetric(M), isSymmetric(M.),
+	  is(bdiag(M., M.),"symmetricMatrix"),
+	  is(bdN, "triangularMatrix"),
+          all(sc == gc | (is.na(sc) & is.na(gc))),
+	  all.equal(N3,N3),
+	  tail(all.equal(N3, t(N3)), 1) == all.equal(1,-1),# ~= "Mean relative difference: 2"
+          all((bdN != t(bdN)) == (bdN + t(bdN))), # <nsparse> != <nsparse>  failed to work...
+	  !any((0+bdN) > bdN), # <dsparse> o <nsparse>
+	  !any(bdN != (0+bdN)), # <nsparse> o <dsparse>
+	  length(grep("Length", all.equal(M., (vM <- as.vector(M.))))) > 0,
+	  identical(M., (M2 <- Matrix(vM, 12,12))),
+	  all.equal(M., M2, tolerance =0)
+	  )
+
+Filter(function(.) inherits(get(.), "symmetricMatrix"), ls())
+## [1] "cM" "M"  "M." "M2" "o4" "sc"
+tt <- as(kronecker(cM, Diagonal(x = c(10,1))), "symmetricMatrix")
+dimnames(tt) <- list(NULL, cn <- letters[1:ncol(tt)])
+stopifnotValid(tt, "dsTMatrix")
+(cc <- as(tt, "CsparseMatrix")) # shows *symmetric* dimnames
+stopifnot(identical3(  cc @Dimnames,   tt @Dimnames, list(NULL, cn)),
+	  identical3(t(cc)@Dimnames, t(tt)@Dimnames, list(cn, NULL)),
+	  identical3(dimnames(cc), dimnames(tt), list(cn, cn)))# now symmetric !
+
+stopifnot(identical3(dimnames(cc),
+                     dimnames(as(cc, "generalMatrix")), ## should fixup dimnames to *symmetric*
+                     dimnames(as(tt, "generalMatrix"))))
+## -->  .Call(Csparse_symmetric_to_general, from)
+
+mat <- as(cc, "matrix") ## --> should fixup dimnames to *symmetric*
+mat # should print *symmetric* dimnames
+stopifnot(identical3(dimnames(cc), dimnames(mat), dimnames(as(tt, "matrix"))))
+
+selectMethod(coerce, c("dsCMatrix", "denseMatrix"))
+dmat <- as(cc, "denseMatrix") ## --> gave Error (!!) in Matrix 1.1-5
+stopifnot(identical3(tt@Dimnames, dmat@Dimnames, list(NULL, cn)))
+dmat # should print *symmetric* dimnames (not modifying dmat as it did intermittently)
+stopifnot(identical(dmat@Dimnames, list(NULL, cn)))
+ttdm <- as(tt, "denseMatrix")
+stopifnot(all.equal(dmat, ttdm),
+          ## ^^^^^^ not identical(): 'x' slot differs, as only "U" is needed
+          identical(as(dmat, "dspMatrix"), as(ttdm, "dspMatrix")),
+          identical(dimnames(cc), dimnames(dmat)),
+          ## coercing back should give original :
+	  identical(cc,              as(dmat, "sparseMatrix")),
+	  identical(uniqTsparse(tt), as(ttdm, "TsparseMatrix")))
+
+## MM: now *if* cc is "truly symmetric", these dimnames should be, too:
+d5 <- cn[1:5]; dnm5 <- list(d5,d5)
+stopifnot(identical(dimnames( cc  [1:5, 1:5]), dnm5),
+          identical(dimnames(t(cc)[1:5, 1:5]), dnm5))
+
+
+## large sparse ones: these now directly "go sparse":
+str(m0 <- Matrix(0,     nrow=100, ncol = 1000))
+str(l0 <- Matrix(FALSE, nrow=100, ncol = 200))
+stopifnot(all(!l0),
+          identical(FALSE, any(l0)))
+
+if(!interactive()) warnings()
+## really large {length(<dense equivalent>) is beyond R's limits}:
+op <- options(warn = 2) # warnings (e.g. integer overflow!) become errors:
+n <- 50000L
+stopifnot(n^2 > .Machine$integer.max)
+## had integer overflow in index constructions:
+x <- 1:n
+D <- Diagonal(n, x=x[n:1])
+summary(D)# special method
+summary(D != 0)
+stopifnot(identical(x*D, (Dx <- D*x)),
+	  identical(D != 0, as(D, "lMatrix")),
+	  identical(Dx, local({d <- D; d@x <- d@x * x; d})))
+
+Lrg <- new("dgTMatrix", Dim = c(n,n))
+l0 <- as(as(Lrg, "lMatrix"), "lgCMatrix")
+d0 <- as(l0, "dgCMatrix")
+if(FALSE) { #_____________________ FIXME: Should use cholmod_l_*() everywhere (?)____
+## problem in  Csparse_to_dense :
+dl0 <- as(l0, "denseMatrix")
+dd0 <- as(d0, "denseMatrix")
+## currently, both give --- Error in asMethod(object) :
+##   Cholmod error 'problem too large' at file ../Core/cholmod_dense.c, line 105
+##--> And there it is 'Int_max' ==> ../src/CHOLMOD/Include/cholmod_internal.h
+## defines 'Int_max'  and does that depending of "mode", and
+## MM thinks we should use the "DLONG" mode now -- for 64-bit integers!
+##  ==> Then Int_max := SuiteSparse_long_max := LONG_MAX
+## (the latter from ../src/SuiteSparse_config/SuiteSparse_config.h )
+## ==> use cholmod_l_<foo> instead of cholmod_<foo> in *many places*
+
+## check they are ok
+stopifnot(identical(dim(dl0), c(n,n)), identical(dim(dd0), c(n,n)),
+          !any(dl0), all(dd0 == 0))
+rm(dl0, dd0)# too large to keep in memory and pass to checkMatrix()
+}
+
+diag(Lrg[2:9,1:8]) <- 1:8
+## ==:  Lrg[2:9,1:8] <- `diag<-`(Lrg[2:9,1:8], 1:8)
+e1 <- try(Lrg == Lrg) # error message almost ok
+(memGB <- Sys.memGB("MemFree")) # from test-tools-1.R
+##                                             __vv__
+e2 <- if(doExtras && is.finite(memGB) && memGB > 30) { # need around 18 GB
+          try(!Lrg) # now *works* on 64-bit machines with enough RAM
+          ## and immediately errors if LONG_VECTORs are not available
+      } # else NULL
+str(e2) # error, NULL or "worked"
+ina <- is.na(Lrg)# "all FALSE"
+stopifnot(grep("too large", e1) == 1,
+	  if(inherits(e2, "try-error")) grep("too large", e2) == 1
+	  else is.null(e2) || length(e2@x) == n^2,
+          !any(ina))# <- gave warning previously
+stopifnot(suppressWarnings(any(Lrg)))# (double -> logical  warning)
+rm(e2)# too large...
+
+## with dimnames:
+v <- c(a=1, b=2:3)
+m <- as.matrix(v)
+M <- as(v, "dgeMatrix")
+stopifnot(identical(dimnames(m), list(c("a", "b1", "b2"), NULL)),
+	  identical(M, as(m, "dgeMatrix")),
+	  identical(dimnames(M), dimnames(m)))
+
+## dimnames(.) of symmpart() / skewpart() :
+ns <- c("symmpart", "skewpart", "forceSymmetric")
+symFUNs <- setNames(lapply(ns, get), ns); rm(ns)
+chkSS <- function(m) {
+  r <- lapply(symFUNs, function(fn) fn(m))
+  m0 <- as(m, "matrix")
+  r0 <- lapply(symFUNs, function(fn) fn(m0))
+  stopifnotValid(fS  <- r [["forceSymmetric"]], "symmetricMatrix")
+  stopifnotValid(fS0 <- r0[["forceSymmetric"]], "symmetricMatrix")
+  dnms <- dimnames(m)
+  d.sy <- dimnames(r[["symmpart"]])
+  id <- if(is.null(dnms[[2]]) && !is.null(dnms[[1]])) 1 else 2
+  stopifnot(identical(d.sy, dnms[c(id,id)]),
+	    identical(d.sy, dimnames(r [["skewpart"]])),
+	    identical(d.sy, dimnames(r0[["skewpart"]])),
+	    all(m  == with(r,  symmpart + skewpart)),
+	    all(m0 == with(r0, symmpart + skewpart)),
+	    identical(dS <- dimnames(fS), dimnames(fS0)),
+	    identical(dS[1], dS[2]))
+}
+for(m in list(Matrix(1:4, 2,2), Matrix(c(0, rep(1:0, 3),0:1), 3,3))) {
+    cat("\n---\nm:\n"); show(m)
+    chkSS(m)
+    dn <- list(row = paste0("r", 1:nrow(m)), col = paste0("var.", 1:ncol(m)))
+    dimnames(m) <- dn		; chkSS(m)
+    colnames(m) <- NULL		; chkSS(m)
+    dimnames(m) <- unname(dn)	; chkSS(m)
+}
+
+m. <- matrix(c(0, 0, 2:0), 3, 5)
+dimnames(m.) <- list(LETTERS[1:3], letters[1:5])
+(m0 <- m <- Matrix(m.))
+m@Dimnames[[2]] <- m@Dimnames[[1]]
+## not valid anymore:
+(val <- validObject(m, test=TRUE)); stopifnot(is.character(val))
+dm <- as(m0, "denseMatrix"); rm(m)
+stopifnot(all.equal(rcond(dm), rcond(m.), tolerance = 1e-14),
+	  ##^^^^^^^ dm and m. are both dense, interestingly small differences
+	  ## show in at least one case of optimized BLAS
+	  all.equal(rcond(dm), 0.4899474520656),
+          ## show(<dgRMatrix>) had revealed a bug in C:
+          identical(capture.output(show(as(m0, "RsparseMatrix")))[-(1:2)],
+                    gsub("0", ".",  capture.output(show(m.))[-1])))
+m.1 <- m.; dimnames(m.1) <- list(row=NULL, col=NULL)
+M.1 <- Matrix(m.1, sparse=TRUE)
+show(M.1)# had bug in .formatSparseSimple()
+
+###--  Sparse Triangular :
+
+g5 <- new("dgCMatrix", Dim = c(5L, 5L),
+          x = c(10, 1, 3, 10, 1, 10, 1, 10, 10),
+          i = c(0L,2L,4L, 1L, 3L,2L,4L, 3L, 4L),
+          p = c(0L, 3L, 5L, 7:9))
+t5 <- as(g5, "triangularMatrix") # fine
+stopifnot(class(t5) == "dtCMatrix",
+          identical(t5, tril(g5)))
+## This is really a regression test for 'methods::selectMethod()'
+## Maybe move to R once 'Matrix' is recommended
+sm <- selectMethod(coerce, c("dgCMatrix", "triangularMatrix"), verbose=TRUE)
+stopifnot(identical(sm(g5), t5))
+dimnames(t5) <- list(row=paste0("r",1:5), col=paste0("C.",1:5))
+s5 <- symmpart(t5) # gave an error
+
+(t1 <- new("dtTMatrix", x= c(3,7), i= 0:1, j=3:2,
+           Dim= as.integer(c(4,4))))
+## Diagonal  o  Sparse
+I4 <- Diagonal(4)
+D4 <- Diagonal(4, x=1:4)
+validObject(t1)
+validObject(t2  <-   t1  + I4)
+validObject(tt2 <- t(t1) + I4)
+validObject(t1c <- as(t1, "CsparseMatrix"))
+validObject(t2c <- as(t2, "CsparseMatrix"))
+stopifnotValid(2 * I4, "diagonalMatrix")
+stopifnotValid(D4 * 3, "diagonalMatrix")
+stopifnotValid(I4 / 5, "diagonalMatrix")
+stopifnotValid(D4 / 2, "diagonalMatrix")
+stopifnotValid(t1c + I4,"triangularMatrix")
+stopifnotValid(t2c + I4,"triangularMatrix")
+stopifnot(identical(t1, t(t(t1))),
+          identical(t1c, t(t(t1c))),
+          c(class(t2), class(t1c), class(t2c), class(tt2)) == "dtCMatrix",
+          identical(t(tt2), t2))
+assert.EQ.mat(t1, as(t1c, "matrix"))
+D4. <- D4 * (A4 <- Matrix(1:4, 4,4))
+D4p <- A4 + D4
+Lg1 <- D4 > 0 & D4 > 1
+nLg <- !Lg1
+nnLg <- !nLg
+D4m <- D4 * 4:1
+assert.EQ.mat(D4., diag(x= (1:4)^2))
+assert.EQ.mat(D4p, diag(x= (1:4)) + (1:4))
+assert.EQ.mat(D4m, diag(x=c(4,6,6,4)))
+assert.EQ.mat(Lg1, diag(x= c(FALSE, rep(TRUE,3))))
+stopifnot(is(Lg1, "diagonalMatrix"), is(D4m, "diagonalMatrix"),
+	  is(D4., "diagonalMatrix"),
+          is(nLg, "symmetricMatrix"), is(nnLg, "symmetricMatrix"),
+          identical3(Lg1, Matrix(nnLg), as(nnLg, "diagonalMatrix")),
+          all(Lg1 != (!Lg1)))
+
+## tri[lu](<diagonal>)
+td3 <- triu(diag(3)); stopifnot(is(td3, "triangularMatrix"), td3@uplo == "U")
+Ld3 <- tril(diag(3)); stopifnot(is(Ld3, "triangularMatrix"), Ld3@uplo == "L")
+## the latter did fail till 2014-12-20
+D3 <- Diagonal(3)
+stopifnot(identical3(D3, tril(D3), triu(D3)))
+## methods were missing
+
+## as(<diag>, <anything>) :
+str(cls <- names(getClass("Matrix")@subclasses))# all Matrix classes
+for(cl in cls)
+    if(canCoerce(I4, cl)) {
+	cat(cl,":")
+	M  <- as(I4, cl)
+	M. <- as(D4, cl)
+        stopifnot(diag(4) == as(M,"matrix"),
+                  if(is(cl,"dMatrix")) diag(x=1:4) == as(M.,"matrix") else TRUE)
+	cat(" [Ok]\n")
+    }
+s4 <- as(D4,"sparseMatrix")
+v <- c(11,2,2,12); s4[2:3,2:3] <- v; validObject(s4)
+s4. <- D4; s4.[2:3,2:3] <- v; validObject(s4.)
+stopifnot(all(s4 == s4.))
+## now assign symmetrically to symmetricMatrix
+s4 <- as(as(D4,"sparseMatrix"),"symmetricMatrix")
+s4[2:3,2:3] <- v
+validObject(s4)
+stopifnot(is(s4,"symmetricMatrix"))
+assert.EQ.mat(s4, as(s4.,"matrix"),tol=0)
+
+## lower-triangular unit-diagonal
+L <- new("dtCMatrix", i = 1L, p = c(0:1, 1L), Dim = c(2L, 2L),
+         x = 0.5, uplo = "L", diag = "U")
+stopifnot(range(L) == 0:1, all.equal(mean(L), 5/8))
+
+## from  0-diagonal to unit-diagonal triangular {low-level step}:
+tu <- t1 ; tu@diag <- "U"
+tu
+validObject(cu <- as(tu, "dtCMatrix"))
+validObject(cnu <- diagU2N(cu))# <- testing diagU2N
+validObject(tu. <- as(cu, "dtTMatrix"))
+validObject(tt <- as(cu, "TsparseMatrix"))
+stopifnot(## NOT: identical(tu, tu.), # since T* is not unique!
+	  identical(cu, as(tu., "dtCMatrix")),
+          length(cnu@i) == length(cu@i) + nrow(cu),
+          identical(cu, diagN2U(cnu)),# <- testing diagN2U
+	  all(cu >= 0, na.rm = TRUE), all(cu >= 0),
+	  any(cu >= 7))
+validObject(tcu <- t(cu))
+validObject(ttu <- t(tu))
+validObject(ltu <- as(ttu, "lMatrix"))
+validObject(ldtu <- as(ltu, "denseMatrix"))
+validObject(Cltu <- as(ltu, "CsparseMatrix"))
+stopifnot(identical(asCsp(ttu > 0), asCsp(ltu)),
+          all(ltu == as(ttu > 0,"denseMatrix")))
+ltu - (ttu > 0) # failed
+assert.EQ.mat(cu,  as(tu,"matrix"), tol=0)
+assert.EQ.mat(cnu, as(tu,"matrix"), tol=0)
+
+C <- suppressWarnings(Matrix(c(0,1,0,0), 5,5)) + Diagonal(5)
+(tU <- diagN2U(tril(C))) # dtC Unitriangular
+ntU <- as(tU, "nMatrix")
+nT <- as(ntU, "TsparseMatrix")
+R <- as(tU, "RsparseMatrix")
+Tt <- diagU2N(R) # used to accidentally drop the diag.
+stopifnot(R@x == c(1,1,1), diag(Tt) == 1)
+
+lcu <- new("ltCMatrix", Dim = c(4L, 4L), i = c(0:1, 0L), p = c(0L, 0:3),
+           x = c(TRUE, FALSE, FALSE), uplo = "U", diag = "U")
+(lTu <- as(lcu,"TsparseMatrix"))# prints wrongly (in Matrix 0.999375-31)
+stopifnot(identical3(rowSums(lcu), rowSums(lTu), rowSums(drop0(lcu))))
+(ncu <- as(lcu, "nMatrix"))# -- gives the "pattern" of lcu, i.e. FALSE are *there*
+ncn <- diagU2N(ncu)
+(cncn <- crossprod(ncn))# works -> "nsCMatrix"
+stopifnot(identical(ncu, as(lcu,"nsparseMatrix")),
+	  identical(rowSums(ncu), c(3:1, 1L)),
+	  Q.eq(ncn, ncu),
+	  Q.eq(crossprod(drop0(lcu)), crossprod(lcu)),# crossprod works -> "dsCMatrix"
+	  identical(crossprod(ncu), cncn),
+	  Q.eq(cncn, t(ncu) %*% ncu)) #used to seg.fault
+
+U <- new("dtCMatrix", Dim = c(6L, 6L),
+	 i = c(0:1, 0L, 2:3, 1L, 4L),
+	 p = c(0L,0L,0L, 2:3, 5L, 7L),
+	 x = rep.int(-0.5, 7), diag = "U")
+validObject(U)
+U. <- solve(iU <- solve(U))#-> gave segmentation fault
+stopifnot(validObject(U), ## had a case where solve(U) modified U !
+	  validObject(iU),
+	  validObject(U.),
+	  ## no rounding error, since have iU@x * 8 is integer :
+	  identical(U, diagN2U(drop0(U.))))
+
+## <sparse> o <numeric> (of length > 1):
+stopifnotValid(tm <- tu * 1:8, "sparseMatrix")
+stopifnot(identical4(tm, cu * 1:8, 1:8 * cu, 1:8 * tu))
+
+cu[1,2] <- tu[1,2] <- NA
+mu <- as(tu,"matrix")
+stopifnotValid(cu, "CsparseMatrix"); stopifnotValid(cu, "triangularMatrix")
+stopifnotValid(tu, "TsparseMatrix"); stopifnotValid(tu, "triangularMatrix")
+stopifnot(identical(cu * 1:8, tu * 1:8), # but are no longer triangular
+          identical(cu > .1, as(tu > .1, "CsparseMatrix")),
+          all(cu >= 0, na.rm=TRUE), !all(cu >= 1), is.na(all(tu >= 0)),
+          ## Csparse_drop: preserves triangularity incl diag="U"
+          identical(cu, .Call(Matrix:::Csparse_drop, cu, 0.))
+          )
+assert.EQ.mat(cu * 1:8, mu * 1:8)
+
+ina <- is.na(as(cu,"matrix"))
+## These 3 were each different (2008-03) !!
+stopifnot(all(ina == is.na(cu)),
+	  all(ina == is.na(as(cu,"generalMatrix"))),
+	  all(ina == as(is.na(as(cu,"matrix")),"nMatrix")))
+
+
+set.seed(7)
+xx <- rpois(10, 50)
+Samp <- function(n,size) sample(n, size, replace=TRUE)
+Tn <- sparseMatrix(i=Samp(8, 50), j=Samp(9,50), x=xx, giveCsparse=FALSE)
+Tn
+stopifnot(xx == Tn@x,
+	  max(xx) < max(Tn), 0 == min(Tn),
+	  (sT <- sum(Tn)) == sum(colSums(Tn)), sT == sum(Tn@x),
+	  range(Tn) == range(as(Tn, "CsparseMatrix")))
+
+## tu. is diag "U", but tu2 not:
+tu2 <- as(as(tu., "generalMatrix"), "triangularMatrix")
+assert.EQ.mat(cu, mu, tol=0)
+stopifnot(identical3(cu[cu > 1],  tu [tu > 1], mu [mu > 1]),
+          identical3(cu <= 1, tu <= 1, as(mu <= 1, "lMatrix")),# all lgeMatrix
+	  identical3(cu[cu <= 1], tu[tu <= 1], mu[mu <= 1]),
+	  identical3(cu , triu(cu ), t(t(cu))),
+	  identical3(tu , triu(tu ), t(t(tu))),
+	  identical3(tu., triu(tu.), t(t(tu.))),
+	  identical(tu2, triu(tu2)),
+	  identical(tcu , tril(tcu)),
+	  identical(ttu , tril(ttu)),
+	  identical(t(tu), tril(t(tu)))
+          )
+assert.EQ.mat(triu(cu),   as.matrix(triu(as.matrix(cu))))
+for(k in -1:1)
+    assert.EQ.mat(tril(cu,k), as.matrix(tril(as.matrix(cu),k)))
+
+(dtr <- Matrix(local({m <- diag(2); m[1,2] <- 3;m})))
+identical(dtr, triu(dtr))
+assert.EQ.mat(tril(dtr), diag(2))
+
+
+(t4 <- new("dgTMatrix", i = 3:0, j = 0:3, x = rep(1,4), Dim = as.integer(c(4,4))))
+c4 <- as(t4, "CsparseMatrix")
+## the same but "dsT" (symmetric)
+suppressWarnings(M <- Matrix(c(0, rep(c(0,0:1),4)), 4,4))# warning:.. length [13] is not ..multiple
+tt <- as(M, "TsparseMatrix")
+stopifnot(all.equal(triu(t4) + tril(t4), c4),
+          all.equal(triu(tt) + tril(tt), c4))
+
+
+###-- Numeric Dense: Crossprod & Solve
+
+set.seed(123)
+mm. <- mm <- Matrix(rnorm(500 * 150), nc = 150)
+stopifnot(validObject(mm))
+xpx <- crossprod(mm)
+stopifnot(identical(mm, mm.))# once upon a time, mm was altered by crossprod()
+stopifnotValid(xpx, "dpoMatrix")
+str(mm) # 'dge*"
+str(xpx)# 'dpo*"
+xpy <- crossprod(mm, rnorm(500))
+res <- solve(xpx, xpy)
+str(xpx)# now with Cholesky factor
+stopifnot(validObject(xpx),
+          validObject(xpy),
+          validObject(res))
+stopifnot(all.equal(xpx %*% res, xpy, tolerance = 1e-12))
+lp <- xpx >= 1
+slp <- as(lp, "sparseMatrix")
+
+ltlp  <-  lp[ lower.tri(lp) ]
+sltlp <- slp[ lower.tri(slp) ]
+dim(ij <- which(lower.tri(lp), arr.ind = TRUE))
+ss <- slp[ij] # now fast (!)
+stopifnot(identical4(lp[ij], ltlp, sltlp, as(lp, "matrix")[ij]),
+          identical(ss, sltlp),
+          isValid(lp, "lsyMatrix"), lp@uplo == "U")
+
+###-- more solve() methods  {was ./solve.R }
+
+## first for "dgeMatrix" and all kinds of RHS :
+(m6 <- 1 + as(diag(0:5), "dgeMatrix"))
+rcond(m6)
+I6 <- as(diag(6), "dgeMatrix")
+stopifnot(all.equal(I6, m6 %*% solve(m6)),
+          all.equal(I6, solve(m6) %*% m6) )
+
+(i6 <- solve(m6, Matrix(1:6)))
+stopifnot(identical(i6, as(cbind(c(-4, rep(1,5))), "dgeMatrix")),
+          identical(i6, solve(m6, 1:6)),
+          identical(i6, solve(m6, matrix(1:6))),
+          identical(i6, solve(m6, matrix(c(1,2,3,4,5,6))))
+          )
+
+## solve(<sparse>)
+(m <- t1+ t(t1) + Diagonal(4))
+i.m <- solve(as.mat(m))
+I1 <- m %*% i.m
+o4 <- diag(I1)
+im <- solve(m)# is now sparse {not yet}
+(I2 <- m %*% im)
+(ms <- as(m, "symmetricMatrix"))
+## solve(<sparse>, <sparse>):
+s.mm <-  solve(m,m)
+s.mms <- solve(m, ms)
+## these now work "fully-sparse"
+s.ms2 <- solve(ms, ms)
+s.msm <- solve(ms, m)
+I4c <- as(Matrix(diag(4),sparse=TRUE), "generalMatrix")
+stopifnot(isValid(im, "Matrix"), isValid(I2, "Matrix"), class(I4c) == "dgCMatrix",
+          all.equal(I1, as(I2,"dgeMatrix"), tolerance = 1e-14),
+          all.equal(diag(4), as.mat(I2), tolerance = 1e-12),
+          all.equal(s.mm,  I2, tolerance = 1e-14),
+          all.equal(s.mms, I2, tolerance = 1e-14),
+          all.equal(s.ms2, s.msm, tolerance = 4e-15),
+          all.equal(s.ms2, I4c  , tolerance = 4e-15),
+          abs(o4 - 1) < 1e-14)
+
+image(T125 <- kronecker(kronecker(t5,t5),t5),
+      main = paste("T125:",class(T125)))
+dim(T3k <- kronecker(t5,kronecker(T125, t5)))
+system.time(IT3 <- solve(T3k))# incredibly fast
+I. <- drop0(zapsmall(IT3 %*% T3k))
+I.. <- diagN2U(I.)
+I <- Diagonal(5^5)
+stopifnotValid(IT3, "dtCMatrix")
+stopifnot(## something like the equivalent of  all(I. == Diagonal(3125)) :
+          identical(as(I., "diagonalMatrix"), I),
+          identical(as(I..,"diagonalMatrix"), I)
+          )
+
+## printSpMatrix() ;  "suppressing (columns | rows) .." {and do it correctly!}
+IT3
+op <- options(width = 70, max.print = 1000)
+T125[-(1:50),] ## suppression ... is it correctly done?
+
+
+###-- row- and column operations  {was ./rowcolOps.R }
+
+set.seed(321)
+(m1 <- round(Matrix(rnorm(25), 5), 2))
+m1k <- Matrix(round(rnorm(1000), 2), 50, 20)
+m.m <- as(m1k, "matrix")
+stopifnot(all.equal(colMeans(m1k), colMeans(m.m)),
+          all.equal(colSums (m1k), colSums (m.m)),
+          all.equal(rowMeans(m1k), rowMeans(m.m)),
+          all.equal(rowSums (m1k), rowSums (m.m)),
+          all.equal(colMeans(m1k, na.rm=TRUE), colMeans(m.m, na.rm=TRUE)),
+          all.equal(colSums (m1k, na.rm=TRUE), colSums (m.m, na.rm=TRUE)),
+          all.equal(rowMeans(m1k, na.rm=TRUE), rowMeans(m.m, na.rm=TRUE)),
+          all.equal(rowSums (m1k, na.rm=TRUE), rowSums (m.m, na.rm=TRUE)) )
+
+###-- kronecker for nonsparse uses Matrix(.):
+stopifnotValid(kr <- kronecker(m1, m6), "Matrix")
+assert.EQ.mat(kr,
+              kronecker(as(m1, "matrix"),
+                        as(m6, "matrix")), tol = 0)
+
+## sparse:
+(kt1 <- kronecker(t1, tu))
+kt2 <- kronecker(t1c, cu)
+stopifnot(identical(Matrix:::uniq(kt1), Matrix:::uniq(kt2)))
+## but kt1 and kt2, both "dgT" are different since entries are not ordered!
+ktf <- kronecker(as.matrix(t1), as.matrix(tu))
+if(FALSE) # FIXME? our kronecker treats "0 * NA" as "0" for structural-0
+assert.EQ.mat(kt2, ktf, tol= 0)
+(cs1 <- colSums(kt1))
+NA.or.True <- function(x) is.na(x) | x
+eq <- (cs1 == colSums(as(kt1, "matrix")))
+stopifnot(NA.or.True(eq), identical(is.na(eq), is.na(cs1)))
+nt1 <- as(kt1, "nMatrix") # no NA's anymore
+(ng1 <- as(as(nt1, "generalMatrix"),"CsparseMatrix")) # ngC
+dg1 <- as(ng1, "dMatrix")# dgC
+lt1 <- kt1 > 5
+nt1 <- as(lt1, "nMatrix")
+(colSums(nt1, sparseResult = TRUE))
+(colSums(kt1, sparseResult = TRUE)) # dsparse, with NA
+(colSums(lt1, sparseResult = TRUE)) # isparse, with NA
+(colSums(lt1, sparseResult = TRUE, na.rm = TRUE))
+(colSums(nt1, sparseResult = TRUE)) # isparse, no NA
+## check correct sparseness of both:
+for(M in list(kt1, nt1, ng1, dg1, lt1, nt1)) {
+    m <- as(M, "matrix")
+    for(na.rm in c(FALSE,TRUE)) {
+	cs  <- colSums(M, na.rm = na.rm)
+	cs. <- colSums(M, na.rm = na.rm, sparseResult = TRUE)
+	rs  <- rowSums(M, na.rm = na.rm)
+	rs. <- rowSums(M, na.rm = na.rm, sparseResult = TRUE)
+	stopifnotValid(cs., "sparseVector")
+	stopifnotValid(rs., "sparseVector")
+	stopifnot(identical(cs, as(cs., "vector")),
+		  identical(rs, as(rs., "vector")),
+		  {eq <- cs == colSums(m, na.rm = na.rm) ; ineq <- is.na(eq)
+		   all(ineq | eq) && identical(ineq, is.na(cs)) },
+		  {eq <- rs == rowSums(m, na.rm = na.rm) ; ineq <- is.na(eq)
+		   all(ineq | eq) && identical(ineq, is.na(rs)) } )
+    }
+}
+
+i1 <- cs. == 1
+cs2 <- cs.
+cs2[i1] <- 0 # failed in *-31 !!
+## now *index* with a NA-sparseVector :
+i2 <- i1 ; i2[3] <- NA ; li2 <- as.logical(i2)
+cs3 <- cs. ;	       cs3 [i2] <- 0
+v3 <- as(cs.,"vector"); v3[li2] <- 0
+cs4 <- cs.	     ; cs4[li2] <- 0
+stopifnot(length(i1@x) == 2, identical(li2, as(i2,"vector")),
+	  identical(cs3, cs4),
+	  cs3 == v3, all(as(v3, "sparseVector") == cs3)
+	  ## indexing simple "numeric" with sparseVector:
+	  ## see 'R_FIXME' in ../R/sparseVector.R
+	  ## , identical(v3[i2], v3[li2])
+	  ## TODO:
+	  ## sub-assigning into simple "numeric" with sparseVector index:
+	  )
+
+
+
+M <- Matrix(c(2:0,1),2); M. <- as(M, "sparseMatrix")
+(N <- as(crossprod(kronecker(diag(2), M)) > 0,
+         "nMatrix"))
+(L. <- as(N,"lMatrix"))
+stopifnot(identical(N, as(L.,"nMatrix")),
+	  identical(kronecker(	  c(1,0), M),
+		    kronecker(cbind(1:0), M)))
+assert.EQ.mat(kronecker(M,	      c(1,0,0)),
+	      kronecker(as.matrix(M), c(1,0,0)))
+
+## coercion from "dpo" or "dsy"
+xx <- as(xpx, "dsyMatrix")
+stopifnot(isSymmetric(xxS  <- as(xx,  "sparseMatrix")),
+          isSymmetric(xpxS <- as(xpx, "sparseMatrix")))
+
+tm <- matrix(0, 8,8)
+tm[cbind(c(1,1,2,7,8),
+         c(3,6,4,8,8))] <- c(2,-30,15,20,80)
+(tM <- Matrix(tm))                ## dtC
+(mM <- Matrix(m <- (tm + t(tm)))) ## dsC
+mT <- as(mM, "dsTMatrix")
+gC <- as(as(mT, "dgTMatrix"), "dgCMatrix")
+lT <- as(Matrix(TRUE, 2,2),"TsparseMatrix")
+## Check that mT, lT, and gC print properly :
+pr.mT <- capture.output(mT)
+pr.lT <- capture.output(lT)[-(1:2)]
+nn <- unlist(strsplit(gsub(" +\\.", "", sub("^....", "", pr.mT[-(1:2)])), " "))
+stopifnot(as.numeric(nn[nn != ""]) == m[m != 0],
+	  identical(1:2, grep("|", pr.lT, fixed=TRUE)),
+	  identical(pr.lT, capture.output(as(lT, "nMatrix"))[-(1:2)]),
+          capture.output(gC)[-1] == pr.mT[-1])
+assert.EQ.mat(tM, tm, tol=0)
+assert.EQ.mat(gC, m,  tol=0)
+assert.EQ.mat(mT, m,  tol=0)
+stopifnotValid(mM, "dsCMatrix")
+stopifnotValid(tM, "dtCMatrix")
+stopifnot(identical(mT, as(mM, "TsparseMatrix"))
+	  , identical(gC, as(mM, "generalMatrix"))
+	  ## coercions	general <-> symmetric
+	  , identical(as(as(mM, "generalMatrix"), "symmetricMatrix"), mM)
+	  , identical(as(as(mM, "dgTMatrix"),     "symmetricMatrix"), mT)
+	  , identical(as(as(tM, "generalMatrix"),"triangularMatrix"), tM)
+          , identical(tM + Diagonal(8), tMD <- Diagonal(8) + tM)
+	  )
+stopifnotValid(tMD, "dtCMatrix")
+eM <- eigen(mM) # works thanks to base::as.matrix hack in ../R/zzz.R
+stopifnot(all.equal(eM$values,
+                { v <- c(162.462112512353, 30.0665927567458)
+                  c(v, 15, 0, 0, 160-v[1], -15, -v[2])}, tol=1e-14))
+
+##--- symmetric -> pos.def. needs valid test:
+m5 <- Matrix(diag(5) - 1)
+assertError(as(m5, "dpoMatrix"))# not pos.definite!
+pm5 <- as(m5, "dspMatrix") # packed
+assertError(as(pm5, "dppMatrix"))# not pos.definite!
+sm <- as(Matrix(diag(5) + 1),"dspMatrix")
+pm <- as(sm,"dpoMatrix")## gave infinite recursion (for a day or so)
+pp <- as(pm,"dppMatrix")
+
+x <- round(100 * crossprod(Matrix(runif(25),5)))
+D <- Diagonal(5, round(1000*runif(5)))
+px <- pack(x)
+stopifnot(is(x, "dpoMatrix"), is(px,"dppMatrix"), is(D, "ddiMatrix"))
+
+class(x+D)#--> now "dsyMatrix"
+stopifnot(is(x+D, "symmetricMatrix"),
+	  is(D+px, "dspMatrix"),
+	  identical(x+D, D+x), identical(px+D, D+px), identical(pack(x-D), px-D))
+
+
+tx <- tril(x)
+ptx <- pack(tx)
+stopifnot(is(tx, "dtrMatrix"), is(ptx, "dtpMatrix"),
+          is(t(tx), "dtrMatrix"), is(t(ptx), "dtpMatrix"),
+          is(D + tx, "dtrMatrix"), is(tx + D, "dtrMatrix"),
+          is(ptx + D, "dtpMatrix"), is(D + ptx, "dtpMatrix"))
+
+
+###-- dense nonzero pattern:
+class(m <- Matrix(TRUE,2,2)) # lsy
+isValid(n <- as(m, "nMatrix"), "nsyMatrix")
+
+## 1)
+as(n,"CsparseMatrix") # used to give CHOLMOD error: invalid xtype...
+ls2 <- as(m, "CsparseMatrix") # works fine
+## and really  'm' and 'n' are interally slot identical (!!!)
+
+as(n,"sparseMatrix")
+as(m,"sparseMatrix")
+
+### -- now when starting with nsparse :
+nT <- new("ngTMatrix",
+          i = as.integer(c(0, 1, 0)),
+          j = as.integer(c(0, 0, 1)), Dim = as.integer(c(2,2)))
+(nC <- as(nT, "ngCMatrix"))
+str(nC)# of course, no 'x' slot
+
+tt <- as(nT,"denseMatrix") # nge (was lge "wrongly")
+stopifnot(is(tt,"ngeMatrix"),
+	  identical(as(tt, "lMatrix"),
+		    as(as(nT, "lMatrix"), "denseMatrix")))
+tt
+as(nC,"denseMatrix")
+
+
+###-- sparse nonzero pattern : ----------
+
+(nkt <- as(as(as(kt1, "generalMatrix"), "CsparseMatrix"), "ngCMatrix"))# ok
+dkt <- as(nkt, "denseMatrix")
+(clt <- crossprod(nkt))
+stopifnotValid(nkt, "ngCMatrix")
+stopifnotValid(clt, "nsCMatrix")
+suppressWarnings(crossprod(clt)) ## warning "crossprod() of symmetric ..."
+
+## a Csparse with *repeated* entry is not valid!
+assertError(new("ngCMatrix", p = c(0L,2L), i = c(0L,0L), Dim = 2:1))
+
+
+### "d" <-> "l"  for (symmetric) sparse : ---------------------------------------
+suppressWarnings( data(KNex) ) ## may warn, as 'Matrix' is recommended
+                               ## and exist more than once at check-time
+mm <- KNex$mm
+xpx <- crossprod(mm)
+## extract nonzero pattern
+nxpx <- as(xpx, "nsCMatrix")
+show(nxpx) ## now ok, since subsetting works
+r <- nxpx[1:2,]
+lmm <- as(mm, "lgCMatrix")
+nmm <- as(lmm, "nMatrix")
+xlx <- crossprod(lmm)
+x.x <- crossprod(nmm)
+## now A = lxpx and B = xlx should be close, but not quite the same
+## since <x,y> = 0 is well possible when x!=0 and y!=0 .
+## However,  A[i,j] != 0 ==> B[i,j] != 0:
+A <- as(as(nxpx, "lMatrix"), "TsparseMatrix")
+B <- as(as(xlx,  "lMatrix"), "TsparseMatrix")
+ij <- function(a) a@i + ncol(a) * a@j
+stopifnot(all(ij(A) %in% ij(B)))
+
+l3 <- upper.tri(matrix(,3,3))
+validObject(c3 <- as(l3, "CsparseMatrix"))
+stopifnotValid(c3, "lMatrix")# lgC
+(M <- Matrix(l3))
+stopifnotValid(M, "ltCMatrix")
+stopifnotValid(M2 <- M %x% M, "triangularMatrix") # is "dtT" (why not "dtC" ?)
+stopifnot(dim(M2) == c(9,9), identical(M2, kronecker(M,M)))
+M3 <- M %x% M2 #ok
+(cM3 <- colSums(M3, sparse=TRUE))
+identical(as.vector(cM3),
+          as(rev(rowSums(M3, sparse=TRUE)), "vector"))
+M. <- M2 %x% M # gave infinite recursion
+
+## diagonal, sparse & interactions
+stopifnotValid(as(Diagonal(3), "TsparseMatrix"), "TsparseMatrix")
+stopifnotValid(X <- Diagonal(7) + 1.5 * tM[1:7,1:7], "sparseMatrix")
+stopifnotValid(X, "triangularMatrix")
+stopifnotValid(XX <- X - chol(crossprod(X)), "triangularMatrix")
+X
+XX
+XX <- as(drop0(XX), "dsCMatrix")
+stopifnot(identical(XX, Matrix(0, nrow(X), ncol(X))))
+
+M <- Matrix(m., sparse = FALSE)
+(sM <- Matrix(m.))
+class(dlM <- M >= 1)
+stopifnot(identical(dlM, !(M < 1)))
+stopifnotValid(sM, "sparseMatrix")
+stopifnotValid(dlM, "denseMatrix")
+(lM  <- as(dlM, "sparseMatrix"))
+lM2 <- as(dlM, "CsparseMatrix") #-> now ok
+lM0 <- Matrix:::as_Csparse(dlM)
+stopifnot(identical3(lM, lM2, lM0))
+
+selectMethod("coerce",	c("lgeMatrix", "CsparseMatrix"),
+	     useInherited = c(from = TRUE, to = FALSE))
+
+ms0 <- Matrix(c(0,1,1,0), 2,2)
+ms <- as(ms0, "TsparseMatrix")
+cs <- as(ms, "CsparseMatrix")
+ll <- as(ms, "lMatrix")
+lt <- as(ll, "lgTMatrix")
+nn <- as(cs, "nsparseMatrix")
+l2 <- as(cs, "lsparseMatrix")
+nt <- triu(nn)
+n3 <- as(nt, "lsparseMatrix")
+da <- nt + t(nt)
+dm <- nt * t(nt) + da
+##
+mnt <- as(nt, "matrix")
+m <- rbind(v <- 2:3)
+assert.EQ.mat(nt %*% v, mnt %*% v)
+assert.EQ.mat(v %*% nt, v %*% mnt)
+assert.EQ.mat( crossprod(nt, v),  crossprod(mnt,v))
+assert.EQ.mat( crossprod(v, nt),  crossprod(v,mnt))
+assert.EQ.mat(tcrossprod(v, nt), tcrossprod(v,mnt))
+assert.EQ.mat(tcrossprod(nt, m), tcrossprod(mnt, m))
+##
+stopifnotValid(ms, "dsTMatrix")
+stopifnot(as(ms0,"matrix") == as(ll, "matrix"), # coercing num |-> log
+	  as(lt, "matrix") == as(ll, "matrix"),
+	  identical(ms, as(ll, "dMatrix")),
+	  identical4(as(ll, "CsparseMatrix"), as(cs, "lMatrix"),# lsC*
+		     as(nn, "lsparseMatrix"), l2),
+	  identical3(da, dm, as(cs, "generalMatrix")),		# dgC*
+	  identical(as(da, "lMatrix"), as(lt, "CsparseMatrix")) # lgC*
+	  )
+## Dense *packed* ones:
+s4 <- as(D4, "symmetricMatrix")
+sp <- as(as(as(D4, "symmetricMatrix"),"denseMatrix"),"dspMatrix")
+tp <- as(triu(sp),"dtpMatrix")
+tpL <- as(tril(sp),"dtpMatrix")
+(spL <- t(sp))
+stopifnot(sp @uplo=="U", tp @uplo=="U",
+	  spL@uplo=="L", tpL@uplo=="L")
+
+## band():
+n <- 4 ; m <- 6
+r1 <- Matrix(1:24, n,m)
+validObject(M1 <- band(r1, 0,0))
+(M1 <- as(M1, "sparseMatrix"))
+r2 <- Matrix(1:18, 3, 6)
+stopifnot(identical(M1, bandSparse(n,m, k=0, diag = list(diag(r1)))),
+	  identical(band(r2, 0,4),
+		    band(r2, 0,3) + band(r2, 4,4)))
+s1 <- as(r1, "sparseMatrix") # such that band(s1) is sparse, too
+for(k1 in (-n):m)
+    for(k2 in k1:m) {
+	stopifnotValid(br1 <- band(r1, k1,k2), "ddenseMatrix")
+	stopifnotValid(bs1 <- band(s1, k1,k2), "CsparseMatrix")
+        stopifnot(all(r1 == s1))
+    }
+
+D. <- Diagonal(x= c(-2,3:4)); D.[lower.tri(D.)] <- 1:3 ; D.
+D0 <- Diagonal(x= 0:3);       D0[upper.tri(D0)] <- 1:6 ; D0
+stopifnot(all.equal(list(modulus = structure(24, logarithm = FALSE), sign = -1L),
+                    unclass(determinant(D.,FALSE)), tol=1e-15),
+	  det(Matrix(0,1)) == 0,
+          all.equal(list(modulus = structure(0, logarithm = FALSE), sign = 1L),
+                    unclass(determinant(D0,FALSE)), tol=0)
+          )
+
+### More sparseVector checks: -------------------------------
+validObject(new("isparseVector"))
+R <- sv <- as(D4, "sparseVector")
+## dim(<sparseVector>) <- (n1,n2)  --> sparse Matrix :
+dim(R) <- dim(D4)
+stopifnotValid(sv,"sparseVector")
+stopifnotValid(R, "sparseMatrix")
+stopifnot(identical(D4, as(R, "diagonalMatrix")))
+iv <- c(rep(0, 5), 3, 0,0,7,0,0,0)
+sv <- as(iv, "sparseVector")
+sv. <- as(as.integer(iv), "sparseVector")
+## Note: Method with signature "numeric#sparseVector" chosen ...
+(sv2 <- as(sv, "isparseVector")) ## gave error
+as(sv, "zsparseVector")
+stopifnot(identical(sv., sv2),
+	  identical(  Matrix(sv, 3,4, byrow=TRUE),
+		    t(Matrix(sv, 4,3))))
+options(warn = 0)# no longer error
+
+
+## "Large" sparse:
+n <- 100000
+m <-  50000 ; nnz <- 47
+M <- spMatrix(n, m,
+              i = sample(n, nnz, replace = TRUE),
+              j = sample(m, nnz, replace = TRUE),
+              x = round(rnorm(nnz),1))
+validObject(Mv <- as(M, "sparseVector"))
+validObject(Dv <- as(Diagonal(60000), "sparseVector"))
+validObject(LD <- Diagonal(60000, TRUE))
+validObject(Lv <- as(LD, "sparseVector"))
+Dm <- Dv; dim(Dm) <- c(180000L, 20000L)
+stopifnot(!doExtras || isValid(Md <- M * rowSums(M, sparseResult=TRUE), "sparseMatrix"),
+	  LD@diag == "U",
+          isValid(Dm, "sparseMatrix"),
+	  identical(Dv, as(Dm, "sparseVector")))
+
+p. <- new("dtCMatrix", i = c(2:3, 2L), p = c(0L, 2:3, 3L, 3L),
+          Dim = c(4L, 4L), x = rep(-0.5, 3), uplo = "L", diag = "U")
+assert.EQ.mat(solve(solve(p.)), as(p., "matrix"))
+dimnames(p.)[[1]] <- paste(1:4)
+ii <- is.na(p.)
+stopifnot(all(!ii), !any(as(ii, "denseMatrix")))# used to fail
+
+lst <- ls()
+table(istri <- sapply(lst, function(.) is(get(.),"triangularMatrix")))
+table(triC <- sapply(lst[istri], function(.) class(get(.))))
+table(uniC <- sapply(lst[istri], function(.) get(.)@diag == "U"))
+lsUtr <- lst[istri][uniC]
+(di <- sapply(lsUtr, function(.) dim(get(.))))
+## TODO: use %*%, crossprod(), .. on all those  4 x 4 -- and check "triangular rules"
+
+r <- tryCatch(chol2inv(Diagonal(x=1:10), pi=pi), warning=identity)
+stopifnot(grepl("extra argument pi .*chol2inv\\(Diagonal", r$message))
+
+assertError(new("ltrMatrix", Dim = c(2L,2L), x=TRUE))# gave "illegal" object w/o error
+assertError(new("ntrMatrix", Dim = c(2L,2L)))#  dito
+
+
+cat('Time elapsed: ', (.pt <- proc.time()),'\n') # "stats"
+cat("doExtras:",doExtras,"\n")
+if(doExtras) {
+    cat("checkMatrix() of all: \n---------\n")
+    Sys.setlocale("LC_COLLATE", "C")    # to keep ls() reproducible
+    for(nm in ls()) if(is(.m <- get(nm), "Matrix")) {
+	cat("\n", rep("-",nchar(nm)),"\n",nm, ":\n", sep='')
+	checkMatrix(.m)
+    }
+    cat('Time elapsed: ', proc.time() - .pt,'\n') # "stats"
+}
+
+dtr <- tr4 <- triu(Matrix(1:16, 4,4))
+dtr@x[Matrix:::indTri(4, upper=FALSE, diag=FALSE)] <- 100*(-3:2)
+stopifnot(all.equal(dtr, tr4), # because are same *as* simple matrices
+	  dtr@x[1:4] == c(1, -(3:1)*100),
+	  range(tr4) == c(0,16),
+	  range(dtr) == c(0,16)) # <- failed
+
+##  new("nsyMatrix") + new("lgeMatrix") # failed
+cln <- sort(outer(c("l","n"), paste0(c("ge","sy"), "Matrix"), paste0))
+dim(c.c <- as.matrix(expand.grid(cln, cln, KEEP.OUT.ATTRS=FALSE))) # 16 x 2
+## clTry <- function(expr) class(tryCatch(expr, error=identity))[[1]]
+## '+' [Arith] failed -- now fixed
+cbind(c.c, Res = apply(c.c, 1, function(x) class(new(x[1]) + new(x[2]))))
+## '<' [Compare] works fine
+cbind(c.c, Res = apply(c.c, 1, function(x) class(new(x[1]) < new(x[2]))))
+
+if(!interactive()) warnings()
+
+## Platform - and other such info -- so we find it in old saved outputs
+.libPaths()
+SysI <- Sys.info()
+structure(Sys.info()[c(4,5,1:3)], class="simple.list")
+sessionInfo()
+c(Matrix = packageDescription("Matrix")$Built)
+if(SysI[["sysname"]] == "Linux" && require("sfsmisc")) local({
+    nn <- names(.Sc <- sfsmisc::Sys.cpuinfo())
+    nn <- names(.Sc <- .Sc[nn != "flags"])
+    print(.Sc[grep("\\.[0-9]$", nn, invert=TRUE)])
+})
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/tests/validObj.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/tests/validObj.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/tests/validObj.R	(revision 2477)
@@ -0,0 +1,181 @@
+library(Matrix)
+### Do all kinds of object creation and coercion
+
+source(system.file("test-tools.R", package = "Matrix"))
+
+## the empty ones:
+checkMatrix(new("dgeMatrix"))
+checkMatrix(Matrix(,0,0))
+
+## "dge"
+assertError( new("dgeMatrix", Dim = c(2,2), x= 1:4) )# double 'Dim'
+assertError( new("dgeMatrix", Dim = as.integer(c(2,2)), x= 1:4) )# int 'x'
+assertError( new("dgeMatrix", Dim = 2:2, x=as.double(1:4)) )# length(Dim) !=2
+assertError( new("dgeMatrix", Dim = as.integer(c(2,2)), x= as.double(1:5)))
+
+checkMatrix(m1 <- Matrix(1:6, ncol=2))
+checkMatrix(m2 <- Matrix(1:7 +0, ncol=3)) # a (desired) warning
+stopifnot(all(match(is(m1),
+   c("dgeMatrix", "ddenseMatrix", "generalMatrix", "geMatrix", "dMatrix",
+     "denseMatrix", "compMatrix", "Matrix", "xMatrix", "mMatrix"), 0) > 0),
+	  dim(t(m1)) == 2:3,
+	  identical(m1, t(t(m1))))
+c.nam <- paste("C",1:2, sep='')
+dimnames(m1) <- list(NULL, c.nam)
+checkMatrix(m1) # failed in 0.999375-10
+checkMatrix(tm1 <- t(m1))
+stopifnot(colnames(m1) == c.nam,
+	  identical(dimnames(tm1), list(c.nam, NULL)),
+	  identical(m1, t(tm1)))
+
+## an example of *named* dimnames
+(t34N <- as(unclass(table(x = gl(3,4), y=gl(4,3))), "dgeMatrix"))
+stopifnot(identical(dimnames(t34N),
+		    dimnames(as(t34N, "matrix"))),
+          identical(t34N, t(t(t34N))))
+
+## "dpo"
+checkMatrix(cm <- crossprod(m1))
+checkMatrix(cp <- as(cm, "dppMatrix"))# 'dpp' + factors
+checkMatrix(cs <- as(cm, "dsyMatrix"))# 'dsy' + factors
+checkMatrix(dcm <- as(cm, "dgeMatrix"))#'dge'
+checkMatrix(mcm <- as(cm, "dMatrix")) # 'dsy' + factors -- buglet? rather == cm?
+checkMatrix(mc. <- as(cm, "Matrix"))  # dpo --> dsy -- (as above)  FIXME? ??
+stopifnot(identical(mc., mcm),
+	  identical(cm, (2*cm)/2),# remains dpo
+	  identical(cm + cp, cp + cs),# dge
+	  identical(mc., mcm),
+	  all(2*cm == mcm * 2))
+
+checkMatrix(eq <- cm == cs)
+stopifnot(all(eq@x),
+	  identical3(pack(eq), cs == cp, cm == cp),
+	  as.logical(!(cs < cp)),
+	  identical4(!(cs < cp), !(cp > cs), cp <= cs, cs >= cp))
+
+## Coercion to 'dpo' should give an error if result would be invalid
+M <- Matrix(diag(4) - 1)
+assertError(as(M, "dpoMatrix"))
+M. <- as(M, "dgeMatrix")
+M.[1,2] <- 10 # -> not even symmetric anymore
+assertError(as(M., "dpoMatrix"))
+
+
+## Cholesky
+checkMatrix(ch <- chol(cm))
+checkMatrix(ch2 <- chol(as(cm, "dsyMatrix")))
+checkMatrix(ch3 <- chol(as(cm, "dgeMatrix")))
+stopifnot(is.all.equal3(as(ch, "matrix"), as(ch2, "matrix"), as(ch3, "matrix")))
+### Very basic	triangular matrix stuff
+
+assertError( new("dtrMatrix", Dim = c(2,2), x= 1:4) )# double 'Dim'
+assertError( new("dtrMatrix", Dim = as.integer(c(2,2)), x= 1:4) )# int 'x'
+## This caused a segfault (before revision r1172 in ../src/dtrMatrix.c):
+assertError( new("dtrMatrix", Dim = 2:2, x=as.double(1:4)) )# length(Dim) !=2
+assertError( new("dtrMatrix", Dim = as.integer(c(2,2)), x= as.double(1:5)))
+
+tr22 <- new("dtrMatrix", Dim = as.integer(c(2,2)), x=as.double(1:4))
+tt22 <- t(tr22)
+(tPt <- tr22 + tt22)
+stopifnot(identical(10 * tPt, tPt * 10),
+	  as.vector(t.22 <- (tr22 / .5)* .5) == c(1,0,3,4),
+	  TRUE) ## not yet: class(t.22) == "dtrMatrix")
+
+## non-square triagonal Matrices --- are forbidden ---
+assertError(new("dtrMatrix", Dim = 2:3,
+		x=as.double(1:6), uplo="L", diag="U"))
+
+n <- 3:3
+assertError(new("dtCMatrix", Dim = c(n,n), diag = "U"))
+validObject(T <- new("dtTMatrix", Dim = c(n,n), diag = "U"))
+validObject(M <- new("dtCMatrix", Dim = c(n,n), diag = "U",
+		     p = rep.int(0:0, n+1)))
+stopifnot(identical(as.mat(T), diag(n)))
+
+set.seed(3) ; (p9 <- as(sample(9), "pMatrix"))
+## Check that the correct error message is triggered
+ind.try <- try(p9[1,1] <- 1, silent = TRUE)
+stopifnot(grep("replacing.*sensible", ind.try[1]) == 1,
+	  is.logical(p9[1,]),
+	  is(p9[2,, drop=FALSE], "indMatrix"),
+	  is(p9[9:1,], "indMatrix"),
+	  isTRUE(p9[-c(1:6, 8:9), 1]),
+	  identical(t(p9), solve(p9)),
+##	  identical(p9[TRUE,], as(p9, "ngTMatrix")),
+	  identical(as(diag(9), "pMatrix"), as(1:9, "pMatrix"))
+	  )
+assert.EQ.mat(p9[TRUE,], as.matrix(as(p9, "ngTMatrix")))
+
+## validObject --> Cparse_validate(.)
+mm <- new("dgCMatrix", Dim = c(3L, 5L),
+          i = c(2L, 0L, 1L, 2L, 0L, 1L),
+          x = c( 2,  1,  1,  2,  1,  2),
+          p = c(0:2, 4L, 4L, 6L))
+
+## Previously unsorted columns were sorted - now are flagged as invalid
+m. <- mm
+ip <- c(1:2, 4:3, 6:5) # permute the 'i' and 'x' slot just "inside column":
+m.@i <- m.i <- mm@i[ip]
+m.@x <- m.x <- mm@x[ip]
+stopifnot(grep("row indices are not", validObject(m., test=TRUE)) == 1)
+Matrix:::.sortCsparse(m.) # don't use this at home, boys!
+m. # now is fixed
+
+## Make sure that validObject() objects...
+## 1) to wrong 'p'
+m. <- mm; m.@p[1] <- 1L
+stopifnot(grep("first element of slot p", validObject(m., test=TRUE)) == 1)
+m.@p <- mm@p[c(1,3:2,4:6)]
+stopifnot(grep("^slot p.* non-decreasing", validObject(m., test=TRUE)) == 1)
+## 2) to non-strictly increasing i's:
+m. <- mm ; ix <- c(1:3,3,5:6)
+m.@i <- mm@i[ix]
+m.@x <- mm@x[ix]
+stopifnot(identical(grep("slot i is not.* increasing .*column$",
+                         validObject(m., test=TRUE)), 1L))
+## ix <- c(1:3, 3:6) # now the the (i,x) slots are too large (and decreasing at end)
+## m.@i <- mm@i[ix]
+## m.@x <- mm@x[ix]
+## stopifnot(identical(grep("^slot i is not.* increasing .*sort",
+##                          (msg <- validObject(m., test=TRUE))),# seg.fault in the past
+##                     1L))
+
+## over-allocation of the i- and x- slot should be allowed:
+## (though it does not really help in M[.,.] <- *  yet)
+m. <- mm
+m.@i <- c(mm@i, NA, NA, NA)
+m.@x <- c(mm@x, 10:12)
+validObject(m.)
+m. # show() now works
+stopifnot(all(m. == mm), # in spite of
+	  length(m.@i) > length(mm@i),
+          identical(t(t(m.)), mm),
+	  identical3(m. * m., m. * mm, mm * mm))
+m.[1,4] <- 99 ## FIXME: warning and cuts (!) the over-allocated slots
+
+## Low-level construction of invalid object:
+##  Ensure that it does *NOT* segfault
+foo <- new("ngCMatrix",
+           i = as.integer(c(12204, 16799, 16799, 33517, 1128, 11930, 1128, 11930, 32183)),
+           p = rep(0:9, c(2,4,1,11,10,0,1,0,9,12)),
+           Dim = c(36952L, 49L))
+validObject(foo)# TRUE
+foo@i[5] <- foo@i[5] + 50000L
+msg <- validObject(foo, test=TRUE)# is -- correctly -- *not* valid anymore
+stopifnot(is.character(msg))
+## Error in validObject(foo) :
+##   invalid class "ngCMatrix" object: all row indices must be between 0 and nrow-1
+getLastMsg <- function(tryRes) {
+    ## Extract "final" message from erronous try result
+    sub("\n$", "",
+        sub(".*: ", "", as.character(tryRes)))
+}
+t <- try(show(foo)) ## error
+t2 <- try(head(foo))
+stopifnot(identical(msg, getLastMsg(t)),
+	  identical(1L, grep("as_cholmod_sparse", getLastMsg(t2))))
+
+
+cat('Time elapsed: ', proc.time(),'\n') # "stats"
+
+if(!interactive()) warnings()
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/tests/indexing.Rout.save
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/tests/indexing.Rout.save	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/tests/indexing.Rout.save	(revision 2477)
@@ -0,0 +1,1952 @@
+
+R version 3.2.2 Patched (2015-11-16 r69642) -- "Fire Safety"
+Copyright (C) 2015 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
+
+R is free software and comes with ABSOLUTELY NO WARRANTY.
+You are welcome to redistribute it under certain conditions.
+Type 'license()' or 'licence()' for distribution details.
+
+R is a collaborative project with many contributors.
+Type 'contributors()' for more information and
+'citation()' on how to cite R or R packages in publications.
+
+Type 'demo()' for some demos, 'help()' for on-line help, or
+'help.start()' for an HTML browser interface to help.
+Type 'q()' to quit R.
+
+> #### For both 'Extract' ("[") and 'Replace' ("[<-") Method testing
+> ####    aka    subsetting     and  subassignment
+> 
+> #### suppressPackageStartupMessages(...)  as we have an *.Rout.save to Rdiff against
+> stopifnot(suppressPackageStartupMessages(require(Matrix)))
+> 
+> source(system.file("test-tools.R", package = "Matrix"), keep.source = FALSE)
+Loading required package: tools
+> ##-> identical3() etc
+> cat("doExtras:",doExtras,"\n")
+doExtras: FALSE 
+> 
+> if(interactive()) {
++     options(error = recover, warn = 1)
++ } else if(FALSE) { ## MM @ testing *manually* only
++     options(error = recover, Matrix.verbose = TRUE, warn = 1)
++ } else {
++     options(Matrix.verbose = TRUE, warn = 1)
++ }
+> 
+> 
+> ### Dense Matrices
+> 
+> m <- Matrix(1:28 +0, nrow = 7)
+> validObject(m)
+[1] TRUE
+> stopifnot(identical(m, m[]),
++ 	  identical(m[2, 3],  16), # simple number
++ 	  identical(m[2, 3:4], c(16,23)), # simple numeric of length 2
++ 	  identical(m[NA,NA], as(Matrix(NA, 7,4), "dMatrix")))
+> 
+> m[2, 3:4, drop=FALSE] # sub matrix of class 'dgeMatrix'
+1 x 2 Matrix of class "dgeMatrix"
+     [,1] [,2]
+[1,]   16   23
+> m[-(4:7), 3:4]        # ditto; the upper right corner of 'm'
+3 x 2 Matrix of class "dgeMatrix"
+     [,1] [,2]
+[1,]   15   22
+[2,]   16   23
+[3,]   17   24
+> 
+> ## rows or columns only:
+> m[1,]     # first row, as simple numeric vector
+[1]  1  8 15 22
+> m[,2]     # 2nd column
+[1]  8  9 10 11 12 13 14
+> m[,1:2]   # sub matrix of first two columns
+7 x 2 Matrix of class "dgeMatrix"
+     [,1] [,2]
+[1,]    1    8
+[2,]    2    9
+[3,]    3   10
+[4,]    4   11
+[5,]    5   12
+[6,]    6   13
+[7,]    7   14
+> m[-(1:6),, drop=FALSE] # not the first 6 rows, i.e. only the 7th
+1 x 4 Matrix of class "dgeMatrix"
+     [,1] [,2] [,3] [,4]
+[1,]    7   14   21   28
+> m[integer(0),] #-> 0 x 4 Matrix
+0 x 4 Matrix of class "dgeMatrix"
+     [,1] [,2] [,3] [,4]
+> m[2:4, numeric(0)] #-> 3 x 0 Matrix
+3 x 0 Matrix of class "dgeMatrix"
+    
+[1,]
+[2,]
+[3,]
+> 
+> ## logical indexing
+> stopifnot(identical(m[2,3], m[(1:nrow(m)) == 2, (1:ncol(m)) == 3]),
++           identical(m[2,], m[(1:nrow(m)) == 2, ]),
++           identical(m[,3:4], m[, (1:4) >= 3]))
+> 
+> ## dimnames indexing:
+> mn <- m
+> dimnames(mn) <- list(paste("r",letters[1:nrow(mn)],sep=""),
++                      LETTERS[1:ncol(mn)])
+> checkMatrix(mn)
+ norm(m [7 x 4]) : 1  I  F  M  ok
+ Summary:  ok
+2*m =?= m+m: identical
+m >= m for all: ok
+m < m for none: ok
+> mn["rd", "D"]
+[1] 25
+> msr <- ms <- as(mn,"sparseMatrix")
+> mnr <- mn
+> v <- rev(as(ms, "vector"))
+> mnr[] <- v
+> msr[] <- v # [<- "sparse" -- not very sensical; did fail w/o a message
+diagnosing replTmat(x,i,j,v): nargs()= 3; missing (i,j) = (0,1)
+> z <- msr; z[] <- 0
+> zz <- as(array(0, dim(z)), "sparseMatrix")
+> a.m <- as(mnr,"matrix")
+> stopifnot(identical(mn["rc", "D"], mn[3,4]), mn[3,4] == 24,
++ 	  identical(mn[, "A"], mn[,1]), mn[,1] == 1:7,
++ 	  identical(mn[c("re", "rb"), "B"], mn[c(5,2), 2]),
++ 	  identical(ms["rc", "D"], ms[3,4]), ms[3,4] == 24,
++ 	  identical(ms[, "A"], ms[,1]), ms[,1] == 1:7,
++ 	  identical(ms[ci <- c("re", "rb"), "B"], ms[c(5,2), 2]),
++ 	  identical(rownames(mn[ci, ]), ci),
++ 	  identical(rownames(ms[ci, ]), ci),
++ 	  identical(colnames(mn[,cj <- c("B","D")]), cj),
++ 	  identical(colnames(ms[,cj]), cj),
++ 	  identical(a.m, as(msr,"matrix")),
++ 	  identical(unname(z), zz),
++ 	  identical(a.m, array(v, dim=dim(mn), dimnames=dimnames(mn)))
++ 	  )
+> showProc.time()
+Time elapsed:  0.144 0.019 0.164 
+> 
+> ## R-forge Matrix bug #2556: Subsetting a sparse matrix did remove  names(dimnames(.)) :
+> m44 <- matrix(1:16, 4, 4, dimnames=list(row=c('a','b','c','d'), col=c('x','y','z','w')))
+> ## Dense matrix: ------------------------------------------
+> a <- Matrix(m44)
+> identical(
++     dimnames(m44[,FALSE, drop=FALSE]),
++     dimnames(  a[,FALSE, drop=FALSE]))
+[1] TRUE
+> chk.ndn <- function(a, a0=m44)
++     stopifnot(identical(names(dimnames(a)), names(dimnames(a0))))
+> i <- 1:2
+> chk.ndn(a[i,]); chk.ndn(a[i, i])
+> ## Sparse matrix: -----------------------------------------
+> s <- as(a %% 3 == 1, "sparseMatrix")
+> ts <- as(s,"TsparseMatrix")
+> b <- sparseMatrix(i=1:3, j=rep(2,3), dims=c(4,4), dimnames=dimnames(s))
+> tb <- as(b,"TsparseMatrix")
+> stopifnot(identical5(
++     dimnames(a), dimnames(s), dimnames(ts),
++     dimnames(b), dimnames(tb)))
+> 
+> chk.ndn(b [i, i]); chk.ndn(b [i, ])
+> chk.ndn(s [i, i]); chk.ndn(s [i, ])
+> chk.ndn(tb[i, i]); chk.ndn(tb[i, ])
+> chk.ndn(ts[i, i]); chk.ndn(ts[i, ])
+> chk.ndn( b[ , 1, drop=FALSE]); chk.ndn( s[i, 2, drop=FALSE])
+> chk.ndn(tb[ , 1, drop=FALSE]); chk.ndn(ts[i, 2, drop=FALSE])
+> 
+> ## Printing sparse colnames:
+> ms[sample(28, 20)] <- 0
+diagnosing replTmat(x,i,j,v): nargs()= 3; missing (i,j) = (0,1)
+> ms <- t(rbind2(ms, 3*ms))
+> cnam1 <- capture.output(show(ms))[2] ; op <- options("sparse.colnames" = "abb3")
+   [[ suppressing 14 column names 'ra', 'rb', 'rc' ... ]]
+> cnam2 <- capture.output(show(ms))[2] ; options(op) # revert
+> stopifnot(## sparse printing
++ 	  grep("^ +$", cnam1) == 1, # cnam1 is empty
++ 	  identical(cnam2,
++ 		    paste(" ", paste(rep(rownames(mn), 2), collapse=" "))))
+> 
+> mo <- m
+> m[2,3] <- 100
+> m[1:2, 4] <- 200
+> m[, 1] <- -1
+> m[1:3,]
+3 x 4 Matrix of class "dgeMatrix"
+     [,1] [,2] [,3] [,4]
+[1,]   -1    8   15  200
+[2,]   -1    9  100  200
+[3,]   -1   10   17   24
+> 
+> m. <- as.matrix(m)
+> 
+> ## m[ cbind(i,j) ] indexing:
+> iN <- ij <- cbind(1:6, 2:3)
+> iN[2:3,] <- iN[5,2] <- NA
+> stopifnot(identical(m[ij], m.[ij]),
++ 	  identical(m[iN], m.[iN]))
+> 
+> ## testing operations on logical Matrices rather more than indexing:
+> g10 <- m [ m > 10 ]
+> stopifnot(18 == length(g10))
+> stopifnot(10 == length(m[ m <= 10 ]))
+> sel <- (20 <  m) & (m <  150)
+> sel.<- (20 <  m.)& (m.<  150)
+> nsel <-(20 >= m) | (m >= 150)
+> (ssel <- as(sel, "sparseMatrix"))
+7 x 4 sparse Matrix of class "lgCMatrix"
+            
+[1,] . . . .
+[2,] . . | .
+[3,] . . . |
+[4,] . . . |
+[5,] . . . |
+[6,] . . . |
+[7,] . . | |
+> stopifnot(is(sel, "lMatrix"), is(ssel, "lsparseMatrix"),
++ 	  identical3(as.mat(sel.), as.mat(sel), as.mat(ssel)),
++ 	  identical3(!sel, !ssel, nsel), # !<sparse> is typically dense
++ 	  identical3(m[ sel],  m[ ssel], as.matrix(m)[as.matrix( ssel)]),
++ 	  identical3(m[!sel],  m[!ssel], as.matrix(m)[as.matrix(!ssel)])
++ 	  )
+> showProc.time()
+Time elapsed:  0.09 0.009 0.099 
+> 
+> ## more sparse Matrices --------------------------------------
+> 
+> ##' @title Check sparseMatrix sub-assignment   m[i,j] <- v
+> ##' @param ms sparse Matrix
+> ##' @param mm its [traditional matrix]-equivalent
+> ##' @param k (approximate) length of index vectors (i,j)
+> ##' @param n.uniq (approximate) number of unique values in  i,j
+> ##' @param vRNG function(n) for random 'v' generation
+> ##' @param show logical; if TRUE, it will not stop on error
+> ##' @return
+> ##' @author Martin Maechler
+> chkAssign <- function(ms, mm = as(ms, "matrix"),
++                       k = min(20,dim(mm)), n.uniq = k %/% 3,
++                       vRNG = { if(is.numeric(mm) || is.complex(mm))
++                                    function(n) rpois(n,lambda= 0.75)# <- about 47% zeros
++                       else ## logical
++                           function(n) runif(n) > 0.8 }, ## 80% zeros
++                       showOnly=FALSE)
++ {
++     stopifnot(is(ms,"sparseMatrix"))
++     d <- dim(ms)
++     s1 <- function(n) sample(n, pmin(n, pmax(1, rpois(1, n.uniq))))
++     i <- sample(s1(d[1]), k/2+ rpois(1, k/2), replace = TRUE)
++     j <- sample(s1(d[2]), k/2+ rpois(1, k/2), replace = TRUE)
++     assert.EQ.mat(ms[i,j], mm[i,j])
++     ms2 <- ms. <- ms; mm. <- mm # save
++     ## now sub*assign* to these repeated indices, and then compare -----
++     v <- vRNG(length(i) * length(j))
++     mm[i,j] <- v
++     ms[i,j] <- v
++     ## useful to see (ii,ij), but confusing R/ESS when additionally debugging:
++     ## if(!showOnly && interactive()) { op <- options(error = recover); on.exit(options(op)) }
++     assert.EQ.mat(ms, mm, show=showOnly)
++     ## vector indexing m[cbind(i,j)] == m[i + N(j-1)] ,  N = nrow(.)
++     ii <- seq_len(min(length(i), length(j)))
++     i <- i[ii]
++     j <- j[ii]
++     ij <- cbind(i, j)
++     ii <- i + nrow(ms)*(j - 1)
++     ord.i <- order(ii)
++     iio <- ii[ord.i]
++     ui <- unique(iio) # compare these with :
++     neg.ii <- - setdiff(seq_len(prod(d)), ii)
++     stopifnot(identical(mm[ii], mm[ij]),
++               identical(ms.[ui], ms.[neg.ii]),
++ 	      ms.[ij] == mm.[ii], ## M[ cbind(i,j) ] was partly broken; now checking
++               ms.[ii] == mm.[ii])
++     v <- v[seq_len(length(i))]
++     if(is(ms,"nMatrix")) v <- as.logical(v)  # !
++     mm.[ij] <- v
++     ms.[ii] <- v
++     nodup <- (length(ui) == length(ii)) ## <==>  ! anyDuplicated(iio)
++     if(nodup) { cat("[-]") # rare, unfortunately
++ 	ms2[neg.ii] <- v[ord.i]
++ 	stopifnot(identical(ms2, ms.))
++     }
++     assert.EQ.mat(ms., mm., show=showOnly)
++ } ##{chkAssign}
+> 
+> ## Get duplicated index {because these are "hard" (and rare)
+> getDuplIndex <- function(n, k) {
++     repeat {
++         i <- sample(n, k, replace=TRUE) # 3 4 6 9 2 9 :  9 is twice
++         if(anyDuplicated(i)) break
++     }
++     i
++ }
+> 
+> ## From package 'sfsmisc':
+> repChar <- function (char, no) paste(rep.int(char, no), collapse = "")
+> 
+> m <- 1:800
+> set.seed(101) ; m[sample(800, 600)] <- 0
+> m0 <- Matrix(m, nrow = 40)
+> m1 <- add.simpleDimnames(m0)
+> for(kind in c("n", "l", "d")) {
++  for(m in list(m0,m1)) { ## -- with and without dimnames -------------------------
++     kClass <-paste0(kind, "Matrix"  )
++     Ckind <- paste0(kind, "gCMatrix")
++     Tkind <- paste0(kind, "gTMatrix")
++     str(mC <- as(m, Ckind))
++     str(mT <- as(as(as(m, kClass), "TsparseMatrix"), Tkind))
++     mm <- as(mC, "matrix") # also logical or double
++     IDENT <- if(kind == "n") function(x,y) Q.eq2(x,y, tol=0) else identical
++     stopifnot(identical(mT, as(as(mC, "TsparseMatrix"), Tkind)),
++               identical(mC, as(mT, Ckind)),
++               Qidentical(mC[0,0], new(Ckind)),
++               Qidentical(mT[0,0], new(Tkind)),
++               identical(unname(mT[0,]), new(Tkind, Dim = c(0L,ncol(m)))),
++               identical(unname(mT[,0]), new(Tkind, Dim = c(nrow(m),0L))),
++               IDENT(mC[0,], as(mT[FALSE,], Ckind)),
++               IDENT(mC[,0], as(mT[,FALSE], Ckind)),
++               sapply(pmin(min(dim(mC)), c(0:2, 5:10)),
++                      function(k) {i <- seq_len(k); all(mC[i,i] == mT[i,i])}),
++               TRUE)
++     cat("ok\n")
++     show(mC[,1])
++     show(mC[1:2,])
++     show(mC[7,  drop = FALSE])
++     assert.EQ.mat(mC[1:2,], mm[1:2,])
++     assert.EQ.mat(mC[0,], mm[0,])
++     assert.EQ.mat(mC[,FALSE], mm[,FALSE])
++     ##
++     ## *repeated* (aka 'duplicated') indices - did not work at all ...
++     i <- pmin(nrow(mC), rep(8:10,2))
++     j <- c(2:4, 4:3)
++     assert.EQ.mat(mC[i,], mm[i,])
++     assert.EQ.mat(mC[,j], mm[,j])
++     ## FIXME? assert.EQ.mat(mC[,NA], mm[,NA]) -- mC[,NA] is all 0 "instead" of all NA
++     ## MM currently thinks we should  NOT  allow  <sparse>[ <NA> ]
++     assert.EQ.mat(mC[i, 2:1], mm[i, 2:1])
++     assert.EQ.mat(mC[c(4,1,2:1), j], mm[c(4,1,2:1), j])
++     assert.EQ.mat(mC[i,j], mm[i,j])
++     ##
++     ## set.seed(7)
++     op <- options(Matrix.verbose = FALSE)
++     cat(" for(): ")
++     for(n in 1:(if(doExtras) 50 else 5)) {
++ 	chkAssign(mC, mm)
++ 	chkAssign(mC[-3,-2], mm[-3,-2])
++         cat(".")
++     }
++     options(op)
++     cat(sprintf("\n[Ok]%s\n\n", repChar("-", 64)))
++  }
++  cat(sprintf("\nok( %s )\n== ###%s\n\n", kind, repChar("=", 70)))
++ }## end{for}---------------------------------------------------------------
+Formal class 'ngCMatrix' [package "Matrix"] with 5 slots
+  ..@ i       : int [1:200] 2 6 11 21 24 29 37 38 1 4 ...
+  ..@ p       : int [1:21] 0 8 22 28 37 41 50 63 71 81 ...
+  ..@ Dim     : int [1:2] 40 20
+  ..@ Dimnames:List of 2
+  .. ..$ : NULL
+  .. ..$ : NULL
+  ..@ factors : list()
+Formal class 'ngTMatrix' [package "Matrix"] with 5 slots
+  ..@ i       : int [1:200] 2 6 11 21 24 29 37 38 1 4 ...
+  ..@ j       : int [1:200] 0 0 0 0 0 0 0 0 1 1 ...
+  ..@ Dim     : int [1:2] 40 20
+  ..@ Dimnames:List of 2
+  .. ..$ : NULL
+  .. ..$ : NULL
+  ..@ factors : list()
+Note: method with signature 'nsparseMatrix#sparseMatrix' chosen for function '==',
+ target signature 'ngCMatrix#ngTMatrix'.
+ "nMatrix#nMatrix", "sparseMatrix#nsparseMatrix" would also be valid
+ok
+ [1] FALSE FALSE  TRUE FALSE FALSE FALSE  TRUE FALSE FALSE FALSE FALSE  TRUE
+[13] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE  TRUE FALSE FALSE
+[25]  TRUE FALSE FALSE FALSE FALSE  TRUE FALSE FALSE FALSE FALSE FALSE FALSE
+[37] FALSE  TRUE  TRUE FALSE
+2 x 20 sparse Matrix of class "ngCMatrix"
+                                            
+[1,] . . . | . . | . . . . | . . | . | . . .
+[2,] . | . . . | . . . . . . | | . . . . | .
+[1] TRUE
+ for(): .....
+[Ok]----------------------------------------------------------------
+
+Formal class 'ngCMatrix' [package "Matrix"] with 5 slots
+  ..@ i       : int [1:200] 2 6 11 21 24 29 37 38 1 4 ...
+  ..@ p       : int [1:21] 0 8 22 28 37 41 50 63 71 81 ...
+  ..@ Dim     : int [1:2] 40 20
+  ..@ Dimnames:List of 2
+  .. ..$ : chr [1:40] "r1" "r2" "r3" "r4" ...
+  .. ..$ : chr [1:20] "c1" "c2" "c3" "c4" ...
+  ..@ factors : list()
+Formal class 'ngTMatrix' [package "Matrix"] with 5 slots
+  ..@ i       : int [1:200] 2 6 11 21 24 29 37 38 1 4 ...
+  ..@ j       : int [1:200] 0 0 0 0 0 0 0 0 1 1 ...
+  ..@ Dim     : int [1:2] 40 20
+  ..@ Dimnames:List of 2
+  .. ..$ : chr [1:40] "r1" "r2" "r3" "r4" ...
+  .. ..$ : chr [1:20] "c1" "c2" "c3" "c4" ...
+  ..@ factors : list()
+ok
+   r1    r2    r3    r4    r5    r6    r7    r8    r9   r10   r11   r12   r13 
+FALSE FALSE  TRUE FALSE FALSE FALSE  TRUE FALSE FALSE FALSE FALSE  TRUE FALSE 
+  r14   r15   r16   r17   r18   r19   r20   r21   r22   r23   r24   r25   r26 
+FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE  TRUE FALSE FALSE  TRUE FALSE 
+  r27   r28   r29   r30   r31   r32   r33   r34   r35   r36   r37   r38   r39 
+FALSE FALSE FALSE  TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE  TRUE  TRUE 
+  r40 
+FALSE 
+2 x 20 sparse Matrix of class "ngCMatrix"
+   [[ suppressing 20 column names 'c1', 'c2', 'c3' ... ]]
+                                          
+r1 . . . | . . | . . . . | . . | . | . . .
+r2 . | . . . | . . . . . . | | . . . . | .
+[1] TRUE
+ for(): .....
+[Ok]----------------------------------------------------------------
+
+
+ok( n )
+== ###======================================================================
+
+Formal class 'lgCMatrix' [package "Matrix"] with 6 slots
+  ..@ i       : int [1:200] 2 6 11 21 24 29 37 38 1 4 ...
+  ..@ p       : int [1:21] 0 8 22 28 37 41 50 63 71 81 ...
+  ..@ Dim     : int [1:2] 40 20
+  ..@ Dimnames:List of 2
+  .. ..$ : NULL
+  .. ..$ : NULL
+  ..@ x       : logi [1:200] TRUE TRUE TRUE TRUE TRUE TRUE ...
+  ..@ factors : list()
+Formal class 'lgTMatrix' [package "Matrix"] with 6 slots
+  ..@ i       : int [1:200] 2 6 11 21 24 29 37 38 1 4 ...
+  ..@ j       : int [1:200] 0 0 0 0 0 0 0 0 1 1 ...
+  ..@ Dim     : int [1:2] 40 20
+  ..@ Dimnames:List of 2
+  .. ..$ : NULL
+  .. ..$ : NULL
+  ..@ x       : logi [1:200] TRUE TRUE TRUE TRUE TRUE TRUE ...
+  ..@ factors : list()
+ok
+ [1] FALSE FALSE  TRUE FALSE FALSE FALSE  TRUE FALSE FALSE FALSE FALSE  TRUE
+[13] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE  TRUE FALSE FALSE
+[25]  TRUE FALSE FALSE FALSE FALSE  TRUE FALSE FALSE FALSE FALSE FALSE FALSE
+[37] FALSE  TRUE  TRUE FALSE
+2 x 20 sparse Matrix of class "lgCMatrix"
+                                            
+[1,] . . . | . . | . . . . | . . | . | . . .
+[2,] . | . . . | . . . . . . | | . . . . | .
+[1] TRUE
+ for(): .....
+[Ok]----------------------------------------------------------------
+
+Formal class 'lgCMatrix' [package "Matrix"] with 6 slots
+  ..@ i       : int [1:200] 2 6 11 21 24 29 37 38 1 4 ...
+  ..@ p       : int [1:21] 0 8 22 28 37 41 50 63 71 81 ...
+  ..@ Dim     : int [1:2] 40 20
+  ..@ Dimnames:List of 2
+  .. ..$ : chr [1:40] "r1" "r2" "r3" "r4" ...
+  .. ..$ : chr [1:20] "c1" "c2" "c3" "c4" ...
+  ..@ x       : logi [1:200] TRUE TRUE TRUE TRUE TRUE TRUE ...
+  ..@ factors : list()
+Formal class 'lgTMatrix' [package "Matrix"] with 6 slots
+  ..@ i       : int [1:200] 2 6 11 21 24 29 37 38 1 4 ...
+  ..@ j       : int [1:200] 0 0 0 0 0 0 0 0 1 1 ...
+  ..@ Dim     : int [1:2] 40 20
+  ..@ Dimnames:List of 2
+  .. ..$ : chr [1:40] "r1" "r2" "r3" "r4" ...
+  .. ..$ : chr [1:20] "c1" "c2" "c3" "c4" ...
+  ..@ x       : logi [1:200] TRUE TRUE TRUE TRUE TRUE TRUE ...
+  ..@ factors : list()
+ok
+   r1    r2    r3    r4    r5    r6    r7    r8    r9   r10   r11   r12   r13 
+FALSE FALSE  TRUE FALSE FALSE FALSE  TRUE FALSE FALSE FALSE FALSE  TRUE FALSE 
+  r14   r15   r16   r17   r18   r19   r20   r21   r22   r23   r24   r25   r26 
+FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE  TRUE FALSE FALSE  TRUE FALSE 
+  r27   r28   r29   r30   r31   r32   r33   r34   r35   r36   r37   r38   r39 
+FALSE FALSE FALSE  TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE  TRUE  TRUE 
+  r40 
+FALSE 
+2 x 20 sparse Matrix of class "lgCMatrix"
+   [[ suppressing 20 column names 'c1', 'c2', 'c3' ... ]]
+                                          
+r1 . . . | . . | . . . . | . . | . | . . .
+r2 . | . . . | . . . . . . | | . . . . | .
+[1] TRUE
+ for(): .....
+[Ok]----------------------------------------------------------------
+
+
+ok( l )
+== ###======================================================================
+
+Formal class 'dgCMatrix' [package "Matrix"] with 6 slots
+  ..@ i       : int [1:200] 2 6 11 21 24 29 37 38 1 4 ...
+  ..@ p       : int [1:21] 0 8 22 28 37 41 50 63 71 81 ...
+  ..@ Dim     : int [1:2] 40 20
+  ..@ Dimnames:List of 2
+  .. ..$ : NULL
+  .. ..$ : NULL
+  ..@ x       : num [1:200] 3 7 12 22 25 30 38 39 42 45 ...
+  ..@ factors : list()
+Formal class 'dgTMatrix' [package "Matrix"] with 6 slots
+  ..@ i       : int [1:200] 2 6 11 21 24 29 37 38 1 4 ...
+  ..@ j       : int [1:200] 0 0 0 0 0 0 0 0 1 1 ...
+  ..@ Dim     : int [1:2] 40 20
+  ..@ Dimnames:List of 2
+  .. ..$ : NULL
+  .. ..$ : NULL
+  ..@ x       : num [1:200] 3 7 12 22 25 30 38 39 42 45 ...
+  ..@ factors : list()
+ok
+ [1]  0  0  3  0  0  0  7  0  0  0  0 12  0  0  0  0  0  0  0  0  0 22  0  0 25
+[26]  0  0  0  0 30  0  0  0  0  0  0  0 38 39  0
+2 x 20 sparse Matrix of class "dgCMatrix"
+                                                               
+[1,] .  . . 121 .   . 241 . . . . 441   .   . 561 . 641 .   . .
+[2,] . 42 .   . . 202   . . . . .   . 482 522   . .   . . 722 .
+[1] 7
+ for(): .....
+[Ok]----------------------------------------------------------------
+
+Formal class 'dgCMatrix' [package "Matrix"] with 6 slots
+  ..@ i       : int [1:200] 2 6 11 21 24 29 37 38 1 4 ...
+  ..@ p       : int [1:21] 0 8 22 28 37 41 50 63 71 81 ...
+  ..@ Dim     : int [1:2] 40 20
+  ..@ Dimnames:List of 2
+  .. ..$ : chr [1:40] "r1" "r2" "r3" "r4" ...
+  .. ..$ : chr [1:20] "c1" "c2" "c3" "c4" ...
+  ..@ x       : num [1:200] 3 7 12 22 25 30 38 39 42 45 ...
+  ..@ factors : list()
+Formal class 'dgTMatrix' [package "Matrix"] with 6 slots
+  ..@ i       : int [1:200] 2 6 11 21 24 29 37 38 1 4 ...
+  ..@ j       : int [1:200] 0 0 0 0 0 0 0 0 1 1 ...
+  ..@ Dim     : int [1:2] 40 20
+  ..@ Dimnames:List of 2
+  .. ..$ : chr [1:40] "r1" "r2" "r3" "r4" ...
+  .. ..$ : chr [1:20] "c1" "c2" "c3" "c4" ...
+  ..@ x       : num [1:200] 3 7 12 22 25 30 38 39 42 45 ...
+  ..@ factors : list()
+ok
+ r1  r2  r3  r4  r5  r6  r7  r8  r9 r10 r11 r12 r13 r14 r15 r16 r17 r18 r19 r20 
+  0   0   3   0   0   0   7   0   0   0   0  12   0   0   0   0   0   0   0   0 
+r21 r22 r23 r24 r25 r26 r27 r28 r29 r30 r31 r32 r33 r34 r35 r36 r37 r38 r39 r40 
+  0  22   0   0  25   0   0   0   0  30   0   0   0   0   0   0   0  38  39   0 
+2 x 20 sparse Matrix of class "dgCMatrix"
+   [[ suppressing 20 column names 'c1', 'c2', 'c3' ... ]]
+                                                             
+r1 .  . . 121 .   . 241 . . . . 441   .   . 561 . 641 .   . .
+r2 . 42 .   . . 202   . . . . .   . 482 522   . .   . . 722 .
+[1] 7
+ for(): .....
+[Ok]----------------------------------------------------------------
+
+
+ok( d )
+== ###======================================================================
+
+> showProc.time()
+Time elapsed:  0.708 0.049 0.757 
+> 
+> if(doExtras) {### {was ./AAA_index.R, MM-only}
++     ## an nsparse-example
++     A <- Matrix(c(rep(c(1,0,0),2), rep(c(2,0),7), c(0,0,2), rep(0,4)), 3,9)
++     i <- c(3,1:2)
++     j <- c(3, 5, 9, 5, 9)
++     vv <- logical(length(i)*length(j)); vv[6:9] <- TRUE
++ 
++     print(An <- as(A,"nMatrix")); an <- as(An, "matrix")
++     assert.EQ.mat(An, an)
++     An[i, j] <- vv
++     an[i, j] <- vv
++     assert.EQ.mat(An, an)## error
++     if(!all(An == an)) show(drop0(An - an))
++     ## all are +1
++ 
++     options("Matrix.subassign.verbose" = TRUE)# output from C
++     An <- as(A,"nMatrix"); An[i, j] <- vv
++     ## and compare with this:
++     Al <- as(A,"lMatrix"); Al[i, j] <- vv
++     options("Matrix.subassign.verbose" = FALSE)
++ 
++     ##--- An interesting not small not large example  for  M[i,j] <- v ------------
++     ##
++     M <- Matrix(c(1, rep(0,7), 1:4), 3,4)
++     N0 <- kronecker(M,M)
++     mkN1 <- function(M) {
++         stopifnot(length(d <- dim(M)) == 2)
++         isC <- is(M,"CsparseMatrix")
++         M[,d[2]] <- c(0,2,0)
++         N <- kronecker(diag(x=1:2), M)## remains sparse if 'M' is
++         if(isC) N <- as(N, "CsparseMatrix")
++         diag(N[-1,]) <- -2
++         N[9,]  <- 1:4   # is recycled
++         N[,12] <- -7:-9 # ditto
++         N
++     }
++ 
++     show(N1 <- t(N <- mkN1(N0)))    # transpose {for display reasons}
++     C1 <- t(C <- mkN1(as(N0,"CsparseMatrix")))
++     stopifnot(all(C == N))
++     assert.EQ.mat(C, mkN1(as.matrix(N0)))
++ 
++     C. <- C1
++     show(N <- N1) ; n <- as.matrix(N); str(N)
++     sort(i <- c(6,8,19,11,21,20,10,7,12,9,5,18,17,22,13))## == c(5:13, 17:22))
++     sort(j <- c(3,8,6,15,10,4,14,13,16,2,11,17,7,5))## == c(2:8, 10:11, 13:17)
++     val <- v.l <- 5*c(0,6,0,7,0,0,8:9, 0,0)
++     show(spv <- as(val, "sparseVector")); str(spv)
++ 
++     n [i,j] <- v.l
++     N [i,j] <- val# is recycled, too
++     C.[i,j] <- val
++     assert.EQ.mat(N,n) ; stopifnot(all(C. == N))
++     ## and the same *again*:
++     n [i,j] <- v.l
++     N [i,j] <- val
++     C.[i,j] <- val
++     assert.EQ.mat(N,n)
++     stopifnot(all(C. == N))
++ 
++     print(load(system.file("external", "symA.rda", package="Matrix"))) # "As"
++     stopifnotValid(As, "dsCMatrix"); stopifnot(identical(As@factors, list()))
++     R. <- drop0(chol(As))
++     stopifnot(1:32 == sort(diag(R.)), ## !
++               R.@x == as.integer(R.@x),## so it is an integer-valued chol-decomp !
++               ## shows that (1) As is *not* singular  (2) the matrix is not random
++               all.equal(crossprod(R.), As, tolerance =1e-15))
++     print(summary(evA <- eigen(As, only.values=TRUE)$val))
++     print(tail(evA)) ## largest three ~= 10^7,  smallest two *negative*
++     print(rcond(As)) # 1.722 e-21 == very bad !
++     ##-> this *is* a border line case, i.e. very close to singular !
++     ## and also determinant(.) is rather random here!
++     cc0 <- Cholesky(As)# no problem
++     try({
++         cc <- Cholesky(As, super=TRUE)
++         ## gives --on 32-bit only--
++         ## Cholmod error 'matrix not positive definite' at file:../Supernodal/t_cholmod_super_numeric.c, line 613
++         ecc <- expand(cc)
++         L.P <- with(ecc, crossprod(L,P))  ## == L'P
++         ## crossprod(L.P) == (L'P)' L'P == P'LL'P
++         stopifnot( all.equal(crossprod(L.P), As) )
++     })
++     ##---- end{ eigen( As ) -----------
++ 
++ } ## only if(doExtras)
+> 
+> 
+> ##---- Symmetric indexing of symmetric Matrix ----------
+> m. <- mC
+> m.[, c(2, 7:12)] <- 0
+> stopifnotValid(S <- crossprod(add.simpleDimnames(m.) %% 100), "dsCMatrix")
+> ss <- as(S, "matrix")
+> ds <- as(S, "denseMatrix")
+> ## NA-indexing of *dense* Matrices: should work as traditionally
+> assert.EQ.mat(ds[NA,NA], ss[NA,NA])
+> assert.EQ.mat(ds[NA,  ], ss[NA,])
+> assert.EQ.mat(ds[  ,NA], ss[,NA])
+> T <- as(S, "TsparseMatrix")
+> stopifnot(identical(ds[2 ,NA], ss[2,NA]),
++ 	  identical(ds[NA, 1], ss[NA, 1]),
++ 	  identical(S, as(T, "CsparseMatrix")) )
+> 
+> ## non-repeated indices:
+> i <- c(7:5, 2:4);assert.EQ.mat(T[i,i], ss[i,i])
+> ## NA in indices  -- check that we get a helpful error message:
+> i[2] <- NA
+> er <- tryCatch(T[i,i], error = function(e)e)
+> stopifnot(as.logical(grep("indices.*sparse Matrices", er$message)))
+> 
+> N <- nrow(T)
+> set.seed(11)
+> for(n in 1:(if(doExtras) 50 else 3)) {
++     i <- sample(N, max(2, sample(N,1)), replace = FALSE)
++     validObject(Tii <- T[i,i]) ; tTi <- t(T)[i,i]
++     stopifnot(is(Tii, "dsTMatrix"), # remained symmetric Tsparse
++ 	      is(tTi, "dsTMatrix"), # may not be identical when *sorted* differently
++ 	      identical(as(t(Tii),"CsparseMatrix"), as(tTi,"CsparseMatrix")))
++     assert.EQ.mat(Tii, ss[i,i])
++ }
+> 
+> b <- diag(1:2)[,c(1,1,2,2)]
+> cb <- crossprod(b)
+> cB <- crossprod(Matrix(b, sparse=TRUE))
+> a <- matrix(0, 6, 6)
+> a[1:4, 1:4] <- cb
+> A1 <- A2 <- Matrix(0, 6, 6)#-> sparse
+> A1[1:4, 1:4] <- cb
+> A2[1:4, 1:4] <- cB
+> assert.EQ.mat(A1, a)# indeed
+> stopifnot(identical(A1, A2), is(A1, "dsCMatrix"))
+> 
+> ## repeated ones ``the challenge'' (to do smartly):
+> j <- c(4, 4, 9, 12, 9, 4, 17, 3, 18, 4, 12, 18, 4, 9)
+> assert.EQ.mat(T[j,j], ss[j,j])
+> ## and another two sets  (a, A) &  (a., A.) :
+> a <- matrix(0, 6,6)
+> a[upper.tri(a)] <- (utr <- c(2, 0,-1, 0,0,5, 7,0,0,0, 0,0,-2,0,8))
+> ta <- t(a); ta[upper.tri(a)] <- utr; a <- t(ta)
+> diag(a) <- c(0,3,0,4,6,0)
+> A <- as(Matrix(a), "TsparseMatrix")
+> A. <- A
+> diag(A.) <- 10 * (1:6)
+> a. <- as(A., "matrix")
+> ## More testing {this was not working for a long time..}
+> set.seed(1)
+> for(n in 1:(if(doExtras) 100 else 6)) {
++     i <- sample(1:nrow(A), 3+2*rpois(1, lam=3), replace=TRUE)
++     Aii  <- A[i,i]
++     A.ii <- A.[i,i]
++     stopifnot(class(Aii) == class(A),
++               class(A.ii) == class(A.))
++     assert.EQ.mat(Aii , a [i,i])
++     assert.EQ.mat(A.ii, a.[i,i])
++     assert.EQ.mat(T[i,i], ss[i,i])
++ }
+> showProc.time()
+Time elapsed:  0.145 0 0.144 
+> 
+> stopifnot(all.equal(mC[,3], mm[,3]),
++ 	  identical(mC[ij], mC[ij + 0.4]),
++ 	  identical(mC[ij], mm[ij]),
++ 	  identical(mC[iN], mm[iN]))
+> ## out of bound indexing must be detected:
+> assertError(mC[cbind(ij[,1] - 5, ij[,2])])
+> assertError(mC[cbind(ij[,1],     ij[,2] + ncol(mC))])
+> 
+> assert.EQ.mat(mC[7, , drop=FALSE], mm[7, , drop=FALSE])
+> identical    (mC[7,   drop=FALSE], mm[7,   drop=FALSE]) # *vector* indexing
+[1] TRUE
+> 
+> stopifnot(dim(mC[numeric(0), ]) == c(0,20), # used to give warnings
++           dim(mC[, integer(0)]) == c(40,0),
++           identical(mC[, integer(0)], mC[, FALSE]))
+> validObject(print(mT[,c(2,4)]))
+40 x 2 sparse Matrix of class "dgTMatrix"
+    c2  c4
+r1   . 121
+r2  42   .
+r3   .   .
+r4   .   .
+r5  45   .
+r6   .   .
+r7   .   .
+r8   . 128
+r9   . 129
+r10 50   .
+r11  .   .
+r12 52 132
+r13  . 133
+r14  .   .
+r15 55   .
+r16  .   .
+r17  .   .
+r18  . 138
+r19  .   .
+r20  .   .
+r21  . 141
+r22  . 142
+r23 63   .
+r24  .   .
+r25 65   .
+r26  .   .
+r27 67   .
+r28 68   .
+r29  .   .
+r30  .   .
+r31 71   .
+r32 72   .
+r33  .   .
+r34 74   .
+r35  .   .
+r36 76   .
+r37  .   .
+r38  .   .
+r39  . 159
+r40 80   .
+[1] TRUE
+> stopifnot(all.equal(mT[2,], mm[2,]),
++ 	  ## row or column indexing in combination with t() :
++ 	  Q.C.identical(mT[2,], t(mT)[,2]),
++ 	  Q.C.identical(mT[-2,], t(t(mT)[,-2])),
++ 	  Q.C.identical(mT[c(2,5),], t(t(mT)[,c(2,5)])) )
+> assert.EQ.mat(mT[4,, drop = FALSE], mm[4,, drop = FALSE])
+> stopifnot(identical3(mm[,1], mC[,1], mT[,1]),
++ 	  identical3(mm[3,], mC[3,], mT[3,]),
++ 	  identical3(mT[2,3], mC[2,3], 0),
++ 	  identical(mT[], mT),
++           identical4(       mm[c(3,7), 2:4],  as.mat( m[c(3,7), 2:4]),
++                      as.mat(mT[c(3,7), 2:4]), as.mat(mC[c(3,7), 2:4]))
++           )
+> 
+> x.x <- crossprod(mC)
+> stopifnot(class(x.x) == "dsCMatrix",
++           class(x.x. <- round(x.x / 10000)) == "dsCMatrix",
++           identical(x.x[cbind(2:6, 2:6)],
++                     diag(x.x [2:6, 2:6])))
+> head(x.x.) # Note the *non*-structural 0's printed as "0"
+6 x 20 sparse Matrix of class "dgCMatrix"
+   [[ suppressing 20 column names 'c1', 'c2', 'c3' ... ]]
+                                                           
+c1 1 0 .  1  .  1  1  3  .  3  2  1  6  1  .  2  4  6  5  1
+c2 0 6 2  1  3  5  7  5 12 14 14  9 11 16 12 13 17 19 19 10
+c3 . 2 6  .  4  2  5  3  8 12  5 16  9 11 23  .  .  6  7  7
+c4 1 1 . 17  .  8 10 13  8  6 18 18 29 35 14  8 25 10 19 21
+c5 . 3 4  . 14  4 10  .  . 29  8  9 19 11 11  .  . 26 26 16
+c6 1 5 2  8  4 42  5 19 14  9  8 10 42 56 50 27 29 32 64 16
+> tail(x.x., -3) # all but the first three lines
+17 x 20 sparse Matrix of class "dgCMatrix"
+   [[ suppressing 20 column names 'c1', 'c2', 'c3' ... ]]
+                                                                           
+c4  1  1  . 17  .  8  10 13   8   6  18  18  29  35  14   8  25  10  19  21
+c5  .  3  4  . 14  4  10  .   .  29   8   9  19  11  11   .   .  26  26  16
+c6  1  5  2  8  4 42   5 19  14   9   8  10  42  56  50  27  29  32  64  16
+c7  1  7  5 10 10  5  87 14   9  31  77  47  79  43  28  17  67 110  36 121
+c8  3  5  3 13  . 19  14 70  10  24  37  13  59  62  34  19  58  21  64  44
+c9  . 12  8  8  . 14   9 10 116  41  58  33  33  72  78  43  69  72  75  25
+c10 3 14 12  6 29  9  31 24  41 167  69  56  99  44  70  24 105  82  85  32
+c11 2 14  5 18  8  8  77 37  58  69 267  80  86 139  49 105 194 119 122 129
+c12 1  9 16 18  9 10  47 13  33  56  80 194  70  77  81   .  90  32   . 106
+c13 6 11  9 29 19 42  79 59  33  99  86  70 324 157  55   .  69 142 144 155
+c14 1 16 11 35 11 56  43 62  72  44 139  77 157 375 123 102 145  39 196  81
+c15 . 12 23 14 11 50  28 34  78  70  49  81  55 123 368  71 112  41  41  86
+c16 2 13  .  8  . 27  17 19  43  24 105   .   . 102  71 233 124  44 139   .
+c17 4 17  . 25  . 29  67 58  69 105 194  90  69 145 112 124 523 141 245 100
+c18 6 19  6 10 26 32 110 21  72  82 119  32 142  39  41  44 141 497 104 111
+c19 5 19  7 19 26 64  36 64  75  85 122   . 144 196  41 139 245 104 542  55
+c20 1 10  7 21 16 16 121 44  25  32 129 106 155  81  86   . 100 111  55 541
+> 
+> lx.x <- as(x.x, "lsCMatrix") # FALSE only for "structural" 0
+> (l10 <- lx.x[1:10, 1:10])# "lsC"
+10 x 10 sparse Matrix of class "lsCMatrix"
+   [[ suppressing 10 column names 'c1', 'c2', 'c3' ... ]]
+                       
+c1  | | . | . | | | . |
+c2  | | | | | | | | | |
+c3  . | | . | | | | | |
+c4  | | . | . | | | | |
+c5  . | | . | | | . . |
+c6  | | | | | | | | | |
+c7  | | | | | | | | | |
+c8  | | | | . | | | | |
+c9  . | | | . | | | | |
+c10 | | | | | | | | | |
+> (l3 <-  lx.x[1:3, ])
+3 x 20 sparse Matrix of class "lgCMatrix"
+   [[ suppressing 20 column names 'c1', 'c2', 'c3' ... ]]
+                                          
+c1 | | . | . | | | . | | | | | . | | | | |
+c2 | | | | | | | | | | | | | | | | | | | |
+c3 . | | . | | | | | | | | | | | . . | | |
+> m.x <- as.mat(x.x) # as.mat() *drops* (NULL,NULL) dimnames
+> stopifnot(class(l10) == "lsCMatrix", # symmetric indexing -> symmetric !
++           identical(as.mat(lx.x), m.x != 0),
++           identical(as.logical(lx.x), as.logical(m.x)),
++           identical(as.mat(l10), m.x[1:10, 1:10] != 0),
++           identical(as.mat(l3 ), m.x[1:3, ] != 0)
++           )
+> 
+> ##-- Sub*assignment* with repeated / duplicated index:
+> A <- Matrix(0,4,3) ; A[c(1,2,1), 2] <- 1 ; A
+4 x 3 sparse Matrix of class "dgCMatrix"
+          
+[1,] . 1 .
+[2,] . 1 .
+[3,] . . .
+[4,] . . .
+> B <- A;              B[c(1,2,1), 2] <- 1:3; B; B. <- B
+4 x 3 sparse Matrix of class "dgCMatrix"
+          
+[1,] . 3 .
+[2,] . 2 .
+[3,] . . .
+[4,] . . .
+> B.[3,] <- rbind(4:2)
+> ## change the diagonal and the upper and lower subdiagonal :
+> diag(B.) <- 10 * diag(B.)
+> diag(B.[,-1]) <- 5* diag(B.[,-1])
+> diag(B.[-1,]) <- 4* diag(B.[-1,]) ; B.
+4 x 3 sparse Matrix of class "dgCMatrix"
+            
+[1,] . 15  .
+[2,] . 20  .
+[3,] 4 12 20
+[4,] .  .  .
+> C <- B.; C[,2] <- C[,2];  C[1,] <- C[1,]; C[2:3,2:1] <- C[2:3,2:1]
+> stopifnot(identical(unname(as.matrix(A)),
++ 		    local({a <- matrix(0,4,3); a[c(1,2,1), 2] <-  1 ; a})),
++ 	  identical(unname(as.matrix(B)),
++ 		    local({a <- matrix(0,4,3); a[c(1,2,1), 2] <- 1:3; a})),
++ 	  identical(C, drop0(B.)))
+> ## <sparse>[<logicalSparse>] <- v  failed in the past
+> T <- as(C,"TsparseMatrix"); C. <- C
+> T[T>0] <- 21
+Note: method with signature 'TsparseMatrix#Matrix#missing#replValue' chosen for function '[<-',
+ target signature 'dgTMatrix#lgTMatrix#missing#numeric'.
+ "Matrix#lsparseMatrix#missing#replValue" would also be valid
+diagnosing replTmat(x,i,j,v): nargs()= 3; missing (i,j) = (0,1)
+> C[C>0] <- 21
+Note: method with signature 'CsparseMatrix#Matrix#missing#replValue' chosen for function '[<-',
+ target signature 'dgCMatrix#lgCMatrix#missing#numeric'.
+ "Matrix#lsparseMatrix#missing#replValue" would also be valid
+diagnosing replTmat(x,i,j,v): nargs()= 3; missing (i,j) = (0,1)
+> a. <- local({a <- as.matrix(C.); a[a>0] <- 21; a})
+> assert.EQ.mat(C, a.)
+> stopifnot(identical(C, as(T, "CsparseMatrix")))
+> 
+> ## used to fail
+> n <- 5 ## or much larger
+> sm <- new("dsTMatrix", i=1L, j=1L, Dim=as.integer(c(n,n)), x = 1)
+> (cm <- as(sm, "CsparseMatrix"))
+5 x 5 sparse Matrix of class "dsCMatrix"
+              
+[1,] . . . . .
+[2,] . 1 . . .
+[3,] . . . . .
+[4,] . . . . .
+[5,] . . . . .
+> sm[2,]
+[1] 0 1 0 0 0
+> stopifnot(sm[2,] == c(0:1, rep.int(0,ncol(sm)-2)),
++ 	  sm[2,] == cm[2,],
++ 	  sm[,3] == sm[3,],
++ 	  all(sm[,-(1:3)] == t(sm[-(1:3),])), # all(<lge.>)
++ 	  all(sm[,-(1:3)] == 0)
++ 	  )
+> showProc.time()
+Time elapsed:  0.136 0.001 0.138 
+> 
+> ##---  "nsparse*" sub-assignment :----------
+> M <- Matrix(c(1, rep(0,7), 1:4), 3,4)
+> N0 <- kronecker(M,M)
+> Nn <- as(N0, "nMatrix"); nn <- as(Nn,"matrix")
+> (Nn00 <- Nn0 <- Nn); nn00 <- nn0 <- nn
+9 x 16 sparse Matrix of class "ngTMatrix"
+                                     
+ [1,] | . . | . . . . . . . . | . . |
+ [2,] . . . | . . . . . . . . . . . |
+ [3,] . . | | . . . . . . . . . . | |
+ [4,] . . . . . . . . . . . . | . . |
+ [5,] . . . . . . . . . . . . . . . |
+ [6,] . . . . . . . . . . . . . . | |
+ [7,] . . . . . . . . | . . | | . . |
+ [8,] . . . . . . . . . . . | . . . |
+ [9,] . . . . . . . . . . | | . . | |
+> 
+> set.seed(1)
+> Nn0 <- Nn00; nn0 <- nn00
+> for(i in 1:(if(doExtras) 200 else 25)) {
++     Nn <- Nn0
++     nn <- nn0
++     i. <- getDuplIndex(nrow(N0), 6)
++     j. <- getDuplIndex(ncol(N0), 4)
++     vv <- sample(c(FALSE,TRUE),
++                  length(i.)*length(j.), replace=TRUE)
++     cat(",")
++     Nn[i., j.] <- vv
++     nn[i., j.] <- vv
++     assert.EQ.mat(Nn, nn)
++     if(!all(Nn == nn)) {
++         cat("i=",i,":\n i. <- "); dput(i.)
++         cat("j. <- "); dput(j.)
++         cat("which(vv): "); dput(which(vv))
++         cat("Difference matrix:\n")
++         show(drop0(Nn - nn))
++     }
++     cat("k")
++     ## sub-assign double precision to logical sparseMatrices: now *with* warning:
++     ##  {earlier: gave *no* warning}:
++     assertWarning(Nn[1:2,] <- -pi)
++     assertWarning(Nn[, 5] <- -pi)
++     assertWarning(Nn[2:4, 5:8] <- -pi)
++     stopifnotValid(Nn,"nsparseMatrix")
++     ##
++     cat(".")
++     if(i %% 10 == 0) cat("\n")
++     if(i == 100) {
++         Nn0 <- as(Nn0, "CsparseMatrix")
++         cat("Now: class", class(Nn0)," :\n~~~~~~~~~~~~~~~~~\n")
++     }
++ }
+,k.,k.,k.,k.,k.,k.,k.,k.,k.,k.
+,k.,k.,k.,k.,k.,k.,k.,k.,k.,k.
+,k.,k.,k.,k.,k.> showProc.time()
+Time elapsed:  0.153 0.001 0.154 
+> Nn <- Nn0
+> ## Check that  NA is interpreted as TRUE (with a warning), for "nsparseMatrix":
+> assertWarning(Nn[ii <-     3  ] <- NA); stopifnot(isValid(Nn,"nsparseMatrix"), Nn[ii])
+diagnosing replTmat(x,i,j,v): nargs()= 3; missing (i,j) = (0,1)
+> assertWarning(Nn[ii <-   22:24] <- NA); stopifnot(isValid(Nn,"nsparseMatrix"), Nn[ii])
+diagnosing replTmat(x,i,j,v): nargs()= 3; missing (i,j) = (0,1)
+> assertWarning(Nn[ii <- -(1:99)] <- NA); stopifnot(isValid(Nn,"nsparseMatrix"), Nn[ii])
+diagnosing replTmat(x,i,j,v): nargs()= 3; missing (i,j) = (0,1)
+> assertWarning(Nn[ii <- 3:4  ] <- c(0,NA))
+diagnosing replTmat(x,i,j,v): nargs()= 3; missing (i,j) = (0,1)
+> stopifnot(isValid(Nn,"nsparseMatrix"), Nn[ii] == 0:1)
+> assertWarning(Nn[ii <- 25:27] <- c(0,1,NA))
+diagnosing replTmat(x,i,j,v): nargs()= 3; missing (i,j) = (0,1)
+> stopifnot(isValid(Nn,"nsparseMatrix"), Nn[ii] == c(FALSE,TRUE,TRUE))
+> 
+> m0 <- Diagonal(5)
+> stopifnot(identical(m0[2,], m0[,2]),
++ 	  identical(m0[,1], c(1,0,0,0,0)))
+> ### Diagonal -- Sparse:
+> (m1 <- as(m0, "TsparseMatrix")) # dtTMatrix unitriangular
+5 x 5 sparse Matrix of class "dtTMatrix" (unitriangular)
+              
+[1,] I . . . .
+[2,] . I . . .
+[3,] . . I . .
+[4,] . . . I .
+[5,] . . . . I
+> (m2 <- as(m0, "CsparseMatrix")) # dtCMatrix unitriangular
+5 x 5 sparse Matrix of class "dtCMatrix" (unitriangular)
+              
+[1,] I . . . .
+[2,] . I . . .
+[3,] . . I . .
+[4,] . . . I .
+[5,] . . . . I
+> m1g <- as(m1, "generalMatrix")
+> tr1 <- as(m1, "denseMatrix") # dtrMatrix unitriangular
+> stopifnotValid(m1g, "dgTMatrix")
+> diag(tr1) <- 100
+> stopifnot(diag(tr1) == 100)# failed when 'diag<-' did not recycle
+> assert.EQ.mat(m2[1:3,],    diag(5)[1:3,])
+> assert.EQ.mat(m2[,c(4,1)], diag(5)[,c(4,1)])
+> stopifnot(identical(m2[1:3,], as(m1[1:3,], "CsparseMatrix")),
++           identical(uniqTsparse(m1[, c(4,2)]),
++                     uniqTsparse(as(m2[, c(4,2)], "TsparseMatrix")))
++           )## failed in 0.9975-11
+> 
+> (uTr <- new("dtTMatrix", Dim = c(3L,3L), diag="U"))
+3 x 3 sparse Matrix of class "dtTMatrix" (unitriangular)
+          
+[1,] I . .
+[2,] . I .
+[3,] . . I
+> uTr[1,] <- 0
+> assert.EQ.mat(uTr, cbind(0, rbind(0,diag(2))))
+> 
+> M <- m0; M[1,] <- 0
+> Z <- m0; Z[] <- 0; z <- array(0, dim(M))
+> stopifnot(identical(M, Diagonal(x=c(0, rep(1,4)))),
++           all(Z == 0), Qidentical(as(Z, "matrix"), z))
+> M <- m0; M[,3] <- 3 ; M ; stopifnot(is(M, "sparseMatrix"), M[,3] == 3)
+5 x 5 sparse Matrix of class "dgCMatrix"
+              
+[1,] 1 . 3 . .
+[2,] . 1 3 . .
+[3,] . . 3 . .
+[4,] . . 3 1 .
+[5,] . . 3 . 1
+> checkMatrix(M)
+Note: method with signature 'sparseMatrix#ldiMatrix' chosen for function '==',
+ target signature 'nsCMatrix#ldiMatrix'.
+ "nsparseMatrix#sparseMatrix", "nMatrix#lMatrix" would also be valid
+ norm(m [5 x 5]) : 1  I  F  M  ok
+ Summary:  ok
+as(., "nMatrix") giving full nonzero-pattern: ok
+2*m =?= m+m: identical
+m >= m for all: ok
+m < m for none: ok
+symmpart(m) + skewpart(m) == m: ok;  determinant(): ok
+> M <- m0; M[1:3, 3] <- 0 ;M
+5 x 5 diagonal matrix of class "ddiMatrix"
+     [,1] [,2] [,3] [,4] [,5]
+[1,]    1    .    .    .    .
+[2,]    .    1    .    .    .
+[3,]    .    .    0    .    .
+[4,]    .    .    .    1    .
+[5,]    .    .    .    .    1
+> T <- m0; T[1:3, 3] <- 10
+> stopifnot(identical(M, Diagonal(x=c(1,1, 0, 1,1))),
++           isValid(T, "triangularMatrix"), identical(T[,3], c(10,10,10,0,0)))
+> 
+> M <- m1; M[1,] <- 0 ; M ; assert.EQ.mat(M, diag(c(0,rep(1,4))), tol=0)
+5 x 5 sparse Matrix of class "dtTMatrix"
+              
+[1,] . . . . .
+[2,] . 1 . . .
+[3,] . . 1 . .
+[4,] . . . 1 .
+[5,] . . . . 1
+> M <- m1; M[,3] <- 3 ; stopifnot(is(M,"sparseMatrix"), M[,3] == 3)
+M[i,j] <- v :  coercing symmetric M[] into non-symmetric
+> Z <- m1; Z[] <- 0
+> checkMatrix(M)
+ norm(m [5 x 5]) : 1  I  F  M  ok
+ Summary:  ok
+as(., "nMatrix") giving full nonzero-pattern: ok
+2*m =?= m+m: Note: method with signature 'sparseMatrix#ldiMatrix' chosen for function '&',
+ target signature 'nsCMatrix#ldiMatrix'.
+ "nsparseMatrix#sparseMatrix", "nMatrix#lMatrix" would also be valid
+ok
+m >= m for all: ok
+m < m for none: ok
+symmpart(m) + skewpart(m) == m: ok;  determinant(): ok
+> M <- m1; M[1:3, 3] <- 0 ;M
+5 x 5 sparse Matrix of class "dtTMatrix"
+              
+[1,] 1 . . . .
+[2,] . 1 . . .
+[3,] . . . . .
+[4,] . . . 1 .
+[5,] . . . . 1
+> assert.EQ.mat(M, diag(c(1,1, 0, 1,1)), tol=0)
+> T <- m1; T[1:3, 3] <- 10; checkMatrix(T)
+ norm(m [5 x 5]) : 1  I  F  M  ok
+ Summary:  ok
+as(., "nMatrix") giving full nonzero-pattern: ok
+2*m =?= m+m: identical
+m >= m for all: ok
+m < m for none: ok
+symmpart(m) + skewpart(m) == m: ok;  determinant(): ok
+diagnosing replTmat(x,i,j,v): nargs()= 3; missing (i,j) = (0,1)
+'sub-optimal sparse 'x[i] <- v' assignment: Coercing class dtTMatrix to dgTMatrix
+as(<triangular (ge)matrix>, dtTMatrix): valid: TRUE 
+> stopifnot(is(T, "triangularMatrix"), identical(T[,3], c(10,10,10,0,0)),
++ 	  Qidentical(as(Z, "matrix"), z))
+> 
+> M <- m2; M[1,] <- 0 ; M ; assert.EQ.mat(M, diag(c(0,rep(1,4))), tol=0)
+5 x 5 sparse Matrix of class "dtCMatrix"
+              
+[1,] . . . . .
+[2,] . 1 . . .
+[3,] . . 1 . .
+[4,] . . . 1 .
+[5,] . . . . 1
+> M <- m2; M[,3] <- 3 ; stopifnot(is(M,"sparseMatrix"), M[,3] == 3)
+> checkMatrix(M)
+ norm(m [5 x 5]) : 1  I  F  M  ok
+ Summary:  ok
+as(., "nMatrix") giving full nonzero-pattern: ok
+2*m =?= m+m: identical
+m >= m for all: ok
+m < m for none: ok
+symmpart(m) + skewpart(m) == m: ok;  determinant(): ok
+> Z <- m2; Z[] <- 0
+> M <- m2; M[1:3, 3] <- 0 ;M
+5 x 5 sparse Matrix of class "dtCMatrix"
+              
+[1,] 1 . . . .
+[2,] . 1 . . .
+[3,] . . . . .
+[4,] . . . 1 .
+[5,] . . . . 1
+> assert.EQ.mat(M, diag(c(1,1, 0, 1,1)), tol=0)
+> T <- m2; T[1:3, 3] <- 10; checkMatrix(T)
+ norm(m [5 x 5]) : 1  I  F  M  ok
+ Summary:  ok
+as(., "nMatrix") giving full nonzero-pattern: ok
+2*m =?= m+m: identical
+m >= m for all: ok
+m < m for none: ok
+symmpart(m) + skewpart(m) == m: ok;  determinant(): ok
+diagnosing replTmat(x,i,j,v): nargs()= 3; missing (i,j) = (0,1)
+'sub-optimal sparse 'x[i] <- v' assignment: Coercing class dtTMatrix to dgTMatrix
+as(<triangular (ge)matrix>, dtCMatrix): valid: TRUE 
+> stopifnot(is(T, "dtCMatrix"), identical(T[,3], c(10,10,10,0,0)),
++ 	  Qidentical(as(Z, "matrix"), z))
+> showProc.time()
+Time elapsed:  0.541 0.002 0.545 
+> 
+> 
+> ## "Vector indices" -------------------
+> asLogical <- function(x) {
++     stopifnot(is.atomic(x))
++     storage.mode(x) <- "logical"
++     x
++ }
+> .iniDiag.example <- expression({
++     D <- Diagonal(6)
++     M <- as(D,"dgeMatrix")
++     m <- as(D,"matrix")
++     s <- as(D,"TsparseMatrix"); N <- as(s,"nMatrix")
++     S <- as(s,"CsparseMatrix"); C <- as(S,"nMatrix")
++ })
+> eval(.iniDiag.example)
+> i <- c(3,1,6); v <- c(10,15,20)
+> ## (logical,value) which both are recycled:
+> L <- c(TRUE, rep(FALSE,8)) ; z <- c(50,99)
+> 
+> ## vector subassignment, both with integer & logical
+> ## these now work correctly {though not very efficiently; hence warnings}
+> m[i] <- v # the role model: only first column is affected
+> M[i] <- v; assert.EQ.mat(M,m) # dge
+> D[i] <- v; assert.EQ.mat(D,m) # ddi -> dtT -> dgT
+diagnosing replTmat(x,i,j,v): nargs()= 3; missing (i,j) = (0,1)
+'sub-optimal sparse 'x[i] <- v' assignment: Coercing class dtTMatrix to dgTMatrix
+> s[i] <- v; assert.EQ.mat(s,m) # dtT -> dgT
+diagnosing replTmat(x,i,j,v): nargs()= 3; missing (i,j) = (0,1)
+'sub-optimal sparse 'x[i] <- v' assignment: Coercing class dtTMatrix to dgTMatrix
+> S[i] <- v; assert.EQ.mat(S,m); S # dtC -> dtT -> dgT -> dgC
+diagnosing replTmat(x,i,j,v): nargs()= 3; missing (i,j) = (0,1)
+'sub-optimal sparse 'x[i] <- v' assignment: Coercing class dtTMatrix to dgTMatrix
+6 x 6 sparse Matrix of class "dgCMatrix"
+                 
+[1,] 15 . . . . .
+[2,]  . 1 . . . .
+[3,] 10 . 1 . . .
+[4,]  . . . 1 . .
+[5,]  . . . . 1 .
+[6,] 20 . . . . 1
+> m.L <- asLogical(m)
+> C[i] <- v # - with a warning: C is nMatrix, v not T/F
+diagnosing replTmat(x,i,j,v): nargs()= 3; missing (i,j) = (0,1)
+'sub-optimal sparse 'x[i] <- v' assignment: Coercing class ntTMatrix to ngTMatrix
+Warning in `[<-`(`*tmp*`, i, value = c(10, 15, 20)) :
+  x[.] <- val: x is "ngTMatrix", val not in {TRUE, FALSE} is coerced.
+> assert.EQ.mat(C,m.L); validObject(C)
+[1] TRUE
+> N[i] <- v # - with a warning
+diagnosing replTmat(x,i,j,v): nargs()= 3; missing (i,j) = (0,1)
+'sub-optimal sparse 'x[i] <- v' assignment: Coercing class ntTMatrix to ngTMatrix
+Warning in `[<-`(`*tmp*`, i, value = c(10, 15, 20)) :
+  x[.] <- val: x is "ngTMatrix", val not in {TRUE, FALSE} is coerced.
+> assert.EQ.mat(N,m.L); validObject(N)
+[1] TRUE
+> stopifnot(Q.C.identical(D,s, checkClass=FALSE))
+> ## logical *vector* indexing
+> eval(.iniDiag.example)
+> m[L] <- z; m.L <- asLogical(m)
+> M[L] <- z; assert.EQ.mat(M,m)
+> D[L] <- z; assert.EQ.mat(D,m)
+diagnosing replTmat(x,i,j,v): nargs()= 3; missing (i,j) = (0,1)
+'sub-optimal sparse 'x[i] <- v' assignment: Coercing class dtTMatrix to dgTMatrix
+> s[L] <- z; assert.EQ.mat(s,m)
+diagnosing replTmat(x,i,j,v): nargs()= 3; missing (i,j) = (0,1)
+'sub-optimal sparse 'x[i] <- v' assignment: Coercing class dtTMatrix to dgTMatrix
+> S[L] <- z; assert.EQ.mat(S,m) ; S
+diagnosing replTmat(x,i,j,v): nargs()= 3; missing (i,j) = (0,1)
+'sub-optimal sparse 'x[i] <- v' assignment: Coercing class dtTMatrix to dgTMatrix
+6 x 6 sparse Matrix of class "dgCMatrix"
+                    
+[1,] 50  . . 50  . .
+[2,]  .  1 .  .  . .
+[3,]  .  . 1  .  . .
+[4,]  . 99 .  1 99 .
+[5,]  .  . .  .  1 .
+[6,]  .  . .  .  . 1
+> C[L] <- z; assert.EQ.mat(C,m.L) # with a good warning
+diagnosing replTmat(x,i,j,v): nargs()= 3; missing (i,j) = (0,1)
+'sub-optimal sparse 'x[i] <- v' assignment: Coercing class ntTMatrix to ngTMatrix
+Warning in `[<-`(`*tmp*`, i, value = c(50, 99)) :
+  x[.] <- val: x is "ngTMatrix", val not in {TRUE, FALSE} is coerced.
+> N[L] <- z; assert.EQ.mat(N,m.L)
+diagnosing replTmat(x,i,j,v): nargs()= 3; missing (i,j) = (0,1)
+'sub-optimal sparse 'x[i] <- v' assignment: Coercing class ntTMatrix to ngTMatrix
+Warning in `[<-`(`*tmp*`, L, value = c(50, 99)) :
+  x[.] <- val: x is "ngTMatrix", val not in {TRUE, FALSE} is coerced.
+> 
+> 
+> ## indexing [i]  vs  [i,] --- now ok
+> eval(.iniDiag.example)
+> stopifnot(identical5(m[i], M[i], D[i], s[i], S[i]), identical3(as.logical(m[i]), C[i], N[i]),
++           identical5(m[L], M[L], D[L], s[L], S[L]), identical3(as.logical(m[L]), C[L], N[L]))
+<sparse>[ <logic> ] : .M.sub.i.logical() maybe inefficient
+<sparse>[ <logic> ] : .M.sub.i.logical() maybe inefficient
+<sparse>[ <logic> ] : .M.sub.i.logical() maybe inefficient
+<sparse>[ <logic> ] : .M.sub.i.logical() maybe inefficient
+<sparse>[ <logic> ] : .M.sub.i.logical() maybe inefficient
+> ## bordercase ' drop = .' *vector* indexing {failed till 2009-04-..)
+> stopifnot(identical5(m[i,drop=FALSE], M[i,drop=FALSE], D[i,drop=FALSE],
++ 		     s[i,drop=FALSE], S[i,drop=FALSE]),
++ 	  identical3(as.logical(m[i,drop=FALSE]),
++ 		     C[i,drop=FALSE], N[i,drop=FALSE]))
+> stopifnot(identical5(m[L,drop=FALSE], M[L,drop=FALSE], D[L,drop=FALSE],
++ 		     s[L,drop=FALSE], S[L,drop=FALSE]),
++ 	  identical3(as.logical(m[L,drop=FALSE]),
++ 		     C[L,drop=FALSE], N[L,drop=FALSE]))
+> ## using L for row-indexing should give an error
+> assertError(m[L,]); assertError(m[L,, drop=FALSE])
+> ## these did not signal an error, upto (including) 0.999375-30:
+> assertError(s[L,]); assertError(s[L,, drop=FALSE])
+> assertError(S[L,]); assertError(S[L,, drop=FALSE])
+> assertError(N[L,]); assertError(N[L,, drop=FALSE])
+> 
+> ## row indexing:
+> assert.EQ.mat(D[i,], m[i,])
+> assert.EQ.mat(M[i,], m[i,])
+> assert.EQ.mat(s[i,], m[i,])
+> assert.EQ.mat(S[i,], m[i,])
+> assert.EQ.mat(C[i,], asLogical(m[i,]))
+> assert.EQ.mat(N[i,], asLogical(m[i,]))
+> ## column indexing:
+> assert.EQ.mat(D[,i], m[,i])
+> assert.EQ.mat(M[,i], m[,i])
+> assert.EQ.mat(s[,i], m[,i])
+> assert.EQ.mat(S[,i], m[,i])
+> assert.EQ.mat(C[,i], asLogical(m[,i]))
+> assert.EQ.mat(N[,i], asLogical(m[,i]))
+> 
+> 
+> ### --- negative indices ----------
+> 
+> ## 1) negative *vector* indexing
+> eval(.iniDiag.example)
+> i <- -(2:30)
+> stopifnot(identical5(m[i], M[i], D[i], s[i], S[i]),
++           identical3(as.logical(m[i]), C[i], N[i]))
+> ##  negative vector subassignment :
+> v <- seq_along(m[i])
+> m[i] <- v; m.L <- asLogical(m)
+> M[i] <- v; assert.EQ.mat(M,m) # dge
+> D[i] <- v; assert.EQ.mat(D,m) # ddi -> dtT -> dgT
+diagnosing replTmat(x,i,j,v): nargs()= 3; missing (i,j) = (0,1)
+'sub-optimal sparse 'x[i] <- v' assignment: Coercing class dtTMatrix to dgTMatrix
+> s[i] <- v; assert.EQ.mat(s,m) # dtT -> dgT
+diagnosing replTmat(x,i,j,v): nargs()= 3; missing (i,j) = (0,1)
+'sub-optimal sparse 'x[i] <- v' assignment: Coercing class dtTMatrix to dgTMatrix
+> S[i] <- v; assert.EQ.mat(S,m); S # dtC -> dtT -> dgT -> dgC
+diagnosing replTmat(x,i,j,v): nargs()= 3; missing (i,j) = (0,1)
+'sub-optimal sparse 'x[i] <- v' assignment: Coercing class dtTMatrix to dgTMatrix
+6 x 6 sparse Matrix of class "dgCMatrix"
+                
+[1,] 1 . . . . 2
+[2,] . 1 . . . 3
+[3,] . . 1 . . 4
+[4,] . . . 1 . 5
+[5,] . . . . 1 6
+[6,] . . . . . 7
+> N[i] <- v # with a good warning
+diagnosing replTmat(x,i,j,v): nargs()= 3; missing (i,j) = (0,1)
+'sub-optimal sparse 'x[i] <- v' assignment: Coercing class ntTMatrix to ngTMatrix
+Warning in `[<-`(`*tmp*`, i, value = 1:7) :
+  x[.] <- val: x is "ngTMatrix", val not in {TRUE, FALSE} is coerced.
+> assert.EQ.mat(N,m.L); N
+6 x 6 sparse Matrix of class "ngTMatrix"
+                
+[1,] | . . . . |
+[2,] . | . . . |
+[3,] . . | . . |
+[4,] . . . | . |
+[5,] . . . . | |
+[6,] . . . . . |
+> C[i] <- v #  ..  .  ..  warning
+diagnosing replTmat(x,i,j,v): nargs()= 3; missing (i,j) = (0,1)
+'sub-optimal sparse 'x[i] <- v' assignment: Coercing class ntTMatrix to ngTMatrix
+Warning in `[<-`(`*tmp*`, i, value = 1:7) :
+  x[.] <- val: x is "ngTMatrix", val not in {TRUE, FALSE} is coerced.
+> assert.EQ.mat(C,m.L); C #
+6 x 6 sparse Matrix of class "ngCMatrix"
+                
+[1,] | . . . . |
+[2,] . | . . . |
+[3,] . . | . . |
+[4,] . . . | . |
+[5,] . . . . | |
+[6,] . . . . . |
+> 
+> options(warn = 2) #---------------------# NO WARNINGS from here -----------------
+> 					# =====================
+> ## 2) negative [i,j] indices
+> mc <- mC[1:5, 1:7]
+> mt <- mT[1:5, 1:7]
+> ## sub matrix
+> assert.EQ.mat(mC[1:2, 0:3], mm[1:2, 0:3]) # test 0-index
+> stopifnot(identical(mc[-(3:5), 0:2], mC[1:2, 0:2]),
++           identical(mt[-(3:5), 0:2], mT[1:2, 0:2]),
++           identical(mC[2:3, 4],      mm[2:3, 4]))
+> assert.EQ.mat(mC[1:2,], mm[1:2,])
+> ## sub vector
+> stopifnot(identical4(mc[-(1:4), ], mC[5, 1:7],
++                      mt[-(1:4), ], mT[5, 1:7]))
+> stopifnot(identical4(mc[-(1:4), -(2:4)], mC[5, c(1,5:7)],
++                      mt[-(1:4), -(2:4)], mT[5, c(1,5:7)]))
+> 
+> ## mixing of negative and positive must give error
+> assertError(mT[-1:1,])
+> showProc.time()
+Time elapsed:  0.171 0 0.171 
+> 
+> ## Sub *Assignment* ---- now works (partially):
+> mt0 <- mt
+> nt <- as(mt, "nMatrix")
+> mt[1, 4] <- -99
+> mt[2:3, 1:6] <- 0
+> mt
+5 x 7 sparse Matrix of class "dgTMatrix"
+   c1 c2 c3  c4 c5 c6  c7
+r1  .  .  . -99  .  . 241
+r2  .  .  .   .  .  .   .
+r3  .  .  .   .  .  . 243
+r4  .  .  .   .  .  .   .
+r5  . 45  .   .  .  .   .
+> m2 <- mt+mt
+> m2[1,4] <- -200
+> m2[c(1,3), c(5:6,2)] <- 1:6
+> stopifnot(m2[1,4] == -200,
++           as.vector(m2[c(1,3), c(5:6,2)]) == 1:6)
+> mt[,3] <- 30
+> mt[2:3,] <- 250
+> mt[1:5 %% 2 == 1, 3] <- 0
+> mt[3:1, 1:7 > 5] <- 0
+> mt
+5 x 7 sparse Matrix of class "dgTMatrix"
+    c1  c2  c3  c4  c5 c6 c7
+r1   .   .   . -99   .  .  .
+r2 250 250 250 250 250  .  .
+r3 250 250   . 250 250  .  .
+r4   .   .  30   .   .  .  .
+r5   .  45   .   .   .  .  .
+> 
+> tt <- as(mt,"matrix")
+> ii <- c(0,2,5)
+> jj <- c(2:3,5)
+> tt[ii, jj] <- 1:6 # 0 is just "dropped"
+> mt[ii, jj] <- 1:6
+> assert.EQ.mat(mt, tt)
+> 
+> mt[1:5, 2:6]
+5 x 5 sparse Matrix of class "dgTMatrix"
+    c2 c3  c4  c5 c6
+r1   .  . -99   .  .
+r2   1  3 250   5  .
+r3 250  . 250 250  .
+r4   . 30   .   .  .
+r5   2  4   .   6  .
+> as((mt0 - mt)[1:5,], "dsparseMatrix")# [1,5] and lines 2:3
+5 x 7 sparse Matrix of class "dgCMatrix"
+     c1   c2  c3   c4   c5  c6  c7
+r1    .    .   .  220    .   . 241
+r2 -250   41  -3 -250   -5 202   .
+r3 -247 -250   . -250 -250   . 243
+r4    .    . -30    .    .   .   .
+r5    .   43  -4    .   -6   .   .
+> 
+> mt[c(2,4), ] <- 0; stopifnot(as(mt[c(2,4), ],"matrix") == 0)
+> mt[2:3, 4:7] <- 33
+> checkMatrix(mt)
+ norm(m [5 x 7]) : 1  I  F  M  ok
+ Summary:  ok
+as(., "nMatrix") giving full nonzero-pattern: ok
+2*m =?= m+m: ok
+m >= m for all: ok
+m < m for none: ok
+> mt
+5 x 7 sparse Matrix of class "dgTMatrix"
+    c1  c2 c3  c4 c5 c6 c7
+r1   .   .  . -99  .  .  .
+r2   .   .  .  33 33 33 33
+r3 250 250  .  33 33 33 33
+r4   .   .  .   .  .  .  .
+r5   .   2  4   .  6  .  .
+> 
+> mc[1,4] <- -99 ; stopifnot(mc[1,4] == -99)
+> mc[1,4] <-  00 ; stopifnot(mc[1,4] ==  00)
+> mc[1,4] <- -99 ; stopifnot(mc[1,4] == -99)
+> mc[1:2,4:3] <- 4:1; stopifnot(as.matrix(mc[1:2,4:3]) == 4:1)
+> 
+> mc[-1, 3] <- -2:1 # 0 should not be entered; 'value' recycled
+> mt[-1, 3] <- -2:1
+> stopifnot(mc@x != 0, mt@x != 0,
++ 	  mc[-1,3] == -2:1, mt[-1,3] == -2:1) ## failed earlier
+> 
+> mc0 <- mc
+> mt0 <- as(mc0, "TsparseMatrix")
+> m0  <- as(mc0, "matrix")
+> set.seed(1); options(Matrix.verbose = FALSE)
+> for(i in 1:(if(doExtras) 50 else 4)) {
++     mc <- mc0; mt <- mt0 ; m <- m0
++     ev <- 1:5 %% 2 == round(runif(1))# 0 or 1
++     j <- sample(ncol(mc), 1 + round(runif(1)))
++     nv <- rpois(sum(ev) * length(j), lambda = 1)
++     mc[ev, j] <- nv
++      m[ev, j] <- nv
++     mt[ev, j] <- nv
++     if(i %% 10 == 1) print(mc[ev,j, drop = FALSE])
++     stopifnot(as.vector(mc[ev, j]) == nv, ## failed earlier...
++               as.vector(mt[ev, j]) == nv)
++     validObject(mc) ; assert.EQ.mat(mc, m)
++     validObject(mt) ; assert.EQ.mat(mt, m)
++ }
+2 x 1 sparse Matrix of class "dgCMatrix"
+   c5
+r2  2
+r4  .
+> showProc.time()
+Time elapsed:  0.137 0 0.137 
+> options(Matrix.verbose = TRUE)
+> 
+> mc # no longer has non-structural zeros
+5 x 7 sparse Matrix of class "dgCMatrix"
+   c1 c2 c3 c4 c5  c6  c7
+r1  .  .  2  4  .   . 241
+r2  . 42  .  3  . 202   .
+r3  3  . -1  .  .   . 243
+r4  .  .  1  .  .   .   .
+r5  . 45  1  .  .   .   .
+> mc[ii, jj] <- 1:6
+> mc[c(2,5), c(3,5)] <- 3.2
+> checkMatrix(mc)
+ norm(m [5 x 7]) : 1  I  F  M  ok
+ Summary:  ok
+as(., "nMatrix") giving full nonzero-pattern: ok
+2*m =?= m+m: identical
+m >= m for all: ok
+m < m for none: ok
+> m. <- mc
+> mc[4,] <- 0
+> mc
+5 x 7 sparse Matrix of class "dgCMatrix"
+   c1 c2   c3 c4  c5  c6  c7
+r1  .  .  2.0  4 .     . 241
+r2  .  1  3.2  3 3.2 202   .
+r3  3  . -1.0  . .     . 243
+r4  .  .  .    . .     .   .
+r5  .  2  3.2  . 3.2   .   .
+> 
+> S <- as(Diagonal(5),"TsparseMatrix")
+> H <- Hilbert(9)
+> Hc <- as(round(H, 3), "dsCMatrix")# a sparse matrix with no 0 ...
+> (trH <- tril(Hc[1:5, 1:5]))
+5 x 5 sparse Matrix of class "dtCMatrix"
+                                  
+[1,] 1.000 .     .     .     .    
+[2,] 0.500 0.333 .     .     .    
+[3,] 0.333 0.250 0.200 .     .    
+[4,] 0.250 0.200 0.167 0.143 .    
+[5,] 0.200 0.167 0.143 0.125 0.111
+> stopifnot(is(trH, "triangularMatrix"), trH@uplo == "L",
++           is(S, "triangularMatrix"))
+> 
+> ## triangular assignment
+> ## the slick (but inefficient in case of sparse!) way to assign sub-diagonals:
+> ## equivalent to tmp <- `diag<-`(S[,-1], -2:1); S[,-1] <- tmp
+> ## which dispatches to (x="TsparseMatrix", i="missing",j="index", value="replValue")
+> diag(S[,-1]) <- -2:1 # used to give a wrong warning
+M[i,j] <- v :  coercing symmetric M[] into non-symmetric
+> S <- as(S,"triangularMatrix")
+> assert.EQ.mat(S, local({s <- diag(5); diag(s[,-1]) <- -2:1; s}))
+> 
+> trH[c(1:2,4), c(2:3,5)] <- 0 # gave an *error* upto Jan.2008
+> trH[ lower.tri(trH) ] <- 0   # ditto, because of callNextMethod()
+diagnosing replTmat(x,i,j,v): nargs()= 3; missing (i,j) = (0,1)
+'sub-optimal sparse 'x[i] <- v' assignment: Coercing class dtTMatrix to dgTMatrix
+> 
+> m <- Matrix(0+1:28, nrow = 4)
+> m[-3,c(2,4:5,7)] <- m[ 3, 1:4] <- m[1:3, 6] <- 0
+> mT <- as(m, "dgTMatrix")
+> stopifnot(identical(mT[lower.tri(mT)],
++                     m [lower.tri(m) ]))
+<sparse>[ <logic> ] : .M.sub.i.logical() maybe inefficient
+> lM <- upper.tri(mT, diag=TRUE)
+> mT[lM] <- 0
+diagnosing replTmat(x,i,j,v): nargs()= 3; missing (i,j) = (0,1)
+>  m[lM] <- 0
+> assert.EQ.mat(mT, as(m,"matrix"))
+> mT[lM] <- -1:0
+diagnosing replTmat(x,i,j,v): nargs()= 3; missing (i,j) = (0,1)
+>  m[lM] <- -1:0
+> assert.EQ.mat(mT, as(m,"matrix"))
+> (mT <- drop0(mT))
+4 x 7 sparse Matrix of class "dgCMatrix"
+                         
+[1,] -1  .  . -1 -1 -1 -1
+[2,]  2 -1 -1  .  .  .  .
+[3,]  .  .  . -1 -1 -1 -1
+[4,]  4  . 12  .  .  .  .
+> 
+> i <- c(1:2, 4, 6:7); j <- c(2:4,6)
+> H[i,j] <- 0
+> (H. <- round(as(H, "sparseMatrix"), 3)[ , 2:7])
+9 x 6 sparse Matrix of class "dgCMatrix"
+                                         
+ [1,] .     .     .     0.200 .     0.143
+ [2,] .     .     .     0.167 .     0.125
+ [3,] 0.250 0.200 0.167 0.143 0.125 0.111
+ [4,] .     .     .     0.125 .     0.100
+ [5,] 0.167 0.143 0.125 0.111 0.100 0.091
+ [6,] .     .     .     0.100 .     0.083
+ [7,] .     .     .     0.091 .     0.077
+ [8,] 0.111 0.100 0.091 0.083 0.077 0.071
+ [9,] 0.100 0.091 0.083 0.077 0.071 0.067
+> Hc. <- Hc
+> Hc.[i,j] <- 0 ## now "works", but setting "non-structural" 0s
+> stopifnot(as.matrix(Hc.[i,j]) == 0)
+> Hc.[, 1:6]
+9 x 6 sparse Matrix of class "dgCMatrix"
+                                         
+ [1,] 1.000 .     .     .     0.200 .    
+ [2,] 0.500 .     .     .     0.167 .    
+ [3,] 0.333 0.250 0.200 0.167 0.143 0.125
+ [4,] 0.250 .     .     .     0.125 .    
+ [5,] 0.200 0.167 0.143 0.125 0.111 0.100
+ [6,] 0.167 .     .     .     0.100 .    
+ [7,] 0.143 .     .     .     0.091 .    
+ [8,] 0.125 0.111 0.100 0.091 0.083 0.077
+ [9,] 0.111 0.100 0.091 0.083 0.077 0.071
+> 
+> ## an example that failed for a long time
+> sy3 <- new("dsyMatrix", Dim = as.integer(c(2, 2)), x = c(14, -1, 2, -7))
+> checkMatrix(dm <- kronecker(Diagonal(2), sy3))# now sparse with new kronecker
+Note: method with signature 'sparseMatrix#ANY' chosen for function 'kronecker',
+ target signature 'dtTMatrix#dsyMatrix'.
+ "ANY#Matrix" would also be valid
+ norm(m [4 x 4]) : 1  I  F  M  ok
+ Summary:  ok
+as(., "nMatrix") giving full nonzero-pattern: ok
+2*m =?= m+m: ok
+m >= m for all: ok
+m < m for none: ok
+symmpart(m) + skewpart(m) == m: ok;  determinant(): ok
+> dm <- Matrix(as.matrix(dm))# -> "dsyMatrix"
+> (s2 <- as(dm, "sparseMatrix"))
+4 x 4 sparse Matrix of class "dsCMatrix"
+                
+[1,] 14  2  .  .
+[2,]  2 -7  .  .
+[3,]  .  . 14  2
+[4,]  .  .  2 -7
+> checkMatrix(st <- as(s2, "TsparseMatrix"))
+ norm(m [4 x 4]) : 1  I  F  M  ok
+ Summary:  ok
+as(., "nMatrix") giving full nonzero-pattern: ok
+2*m =?= m+m: suboptimal 'Arith' implementation of  'dsC*  o  dsC*'
+identical
+m >= m for all: ok
+m < m for none: ok
+symmpart(m) + skewpart(m) == m: suboptimal 'Arith' implementation of  'dsC*  o  dsC*'
+ok;  determinant(): ok
+> stopifnot(is(s2, "symmetricMatrix"),
++ 	  is(st, "symmetricMatrix"))
+> checkMatrix(s.32  <- st[1:3,1:2]) ## 3 x 2 - and *not* dsTMatrix
+ norm(m [3 x 2]) : 1  I  F  M  ok
+ Summary:  ok
+as(., "nMatrix") giving full nonzero-pattern: ok
+2*m =?= m+m: ok
+m >= m for all: ok
+m < m for none: ok
+> checkMatrix(s2.32 <- s2[1:3,1:2])
+ norm(m [3 x 2]) : 1  I  F  M  ok
+ Summary:  ok
+as(., "nMatrix") giving full nonzero-pattern: ok
+2*m =?= m+m: identical
+m >= m for all: ok
+m < m for none: ok
+> I <- c(1,4:3)
+> stopifnot(is(s2.32, "generalMatrix"),
++           is(s.32,  "generalMatrix"),
++           identical(as.mat(s.32), as.mat(s2.32)),
++           identical3(dm[1:3,-1], asD(s2[1:3,-1]), asD(st[1:3,-1])),
++           identical4(2, dm[4,3], s2[4,3], st[4,3]),
++           identical3(diag(dm), diag(s2), diag(st)),
++           is((cI <- s2[I,I]), "dsCMatrix"),
++           is((tI <- st[I,I]), "dsTMatrix"),
++           identical4(as.mat(dm)[I,I], as.mat(dm[I,I]), as.mat(tI), as.mat(cI))
++           )
+> 
+> ## now sub-assign  and check for consistency
+> ## symmetric subassign should keep symmetry
+> st[I,I] <- 0; checkMatrix(st); stopifnot(is(st,"symmetricMatrix"))
+ norm(m [4 x 4]) : 1  I  F  M  ok
+ Summary:  ok
+as(., "nMatrix") giving full nonzero-pattern: ok
+2*m =?= m+m: suboptimal 'Arith' implementation of  'dsC*  o  dsC*'
+identical
+m >= m for all: ok
+m < m for none: ok
+symmpart(m) + skewpart(m) == m: suboptimal 'Arith' implementation of  'dsC*  o  dsC*'
+ok;  determinant(): ok
+> s2[I,I] <- 0; checkMatrix(s2); stopifnot(is(s2,"symmetricMatrix"))
+ norm(m [4 x 4]) : 1  I  F  M  ok
+ Summary:  ok
+as(., "nMatrix") giving full nonzero-pattern: ok
+2*m =?= m+m: suboptimal 'Arith' implementation of  'dsC*  o  dsC*'
+identical
+m >= m for all: ok
+m < m for none: ok
+symmpart(m) + skewpart(m) == m: suboptimal 'Arith' implementation of  'dsC*  o  dsC*'
+ok;  determinant(): ok
+> ##
+> m <- as.mat(st)
+>  m[2:1,2:1] <- 4:1
+> st[2:1,2:1] <- 4:1
+M[i,j] <- v :  coercing symmetric M[] into non-symmetric
+> s2[2:1,2:1] <- 4:1
+> stopifnot(identical(m, as.mat(st)),
++ 	  1:4 == as.vector(s2[1:2,1:2]),
++ 	  identical(m, as.mat(s2)))
+> 
+> ## now a slightly different situation for 's2' (had bug)
+> s2 <- as(dm, "sparseMatrix")
+> s2[I,I] <- 0; diag(s2)[2:3] <- -(1:2)
+> stopifnot(is(s2,"symmetricMatrix"), diag(s2) == c(0:-2,0))
+> t2 <- as(s2, "TsparseMatrix")
+> m <- as.mat(s2)
+> s2[2:1,2:1] <- 4:1
+> t2[2:1,2:1] <- 4:1
+M[i,j] <- v :  coercing symmetric M[] into non-symmetric
+>  m[2:1,2:1] <- 4:1
+> assert.EQ.mat(t2, m)
+> assert.EQ.mat(s2, m)
+> ## and the same (for a different s2 !)
+> s2[2:1,2:1] <- 4:1
+> t2[2:1,2:1] <- 4:1
+> assert.EQ.mat(t2, m)# ok
+> assert.EQ.mat(s2, m)# failed in 0.9975-8
+> showProc.time()
+Time elapsed:  0.543 0 0.543 
+> 
+> 
+> ## m[cbind(i,j)] <- value: (2-column matrix subassignment):
+> m.[ cbind(3:5, 1:3) ] <- 1:3
+> stopifnot(m.[3,1] == 1, m.[4,2] == 2)
+> nt. <- nt ; nt[rbind(2:3, 3:4, c(3,3))] <- FALSE
+> s. <- m. ; m.[cbind(3,4:6)] <- 0 ## assigning 0 where there *is* 0 ..
+> stopifnot(identical(nt.,nt),       ## should not have changed
++ 	  identical(s., m.))
+> x.x[ cbind(2:6, 2:6)] <- 12:16
+> stopifnot(isValid(x.x, "dsCMatrix"),
++ 	  12:16 == as.mat(x.x)[cbind(2:6, 2:6)])
+> (ne1 <- (mc - m.) != 0)
+5 x 7 sparse Matrix of class "lgCMatrix"
+   c1 c2 c3 c4 c5 c6 c7
+r1  .  .  :  :  .  .  :
+r2  .  :  :  :  :  :  .
+r3  |  .  :  .  .  .  :
+r4  .  |  |  .  .  .  .
+r5  .  :  |  .  :  .  .
+> stopifnot(identical(ne1, 0 != abs(mc - m.)))
+> (ge <- m. >= mc) # contains "=" -> result is dense
+5 x 7 Matrix of class "lgeMatrix"
+      c1   c2    c3   c4   c5   c6   c7
+r1  TRUE TRUE  TRUE TRUE TRUE TRUE TRUE
+r2  TRUE TRUE  TRUE TRUE TRUE TRUE TRUE
+r3 FALSE TRUE  TRUE TRUE TRUE TRUE TRUE
+r4  TRUE TRUE  TRUE TRUE TRUE TRUE TRUE
+r5  TRUE TRUE FALSE TRUE TRUE TRUE TRUE
+> ne. <- mc != m.  # was wrong (+ warning)
+> stopifnot(identical(!(m. < mc), m. >= mc),
++ 	  identical(m. < mc, as(!ge, "sparseMatrix")),
++ 	  identical(ne., drop0(ne1)))
+> 
+> d6 <- Diagonal(6)
+> ii <- c(1:2, 4:5)
+> d6[cbind(ii,ii)] <- 7*ii
+> stopifnot(is(d6, "ddiMatrix"), identical(d6, Diagonal(x=c(7*1:2,1,7*4:5,1))))
+> 
+> for(j in 3:6) { ## even and odd j used to behave differently
++     M <- Matrix(0, j,j); m <- matrix(0, j,j)
++     T  <- as(M, "TsparseMatrix")
++     TG <- as(T, "generalMatrix")
++     G <-  as(M, "generalMatrix")
++     id <- cbind(1:j,1:j)
++     i2 <- cbind(1:j,j:1)
++     m[id] <- 1:j
++     M[id] <- 1:j ; stopifnot(is(M,"symmetricMatrix"))
++     T[id] <- 1:j ; stopifnot(is(T,"symmetricMatrix"))
++     G[id] <- 1:j
++     TG[id]<- 1:j
++     m[i2] <- 10
++     M[i2] <- 10 ; stopifnot(is(M,"symmetricMatrix"))
++     T[i2] <- 10 ; stopifnot(is(T,"symmetricMatrix"))
++     G[i2] <- 10
++     TG[i2]<- 10
++     ##
++     assert.EQ.mat(M, m)
++     assert.EQ.mat(T, m)
++     assert.EQ.mat(G, m)
++     assert.EQ.mat(TG,m)
++ }
+> 
+> 
+> ## drop, triangular, ...
+> (M3 <- Matrix(upper.tri(matrix(, 3, 3)))) # ltC; indexing used to fail
+3 x 3 sparse Matrix of class "ltCMatrix"
+          
+[1,] . | |
+[2,] . . |
+[3,] . . .
+> T3 <- as(M3, "TsparseMatrix")
+> stopifnot(identical(drop(M3), M3),
++ 	  identical4(drop(M3[,2, drop = FALSE]), M3[,2, drop = TRUE],
++ 		     drop(T3[,2, drop = FALSE]), T3[,2, drop = TRUE]),
++ 	  is(T3, "triangularMatrix"),
++ 	  !is(T3[,2, drop=FALSE], "triangularMatrix")
++ 	  )
+> 
+> (T6 <- as(as(kronecker(Matrix(c(0,0,1,0),2,2), t(T3)), "lMatrix"),
++ 	  "triangularMatrix"))
+6 x 6 sparse Matrix of class "ltTMatrix"
+                
+[1,] . . . . . .
+[2,] . . . | . .
+[3,] . . . | | .
+[4,] . . . . . .
+[5,] . . . . . .
+[6,] . . . . . .
+> T6[1:4, -(1:3)] # failed (trying to coerce back to ltTMatrix)
+4 x 3 sparse Matrix of class "lgTMatrix"
+          
+[1,] . . .
+[2,] | . .
+[3,] | | .
+[4,] . . .
+> stopifnot(identical(T6[1:4, -(1:3)][2:3, -3],
++ 		    spMatrix(2,2, i=c(1,2,2), j=c(1,1,2), x=rep(TRUE,3))))
+> 
+> M <- Diagonal(4); M[1,2] <- 2
+> M. <- as(M, "CsparseMatrix")
+> (R <- as(M., "RsparseMatrix"))
+4 x 4 sparse Matrix of class "dtRMatrix" (unitriangular)
+            
+[1,] I 2 . .
+[2,] . I . .
+[3,] . . I .
+[4,] . . . I
+> (Ms <- symmpart(M.))
+4 x 4 sparse Matrix of class "dsCMatrix"
+            
+[1,] 1 1 . .
+[2,] 1 1 . .
+[3,] . . 1 .
+[4,] . . . 1
+> Rs <- as(Ms, "RsparseMatrix")
+> stopifnot(isValid(M, "triangularMatrix"),
++           isValid(M.,"triangularMatrix"),
++           isValid(Ms, "dsCMatrix"),
++           isValid(R,  "dtRMatrix"),
++           isValid(Rs, "dsRMatrix") )
+> stopifnot(dim(M[2:3, FALSE]) == c(2,0),
++           dim(R[2:3, FALSE]) == c(2,0),
++           identical(M [2:3,TRUE], M [2:3,]),
++           identical(M.[2:3,TRUE], M.[2:3,]),
++           identical(R [2:3,TRUE], R [2:3,]),
++           dim(R[FALSE, FALSE]) == c(0,0))
+> 
+> n <- 50000L
+> Lrg <- new("dgTMatrix", Dim = c(n,n))
+> diag(Lrg) <- 1:n
+> dLrg <- as(Lrg, "diagonalMatrix")
+> stopifnot(identical(Diagonal(x = 1:n), dLrg))
+> diag(dLrg) <- 1 + diag(dLrg)
+> Clrg <- as(Lrg,"CsparseMatrix")
+> Ctrg <- as(Clrg, "triangularMatrix")
+> diag(Ctrg) <- 1 + diag(Ctrg)
+> stopifnot(identical(Diagonal(x = 1+ 1:n), dLrg),
++           identical(Ctrg, as(dLrg,"CsparseMatrix")))
+> 
+> cc <- capture.output(show(dLrg))# show(<diag>) used to error for large n
+> showProc.time()
+Time elapsed:  0.29 0.007 0.297 
+> 
+> ## Large Matrix indexing / subassignment
+> ## ------------------------------------- (from ex. by Imran Rashid)
+> n <- 7000000
+> m <-  100000
+> nnz <- 20000
+> 
+> set.seed(12)
+> f <- sparseMatrix(i = sample(n, size=nnz, replace=TRUE),
++                   j = sample(m, size=nnz, replace=TRUE))
+> str(f)
+Formal class 'ngCMatrix' [package "Matrix"] with 5 slots
+  ..@ i       : int [1:20000] 6692226 4657233 4490801 3688935 344371 6380246 2797160 3584813 6553304 2327896 ...
+  ..@ p       : int [1:99993] 0 1 1 1 1 1 1 1 1 1 ...
+  ..@ Dim     : int [1:2] 6999863 99992
+  ..@ Dimnames:List of 2
+  .. ..$ : NULL
+  .. ..$ : NULL
+  ..@ factors : list()
+> dim(f) # 6999863 x 99992
+[1] 6999863   99992
+> prod(dim(f)) # 699930301096 == 699'930'301'096  (~ 700'000 millions)
+[1] 699930301096
+> str(thisCol <-  f[,5000])# logi [~ 7 mio....]
+ logi [1:6999863] FALSE FALSE FALSE FALSE FALSE FALSE ...
+> sv <- as(thisCol, "sparseVector")
+> str(sv) ## "empty" !
+Formal class 'lsparseVector' [package "Matrix"] with 3 slots
+  ..@ x     : logi(0) 
+  ..@ length: int 6999863
+  ..@ i     : int(0) 
+> validObject(spCol <- f[,5000, drop=FALSE])
+[1] TRUE
+> ##
+> ## *not* identical(): as(spCol, "sparseVector")@length is "double"prec:
+> stopifnot(all.equal(as(spCol, "sparseVector"),
++                     as(sv,   "nsparseVector"), tolerance=0))
+> if(doExtras) {#-----------------------------------------------------------------
++ f[,5762] <- thisCol # now "fine" <<<<<<<<<< FIXME uses LARGE objects -- slow --
++ ## is using  replCmat() in ../R/Csparse.R, then
++ ##           replTmat() in ../R/Tsparse.R
++ 
++ fx <- sparseMatrix(i = sample(n, size=nnz, replace=TRUE),
++                    j = sample(m, size=nnz, replace=TRUE),
++                    x = round(10*rnorm(nnz)))
++ class(fx)## dgCMatrix
++ fx[,6000] <- (tC <- rep(thisCol, length=nrow(fx)))# slow (as above)
++ thCol <- fx[,2000]
++ fx[,5762] <- thCol# slow
++ stopifnot(is(f, "ngCMatrix"), is(fx, "dgCMatrix"),
++ 	  identical(thisCol, f[,5762]),# perfect
++ 	  identical(as.logical(fx[,6000]), tC),
++ 	  identical(thCol,  fx[,5762]))
++ 
++ showProc.time()
++ ##
++ cat("checkMatrix() of all: \n---------\n")
++ Sys.setlocale("LC_COLLATE", "C")# to keep ls() reproducible
++ for(nm in ls()) if(is(.m <- get(nm), "Matrix")) {
++     cat(nm, "\n")
++     checkMatrix(.m, verbose = FALSE
++ 		, doDet = nm != "As" ## <- "As" almost singular <=> det() "ill posed"
++ 		)
++ }
++ showProc.time()
++ }#--------------end if(doExtras) -----------------------------------------------
+> 
+> ## Bugs found by Peter Ralph
+> n <- 17
+> x <- Matrix(0, n,n)
+> ## x must have at least three nonzero entries
+> x[1,1] <- x[2,1:2] <- 1.
+> x0 <- x <- as(x,"dgTMatrix")  # if x is dgCMatrix, no error
+> ##
+> z <- matrix(x) # <== not the "Matrix way":  a (n, 1) matrix
+> z[1] <- 0
+> 
+> x[1:n, 1:n] <- as(z, "sparseVector")
+> ## gave Error: ... invalid subscript type 'S4'
+> x2 <- x
+> 
+> dim(zC <- as(z, "dgCMatrix"))
+[1] 289   1
+> x <- x0
+> x[] <- zC # did fail, then gave warning.
+Note: method with signature 'sparseMatrix#missing#missing#ANY' chosen for function '[<-',
+ target signature 'dgTMatrix#missing#missing#dgCMatrix'.
+ "sparseMatrix#missing#ANY#sparseMatrix", "sparseMatrix#ANY#missing#sparseMatrix" would also be valid
+diagnosing replTmat(x,i,j,v): nargs()= 3; missing (i,j) = (0,1)
+> x1 <- x
+> ##
+> x <- x0
+> x[] <- as(zC, "sparseVector") # did fail, too
+diagnosing replTmat(x,i,j,v): nargs()= 3; missing (i,j) = (0,1)
+> x2 <- x
+> stopifnot(identical(x1,x2))
+> x <- as(x0, "matrix")
+> x[] <- z
+> assert.EQ.mat(x1, x)
+> 
+> i <- 4:7
+> x1 <- x0; x1[cbind(i, i+10)] <- i^2
+> x2 <- x0; x2[cbind(i, i+10)] <- as.matrix(i^2)
+> ## failed: nargs() = 4 ... please report
+> 
+> stopifnot(isValid(x1, "dgTMatrix"), identical(x1, x2))
+> 
+> 
+> showProc.time()
+Time elapsed:  0.577 0.072 0.65 
+> 
+> if(!interactive()) warnings()
+NULL
+> 
+> proc.time()
+   user  system elapsed 
+  4.262   0.254   4.594 
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/tests/group-methods.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/tests/group-methods.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/tests/group-methods.R	(revision 2477)
@@ -0,0 +1,352 @@
+### Testing the group methods  --- some also happens in ./Class+Meth.R
+
+library(Matrix)
+source(system.file("test-tools.R", package = "Matrix"))# identical3() etc
+cat("doExtras:",doExtras,"\n")
+
+set.seed(2001)
+
+mm <- Matrix(rnorm(50 * 7), nc = 7)
+xpx <- crossprod(mm)# -> "factors" in mm !
+round(xpx, 3) # works via "Math2"
+
+y <- rnorm(nrow(mm))
+xpy <- crossprod(mm, y)
+res <- solve(xpx, xpy)
+signif(res, 4) # 7 x 1 Matrix
+
+stopifnot(all(signif(res) == signif(res, 6)),
+	  all(round (xpx) == round (xpx, 0)))
+
+## exp(): component wise
+signif(dd <- (expm(xpx) - exp(xpx)) / 1e34, 3)# 7 x 7
+
+validObject(xpx)
+validObject(xpy)
+validObject(dd)
+
+## "Math" also, for log() and [l]gamma() which need special treatment
+stopifnot(identical(exp(res)@x, exp(res@x)),
+          identical(log(abs(res))@x, log(abs((res@x)))),
+          identical(lgamma(res)@x, lgamma(res@x)))
+
+
+###--- sparse matrices ---------
+
+m <- Matrix(c(0,0,2:0), 3,5)
+(mC <- as(m, "dgCMatrix"))
+sm <- sin(mC)
+stopifnot(class(sm) == class(mC), class(mC) == class(mC^2),
+          dim(sm) == dim(mC),
+          class(0 + 100*mC) == class(mC),
+          all.equal(0.1 * ((0 + 100*mC)/10), mC),
+          all.equal(sqrt(mC ^ 2), mC),
+          all.equal(m^m, mC^mC),
+          identical(mC^2, mC * mC),
+          identical(mC*2, mC + mC)
+          )
+
+x <- Matrix(rbind(0,cbind(0, 0:3,0,0,-1:2,0),0))
+x # sparse
+(x2 <- x + 10*t(x))
+stopifnot(is(x2, "sparseMatrix"),
+          identical(x2, t(x*10 + t(x))),
+	  identical(x, as((x + 10) - 10, class(x))))
+
+(px <- Matrix(x^x - 1))#-> sparse again
+stopifnot(px@i == c(3,4,1,4),
+          px@x == c(3,26,-2,3))
+
+## From: "Florent D." .. Thu, 23 Feb 2012 -- bug report
+##---> MM:  Make a regression test:
+tst <- function(n, i = 1) {
+    stopifnot(i >= 1, n >= i)
+    D <- .sparseDiagonal(n)
+    ee <- numeric(n) ; ee[i] <- 1
+    stopifnot(all(D - ee == diag(n) - ee),
+              all(D * ee == diag(n) * ee),
+              all(ee - D == ee - diag(n)),
+              {C <- (ee / D == ee / diag(n)); all(is.na(C) | C)},
+              TRUE)
+}
+nn <- if(doExtras) 27 else 7
+tmp <- sapply(1:nn, tst) # failed in Matrix 1.0-4
+i <- sapply(1:nn, function(i) sample(i,1))
+tmp <- mapply(tst, n= 1:nn, i= i)# failed too
+
+(lsy <- new("lsyMatrix", Dim = c(2L,2L), x=c(TRUE,FALSE,TRUE,TRUE)))
+nsy <- as(lsy, "nMatrix")
+(t1  <- new("ltrMatrix", Dim = c(1L,1L), x = TRUE))
+(t2  <- new("ltrMatrix", Dim = c(2L,2L), x = rep(TRUE,4)))
+stopifnot(all(lsy), # failed in Matrix 1.0-4
+          all(nsy), #  dito
+	  all(t1),  #   "
+          ## ok previously (all following):
+          !all(t2),
+	  all(sqrt(lsy) == 1))
+dsy <- lsy+1
+
+showProc.time()
+set.seed(111)
+local({
+    for(i in 1:(if(doExtras) 20 else 5)) {
+        M <- rspMat(n=1000, 200, density = 1/20)
+        v <- rnorm(ncol(M))
+        m <- as(M,"matrix")
+        stopifnot(all(t(M)/v == t(m)/v))
+        cat(".")
+    }});cat("\n")
+
+## Now just once, with a large such matrix:
+local({
+    n <- 100000; m <- 30000
+    AA <- rspMat(n, m, density = 1/20000)
+    v <- rnorm(m)
+    st <- system.time({
+        BB <- t(AA)/v # should happen *fast*
+        stopifnot(dim(BB) == c(m,n), is(BB, "sparseMatrix"))
+    })
+    str(BB)
+    print(st)
+    if(Sys.info()[["sysname"]] == "Linux") {
+        mips <- as.numeric(sub(".*: *", '',
+                               grep("bogomips", readLines("/proc/cpuinfo"),
+                                    value=TRUE)[[1]]))
+        stopifnot(st[1] < 1000/mips)# ensure there was no gross inefficiency
+    }
+})
+
+
+###----- Compare methods ---> logical Matrices ------------
+l3 <- upper.tri(matrix(, 3, 3))
+(ll3 <- Matrix(l3))
+dt3 <- (99* Diagonal(3) + (10 * ll3 + Diagonal(3)))/10
+(dsc <- crossprod(ll3))
+stopifnot(identical(ll3, t(t(ll3))),
+	  identical(dsc, t(t(dsc))))
+stopifnotValid(ll3, "ltCMatrix")
+stopifnotValid(dsc, "dsCMatrix")
+stopifnotValid(dsc + 3 * Diagonal(nrow(dsc)), "dsCMatrix")
+stopifnotValid(dt3, "triangularMatrix")    # remained triangular
+stopifnotValid(dt3 > 0, "triangularMatrix")# ditto
+
+
+(lm1 <- dsc >= 1) # now ok
+(lm2 <- dsc == 1) # now ok
+nm1 <- as(lm1, "nMatrix")
+(nm2 <- as(lm2, "nMatrix"))
+
+stopifnot(validObject(lm1), validObject(lm2),
+          validObject(nm1), validObject(nm2),
+          identical(dsc, as(dsc * as(lm1, "dMatrix"), "dsCMatrix")))
+
+crossprod(lm1) # lm1: "lsC*"
+cnm1 <- crossprod(nm1)
+stopifnot(is(cnm1, "symmetricMatrix"), ## whereas the %*% is not:
+	  Q.eq(cnm1, nm1 %*% nm1))
+dn1 <- as(nm1, "denseMatrix")
+stopifnot(all(dn1 == nm1))
+
+dsc[2,3] <- NA ## now has an NA (and no longer is symmetric)
+##          ----- and "everything" is different
+## also add "non-structural 0":
+dsc@x[1] <- 0
+dsc
+dsc/ 5
+dsc + dsc
+dsc - dsc
+dsc + 1 # -> no longer sparse
+Tsc <- as(dsc, "TsparseMatrix")
+dsc. <- drop0(dsc)
+stopifnot(identical(dsc., Matrix((dsc + 1) -1)),
+	  identical(as(-Tsc,"CsparseMatrix"), (-1) * Tsc),
+	  identical(-dsc., (-1) * dsc.),
+	  identical3(-Diagonal(3), Diagonal(3, -1), (-1) * Diagonal(3)),
+	  identical(dsc., Matrix((Tsc + 1) -1)), # ok (exact arithmetic)
+	  Q.eq(0 != dsc, dsc != Matrix(0, 3, 3)),
+	  Q.eq(0 != dsc, dsc != c(0,0)) # with a warning ("not multiple ..")
+	  )
+str(lm1 <- dsc >= 1) # now ok (NA in proper place, however:
+lm1 ## NA used to print as ' ' , now 'N'
+(lm2 <- dsc == 1)# ditto
+stopifnot(identical(crossprod(lm1),# "lgC": here works!
+                    crossprod(as(lm1, "dMatrix"))),
+          identical(lm2, lm1 & lm2),
+	  identical(lm1, lm1 | lm2))
+
+ddsc <- kronecker(Diagonal(7), dsc)
+isValid(ddv <- rowSums(ddsc, sparse=TRUE), "sparseVector")
+sv <- colSums(kC <- kronecker(mC,kronecker(mC,mC)), sparse=TRUE)
+EQ <- ddv == rowSums(ddsc)
+na.ddv <- is.na(ddv)
+sM <- Matrix(pmax(0, round(rnorm(50*15, -1.5), 2)), 50,15)
+stopifnot(sv == colSums(kC), is.na(as.vector(ddv)) == na.ddv,
+          isValid(sM/(-7:7), "CsparseMatrix"),
+	  all(EQ | na.ddv))
+
+## Subclasses (!)
+setClass("m.spV", contains = "dsparseVector")
+(m.ddv <- as(ddv, "m.spV"))
+stopifnot(all.equal(m.ddv, ddv))# failed
+setClass("m.dgC", contains = "dgCMatrix")
+(m.mC <- as(mC, "m.dgC"))
+stopifnot(all(m.mC == mC))
+
+## Just for print "show":
+z <- round(rnorm(77), 2)
+z[sample(77,10)] <- NA
+(D <- Matrix(z, 7)) # dense
+z[sample(77,15)] <- 0
+(D <- Matrix(z, 7)) # sparse
+abs(D) >= 0.5       # logical sparse
+
+
+## For the checks below, remove some and add a few more objects:
+rm(list= ls(pat="^.[mMC]?$"))
+D3 <- Diagonal(x=4:2); L7 <- Diagonal(7) > 0
+T3 <- Diagonal(3) > 0; stopifnot(T3@diag == "U") # "uni-diagonal"
+validObject(xpp <- pack(round(xpx,2)))
+validObject(dtp <- pack(as(dt3, "denseMatrix")))
+lsp <- xpp > 0
+isValid(lsC <- as(lsp, "sparseMatrix"), "lsCMatrix")
+
+showProc.time()
+if(!doExtras && !interactive()) q("no") ## (saving testing time)
+
+### Systematically look at all "Ops" group generics for "all" Matrix classes
+### -------------- Main issue: Detect infinite recursion problems
+cl <- sapply(ls(), function(.) class(get(.)))
+Mcl <- cl[vapply(cl, extends, "Matrix", FUN.VALUE=NA) |
+          vapply(cl, extends, "sparseVector", FUN.VALUE=NA)]
+table(Mcl)
+## choose *one* of each class:
+## M.objs <- names(Mcl[!duplicated(Mcl)])
+## choose all
+M.objs <- names(Mcl) # == the ls() from above
+Mat.objs <- M.objs[vapply(M.objs, function(nm) is(get(nm), "Matrix"), NA)]
+MatDims <- t(vapply(Mat.objs, function(nm) dim(get(nm)), 0:1))
+noquote(cbind(Mcl[Mat.objs], format(MatDims)))
+mDims <- MatDims %*% (d.sig <- c(1, 1000)) # "dim-signature" to match against
+
+m2num <- function(m) { if(is.integer(m)) storage.mode(m) <- "double" ; m }
+M.knd <- Matrix:::.M.kind
+cat("Checking all Ops group generics for a set of arguments:\n",
+    "-------------------------------------------------------\n", sep='')
+options(warn = 2)#, error=recover)
+for(gr in getGroupMembers("Ops")) {
+  cat(gr,"\n",paste(rep.int("=",nchar(gr)),collapse=""),"\n", sep='')
+  for(f in getGroupMembers(gr)) {
+    cat(sprintf("%9s :\n%9s\n", paste0('"',f,'"'), "--"))
+    for(nm in M.objs) {
+      if(doExtras) cat("  '",nm,"' ", sep="")
+      M <- get(nm, inherits=FALSE)
+      n.m <- NROW(M)
+      cat("o")
+      for(x in list(TRUE, -3.2, 0L, seq_len(n.m))) {
+        cat(".")
+        validObject(r1 <- do.call(f, list(M,x)))
+        validObject(r2 <- do.call(f, list(x,M)))
+        stopifnot(dim(r1) == dim(M), dim(r2) == dim(M))
+      }
+      ## M  o  <sparseVector>
+      x <- numeric(n.m)
+      x[c(1,length(x))] <- 1:2
+      sv <- as(x, "sparseVector")
+      cat("s.")
+      validObject(r3 <- do.call(f, list(M, sv)))
+      stopifnot(dim(r3) == dim(M))
+      if(doExtras && is(M, "Matrix")) { ## M o <Matrix>
+        d <- dim(M)
+        ds <- sum(d * d.sig)         # signature .. match with all other sigs
+        match. <- ds == mDims        # (matches at least itself)
+        cat("\nM o M:")
+        for(oM in Mat.objs[match.]) {
+          M2 <- get(oM)
+          ##   R4 :=  M  f  M2
+          validObject(R4 <- do.call(f, list(M, M2)))
+          cat(".")
+          for(M. in list(as.mat(M), M)) { ## two cases ..
+            r4 <- m2num(as.mat(do.call(f, list(M., as.mat(M2)))))
+            cat(",")
+            if(!identical(r4, as.mat(R4))) {
+              cat(sprintf("\n %s %s %s not identical: r4 \\ R4:\n",
+                          nm, f, oM))
+              print(r4); print(R4)
+              C1 <- (eq <- R4 == r4) | ((nr4 <- is.na(r4)) & !is.finite(R4))
+              if(isTRUE(all(C1)) && (k1 <- M.knd(M)) != "d" && (k2 <- M.knd(M2)) != "d")
+                cat(" --> ",k1,"",f,"", k2,
+                    " (ok): only difference is NA (matrix) and NaN/Inf (Matrix)\n")
+              else if(isTRUE(all(eq | (nr4 & Matrix:::is0(R4)))))
+                cat(" --> 'ok': only difference is 'NA' (matrix) and 0 (Matrix)\n")
+              else stop("differing \"too much\"")
+            }
+          }
+          cat("i")
+        }
+      }
+    }
+    cat("\n")
+  }
+}
+showProc.time()
+
+options(warn = 0)# was 2
+mStop <- function(...) stop(..., call. = FALSE)
+##
+cat("Checking the Math (+ Math2) group generics for a set of arguments:\n",
+    "------------ ==== ------------------------------------------------\n", sep='')
+doStop <- function() mStop("**Math: ", f,"(<",class(M),">) of 'wrong' class ", dQuote(class(R)))
+mM  <- getGroupMembers("Math")
+mM2 <- getGroupMembers("Math2")
+(mVec <- grep("^cum", mM, value=TRUE)) ## <<- are special: return *vector* for matrix input
+for(f in c(mM, mM2)) {
+  cat(sprintf("%-9s :\n %-7s\n", paste0('"',f,'"'), paste(rep("-", nchar(f)), collapse="")))
+  givesVec <- f %in% mVec
+  fn <- get(f)
+  if(f %in% mM2) { fn0 <- fn ; fn <- function(x) fn0(x, digits=3) }
+  for(nm in M.objs) {
+    M <- get(nm, inherits=FALSE)
+    is.m <- length(dim(M)) == 2
+    cat("  '",nm,"':", if(is.m) "m" else "v", sep="")
+    R <- fn(M)
+    r <- fn(m <- if(is.m) as.mat(M) else as.vector(M))
+    stopifnot(identical(dim(R), dim(r)))
+    if(givesVec || !is.m) {
+        assert.EQ(R, r)
+    } else { ## (almost always:) matrix result
+        assert.EQ.mat(R, r)
+	## check preservation of properties, notably super class
+	if(prod(dim(M)) > 1 && is(M, "diagonalMatrix"  ) && isDiagonal  (R) && !is(R, "diagonalMatrix"  )) doStop()
+	if(prod(dim(M)) > 1 && is(M, "triangularMatrix") && (iT <- isTriangular(R)) && attr(iT, "kind") == M@uplo &&
+           !is(R, "triangularMatrix")) doStop()
+    }
+  }
+  cat("\n")
+}
+showProc.time()
+
+##
+cat("Checking the Summary group generics for a set of arguments:\n",
+    "------------ ======= ------------------------------------------------\n", sep='')
+doStop <- function()
+    warning("**Summary: ", f,"(<",class(M),">) is not all.equal(..)", immediate.=TRUE)
+for(f in getGroupMembers("Summary")) {
+  cat(sprintf("%-9s :\n %-7s\n", paste0('"',f,'"'), paste(rep("-", nchar(f)), collapse="")))
+  givesVec <- f %in% mVec
+  fn <- get(f)
+  if(f %in% mM2) { fn0 <- fn ; fn <- function(x) fn0(x, digits=3) }
+  for(nm in M.objs) {
+    M <- get(nm, inherits=FALSE)
+    is.m <- length(dim(M)) == 2
+    cat("  '",nm,"':", if(is.m) "m" else "v", sep="")
+    R <- fn(M)
+    r <- fn(m <- if(is.m) as.mat(M) else as.vector(M))
+    stopifnot(identical(dim(R), dim(r)))
+    assert.EQ(R, r)
+  }
+  cat("\n")
+  ## if(length(warnings())) print(warnings())
+}
+
+
+cat('Time elapsed: ', proc.time(),'\n') # for ``statistical reasons''
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/tests/matr-exp.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/tests/matr-exp.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/tests/matr-exp.R	(revision 2477)
@@ -0,0 +1,79 @@
+library(Matrix)
+
+## Matrix Exponential
+
+source(system.file("test-tools.R", package = "Matrix"))
+
+## e ^ 0 = 1  - for matrices:
+assert.EQ.mat(expm(Matrix(0, 3,3)), diag(3), tol = 0)# exactly
+## e ^ diag(.) = diag(e ^ .):
+assert.EQ.mat(expm(as(diag(-1:4), "dgeMatrix")), diag(exp(-1:4)))
+set.seed(1)
+rE <- replicate(100,
+            { x <- rlnorm(12)
+              relErr(as(expm(as(diag(x), "dgeMatrix")),
+                        "matrix"),
+                     diag(exp(x))) })
+stopifnot(mean(rE) < 1e-15,
+          max(rE)  < 1e-14)
+summary(rE)
+
+## Some small matrices
+
+m1 <- Matrix(c(1,0,1,1), nc = 2)
+e1 <- expm(m1)
+assert.EQ.mat(e1, cbind(c(exp(1),0), exp(1)))
+
+m2 <- Matrix(c(-49, -64, 24, 31), nc = 2)
+e2 <- expm(m2)
+## The true matrix exponential is 'te2':
+e_1 <-  exp(-1)
+e_17 <- exp(-17)
+te2 <- rbind(c(3*e_17 - 2*e_1, -3/2*e_17 + 3/2*e_1),
+             c(4*e_17 - 4*e_1, -2  *e_17 + 3  *e_1))
+assert.EQ.mat(e2, te2, tol = 1e-13)
+## See the (average relative) difference:
+all.equal(as(e2,"matrix"), te2, tolerance = 0) # 1.48e-14 on "lynne"
+
+## The ``surprising identity''      det(exp(A)) == exp( tr(A) )
+## or                           log det(exp(A)) == tr(A) :
+stopifnot(all.equal(c(determinant(e2)$modulus), sum(diag(m2))))
+
+## a very simple nilpotent one:
+(m3 <- Matrix(cbind(0,rbind(6*diag(3),0))))# sparse
+stopifnot(all(m3 %*% m3 %*% m3 %*% m3 == 0))# <-- m3 "^" 4 == 0
+e3 <- expm(m3)
+E3 <- expm(Matrix(m3, sparse=FALSE))
+s3 <- symmpart(m3) # dsCMatrix
+es3 <- expm(s3)
+e3. <- rbind(c(1,6,18,36),
+	     c(0,1, 6,18),
+	     c(0,0, 1, 6),
+	     c(0,0, 0, 1))
+stopifnot(is(e3, "triangularMatrix"),
+	  is(es3, "symmetricMatrix"),
+	  identical(e3, E3),
+	  identical(as.mat(e3), e3.),
+	  all.equal(as(es3,"generalMatrix"),
+		    expm(as(s3,"generalMatrix")))
+	  )
+
+
+## This used to be wrong {bug in octave-origin code}:
+M6 <- Matrix(c(0, -2, 0, 0, 0, 0,
+              10, 0, 0, 0,10,-2,
+              0,  0, 0, 0,-2, 0,
+              0, 10,-2,-2,-2,10,
+              0,  0, 0, 0, 0, 0,
+              10, 0, 0, 0, 0, 0), 6, 6)
+
+exp.M6 <- expm(M6)
+as(exp.M6, "sparseMatrix")# prints a bit more nicely
+stopifnot(all.equal(t(exp.M6),
+		    expm(t(M6)), tol = 1e-12),
+          all.equal(exp.M6[,3], c(0,0,1,0,-2,0), tolerance = 1e-12),
+          all.equal(exp.M6[,5], c(0,0,0,0, 1,0), tolerance = 1e-12),
+          all(exp.M6[3:4, c(1:2,5:6)] == 0)
+          )
+
+cat('Time elapsed: ', proc.time(),'\n') # for ``statistical reasons''
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/tests/Class+Meth.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/tests/Class+Meth.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/tests/Class+Meth.R	(revision 2477)
@@ -0,0 +1,371 @@
+library(Matrix)
+source(system.file("test-tools.R", package = "Matrix"))# identical3(),
+                                        # further  checkMatrix(), etc
+if(interactive()) options(error = recover)
+options(warn=1)# show as they happen
+cat("doExtras:",doExtras,"\n")
+
+no.Mcl <- function(cl) ## TRUE if MatrixClass() returns empty, i
+    identical(Matrix:::MatrixClass(cl), character(0))
+
+setClass("myDGC", contains = "dgCMatrix")
+M <- new("myDGC", as(Matrix(c(-2:4, rep(0,9)), 4), "CsparseMatrix"))
+M
+stopifnot(M[-4,2] == 2:4,
+	  Matrix:::MatrixClass("myDGC"    ) == "dgCMatrix",
+	  Matrix:::MatrixClass("Cholesky" ) == "dtrMatrix",
+	  Matrix:::MatrixClass("pCholesky") == "dtpMatrix",
+	  Matrix:::MatrixClass("corMatrix") == "dpoMatrix",
+	  no.Mcl("pMatrix"),
+	  no.Mcl("indMatrix"))
+
+## FIXME:  Export  MatrixClass !!
+
+## [matrix-Bugs][6182] Coercion method doesn't work on child class
+## Bugs item #6182, at 2015-09-01 17:49 by Vitalie Spinu
+setClass("A", contains = "ngCMatrix")
+ngc <- as(diag(3), "ngCMatrix")
+validObject(dd <- as(ngc, "dgCMatrix")) # fine
+A. <- as(ngc, "A")
+stopifnot(identical(as(A., "dgCMatrix"), dd))
+## as(.) coercion failed in Matrix <= 1.2.3
+stopifnot(all( abs(A.)# failed too
+              == diag(3)))
+
+setClass("posDef", contains = "dspMatrix")
+N <- as(as(crossprod(M) + Diagonal(4), "denseMatrix"),"dspMatrix")
+(N <- new("posDef", N))
+stopifnot(is(N[1:2, 1:2], "symmetricMatrix"))
+
+#### Automatically display the class inheritance structure
+#### possibly augmented with methods
+
+allCl <- getClasses("package:Matrix")
+cat("actual and virtual classes:\n")
+tt <- table( isVirt <- sapply(allCl, isVirtualClass) )
+names(tt) <- c('"actual"', "virtual")
+tt
+## The "actual" Matrix classes:
+aCl <- allCl[!isVirt]
+(aMcl <- aCl[grep("Matrix$", aCl)]) # length 48
+aMc2 <-  aCl[sapply(aCl, extends, class2 = "Matrix")]
+stopifnot(all( aMcl %in% aMc2 ))
+aMc2[!(aMc2 %in% aMcl)] ## only 4 : p?Cholesky & p?BunchKaufman
+
+## Really nice would be to construct an inheritance graph and display
+## it.  Following things are computational variations on the theme..
+
+## We use a version of  canCoerce()  that works with two *classes* instead of
+## canCoerce <- function (object, Class)
+classCanCoerce <- function (class1, class2)
+{
+    extends(class1, class2) ||
+    !is.null(selectMethod("coerce", optional = TRUE,
+			  signature    = c(from = class1, to = class2),
+			  useInherited = c(from = TRUE,	  to = FALSE)))
+}
+.dq <- function(ch) paste0('"', ch, '"')
+.subclasses <- function(cnam) {
+    cd <- getClass(cnam)
+    unique(c(cd@className, unlist(lapply(names(cd@subclasses), .subclasses))))
+}
+for(n in allCl) {
+    if(isVirtualClass(n))
+        cat("Virtual class", .dq(n),"\n")
+    else {
+        cat("\"Actual\" class", .dq(n),":\n")
+        x <- new(n)
+        if(doExtras) for(m in allCl)
+            if(classCanCoerce(n,m)) {
+                ext <- extends(n, m)
+                if(ext) {
+                    cat(sprintf("   extends  %20s %20s \n", "", .dq(m)))
+                } else {
+                    cat(sprintf("   can coerce: %20s -> %20s: ", .dq(n), .dq(m)))
+                    tt <- try(as(x, m), silent = TRUE)
+                    if(inherits(tt, "try-error")) {
+                        cat("\t *ERROR* !!\n")
+                    } else {
+                        cat("as() ok; validObject: ")
+                        vo <- validObject(tt, test = TRUE)
+                        cat(if(isTRUE(vo)) "ok" else paste("OOOOOOPS:", vo), "\n")
+                    }
+                }
+            }
+        cat("---\n")
+    }
+}
+
+cat('Time elapsed: ', proc.time(),'\n') # for the above "part I"
+
+
+if(doExtras && !interactive()) { # don't want to see on source()
+
+cat("All classes in the 'Matrix' package:\n")
+for(cln in allCl) {
+    cat("\n-----\n\nClass", dQuote(cln),":\n      ",
+        paste(rep("~",nchar(cln)),collapse=''),"\n")
+    ## A smarter version would use  getClass() instead of showClass(),
+    ## build the "graph" and only then display.
+    ##
+    showClass(cln)
+}
+
+cat("\n\n")
+
+## One could extend the `display' by using (something smarter than)
+## are the "coerce" methods showing more than the 'Extends' output above?
+cat("All (S4) methods in the 'Matrix' package:\n")
+showMethods(where="package:Matrix")
+
+} # end{non-interactive}
+
+## 1-indexing instead of 0-indexing for direct "dgT" should give error:
+ii <- as.integer(c(1,2,2))
+jj <- as.integer(c(1,1,3))
+assertError(new("dgTMatrix",  i=ii, j=jj,        x= 10*(1:3), Dim=2:3))
+assertError(new("dgTMatrix",  i=ii, j=jj - 1:1,  x= 10*(1:3), Dim=2:3))
+assertError(new("dgTMatrix",  i=ii - 1:1, j=jj,  x= 10*(1:3), Dim=2:3))
+(mm <- new("dgTMatrix",  i=ii - 1:1, j=jj - 1:1, x= 10*(1:3), Dim=2:3))
+validObject(mm)
+
+### Sparse Logical:
+m <- Matrix(c(0,0,2:0), 3,5)
+mT <- as(mC <- as(m, "CsparseMatrix"), "TsparseMatrix")
+stopifnot(identical(as(mT,"CsparseMatrix"), mC))
+(mC. <- as(mT[1:2, 2:3], "CsparseMatrix"))
+(mlC <- as(mC. , "lMatrix"))
+as(mlC,"ltCMatrix")
+
+if(!doExtras && !interactive()) q("no") ## (saving testing time)
+
+### Test all classes:  validObject(new( * )) should be fulfilled -----------
+
+## need stoplist for now:
+Rcl.struc <- c("gR", "sR", "tR")
+(dR.classes <- paste0(paste0("d", Rcl.struc[Rcl.struc != "gR"]),   "Matrix"))
+(.R.classes <- paste0(sort(outer(c("l", "n"), Rcl.struc, paste0)), "Matrix"))
+                                        # have only stub implementation
+
+Mat.MatFact <- c("Cholesky", "pCholesky",
+                 "BunchKaufman", "pBunchKaufman")##, "LDL"
+##FIXME maybe move to ../../MatrixModels/tests/ :
+## (modmat.classes <- .subclasses("modelMatrix"))
+no.t.etc <- c(.R.classes, dR.classes, Mat.MatFact)#, modmat.classes)
+no.t.classes <- c(no.t.etc)     # no t() available
+no.norm.classes <- no.t.classes
+not.Ops      <- NULL            # "Ops", e.g. "+" fails
+not.coerce1  <- no.t.etc        # not coercable from "dgeMatrix"
+not.coerce2  <- no.t.etc        # not coercable from "matrix"
+
+tstMatrixClass <-
+    function(cl, mM = Matrix(c(2,1,1,2) + 0, 2,2,
+                 dimnames=rep( list(c("A","B")), 2)), # dimnames: *symmetric*
+             mm = as(mM, "matrix"), recursive = TRUE, offset = 0)
+{
+    ## Purpose: Test 'Matrix' class {and do this for all of them}
+    ## ----------------------------------------------------------------------
+    ## Arguments: cl: class object of a class that extends "Matrix"
+    ##            mM: a "Matrix"-matrix which will be coerced to class 'cl'
+    ##            mm: a S3-matrix       which will be coerced to class 'cl'
+    ## ----------------------------------------------------------------------
+    ## Author: Martin Maechler
+
+    ## from pkg sfsmisc :
+    bl.string <- function(no) sprintf("%*s", no, "")
+
+    ## Compute a few things only once :
+    mM <- as(mM, "dgeMatrix")
+    trm <- mm; trm[lower.tri(mm)] <- 0
+    ## not yet used:
+    ## summList <- lapply(getGroupMembers("Summary"), get,
+    ##                    envir = asNamespace("Matrix"))
+    if(recursive)
+        cList <- character(0)
+
+    extraValid <- function(m, cl = class(m)) {
+        sN <- slotNames(cl)
+        sN <- sN[sN != "factors"]
+	for(nm in sN)
+	    if(!is.null(a <- attributes(slot(m, nm))))
+		stop(sprintf("slot '%s' with %d attributes, named: ",
+			     nm, length(a)), paste(names(a), collapse=", "))
+        invisible(TRUE)
+    }
+
+
+    ## This is the recursive function
+    dotestMat <- function(cl, offset)
+    {
+        cat. <- function(...) cat(bl.string(offset), ...)
+
+        clNam <- cl@subClass
+        cat("\n")
+        cat.(clNam)
+        ##---------
+        clD <- getClassDef(clNam)
+        if(isVirtualClass(clD)) {
+            cat(" - is virtual\n")
+            if(recursive) {
+                cat.("----- begin{class :", clNam, "}----new subclasses----\n")
+                for(ccl in clD@subclasses) {
+                    cclN <- ccl@subClass
+                    if(cclN %in% cList)
+                        cat.(cclN,": see above\n")
+                    else {
+                        cList <<- c(cList, cclN)
+                        dotestMat(ccl, offset = offset + 3)
+                    }
+                }
+                cat.("----- end{class :", clNam, "}---------------------\n")
+            }
+        } else { ## --- actual class ---
+            genC <- extends(clD, "generalMatrix")
+            symC <- extends(clD, "symmetricMatrix")
+            triC <- extends(clD, "triangularMatrix")
+            diaC <- extends(clD, "diagonalMatrix")
+            if(!(genC || symC || triC || diaC))
+                stop("does not extend one of 'general', 'symmetric', 'triangular', or 'diagonal'")
+            sparseC <- extends(clD, "sparseMatrix")
+            denseC  <- extends(clD, "denseMatrix")
+            if(!(sparseC || denseC))
+                stop("does not extend either 'sparse' or 'dense'")
+	    cat("; new(..): ")
+	    m <- new(clNam) ; cat("ok; ")
+	    m0 <- matrix(,0,0)
+	    if(canCoerce(m0, clNam)) {
+		cat("; as(matrix(,0,0), <.>): ")
+		stopifnot(Qidentical(m, as(m0, clNam))); cat("ok; ")
+	    }
+            is_p <- extends(clD, "indMatrix")
+            is_cor <- extends(clD, "corMatrix") # has diagonal divided out
+	    if(canCoerce(mm, clNam)) { ## replace 'm' by `non-empty' version
+		cat("canCoerce() ")
+		m0 <- {
+		    if(triC) trm
+		    else if(is_p)
+			mm == 1     # logical *and* "true" permutation
+		    else mm
+		}
+		if(extends(clD, "lMatrix") ||
+		   extends(clD, "nMatrix"))
+		    storage.mode(m0) <- "logical"
+		else if(extends(clD, "zMatrix"))
+		    storage.mode(m0) <- "complex"
+		validObject(m) ## validity of trivial 'm' before replacing
+		m <- as(m0, clNam)
+		if(is_cor)
+                    m0 <- cov2cor(m0)
+	    } else {
+                m0 <- vector(Matrix:::.type.kind[Matrix:::.M.kindC(clNam)])
+                dim(m0) <- c(0L,0L)
+            }
+	    ## m0 is the 'matrix' version of our 'Matrix' m
+	    m. <- m0 ##m. <- if(is_p) as.integer(m0) else m0
+            EQ <- if(is_cor) all.equal else identical
+	    stopifnot(EQ(m0[FALSE], m[FALSE])
+		      , EQ(m.[TRUE],  m[TRUE])
+		      , if(length(m) >= 2) EQ(m.[2:1], m[2:1]) else TRUE)
+
+	    if(all(dim(m) > 0)) { ## matrix(0,0,0)[FALSE,]  is invalid too
+		m00 <- m[FALSE,FALSE]
+		m.. <- m[TRUE , TRUE]
+		stopifnot(dim(m00) == c(0L,0L),
+			  dim(m..) == dim(m))
+		## not yet  , class(m00) == clNam , identical(m.. , m)
+	    }
+
+            cat("valid: ", validObject(m), extraValid(m, clNam),"\n")
+
+            ## This can only work as long as 'm' has no NAs :
+            ## not yet -- have version in not.Ops below
+            ## once we have is.na():
+            ## 		stopifnot(all(m == m | is.na(m))) ## check all() and "==" [Compare]
+            ## 		if(any(m != m && !is.na(m)))
+
+	    show(m)
+	    ## coerce to 'matrix'
+	    m.m <- as(m, "matrix")
+	    ##=========##
+	    checkMatrix(m, m.m,
+	    ##=========##
+			do.t= !(clNam %in% no.t.classes),
+			doNorm= !(clNam %in% no.norm.classes),
+			doOps = all(clNam != not.Ops),
+			doCoerce = all(clNam != not.coerce1),
+			catFUN = cat.)
+
+### FIXME: organize differently :
+### 1) produce 'mM'  and 'mm' for the other cases,
+### 2) use identical code for all cases
+
+            if(is(m, "dMatrix") && is(m, "compMatrix")) {
+                if(any(clNam == not.coerce1))
+                    cat.("not coercable_1\n")
+                else if(canCoerce(mM, clNam)) {
+                    m2 <- as(mM, clNam)
+                    cat("valid:", validObject(m2), "\n")
+                    if(!is_cor) ## as.vector()
+                        stopifnot(as.vector(m2) == as.vector(mM))
+                    cat.("[cr]bind2():"); mm2 <- cbind2(m2,m2)
+                    stopifnot(dim(rbind2(m2,m2)) == 2:1 * dim(mM)); cat(" ok")
+                    if(genC && class(mm2) == clNam) ## non-square matrix when "allowed"
+                        m2 <- mm2
+                    dd <- diag(m2)
+                    cat("; `diag<-` ")
+                    diag(m2) <- 10*dd
+                    stopifnot(is_cor || identical(dd, diag(mM)),
+                              identical(10*dd, diag(m2))); cat("ok ")
+                }
+##                 if(all(clNam != not.coerce2)) {
+                    if(canCoerce("matrix", clNam)) {
+                        cat.("as(matrix, <class>): ")
+                        m3 <- as(mm, clNam)
+                        cat("valid:", validObject(m3), "\n")
+                    } else cat.(" not coerceable from \"matrix\"\n")
+##                 }
+            }
+
+            ## else { ... no happens in tstMatrix() above .. }
+
+            ## if(is(m, "denseMatrix")) {
+            ##     ## .........
+            ##     cat.("as dsparse* ")
+            ##     msp <- as(m, "dsparseMatrix")
+            ##     cat.("; valid coercion: ", validObject(msp), "\n")
+            ## } else if(is(m, "sparseMatrix")) {
+
+            ## } else cat.("-- not dense nor sparse -- should not happen(!?)\n")
+
+            if(is(m, "dsparseMatrix")) {
+                if(any(clNam == not.coerce1))
+                    cat.("not coercable_1\n")
+                else {
+                    ## make sure we can coerce to dgT* -- needed, e.g. for "image"
+                    ## change: use Tsparse instead of dgT, unless it *is* Tsparse:
+                    isT <- is(m, "TsparseMatrix")
+                    prefix <- if(isT) "dgT" else "Tsparse"
+                    Tcl <- paste(prefix, "Matrix", sep='')
+                    cat.(sprintf("as %s* ", prefix))
+                    mgT <- as(m, Tcl)
+                    cat(sprintf("; valid %s* coercion: %s\n",
+                                prefix, validObject(mgT)))
+                }
+            }
+        }
+    } # end{dotestMat}
+
+    for(scl in getClass(cl)@subclasses)
+        dotestMat(scl, offset + 1)
+}
+## in case we want to make progress:
+## codetools::checkUsage(tstMatrixClass, all=TRUE)
+
+tstMatrixClass("Matrix")
+if(FALSE)## or just a sub class
+tstMatrixClass("triangularMatrix")
+
+
+cat('Time elapsed: ', proc.time(),'\n') # for ``statistical reasons''
+
+if(!interactive()) warnings()
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/tests/dpo-test.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/tests/dpo-test.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/tests/dpo-test.R	(revision 2477)
@@ -0,0 +1,175 @@
+### Testing positive definite matrices
+library(Matrix)
+source(system.file("test-tools.R", package = "Matrix"))# identical3() etc
+
+h9 <- Hilbert(9)
+stopifnot(c(0,0) == dim(Hilbert(0)),
+          c(9,9) == dim(h9),
+	  identical(h9@factors, list()))
+str(h9)# no 'factors'		32b:	-96.73694669	2.08e-8
+assert.EQ.(c(determinant(h9)$modulus),	-96.7369487, tol = 8e-8)
+##				64b:	-96.73695078	2.15e-8
+
+## determinant() now working via chol(): ==> h9 now has factorization
+stopifnot(names(h9@factors) == "Cholesky",
+          identical(ch9 <- chol(h9), h9@factors$Cholesky))
+round(ch9, 3) ## round() preserves 'triangular' !
+str(f9 <- as(ch9, "dtrMatrix"))
+stopifnot(all.equal(rcond(h9), 9.0938e-13),
+          all.equal(rcond(f9), 9.1272e-7, tolerance = 1e-6))# more precision fails
+options(digits=4)
+(cf9 <- crossprod(f9))# looks the same as  h9 :
+assert.EQ.mat(h9, as.matrix(cf9), tol=1e-15)
+
+h9. <- round(h9, 2)# actually loses pos.def. "slightly"
+                   # ==> the above may be invalid in the future
+h9p  <- as(h9,  "dppMatrix")
+h9.p <- as(h9., "dppMatrix")
+ch9p <- chol(h9p)
+stopifnot(identical(ch9p, h9p@factors$pCholesky),
+	  identical(names(h9p@factors), c("Cholesky", "pCholesky")))
+h4  <- h9.[1:4, 1:4] # this and the next
+h9.[1,1] <- 10       # had failed in 0.995-14
+h9p[1,1] <- 10
+stopifnotValid(h9., "symmetricMatrix")
+stopifnotValid(h9p, "symmetricMatrix")
+stopifnotValid(h4,  "symmetricMatrix")
+
+h9p[1,2] <- 99
+stopifnot(class(h9p) == "dgeMatrix", h9p[1,1:2] == c(10,99))
+
+str(h9p <- as(h9, "dppMatrix"))# {again}
+h6 <- h9[1:6,1:6]
+stopifnot(all(h6 == Hilbert(6)), length(h6@factors) == 0)
+stopifnotValid(th9p <- t(h9p), "dppMatrix")
+stopifnotValid(h9p@factors$Cholesky,"Cholesky")
+H6  <- as(h6, "dspMatrix")
+pp6 <- as(H6, "dppMatrix")
+po6 <- as(pp6,"dpoMatrix")
+hs <- as(h9p, "dspMatrix")
+stopifnot(names(H6@factors)  == "pCholesky",
+	  names(pp6@factors) == "pCholesky",
+	  names(hs@factors)  == "Cholesky") # for now
+chol(hs) # and that is cached in 'hs' too :
+stopifnot(names(hs@factors) %in% c("Cholesky","pCholesky"),
+	  all.equal(h9, crossprod(hs@factors$pCholesky), tolerance =1e-13),
+	  all.equal(h9, crossprod(hs@factors$ Cholesky), tolerance =1e-13))
+
+hs@x <- 1/h9p@x # is not pos.def. anymore
+validObject(hs) # "but" this does not check
+stopifnot(diag(hs) == seq(1, by = 2, length = 9))
+
+s9 <- solve(h9p, seq(nrow(h9p)))
+signif(t(s9)/10000, 4)# only rounded numbers are platform-independent
+(I9 <- h9p %*% s9)
+m9 <- matrix(1:9, dimnames = list(NULL,NULL))
+stopifnot(all.equal(m9, as.matrix(I9), tolerance = 2e-9))
+
+### Testing nearPD() --- this is partly in  ../man/nearPD.Rd :
+pr <- Matrix(c(1,     0.477, 0.644, 0.478, 0.651, 0.826,
+               0.477, 1,     0.516, 0.233, 0.682, 0.75,
+               0.644, 0.516, 1,     0.599, 0.581, 0.742,
+               0.478, 0.233, 0.599, 1,     0.741, 0.8,
+               0.651, 0.682, 0.581, 0.741, 1,     0.798,
+               0.826, 0.75,  0.742, 0.8,   0.798, 1),
+             nrow = 6, ncol = 6)
+
+nL <-
+    list(r   = nearPD(pr, conv.tol = 1e-7), # default
+	 r.1 = nearPD(pr, conv.tol = 1e-7,		corr = TRUE),
+	 rs  = nearPD(pr, conv.tol = 1e-7, doDyk=FALSE),
+	 rs1 = nearPD(pr, conv.tol = 1e-7, doDyk=FALSE, corr = TRUE),
+	 rH  = nearPD(pr, conv.tol = 1e-15),
+         rH.1= nearPD(pr, conv.tol = 1e-15, corr = TRUE))
+
+sapply(nL, `[`, c("iterations", "normF"))
+
+allnorms <- function(d) sapply(c("1","I","F","M"), function(typ) norm(d, typ))
+
+## "F" and "M" distances are larger for the (corr=TRUE) constrained:
+100 * sapply(nL, function(rr) allnorms((pr - rr  $ mat)))
+
+## But indeed, the 'corr = TRUE' constraint yield a better solution,
+## if you need the constraint :  cov2cor() does not just fix it up :
+100 * (nn <- sapply(nL, function(rr) allnorms((pr - cov2cor(rr  $ mat)))))
+
+stopifnot(
+all.equal(nn["1",],
+          c(r =0.0999444286984696, r.1= 0.0880468666522317,
+            rs=0.0999444286984702, rs1= 0.0874614179943388,
+            rH=0.0999444286984696, rH.1=0.0880468927726625),
+          tolerance=1e-9))
+
+nr <- nL $rH.1 $mat
+stopifnot(
+    all.equal(nr[lower.tri(nr)],
+	      c(0.4877861230299, 0.6429309061748, 0.4904554299278, 0.6447150779852,
+		0.8082100656035, 0.514511537243, 0.2503412693503, 0.673249718642,
+		0.7252316891977, 0.5972811755863, 0.5818673040157, 0.7444549621769,
+		0.7308954865819, 0.7713984381710, 0.8124321235679),
+	      tolerance = 1e-9))
+showProc.time()
+
+
+set.seed(27)
+m9 <- h9 + rnorm(9^2)/1000 ; m9 <- (m9 + t(m9))/2
+nm9 <- nearPD(m9)
+showProc.time()
+
+nRep <- if(doExtras) 50 else 4
+CPU <- 0
+for(M in c(5, 12))
+    for(i in 1:nRep) {
+	m <- matrix(round(rnorm(M^2),2), M, M)
+	m <- m + t(m)
+	diag(m) <- pmax(0, diag(m)) + 1
+	m <- cov2cor(m)
+	CPU <- CPU + system.time(n.m <- nearPD(m))[1]
+	X <- as(n.m$mat, "matrix")
+	stopifnot(all.equal(X, (X + t(X))/2, tolerance = 8*.Machine$double.eps),
+		  all.equal(eigen(n.m$mat, only.values=TRUE)$values,
+			    n.m$eigenvalues, tolerance = 4e-8))
+    }
+cat('Time elapsed for ',nRep, 'nearPD(): ', CPU,'\n')
+showProc.time()
+
+## cov2cor()
+m <- diag(6:1) %*% as(pr,"matrix") %*% diag(6:1) # so we can "vector-index"
+m[upper.tri(m)] <- 0
+ltm <- which(lower.tri(m))
+ne <- length(ltm)
+set.seed(17)
+m[ltm[sample(ne, 3/4*ne)]] <- 0
+m <- (m + t(m))/2 # now is a covariance matrix with many 0 entries
+(spr <- Matrix(m))
+cspr <- cov2cor(spr)
+ev <- eigen(cspr, only.v = TRUE)$values
+stopifnot(is(spr, "dsCMatrix"),
+          is(cspr,"dsCMatrix"),
+          all.equal(ev, c(1.5901626099,  1.1902658504, 1, 1,
+                          0.80973414959, 0.40983739006), tolerance=1e-10))
+
+x <- c(2,1,1,2)
+mM <- Matrix(x, 2,2, dimnames=rep( list(c("A","B")), 2))# dsy
+mM
+stopifnot(length(mM@factors)== 0)
+(po <- as(mM, "dpoMatrix")) # still has dimnames
+mm <- as(mM, "matrix")
+msy <- as(mm, "dsyMatrix")
+stopifnot(Qidentical(mM, msy),
+	  length(mM @factors)== 1,
+	  length(msy@factors)== 0)
+
+c1 <- as(mm, "corMatrix")
+c2 <- as(mM, "corMatrix")
+c3 <- as(po, "corMatrix")
+(co.x <- matrix(x/2, 2,2))
+checkMatrix(c1)
+assert.EQ.mat(c1, co.x)
+assert.EQ.mat(c2, co.x) # failed in Matrix 0.999375-9, because of
+## the wrong automatic "dsyMatrix" -> "corMatrix" coerce method
+stopifnot(identical(dimnames(c1), dimnames(mM)),
+	  all.equal(c1, c3, tolerance =1e-15))
+
+showProc.time()
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/tests/bind.Rout.save
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/tests/bind.Rout.save	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/tests/bind.Rout.save	(revision 2477)
@@ -0,0 +1,543 @@
+
+R version 3.2.2 Patched (2015-11-13 r69633) -- "Fire Safety"
+Copyright (C) 2015 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
+
+R is free software and comes with ABSOLUTELY NO WARRANTY.
+You are welcome to redistribute it under certain conditions.
+Type 'license()' or 'licence()' for distribution details.
+
+R is a collaborative project with many contributors.
+Type 'contributors()' for more information and
+'citation()' on how to cite R or R packages in publications.
+
+Type 'demo()' for some demos, 'help()' for on-line help, or
+'help.start()' for an HTML browser interface to help.
+Type 'q()' to quit R.
+
+> #### Testing  cBind() & rBind()
+> 
+> if(getRversion() >= "3.2.0") {
++     cBind <- base::cbind
++     rBind <- base::rbind
++ }
+> 
+> 
+> library(Matrix)
+
+Attaching package: 'Matrix'
+
+The following objects are masked _by_ '.GlobalEnv':
+
+    cBind, rBind
+
+> 
+> source(system.file("test-tools.R", package = "Matrix"))# identical3() etc
+Loading required package: tools
+> 
+> ### --- Dense Matrices ---
+> 
+> m1 <- m2 <- m <- matrix(1:12, 3,4)
+> dimnames(m2) <- list(LETTERS[1:3],
++                      letters[1:4])
+> dimnames(m1) <- list(NULL,letters[1:4])
+> M  <- Matrix(m)
+> M1 <- Matrix(m1)
+> M2 <- Matrix(m2)
+> 
+> stopifnot(
++     identical3(cBind ( M, 10*M),
++ 		show(cbind2( M, 10*M)),
++ 	      Matrix(cbind ( m, 10*m)))
++    ,
++     identical3(cBind (M1, 100+M1),
++                show(cbind2(M1, 100+M1)),
++                Matrix(cbind (m1, 100+m1)))
++    ,
++     identical3(cBind (M1, 10*M2),
++                show(cbind2(M1, 10*M2)),
++                Matrix(cbind (m1, 10*m2)))
++    ,
++     identical3(cBind (M2, M1+M2),
++                show(cbind2(M2, M1+M2)),
++                Matrix(cbind (m2, m1+m2)))
++    ,
++     identical(colnames(show(cBind(M1, MM = -1))),
++ 	      c(colnames(M1), "MM"))
++    ,
++     identical3(rBind ( M, 10*M),
++ 		show(rbind2( M, 10*M)),
++ 	      Matrix(rbind ( m, 10*m)))
++     ,
++     identical3(rBind (M2, M1+M2),
++ 	       show(rbind2(M2, M1+M2)),
++ 	       Matrix(rbind (m2, m1+m2)))
++    ,
++     Qidentical(show  (rBind(R1 = 10:11, M1)),
++ 	       Matrix(rbind(R1 = 10:11, m1)), strict=FALSE)
++   , TRUE)
+3 x 8 Matrix of class "dgeMatrix"
+     [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
+[1,]    1    4    7   10   10   40   70  100
+[2,]    2    5    8   11   20   50   80  110
+[3,]    3    6    9   12   30   60   90  120
+3 x 8 Matrix of class "dgeMatrix"
+     a b c  d   a   b   c   d
+[1,] 1 4 7 10 101 104 107 110
+[2,] 2 5 8 11 102 105 108 111
+[3,] 3 6 9 12 103 106 109 112
+3 x 8 Matrix of class "dgeMatrix"
+  a b c  d  a  b  c   d
+A 1 4 7 10 10 40 70 100
+B 2 5 8 11 20 50 80 110
+C 3 6 9 12 30 60 90 120
+3 x 8 Matrix of class "dgeMatrix"
+  a b c  d a  b  c  d
+A 1 4 7 10 2  8 14 20
+B 2 5 8 11 4 10 16 22
+C 3 6 9 12 6 12 18 24
+3 x 5 Matrix of class "dgeMatrix"
+     a b c  d MM
+[1,] 1 4 7 10 -1
+[2,] 2 5 8 11 -1
+[3,] 3 6 9 12 -1
+6 x 4 Matrix of class "dgeMatrix"
+     [,1] [,2] [,3] [,4]
+[1,]    1    4    7   10
+[2,]    2    5    8   11
+[3,]    3    6    9   12
+[4,]   10   40   70  100
+[5,]   20   50   80  110
+[6,]   30   60   90  120
+6 x 4 Matrix of class "dgeMatrix"
+  a  b  c  d
+A 1  4  7 10
+B 2  5  8 11
+C 3  6  9 12
+  2  8 14 20
+  4 10 16 22
+  6 12 18 24
+4 x 4 Matrix of class "dgeMatrix"
+    a  b  c  d
+R1 10 11 10 11
+    1  4  7 10
+    2  5  8 11
+    3  6  9 12
+> 
+> identical.or.eq <- function(x,y, tol=0, ...) {
++     if(identical(x,y, ...))
++         TRUE
++     else if(isTRUE(aeq <- all.equal(x,y, tolerance = tol)))
++         structure(TRUE, comment = "not identical")
++     else aeq
++ }
+> identicalShow <- function(x,y, ...)
++     if(!isTRUE(id <- identical.or.eq(x, y, ...))) cat(id,"\n")
+> 
+> ## Checking  deparse.level { <==> example at end of ?cbind }:
+> checkRN <- function(dd, B = rbind) {
++     FN <- function(deparse.level)
++         rownames(B(1:4, c=2,"a+"=10, dd, deparse.level=deparse.level))
++     rn <- c("1:4", "c", "a+", "dd",  "")
++     isMatr <- (length(dim(dd)) == 2)
++     id <- if(isMatr) 5 else 4
++     if(!identical(B, methods:::rbind)) ## <= BUG in methods:::rbind !!
++     identicalShow(rn[c(5,2:3, 5)], FN(deparse.level= 0)) # middle two names
++     identicalShow(rn[c(5,2:3,id)], FN(deparse.level= 1)) # last shown if vector
++     identicalShow(rn[c(1,2:3,id)], FN(deparse.level= 2)) # first shown; (last if vec.)
++ }
+> checkRN(10) # <==> ?cbind's ex
+> checkRN(1:4)
+> checkRN(       rbind(c(0:1,0,0)))
+> if(FALSE)# not yet
++ checkRN(Matrix(rbind(c(0:1,0,0))))
+> ## rBind(): -- works with the above workaround methods:::rbind bug
+> checkRN(10 ,				rBind)
+> checkRN(1:4,				rBind)
+> checkRN(       rbind(c(0:1,0,0)),  	rBind)
+> checkRN(Matrix(rbind(c(0:1,0,0))), 	rBind)
+Modes: character, NULL Lengths: 4, 0 target is character, current is NULL 
+> 
+> 
+> cBind(0, Matrix(0+0:1, 1,2), 3:2)# FIXME? should warn - as with matrix()
+1 x 4 Matrix of class "dgeMatrix"
+     [,1] [,2] [,3] [,4]
+[1,]    0    0    1    3
+> as(rBind(0, Matrix(0+0:1, 1,2), 3:2),
++    "sparseMatrix")
+3 x 2 sparse Matrix of class "dgCMatrix"
+        
+[1,] . .
+[2,] . 1
+[3,] 3 2
+> cBind(M2, 10*M2[nrow(M2):1 ,])# keeps the rownames from the first
+3 x 8 Matrix of class "dgeMatrix"
+  a b c  d  a  b  c   d
+A 1 4 7 10 30 60 90 120
+B 2 5 8 11 20 50 80 110
+C 3 6 9 12 10 40 70 100
+> 
+> (im <- cBind(I = 100, M))
+3 x 5 Matrix of class "dgeMatrix"
+       I         
+[1,] 100 1 4 7 10
+[2,] 100 2 5 8 11
+[3,] 100 3 6 9 12
+> str(im)
+Formal class 'dgeMatrix' [package "Matrix"] with 4 slots
+  ..@ x       : num [1:15] 100 100 100 1 2 3 4 5 6 7 ...
+  ..@ Dim     : int [1:2] 3 5
+  ..@ Dimnames:List of 2
+  .. ..$ : NULL
+  .. ..$ : chr [1:5] "I" "" "" "" ...
+  ..@ factors : list()
+> (mi <- cBind(M2, I = 1000))
+3 x 5 Matrix of class "dgeMatrix"
+  a b c  d    I
+A 1 4 7 10 1000
+B 2 5 8 11 1000
+C 3 6 9 12 1000
+> str(mi)
+Formal class 'dgeMatrix' [package "Matrix"] with 4 slots
+  ..@ x       : num [1:15] 1 2 3 4 5 6 7 8 9 10 ...
+  ..@ Dim     : int [1:2] 3 5
+  ..@ Dimnames:List of 2
+  .. ..$ : chr [1:3] "A" "B" "C"
+  .. ..$ : chr [1:5] "a" "b" "c" "d" ...
+  ..@ factors : list()
+> (m1m <- cBind(M,I=100,M2))
+3 x 9 Matrix of class "dgeMatrix"
+             I a b c  d
+A 1 4 7 10 100 1 4 7 10
+B 2 5 8 11 100 2 5 8 11
+C 3 6 9 12 100 3 6 9 12
+> showProc.time()
+Time elapsed:  0.075 0.009 0.086 
+> 
+> ### --- Diagonal / Sparse - had bugs
+> 
+> D4 <- Diagonal(4)
+> (D4T <- as(D4, "TsparseMatrix"))
+4 x 4 sparse Matrix of class "dtTMatrix" (unitriangular)
+            
+[1,] I . . .
+[2,] . I . .
+[3,] . . I .
+[4,] . . . I
+> D4C <- as(D4T, "CsparseMatrix")
+> c1 <- Matrix(0+0:3, 4, sparse=TRUE) ; r1 <- t(c1); r1
+1 x 4 sparse Matrix of class "dgCMatrix"
+            
+[1,] . 1 2 3
+> 
+> d4 <- rBind(Diagonal(4), 0:3)
+> m4 <- cBind(Diagonal(x=-1:2), 0:3)
+> c4. <- cBind(Diagonal(4), c1)
+> c.4 <- cBind(c1, Diagonal(4))
+> r4. <- rBind(Diagonal(4), r1)
+> r.4 <- rBind(r1, Diagonal(4))
+> assert.EQ.mat(d4, rBind(diag(4),    0:3))
+> assert.EQ.mat(m4, cBind(diag(-1:2), 0:3))
+> stopifnot(identical(Matrix(cbind(diag(3),0)), cbind2(Diagonal(3),0)),
++ 	  is(d4, "sparseMatrix"), is(m4, "sparseMatrix"),
++ 	  identical(t(d4), cBind(Diagonal(4),     0:3)),
++ 	  identical(t(m4), rBind(Diagonal(x=-1:2), 0:3)))
+> showProc.time()
+Time elapsed:  0.041 0.006 0.047 
+> 
+> ### --- Sparse Matrices ---
+> 
+> identical4(cBind(diag(4), diag(4)),
++            cBind(D4C, D4C),
++            cBind(D4T, D4C),
++            cBind(D4C, D4T))
+[1] FALSE
+> nr <- 4
+> m. <- matrix(c(0, 2:-1),  nr ,6)
+Warning message:
+In matrix(c(0, 2:-1), nr, 6) :
+  data length [5] is not a sub-multiple or multiple of the number of rows [4]
+> M <- Matrix(m.)
+> (mC <- as(M, "dgCMatrix"))
+4 x 6 sparse Matrix of class "dgCMatrix"
+                    
+[1,] . -1  .  1  2 .
+[2,] 2  . -1  .  1 2
+[3,] 1  2  . -1  . 1
+[4,] .  1  2  . -1 .
+> (mT <- as(M, "dgTMatrix"))
+4 x 6 sparse Matrix of class "dgTMatrix"
+                    
+[1,] . -1  .  1  2 .
+[2,] 2  . -1  .  1 2
+[3,] 1  2  . -1  . 1
+[4,] .  1  2  . -1 .
+> stopifnot(identical(mT, as(mC, "dgTMatrix")),
++           identical(mC, as(mT, "dgCMatrix")))
+> 
+> for(v in list(0, 2, 1:0))
++     for(fnam in c("cBind", "rBind")) {
++         cat(fnam,"(m, v=", deparse(v),"), class(m) :")
++         FUN <- get(fnam)
++         for(m in list(M, mC, mT)) {
++             cat("", class(m),"")
++             assert.EQ.mat(FUN(v, m), FUN(v, m.)) ; cat(",")
++             assert.EQ.mat(FUN(m, v), FUN(m., v)) ; cat(".")
++         }
++         cat("\n")
++     }
+cBind (m, v= 0 ), class(m) : dgeMatrix ,. dgCMatrix ,. dgTMatrix ,.
+rBind (m, v= 0 ), class(m) : dgeMatrix ,. dgCMatrix ,. dgTMatrix ,.
+cBind (m, v= 2 ), class(m) : dgeMatrix ,. dgCMatrix ,. dgTMatrix ,.
+rBind (m, v= 2 ), class(m) : dgeMatrix ,. dgCMatrix ,. dgTMatrix ,.
+cBind (m, v= c(1L, 0L) ), class(m) : dgeMatrix ,. dgCMatrix ,. dgTMatrix ,.
+rBind (m, v= c(1L, 0L) ), class(m) : dgeMatrix ,. dgCMatrix ,. dgTMatrix ,.
+> showProc.time()
+Time elapsed:  0.063 0.007 0.07 
+> 
+> cBind(0, mC); cBind(mC, 0)
+4 x 7 sparse Matrix of class "dgCMatrix"
+                      
+[1,] . . -1  .  1  2 .
+[2,] . 2  . -1  .  1 2
+[3,] . 1  2  . -1  . 1
+[4,] . .  1  2  . -1 .
+4 x 7 sparse Matrix of class "dgCMatrix"
+                      
+[1,] . -1  .  1  2 . .
+[2,] 2  . -1  .  1 2 .
+[3,] 1  2  . -1  . 1 .
+[4,] .  1  2  . -1 . .
+> cBind(0, mT); cBind(mT, 2)
+4 x 7 sparse Matrix of class "dgCMatrix"
+                      
+[1,] . . -1  .  1  2 .
+[2,] . 2  . -1  .  1 2
+[3,] . 1  2  . -1  . 1
+[4,] . .  1  2  . -1 .
+4 x 7 sparse Matrix of class "dgCMatrix"
+                      
+[1,] . -1  .  1  2 . 2
+[2,] 2  . -1  .  1 2 2
+[3,] 1  2  . -1  . 1 2
+[4,] .  1  2  . -1 . 2
+> cBind(diag(nr), mT)
+4 x 10 sparse Matrix of class "dgCMatrix"
+                            
+[1,] 1 . . . . -1  .  1  2 .
+[2,] . 1 . . 2  . -1  .  1 2
+[3,] . . 1 . 1  2  . -1  . 1
+[4,] . . . 1 .  1  2  . -1 .
+> stopifnot(identical(t(cBind(diag(nr),   mT)),
++                       rBind(diag(nr), t(mT))))
+> (cc <- cBind(mC, 0,7,0, diag(nr), 0))
+4 x 14 sparse Matrix of class "dgCMatrix"
+                                    
+[1,] . -1  .  1  2 . . 7 . 1 . . . .
+[2,] 2  . -1  .  1 2 . 7 . . 1 . . .
+[3,] 1  2  . -1  . 1 . 7 . . . 1 . .
+[4,] .  1  2  . -1 . . 7 . . . . 1 .
+> stopifnot(identical3(cc, cBind(mT, 0,7,0, diag(nr), 0),
++                      as( cBind( M, 0,7,0, diag(nr), 0), "dgCMatrix")))
+> 
+> cBind(mC, 1, 100*mC, 0, 0:2)
+4 x 15 sparse Matrix of class "dgCMatrix"
+                                                      
+[1,] . -1  .  1  2 . 1   . -100    .  100  200   . . .
+[2,] 2  . -1  .  1 2 1 200    . -100    .  100 200 . 1
+[3,] 1  2  . -1  . 1 1 100  200    . -100    . 100 . 2
+[4,] .  1  2  . -1 . 1   .  100  200    . -100   . . .
+> cBind(mT, 1, 0, mT+10*mT, 0, 0:2)
+4 x 16 sparse Matrix of class "dgCMatrix"
+                                                  
+[1,] . -1  .  1  2 . 1 .  . -11   .  11  22  . . .
+[2,] 2  . -1  .  1 2 1 . 22   . -11   .  11 22 . 1
+[3,] 1  2  . -1  . 1 1 . 11  22   . -11   . 11 . 2
+[4,] .  1  2  . -1 . 1 .  .  11  22   . -11  . . .
+> one <- 1
+> zero <- 0
+> dimnames(mC) <- dimnames(mT) <- list(LETTERS[1:4], letters[1:6])
+> op <- options(sparse.colnames = TRUE)# show colnames in print :
+> cBind(mC, one, 100*mC, zero, 0:2)
+4 x 15 sparse Matrix of class "dgCMatrix"
+  a  b  c  d  e f one   a    b    c    d    e   f zero  
+A . -1  .  1  2 .   1   . -100    .  100  200   .    . .
+B 2  . -1  .  1 2   1 200    . -100    .  100 200    . 1
+C 1  2  . -1  . 1   1 100  200    . -100    . 100    . 2
+D .  1  2  . -1 .   1   .  100  200    . -100   .    . .
+> cBind(mC, one, 100*mC, zero, 0:2, deparse.level=0)# no "zero", "one"
+4 x 15 sparse Matrix of class "dgCMatrix"
+  a  b  c  d  e f     a    b    c    d    e   f    
+A . -1  .  1  2 . 1   . -100    .  100  200   . . .
+B 2  . -1  .  1 2 1 200    . -100    .  100 200 . 1
+C 1  2  . -1  . 1 1 100  200    . -100    . 100 . 2
+D .  1  2  . -1 . 1   .  100  200    . -100   . . .
+> cBind(mC, one, 100*mC, zero, 0:2, deparse.level=2)# even "0:2"
+4 x 15 sparse Matrix of class "dgCMatrix"
+  a  b  c  d  e f one   a    b    c    d    e   f zero 0:2
+A . -1  .  1  2 .   1   . -100    .  100  200   .    .   .
+B 2  . -1  .  1 2   1 200    . -100    .  100 200    .   1
+C 1  2  . -1  . 1   1 100  200    . -100    . 100    .   2
+D .  1  2  . -1 .   1   .  100  200    . -100   .    .   .
+> cBind(mT, one, zero, mT+10*mT, zero, 0:2)
+4 x 16 sparse Matrix of class "dgCMatrix"
+  a  b  c  d  e f one zero  a   b   c   d   e  f zero  
+A . -1  .  1  2 .   1    .  . -11   .  11  22  .    . .
+B 2  . -1  .  1 2   1    . 22   . -11   .  11 22    . 1
+C 1  2  . -1  . 1   1    . 11  22   . -11   . 11    . 2
+D .  1  2  . -1 .   1    .  .  11  22   . -11  .    . .
+> 
+> 
+> ## logical (sparse) - should remain logical :
+> L5 <- Diagonal(n = 5, x = TRUE); v5 <- rep(x = c(FALSE,TRUE), length = ncol(L5))
+> stopifnot(is(show(rBind(L5,v5)), "lsparseMatrix"),
++ 	  is(show(cBind(v5,L5)), "lsparseMatrix"),
++ 	  is(rBind(L5, 2* v5), "dsparseMatrix"),
++ 	  is(cBind(2* v5, L5), "dsparseMatrix"))
+6 x 5 sparse Matrix of class "lgCMatrix"
+   [,1] [,2] [,3] [,4] [,5]
+      |    .    .    .    .
+      .    |    .    .    .
+      .    .    |    .    .
+      .    .    .    |    .
+      .    .    .    .    |
+v5    .    |    .    |    .
+5 x 6 sparse Matrix of class "lgCMatrix"
+     v5          
+[1,]  . | . . . .
+[2,]  | . | . . .
+[3,]  . . . | . .
+[4,]  | . . . | .
+[5,]  . . . . . |
+> 
+> ## print() / show() of  non-structural zeros:
+> (m <- Matrix(c(0, 0, 2:0), 3, 5))
+3 x 5 sparse Matrix of class "dgCMatrix"
+     [,1] [,2] [,3] [,4] [,5]
+[1,]    .    1    .    .    2
+[2,]    .    .    2    .    1
+[3,]    2    .    1    .    .
+> (m2 <- cBind(m,m))
+3 x 10 sparse Matrix of class "dgCMatrix"
+     [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
+[1,]    .    1    .    .    2    .    1    .    .     2
+[2,]    .    .    2    .    1    .    .    2    .     1
+[3,]    2    .    1    .    .    2    .    1    .     .
+> (m4 <- rBind(m2,m2))
+6 x 10 sparse Matrix of class "dgCMatrix"
+     [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
+[1,]    .    1    .    .    2    .    1    .    .     2
+[2,]    .    .    2    .    1    .    .    2    .     1
+[3,]    2    .    1    .    .    2    .    1    .     .
+[4,]    .    1    .    .    2    .    1    .    .     2
+[5,]    .    .    2    .    1    .    .    2    .     1
+[6,]    2    .    1    .    .    2    .    1    .     .
+> diag(m4)
+[1] 0 0 1 0 1 2
+> for(i in 1:6) {
++     m4[i, i ] <- i
++     m4[i,i+1] <- 0
++ }
+> m4 ## now show some non-structural zeros:
+6 x 10 sparse Matrix of class "dgCMatrix"
+     [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
+[1,]    1    .    .    .    2    .    1    .    .     2
+[2,]    .    2    .    .    1    .    .    2    .     1
+[3,]    2    .    3    .    .    2    .    1    .     .
+[4,]    .    1    .    4    .    .    1    .    .     2
+[5,]    .    .    2    .    5    .    .    2    .     1
+[6,]    2    .    1    .    .    6    .    1    .     .
+> 
+> ## Mixture of dense and sparse/diagonal -- used to fail, even in 1.0-0
+> D5 <- Diagonal(x = 10*(1:5))
+> (D5.1 <- cbind2(D5, 1))
+5 x 6 sparse Matrix of class "dgCMatrix"
+     [,1] [,2] [,3] [,4] [,5] [,6]
+[1,]   10    .    .    .    .    1
+[2,]    .   20    .    .    .    1
+[3,]    .    .   30    .    .    1
+[4,]    .    .    .   40    .    1
+[5,]    .    .    .    .   50    1
+> ## "FIXME" in newer versions of R, do not need Matrix() here:
+> s42 <- Matrix(z42 <- cbind2(rep(0:1,4), rep(1:0,4)),
++               sparse=TRUE)
+> (C86 <- rBind(1, 0, D5.1, 0))
+8 x 6 sparse Matrix of class "dgCMatrix"
+     [,1] [,2] [,3] [,4] [,5] [,6]
+[1,]    1    1    1    1    1    1
+[2,]    .    .    .    .    .    .
+[3,]   10    .    .    .    .    1
+[4,]    .   20    .    .    .    1
+[5,]    .    .   30    .    .    1
+[6,]    .    .    .   40    .    1
+[7,]    .    .    .    .   50    1
+[8,]    .    .    .    .    .    .
+> stopifnotValid(D5.1, "dgCMatrix")
+> stopifnotValid(print(rbind2(Matrix(1:10, 2,5), D5)),   "dgCMatrix")
+7 x 5 sparse Matrix of class "dgCMatrix"
+     [,1] [,2] [,3] [,4] [,5]
+[1,]    1    3    5    7    9
+[2,]    2    4    6    8   10
+[3,]   10    .    .    .    .
+[4,]    .   20    .    .    .
+[5,]    .    .   30    .    .
+[6,]    .    .    .   40    .
+[7,]    .    .    .    .   50
+> stopifnotValid(print(cbind2(Matrix(10:1, 5,2), D5.1)), "dgeMatrix")
+5 x 8 Matrix of class "dgeMatrix"
+     [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
+[1,]   10    5   10    0    0    0    0    1
+[2,]    9    4    0   20    0    0    0    1
+[3,]    8    3    0    0   30    0    0    1
+[4,]    7    2    0    0    0   40    0    1
+[5,]    6    1    0    0    0    0   50    1
+> stopifnotValid(zz <- cbind2(z42, C86), "dgCMatrix")
+> stopifnot(identical(zz, cbind2(s42, C86)))
+> 
+> ## Using "nMatrix"
+> (m1 <- sparseMatrix(1:3, 1:3)) # ngCMatrix
+3 x 3 sparse Matrix of class "ngCMatrix"
+     [,1] [,2] [,3]
+[1,]    |    .    .
+[2,]    .    |    .
+[3,]    .    .    |
+> m2 <- sparseMatrix(1:3, 1:3, x = 1:3)
+> stopifnotValid(c12 <- cBind(m1,m2), "dgCMatrix") # was "ngC.." because of cholmod_horzcat !
+> stopifnotValid(c21 <- cBind(m2,m1), "dgCMatrix") #  ditto
+> stopifnotValid(r12 <- rBind(m1,m2), "dgCMatrix") # was "ngC.." because of cholmod_vertcat !
+> stopifnotValid(r21 <- rBind(m2,m1), "dgCMatrix") #  ditto
+> d1 <- as(m1, "denseMatrix")
+> d2 <- as(m2, "denseMatrix")
+> stopifnotValid(cbind2(d2,d1), "dgeMatrix")
+> stopifnotValid(cbind2(d1,d2), "dgeMatrix")## gave an error in Matrix 1.1-5
+> stopifnotValid(rbind2(d2,d1), "dgeMatrix")
+> stopifnotValid(rbind2(d1,d2), "dgeMatrix")## gave an error in Matrix 1.1-5
+> 
+> ## rbind2() / cbind2() mixing sparse/dense: used to "fail",
+> ## ------------------- then (in 'devel', ~ 2015-03): completely wrong
+> S <- .sparseDiagonal(2)
+> s <- diag(2)
+> S9 <- rBind(S,0,0,S,0,NaN,0,0,0,2)## r/cbind2() failed to determine 'sparse' in Matrix <= 1.2-2
+> s9 <- rbind(s,0,0,s,0,NaN,0,0,0,2)
+> assert.EQ.mat(S9, s9)
+> D <- Matrix(1:6, 3,2); d <- as.matrix(D)
+> T9 <- t(S9); t9 <- t(s9); T <- t(D); t <- t(d)
+> stopifnot(identical(rbind (s9,d), rbind2(s9,d)),
++ 	  identical(rbind2(D,S9), t(cbind2(T,T9))),
++ 	  identical(rbind2(S9,D), t(cbind2(T9,T))))
+> assert.EQ.mat(rbind2(S9,D), rbind2(s9,d))
+> assert.EQ.mat(rbind2(D,S9), rbind2(d,s9))
+> ## now with cbind2() -- no problem!
+> stopifnot(identical(cbind (t9,t), cbind2(t9,t)))
+> assert.EQ.mat(cbind2(T9,T), cbind2(t9,t))
+> assert.EQ.mat(cbind2(T,T9), cbind2(t,t9))
+> 
+> 
+> 
+> options(op)
+> showProc.time()
+Time elapsed:  0.181 0.017 0.198 
+> 
+> proc.time()
+   user  system elapsed 
+  1.028   0.149   1.259 
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/tests/base-matrix-fun.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/tests/base-matrix-fun.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/tests/base-matrix-fun.R	(revision 2477)
@@ -0,0 +1,45 @@
+#### Thanks to the manipulation in base namespace, see  ../R/zzz.R ,
+#### all the functions (in 'base' or namespaces that import it)
+#### starting with something like
+####	" x <- as.matrix(x) "  or   " X <- as.array(X) "
+#### will work for 'Matrix'-matrices
+
+library(Matrix)
+
+data(KNex); mm <- KNex$mm
+str(m1 <- mm[1:500, 1:200])
+m11 <- m1[1:100, 1:20]
+## These now work thanks to using our as.matrix():
+str(D1 <- dist(m11))
+str(rs <- apply(m1, 1, sum))
+
+stopifnot(identical(kappa(Matrix(2:5, 2)),
+                    kappa(matrix(2:5, 2))))
+## used to seg.fault, PR#7984,
+## because qr() was calling the wrong as.matrix()
+
+## also matplot() or pairs().
+
+## a regression test for  as.matrix.dist(.) still working
+stopifnot(c(43, 43) == dim(as.matrix(d <- dist(USJudgeRatings))))
+
+m <- Matrix(0:5, 3, 2)
+(m2 <- Matrix(diag(c(3,1))))
+(m3 <- crossprod(t(m))) # <- that's an S4 method; nothing "base"
+
+str( svd(m) )
+str( lapply(eigen(m3), zapsmall))
+
+### outer()  used to work thanks to  as.array() -- up to R 2.2.1
+##  no longer, because the definition of outer has changed  -- FIXME?
+## Whould work by providing an as.vector(.) method
+##  *and*  is.array(.) \-> TRUE  which may be too strong
+##--> For %o%: "need" to make  outer(.,.) an S3 generic
+##    *and* provide Matrix S3 methods
+## stopifnot(identical(outer(m, m2),
+##                    outer(as(m,"matrix"), as(m2,"matrix"))),
+##          identical(outer(m3, m2),
+##                    outer(as(m3,"matrix"), as(m2,"matrix"))))
+
+
+cat('Time elapsed: ', proc.time(),'\n') # for ``statistical reasons''
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/tests/write-read.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/tests/write-read.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/tests/write-read.R	(revision 2477)
@@ -0,0 +1,57 @@
+library(Matrix)
+
+####  Read / Write  (sparse) Matrix objects ----------------------
+
+### Rebuild the 'mm' example matrix, now in KNex data
+
+### This is no longer really important, as we now use
+### ../data/KNex.R  which creates the S4 object *every time*
+data(KNex)
+
+## recreate 'mm' from list :
+sNms <- c("Dim", "i","p","x")
+L <- lapply(sNms, function(SN) slot(KNex$mm, SN)); names(L) <- sNms
+mm2 <- new(class(KNex$mm))
+for (n in sNms) slot(mm2, n) <- L[[n]]
+
+stopifnot(validObject(mm2),
+          identical(mm2, KNex$mm))
+L$y <- KNex$y
+## save(L, file = "/u/maechler/R/Pkgs/Matrix/inst/external/KNex_slots.rda")
+
+
+## recreate 'mm' from ASCI file :
+mmT <- as(KNex$mm, "dgTMatrix")
+str(mmT)
+mm3 <- cbind(i = mmT@i, j = mmT@j, x = mmT@x)
+write.table(mm3, file = "mm-Matrix.tab", row.names=FALSE)# -> ASCII version
+
+str(mmr <- read.table("mm-Matrix.tab", header = TRUE))
+mmr$i <- as.integer(mmr$i)
+mmr$j <- as.integer(mmr$j)
+
+mmN <- with(mmr, new("dgTMatrix", Dim = c(max(i)+1:1,max(j)+1:1),
+                     i = i, j = j, x = x))
+
+stopifnot(identical(mmT, mmN)) # !!
+## weaker (and hence TRUE too):
+stopifnot(all.equal(as(mmN, "matrix"),
+                    as(mmT, "matrix"), tol=0))
+
+mm <- as(mmN, "dgCMatrix")
+stopifnot(all.equal(mm, KNex$mm))
+## save(mm, file = "....../Matrix/data/mm.rda", compress = TRUE)
+
+
+A <- Matrix(c(1,0,3,0,0,5), 10, 10, sparse = TRUE) # warning about [6] vs [10]
+(fname <- file.path(tempdir(), "kk.mm"))
+writeMM(A, fname)
+(B  <- readMM(fname))
+validObject(B)
+Bc <- as(B, "CsparseMatrix")
+stopifnot(identical(A, Bc))
+
+fname <- system.file("external", "wrong.mtx", package = "Matrix")
+r <- try(readMM(fname))
+stopifnot(inherits(r, "try-error"), length(grep("readMM.*row.*1:nr", r)) == 1)
+## gave a much less intelligible error message
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/tests/abIndex-tsts.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/tests/abIndex-tsts.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/tests/abIndex-tsts.R	(revision 2477)
@@ -0,0 +1,123 @@
+#### Testing consistency  of  "abIndex" == "abstract-indexing vectors" class :
+library(Matrix)
+
+source(system.file("test-tools.R", package = "Matrix"))# identical3() etc
+
+validObject(ab <- new("abIndex"))
+str(ab)
+
+set.seed(1)
+ex. <- list(2:1000, 0:10, sample(100), c(-3:40, 20:70),
+            c(1:100,77L, 50:40, 10L), c(17L, 3L*(12:3)))
+## we know which kinds will come out: "compressed" for all but random:
+rD <- "rleDiff"; kinds <- c(rD,rD,"int32", rD, rD, rD)
+isCmpr <- kinds == rD
+ab. <- lapply(ex., as, Class = "abIndex")
+nu. <- lapply(ab., as, Class = "numeric")
+in. <- lapply(ab., as, Class = "integer")
+rles <- lapply(ab.[isCmpr], function(u) u@rleD@rle)
+r.x <-  lapply(ex.[isCmpr], function(.) rle(diff(.)))
+
+stopifnot(sapply(ab., validObject),
+          identical(ex., nu.),
+          identical(ex., in.),
+          ## Check that the relevant cases really *are* "compressed":
+          sapply(ab., slot, "kind") == kinds,
+          ## Using rle(diff(.)) is equivalent to using our C code:
+          identical(rles, r.x),
+          ## Checking Group Methods - "Summary" :
+          sapply(ab., range) == sapply(ex., range),
+          sapply(ab., any) == sapply(ex., any),
+          TRUE)
+
+## testing c() method, i.e.  currently c.abIndex():
+tst.c.abI <- function(lii) {
+    stopifnot(is.list(lii),
+              all(unlist(lapply(lii, mode)) == "numeric"))
+    aii <- lapply(lii, as, "abIndex")
+    v.i <- do.call(c, lii)
+    a.i <- do.call(c, aii)
+    avi <- as(v.i, "abIndex")
+    ## identical() is too hard, as values & lengths can be double/integer
+    stopifnot(all.equal(a.i, avi, tolerance = 0))
+}
+tst.c.abI(list(2:6, 70:50, 5:-2))
+## now an example where *all* are uncompressed:
+tst.c.abI(list(c(5, 3, 2, 4, 7, 1, 6), 3:4, 1:-1))
+## and one with parts that are already non-trivial:
+exc <- ex.[isCmpr]
+tst.c.abI(exc)
+set.seed(101)
+N <- length(exc) # 5
+for(i in 1:10) {
+    tst.c.abI(exc[sample(N, replace=TRUE)])
+    tst.c.abI(exc[sample(N, N-1)])
+    tst.c.abI(exc[sample(N, N-2)])
+}
+
+for(n in 1:120) {
+    cat(".")
+    k <- 1 + 4*rpois(1, 5) # >= 1
+    ## "random" rle -- NB: consecutive values *must* differ (for uniqueness)
+    v <- as.integer(1+ 10*rnorm(k))
+    while(any(dv <- duplicated(v)))
+        v[dv] <- v[dv] + 1L
+    rl <- structure(list(lengths = as.integer(1 + rpois(k, 10)), values  = v),
+                    class = "rle")
+    ai <- new("abIndex", kind = "rleDiff",
+              rleD = new("rleDiff", first = rpois(1, 20), rle = rl))
+    validObject(ai)
+    ii <- as(ai, "numeric")
+    iN <- ii; iN[180] <- NA; aiN <- as(iN,"abIndex")
+    iN <- as(aiN, "numeric") ## NA from 180 on
+    stopifnot(is.numeric(ii), ii == round(ii),
+	      identical(ai, as(ii, "abIndex")),
+	      identical(is.na(ai), is.na(ii)),
+	      identical(is.na(aiN), is.na(iN)),
+	      identical(is.finite  (aiN),   is.finite(iN)),
+	      identical(is.infinite(aiN), is.infinite(iN))
+              )
+    if(n %% 40 == 0) cat(n,"\n")
+}
+
+## we have :  identical(lapply(ex., as, "abIndex"), ab.)
+
+mkStr <- function(ch, n) paste(rep.int(ch, n), collapse="")
+
+##O for(grMeth in getGroupMembers("Ops")) {
+##O     cat(sprintf("\n%s :\n%s\n", grMeth, mkStr("=", nchar(grMeth))))
+grMeth <- "Arith"
+    for(ng in getGroupMembers(grMeth)) {
+        cat(ng, ": ")
+        G <- get(ng)
+	t.tol <- if(ng == "/") 1e-12 else 0
+	## "/" with no long double (e.g. on Sparc Solaris): 1.125e-14
+	AEq <- function(a,b, ...) assert.EQ(a, b, tol=t.tol, giveRE=TRUE)
+        for(v in ex.) {
+            va <- as(v, "abIndex")
+            for(s in list(-1, 17L, TRUE, FALSE)) # numeric *and* logical
+		if(!((identical(s, FALSE) && ng == "/"))) { ## division by 0 may "fail"
+
+		    AEq(as(G(v, s), "abIndex"), G(va, s))
+		    AEq(as(G(s, v), "abIndex"), G(s, va))
+		}
+            cat(".")
+        }
+        cat(" [Ok]\n")
+    }
+##O }
+
+## check the abIndex versions of  indDiag() and indTri() :
+for(n in 1:7) {
+    stopifnotValid(ii <- Matrix:::abIindDiag(n), "abIndex")
+    stopifnot(ii@kind == "rleDiff",
+	      Matrix:::indDiag(n) == as(ii, "numeric"))
+}
+
+for(n in 0:7)
+ for(diag in c(TRUE,FALSE))
+  for(upper in c(TRUE,FALSE)) {
+      stopifnotValid(ii <- Matrix:::abIindTri(n, diag=diag,upper=upper), "abIndex")
+      stopifnot(Matrix:::indTri(n, diag=diag,upper=upper) == as(ii, "numeric"))
+  }
+cat('Time elapsed: ', (.pt <- proc.time()),'\n') # "stats"
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/tests/indexing.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/tests/indexing.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/tests/indexing.R	(revision 2477)
@@ -0,0 +1,1084 @@
+#### For both 'Extract' ("[") and 'Replace' ("[<-") Method testing
+####    aka    subsetting     and  subassignment
+
+#### suppressPackageStartupMessages(...)  as we have an *.Rout.save to Rdiff against
+stopifnot(suppressPackageStartupMessages(require(Matrix)))
+
+source(system.file("test-tools.R", package = "Matrix"), keep.source = FALSE)
+##-> identical3() etc
+cat("doExtras:",doExtras,"\n")
+
+if(interactive()) {
+    options(error = recover, warn = 1)
+} else if(FALSE) { ## MM @ testing *manually* only
+    options(error = recover, Matrix.verbose = TRUE, warn = 1)
+} else {
+    options(Matrix.verbose = TRUE, warn = 1)
+}
+
+
+### Dense Matrices
+
+m <- Matrix(1:28 +0, nrow = 7)
+validObject(m)
+stopifnot(identical(m, m[]),
+	  identical(m[2, 3],  16), # simple number
+	  identical(m[2, 3:4], c(16,23)), # simple numeric of length 2
+	  identical(m[NA,NA], as(Matrix(NA, 7,4), "dMatrix")))
+
+m[2, 3:4, drop=FALSE] # sub matrix of class 'dgeMatrix'
+m[-(4:7), 3:4]        # ditto; the upper right corner of 'm'
+
+## rows or columns only:
+m[1,]     # first row, as simple numeric vector
+m[,2]     # 2nd column
+m[,1:2]   # sub matrix of first two columns
+m[-(1:6),, drop=FALSE] # not the first 6 rows, i.e. only the 7th
+m[integer(0),] #-> 0 x 4 Matrix
+m[2:4, numeric(0)] #-> 3 x 0 Matrix
+
+## logical indexing
+stopifnot(identical(m[2,3], m[(1:nrow(m)) == 2, (1:ncol(m)) == 3]),
+          identical(m[2,], m[(1:nrow(m)) == 2, ]),
+          identical(m[,3:4], m[, (1:4) >= 3]))
+
+## dimnames indexing:
+mn <- m
+dimnames(mn) <- list(paste("r",letters[1:nrow(mn)],sep=""),
+                     LETTERS[1:ncol(mn)])
+checkMatrix(mn)
+mn["rd", "D"]
+msr <- ms <- as(mn,"sparseMatrix")
+mnr <- mn
+v <- rev(as(ms, "vector"))
+mnr[] <- v
+msr[] <- v # [<- "sparse" -- not very sensical; did fail w/o a message
+z <- msr; z[] <- 0
+zz <- as(array(0, dim(z)), "sparseMatrix")
+a.m <- as(mnr,"matrix")
+stopifnot(identical(mn["rc", "D"], mn[3,4]), mn[3,4] == 24,
+	  identical(mn[, "A"], mn[,1]), mn[,1] == 1:7,
+	  identical(mn[c("re", "rb"), "B"], mn[c(5,2), 2]),
+	  identical(ms["rc", "D"], ms[3,4]), ms[3,4] == 24,
+	  identical(ms[, "A"], ms[,1]), ms[,1] == 1:7,
+	  identical(ms[ci <- c("re", "rb"), "B"], ms[c(5,2), 2]),
+	  identical(rownames(mn[ci, ]), ci),
+	  identical(rownames(ms[ci, ]), ci),
+	  identical(colnames(mn[,cj <- c("B","D")]), cj),
+	  identical(colnames(ms[,cj]), cj),
+	  identical(a.m, as(msr,"matrix")),
+	  identical(unname(z), zz),
+	  identical(a.m, array(v, dim=dim(mn), dimnames=dimnames(mn)))
+	  )
+showProc.time()
+
+## R-forge Matrix bug #2556: Subsetting a sparse matrix did remove  names(dimnames(.)) :
+m44 <- matrix(1:16, 4, 4, dimnames=list(row=c('a','b','c','d'), col=c('x','y','z','w')))
+## Dense matrix: ------------------------------------------
+a <- Matrix(m44)
+identical(
+    dimnames(m44[,FALSE, drop=FALSE]),
+    dimnames(  a[,FALSE, drop=FALSE]))
+chk.ndn <- function(a, a0=m44)
+    stopifnot(identical(names(dimnames(a)), names(dimnames(a0))))
+i <- 1:2
+chk.ndn(a[i,]); chk.ndn(a[i, i])
+## Sparse matrix: -----------------------------------------
+s <- as(a %% 3 == 1, "sparseMatrix")
+ts <- as(s,"TsparseMatrix")
+b <- sparseMatrix(i=1:3, j=rep(2,3), dims=c(4,4), dimnames=dimnames(s))
+tb <- as(b,"TsparseMatrix")
+stopifnot(identical5(
+    dimnames(a), dimnames(s), dimnames(ts),
+    dimnames(b), dimnames(tb)))
+
+chk.ndn(b [i, i]); chk.ndn(b [i, ])
+chk.ndn(s [i, i]); chk.ndn(s [i, ])
+chk.ndn(tb[i, i]); chk.ndn(tb[i, ])
+chk.ndn(ts[i, i]); chk.ndn(ts[i, ])
+chk.ndn( b[ , 1, drop=FALSE]); chk.ndn( s[i, 2, drop=FALSE])
+chk.ndn(tb[ , 1, drop=FALSE]); chk.ndn(ts[i, 2, drop=FALSE])
+
+## Printing sparse colnames:
+ms[sample(28, 20)] <- 0
+ms <- t(rbind2(ms, 3*ms))
+cnam1 <- capture.output(show(ms))[2] ; op <- options("sparse.colnames" = "abb3")
+cnam2 <- capture.output(show(ms))[2] ; options(op) # revert
+stopifnot(## sparse printing
+	  grep("^ +$", cnam1) == 1, # cnam1 is empty
+	  identical(cnam2,
+		    paste(" ", paste(rep(rownames(mn), 2), collapse=" "))))
+
+mo <- m
+m[2,3] <- 100
+m[1:2, 4] <- 200
+m[, 1] <- -1
+m[1:3,]
+
+m. <- as.matrix(m)
+
+## m[ cbind(i,j) ] indexing:
+iN <- ij <- cbind(1:6, 2:3)
+iN[2:3,] <- iN[5,2] <- NA
+stopifnot(identical(m[ij], m.[ij]),
+	  identical(m[iN], m.[iN]))
+
+## testing operations on logical Matrices rather more than indexing:
+g10 <- m [ m > 10 ]
+stopifnot(18 == length(g10))
+stopifnot(10 == length(m[ m <= 10 ]))
+sel <- (20 <  m) & (m <  150)
+sel.<- (20 <  m.)& (m.<  150)
+nsel <-(20 >= m) | (m >= 150)
+(ssel <- as(sel, "sparseMatrix"))
+stopifnot(is(sel, "lMatrix"), is(ssel, "lsparseMatrix"),
+	  identical3(as.mat(sel.), as.mat(sel), as.mat(ssel)),
+	  identical3(!sel, !ssel, nsel), # !<sparse> is typically dense
+	  identical3(m[ sel],  m[ ssel], as.matrix(m)[as.matrix( ssel)]),
+	  identical3(m[!sel],  m[!ssel], as.matrix(m)[as.matrix(!ssel)])
+	  )
+showProc.time()
+
+## more sparse Matrices --------------------------------------
+
+##' @title Check sparseMatrix sub-assignment   m[i,j] <- v
+##' @param ms sparse Matrix
+##' @param mm its [traditional matrix]-equivalent
+##' @param k (approximate) length of index vectors (i,j)
+##' @param n.uniq (approximate) number of unique values in  i,j
+##' @param vRNG function(n) for random 'v' generation
+##' @param show logical; if TRUE, it will not stop on error
+##' @return
+##' @author Martin Maechler
+chkAssign <- function(ms, mm = as(ms, "matrix"),
+                      k = min(20,dim(mm)), n.uniq = k %/% 3,
+                      vRNG = { if(is.numeric(mm) || is.complex(mm))
+                                   function(n) rpois(n,lambda= 0.75)# <- about 47% zeros
+                      else ## logical
+                          function(n) runif(n) > 0.8 }, ## 80% zeros
+                      showOnly=FALSE)
+{
+    stopifnot(is(ms,"sparseMatrix"))
+    d <- dim(ms)
+    s1 <- function(n) sample(n, pmin(n, pmax(1, rpois(1, n.uniq))))
+    i <- sample(s1(d[1]), k/2+ rpois(1, k/2), replace = TRUE)
+    j <- sample(s1(d[2]), k/2+ rpois(1, k/2), replace = TRUE)
+    assert.EQ.mat(ms[i,j], mm[i,j])
+    ms2 <- ms. <- ms; mm. <- mm # save
+    ## now sub*assign* to these repeated indices, and then compare -----
+    v <- vRNG(length(i) * length(j))
+    mm[i,j] <- v
+    ms[i,j] <- v
+    ## useful to see (ii,ij), but confusing R/ESS when additionally debugging:
+    ## if(!showOnly && interactive()) { op <- options(error = recover); on.exit(options(op)) }
+    assert.EQ.mat(ms, mm, show=showOnly)
+    ## vector indexing m[cbind(i,j)] == m[i + N(j-1)] ,  N = nrow(.)
+    ii <- seq_len(min(length(i), length(j)))
+    i <- i[ii]
+    j <- j[ii]
+    ij <- cbind(i, j)
+    ii <- i + nrow(ms)*(j - 1)
+    ord.i <- order(ii)
+    iio <- ii[ord.i]
+    ui <- unique(iio) # compare these with :
+    neg.ii <- - setdiff(seq_len(prod(d)), ii)
+    stopifnot(identical(mm[ii], mm[ij]),
+              identical(ms.[ui], ms.[neg.ii]),
+	      ms.[ij] == mm.[ii], ## M[ cbind(i,j) ] was partly broken; now checking
+              ms.[ii] == mm.[ii])
+    v <- v[seq_len(length(i))]
+    if(is(ms,"nMatrix")) v <- as.logical(v)  # !
+    mm.[ij] <- v
+    ms.[ii] <- v
+    nodup <- (length(ui) == length(ii)) ## <==>  ! anyDuplicated(iio)
+    if(nodup) { cat("[-]") # rare, unfortunately
+	ms2[neg.ii] <- v[ord.i]
+	stopifnot(identical(ms2, ms.))
+    }
+    assert.EQ.mat(ms., mm., show=showOnly)
+} ##{chkAssign}
+
+## Get duplicated index {because these are "hard" (and rare)
+getDuplIndex <- function(n, k) {
+    repeat {
+        i <- sample(n, k, replace=TRUE) # 3 4 6 9 2 9 :  9 is twice
+        if(anyDuplicated(i)) break
+    }
+    i
+}
+
+## From package 'sfsmisc':
+repChar <- function (char, no) paste(rep.int(char, no), collapse = "")
+
+m <- 1:800
+set.seed(101) ; m[sample(800, 600)] <- 0
+m0 <- Matrix(m, nrow = 40)
+m1 <- add.simpleDimnames(m0)
+for(kind in c("n", "l", "d")) {
+ for(m in list(m0,m1)) { ## -- with and without dimnames -------------------------
+    kClass <-paste0(kind, "Matrix"  )
+    Ckind <- paste0(kind, "gCMatrix")
+    Tkind <- paste0(kind, "gTMatrix")
+    str(mC <- as(m, Ckind))
+    str(mT <- as(as(as(m, kClass), "TsparseMatrix"), Tkind))
+    mm <- as(mC, "matrix") # also logical or double
+    IDENT <- if(kind == "n") function(x,y) Q.eq2(x,y, tol=0) else identical
+    stopifnot(identical(mT, as(as(mC, "TsparseMatrix"), Tkind)),
+              identical(mC, as(mT, Ckind)),
+              Qidentical(mC[0,0], new(Ckind)),
+              Qidentical(mT[0,0], new(Tkind)),
+              identical(unname(mT[0,]), new(Tkind, Dim = c(0L,ncol(m)))),
+              identical(unname(mT[,0]), new(Tkind, Dim = c(nrow(m),0L))),
+              IDENT(mC[0,], as(mT[FALSE,], Ckind)),
+              IDENT(mC[,0], as(mT[,FALSE], Ckind)),
+              sapply(pmin(min(dim(mC)), c(0:2, 5:10)),
+                     function(k) {i <- seq_len(k); all(mC[i,i] == mT[i,i])}),
+              TRUE)
+    cat("ok\n")
+    show(mC[,1])
+    show(mC[1:2,])
+    show(mC[7,  drop = FALSE])
+    assert.EQ.mat(mC[1:2,], mm[1:2,])
+    assert.EQ.mat(mC[0,], mm[0,])
+    assert.EQ.mat(mC[,FALSE], mm[,FALSE])
+    ##
+    ## *repeated* (aka 'duplicated') indices - did not work at all ...
+    i <- pmin(nrow(mC), rep(8:10,2))
+    j <- c(2:4, 4:3)
+    assert.EQ.mat(mC[i,], mm[i,])
+    assert.EQ.mat(mC[,j], mm[,j])
+    ## FIXME? assert.EQ.mat(mC[,NA], mm[,NA]) -- mC[,NA] is all 0 "instead" of all NA
+    ## MM currently thinks we should  NOT  allow  <sparse>[ <NA> ]
+    assert.EQ.mat(mC[i, 2:1], mm[i, 2:1])
+    assert.EQ.mat(mC[c(4,1,2:1), j], mm[c(4,1,2:1), j])
+    assert.EQ.mat(mC[i,j], mm[i,j])
+    ##
+    ## set.seed(7)
+    op <- options(Matrix.verbose = FALSE)
+    cat(" for(): ")
+    for(n in 1:(if(doExtras) 50 else 5)) {
+	chkAssign(mC, mm)
+	chkAssign(mC[-3,-2], mm[-3,-2])
+        cat(".")
+    }
+    options(op)
+    cat(sprintf("\n[Ok]%s\n\n", repChar("-", 64)))
+ }
+ cat(sprintf("\nok( %s )\n== ###%s\n\n", kind, repChar("=", 70)))
+}## end{for}---------------------------------------------------------------
+showProc.time()
+
+if(doExtras) {### {was ./AAA_index.R, MM-only}
+    ## an nsparse-example
+    A <- Matrix(c(rep(c(1,0,0),2), rep(c(2,0),7), c(0,0,2), rep(0,4)), 3,9)
+    i <- c(3,1:2)
+    j <- c(3, 5, 9, 5, 9)
+    vv <- logical(length(i)*length(j)); vv[6:9] <- TRUE
+
+    print(An <- as(A,"nMatrix")); an <- as(An, "matrix")
+    assert.EQ.mat(An, an)
+    An[i, j] <- vv
+    an[i, j] <- vv
+    assert.EQ.mat(An, an)## error
+    if(!all(An == an)) show(drop0(An - an))
+    ## all are +1
+
+    options("Matrix.subassign.verbose" = TRUE)# output from C
+    An <- as(A,"nMatrix"); An[i, j] <- vv
+    ## and compare with this:
+    Al <- as(A,"lMatrix"); Al[i, j] <- vv
+    options("Matrix.subassign.verbose" = FALSE)
+
+    ##--- An interesting not small not large example  for  M[i,j] <- v ------------
+    ##
+    M <- Matrix(c(1, rep(0,7), 1:4), 3,4)
+    N0 <- kronecker(M,M)
+    mkN1 <- function(M) {
+        stopifnot(length(d <- dim(M)) == 2)
+        isC <- is(M,"CsparseMatrix")
+        M[,d[2]] <- c(0,2,0)
+        N <- kronecker(diag(x=1:2), M)## remains sparse if 'M' is
+        if(isC) N <- as(N, "CsparseMatrix")
+        diag(N[-1,]) <- -2
+        N[9,]  <- 1:4   # is recycled
+        N[,12] <- -7:-9 # ditto
+        N
+    }
+
+    show(N1 <- t(N <- mkN1(N0)))    # transpose {for display reasons}
+    C1 <- t(C <- mkN1(as(N0,"CsparseMatrix")))
+    stopifnot(all(C == N))
+    assert.EQ.mat(C, mkN1(as.matrix(N0)))
+
+    C. <- C1
+    show(N <- N1) ; n <- as.matrix(N); str(N)
+    sort(i <- c(6,8,19,11,21,20,10,7,12,9,5,18,17,22,13))## == c(5:13, 17:22))
+    sort(j <- c(3,8,6,15,10,4,14,13,16,2,11,17,7,5))## == c(2:8, 10:11, 13:17)
+    val <- v.l <- 5*c(0,6,0,7,0,0,8:9, 0,0)
+    show(spv <- as(val, "sparseVector")); str(spv)
+
+    n [i,j] <- v.l
+    N [i,j] <- val# is recycled, too
+    C.[i,j] <- val
+    assert.EQ.mat(N,n) ; stopifnot(all(C. == N))
+    ## and the same *again*:
+    n [i,j] <- v.l
+    N [i,j] <- val
+    C.[i,j] <- val
+    assert.EQ.mat(N,n)
+    stopifnot(all(C. == N))
+
+    print(load(system.file("external", "symA.rda", package="Matrix"))) # "As"
+    stopifnotValid(As, "dsCMatrix"); stopifnot(identical(As@factors, list()))
+    R. <- drop0(chol(As))
+    stopifnot(1:32 == sort(diag(R.)), ## !
+              R.@x == as.integer(R.@x),## so it is an integer-valued chol-decomp !
+              ## shows that (1) As is *not* singular  (2) the matrix is not random
+              all.equal(crossprod(R.), As, tolerance =1e-15))
+    print(summary(evA <- eigen(As, only.values=TRUE)$val))
+    print(tail(evA)) ## largest three ~= 10^7,  smallest two *negative*
+    print(rcond(As)) # 1.722 e-21 == very bad !
+    ##-> this *is* a border line case, i.e. very close to singular !
+    ## and also determinant(.) is rather random here!
+    cc0 <- Cholesky(As)# no problem
+    try({
+        cc <- Cholesky(As, super=TRUE)
+        ## gives --on 32-bit only--
+        ## Cholmod error 'matrix not positive definite' at file:../Supernodal/t_cholmod_super_numeric.c, line 613
+        ecc <- expand(cc)
+        L.P <- with(ecc, crossprod(L,P))  ## == L'P
+        ## crossprod(L.P) == (L'P)' L'P == P'LL'P
+        stopifnot( all.equal(crossprod(L.P), As) )
+    })
+    ##---- end{ eigen( As ) -----------
+
+} ## only if(doExtras)
+
+
+##---- Symmetric indexing of symmetric Matrix ----------
+m. <- mC
+m.[, c(2, 7:12)] <- 0
+stopifnotValid(S <- crossprod(add.simpleDimnames(m.) %% 100), "dsCMatrix")
+ss <- as(S, "matrix")
+ds <- as(S, "denseMatrix")
+## NA-indexing of *dense* Matrices: should work as traditionally
+assert.EQ.mat(ds[NA,NA], ss[NA,NA])
+assert.EQ.mat(ds[NA,  ], ss[NA,])
+assert.EQ.mat(ds[  ,NA], ss[,NA])
+T <- as(S, "TsparseMatrix")
+stopifnot(identical(ds[2 ,NA], ss[2,NA]),
+	  identical(ds[NA, 1], ss[NA, 1]),
+	  identical(S, as(T, "CsparseMatrix")) )
+
+## non-repeated indices:
+i <- c(7:5, 2:4);assert.EQ.mat(T[i,i], ss[i,i])
+## NA in indices  -- check that we get a helpful error message:
+i[2] <- NA
+er <- tryCatch(T[i,i], error = function(e)e)
+stopifnot(as.logical(grep("indices.*sparse Matrices", er$message)))
+
+N <- nrow(T)
+set.seed(11)
+for(n in 1:(if(doExtras) 50 else 3)) {
+    i <- sample(N, max(2, sample(N,1)), replace = FALSE)
+    validObject(Tii <- T[i,i]) ; tTi <- t(T)[i,i]
+    stopifnot(is(Tii, "dsTMatrix"), # remained symmetric Tsparse
+	      is(tTi, "dsTMatrix"), # may not be identical when *sorted* differently
+	      identical(as(t(Tii),"CsparseMatrix"), as(tTi,"CsparseMatrix")))
+    assert.EQ.mat(Tii, ss[i,i])
+}
+
+b <- diag(1:2)[,c(1,1,2,2)]
+cb <- crossprod(b)
+cB <- crossprod(Matrix(b, sparse=TRUE))
+a <- matrix(0, 6, 6)
+a[1:4, 1:4] <- cb
+A1 <- A2 <- Matrix(0, 6, 6)#-> sparse
+A1[1:4, 1:4] <- cb
+A2[1:4, 1:4] <- cB
+assert.EQ.mat(A1, a)# indeed
+stopifnot(identical(A1, A2), is(A1, "dsCMatrix"))
+
+## repeated ones ``the challenge'' (to do smartly):
+j <- c(4, 4, 9, 12, 9, 4, 17, 3, 18, 4, 12, 18, 4, 9)
+assert.EQ.mat(T[j,j], ss[j,j])
+## and another two sets  (a, A) &  (a., A.) :
+a <- matrix(0, 6,6)
+a[upper.tri(a)] <- (utr <- c(2, 0,-1, 0,0,5, 7,0,0,0, 0,0,-2,0,8))
+ta <- t(a); ta[upper.tri(a)] <- utr; a <- t(ta)
+diag(a) <- c(0,3,0,4,6,0)
+A <- as(Matrix(a), "TsparseMatrix")
+A. <- A
+diag(A.) <- 10 * (1:6)
+a. <- as(A., "matrix")
+## More testing {this was not working for a long time..}
+set.seed(1)
+for(n in 1:(if(doExtras) 100 else 6)) {
+    i <- sample(1:nrow(A), 3+2*rpois(1, lam=3), replace=TRUE)
+    Aii  <- A[i,i]
+    A.ii <- A.[i,i]
+    stopifnot(class(Aii) == class(A),
+              class(A.ii) == class(A.))
+    assert.EQ.mat(Aii , a [i,i])
+    assert.EQ.mat(A.ii, a.[i,i])
+    assert.EQ.mat(T[i,i], ss[i,i])
+}
+showProc.time()
+
+stopifnot(all.equal(mC[,3], mm[,3]),
+	  identical(mC[ij], mC[ij + 0.4]),
+	  identical(mC[ij], mm[ij]),
+	  identical(mC[iN], mm[iN]))
+## out of bound indexing must be detected:
+assertError(mC[cbind(ij[,1] - 5, ij[,2])])
+assertError(mC[cbind(ij[,1],     ij[,2] + ncol(mC))])
+
+assert.EQ.mat(mC[7, , drop=FALSE], mm[7, , drop=FALSE])
+identical    (mC[7,   drop=FALSE], mm[7,   drop=FALSE]) # *vector* indexing
+
+stopifnot(dim(mC[numeric(0), ]) == c(0,20), # used to give warnings
+          dim(mC[, integer(0)]) == c(40,0),
+          identical(mC[, integer(0)], mC[, FALSE]))
+validObject(print(mT[,c(2,4)]))
+stopifnot(all.equal(mT[2,], mm[2,]),
+	  ## row or column indexing in combination with t() :
+	  Q.C.identical(mT[2,], t(mT)[,2]),
+	  Q.C.identical(mT[-2,], t(t(mT)[,-2])),
+	  Q.C.identical(mT[c(2,5),], t(t(mT)[,c(2,5)])) )
+assert.EQ.mat(mT[4,, drop = FALSE], mm[4,, drop = FALSE])
+stopifnot(identical3(mm[,1], mC[,1], mT[,1]),
+	  identical3(mm[3,], mC[3,], mT[3,]),
+	  identical3(mT[2,3], mC[2,3], 0),
+	  identical(mT[], mT),
+          identical4(       mm[c(3,7), 2:4],  as.mat( m[c(3,7), 2:4]),
+                     as.mat(mT[c(3,7), 2:4]), as.mat(mC[c(3,7), 2:4]))
+          )
+
+x.x <- crossprod(mC)
+stopifnot(class(x.x) == "dsCMatrix",
+          class(x.x. <- round(x.x / 10000)) == "dsCMatrix",
+          identical(x.x[cbind(2:6, 2:6)],
+                    diag(x.x [2:6, 2:6])))
+head(x.x.) # Note the *non*-structural 0's printed as "0"
+tail(x.x., -3) # all but the first three lines
+
+lx.x <- as(x.x, "lsCMatrix") # FALSE only for "structural" 0
+(l10 <- lx.x[1:10, 1:10])# "lsC"
+(l3 <-  lx.x[1:3, ])
+m.x <- as.mat(x.x) # as.mat() *drops* (NULL,NULL) dimnames
+stopifnot(class(l10) == "lsCMatrix", # symmetric indexing -> symmetric !
+          identical(as.mat(lx.x), m.x != 0),
+          identical(as.logical(lx.x), as.logical(m.x)),
+          identical(as.mat(l10), m.x[1:10, 1:10] != 0),
+          identical(as.mat(l3 ), m.x[1:3, ] != 0)
+          )
+
+##-- Sub*assignment* with repeated / duplicated index:
+A <- Matrix(0,4,3) ; A[c(1,2,1), 2] <- 1 ; A
+B <- A;              B[c(1,2,1), 2] <- 1:3; B; B. <- B
+B.[3,] <- rbind(4:2)
+## change the diagonal and the upper and lower subdiagonal :
+diag(B.) <- 10 * diag(B.)
+diag(B.[,-1]) <- 5* diag(B.[,-1])
+diag(B.[-1,]) <- 4* diag(B.[-1,]) ; B.
+C <- B.; C[,2] <- C[,2];  C[1,] <- C[1,]; C[2:3,2:1] <- C[2:3,2:1]
+stopifnot(identical(unname(as.matrix(A)),
+		    local({a <- matrix(0,4,3); a[c(1,2,1), 2] <-  1 ; a})),
+	  identical(unname(as.matrix(B)),
+		    local({a <- matrix(0,4,3); a[c(1,2,1), 2] <- 1:3; a})),
+	  identical(C, drop0(B.)))
+## <sparse>[<logicalSparse>] <- v  failed in the past
+T <- as(C,"TsparseMatrix"); C. <- C
+T[T>0] <- 21
+C[C>0] <- 21
+a. <- local({a <- as.matrix(C.); a[a>0] <- 21; a})
+assert.EQ.mat(C, a.)
+stopifnot(identical(C, as(T, "CsparseMatrix")))
+
+## used to fail
+n <- 5 ## or much larger
+sm <- new("dsTMatrix", i=1L, j=1L, Dim=as.integer(c(n,n)), x = 1)
+(cm <- as(sm, "CsparseMatrix"))
+sm[2,]
+stopifnot(sm[2,] == c(0:1, rep.int(0,ncol(sm)-2)),
+	  sm[2,] == cm[2,],
+	  sm[,3] == sm[3,],
+	  all(sm[,-(1:3)] == t(sm[-(1:3),])), # all(<lge.>)
+	  all(sm[,-(1:3)] == 0)
+	  )
+showProc.time()
+
+##---  "nsparse*" sub-assignment :----------
+M <- Matrix(c(1, rep(0,7), 1:4), 3,4)
+N0 <- kronecker(M,M)
+Nn <- as(N0, "nMatrix"); nn <- as(Nn,"matrix")
+(Nn00 <- Nn0 <- Nn); nn00 <- nn0 <- nn
+
+set.seed(1)
+Nn0 <- Nn00; nn0 <- nn00
+for(i in 1:(if(doExtras) 200 else 25)) {
+    Nn <- Nn0
+    nn <- nn0
+    i. <- getDuplIndex(nrow(N0), 6)
+    j. <- getDuplIndex(ncol(N0), 4)
+    vv <- sample(c(FALSE,TRUE),
+                 length(i.)*length(j.), replace=TRUE)
+    cat(",")
+    Nn[i., j.] <- vv
+    nn[i., j.] <- vv
+    assert.EQ.mat(Nn, nn)
+    if(!all(Nn == nn)) {
+        cat("i=",i,":\n i. <- "); dput(i.)
+        cat("j. <- "); dput(j.)
+        cat("which(vv): "); dput(which(vv))
+        cat("Difference matrix:\n")
+        show(drop0(Nn - nn))
+    }
+    cat("k")
+    ## sub-assign double precision to logical sparseMatrices: now *with* warning:
+    ##  {earlier: gave *no* warning}:
+    assertWarning(Nn[1:2,] <- -pi)
+    assertWarning(Nn[, 5] <- -pi)
+    assertWarning(Nn[2:4, 5:8] <- -pi)
+    stopifnotValid(Nn,"nsparseMatrix")
+    ##
+    cat(".")
+    if(i %% 10 == 0) cat("\n")
+    if(i == 100) {
+        Nn0 <- as(Nn0, "CsparseMatrix")
+        cat("Now: class", class(Nn0)," :\n~~~~~~~~~~~~~~~~~\n")
+    }
+}
+showProc.time()
+Nn <- Nn0
+## Check that  NA is interpreted as TRUE (with a warning), for "nsparseMatrix":
+assertWarning(Nn[ii <-     3  ] <- NA); stopifnot(isValid(Nn,"nsparseMatrix"), Nn[ii])
+assertWarning(Nn[ii <-   22:24] <- NA); stopifnot(isValid(Nn,"nsparseMatrix"), Nn[ii])
+assertWarning(Nn[ii <- -(1:99)] <- NA); stopifnot(isValid(Nn,"nsparseMatrix"), Nn[ii])
+assertWarning(Nn[ii <- 3:4  ] <- c(0,NA))
+stopifnot(isValid(Nn,"nsparseMatrix"), Nn[ii] == 0:1)
+assertWarning(Nn[ii <- 25:27] <- c(0,1,NA))
+stopifnot(isValid(Nn,"nsparseMatrix"), Nn[ii] == c(FALSE,TRUE,TRUE))
+
+m0 <- Diagonal(5)
+stopifnot(identical(m0[2,], m0[,2]),
+	  identical(m0[,1], c(1,0,0,0,0)))
+### Diagonal -- Sparse:
+(m1 <- as(m0, "TsparseMatrix")) # dtTMatrix unitriangular
+(m2 <- as(m0, "CsparseMatrix")) # dtCMatrix unitriangular
+m1g <- as(m1, "generalMatrix")
+tr1 <- as(m1, "denseMatrix") # dtrMatrix unitriangular
+stopifnotValid(m1g, "dgTMatrix")
+diag(tr1) <- 100
+stopifnot(diag(tr1) == 100)# failed when 'diag<-' did not recycle
+assert.EQ.mat(m2[1:3,],    diag(5)[1:3,])
+assert.EQ.mat(m2[,c(4,1)], diag(5)[,c(4,1)])
+stopifnot(identical(m2[1:3,], as(m1[1:3,], "CsparseMatrix")),
+          identical(uniqTsparse(m1[, c(4,2)]),
+                    uniqTsparse(as(m2[, c(4,2)], "TsparseMatrix")))
+          )## failed in 0.9975-11
+
+(uTr <- new("dtTMatrix", Dim = c(3L,3L), diag="U"))
+uTr[1,] <- 0
+assert.EQ.mat(uTr, cbind(0, rbind(0,diag(2))))
+
+M <- m0; M[1,] <- 0
+Z <- m0; Z[] <- 0; z <- array(0, dim(M))
+stopifnot(identical(M, Diagonal(x=c(0, rep(1,4)))),
+          all(Z == 0), Qidentical(as(Z, "matrix"), z))
+M <- m0; M[,3] <- 3 ; M ; stopifnot(is(M, "sparseMatrix"), M[,3] == 3)
+checkMatrix(M)
+M <- m0; M[1:3, 3] <- 0 ;M
+T <- m0; T[1:3, 3] <- 10
+stopifnot(identical(M, Diagonal(x=c(1,1, 0, 1,1))),
+          isValid(T, "triangularMatrix"), identical(T[,3], c(10,10,10,0,0)))
+
+M <- m1; M[1,] <- 0 ; M ; assert.EQ.mat(M, diag(c(0,rep(1,4))), tol=0)
+M <- m1; M[,3] <- 3 ; stopifnot(is(M,"sparseMatrix"), M[,3] == 3)
+Z <- m1; Z[] <- 0
+checkMatrix(M)
+M <- m1; M[1:3, 3] <- 0 ;M
+assert.EQ.mat(M, diag(c(1,1, 0, 1,1)), tol=0)
+T <- m1; T[1:3, 3] <- 10; checkMatrix(T)
+stopifnot(is(T, "triangularMatrix"), identical(T[,3], c(10,10,10,0,0)),
+	  Qidentical(as(Z, "matrix"), z))
+
+M <- m2; M[1,] <- 0 ; M ; assert.EQ.mat(M, diag(c(0,rep(1,4))), tol=0)
+M <- m2; M[,3] <- 3 ; stopifnot(is(M,"sparseMatrix"), M[,3] == 3)
+checkMatrix(M)
+Z <- m2; Z[] <- 0
+M <- m2; M[1:3, 3] <- 0 ;M
+assert.EQ.mat(M, diag(c(1,1, 0, 1,1)), tol=0)
+T <- m2; T[1:3, 3] <- 10; checkMatrix(T)
+stopifnot(is(T, "dtCMatrix"), identical(T[,3], c(10,10,10,0,0)),
+	  Qidentical(as(Z, "matrix"), z))
+showProc.time()
+
+
+## "Vector indices" -------------------
+asLogical <- function(x) {
+    stopifnot(is.atomic(x))
+    storage.mode(x) <- "logical"
+    x
+}
+.iniDiag.example <- expression({
+    D <- Diagonal(6)
+    M <- as(D,"dgeMatrix")
+    m <- as(D,"matrix")
+    s <- as(D,"TsparseMatrix"); N <- as(s,"nMatrix")
+    S <- as(s,"CsparseMatrix"); C <- as(S,"nMatrix")
+})
+eval(.iniDiag.example)
+i <- c(3,1,6); v <- c(10,15,20)
+## (logical,value) which both are recycled:
+L <- c(TRUE, rep(FALSE,8)) ; z <- c(50,99)
+
+## vector subassignment, both with integer & logical
+## these now work correctly {though not very efficiently; hence warnings}
+m[i] <- v # the role model: only first column is affected
+M[i] <- v; assert.EQ.mat(M,m) # dge
+D[i] <- v; assert.EQ.mat(D,m) # ddi -> dtT -> dgT
+s[i] <- v; assert.EQ.mat(s,m) # dtT -> dgT
+S[i] <- v; assert.EQ.mat(S,m); S # dtC -> dtT -> dgT -> dgC
+m.L <- asLogical(m)
+C[i] <- v # - with a warning: C is nMatrix, v not T/F
+assert.EQ.mat(C,m.L); validObject(C)
+N[i] <- v # - with a warning
+assert.EQ.mat(N,m.L); validObject(N)
+stopifnot(Q.C.identical(D,s, checkClass=FALSE))
+## logical *vector* indexing
+eval(.iniDiag.example)
+m[L] <- z; m.L <- asLogical(m)
+M[L] <- z; assert.EQ.mat(M,m)
+D[L] <- z; assert.EQ.mat(D,m)
+s[L] <- z; assert.EQ.mat(s,m)
+S[L] <- z; assert.EQ.mat(S,m) ; S
+C[L] <- z; assert.EQ.mat(C,m.L) # with a good warning
+N[L] <- z; assert.EQ.mat(N,m.L)
+
+
+## indexing [i]  vs  [i,] --- now ok
+eval(.iniDiag.example)
+stopifnot(identical5(m[i], M[i], D[i], s[i], S[i]), identical3(as.logical(m[i]), C[i], N[i]),
+          identical5(m[L], M[L], D[L], s[L], S[L]), identical3(as.logical(m[L]), C[L], N[L]))
+## bordercase ' drop = .' *vector* indexing {failed till 2009-04-..)
+stopifnot(identical5(m[i,drop=FALSE], M[i,drop=FALSE], D[i,drop=FALSE],
+		     s[i,drop=FALSE], S[i,drop=FALSE]),
+	  identical3(as.logical(m[i,drop=FALSE]),
+		     C[i,drop=FALSE], N[i,drop=FALSE]))
+stopifnot(identical5(m[L,drop=FALSE], M[L,drop=FALSE], D[L,drop=FALSE],
+		     s[L,drop=FALSE], S[L,drop=FALSE]),
+	  identical3(as.logical(m[L,drop=FALSE]),
+		     C[L,drop=FALSE], N[L,drop=FALSE]))
+## using L for row-indexing should give an error
+assertError(m[L,]); assertError(m[L,, drop=FALSE])
+## these did not signal an error, upto (including) 0.999375-30:
+assertError(s[L,]); assertError(s[L,, drop=FALSE])
+assertError(S[L,]); assertError(S[L,, drop=FALSE])
+assertError(N[L,]); assertError(N[L,, drop=FALSE])
+
+## row indexing:
+assert.EQ.mat(D[i,], m[i,])
+assert.EQ.mat(M[i,], m[i,])
+assert.EQ.mat(s[i,], m[i,])
+assert.EQ.mat(S[i,], m[i,])
+assert.EQ.mat(C[i,], asLogical(m[i,]))
+assert.EQ.mat(N[i,], asLogical(m[i,]))
+## column indexing:
+assert.EQ.mat(D[,i], m[,i])
+assert.EQ.mat(M[,i], m[,i])
+assert.EQ.mat(s[,i], m[,i])
+assert.EQ.mat(S[,i], m[,i])
+assert.EQ.mat(C[,i], asLogical(m[,i]))
+assert.EQ.mat(N[,i], asLogical(m[,i]))
+
+
+### --- negative indices ----------
+
+## 1) negative *vector* indexing
+eval(.iniDiag.example)
+i <- -(2:30)
+stopifnot(identical5(m[i], M[i], D[i], s[i], S[i]),
+          identical3(as.logical(m[i]), C[i], N[i]))
+##  negative vector subassignment :
+v <- seq_along(m[i])
+m[i] <- v; m.L <- asLogical(m)
+M[i] <- v; assert.EQ.mat(M,m) # dge
+D[i] <- v; assert.EQ.mat(D,m) # ddi -> dtT -> dgT
+s[i] <- v; assert.EQ.mat(s,m) # dtT -> dgT
+S[i] <- v; assert.EQ.mat(S,m); S # dtC -> dtT -> dgT -> dgC
+N[i] <- v # with a good warning
+assert.EQ.mat(N,m.L); N
+C[i] <- v #  ..  .  ..  warning
+assert.EQ.mat(C,m.L); C #
+
+options(warn = 2) #---------------------# NO WARNINGS from here -----------------
+					# =====================
+## 2) negative [i,j] indices
+mc <- mC[1:5, 1:7]
+mt <- mT[1:5, 1:7]
+## sub matrix
+assert.EQ.mat(mC[1:2, 0:3], mm[1:2, 0:3]) # test 0-index
+stopifnot(identical(mc[-(3:5), 0:2], mC[1:2, 0:2]),
+          identical(mt[-(3:5), 0:2], mT[1:2, 0:2]),
+          identical(mC[2:3, 4],      mm[2:3, 4]))
+assert.EQ.mat(mC[1:2,], mm[1:2,])
+## sub vector
+stopifnot(identical4(mc[-(1:4), ], mC[5, 1:7],
+                     mt[-(1:4), ], mT[5, 1:7]))
+stopifnot(identical4(mc[-(1:4), -(2:4)], mC[5, c(1,5:7)],
+                     mt[-(1:4), -(2:4)], mT[5, c(1,5:7)]))
+
+## mixing of negative and positive must give error
+assertError(mT[-1:1,])
+showProc.time()
+
+## Sub *Assignment* ---- now works (partially):
+mt0 <- mt
+nt <- as(mt, "nMatrix")
+mt[1, 4] <- -99
+mt[2:3, 1:6] <- 0
+mt
+m2 <- mt+mt
+m2[1,4] <- -200
+m2[c(1,3), c(5:6,2)] <- 1:6
+stopifnot(m2[1,4] == -200,
+          as.vector(m2[c(1,3), c(5:6,2)]) == 1:6)
+mt[,3] <- 30
+mt[2:3,] <- 250
+mt[1:5 %% 2 == 1, 3] <- 0
+mt[3:1, 1:7 > 5] <- 0
+mt
+
+tt <- as(mt,"matrix")
+ii <- c(0,2,5)
+jj <- c(2:3,5)
+tt[ii, jj] <- 1:6 # 0 is just "dropped"
+mt[ii, jj] <- 1:6
+assert.EQ.mat(mt, tt)
+
+mt[1:5, 2:6]
+as((mt0 - mt)[1:5,], "dsparseMatrix")# [1,5] and lines 2:3
+
+mt[c(2,4), ] <- 0; stopifnot(as(mt[c(2,4), ],"matrix") == 0)
+mt[2:3, 4:7] <- 33
+checkMatrix(mt)
+mt
+
+mc[1,4] <- -99 ; stopifnot(mc[1,4] == -99)
+mc[1,4] <-  00 ; stopifnot(mc[1,4] ==  00)
+mc[1,4] <- -99 ; stopifnot(mc[1,4] == -99)
+mc[1:2,4:3] <- 4:1; stopifnot(as.matrix(mc[1:2,4:3]) == 4:1)
+
+mc[-1, 3] <- -2:1 # 0 should not be entered; 'value' recycled
+mt[-1, 3] <- -2:1
+stopifnot(mc@x != 0, mt@x != 0,
+	  mc[-1,3] == -2:1, mt[-1,3] == -2:1) ## failed earlier
+
+mc0 <- mc
+mt0 <- as(mc0, "TsparseMatrix")
+m0  <- as(mc0, "matrix")
+set.seed(1); options(Matrix.verbose = FALSE)
+for(i in 1:(if(doExtras) 50 else 4)) {
+    mc <- mc0; mt <- mt0 ; m <- m0
+    ev <- 1:5 %% 2 == round(runif(1))# 0 or 1
+    j <- sample(ncol(mc), 1 + round(runif(1)))
+    nv <- rpois(sum(ev) * length(j), lambda = 1)
+    mc[ev, j] <- nv
+     m[ev, j] <- nv
+    mt[ev, j] <- nv
+    if(i %% 10 == 1) print(mc[ev,j, drop = FALSE])
+    stopifnot(as.vector(mc[ev, j]) == nv, ## failed earlier...
+              as.vector(mt[ev, j]) == nv)
+    validObject(mc) ; assert.EQ.mat(mc, m)
+    validObject(mt) ; assert.EQ.mat(mt, m)
+}
+showProc.time()
+options(Matrix.verbose = TRUE)
+
+mc # no longer has non-structural zeros
+mc[ii, jj] <- 1:6
+mc[c(2,5), c(3,5)] <- 3.2
+checkMatrix(mc)
+m. <- mc
+mc[4,] <- 0
+mc
+
+S <- as(Diagonal(5),"TsparseMatrix")
+H <- Hilbert(9)
+Hc <- as(round(H, 3), "dsCMatrix")# a sparse matrix with no 0 ...
+(trH <- tril(Hc[1:5, 1:5]))
+stopifnot(is(trH, "triangularMatrix"), trH@uplo == "L",
+          is(S, "triangularMatrix"))
+
+## triangular assignment
+## the slick (but inefficient in case of sparse!) way to assign sub-diagonals:
+## equivalent to tmp <- `diag<-`(S[,-1], -2:1); S[,-1] <- tmp
+## which dispatches to (x="TsparseMatrix", i="missing",j="index", value="replValue")
+diag(S[,-1]) <- -2:1 # used to give a wrong warning
+S <- as(S,"triangularMatrix")
+assert.EQ.mat(S, local({s <- diag(5); diag(s[,-1]) <- -2:1; s}))
+
+trH[c(1:2,4), c(2:3,5)] <- 0 # gave an *error* upto Jan.2008
+trH[ lower.tri(trH) ] <- 0   # ditto, because of callNextMethod()
+
+m <- Matrix(0+1:28, nrow = 4)
+m[-3,c(2,4:5,7)] <- m[ 3, 1:4] <- m[1:3, 6] <- 0
+mT <- as(m, "dgTMatrix")
+stopifnot(identical(mT[lower.tri(mT)],
+                    m [lower.tri(m) ]))
+lM <- upper.tri(mT, diag=TRUE)
+mT[lM] <- 0
+ m[lM] <- 0
+assert.EQ.mat(mT, as(m,"matrix"))
+mT[lM] <- -1:0
+ m[lM] <- -1:0
+assert.EQ.mat(mT, as(m,"matrix"))
+(mT <- drop0(mT))
+
+i <- c(1:2, 4, 6:7); j <- c(2:4,6)
+H[i,j] <- 0
+(H. <- round(as(H, "sparseMatrix"), 3)[ , 2:7])
+Hc. <- Hc
+Hc.[i,j] <- 0 ## now "works", but setting "non-structural" 0s
+stopifnot(as.matrix(Hc.[i,j]) == 0)
+Hc.[, 1:6]
+
+## an example that failed for a long time
+sy3 <- new("dsyMatrix", Dim = as.integer(c(2, 2)), x = c(14, -1, 2, -7))
+checkMatrix(dm <- kronecker(Diagonal(2), sy3))# now sparse with new kronecker
+dm <- Matrix(as.matrix(dm))# -> "dsyMatrix"
+(s2 <- as(dm, "sparseMatrix"))
+checkMatrix(st <- as(s2, "TsparseMatrix"))
+stopifnot(is(s2, "symmetricMatrix"),
+	  is(st, "symmetricMatrix"))
+checkMatrix(s.32  <- st[1:3,1:2]) ## 3 x 2 - and *not* dsTMatrix
+checkMatrix(s2.32 <- s2[1:3,1:2])
+I <- c(1,4:3)
+stopifnot(is(s2.32, "generalMatrix"),
+          is(s.32,  "generalMatrix"),
+          identical(as.mat(s.32), as.mat(s2.32)),
+          identical3(dm[1:3,-1], asD(s2[1:3,-1]), asD(st[1:3,-1])),
+          identical4(2, dm[4,3], s2[4,3], st[4,3]),
+          identical3(diag(dm), diag(s2), diag(st)),
+          is((cI <- s2[I,I]), "dsCMatrix"),
+          is((tI <- st[I,I]), "dsTMatrix"),
+          identical4(as.mat(dm)[I,I], as.mat(dm[I,I]), as.mat(tI), as.mat(cI))
+          )
+
+## now sub-assign  and check for consistency
+## symmetric subassign should keep symmetry
+st[I,I] <- 0; checkMatrix(st); stopifnot(is(st,"symmetricMatrix"))
+s2[I,I] <- 0; checkMatrix(s2); stopifnot(is(s2,"symmetricMatrix"))
+##
+m <- as.mat(st)
+ m[2:1,2:1] <- 4:1
+st[2:1,2:1] <- 4:1
+s2[2:1,2:1] <- 4:1
+stopifnot(identical(m, as.mat(st)),
+	  1:4 == as.vector(s2[1:2,1:2]),
+	  identical(m, as.mat(s2)))
+
+## now a slightly different situation for 's2' (had bug)
+s2 <- as(dm, "sparseMatrix")
+s2[I,I] <- 0; diag(s2)[2:3] <- -(1:2)
+stopifnot(is(s2,"symmetricMatrix"), diag(s2) == c(0:-2,0))
+t2 <- as(s2, "TsparseMatrix")
+m <- as.mat(s2)
+s2[2:1,2:1] <- 4:1
+t2[2:1,2:1] <- 4:1
+ m[2:1,2:1] <- 4:1
+assert.EQ.mat(t2, m)
+assert.EQ.mat(s2, m)
+## and the same (for a different s2 !)
+s2[2:1,2:1] <- 4:1
+t2[2:1,2:1] <- 4:1
+assert.EQ.mat(t2, m)# ok
+assert.EQ.mat(s2, m)# failed in 0.9975-8
+showProc.time()
+
+
+## m[cbind(i,j)] <- value: (2-column matrix subassignment):
+m.[ cbind(3:5, 1:3) ] <- 1:3
+stopifnot(m.[3,1] == 1, m.[4,2] == 2)
+nt. <- nt ; nt[rbind(2:3, 3:4, c(3,3))] <- FALSE
+s. <- m. ; m.[cbind(3,4:6)] <- 0 ## assigning 0 where there *is* 0 ..
+stopifnot(identical(nt.,nt),       ## should not have changed
+	  identical(s., m.))
+x.x[ cbind(2:6, 2:6)] <- 12:16
+stopifnot(isValid(x.x, "dsCMatrix"),
+	  12:16 == as.mat(x.x)[cbind(2:6, 2:6)])
+(ne1 <- (mc - m.) != 0)
+stopifnot(identical(ne1, 0 != abs(mc - m.)))
+(ge <- m. >= mc) # contains "=" -> result is dense
+ne. <- mc != m.  # was wrong (+ warning)
+stopifnot(identical(!(m. < mc), m. >= mc),
+	  identical(m. < mc, as(!ge, "sparseMatrix")),
+	  identical(ne., drop0(ne1)))
+
+d6 <- Diagonal(6)
+ii <- c(1:2, 4:5)
+d6[cbind(ii,ii)] <- 7*ii
+stopifnot(is(d6, "ddiMatrix"), identical(d6, Diagonal(x=c(7*1:2,1,7*4:5,1))))
+
+for(j in 3:6) { ## even and odd j used to behave differently
+    M <- Matrix(0, j,j); m <- matrix(0, j,j)
+    T  <- as(M, "TsparseMatrix")
+    TG <- as(T, "generalMatrix")
+    G <-  as(M, "generalMatrix")
+    id <- cbind(1:j,1:j)
+    i2 <- cbind(1:j,j:1)
+    m[id] <- 1:j
+    M[id] <- 1:j ; stopifnot(is(M,"symmetricMatrix"))
+    T[id] <- 1:j ; stopifnot(is(T,"symmetricMatrix"))
+    G[id] <- 1:j
+    TG[id]<- 1:j
+    m[i2] <- 10
+    M[i2] <- 10 ; stopifnot(is(M,"symmetricMatrix"))
+    T[i2] <- 10 ; stopifnot(is(T,"symmetricMatrix"))
+    G[i2] <- 10
+    TG[i2]<- 10
+    ##
+    assert.EQ.mat(M, m)
+    assert.EQ.mat(T, m)
+    assert.EQ.mat(G, m)
+    assert.EQ.mat(TG,m)
+}
+
+
+## drop, triangular, ...
+(M3 <- Matrix(upper.tri(matrix(, 3, 3)))) # ltC; indexing used to fail
+T3 <- as(M3, "TsparseMatrix")
+stopifnot(identical(drop(M3), M3),
+	  identical4(drop(M3[,2, drop = FALSE]), M3[,2, drop = TRUE],
+		     drop(T3[,2, drop = FALSE]), T3[,2, drop = TRUE]),
+	  is(T3, "triangularMatrix"),
+	  !is(T3[,2, drop=FALSE], "triangularMatrix")
+	  )
+
+(T6 <- as(as(kronecker(Matrix(c(0,0,1,0),2,2), t(T3)), "lMatrix"),
+	  "triangularMatrix"))
+T6[1:4, -(1:3)] # failed (trying to coerce back to ltTMatrix)
+stopifnot(identical(T6[1:4, -(1:3)][2:3, -3],
+		    spMatrix(2,2, i=c(1,2,2), j=c(1,1,2), x=rep(TRUE,3))))
+
+M <- Diagonal(4); M[1,2] <- 2
+M. <- as(M, "CsparseMatrix")
+(R <- as(M., "RsparseMatrix"))
+(Ms <- symmpart(M.))
+Rs <- as(Ms, "RsparseMatrix")
+stopifnot(isValid(M, "triangularMatrix"),
+          isValid(M.,"triangularMatrix"),
+          isValid(Ms, "dsCMatrix"),
+          isValid(R,  "dtRMatrix"),
+          isValid(Rs, "dsRMatrix") )
+stopifnot(dim(M[2:3, FALSE]) == c(2,0),
+          dim(R[2:3, FALSE]) == c(2,0),
+          identical(M [2:3,TRUE], M [2:3,]),
+          identical(M.[2:3,TRUE], M.[2:3,]),
+          identical(R [2:3,TRUE], R [2:3,]),
+          dim(R[FALSE, FALSE]) == c(0,0))
+
+n <- 50000L
+Lrg <- new("dgTMatrix", Dim = c(n,n))
+diag(Lrg) <- 1:n
+dLrg <- as(Lrg, "diagonalMatrix")
+stopifnot(identical(Diagonal(x = 1:n), dLrg))
+diag(dLrg) <- 1 + diag(dLrg)
+Clrg <- as(Lrg,"CsparseMatrix")
+Ctrg <- as(Clrg, "triangularMatrix")
+diag(Ctrg) <- 1 + diag(Ctrg)
+stopifnot(identical(Diagonal(x = 1+ 1:n), dLrg),
+          identical(Ctrg, as(dLrg,"CsparseMatrix")))
+
+cc <- capture.output(show(dLrg))# show(<diag>) used to error for large n
+showProc.time()
+
+## Large Matrix indexing / subassignment
+## ------------------------------------- (from ex. by Imran Rashid)
+n <- 7000000
+m <-  100000
+nnz <- 20000
+
+set.seed(12)
+f <- sparseMatrix(i = sample(n, size=nnz, replace=TRUE),
+                  j = sample(m, size=nnz, replace=TRUE))
+str(f)
+dim(f) # 6999863 x 99992
+prod(dim(f)) # 699930301096 == 699'930'301'096  (~ 700'000 millions)
+str(thisCol <-  f[,5000])# logi [~ 7 mio....]
+sv <- as(thisCol, "sparseVector")
+str(sv) ## "empty" !
+validObject(spCol <- f[,5000, drop=FALSE])
+##
+## *not* identical(): as(spCol, "sparseVector")@length is "double"prec:
+stopifnot(all.equal(as(spCol, "sparseVector"),
+                    as(sv,   "nsparseVector"), tolerance=0))
+if(doExtras) {#-----------------------------------------------------------------
+f[,5762] <- thisCol # now "fine" <<<<<<<<<< FIXME uses LARGE objects -- slow --
+## is using  replCmat() in ../R/Csparse.R, then
+##           replTmat() in ../R/Tsparse.R
+
+fx <- sparseMatrix(i = sample(n, size=nnz, replace=TRUE),
+                   j = sample(m, size=nnz, replace=TRUE),
+                   x = round(10*rnorm(nnz)))
+class(fx)## dgCMatrix
+fx[,6000] <- (tC <- rep(thisCol, length=nrow(fx)))# slow (as above)
+thCol <- fx[,2000]
+fx[,5762] <- thCol# slow
+stopifnot(is(f, "ngCMatrix"), is(fx, "dgCMatrix"),
+	  identical(thisCol, f[,5762]),# perfect
+	  identical(as.logical(fx[,6000]), tC),
+	  identical(thCol,  fx[,5762]))
+
+showProc.time()
+##
+cat("checkMatrix() of all: \n---------\n")
+Sys.setlocale("LC_COLLATE", "C")# to keep ls() reproducible
+for(nm in ls()) if(is(.m <- get(nm), "Matrix")) {
+    cat(nm, "\n")
+    checkMatrix(.m, verbose = FALSE
+		, doDet = nm != "As" ## <- "As" almost singular <=> det() "ill posed"
+		)
+}
+showProc.time()
+}#--------------end if(doExtras) -----------------------------------------------
+
+## Bugs found by Peter Ralph
+n <- 17
+x <- Matrix(0, n,n)
+## x must have at least three nonzero entries
+x[1,1] <- x[2,1:2] <- 1.
+x0 <- x <- as(x,"dgTMatrix")  # if x is dgCMatrix, no error
+##
+z <- matrix(x) # <== not the "Matrix way":  a (n, 1) matrix
+z[1] <- 0
+
+x[1:n, 1:n] <- as(z, "sparseVector")
+## gave Error: ... invalid subscript type 'S4'
+x2 <- x
+
+dim(zC <- as(z, "dgCMatrix"))
+x <- x0
+x[] <- zC # did fail, then gave warning.
+x1 <- x
+##
+x <- x0
+x[] <- as(zC, "sparseVector") # did fail, too
+x2 <- x
+stopifnot(identical(x1,x2))
+x <- as(x0, "matrix")
+x[] <- z
+assert.EQ.mat(x1, x)
+
+i <- 4:7
+x1 <- x0; x1[cbind(i, i+10)] <- i^2
+x2 <- x0; x2[cbind(i, i+10)] <- as.matrix(i^2)
+## failed: nargs() = 4 ... please report
+
+stopifnot(isValid(x1, "dgTMatrix"), identical(x1, x2))
+
+
+showProc.time()
+
+if(!interactive()) warnings()
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/tests/spModel.matrix.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/tests/spModel.matrix.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/tests/spModel.matrix.R	(revision 2477)
@@ -0,0 +1,190 @@
+library(Matrix)
+
+## This is example(sp....) -- much extended
+
+mEQ <- function(x,y, ...) {
+    ## first drop columns from y  which are all 0 :
+    if(any(i0 <- colSums(abs(x)) == 0)) {
+        message(gettextf("x had  %d  zero-columns", sum(i0)))
+        x <- x[, !i0, drop=FALSE]
+    }
+    if(any(i0 <- colSums(abs(y)) == 0)) {
+        message(gettextf("y had  %d  zero-columns", sum(i0)))
+        y <- y[, !i0, drop=FALSE]
+    }
+    isTRUE(all.equal(x,y, tolerance =0, ...))
+}
+
+##' Is  sparse.model.matrix() giving the "same" as dense model.matrix() ?
+##'
+##' @return logical
+##' @param frml formula
+##' @param dat data frame
+##' @param showFactors
+##' @param ...
+isEQsparseDense <- function(frml, dat,
+                            showFactors = isTRUE(getOption("verboseSparse")), ...)
+{
+    ## Author: Martin Maechler, Date: 21 Jul 2009
+    stopifnot(inherits(frml, "formula"), is.data.frame(dat))
+    if(showFactors)
+        print(attr(terms(frml, data=dat), "factors"))
+    smm <- sparse.model.matrix(frml, dat, ...)
+     mm <-        model.matrix(frml, dat, ...)
+    sc <- smm@contrasts
+    mEQ(as(smm, "generalMatrix"), Matrix(mm, sparse=TRUE)) &
+     identical(smm@assign, attr(mm, "assign")) &
+     (if(is.null(mc <- attr(mm, "contrasts"))) length(sc) == 0 else identical(sc, mc))
+}
+
+### ------------ all the "datasets" we construct for use -------------
+dd <- data.frame(a = gl(3,4), b = gl(4,1,12))# balanced 2-way
+(dd3 <- cbind(dd, c = gl(2,6), d = gl(3,8)))
+dd. <- dd3[- c(1, 13:15, 17), ]
+set.seed(17)
+dd4 <- cbind(dd, c = gl(2,6), d = gl(8,3))
+dd4 <- cbind(dd4, x = round(rnorm(nrow(dd4)), 1))
+dd4 <- dd4[- c(1, 13:15, 17), ]
+##-> 'd' has unused levels
+dM <- dd4
+dM$X <- outer(10*rpois(nrow(dM), 2), 1:3)
+dM$Y <- cbind(pmax(0, dM$x - .3), floor(4*rnorm(nrow(dM))))
+str(dM)# contains *matrices*
+
+options("contrasts") # the default:  "contr.treatment"
+op <- options(sparse.colnames = TRUE) # for convenience
+
+stopifnot(identical(## non-sensical, but "should work" (with a warning each):
+		    sparse.model.matrix(a~ 1, dd),
+		    sparse.model.matrix( ~ 1, dd)))
+sparse.model.matrix(~ a + b, dd, contrasts = list(a="contr.sum"))
+sparse.model.matrix(~ a + b, dd, contrasts = list(b="contr.SAS"))
+xm <-  sparse.model.matrix(~ x, dM) # {no warning anymore ...}
+dxm <- Matrix(model.matrix(~ x, dM), sparse=TRUE)
+stopifnot(is(xm, "sparseMatrix"), mEQ(as(xm,"generalMatrix"), dxm))
+
+## Sparse method is equivalent to the traditional one :
+stopifnot(isEQsparseDense(~ a + b, dd),
+          suppressWarnings(isEQsparseDense(~ x, dM)),
+          isEQsparseDense(~ 0 + a + b, dd),
+	  identical(sparse.model.matrix(~  0 + a + b, dd),
+		    sparse.model.matrix(~ -1 + a + b, dd)),
+          isEQsparseDense(~ a + b, dd, contrasts = list(a="contr.sum")),
+          isEQsparseDense(~ a + b, dd, contrasts = list(a="contr.SAS")),
+	  ## contrasts as *functions* or contrast *matrices* :
+	  isEQsparseDense(~ a + b, dd,
+			  contrasts = list(a=contr.sum, b=contr.treatment(4))),
+	  isEQsparseDense(~ a + b, dd, contrasts =
+			  list(a=contr.SAS(3),# << ok after 'contrasts<-' update
+                               b = function(n, contr=TRUE, sparse=FALSE)
+                               contr.sum(n=n, contr=contr, sparse=sparse))))
+
+sm <- sparse.model.matrix(~a * b, dd,
+                          contrasts = list(a= contr.SAS(3, sparse = TRUE)))
+sm
+## FIXME: Move part of this to ../../MatrixModels/tests/
+##stopifnot(all(sm == model.Matrix( ~a * b, dd, contrasts= list(a= contr.SAS(3)))))
+
+##
+stopifnot(isEQsparseDense(~ a + b   + c + d, dd.))
+stopifnot(isEQsparseDense(~ a + b:c + c + d, dd.))
+## no intercept -- works too
+stopifnot(isEQsparseDense(~ -1+ a + b   + c + d, dd.))
+stopifnot(isEQsparseDense(~ 0 + a + b:c + c + d, dd.))
+
+
+Sparse.model.matrix <- function(...) {
+    s <- sparse.model.matrix(...)
+    as(s, "generalMatrix")# dropping 'assign',.. slots
+}
+##
+dim(mm <- Matrix(model.matrix(~ a + b + c + d, dd4), sparse=TRUE))
+dim(sm  <- Sparse.model.matrix(~ a + b + c + d, dd4))
+## was (19 13), when 'drop.unused.levels' was implicitly TRUE
+dim(sm. <- Sparse.model.matrix(~ a + b + c + d, dd4, drop.unused.levels=TRUE))
+stopifnot(mEQ(sm , mm), ## (both have a zero column)
+	  mEQ(sm., mm)) ## << that's ok, since mm has all-0 column !
+## look at this :
+all(mm[,"d5"] == 0)  ## !!!! --- correct: a column of all 0  <--> dropped level!
+stopifnot(all.equal(sm., mm[, - which("d5" == colnames(mm))])) ## indeed !
+## i.e., sm has just dropped an all zero column --- which it should!
+
+stopifnot(isEQsparseDense(~ 1 + sin(x) + b*c + a:x, dd4, show=TRUE))
+
+stopifnot(isEQsparseDense(~    I(a) + b*c + a:x, dd4, show=TRUE))
+## no intercept -- works too
+stopifnot(isEQsparseDense(~ 0+ I(a) + b*c + a:x, dd4, show=TRUE))
+
+f <- ~ 1 + a + b*c + a*x
+attr(terms(f, data=dd4), "factors")
+dim(mm <- Matrix(model.matrix(f, data=dd4), sparse=TRUE))
+dim(sm <- Sparse.model.matrix(f, data=dd4)) # ==
+stopifnot(mEQ(sm, mm))
+
+f <- ~ a*X + X*Y + a*c
+attr(terms(f, data=dM), "factors")
+dim(mm <- Matrix(model.matrix(f, data=dM), sparse=TRUE))
+dim(sm <- Sparse.model.matrix(f, data=dM, verbose=TRUE))
+stopifnot(mEQ(sm, mm))
+
+## high order
+f <- ~ a:b:X:c:Y
+mm <- Matrix(model.matrix(f, data=dM), sparse=TRUE)
+sm <- Sparse.model.matrix(f, data=dM, verbose=2)
+stopifnot(mEQ(sm, mm))
+
+
+f <- ~ 1 + a + b*c + a*x + b*d*x + b:c:d
+attr(terms(f, data=dd4), "factors")
+dim(mm <- Matrix(model.matrix(f, data=dd4), sparse=TRUE))            ## 19 100
+dim(sm  <- Sparse.model.matrix(f, data=dd4))                         ## (ditto)
+dim(sm. <- Sparse.model.matrix(f, data=dd4, drop.unused.levels=TRUE)) # 19  88
+stopifnot(mEQ(sm, mm), mEQ(sm., mm))# {32, 32;  20 and 32  zero-columns ..}
+
+## now get a bit courageous:
+##
+
+## stopifnot(isEQsparseDense(~ 1 + c + a:b:d,         dat=dd4))
+dim(mm <- Matrix(model.matrix(~ 1 + a + b*c + a:b:c:d, data=dd4),
+                 sparse=TRUE)) ## 19 202
+dim(sm  <- Sparse.model.matrix(~ 1 + a + b*c + a:b:c:d, data=dd4))
+dim(sm. <- Sparse.model.matrix(~ 1 + a + b*c + a:b:c:d, data=dd4,
+			       drop.unused.levels=TRUE))
+stopifnot(mEQ(sm, mm), mEQ(sm., mm))# {173, 173, 149 and 173 zero-columns !}
+
+## stopifnot(isEQsparseDense(~ 1 + a + b*c + a:b:c:d, dat=dd4))
+dim(mm <- Matrix(model.matrix(~ 1 + a + b:c + a:b:d, data=dd4),
+                 sparse=TRUE)) ## 19 107
+dim(sm  <- Sparse.model.matrix(~ 1 + a + b:c + a:b:d, data=dd4))
+dim(sm. <- Sparse.model.matrix(~ 1 + a + b:c + a:b:d, data=dd4,
+			       drop.unused.levels=TRUE))
+stopifnot(mEQ(sm, mm), mEQ(sm., mm))
+
+dim(mm <- Matrix(model.matrix(~ a*b*c +c*d, dd4), sparse=TRUE)) ## 19 38
+dim(sm  <- Sparse.model.matrix(~ a*b*c +c*d, dd4))# (ditto)
+dim(sm. <- Sparse.model.matrix(~ a*b*c +c*d, dd4, drop.unused.levels=TRUE))
+stopifnot(mEQ(sm, mm), mEQ(sm., mm))
+
+
+f1 <- ~ (a+b+c+d)^2 + (a+b):c:d + a:b:c:d
+f2 <- ~ (a+b+c+d)^4 - a:b:c - a:b:d
+    mm1 <- Matrix(model.matrix(f1, dd4), sparse=TRUE)
+dim(mm2 <- Matrix(model.matrix(f2, dd4), sparse=TRUE))
+    sm1 <- sparse.model.matrix(f1, dd4)
+dim(sm2 <- sparse.model.matrix(f2, dd4))
+    s.1 <- sparse.model.matrix(f1, dd4, drop.unused.levels=TRUE)
+dim(s.2 <- sparse.model.matrix(f2, dd4, drop.unused.levels=TRUE))
+stopifnot(identical(mm1,mm2),
+	  identical(sm1,sm2), identical(s.1,s.2),
+		mEQ(sm1,mm1),	    mEQ(s.1,mm1))
+
+str(dd <- data.frame(d = gl(10,6), a = ordered(gl(3,20))))
+X. <- sparse.model.matrix(~ a + d, data = dd)
+## failed because of contr.poly default in Matrix 0.999375-33
+stopifnot(dim(X.) == c(60, 12), nnzero(X.) == 234,
+	  isEQsparseDense(~ 0 + d + I(as.numeric(d)^2), dd))
+## I(.) failed (upto 2010-05-07)
+
+cat('Time elapsed: ', proc.time(),'\n') # for ``statistical reasons''
+
+if(!interactive()) warnings()
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/tests/matprod.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/tests/matprod.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/tests/matprod.R	(revision 2477)
@@ -0,0 +1,916 @@
+library(Matrix)
+
+### Matrix Products including  cross products
+
+source(system.file("test-tools.R", package = "Matrix")) # is.EQ.mat(), dnIdentical() ..etc
+doExtras
+options(warn=1, # show as they happen
+	Matrix.verbose = doExtras)
+
+##' Check matrix multiplications with (unit) Diagonal matrices
+chkDiagProd <- function(M) {
+    stopifnot(is.matrix(M) || is(M,"Matrix"))
+    I.l  <- Diagonal(nrow(M)) # I_n -- "unit" Diagonal
+    I.r  <- Diagonal(ncol(M)) # I_d
+    D2.l <- Diagonal(nrow(M), x = 2) # D_n
+    D2.r <- Diagonal(ncol(M), x = 2) # I_d
+    stopifnot(is.EQ.mat(M, M %*% I.r),
+	      is.EQ.mat(M, I.l %*% M),
+	      is.EQ.mat(2*M, M %*% D2.r),
+	      is.EQ.mat(M*2, D2.l %*% M),
+	      ## crossprod
+	      is.EQ.mat(t(M), crossprod(M, I.l)),
+	      is.EQ.mat(  M , crossprod(I.l, M)),
+	      is.EQ.mat(t(2*M), crossprod(M, D2.l)),
+	      is.EQ.mat(  M*2 , crossprod(D2.l, M)),
+	      ## tcrossprod
+	      is.EQ.mat(  M , tcrossprod(M, I.r)),
+	      is.EQ.mat(t(M), tcrossprod(I.r, M)),
+	      is.EQ.mat(  2*M , tcrossprod(M, D2.r)),
+	      is.EQ.mat(t(M*2), tcrossprod(D2.r, M)))
+}
+
+### dimnames -- notably for matrix products ----------------
+#
+##' Checks that matrix products are the same, including dimnames
+##'
+##' @param m matrix = traditional-R-matrix version of M
+##' @param M optional Matrix = "Matrix class version of m"
+##' @param browse
+chkDnProd <- function(m = as(M, "matrix"), M = Matrix(m), browse=FALSE, warn.ok=FALSE) {
+    ## TODO:
+    ## if(browse) stopifnot <- f.unction(...)  such that it enters browser() when it is not fulfilled
+    if(!warn.ok) { # NO warnings allowd
+        op <- options(warn = 2)
+        on.exit(options(op))
+    }
+    stopifnot(is.matrix(m), is(M, "Matrix"), identical(dim(m), dim(M)), dnIdentical(m,M))
+    ## m is  n x d  (say)
+    is.square <- nrow(m) == ncol(m)
+
+    p1 <- (tm <- t(m)) %*% m ## d x d
+    p1. <- crossprod(m)
+    stopifnot(is.EQ.mat3(p1, p1., crossprod(m,m)))
+
+    t1 <- m %*% tm ## n x n
+    t1. <- tcrossprod(m)
+    stopifnot(is.EQ.mat3(t1, t1., tcrossprod(m,m)))
+
+    if(is.square) {
+	mm <- m %*% m
+	stopifnot(is.EQ.mat3(mm, crossprod(tm,m), tcrossprod(m,tm)))
+    }
+
+    chkDiagProd(m)## was not ok in Matrix 1.2.0
+
+    ## Now the	"Matrix" ones -- should match the "matrix" above
+    M0 <- M
+    cat("sparse: ")
+    for(sparse in c(TRUE, FALSE)) {
+	cat(sparse, "; ")
+	M <- as(M0, if(sparse) "sparseMatrix" else "denseMatrix")
+	P1 <- (tM <- t(M)) %*% M
+	P1. <- crossprod(M)
+	stopifnot(is.EQ.mat3(P1, P1., p1),
+		  is.EQ.mat3(P1., crossprod(M,M), crossprod(M,m)),
+		  is.EQ.mat (P1., crossprod(m,M)))
+
+	## P1. is "symmetricMatrix" -- semantically "must have" symm.dimnames
+	PP1 <- P1. %*% P1. ## still  d x d
+	R <- triu(PP1); r <- as(R, "matrix") # upper - triangular
+	L <- tril(PP1); l <- as(L, "matrix") # lower - triangular
+	stopifnot(isSymmetric(P1.), isSymmetric(PP1),
+		  isDiagonal(L) || is(L,"triangularMatrix"),
+		  isDiagonal(R) || is(R,"triangularMatrix"),
+		  isTriangular(L, upper=FALSE), isTriangular(R, upper=TRUE),
+		  is.EQ.mat(PP1, (pp1 <- p1 %*% p1)),
+		  dnIdentical(PP1, R),
+		  dnIdentical(L, R))
+
+	T1 <- M %*% tM
+	T1. <- tcrossprod(M)
+	stopifnot(is.EQ.mat3(T1, T1., t1),
+		  is.EQ.mat3(T1., tcrossprod(M,M), tcrossprod(M,m)),
+		  is.EQ.mat (T1., tcrossprod(m,M)),
+		  is.EQ.mat(tcrossprod(T1., tM),
+			    tcrossprod(t1., tm)),
+		  is.EQ.mat(crossprod(T1., M),
+			    crossprod(t1., m)))
+
+	## Now, *mixing*  Matrix x matrix:
+	stopifnot(is.EQ.mat3(tM %*% m, tm %*% M, tm %*% m))
+
+	if(is.square)
+	    stopifnot(is.EQ.mat (mm, M %*% M),
+		      is.EQ.mat3(mm, crossprod(tM,M), tcrossprod(M,tM)),
+		      ## "mixing":
+		      is.EQ.mat3(mm, crossprod(tm,M), tcrossprod(m,tM)),
+		      is.EQ.mat3(mm, crossprod(tM,m), tcrossprod(M,tm)))
+
+	## Symmetric and Triangular
+	stopifnot(is.EQ.mat(PP1 %*% tM, pp1 %*% tm),
+		  is.EQ.mat(R %*% tM, r %*% tm),
+		  is.EQ.mat(L %*% tM, L %*% tm))
+
+	## Diagonal :
+	chkDiagProd(M)
+    }
+    cat("\n")
+    invisible(TRUE)
+}
+
+## All these are ok  {now, (2012-06-11) also for dense
+(m <- matrix(c(0, 0, 2:0), 3, 5))
+m00 <- m # *no* dimnames
+dimnames(m) <- list(LETTERS[1:3], letters[1:5])
+(m.. <- m) # has *both* dimnames
+m0. <- m.0 <- m..
+dimnames(m0.)[1] <- list(NULL); m0.
+dimnames(m.0)[2] <- list(NULL); m.0
+d <- diag(3); dimnames(d) <- list(c("u","v","w"), c("X","Y","Z")); d
+dU <- diagN2U(Matrix(d)) # unitriangular sparse
+(T <- new("dtrMatrix", diag = "U", x= c(0,0,5,0), Dim= c(2L,2L),
+          Dimnames= list(paste0("r",1:2),paste0("C",1:2)))) # unitriangular dense
+##                                                                   ^^^^^^^^^^^^
+## currently many warnings about sub-optimal matrix products :
+chkDnProd(m..)
+chkDnProd(m0.)
+chkDnProd(m.0)
+chkDnProd(m00)
+chkDnProd(M =   T)
+chkDnProd(M = t(T))
+chkDnProd(M =   dU)
+chkDnProd(M = t(dU))
+## all the above failed in 1.2-0 and 1.1-5, 1.1-4 some even earlier
+chkDnProd(M = Diagonal(4))
+chkDnProd(diag(x=3:1))
+chkDnProd(d)
+chkDnProd(M = as(d, "denseMatrix"))# M: dtrMatrix (diag = "N")
+
+
+m5 <- 1 + as(diag(-1:4)[-5,], "dgeMatrix")
+## named dimnames:
+dimnames(m5) <- list(Rows= LETTERS[1:5], paste("C", 1:6, sep=""))
+tr5 <- tril(m5[,-6])
+m. <- as(m5, "matrix")
+m5.2 <- local({t5 <- as.matrix(tr5); t5 %*% t5})
+stopifnotValid(tr5, "dtrMatrix")
+stopifnot(dim(m5) == 5:6,
+	  class(cm5 <- crossprod(m5)) == "dpoMatrix")
+assert.EQ.mat(t(m5) %*% m5, as(cm5, "matrix"))
+assert.EQ.mat(tr5.2 <- tr5 %*% tr5, m5.2)
+stopifnotValid(tr5.2, "dtrMatrix")
+stopifnot(as.vector(rep(1,6) %*% cm5) == colSums(cm5),
+	  as.vector(cm5 %*% rep(1,6)) == rowSums(cm5))
+## uni-diagonal dtrMatrix with "wrong" entries in diagonal
+## {the diagonal can be anything: because of diag = "U" it should never be used}:
+tru <- Diagonal(3, x=3); tru[i.lt <- lower.tri(tru, diag=FALSE)] <- c(2,-3,4)
+tru@diag <- "U" ; stopifnot(diag(trm <- as.matrix(tru)) == 1)
+## TODO: Also add *upper-triangular*  *packed* case !!
+stopifnot((tru %*% tru)[i.lt] ==
+	  (trm %*% trm)[i.lt])
+
+## crossprod() with numeric vector RHS and LHS
+i5 <- rep.int(1, 5)
+isValid(S5 <- tcrossprod(tr5), "dpoMatrix")# and inherits from "dsy"
+G5 <- as(S5, "generalMatrix")# "dge"
+assert.EQ.mat( crossprod(i5, m5), rbind( colSums(m5)))
+assert.EQ.mat( crossprod(i5, m.), rbind( colSums(m5)))
+assert.EQ.mat( crossprod(m5, i5), cbind( colSums(m5)))
+assert.EQ.mat( crossprod(m., i5), cbind( colSums(m5)))
+assert.EQ.mat( crossprod(i5, S5), rbind( colSums(S5))) # failed in Matrix 1.1.4
+## tcrossprod() with numeric vector RHS and LHS :
+stopifnot(identical(tcrossprod(i5, S5), # <- lost dimnames
+		    tcrossprod(i5, G5) -> m51),
+	  identical(dimnames(m51), list(NULL, LETTERS[1:5]))
+	  )
+m51 <- m5[, 1, drop=FALSE] # [6 x 1]
+m.1 <- m.[, 1, drop=FALSE] ; assert.EQ.mat(m51, m.1)
+## The only (M . v) case
+assert.EQ.mat(tcrossprod(m51, 5:1), tcrossprod(m.1, 5:1))
+## The two  (v . M) cases:
+assert.EQ.mat(tcrossprod(rep(1,6), m.), rbind( rowSums(m5)))# |v| = ncol(m)
+assert.EQ.mat(tcrossprod(rep(1,3), m51),
+              tcrossprod(rep(1,3), m.1))# ncol(m) = 1
+
+## classes differ
+tc.m5 <- m5 %*% t(m5)	 # "dge*", no dimnames (FIXME)
+(tcm5 <- tcrossprod(m5)) # "dpo*"  w/ dimnames
+assert.EQ.mat(tc.m5, mm5 <- as(tcm5, "matrix"))
+## tcrossprod(x,y) :
+assert.EQ.mat(tcrossprod(m5, m5), mm5)
+assert.EQ.mat(tcrossprod(m5, m.), mm5)
+assert.EQ.mat(tcrossprod(m., m5), mm5)
+
+M50 <- m5[,FALSE, drop=FALSE]
+M05 <- t(M50)
+s05 <- as(M05, "sparseMatrix")
+s50 <- t(s05)
+assert.EQ.mat(M05, matrix(1, 0,5))
+assert.EQ.mat(M50, matrix(1, 5,0))
+assert.EQ.mat(tcrossprod(M50), tcrossprod(as(M50, "matrix")))
+assert.EQ.mat(tcrossprod(s50), tcrossprod(as(s50, "matrix")))
+assert.EQ.mat( crossprod(s50),	crossprod(as(s50, "matrix")))
+stopifnot(identical( crossprod(s50), tcrossprod(s05)),
+	  identical( crossprod(s05), tcrossprod(s50)))
+(M00 <- crossprod(M50))## used to fail -> .Call(dgeMatrix_crossprod, x, FALSE)
+stopifnot(identical(M00, tcrossprod(M05)),
+	  all(M00 == t(M50) %*% M50), dim(M00) == 0)
+
+## simple cases with 'scalars' treated as 1x1 matrices:
+d <- Matrix(1:5)
+d %*% 2
+10 %*% t(d)
+assertError(3 %*% d)		 # must give an error , similar to
+assertError(5 %*% as.matrix(d))	 # -> error
+
+## right and left "numeric" and "matrix" multiplication:
+(p1 <- m5 %*% c(10, 2:6))
+(p2 <- c(10, 2:5) %*% m5)
+(pd1 <- m5 %*% diag(1:6))
+(pd. <- m5 %*% Diagonal(x = 1:6))
+(pd2 <- diag (10:6)	   %*% m5)
+(pd..<- Diagonal(x = 10:6) %*% m5)
+stopifnot(dim(crossprod(t(m5))) == c(5,5),
+	  c(class(p1),class(p2),class(pd1),class(pd2),
+	    class(pd.),class(pd..)) == "dgeMatrix")
+assert.EQ.mat(p1, cbind(c(20,30,33,38,54)))
+assert.EQ.mat(pd1, m. %*% diag(1:6))
+assert.EQ.mat(pd2, diag(10:6) %*% m.)
+assert.EQ.mat(pd., as(pd1,"matrix"))
+assert.EQ.mat(pd..,as(pd2,"matrix"))
+
+## check that 'solve' and '%*%' are inverses
+set.seed(1)
+A <- Matrix(rnorm(25), nc = 5)
+y <- rnorm(5)
+all.equal((A %*% solve(A, y))@x, y)
+Atr <- new("dtrMatrix", Dim = A@Dim, x = A@x, uplo = "U")
+all.equal((Atr %*% solve(Atr, y))@x, y)
+
+## R-forge bug 5933 by Sebastian Herbert,
+## https://r-forge.r-project.org/tracker/index.php?func=detail&aid=5933&group_id=61&atid=294
+mLeft  <- matrix(data = double(0), nrow = 3, ncol = 0)
+mRight <- matrix(data = double(0), nrow = 0, ncol = 4)
+MLeft   <- Matrix(data = double(0), nrow = 3, ncol = 0)
+MRight  <- Matrix(data = double(0), nrow = 0, ncol = 4)
+stopifnot(identical3(class(mLeft), class(mRight), "matrix"))
+stopifnot(class(MLeft) ==  class(MRight),
+          class(MLeft) ==  "dgeMatrix")
+
+Qidentical3 <- function(a,b,c) Q.eq(a,b) && Q.eq(b,c)
+Qidentical4 <- function(a,b,c,d) Q.eq(a,b) && Q.eq(b,c) && Q.eq(c,d)
+chkP <- function(mLeft, mRight, MLeft, MRight, cl = class(MLeft)) {
+    ident4 <- if(extends(cl, "generalMatrix"))
+		  function(a,b,c,d) identical4(as(a, cl), b, c, d)
+	      else function(a,b,c,d) {
+		  assert.EQ.mat(M=b, m=a, tol=0)
+		  Qidentical3(b,c,d)
+	      }
+    mm <- mLeft %*% mRight # ok
+    m.m <- crossprod(mRight)
+    mm. <- tcrossprod(mLeft, mLeft)
+    stopifnot(mm == 0,
+              ident4(mm,
+                     mLeft %*% MRight,
+                     MLeft %*% mRight,
+                     MLeft %*% MRight),# now ok
+	      m.m == 0, identical(m.m, crossprod(mRight, mRight)),
+	      mm. == 0, identical(mm., tcrossprod(mLeft, mLeft)))
+    stopifnot(ident4(m.m,
+		     crossprod(MRight, MRight),
+		     crossprod(MRight, mRight),
+		     crossprod(mRight, MRight)))
+    stopifnot(ident4(mm.,
+		     tcrossprod(mLeft, MLeft),
+		     tcrossprod(MLeft, MLeft),
+		     tcrossprod(MLeft, mLeft)))
+}
+
+chkP(mLeft, mRight, MLeft, MRight, "dgeMatrix")
+m0 <- mLeft[FALSE,] # 0 x 0
+for(cls in c("triangularMatrix", "symmetricMatrix")) {
+    cat(cls,": "); stopifnotValid(ML0 <- as(MLeft[FALSE,], cls), cls)
+    chkP(m0, mRight, ML0, MRight, class(ML0))
+    chkP(mLeft, m0 , MLeft, ML0 , class(ML0))
+    chkP(m0,    m0 , ML0,   ML0 , class(ML0)); cat("\n")
+}
+
+
+## New in R 3.2.0 -- for traditional matrix m and vector v
+for(spV in c(FALSE,TRUE)) {
+    cat("sparseV:", spV, "\n")
+    v <- if(spV) as(1:3, "sparseVector") else 1:3
+    stopifnot(identical(class(v2 <- v[1:2]), class(v)))
+    assertError(crossprod(v, v2)) ; assertError(v %*% v2)
+    assertError(crossprod(v, 1:2)); assertError(v %*% 1:2)
+    assertError(crossprod(v, 2))  ; assertError(v %*% 2)
+    assertError(crossprod(1:2, v)); assertError(1:2 %*% v)
+    if(spV || getRversion() >= "3.2.0") {
+	cat("doing  vec x vec  ..\n")
+	stopifnot(identical(crossprod(2, v), t(2) %*% v),
+		  identical(5 %*% v, 5 %*% t(v)))
+    }
+    for(sp in c(FALSE, TRUE)) {
+        m <- Matrix(1:2, 1,2, sparse=sp)
+        cat(sprintf("class(m): '%s'\n", class(m)))
+	stopifnot(identical( crossprod(m, v), t(m) %*% v), # m'v gave *outer* prod wrongly!
+		  identical(tcrossprod(m, v2), m %*% v2))
+	assert.EQ.Mat(m %*% v2, m %*% 1:2, tol=0)
+    }
+    ## gave error "non-conformable arguments"
+}
+##  crossprod(m, v)  t(1 x 2) * 3 ==> (2 x 1) *  (1 x 3) ==> 2 x 3
+## tcrossprod(m,v2)    1 x 2  * 2 ==> (1 x 2) * t(1 x 2) ==> 1 x 1
+
+### ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+### Sparse Matrix products
+### ------
+## solve() for dtC*
+mc <- round(chol(crossprod(A)), 2)
+B <- A[1:3,] # non-square on purpose
+stopifnot(all.equal(sum(rowSums(B %*% mc)), 5.82424475145))
+assert.EQ.mat(tcrossprod(B, mc), as.matrix(t(tcrossprod(mc, B))))
+
+m <- kronecker(Diagonal(2), mc)
+stopifnot(is(mc, "Cholesky"),
+	  is(m, "sparseMatrix"))
+im <- solve(m)
+round(im, 3)
+itm <- solve(t(m))
+iim <- solve(im) # should be ~= 'm' of course
+iitm <- solve(itm)
+I <- Diagonal(nrow(m))
+(del <- c(mean(abs(as.numeric(im %*% m - I))),
+	  mean(abs(as.numeric(m %*% im - I))),
+	  mean(abs(as.numeric(im  - t(itm)))),
+	  mean(abs(as.numeric( m  - iim))),
+	  mean(abs(as.numeric(t(m)- iitm)))))
+stopifnot(is(m, "triangularMatrix"), is(m, "sparseMatrix"),
+	  is(im, "dtCMatrix"), is(itm, "dtCMatrix"), is(iitm, "dtCMatrix"),
+	  del < 1e-15)
+
+## crossprod(.,.) & tcrossprod(),  mixing dense & sparse
+v <- c(0,0,2:0)
+mv <- as.matrix(v) ## == cbind(v)
+(V <- Matrix(v, 5,1, sparse=TRUE))
+sv <- as(v, "sparseVector")
+a <- as.matrix(A)
+cav <-	crossprod(a,v)
+tva <- tcrossprod(v,a)
+assert.EQ.mat(crossprod(A, V), cav) # gave infinite recursion
+assert.EQ.mat(crossprod(A,sv), cav)
+assert.EQ.mat(tcrossprod( sv, A), tva)
+assert.EQ.mat(tcrossprod(t(V),A), tva)
+
+## [t]crossprod()  for  <sparsevector> . <sparsevector>  incl. one arg.:
+stopifnotValid(s.s <-  crossprod(sv,sv), "Matrix")
+stopifnotValid(ss. <- tcrossprod(sv,sv), "sparseMatrix")
+stopifnot(identical(s.s,  crossprod(sv)),
+	  identical(ss., tcrossprod(sv)))
+assert.EQ.mat(s.s,  crossprod(v,v))
+assert.EQ.mat(ss., tcrossprod(v,v))
+
+dm <- Matrix(v, sparse=FALSE)
+sm <- Matrix(v, sparse=TRUE)
+
+validObject(d.vvt <- as(as(vvt <- tcrossprod(v, v), "denseMatrix"), "dgeMatrix"))
+validObject(s.vvt <- as(as(vvt, "sparseMatrix"), "dgCMatrix"))
+
+stopifnot(
+    identical4(tcrossprod(v, v), tcrossprod(mv, v),
+	       tcrossprod(v,mv), tcrossprod(mv,mv))## (base R)
+    ,
+    identical4(d.vvt,		 tcrossprod(dm, v),
+	       tcrossprod(v,dm), tcrossprod(dm,dm)) ## (v, dm) failed
+    ,
+    identical(s.vvt, tcrossprod(sm,sm))
+    ,
+    identical3(d.vvt, tcrossprod(sm, v),
+               tcrossprod(v,sm)) ## both (sm,v) and (v,sm) failed
+    )
+assert.EQ.mat(d.vvt, vvt)
+assert.EQ.mat(s.vvt, vvt)
+
+M <- Matrix(0:5, 2,3) ; sM <- as(M, "sparseMatrix"); m <- as(M, "matrix")
+v <- 1:3; v2 <- 2:1
+sv  <- as( v, "sparseVector")
+sv2 <- as(v2, "sparseVector")
+tvm <- tcrossprod(v, m)
+assert.EQ.mat(tcrossprod( v, M), tvm)
+assert.EQ.mat(tcrossprod( v,sM), tvm)
+assert.EQ.mat(tcrossprod(sv,sM), tvm)
+assert.EQ.mat(tcrossprod(sv, M), tvm)
+assert.EQ.mat(crossprod(M, sv2), crossprod(m, v2))
+stopifnot(identical(tcrossprod(v, M), v %*% t(M)),
+	  identical(tcrossprod(v,sM), v %*% t(sM)),
+	  identical(tcrossprod(v, M), crossprod(v, t(M))),
+	  identical(tcrossprod(sv,sM), sv %*% t(sM)),
+	  identical(crossprod(sM, sv2), t(sM) %*% sv2),
+	  identical(crossprod(M, v2), t(M) %*% v2))
+
+## *unit* triangular :
+t1 <- new("dtTMatrix", x= c(3,7), i= 0:1, j=3:2, Dim= as.integer(c(4,4)))
+## from	 0-diagonal to unit-diagonal {low-level step}:
+tu <- t1 ; tu@diag <- "U"
+cu <- as(tu, "dtCMatrix")
+cl <- t(cu) # unit lower-triangular
+cl10 <- cl %*% Diagonal(4, x=10)
+assert.EQ.mat(cl10, as(cl, "matrix") %*% diag(4, x=10))
+stopifnot(is(cl,"dtCMatrix"), cl@diag == "U")
+(cu2 <- cu %*% cu)
+cl2 <- cl %*% cl
+validObject(cl2)
+
+cu3 <- tu[-1,-1]
+assert.EQ.mat(crossprod(tru, cu3),## <- "FIXME" should return triangular ...
+	      crossprod(trm, as.matrix(cu3)))
+
+cl2
+mcu <- as.matrix(cu)
+cu2. <- Diagonal(4) + Matrix(c(rep(0,9),14,0,0,6,0,0,0), 4,4)
+D4 <- Diagonal(4, x=10:7); d4 <- as(D4, "matrix")
+D.D4 <- crossprod(D4); assert.EQ.mat(D.D4, crossprod(d4))
+stopifnotValid(D.D4, "ddiMatrix")
+stopifnotValid(su <- crossprod(cu), "dsCMatrix")
+stopifnot(
+    all(cu2 == cu2.)
+   ,# was wrong for ver. <= 0.999375-4
+          identical(D.D4, tcrossprod(D4))
+,
+          identical4(crossprod(d4, D4), crossprod(D4, d4), tcrossprod(d4, D4), D.D4)
+,
+	  is(cu2, "dtCMatrix"), is(cl2, "dtCMatrix"), # triangularity preserved
+	  cu2@diag == "U", cl2@diag == "U",# UNIT-triangularity preserved
+	  all.equal(D4 %*% cu, D4 %*% mcu)
+,
+	  all.equal(cu %*% D4, mcu %*% D4)
+,
+	  all(D4 %*% su == D4 %*% as.mat(su))
+,
+	  all(su %*% D4 == as.mat(su) %*% D4)
+,
+	  identical(t(cl2), cu2)
+  , # !!
+          identical ( crossprod(cu, D4),  crossprod(mcu, D4))
+,
+          identical4(tcrossprod(cu, D4), tcrossprod(mcu, D4), cu %*% D4, mcu %*% D4)
+,
+          identical4(tcrossprod(D4,cu), tcrossprod(D4,mcu), D4 %*% t(cu), D4 %*% t(mcu))
+,
+	  identical( crossprod(cu), Matrix( crossprod(mcu),sparse=TRUE))
+,
+	  identical(tcrossprod(cu), Matrix(tcrossprod(mcu),sparse=TRUE))
+    )
+assert.EQ.mat( crossprod(cu, D4),  crossprod(mcu, d4))
+assert.EQ.mat(tcrossprod(cu, D4), tcrossprod(mcu, d4))
+tr8 <- kronecker(rbind(c(2,0),c(1,4)), cl2)
+T8 <- tr8 %*% (tr8/2) # triangularity preserved?
+T8.2 <- (T8 %*% T8) / 4
+stopifnot(is(T8, "triangularMatrix"), T8@uplo == "L", is(T8.2, "dtCMatrix"))
+mr8 <- as(tr8,"matrix")
+m8. <- (mr8 %*% mr8 %*% mr8 %*% mr8)/16
+assert.EQ.mat(T8.2, m8.)
+
+data(KNex); mm <- KNex$mm
+M <- mm[1:500, 1:200]
+MT <- as(M, "TsparseMatrix")
+cpr   <- t(mm) %*% mm
+cpr.  <- crossprod(mm)
+cpr.. <- crossprod(mm, mm)
+stopifnot(is(cpr., "symmetricMatrix"),
+	  identical3(cpr, as(cpr., class(cpr)), cpr..))
+## with dimnames:
+m <- Matrix(c(0, 0, 2:0), 3, 5)
+dimnames(m) <- list(LETTERS[1:3], letters[1:5])
+m
+p1 <- t(m) %*% m
+(p1. <- crossprod(m))
+t1 <- m %*% t(m)
+(t1. <- tcrossprod(m))
+stopifnot(isSymmetric(p1.),
+	  isSymmetric(t1.),
+	  identical(p1, as(p1., class(p1))),
+	  identical(t1, as(t1., class(t1))),
+	  identical(dimnames(p1), dimnames(p1.)),
+	  identical(dimnames(p1), list(colnames(m), colnames(m))),
+	  identical(dimnames(t1), dimnames(t1.))
+	  )
+
+showMethods("%*%", class=class(M))
+
+v1 <- rep(1, ncol(M))
+str(r <-  M %*% Matrix(v1))
+str(rT <- MT %*% Matrix(v1))
+stopifnot(identical(r, rT))
+str(r. <- M %*% as.matrix(v1))
+stopifnot(identical4(r, r., rT, M %*% as(v1, "matrix")))
+
+v2 <- rep(1,nrow(M))
+r2 <- t(Matrix(v2)) %*% M
+r2T <- v2 %*% MT
+str(r2. <- v2 %*% M)
+stopifnot(identical3(r2, r2., t(as(v2, "matrix")) %*% M))
+
+
+###------------------------------------------------------------------
+### Close to singular matrix W
+### (from  micEconAids/tests/aids.R ... priceIndex = "S" )
+(load(system.file("external", "symW.rda", package="Matrix"))) # "symW"
+stopifnot(is(symW, "symmetricMatrix"))
+n <- nrow(symW)
+I <- .sparseDiagonal(n, shape="g")
+S <- as(symW, "matrix")
+sis <- solve(S,    S)
+## solve(<dsCMatrix>, <sparseMatrix>) when Cholmod fails was buggy for *long*:
+SIS <- solve(symW, symW)
+iw <- solve(symW)
+iss <- iw %*% symW
+##                                     nb-mm3   openBLAS (Avi A.)
+assert.EQ.(I, drop0(sis), tol = 1e-8)# 2.6e-10;  7.96e-9
+assert.EQ.(I, SIS,        tol = 1e-7)# 8.2e-9
+assert.EQ.(I, iss,        tol = 4e-4)# 3.3e-5
+## solve(<dsCMatrix>, <dense..>) :
+I <- diag(nr=n)
+SIS <- solve(symW, as(symW,"denseMatrix"))
+iw  <- solve(symW, I)
+iss <- iw %*% symW
+assert.EQ.mat(SIS, I, tol = 1e-7, giveRE=TRUE)
+assert.EQ.mat(iss, I, tol = 4e-4, giveRE=TRUE)
+rm(SIS,iss)
+
+WW <- as(symW, "generalMatrix") # the one that gave problems
+IW <- solve(WW)
+class(I1 <- IW %*% WW)# "dge" or "dgC" (!)
+class(I2 <- WW %*% IW)
+## these two were wrong for for M.._1.0-13:
+assert.EQ.(as(I1,"matrix"), I, tol = 1e-4)
+assert.EQ.(as(I2,"matrix"), I, tol = 7e-7)
+
+## now slightly perturb WW (and hence break exact symmetry
+set.seed(131); ii <- sample(length(WW), size= 100)
+WW[ii] <- WW[ii] * (1 + 1e-7*runif(100))
+SW. <- symmpart(WW)
+SW2 <- Matrix:::forceSymmetric(WW)
+stopifnot(all.equal(as(SW.,"matrix"),
+                    as(SW2,"matrix"), tol = 1e-7))
+(ch <- all.equal(WW, as(SW.,"dgCMatrix"), tolerance =0))
+stopifnot(is.character(ch), length(ch) == 1)## had length(.)  2  previously
+IW <- solve(WW)
+class(I1 <- IW %*% WW)# "dge" or "dgC" (!)
+class(I2 <- WW %*% IW)
+I <- diag(nr=nrow(WW))
+stopifnot(all.equal(as(I1,"matrix"), I, check.attributes=FALSE, tolerance = 1e-4),
+          ## "Mean relative difference: 3.296549e-05"  (or "1.999949" for Matrix_1.0-13 !!!)
+          all.equal(as(I2,"matrix"), I, check.attributes=FALSE)) #default tol gives "1" for M.._1.0-13
+
+if(doExtras) {
+    print(kappa(WW)) ## [1] 5.129463e+12
+    print(rcond(WW)) ## [1] 6.216103e-14
+    ## Warning message: rcond(.) via sparse -> dense coercion
+}
+
+class(Iw. <- solve(SW.))# FIXME? should be "symmetric" but is not
+class(Iw2 <- solve(SW2))# FIXME? should be "symmetric" but is not
+class(IW. <- as(Iw., "denseMatrix"))
+class(IW2 <- as(Iw2, "denseMatrix"))
+
+### The next two were wrong for very long, too
+assert.EQ.(I, as.matrix(IW. %*% SW.), tol= 4e-4)
+assert.EQ.(I, as.matrix(IW2 %*% SW2), tol= 4e-4)
+dIW <- as(IW, "denseMatrix")
+assert.EQ.(dIW, IW., tol= 4e-4)
+assert.EQ.(dIW, IW2, tol= 8e-4)
+
+##------------------------------------------------------------------
+
+
+
+## Sparse Cov.matrices from  Harri Kiiveri @ CSIRO
+a <- matrix(0,5,5)
+a[1,2] <- a[2,3] <- a[3,4] <- a[4,5] <- 1
+a <- a + t(a) + 2*diag(5)
+b <- as(a, "dsCMatrix") ## ok, but we recommend to use Matrix() ``almost always'' :
+(b. <- Matrix(a, sparse = TRUE))
+stopifnot(identical(b, b.))
+
+## calculate conditional variance matrix ( vars 3 4 5 given 1 2 )
+(B2 <- b[1:2, 1:2])
+bb <- b[1:2, 3:5]
+stopifnot(is(B2, "dsCMatrix"), # symmetric indexing keeps symmetry
+	  identical(as.mat(bb), rbind(0, c(1,0,0))),
+	  ## TODO: use fully-sparse cholmod_spsolve() based solution :
+	  is(z.s <- solve(B2, bb), "sparseMatrix"))
+assert.EQ.mat(B2 %*% z.s, as(bb, "matrix"))
+## -> dense RHS and dense result
+z. <- solve(as(B2, "dgCMatrix"), bb)# now *sparse*
+z  <- solve( B2, as(bb,"dgeMatrix"))
+stopifnot(is(z., "sparseMatrix"),
+          all.equal(z, as(z.,"denseMatrix")))
+## finish calculating conditional variance matrix
+v <- b[3:5,3:5] - crossprod(bb,z)
+stopifnot(all.equal(as.mat(v),
+		    matrix(c(4/3, 1:0, 1,2,1, 0:2), 3), tol = 1e-14))
+
+
+###--- "logical" Matrices : ---------------------
+
+##__ FIXME __ now works for lsparse* and nsparse* but not yet for  lge* and nge* !
+
+## Robert's Example, a bit more readable
+fromTo <- rbind(c(2,10),
+		c(3, 9))
+N <- 10
+nrFT <- nrow(fromTo)
+rowi <- rep.int(1:nrFT, fromTo[,2]-fromTo[,1] + 1) - 1:1
+coli <- unlist(lapply(1:nrFT, function(x) fromTo[x,1]:fromTo[x,2])) - 1:1
+
+# ## "n" --- nonzero pattern Matrices
+
+chk.ngMatrix <- function(M, verbose = TRUE) {
+    if(!(is(M, "nsparseMatrix") && length(d <- dim(M)) == 2 && d[1] == d[2]))
+        stop("'M' must be a square sparse [patter]n Matrix")
+    if(verbose)
+        show(M)
+    m  <- as(M, "matrix")
+
+    ## Part I : matrix products of pattern Matrices
+    ## ------   For now [by default]: *pattern* <==> boolean arithmetic
+    ## ==> FIXME ??: warning that this will change?
+    MM <- M %*% M # pattern (ngC)
+    if(verbose) { cat("M %*% M:\n"); show(MM) }
+    assert.EQ.mat(MM, m %*% m)
+    assert.EQ.mat(t(M) %*% M, ## <- 'pattern', because of cholmod_ssmult()
+                  (t(m) %*% m) > 0, tol=0)
+    cM <-  crossprod(M) # pattern  {FIXME ?? warning ...}
+    tM <- tcrossprod(M) # pattern  {FIXME ?? warning ...}
+    if(verbose) {cat( "crossprod(M):\n"); show(cM) }
+    if(verbose) {cat("tcrossprod(M):\n"); show(tM) }
+    stopifnot(is(cM,"symmetricMatrix"), is(tM,"symmetricMatrix"),
+	      identical(as( cM, "ngCMatrix"), t(M) %*%   M),
+	      identical(as( tM, "ngCMatrix"),  M   %*% t(M)))
+    assert.EQ.mat( cM,  crossprod(m) > 0)
+    assert.EQ.mat( tM, as(tcrossprod(m),"matrix") > 0)
+
+    ## Part II : matrix products pattern Matrices with numeric:
+    ##
+    ## "n" x "d" (and "d" x "n") --> "d", i.e. numeric in any case
+    dM <- as(M, "dMatrix")
+    stopifnot( ## dense ones:
+        identical( M %*% m, m %*% M -> Mm)
+       , ## sparse ones :
+        identical3(
+            M %*% dM, dM %*% M -> sMM,
+            as(as(m %*% m, "sparseMatrix"), class(sMM)))
+        )
+    if(verbose) {cat( "M %*% m:\n"); show(Mm) }
+    stopifnotValid(Mm,  "dMatrix") # not "n.."
+    stopifnotValid(sMM, "dMatrix") # not "n.."
+    stopifnotValid(cdM <-  crossprod(dM, M), "CsparseMatrix")
+    stopifnotValid(tdM <- tcrossprod(dM, M), "CsparseMatrix")
+    assert.EQ.mat (cdM,  crossprod(m))
+    assert.EQ.mat (tdM, tcrossprod(m))
+    stopifnot(identical( crossprod(dM), as(cdM, "symmetricMatrix")))
+    stopifnot(identical(tcrossprod(dM), as(tdM, "symmetricMatrix")))
+    invisible(TRUE)
+}
+
+sM <- new("ngTMatrix", i = rowi, j=coli, Dim=as.integer(c(N,N)))
+chk.ngMatrix(sM) # "ngTMatrix"
+chk.ngMatrix(tsM <- as(sM, "triangularMatrix")) #  ntT
+chk.ngMatrix(as( sM, "CsparseMatrix"))  #  ngC
+chk.ngMatrix(as(tsM, "CsparseMatrix"))  #  ntC
+
+## "l" --- logical Matrices -- use usual 0/1 arithmetic
+nsM <- sM
+sM  <- as(sM, "lMatrix")
+sm <- as(sM, "matrix")
+stopifnot(identical(sm, as.matrix(nsM)))
+stopifnotValid(sMM <- sM %*% sM, "dsparseMatrix")
+assert.EQ.mat (sMM,   sm %*% sm)
+assert.EQ.mat(t(sM) %*% sM,
+	      t(sm) %*% sm, tol=0)
+stopifnotValid(cM <- crossprod(sM),  "dsCMatrix")
+stopifnotValid(tM <- tcrossprod(sM), "dsCMatrix")
+stopifnot(identical(cM, as(t(sM) %*% sM, "symmetricMatrix")),
+	  identical(tM, forceSymmetric(sM %*% t(sM))))
+assert.EQ.mat( cM,     crossprod(sm))
+assert.EQ.mat( tM, as(tcrossprod(sm),"matrix"))
+dm <- as(sM, "denseMatrix")
+## the following 6 products (dm o sM) all failed up to 2013-09-03
+stopifnotValid(dm %*% sM,            "CsparseMatrix")## failed {missing coercion}
+stopifnotValid(crossprod (dm ,   sM),"CsparseMatrix")
+stopifnotValid(tcrossprod(dm ,   sM),"CsparseMatrix")
+dm[2,1] <- TRUE # no longer triangular
+stopifnotValid(           dm %*% sM, "CsparseMatrix")
+stopifnotValid(crossprod (dm ,   sM),"CsparseMatrix")
+stopifnotValid(tcrossprod(dm ,   sM),"CsparseMatrix")
+
+## A sparse example - with *integer* matrix:
+M <- Matrix(cbind(c(1,0,-2,0,0,0,0,0,2.2,0),
+		  c(2,0,0,1,0), 0, 0, c(0,0,8,0,0),0))
+t(M)
+(-4:5) %*% M
+stopifnot(as.vector(print(t(M %*% 1:6))) ==
+	  c(as(M,"matrix") %*% 1:6))
+(M.M <- crossprod(M))
+MM. <- tcrossprod(M)
+stopifnot(class(MM.) == "dsCMatrix",
+	  class(M.M) == "dsCMatrix")
+
+M3 <- Matrix(c(rep(c(2,0),4),3), 3,3, sparse=TRUE)
+I3 <- as(Diagonal(3), "CsparseMatrix")
+m3 <- as.matrix(M3)
+iM3 <- solve(m3)
+stopifnot(all.equal(unname(iM3), matrix(c(3/2,0,-1,0,1/2,0,-1,0,1), 3)))
+assert.EQ.mat(solve(as(M3, "sparseMatrix")), iM3)
+assert.EQ.mat(solve(I3,I3), diag(3))
+assert.EQ.mat(solve(M3, I3), iM3)# was wrong because I3 is unit-diagonal
+assert.EQ.mat(solve(m3, I3), iM3)# gave infinite recursion in (<=) 0.999375-10
+
+stopifnot(identical(ttI3 <-  crossprod(tru, I3), t(tru) %*% I3),
+	  identical(tI3t <-  crossprod(I3, tru), t(I3) %*% tru),
+	  identical(I3tt <- tcrossprod(I3, tru), I3 %*% t(tru)))
+I3@uplo # U pper triangular
+tru@uplo# L ower triangular
+## "FIXME": These are all FALSE now; the first one *is* ok (L o U); the others *not*
+isValid(tru %*% I3, "triangularMatrix")
+isValid(ttI3, "triangularMatrix")
+isValid(tI3t, "triangularMatrix")
+isValid(I3tt, "triangularMatrix")
+
+## even simpler
+m <- matrix(0, 4,7); m[c(1, 3, 6, 9, 11, 22, 27)] <- 1
+(mm <- Matrix(m))
+(cm <- Matrix(crossprod(m)))
+stopifnot(identical(crossprod(mm), cm))
+(tm1 <- Matrix(tcrossprod(m))) #-> had bug in 'Matrix()' !
+(tm2 <- tcrossprod(mm))
+Im2 <- solve(tm2[-4,-4])
+P <- as(as.integer(c(4,1,3,2)),"pMatrix")
+p <- as(P, "matrix")
+P %*% mm
+assertError(mm %*% P) # dimension mismatch
+assertError(m  %*% P) # ditto
+assertError(crossprod(t(mm), P)) # ditto
+stopifnotValid(tm1, "dsCMatrix")
+stopifnot(
+	  all.equal(tm1, tm2, tolerance =1e-15),
+	  identical(drop0(Im2 %*% tm2[1:3,]), Matrix(cbind(diag(3),0))),
+	  identical(p, as.matrix(P)),
+	  identical(P %*% m, as.matrix(P) %*% m),
+	  all(P %*% mm	==  P %*% m),
+	  all(P %*% mm	-   P %*% m == 0),
+	  all(t(mm) %*% P ==  t(m) %*% P),
+	  identical(crossprod(m, P),
+		    crossprod(mm, P)),
+	  TRUE)
+
+d <- function(m) as(m,"dsparseMatrix")
+IM1 <- as(c(3,1,2), "indMatrix")
+IM2 <- as(c(1,2,1), "indMatrix")
+assert.EQ.Mat(crossprod(  IM1,   IM2),
+              crossprod(d(IM1),d(IM2)), tol=0)# failed at first
+iM <- as(cbind2(IM2, 0), "indMatrix")
+stopifnot(identical3(crossprod(iM), # <- wrong for Matrix <= 1.1-5
+                     crossprod(iM, iM), Diagonal(x = 2:0)))
+
+N3 <- Diagonal(x=1:3)
+U3 <- Diagonal(3)
+C3 <- as(N3, "CsparseMatrix")
+lM <- as(IM2, "lMatrix")
+nM <- as(IM2, "nMatrix")
+nCM <- as(nM, "CsparseMatrix")
+NM <- N3 %*% IM2
+NM. <- C3 %*% IM2
+stopifnot(Q.C.identical(NM, ## <- failed
+                        d(N3) %*% d(IM2), checkClass=FALSE),
+          identical(NM, N3 %*% lM),
+          identical(NM, N3 %*% nM)
+          , ## all these "work" (but partly wrongly gave non-numeric Matrix:
+          Q.C.identical(NM, NM., checkClass=FALSE)
+          ,
+          mQidentical(as.matrix(NM.), array(c(1, 0, 3, 0, 2, 0), dim=3:2))
+          ,
+          identical(NM., C3 %*% lM)
+          ,
+          identical(NM., C3 %*% nM) # wrongly gave n*Matrix
+          ,
+          isValid(U3 %*% IM2, "dsparseMatrix")# was l*
+          ,
+          isValid(U3 %*% lM,  "dsparseMatrix")# was l*
+          ,
+          isValid(U3 %*% nM,  "dsparseMatrix")# was n*
+          ,
+          identical(C3 %*% nM -> C3n,  # wrongly gave ngCMatrix
+                    C3 %*% nCM)
+          ,
+          isValid(C3n, "dgCMatrix")
+          ,
+          identical3(U3 %*% IM2, # wrongly gave lgTMatrix
+                     U3 %*% lM -> U3l, # ditto
+                     U3 %*% nM)  # wrongly gave ngTMatrix
+          ,
+          isValid(U3l, "dgTMatrix")
+          )
+
+selectMethod("%*%", c("dtCMatrix", "ngTMatrix")) # x %*% .T.2.C(y) -->
+selectMethod("%*%", c("dtCMatrix", "ngCMatrix")) # .Call(Csparse_Csparse_prod, x, y)
+selectMethod("%*%", c("ddiMatrix", "indMatrix")) # x %*% as(y, "lMatrix") ->
+selectMethod("%*%", c("ddiMatrix", "lgTMatrix")) # diagCspprod(as(x, "Csp.."), y)
+selectMethod("%*%", c("ddiMatrix", "ngTMatrix")) #  (ditto)
+
+stopifnot(
+	isValid(show(crossprod(C3, nM)), "dgCMatrix"), # wrongly gave ngCMatrix
+	identical3(## the next 4 should give the same (since C3 and U3 are symmetric):
+   show(crossprod(U3, IM2)),# wrongly gave ngCMatrix
+	crossprod(U3, nM),  # ditto
+	crossprod(U3, lM))) # wrongly gave lgCMatrix
+
+
+set.seed(123)
+for(n in 1:250) {
+    n1 <- 2 + rpois(1, 10)
+    n2 <- 2 + rpois(1, 10)
+    N <- rpois(1, 25)
+    ii <- seq_len(N + min(n1,n2))
+    IM1 <- as(c(sample(n1), sample(n1, N, replace=TRUE))[ii], "indMatrix")
+    IM2 <- as(c(sample(n2), sample(n2, N, replace=TRUE))[ii], "indMatrix")
+    ## stopifnot(identical(crossprod(  IM1,    IM2),
+    ##                     crossprod(d(IM1), d(IM2))))
+    if(!identical(C1 <- crossprod(  IM1,    IM2 ),
+                  CC <- crossprod(d(IM1), d(IM2))) &&
+       !all(C1 == CC)) {
+        cat("The two crossprod()s differ: C1 - CC =\n")
+        print(C1 - CC)
+        stop("The two crossprod()s differ!")
+    } else if(n %% 25 == 0) cat(n, " ")
+}; cat("\n")
+
+## two with an empty column --- these failed till 2014-06-14
+X <- as(c(1,3,4,5,3), "indMatrix")
+Y <- as(c(2,3,4,2,2), "indMatrix")
+
+## kronecker:
+stopifnot(identical(X %x% Y,
+                    as(as.matrix(X) %x% as.matrix(Y), "indMatrix")))
+## crossprod:
+(XtY <- crossprod(X, Y))# gave warning in Matrix 1.1-3
+XtY_ok <- as(crossprod(as.matrix(X), as.matrix(Y)), "dgCMatrix")
+stopifnot(identical(XtY, XtY_ok)) # not true, previously
+
+###------- %&% -------- Boolean Arithmetic Matrix products
+
+x5 <- c(2,0,0,1,4)
+D5 <- Diagonal(x=x5)
+L5 <- D5 != 0 ## an "ldiMatrix"  NB: have *no*  ndiMatrix class
+D. <- Diagonal(x=c(TRUE,FALSE,TRUE,TRUE,TRUE))
+stopifnot(identical(D5 %&% D., L5))
+stopifnot(identical(D5 %&% as(D.,"CsparseMatrix"),
+                    as(as(L5, "nMatrix"),"CsparseMatrix")))
+
+set.seed(7)
+L <- Matrix(rnorm(20) > 1,    4,5)
+(N <- as(L, "nMatrix"))
+D <- Matrix(round(rnorm(30)), 5,6) # "dge", values in -1:1 (for this seed)
+L %&% D
+stopifnot(identical(L %&% D, N %&% D),
+          all(L %&% D == as((L %*% abs(D)) > 0, "sparseMatrix")))
+stopifnotValid(show(crossprod(N   ))      , "nsCMatrix") #  (TRUE/FALSE : boolean arithmetic)
+stopifnotValid(show(crossprod(N +0)) -> cN0, "dsCMatrix") # -> numeric Matrix (with same "pattern")
+stopifnot(all(crossprod(N) == t(N) %&% N),
+          identical(crossprod(N, boolArith=TRUE) -> cN.,
+                    as(cN0 != 0, "nMatrix")),
+          identical (cN.,               crossprod(L, boolArith=TRUE)),
+          identical3(cN0, crossprod(L), crossprod(L, boolArith=FALSE))
+          )
+stopifnotValid(cD <- crossprod(D, boolArith = TRUE), "nsCMatrix") # sparse: "for now"
+## another slightly differing test "series"
+L.L <- crossprod(L)
+(NN <- as(L.L > 0,"nMatrix"))
+nsy <- as(NN,"denseMatrix")
+stopifnot(identical(NN, crossprod(NN)))# here
+stopifnotValid(csy <- crossprod(nsy), "dpoMatrix")
+## ?? or  FIXME ?  give 'nsy', as  {boolArith=NA -> TRUE if args are "nMatrix"}
+stopifnotValid(csy. <- crossprod(nsy, boolArith=TRUE),"nsCMatrix")
+stopifnot(all((csy > 0) == csy.),
+          all(csy. == (nsy %&% nsy)))
+
+## for "many" more seeds:
+set.seed(7); for(nn in 1:256) {
+    L <- Matrix(rnorm(20) > 1,    4,5)
+    D <- Matrix(round(rnorm(30)), 5,6)
+    stopifnot(all(L %&% D == as((L %*% abs(D)) > 0, "sparseMatrix")))
+}
+
+## [Diagonal]  o  [0-rows/colums] :
+m20 <- matrix(nrow = 2, ncol = 0); m02 <- t(m20)
+M20 <- Matrix(nrow = 2, ncol = 0); M02 <- t(M20)
+stopifnot(identical(dim(Diagonal(x=c(1,2)) %*% m20), c(2L, 0L)),
+          identical(dim(Diagonal(2)        %*% M20), c(2L, 0L)),
+          identical(dim(Diagonal(x=2:1)    %*% M20), c(2L, 0L)))
+stopifnot(identical(dim(m02 %*% Diagonal(x=c(1,2))), c(0L, 2L)),
+          identical(dim(M02 %*% Diagonal(2)       ), c(0L, 2L)),
+          identical(dim(M02 %*% Diagonal(x=2:1)   ), c(0L, 2L)))
+
+cat('Time elapsed: ', proc.time(),'\n') # for ``statistical reasons''
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/tests/dtpMatrix.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/tests/dtpMatrix.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/tests/dtpMatrix.R	(revision 2477)
@@ -0,0 +1,63 @@
+### triangular packed
+library(Matrix)
+source(system.file("test-tools.R", package = "Matrix"))# identical3() etc
+
+cp6 <- chol(H6 <- Hilbert(6))
+tp6 <- as(cp6,"dtpMatrix")
+round(tp6, 3)## round() is "Math2" group method
+1/tp6        ## "Arith" group : gives 'dgeMatrix'
+str(tp6)
+## arithmetic with a mix of dimnames / no dimnames
+tp <- tp6; dimnames(tp) <- list(LETTERS[1:6], letters[11:16])
+## as.matrix() --> "logical" matrix
+stopifnot(as.matrix(tp - tp6 == tp6 - tp),
+	  as.matrix(0 == tp - tp6),
+	  identical(as(tp6,"CsparseMatrix"),
+		    as(cp6,"CsparseMatrix")))
+
+stopifnot(validObject(tp6),
+          all.equal(tp6 %*% diag(6), as(tp6, "dgeMatrix")),
+          validObject(tp6. <- diag(6) %*% tp6),
+          class((tt6 <- t(tp6))) == "dtpMatrix",
+          identical(t(tt6), tp6),
+          tp6@uplo == "U" && tt6@uplo == "L")
+
+all.equal(as(tp6.,"matrix"),
+          as(tp6, "matrix"), tolerance= 1e-15)
+(tr6 <- as(tp6, "dtrMatrix"))
+dH6 <- determinant(H6)
+D. <- determinant(tp6)
+rc <- rcond(tp6)
+stopifnot(all.equal(dH6$modulus, determinant(as.matrix(H6))$modulus),
+          is.all.equal3(c(D.$modulus), c(dH6$modulus) / 2, -19.883103353),
+          all.equal(rc, 1.791511257e-4),
+          all.equal(norm(tp6, "I") , 2.45),
+          all.equal(norm(tp6, "1") , 1),
+          all.equal(norm(tp6, "F") , 1.37047826623)
+          )
+object.size(tp6)
+object.size(as(tp6, "dtrMatrix"))
+object.size(as(tp6, "matrix"))
+D6 <- as(diag(6), "dgeMatrix")
+ge6 <- as(tp6, "dgeMatrix")
+stopifnot(all.equal(D6 %*% tp6, ge6),
+          all.equal(tp6 %*% D6, ge6))
+
+## larger case
+set.seed(123)
+rl <- new("dtpMatrix", uplo="L", diag="N", Dim = rep.int(1000:1000,2),
+          x = rnorm(500*1001))
+validObject(rl)
+str(rl)
+sapply(c("I", "1", "F"), function(type) norm(rl, type=type))
+rcond(rl)# 0 !
+stopifnot(all.equal(as(rl %*% diag(1000),"matrix"),
+                    as(rl, "matrix")))
+object.size(rl) ## 4 MB
+object.size(as(rl, "dtrMatrix"))# 8 MB
+object.size(as(rl, "matrix"))# ditto
+print(drl <- determinant(rl), digits = 12)
+stopifnot(all.equal(c(drl$modulus), -638.257312422))
+
+
+cat('Time elapsed: ', proc.time(),'\n') # for ``statistical reasons''
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/tests/bind.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/tests/bind.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/tests/bind.R	(revision 2477)
@@ -0,0 +1,237 @@
+#### Testing  cBind() & rBind()
+
+if(getRversion() >= "3.2.0") {
+    cBind <- base::cbind
+    rBind <- base::rbind
+}
+
+
+library(Matrix)
+
+source(system.file("test-tools.R", package = "Matrix"))# identical3() etc
+
+### --- Dense Matrices ---
+
+m1 <- m2 <- m <- matrix(1:12, 3,4)
+dimnames(m2) <- list(LETTERS[1:3],
+                     letters[1:4])
+dimnames(m1) <- list(NULL,letters[1:4])
+M  <- Matrix(m)
+M1 <- Matrix(m1)
+M2 <- Matrix(m2)
+
+stopifnot(
+    identical3(cBind ( M, 10*M),
+		show(cbind2( M, 10*M)),
+	      Matrix(cbind ( m, 10*m)))
+   ,
+    identical3(cBind (M1, 100+M1),
+               show(cbind2(M1, 100+M1)),
+               Matrix(cbind (m1, 100+m1)))
+   ,
+    identical3(cBind (M1, 10*M2),
+               show(cbind2(M1, 10*M2)),
+               Matrix(cbind (m1, 10*m2)))
+   ,
+    identical3(cBind (M2, M1+M2),
+               show(cbind2(M2, M1+M2)),
+               Matrix(cbind (m2, m1+m2)))
+   ,
+    identical(colnames(show(cBind(M1, MM = -1))),
+	      c(colnames(M1), "MM"))
+   ,
+    identical3(rBind ( M, 10*M),
+		show(rbind2( M, 10*M)),
+	      Matrix(rbind ( m, 10*m)))
+    ,
+    identical3(rBind (M2, M1+M2),
+	       show(rbind2(M2, M1+M2)),
+	       Matrix(rbind (m2, m1+m2)))
+   ,
+    Qidentical(show  (rBind(R1 = 10:11, M1)),
+	       Matrix(rbind(R1 = 10:11, m1)), strict=FALSE)
+  , TRUE)
+
+identical.or.eq <- function(x,y, tol=0, ...) {
+    if(identical(x,y, ...))
+        TRUE
+    else if(isTRUE(aeq <- all.equal(x,y, tolerance = tol)))
+        structure(TRUE, comment = "not identical")
+    else aeq
+}
+identicalShow <- function(x,y, ...)
+    if(!isTRUE(id <- identical.or.eq(x, y, ...))) cat(id,"\n")
+
+## Checking  deparse.level { <==> example at end of ?cbind }:
+checkRN <- function(dd, B = rbind) {
+    FN <- function(deparse.level)
+        rownames(B(1:4, c=2,"a+"=10, dd, deparse.level=deparse.level))
+    rn <- c("1:4", "c", "a+", "dd",  "")
+    isMatr <- (length(dim(dd)) == 2)
+    id <- if(isMatr) 5 else 4
+    if(!identical(B, methods:::rbind)) ## <= BUG in methods:::rbind !!
+    identicalShow(rn[c(5,2:3, 5)], FN(deparse.level= 0)) # middle two names
+    identicalShow(rn[c(5,2:3,id)], FN(deparse.level= 1)) # last shown if vector
+    identicalShow(rn[c(1,2:3,id)], FN(deparse.level= 2)) # first shown; (last if vec.)
+}
+checkRN(10) # <==> ?cbind's ex
+checkRN(1:4)
+checkRN(       rbind(c(0:1,0,0)))
+if(FALSE)# not yet
+checkRN(Matrix(rbind(c(0:1,0,0))))
+## rBind(): -- works with the above workaround methods:::rbind bug
+checkRN(10 ,				rBind)
+checkRN(1:4,				rBind)
+checkRN(       rbind(c(0:1,0,0)),  	rBind)
+checkRN(Matrix(rbind(c(0:1,0,0))), 	rBind)
+
+
+cBind(0, Matrix(0+0:1, 1,2), 3:2)# FIXME? should warn - as with matrix()
+as(rBind(0, Matrix(0+0:1, 1,2), 3:2),
+   "sparseMatrix")
+cBind(M2, 10*M2[nrow(M2):1 ,])# keeps the rownames from the first
+
+(im <- cBind(I = 100, M))
+str(im)
+(mi <- cBind(M2, I = 1000))
+str(mi)
+(m1m <- cBind(M,I=100,M2))
+showProc.time()
+
+### --- Diagonal / Sparse - had bugs
+
+D4 <- Diagonal(4)
+(D4T <- as(D4, "TsparseMatrix"))
+D4C <- as(D4T, "CsparseMatrix")
+c1 <- Matrix(0+0:3, 4, sparse=TRUE) ; r1 <- t(c1); r1
+
+d4 <- rBind(Diagonal(4), 0:3)
+m4 <- cBind(Diagonal(x=-1:2), 0:3)
+c4. <- cBind(Diagonal(4), c1)
+c.4 <- cBind(c1, Diagonal(4))
+r4. <- rBind(Diagonal(4), r1)
+r.4 <- rBind(r1, Diagonal(4))
+assert.EQ.mat(d4, rBind(diag(4),    0:3))
+assert.EQ.mat(m4, cBind(diag(-1:2), 0:3))
+stopifnot(identical(Matrix(cbind(diag(3),0)), cbind2(Diagonal(3),0)),
+	  is(d4, "sparseMatrix"), is(m4, "sparseMatrix"),
+	  identical(t(d4), cBind(Diagonal(4),     0:3)),
+	  identical(t(m4), rBind(Diagonal(x=-1:2), 0:3)))
+showProc.time()
+
+### --- Sparse Matrices ---
+
+identical4(cBind(diag(4), diag(4)),
+           cBind(D4C, D4C),
+           cBind(D4T, D4C),
+           cBind(D4C, D4T))
+nr <- 4
+m. <- matrix(c(0, 2:-1),  nr ,6)
+M <- Matrix(m.)
+(mC <- as(M, "dgCMatrix"))
+(mT <- as(M, "dgTMatrix"))
+stopifnot(identical(mT, as(mC, "dgTMatrix")),
+          identical(mC, as(mT, "dgCMatrix")))
+
+for(v in list(0, 2, 1:0))
+    for(fnam in c("cBind", "rBind")) {
+        cat(fnam,"(m, v=", deparse(v),"), class(m) :")
+        FUN <- get(fnam)
+        for(m in list(M, mC, mT)) {
+            cat("", class(m),"")
+            assert.EQ.mat(FUN(v, m), FUN(v, m.)) ; cat(",")
+            assert.EQ.mat(FUN(m, v), FUN(m., v)) ; cat(".")
+        }
+        cat("\n")
+    }
+showProc.time()
+
+cBind(0, mC); cBind(mC, 0)
+cBind(0, mT); cBind(mT, 2)
+cBind(diag(nr), mT)
+stopifnot(identical(t(cBind(diag(nr),   mT)),
+                      rBind(diag(nr), t(mT))))
+(cc <- cBind(mC, 0,7,0, diag(nr), 0))
+stopifnot(identical3(cc, cBind(mT, 0,7,0, diag(nr), 0),
+                     as( cBind( M, 0,7,0, diag(nr), 0), "dgCMatrix")))
+
+cBind(mC, 1, 100*mC, 0, 0:2)
+cBind(mT, 1, 0, mT+10*mT, 0, 0:2)
+one <- 1
+zero <- 0
+dimnames(mC) <- dimnames(mT) <- list(LETTERS[1:4], letters[1:6])
+op <- options(sparse.colnames = TRUE)# show colnames in print :
+cBind(mC, one, 100*mC, zero, 0:2)
+cBind(mC, one, 100*mC, zero, 0:2, deparse.level=0)# no "zero", "one"
+cBind(mC, one, 100*mC, zero, 0:2, deparse.level=2)# even "0:2"
+cBind(mT, one, zero, mT+10*mT, zero, 0:2)
+
+
+## logical (sparse) - should remain logical :
+L5 <- Diagonal(n = 5, x = TRUE); v5 <- rep(x = c(FALSE,TRUE), length = ncol(L5))
+stopifnot(is(show(rBind(L5,v5)), "lsparseMatrix"),
+	  is(show(cBind(v5,L5)), "lsparseMatrix"),
+	  is(rBind(L5, 2* v5), "dsparseMatrix"),
+	  is(cBind(2* v5, L5), "dsparseMatrix"))
+
+## print() / show() of  non-structural zeros:
+(m <- Matrix(c(0, 0, 2:0), 3, 5))
+(m2 <- cBind(m,m))
+(m4 <- rBind(m2,m2))
+diag(m4)
+for(i in 1:6) {
+    m4[i, i ] <- i
+    m4[i,i+1] <- 0
+}
+m4 ## now show some non-structural zeros:
+
+## Mixture of dense and sparse/diagonal -- used to fail, even in 1.0-0
+D5 <- Diagonal(x = 10*(1:5))
+(D5.1 <- cbind2(D5, 1))
+## "FIXME" in newer versions of R, do not need Matrix() here:
+s42 <- Matrix(z42 <- cbind2(rep(0:1,4), rep(1:0,4)),
+              sparse=TRUE)
+(C86 <- rBind(1, 0, D5.1, 0))
+stopifnotValid(D5.1, "dgCMatrix")
+stopifnotValid(print(rbind2(Matrix(1:10, 2,5), D5)),   "dgCMatrix")
+stopifnotValid(print(cbind2(Matrix(10:1, 5,2), D5.1)), "dgeMatrix")
+stopifnotValid(zz <- cbind2(z42, C86), "dgCMatrix")
+stopifnot(identical(zz, cbind2(s42, C86)))
+
+## Using "nMatrix"
+(m1 <- sparseMatrix(1:3, 1:3)) # ngCMatrix
+m2 <- sparseMatrix(1:3, 1:3, x = 1:3)
+stopifnotValid(c12 <- cBind(m1,m2), "dgCMatrix") # was "ngC.." because of cholmod_horzcat !
+stopifnotValid(c21 <- cBind(m2,m1), "dgCMatrix") #  ditto
+stopifnotValid(r12 <- rBind(m1,m2), "dgCMatrix") # was "ngC.." because of cholmod_vertcat !
+stopifnotValid(r21 <- rBind(m2,m1), "dgCMatrix") #  ditto
+d1 <- as(m1, "denseMatrix")
+d2 <- as(m2, "denseMatrix")
+stopifnotValid(cbind2(d2,d1), "dgeMatrix")
+stopifnotValid(cbind2(d1,d2), "dgeMatrix")## gave an error in Matrix 1.1-5
+stopifnotValid(rbind2(d2,d1), "dgeMatrix")
+stopifnotValid(rbind2(d1,d2), "dgeMatrix")## gave an error in Matrix 1.1-5
+
+## rbind2() / cbind2() mixing sparse/dense: used to "fail",
+## ------------------- then (in 'devel', ~ 2015-03): completely wrong
+S <- .sparseDiagonal(2)
+s <- diag(2)
+S9 <- rBind(S,0,0,S,0,NaN,0,0,0,2)## r/cbind2() failed to determine 'sparse' in Matrix <= 1.2-2
+s9 <- rbind(s,0,0,s,0,NaN,0,0,0,2)
+assert.EQ.mat(S9, s9)
+D <- Matrix(1:6, 3,2); d <- as.matrix(D)
+T9 <- t(S9); t9 <- t(s9); T <- t(D); t <- t(d)
+stopifnot(identical(rbind (s9,d), rbind2(s9,d)),
+	  identical(rbind2(D,S9), t(cbind2(T,T9))),
+	  identical(rbind2(S9,D), t(cbind2(T9,T))))
+assert.EQ.mat(rbind2(S9,D), rbind2(s9,d))
+assert.EQ.mat(rbind2(D,S9), rbind2(d,s9))
+## now with cbind2() -- no problem!
+stopifnot(identical(cbind (t9,t), cbind2(t9,t)))
+assert.EQ.mat(cbind2(T9,T), cbind2(t9,t))
+assert.EQ.mat(cbind2(T,T9), cbind2(t,t9))
+
+
+
+options(op)
+showProc.time()
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/tests/dg_Matrix.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/tests/dg_Matrix.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/tests/dg_Matrix.R	(revision 2477)
@@ -0,0 +1,95 @@
+library(Matrix)
+
+source(system.file("test-tools.R", package = "Matrix"))
+
+data(KNex) ; mm <- KNex$mm
+stopifnot(##is(mm) == c("dgCMatrix", "dMatrix", "Matrix"),
+          dim(mm) == (dm <- c(1850, 712)),
+          identical(dimnames(mm), list(NULL,NULL)))
+str(mm)
+tmm <- t(mm)
+str(tmm)
+
+str(mTm <- crossprod(mm))
+mmT  <- crossprod(tmm)
+mmT. <- tcrossprod(mm)
+stopifnot(all.equal(mmT, mmT.))
+## Previously these were not the same
+## Should be the same but not quite: even length( * @ x ) differs!
+##str(mmT, max=2)# much larger than mTm (i.e less sparse)
+##str(mmT., max=2)# x slot is currently slightly larger --> improve tcrossprod()?
+##system.time(ae <- all.equal(as(mmT.,"matrix"), as(mmT,"matrix"), tolerance = 1e-14))
+## 4-5 seconds on a 850 MHz, P III
+##stopifnot(ae)
+
+stopifnot(validObject(tmm), dim(tmm) == dm[2:1],
+          validObject(mTm), dim(mTm) == dm[c(2,2)],
+          validObject(mmT), dim(mmT) == dm[c(1,1)],
+          identical(as(tmm, "matrix"), t(as(mm, "matrix"))))
+
+## from a bug report by Guissepe Ragusa <gragusa@ucsd.edu>
+set.seed(101)
+for(i in 1:10) {
+    A <- matrix(rnorm(400), nrow = 100, ncol = 4)
+    A[A < +1] <- 0 ; Am <- A
+    Acsc <- as(Am, "dgCMatrix")
+    A    <- as(Am, "dgeMatrix")
+    b <- matrix(rnorm(400), nrow = 4, ncol = 100)
+    B <- as(b, "dgeMatrix")
+    assert.EQ.mat(A %*% B, Am %*%  b, tol=0)
+    assert.EQ.mat(B %*% A,  b %*% Am, tol=0)
+    stopifnot(identical(A, as(Acsc, "dgeMatrix")),
+              identical(Acsc, as(A, "dgCMatrix")),
+              is.all.equal4(A %*% B, Acsc %*% B,
+                            A %*% b, Acsc %*% b),
+              is.all.equal4(b %*% A, b %*% Acsc,
+                            B %*% A, B %*% Acsc))
+}
+
+###--- dgTMatrix {was ./dgTMatrix.R } -------
+
+### Use ``non-unique'' versions of dgTMatrix objects
+
+N <- 200
+set.seed(1)
+i <- as.integer(round(runif (N, 0, 100)))
+j <- as.integer(3* rpois (N, lam=15))
+x <- round(rnorm(N), 2)
+which(duplicated(cbind(i,j))) # 8 index pairs are duplicated
+
+m1 <- new("dgTMatrix", Dim = c(max(i)+1:1, max(j)+1:1), i = i, j = j, x = x)
+mc <- as(m1, "dgCMatrix")
+m2 <- as(mc, "dgTMatrix")## the same as 'm1' but without duplicates
+
+stopifnot(!isTRUE(all.equal.default(m1, m2)),
+          all.equal(as(m1,"matrix"), as(m2,"matrix"), tolerance =1e-15),
+          all.equal(crossprod(m1), crossprod(m2), tolerance =1e-15),
+          identical(mc, as(m2, "dgCMatrix")))
+
+### -> uniq* functions now in ../R/Auxiliaries.R
+(t2 <- system.time(um2 <- Matrix:::uniq(m1)))
+stopifnot(identical(m2,um2))
+
+### -> error/warning condition for solve() of a singular matrix (Barry Rowlingson)
+(M <- Matrix(0+ 1:16, nc = 4))
+assertError(solve(M), verbose=TRUE)## ".. computationally singular" + warning + caches LU
+assertError(solve(t(M)))
+options(warn=2) # no more warnings allowed from here
+lum <- lu(M, warnSing=FALSE)
+stopifnot(is(fLU <- M@factors $ LU, "MatrixFactorization"),
+          identical(lum, fLU))
+(e.lu <- expand(fLU))
+M2 <- with(e.lu, P %*% L %*% U)
+assert.EQ.mat(M2, as(M, "matrix"))
+## now the sparse LU :
+M. <- as(M,"sparseMatrix")
+tt <- try(solve(M.)) # less nice: factor is *not* cached
+## use a non-singular one:
+M1 <- M. + 0.5*Diagonal(nrow(M.))
+luM1 <- lu(M1)
+d1 <- determinant(as(M1,"denseMatrix"))
+stopifnot(identical(luM1, M1@factors$LU),
+	  diag(luM1@L) == 1,# L is *unit*-triangular
+	  all.equal(log(-prod(diag(luM1@U))), c(d1$modulus)))
+
+cat('Time elapsed: ', proc.time(),'\n') # for ``statistical reasons''
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/tests/factorizing.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/tests/factorizing.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/tests/factorizing.R	(revision 2477)
@@ -0,0 +1,629 @@
+#### Matrix Factorizations  --- of all kinds
+
+library(Matrix)
+
+source(system.file("test-tools.R", package = "Matrix"))# identical3() etc
+doExtras
+(is64bit <- .Machine$sizeof.pointer == 8)
+### "sparseQR" : Check consistency of methods
+##   --------
+data(KNex); mm <- KNex$mm; y <- KNex$y
+stopifnot(is((Y <- Matrix(y)), "dgeMatrix"))
+md <- as(mm, "matrix")                  # dense
+
+(cS <- system.time(Sq <- qr(mm)))
+(cD <- system.time(Dq <- qr(md))) # 1.1 sec. (lynne, 2011); 0.535 sec. (lynne, 2014)
+cD[1] / cS[1] # dense is  much ( ~ 100--170 times) slower
+
+## MM__FIXME__: move these functions to ../inst/test-tools.R
+chkQR <- function(a,
+                  y = seq_len(nrow(a)),## RHS: made to contain no 0
+                  a.qr = qr(a), tol = 1e-11, # 1e-13 failing very rarely (interesting)
+                  ##----------
+                  Qinv.chk = !sp.rank.def, QtQ.chk = !sp.rank.def,
+                  verbose = getOption("Matrix.verbose", FALSE), giveRE = verbose,
+                  quiet = FALSE)
+{
+    d <- dim(a)
+    stopifnot((n <- d[1]) >= (p <- d[2]), is.numeric(y))
+    kind <- if(is.qr(a.qr)) "qr" else
+    if(is(a.qr, "sparseQR")) "spQR" else stop("unknown qr() class: ", class(a.qr))
+    if(!missing(verbose) && verbose) {
+	op <- options(Matrix.verbose = verbose)
+	on.exit(options(op))
+    }
+    ## rank.def <- switch(kind,
+    ##     	       "qr"  = a.qr$rank < length(a.qr$pivot),
+    ##     	       "spQR" = a.qr@V@Dim[1] > a.qr@Dim[1])
+    sp.rank.def <- (kind == "spQR") && (a.qr@V@Dim[1] > a.qr@Dim[1])
+    if(sp.rank.def && !quiet && (missing(Qinv.chk) || missing(QtQ.chk)))
+	message("is sparse *structurally* rank deficient:  Qinv.chk=",
+		Qinv.chk,", QtQ.chk=",QtQ.chk)
+    if(is.na(QtQ.chk )) QtQ.chk  <- !sp.rank.def
+    if(is.na(Qinv.chk)) Qinv.chk <- !sp.rank.def
+
+    if(Qinv.chk) { ## qr.qy and qr.qty should be inverses,  Q'Q y = y = QQ' y :
+	## FIXME: Fails for structurally rank deficient sparse a's, but never for classical
+	assert.EQ(drop(qr.qy (a.qr, qr.qty(a.qr, y))), y, giveRE=giveRE, tol = tol/64)
+	assert.EQ(drop(qr.qty(a.qr, qr.qy (a.qr, y))), y, giveRE=giveRE, tol = tol/64)
+    }
+
+    piv <- switch(kind,
+                  "qr" = a.qr$pivot,
+                  "spQR" = 1L + a.qr@q)# 'q', not 'p' !!
+    invP <- sort.list(piv)
+
+    .ckQR <- function(cmpl) { ## local function, using parent's variables
+        if(verbose) cat("complete = ",cmpl,":\n", sep="")
+        Q <- qr.Q(a.qr, complete=cmpl)
+        R <- qr.R(a.qr, complete=cmpl)
+        rr <- if(cmpl) n else p
+        stopifnot(dim(Q) == c(n,rr),
+                  dim(R) == c(rr,p))
+        assert.EQ.Mat(a, Q %*% R[, invP], giveRE=giveRE, tol=tol)
+        ##            =  ===============
+	if(QtQ.chk)
+	    assert.EQ.mat(crossprod(Q), diag(rr), giveRE=giveRE, tol=tol)
+        ##                ===========   ====
+    }
+    .ckQR(FALSE)
+    .ckQR(TRUE)
+    invisible(a.qr)
+}## end{chkQR}
+
+##' Check QR-consistency of dense and sparse
+chk.qr.D.S <- function(d., s., y, Y = Matrix(y), force = FALSE, tol = 1e-10) {
+    stopifnot(is.qr(d.), is(s., "sparseQR"))
+    cc <- qr.coef(d.,y)
+    rank.def <- any(is.na(cc)) && d.$rank < length(d.$pivot)
+    if(rank.def && force) cc <- mkNA.0(cc) ## set NA's to 0 .. ok, in some case
+
+    ## when system is rank deficient, have differing cases, not always just NA <-> 0 coef
+    ## FIXME though:  resid & fitted should be well determined
+    if(force || !rank.def) stopifnot(
+### FIXME: temporary:
+###	is.all.equal3(	    cc	     , drop(qr.coef  (s.,y)), drop(qr.coef  (s.,Y)), tol=tol),
+	is.all.equal3(	unname( cc ) , drop(qr.coef  (s.,y)), drop(qr.coef  (s.,Y)), tol=tol),
+### END{FIXME}
+	is.all.equal3(qr.resid (d.,y), drop(qr.resid (s.,y)), drop(qr.resid (s.,Y)), tol=tol),
+	is.all.equal3(qr.fitted(d.,y), drop(qr.fitted(s.,y)), drop(qr.fitted(s.,Y)), tol=tol)
+	)
+}
+
+##' "Combi" calling chkQR() on both "(sparse)Matrix" and 'traditional' version
+##' ------  and combine the two qr decomp.s using chk.qr.D.S()
+##'
+##' @title check QR-decomposition, and compare sparse and dense one
+##' @param A a 'Matrix' , typically 'sparseMatrix'
+##' @param Qinv.chk
+##' @param QtQ.chk
+##' @param quiet
+##' @return list with 'qA' (sparse QR) and 'qa' (traditional (dense) QR)
+##' @author Martin Maechler
+checkQR.DS.both <- function(A, Qinv.chk, QtQ.chk=NA,
+                            quiet=FALSE, giveRE=TRUE, tol = 1e-13)
+{
+    stopifnot(is(A,"Matrix"))
+    if(!quiet) cat("classical: ")
+    qa <- chkQR(as.matrix(A), Qinv.chk=TRUE, QtQ.chk=TRUE, tol=tol, giveRE=giveRE)# works always
+    if(!quiet) cat("[Ok] ---  sparse: ")
+    qA <- chkQR(A, Qinv.chk=Qinv.chk, QtQ.chk=QtQ.chk, tol=tol, giveRE=giveRE)
+    validObject(qA)
+    if(!quiet) cat("[Ok]\n")
+    chk.qr.D.S(qa, qA, y = 10 + 1:nrow(A), tol = 256*tol)# ok [not done in rank deficient case!]
+    invisible(list(qA=qA, qa=qa))
+}
+
+if(doExtras) system.time({ ## ~ 20 sec {"large" example}   + 2x qr.R() warnings
+    cat("chkQR( <KNex> ) .. takes time .. ")
+    chkQR(mm, y=y, a.qr = Sq, verbose=TRUE)
+    chkQR(md, y=y, a.qr = Dq, verbose=TRUE)
+    cat(" done: [Ok]\n")
+})
+
+## consistency of results dense and sparse
+chk.qr.D.S(Dq, Sq, y, Y)
+
+## rank deficient QR cases: ---------------
+
+## From Simon (15 Jul 2009) + dimnames (11 May 2015)
+set.seed(10)
+a <- matrix(round(10 * runif(90)), 10,9, dimnames =
+            list(LETTERS[1:10], paste0("c", 1:9)))
+a[a < 7.5] <- 0
+(A <- Matrix(a))# first column = all zeros
+qD <- chkQR(a, giveRE=TRUE) ## using base qr
+qS <- chkQR(A, giveRE=TRUE) ## using Matrix "sparse qr" -- "structurally rank deficient!
+validObject(qS)# with the validity now (2012-11-18) -- ok, also for "bad" case
+chk.qr.D.S(qD, qS, y = 10 + 1:nrow(A), force=TRUE)# 6 warnings: "structurally rank deficient"
+try( ## NOTE: *Both* checks  currently fail here:
+    chkQR(A, Qinv.chk=TRUE, QtQ.chk=TRUE)
+)
+
+## Larger Scale random testing
+oo <- options(Matrix.quiet.qr.R = TRUE, Matrix.verbose = TRUE)
+set.seed(101)
+
+for(N in 1:(if(doExtras) 1008 else 24)) {
+    A <- rsparsematrix(8,5, nnz = rpois(1, lambda=16))
+    cat(sprintf("%4d -", N))
+    checkQR.DS.both(A, Qinv.chk= NA, QtQ.chk=NA,
+    ##                          --- => FALSE if struct. rank deficient
+		    giveRE = FALSE, tol = if(is64bit) 2e-13 else 1e-12)
+}
+unique(warnings())
+
+## Look at single "hard" cases: --------------------------------------
+
+## This is *REALLY* nice and small :
+A0 <- new("dgCMatrix", Dim = 4:3, i = c(0:3, 3L), p = c(0L, 3:5), x = rep(1,5))
+A0
+checkQR.DS.both(A0, Qinv.chk = FALSE, QtQ.chk=FALSE)
+##                                           ----- *both* still needed :
+try( checkQR.DS.both(A0,  TRUE, FALSE) )
+try( checkQR.DS.both(A0, FALSE,  TRUE) )
+
+## and the same when dropping the first row  { --> 3 x 3 }:
+A1 <- A0[-1 ,]
+checkQR.DS.both(A1, Qinv.chk = FALSE, QtQ.chk=FALSE)
+##                                           ----- *both* still needed :
+try( checkQR.DS.both(A1,  TRUE, FALSE) )
+try( checkQR.DS.both(A1, FALSE,  TRUE) )
+
+
+qa <- qr(as.matrix(A0))
+qA <- qr(A0)
+
+drop0(crossprod( Qd <- qr.Q(qa) ), 1e-15) # perfect = diag( 3 )
+drop0(crossprod( Qs <- qr.Q(qA) ), 1e-15) # R[3,3] == 0 -- OOPS!
+## OTOH, qr.R() is fine, as checked in the checkQR.DS.both(A0, *) above
+
+
+## zero-row *and* zero-column :
+(A2 <- new("dgCMatrix", i = c(0L, 1L, 4L, 7L, 5L, 2L, 4L)
+           , p = c(0L, 3L, 4L, 4L, 5L, 7L)
+           , Dim = c(8L, 5L)
+           , x = c(0.92, 1.06, -1.74, 0.74, 0.19, -0.63, 0.68)))
+checkQR.DS.both(A2, Qinv.chk = FALSE, QtQ.chk=FALSE)
+##                                           ----- *both* still needed :
+try( checkQR.DS.both(A2,  TRUE, FALSE) )
+try( checkQR.DS.both(A2, FALSE,  TRUE) )
+
+
+## Case of *NO* zero-row or zero-column:
+(A3 <- new("dgCMatrix", Dim = 6:5
+           , i = c(0L, 2L, 4L, 0L, 1L, 5L, 1L, 3L, 0L)
+           , p = c(0L, 1L, 3L, 6L, 8L, 9L)
+           , x = c(40, -54, -157, -28, 75, 166, 134, 3, -152)))
+checkQR.DS.both(A3, Qinv.chk = FALSE, QtQ.chk=FALSE)
+##                                           ----- *both* still needed :
+try( checkQR.DS.both(A3,  TRUE, FALSE) )
+try( checkQR.DS.both(A3, FALSE,  TRUE) )
+
+
+
+(A4 <- new("dgCMatrix", Dim = c(7L, 5L)
+           , i = c(1:2, 4L, 6L, 1L, 5L, 0:3, 0L, 2:4)
+           , p = c(0L, 4L, 6L, 10L, 10L, 14L)
+           , x = c(9, -8, 1, -9, 1, 10, -1, -2, 6, 14, 10, 2, 12, -9)))
+checkQR.DS.both(A4, Qinv.chk = FALSE, QtQ.chk=FALSE)
+##                                           ----- *both* still needed :
+try( checkQR.DS.both(A4,  TRUE, FALSE) )
+try( checkQR.DS.both(A4, FALSE,  TRUE) )
+
+(A5 <- new("dgCMatrix", Dim = c(4L, 4L)
+           , i = c(2L, 2L, 0:1, 0L, 2:3), p = c(0:2, 4L, 7L)
+           , x = c(48, 242, 88, 18, -167, -179, 18)))
+checkQR.DS.both(A5, Qinv.chk = FALSE, QtQ.chk=FALSE)
+##                                           ----- *both* still needed :
+try( checkQR.DS.both(A5,  TRUE, FALSE) )
+try( checkQR.DS.both(A5, FALSE,  TRUE) )
+
+
+for(N in 1:(if(doExtras) 2^12 else 128)) {
+    A <- round(100*rsparsematrix(5,3, nnz = min(15,rpois(1, lambda=10))))
+    if(any(apply(A, 2, function(x) all(x == 0)))) ## "column of all 0"
+        next
+    cat(sprintf("%4d -", N))
+    checkQR.DS.both(A, Qinv.chk=NA, giveRE=FALSE, tol = 1e-12)
+    ##                         --- => FALSE if struct. rank deficient
+}
+
+unique(warnings())
+
+
+options(oo)
+
+
+
+### "denseLU"
+
+## Testing expansions of factorizations {was ./expand.R, then in simple.R }
+## new: [m x n]  where m and n  may differ
+x. <- c(2^(0:5),9:1,-3:8, round(sqrt(0:16)))
+set.seed(1)
+for(nnn in 1:100) {
+    y <- sample(x., replace=TRUE)
+    m <- sample(2:6, 1)
+    n <- sample(2:7, 1)
+    x <- suppressWarnings(matrix(y, m,n))
+    lux <- lu(x)# occasionally a warning about exact singularity
+    xx <- with(expand(lux), (P %*% L %*% U))
+    print(dim(xx))
+    assert.EQ.mat(xx, x, tol = 16*.Machine$double.eps)
+}
+
+### "sparseLU"
+por1 <- readMM(system.file("external/pores_1.mtx", package = "Matrix"))
+lu1 <- lu(por1)
+pm <- as(por1, "CsparseMatrix")
+(pmLU <- lu(pm)) # -> show(<MatrixFactorization>)
+xp <- expand(pmLU)
+## permute rows and columns of original matrix
+ppm <- pm[pmLU@p + 1:1, pmLU@q + 1:1]
+Ppm <- pmLU@L %*% pmLU@U
+## identical only as long as we don't keep the original class info:
+stopifnot(identical3(lu1, pmLU, pm@factors$LU),# TODO === por1@factors$LU
+	  identical(ppm, with(xp, P %*% pm %*% t(Q))),
+	  sapply(xp, is, class="Matrix"))
+
+Ipm <- solve(pm, sparse=FALSE)
+Spm <- solve(pm, sparse=TRUE)  # is not sparse at all, here
+assert.EQ.Mat(Ipm, Spm, giveRE=TRUE, tol = 1e-13)# seen 7.36e-15 only on 32-bit
+stopifnot(abs(as.vector(solve(Diagonal(30, x=10) %*% pm) / Ipm) - 1/10) < 1e-7,
+	  abs(as.vector(solve(rep.int(4, 30)	  *  pm) / Ipm) - 1/ 4) < 1e-7)
+
+## these two should be the same, and `are' in some ways:
+assert.EQ.mat(ppm, as(Ppm, "matrix"), tol = 1e-14, giveRE=TRUE)
+## *however*
+length(ppm@x)# 180
+length(Ppm@x)# 317 !
+table(Ppm@x == 0)# (194, 123) - has 123 "zero" and 14 ``almost zero" entries
+
+##-- determinant() and det() --- working via LU ---
+m <- matrix(c(0, NA, 0, NA, NA, 0, 0, 0, 1), 3,3)
+m0 <- rbind(0,cbind(0,m))
+M <- as(m,"Matrix"); M ## "dsCMatrix" ...
+M0 <- rBind(0, cBind(0, M))
+dM  <- as(M, "denseMatrix")
+dM0 <- as(M0,"denseMatrix")
+try( lum  <- lu(M) )# Err: "near-singular A"
+(lum  <- lu(M,  errSing=FALSE))# NA --- *BUT* it is not stored in @factors
+(lum0 <- lu(M0, errSing=FALSE))# NA --- and it is stored in M0@factors[["LU"]]
+## "FIXME" - TODO: Consider
+replNA <- function(x, value) { x[is.na(x)] <- value ; x }
+(EL.1 <- expand(lu.1 <- lu(M.1 <- replNA(M, -10))))
+## so it's quite clear how  lu() of the *singular* matrix  M	should work
+## but it's not supported by the C code in ../src/cs.c which errors out
+stopifnot(all.equal(M.1,  with(EL.1, P %*% L %*% U %*% Q)),
+	  is.na(det(M)), is.na(det(dM)),
+	  is.na(det(M0)), is.na(det(dM0)) )
+
+###________ Cholesky() ________
+
+##--------  LDL' ---- small exact examples
+
+set.seed(1)
+for(n in c(5:12)) {
+    cat("\nn = ",n,"\n-------\n")
+    rr <- mkLDL(n)
+    ##    -------- from 'test-tools.R'
+    stopifnot(all(with(rr, A ==
+		       as(L %*% D %*% t(L), "symmetricMatrix"))),
+	      all(with(rr, A == tcrossprod(L %*% sqrt(D)))))
+    d <- rr$d.half
+    A <- rr$A
+    R <- chol(A)
+    assert.EQ.Mat(R, chol(as(A, "TsparseMatrix"))) # gave infinite recursion
+    print(d. <- diag(R))
+    D. <- Diagonal(x= d.^2)
+    L. <- t(R) %*% Diagonal(x = 1/d.)
+    stopifnot(all.equal(as.matrix(D.), as.matrix(rr$ D)),
+              all.equal(as.matrix(L.), as.matrix(rr$ L)))
+    ##
+    CAp <- Cholesky(A)# perm=TRUE --> Permutation:
+    p <- CAp@perm + 1L
+    P <- as(p, "pMatrix")
+    ## the inverse permutation:
+    invP <- solve(P)@perm
+    lDet <- sum(2* log(d))# the "true" value
+    ldetp  <-         Matrix:::.diag.dsC(Chx = CAp, res.kind = "sumLog")
+    ldetp. <- sum(log(Matrix:::.diag.dsC(Chx = CAp, res.kind = "diag") ))
+    ##
+    CA	<- Cholesky(A,perm=FALSE)
+    ldet <- Matrix:::.diag.dsC(Chx = CA, res.kind = "sumLog")
+    ## not printing CAp : ends up non-integer for n >= 11
+    mCAp <- as(CAp,"sparseMatrix")
+    print(mCA  <- drop0(as(CA, "sparseMatrix")))
+    stopifnot(identical(A[p,p], as(P %*% A %*% t(P),
+				   "symmetricMatrix")),
+	      relErr(d.^2, Matrix:::.diag.dsC(Chx= CA, res.kind="diag")) < 1e-14,
+	      relErr(A[p,p], tcrossprod(mCAp)) < 1e-14)
+    if(FALSE)
+        rbind(lDet,ldet, ldetp, ldetp.)
+    ##  ==> Empirically, I see  lDet = ldet  !=  ldetp == ldetp.
+    ## if(rr$rcond.A < ...) warning("condition number of A ..." ## <- TODO
+    cat(1,""); assert.EQ.(lDet,  ldet,   tol = 1e-14)
+    cat(2,""); assert.EQ.(ldetp, ldetp., tol = 1e-14)
+    cat(3,""); assert.EQ.(lDet,  ldetp, tol = n^2* 1e-7)# extreme: have seen 0.0011045 !!
+}## for()
+
+mkCholhash <- function(r.all) {
+    ## r.all %*% (2^(2:0)), but only those that do not have NA / "?" :
+    stopifnot(is.character(rn <- rownames(r.all)),
+              is.matrix(r.all), is.logical(r.all))
+    c.rn <- vapply(rn, function(ch) strsplit(ch, " ")[[1]], character(3))
+    ## Now
+    h1 <- function(i) {
+        ok <- c.rn[,i] != "?"
+        r.all[i, ok] %*% 2^((2:0)[ok])
+    }
+    vapply(seq_len(nrow(r.all)), h1, numeric(1))
+}
+
+set.seed(17)
+(rr <- mkLDL(4))
+(CA <- Cholesky(rr$A))
+stopifnot(all.equal(determinant(rr$A) -> detA,
+                    determinant(as(rr$A, "matrix"))),
+          is.all.equal3(c(detA$modulus), log(det(rr$D)), sum(log(rr$D@x))))
+A12 <- mkLDL(12, 1/10)
+(r12 <- allCholesky(A12$A))[-1]
+aCh.hash <- mkCholhash(r12$r.all)
+if(FALSE)## if(require("sfsmisc"))
+split(rownames(r12$r.all), Duplicated(aCh.hash))
+
+## TODO: find cases for both choices when we leave it to CHOLMOD to choose
+for(n in 1:50) { ## used to seg.fault at n = 10 !
+    mkA <- mkLDL(1+rpois(1, 30), 1/10)
+    cat(sprintf("n = %3d, LDL-dim = %d x %d ", n, nrow(mkA$A), ncol(mkA$A)))
+    r <- allCholesky(mkA$A, silentTry=TRUE)
+    ## Compare .. apart from the NAs that happen from (perm=FALSE, super=TRUE)
+    iNA <- apply(is.na(r$r.all), 1, any)
+    cat(sprintf(" -> %3s NAs\n", if(any(iNA)) format(sum(iNA)) else "no"))
+    stopifnot(aCh.hash[!iNA] == mkCholhash(r$r.all[!iNA,]))
+##     cat("--------\n")
+}
+
+
+## This is a relatively small "critical example" :
+A. <-
+    new("dsCMatrix", Dim = c(25L, 25L), uplo = "U"
+	, i = as.integer(
+          c(0, 1, 2, 3, 4, 2, 5, 6, 0, 8, 8, 9, 3, 4, 10, 11, 6, 12, 13, 4,
+            10, 14, 15, 1, 2, 5, 16, 17, 0, 7, 8, 18, 9, 19, 10, 11, 16, 20,
+            0, 6, 7, 16, 17, 18, 20, 21, 6, 9, 12, 14, 19, 21, 22, 9, 11, 19,
+            20, 22, 23, 1, 16, 24))
+	##
+	, p = c(0:6, 8:10, 12L, 15:16, 18:19, 22:23, 27:28, 32L, 34L, 38L, 46L, 53L, 59L, 62L)
+	##
+	, x = c(1, 1, 1, 1, 2, 100, 2, 40, 1, 2, 100, 6700, 100, 100, 13200,
+	  1, 50, 4100, 1, 5, 400, 20, 1, 40, 100, 5600, 9100, 5000, 5,
+	  100, 100, 5900, 100, 6200, 30, 20, 9, 2800, 1, 100, 8, 10, 8000,
+	  100, 600, 23900, 30, 100, 2800, 50, 5000, 3100, 15100, 100, 10,
+	  5600, 800, 4500, 5500, 7, 600, 18200))
+validObject(A.)
+## A1: the same pattern as  A.   just simply filled with '1's :
+A1 <- A.; A1@x[] <- 1; A1@factors <- list()
+A1.8 <- A1; diag(A1.8) <- 8
+##
+nT. <- as(AT <- as(A., "TsparseMatrix"),"nMatrix")
+stopifnot(all(nT.@i <= nT.@j),
+	  identical(qr(A1.8), qr(as(A1.8, "dgCMatrix"))))
+CA <- Cholesky(A.)
+stopifnotValid(CAinv <- solve(CA), "dsCMatrix")
+MA <- as(CA, "Matrix") # with a confusing warning -- FIXME!
+stopifnotValid(MAinv <- solve(MA), "dtCMatrix")
+## comparing MAinv with some solve(CA, system="...") .. *not* trivial? - TODO
+##
+CAinv2 <- solve(CA, Diagonal(nrow(A.)))
+CAinv2 <- as(CAinv2, "symmetricMatrix")
+stopifnot(identical(CAinv, CAinv2))
+
+## FINALLY fix "TODO": (not implemented *symbolic* factorization of nMatrix)
+try(    tc <- Cholesky(nT.)  )
+
+for(p in c(FALSE,TRUE))
+    for(L in c(FALSE,TRUE))
+        for(s in c(FALSE,TRUE, NA)) {
+            cat(sprintf("p,L,S = (%2d,%2d,%2d): ", p,L,s))
+            r <- tryCatch(Cholesky(A., perm=p, LDL=L, super=s),
+                          error = function(e)e)
+            cat(if(inherits(r, "error")) " *** E ***" else
+                sprintf("%3d", r@type),"\n", sep="")
+        }
+str(A., max=3) ## look at the 'factors'
+
+facs <- A.@factors
+names(facs) <- sub("Cholesky$", "", names(facs))
+facs <- facs[order(names(facs))]
+
+sapply(facs, class)
+str(lapply(facs, slot, "type"))
+## super = TRUE  currently always entails  LDL=FALSE :
+## hence isLDL is TRUE for ("D" and not "S"):
+sapply(facs, isLDL)
+
+chkCholesky <- function(chmf, A) {
+    stopifnot(is(chmf, "CHMfactor"),
+              is(A, "Matrix"), isSymmetric(A))
+    if(!is(A, "dsCMatrix"))
+        A <- as(A, "dsCMatrix")
+    L <- drop0(zapsmall(L. <- as(chmf, "Matrix")))
+    cat("no. nonzeros in L {before / after drop0(zapsmall(.))}: ",
+        c(nnzero(L.), nnzero(L)), "\n") ## 112, 95
+    ecc <- expand(chmf)
+    A... <- with(ecc, crossprod(crossprod(L,P)))
+    stopifnot(all.equal(L., ecc$L, tolerance = 1e-14),
+              all.equal(A,  A...,  tolerance = 1e-14, factorsCheck = FALSE))
+    invisible(ecc)
+}
+
+c1.8 <- try(Cholesky(A1.8, super = TRUE))# works "always", interestingly ...
+chkCholesky(c1.8, A1.8)
+
+
+
+## --- now a "large" (712 x 712) real data example ---------------------------
+
+data(KNex)
+mtm <- with(KNex, crossprod(mm))
+ld.3 <- .Call("dsCMatrix_LDL_D", mtm, perm=TRUE,  "sumLog")
+stopifnot(names(mtm@factors) == "sPDCholesky")
+ld.4 <- .Call("dsCMatrix_LDL_D", mtm, perm=FALSE, "sumLog")# clearly slower
+stopifnot(names(mtm@factors) == paste(c("sPD", "spD"),"Cholesky", sep=''))
+c2 <- Cholesky(mtm, super = TRUE)
+stopifnot(names(mtm@factors) == paste(c("sPD", "spD", "SPd"),
+               "Cholesky", sep=''))
+
+r <- allCholesky(mtm)
+r[-1]
+
+## is now taken from cache
+c1 <- Cholesky(mtm)
+
+bv <- 1:nrow(mtm) # even integer
+b <- matrix(bv)
+## solve(c2, b) by default solves  Ax = b, where A = c2'c2 !
+x <- solve(c2,b)
+stopifnot(identical3(x, solve(c2, bv), solve(c2, b, system = "A")),
+          all.equal(x, solve(mtm, b)))
+for(sys in c("A", "LDLt", "LD", "DLt", "L", "Lt", "D", "P", "Pt")) {
+    x <- solve(c2, b,  system = sys)
+    cat(sys,":\n"); print(head(x))
+    stopifnot(dim(x) == c(712, 1),
+              identical(x, solve(c2, bv, system = sys)))
+}
+
+## log(|LL'|) - check if super = TRUE and simplicial give same determinant
+ld1 <- .Call("CHMfactor_ldetL2", c1)
+ld2 <- .Call("CHMfactor_ldetL2", c2)
+(ld1. <- determinant(mtm))
+## experimental
+ld3 <- .Call("dsCMatrix_LDL_D", mtm, TRUE, "sumLog")
+ld4 <- .Call("dsCMatrix_LDL_D", mtm, FALSE, "sumLog")
+stopifnot(all.equal(ld1, ld2),
+	  is.all.equal3(ld2, ld3, ld4),
+	  all.equal(ld.3, ld3, tolerance = 1e-14),
+	  all.equal(ld.4, ld4, tolerance = 1e-14),
+	  all.equal(ld1, as.vector(ld1.$modulus), tolerance = 1e-14))
+
+## Some timing measurements
+mtm <- with(KNex, crossprod(mm))
+I <- .symDiagonal(n=nrow(mtm))
+set.seed(101); r <- runif(100)
+
+system.time(D1 <- sapply(r, function(rho) Matrix:::ldet1.dsC(mtm + (1/rho) * I)))
+## 0.842 on fast cmath-5
+system.time(D2 <- sapply(r, function(rho) Matrix:::ldet2.dsC(mtm + (1/rho) * I)))
+## 0.819
+system.time(D3 <- sapply(r, function(rho) Matrix:::ldet3.dsC(mtm + (1/rho) * I)))
+## 0.810
+stopifnot(is.all.equal3(D1,D2,D3, tol = 1e-13))
+
+## Updating LL'  should remain LL' and not become  LDL' :
+cholCheck <- function(Ut, tol = 1e-12, super = FALSE, LDL = !super) {
+    L <- Cholesky(UtU <- tcrossprod(Ut), super=super, LDL=LDL, Imult = 1)
+    L1 <- update(L, UtU, mult = 1)
+    L2 <- update(L, Ut,  mult = 1)
+    stopifnot(is.all.equal3(L, L1, L2, tol = tol),
+              all.equal(update(L, UtU, mult = pi),
+                        update(L, Ut,  mult = pi), tolerance = tol)
+              )
+}
+
+## Inspired by
+## data(Dyestuff, package = "lme4")
+## Zt <- as(Dyestuff$Batch, "sparseMatrix")
+Zt <- new("dgCMatrix", Dim = c(6L, 30L), x = 2*1:30,
+          i = rep(0:5, each=5),
+          p = 0:30, Dimnames = list(LETTERS[1:6], NULL))
+cholCheck(0.78 * Zt, tol=1e-14)
+
+for(i in 1:120) {
+    set.seed(i); cat(sprintf("%3d: ", i))
+    M <- rspMat(n=rpois(1,50), m=rpois(1,20), density = 1/(4*rpois(1, 4)))
+    for(super in c(FALSE,TRUE)) {
+        cat("super=",super," M: ")
+        cholCheck( M  , super=super); cat(" M': ")
+        cholCheck(t(M), super=super)
+    }
+    cat(" [Ok]\n")
+}
+
+.updateCHMfactor
+## TODO: (--> ../TODO "Cholesky"):
+## ----
+## allow Cholesky(A,..) when A is not symmetric *AND*
+## we really want to factorize  AA' ( + beta * I)
+
+
+## Schur() ----------------------
+checkSchur <- function(A, SchurA = Schur(A), tol = 1e-14) {
+    stopifnot(is(SchurA, "Schur"),
+              isOrthogonal(Q <- SchurA@Q),
+              all.equal(as.mat(A),
+                        as.mat(Q %*% SchurA@T %*% t(Q)), tolerance = tol))
+}
+
+SH <- Schur(H5 <- Hilbert(5))
+checkSchur(H5, SH)
+checkSchur(Diagonal(x = 9:3))
+
+p <- 4L
+uTp <- new("dtpMatrix", x=c(2, 3, -1, 4:6, -2:1), Dim = c(p,p))
+(uT <- as(uTp, "dtrMatrix"))
+## Schur ( <general> )  <--> Schur( <triangular> )
+Su <- Schur(uT) ;   checkSchur(uT, Su)
+gT <- as(uT,"generalMatrix")
+Sg <- Schur(gT) ;   checkSchur(gT, Sg)
+Stg <- Schur(t(gT));checkSchur(t(gT), Stg)
+Stu <- Schur(t(uT));checkSchur(t(uT), Stu)
+
+stopifnot(identical3(Sg@T, uT, Su@T),
+          identical(Sg@Q, as(diag(p), "dgeMatrix")),
+          identical(Stg@T, as(t(gT[,p:1])[,p:1], "triangularMatrix")),
+          identical(Stg@Q, as(diag(p)[,p:1], "dgeMatrix")),
+          identical(Stu@T, Stg@T))
+assert.EQ.mat(Stu@Q, as(Stg@Q,"matrix"), tol=0)
+
+## the pedigreemm example where solve(.) failed:
+p <- new("dtCMatrix", i = c(2L, 3L, 2L, 5L, 4L, 4:5), p = c(0L, 2L, 4:7, 7L),
+	 Dim = c(6L, 6L), Dimnames = list(as.character(1:6), NULL),
+	 x = rep.int(-0.5, 7), uplo = "L", diag = "U")
+Sp <- Schur(p)
+Sp. <- Schur(as(p,"generalMatrix"))
+Sp.p <- Schur(crossprod(p))
+## the last two failed
+ip <- solve(p)
+assert.EQ.mat(solve(ip), as(p,"matrix"))
+
+
+## chol2inv() for a traditional matrix
+assert.EQ.mat(     crossprod(chol2inv(chol(Diagonal(x = 5:1)))),
+              C <- crossprod(chol2inv(chol(    diag(x = 5:1)))))
+stopifnot(all.equal(C, diag((5:1)^-2)))
+## failed in some versions because of a "wrong" implicit generic
+
+## From [Bug 14834] New: chol2inv *** caught segfault ***
+n <- 1e6 # was 595362
+A <- chol( D <- Diagonal(n) )
+stopifnot(identical(A,D)) # A remains (unit)diagonal
+is(tA <- as(A,"triangularMatrix"))# currently a dtTMatrix
+stopifnotValid(tA, "dsparseMatrix")
+CA <- as(tA, "CsparseMatrix")
+
+selectMethod(solve, c("dtCMatrix","missing"))
+##--> .Call(dtCMatrix_sparse_solve, a, .trDiagonal(n))  in ../src/dtCMatrix.c
+sA  <- solve(CA)## -- R_CheckStack() segfault in Matrix <= 1.0-4
+nca <- diagU2N(CA)
+stopifnot(identical(sA, nca))
+## same check with non-unit-diagonal D :
+A <- chol(D <- Diagonal(n, x = 0.5))
+ia <- chol2inv(A)
+stopifnot(is(ia, "diagonalMatrix"),
+	  all.equal(ia@x, rep(2,n), tolerance = 1e-15))
+
+
+cat('Time elapsed: ', proc.time(),'\n') # for ``statistical reasons''
+if(!interactive()) warnings()
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/tests/other-pkgs.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/tests/other-pkgs.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/tests/other-pkgs.R	(revision 2477)
@@ -0,0 +1,150 @@
+####--------- Test interfaces to other non-standard Packages ---------------
+
+library(Matrix)
+
+source(system.file("test-tools.R", package = "Matrix"))# identical3() etc
+
+MatrixRversion <- pkgRversion("Matrix")
+
+###-- 1)  'graph' (from Bioconductor) ---------------------------
+###-- ==  =======                     ---------------------------
+## do not run the test "usually" for now [Solaris problem after detach() ..]:
+if((Sys.getenv("USER")=="maechler" || nzchar(Sys.getenv("R_MATRIX_CHECK_EXTRA"))) &&
+   isTRUE(try(require(graph)))) { # may be there and fail (with R-devel)
+
+    if(packageDescription("graph")$Version <= "1.10.2") {
+        ## graph 1.10.x for x <= 2 had too many problems  as(<graph>, "matrix")
+        cat("Version of 'graph' is too old --- no tests done here!\n")
+
+    } else if(pkgRversion("graph") != MatrixRversion) {
+
+        cat(sprintf("The R version (%s) of 'graph' installation differs from the Matrix one (%s)\n",
+                    pkgRversion("graph"), MatrixRversion))
+
+    } else { ## do things
+
+    if(!dev.interactive(orNone=TRUE)) pdf("other-pkg-graph.pdf")
+
+    ## 0) Simplest non-trivial graph: has no weights:
+    g0 <- graphNEL(paste(1:2), edgeL=list("1"="2"), "directed")
+    m0 <- as(g0, "Matrix")
+    stopifnot(is(m0,"ngCMatrix"), dim(m0) == c(2,2), which(m0) == 3)
+    g. <- as(m0, "graph") ## failed in Matrix <= 1.1-0
+    m. <- as(g., "Matrix")
+    stopifnot( identical(m., m0) ) ## but (g0, g.) differ: the latter has '1' weights
+
+    ## 1) undirected
+
+    V <- LETTERS[1:4]
+    edL <- vector("list", length=4)
+    names(edL) <- V
+    ## 1a) unweighted
+    for(i in 1:4)
+        edL[[i]] <- list(edges = 5-i)
+    gR <- new("graphNEL", nodes=V, edgeL=edL)
+    str(edges(gR))
+    sm.g <- as(gR, "sparseMatrix")
+    str(sm.g) ## dgC: TODO: want 'ds.' (symmetric)
+    validObject(sm.g)
+    show( sm.g )## (incl colnames !)
+
+    ## 1b) weighted
+    set.seed(123)
+    for(i in 1:4)
+        edL[[i]] <- list(edges = 5-i, weights=runif(1))
+    gRw <- new("graphNEL", nodes=V, edgeL=edL)
+    str(edgeWeights(gRw))
+    sm.gw <- as(gRw, "sparseMatrix")
+    str(sm.gw) ## *numeric* dgCMatrix
+    validObject(sm.gw)
+    show( sm.gw )## U[0,1] numbers in anti-diagonal
+
+    ## 2) directed
+    gU <- gR; edgemode(gU) <- "directed"
+    sgU <- as(gU, "sparseMatrix")
+    str(sgU) ## 'dgC'
+    validObject(sgU)
+    show( sgU )
+
+    ## Reverse :  sparseMatrix -> graph
+    sm.g[1,2] <- 1
+    gmg  <-  as(sm.g, "graph")
+    validObject(gmg2 <-  as(sm.g, "graphNEL"))
+    gmgw <-  as(sm.gw, "graph")
+    validObject(gmgw2 <- as(sm.gw, "graphNEL"))
+    gmgU <-  as(sgU, "graph")
+    validObject(gmgU2 <- as(sgU, "graphNEL"))
+    stopifnot(identical(gmg, gmg2),
+              identical(gmgw, gmgw2),
+              identical(gmgU, gmgU2))
+
+    data(CAex)
+    cc <- crossprod(CAex)
+    ## work around bug in 'graph': diagonal must be empty:
+    diag(cc) <- 0; cc <- drop0(cc)
+    image(cc)
+    gg <- as(cc, "graph")
+
+    .r <- require# cheat checks - do *not* want it in DESCRIPTION:
+    if(.r("Rgraphviz")) {
+	plot(gg, "circo")
+	detach("package:Rgraphviz", unload = TRUE)
+    }
+    stopifnot(all.equal(edgeMatrix(gg),
+                        rbind(from = c(rep(1:24, each=2), 25:48),
+                              to   = c(rbind(25:48,49:72), 49:72))))
+
+    detach("package:graph", unload = TRUE)
+    dev.off()
+    } # {else}
+
+} ## end{graph}
+
+###-- 2)  'SparseM' ---------------------------------------------
+###-- ==  ========  ---------------------------------------------
+
+if(isTRUE(try(require(SparseM)))) { # may be there and fail
+
+    if(pkgRversion("SparseM") != MatrixRversion) {
+
+        cat(sprintf("The R version (%s) of 'SparseM' installation differs from the Matrix one (%s)\n",
+                    pkgRversion("SparseM"), MatrixRversion))
+
+    } else { ## do things
+
+	set.seed(1)
+	a <- round(rnorm(5*4), 2)
+	a[abs(a) < 0.7] <- 0
+	A <- matrix(a,5,4)
+	print(M <- Matrix(A))
+	stopifnot(
+            validObject(A.csr <- as.matrix.csr(A)),
+            validObject(At.csr <- as.matrix.csr(t(A))),
+            validObject(A.csc <- as.matrix.csc(A)),
+            identical(At.csr, t(A.csr)),
+            identical(A, as.matrix(A.csr)),
+            identical(A.csr, as(M, "matrix.csr")),
+            identical(A.csc, as(M, "matrix.csc")),
+            identical3(M, as(A.csr, "CsparseMatrix"), as(A.csr, "dgCMatrix")),
+            identical(t(M), as(At.csr, "CsparseMatrix"))
+            )
+
+	## More tests, notably for triplets
+	A.coo <- as.matrix.coo(A)
+	str(T  <- as(M, "TsparseMatrix")) # has 'j' sorted
+	str(T. <- as(A.coo, "TsparseMatrix")) # has 'i' sorted
+
+	T3 <- as(as(T, "matrix.coo"), "Matrix") # dgT
+	M3 <- as(A.csr,               "Matrix") # dgC
+	M4 <- as(A.csc,               "Matrix") # dgC
+	M5 <- as(as(M, "matrix.coo"), "Matrix") # dgT
+	uniqT <- uniqTsparse
+	stopifnot(identical4(uniqT(T), uniqT(T.), uniqT(T3), uniqT(M5)),
+		  identical3(M, M3, M4))
+
+	if(FALSE) # detaching the package gives error ".GenericTable" not found
+	    detach("package:SparseM")
+
+    }
+
+}## end{SparseM}
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/html/R.css
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/html/R.css	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/html/R.css	(revision 2477)
@@ -0,0 +1,97 @@
+body {
+    background: white;
+    color: black;
+}
+
+a:link {
+    background: white;
+    color: blue;
+}
+
+a:visited {
+    background: white;
+    color: rgb(50%, 0%, 50%);
+}
+
+h1 {
+    background: white;
+    color: rgb(55%, 55%, 55%);
+    font-family: monospace;
+    font-size: x-large;
+    text-align: center;
+}
+
+h2 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-size: large;
+    text-align: center;
+}
+
+h3 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-size: large;
+}
+
+h4 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-style: italic;
+    font-size: large;
+}
+
+h5 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+}
+
+h6 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-style: italic;
+}
+		
+img.toplogo {
+    width: 4em;
+    vertical-align: middle;
+}
+
+img.arrow {
+    width: 30px;
+    height: 30px;
+    border: 0;
+}
+
+span.acronym {
+    font-size: small;
+}
+
+span.env {
+    font-family: monospace;
+}
+
+span.file {
+    font-family: monospace;
+}
+
+span.option{
+    font-family: monospace;
+}
+
+span.pkg {
+    font-weight: bold;
+}
+
+span.samp{
+    font-family: monospace;
+}
+
+div.vignettes a:hover {
+    background: rgb(85%, 85%, 85%);
+}

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/html/R.css
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/html/00Index.html
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/html/00Index.html	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/html/00Index.html	(revision 2477)
@@ -0,0 +1,1417 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title>R: Sparse and Dense Matrix Classes and Methods</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<link rel="stylesheet" type="text/css" href="R.css" />
+</head><body>
+<h1> Sparse and Dense Matrix Classes and Methods
+<img class="toplogo" src="../../../doc/html/Rlogo.svg" alt="[R logo]" />
+</h1>
+<hr/>
+<div style="text-align: center;">
+<a href="../../../doc/html/packages.html"><img class="arrow" src="../../../doc/html/left.jpg" alt="[Up]" /></a>
+<a href="../../../doc/html/index.html"><img class="arrow" src="../../../doc/html/up.jpg" alt="[Top]" /></a>
+</div><h2>Documentation for package &lsquo;Matrix&rsquo; version 1.2-7.1</h2>
+
+<ul><li><a href="../DESCRIPTION">DESCRIPTION file</a>.</li>
+<li><a href="../doc/index.html">User guides, package vignettes and other documentation.</a></li>
+<li><a href="../NEWS">Package NEWS</a>.</li>
+</ul>
+
+<h2>Help Pages</h2>
+
+
+<p style="text-align: center;">
+<a href="#A">A</a>
+<a href="#B">B</a>
+<a href="#C">C</a>
+<a href="#D">D</a>
+<a href="#E">E</a>
+<a href="#F">F</a>
+<a href="#G">G</a>
+<a href="#H">H</a>
+<a href="#I">I</a>
+<a href="#K">K</a>
+<a href="#L">L</a>
+<a href="#M">M</a>
+<a href="#N">N</a>
+<a href="#O">O</a>
+<a href="#P">P</a>
+<a href="#Q">Q</a>
+<a href="#R">R</a>
+<a href="#S">S</a>
+<a href="#T">T</a>
+<a href="#U">U</a>
+<a href="#W">W</a>
+<a href="#X">X</a>
+<a href="#Z">Z</a>
+<a href="#misc">misc</a>
+</p>
+
+
+<h2><a name="A">-- A --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="abIndex-class.html">abIndex-class</a></td>
+<td>Class "abIndex" of Abstract Index Vectors</td></tr>
+<tr><td style="width: 25%;"><a href="abIseq.html">abIseq</a></td>
+<td>Sequence Generation of "abIndex", Abstract Index Vectors</td></tr>
+<tr><td style="width: 25%;"><a href="abIseq.html">abIseq1</a></td>
+<td>Sequence Generation of "abIndex", Abstract Index Vectors</td></tr>
+<tr><td style="width: 25%;"><a href="all-methods.html">all-method</a></td>
+<td>"Matrix" Methods for Functions all() and any()</td></tr>
+<tr><td style="width: 25%;"><a href="diagonalMatrix-class.html">all-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="nsparseMatrix-classes.html">all-method</a></td>
+<td>Sparse "pattern" Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="all-methods.html">all-methods</a></td>
+<td>"Matrix" Methods for Functions all() and any()</td></tr>
+<tr><td style="width: 25%;"><a href="all.equal-methods.html">all.equal-method</a></td>
+<td>Matrix Package Methods for Function all.equal()</td></tr>
+<tr><td style="width: 25%;"><a href="all.equal-methods.html">all.equal-methods</a></td>
+<td>Matrix Package Methods for Function all.equal()</td></tr>
+<tr><td style="width: 25%;"><a href="all-methods.html">any-method</a></td>
+<td>"Matrix" Methods for Functions all() and any()</td></tr>
+<tr><td style="width: 25%;"><a href="diagonalMatrix-class.html">any-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="nsparseMatrix-classes.html">any-method</a></td>
+<td>Sparse "pattern" Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="uniqTsparse.html">anyDuplicatedT</a></td>
+<td>Unique TsparseMatrix Representations</td></tr>
+<tr><td style="width: 25%;"><a href="is.na-methods.html">anyNA-method</a></td>
+<td>is.na(), is.infinite() Methods for 'Matrix' Objects</td></tr>
+<tr><td style="width: 25%;"><a href="CsparseMatrix-class.html">Arith-method</a></td>
+<td>Class "CsparseMatrix" of Sparse Matrices in Column-compressed Form</td></tr>
+<tr><td style="width: 25%;"><a href="Matrix-class.html">Arith-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="abIndex-class.html">Arith-method</a></td>
+<td>Class "abIndex" of Abstract Index Vectors</td></tr>
+<tr><td style="width: 25%;"><a href="dMatrix-class.html">Arith-method</a></td>
+<td>(Virtual) Class "dMatrix" of "double" Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="ddenseMatrix-class.html">Arith-method</a></td>
+<td>Virtual Class "ddenseMatrix" of Numeric Dense Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dgCMatrix-class.html">Arith-method</a></td>
+<td>Compressed, sparse, column-oriented numeric matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dgeMatrix-class.html">Arith-method</a></td>
+<td>Class "dgeMatrix" of Dense Numeric (S4 Class) Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="diagonalMatrix-class.html">Arith-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dpoMatrix-class.html">Arith-method</a></td>
+<td>Positive Semi-definite Dense Numeric Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dsCMatrix-class.html">Arith-method</a></td>
+<td>Numeric Symmetric Sparse (column compressed) Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dsparseMatrix-class.html">Arith-method</a></td>
+<td>Virtual Class "dsparseMatrix" of Numeric Sparse Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dtCMatrix-class.html">Arith-method</a></td>
+<td>Triangular, (compressed) sparse column matrices</td></tr>
+<tr><td style="width: 25%;"><a href="lgeMatrix-class.html">Arith-method</a></td>
+<td>Class "lgeMatrix" of General Dense Logical Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="lsparseMatrix-classes.html">Arith-method</a></td>
+<td>Sparse logical matrices</td></tr>
+<tr><td style="width: 25%;"><a href="nMatrix-class.html">Arith-method</a></td>
+<td>Class "nMatrix" of Non-zero Pattern Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="ngeMatrix-class.html">Arith-method</a></td>
+<td>Class "ngeMatrix" of General Dense Nonzero-pattern Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="nsparseMatrix-classes.html">Arith-method</a></td>
+<td>Sparse "pattern" Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="sparseVector-class.html">Arith-method</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td style="width: 25%;"><a href="Matrix-class.html">as.array-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="abIndex-class.html">as.integer-method</a></td>
+<td>Class "abIndex" of Abstract Index Vectors</td></tr>
+<tr><td style="width: 25%;"><a href="Matrix-class.html">as.logical-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="ldenseMatrix-class.html">as.logical-method</a></td>
+<td>Virtual Class "ldenseMatrix" of Dense Logical Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="ndenseMatrix-class.html">as.logical-method</a></td>
+<td>Virtual Class "ndenseMatrix" of Dense Logical Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="sparseVector-class.html">as.logical-method</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td style="width: 25%;"><a href="Matrix-class.html">as.matrix-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="Matrix-class.html">as.numeric-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="abIndex-class.html">as.numeric-method</a></td>
+<td>Class "abIndex" of Abstract Index Vectors</td></tr>
+<tr><td style="width: 25%;"><a href="ddenseMatrix-class.html">as.numeric-method</a></td>
+<td>Virtual Class "ddenseMatrix" of Numeric Dense Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="sparseVector-class.html">as.numeric-method</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td style="width: 25%;"><a href="Matrix-class.html">as.vector-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="abIndex-class.html">as.vector-method</a></td>
+<td>Class "abIndex" of Abstract Index Vectors</td></tr>
+<tr><td style="width: 25%;"><a href="dgCMatrix-class.html">as.vector-method</a></td>
+<td>Compressed, sparse, column-oriented numeric matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dgeMatrix-class.html">as.vector-method</a></td>
+<td>Class "dgeMatrix" of Dense Numeric (S4 Class) Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="diagonalMatrix-class.html">as.vector-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dsCMatrix-class.html">as.vector-method</a></td>
+<td>Numeric Symmetric Sparse (column compressed) Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="ldenseMatrix-class.html">as.vector-method</a></td>
+<td>Virtual Class "ldenseMatrix" of Dense Logical Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="lgeMatrix-class.html">as.vector-method</a></td>
+<td>Class "lgeMatrix" of General Dense Logical Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="ndenseMatrix-class.html">as.vector-method</a></td>
+<td>Virtual Class "ndenseMatrix" of Dense Logical Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="ngeMatrix-class.html">as.vector-method</a></td>
+<td>Class "ngeMatrix" of General Dense Nonzero-pattern Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="sparseVector-class.html">as.vector-method</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td style="width: 25%;"><a href="atomicVector-class.html">atomicVector-class</a></td>
+<td>Virtual Class "atomicVector" of Atomic Vectors</td></tr>
+</table>
+
+<h2><a name="B">-- B --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="band.html">band</a></td>
+<td>Extract bands of a matrix</td></tr>
+<tr><td style="width: 25%;"><a href="band.html">band-method</a></td>
+<td>Extract bands of a matrix</td></tr>
+<tr><td style="width: 25%;"><a href="band.html">band-methods</a></td>
+<td>Extract bands of a matrix</td></tr>
+<tr><td style="width: 25%;"><a href="bandSparse.html">bandSparse</a></td>
+<td>Construct Sparse Banded Matrix from (Sup-/Super-) Diagonals</td></tr>
+<tr><td style="width: 25%;"><a href="bdiag.html">bdiag</a></td>
+<td>Construct a Block Diagonal Matrix</td></tr>
+<tr><td style="width: 25%;"><a href="BunchKaufman-methods.html">BunchKaufman</a></td>
+<td>Bunch-Kaufman Decomposition Methods</td></tr>
+<tr><td style="width: 25%;"><a href="Cholesky-class.html">BunchKaufman-class</a></td>
+<td>Cholesky and Bunch-Kaufman Decompositions</td></tr>
+<tr><td style="width: 25%;"><a href="BunchKaufman-methods.html">BunchKaufman-method</a></td>
+<td>Bunch-Kaufman Decomposition Methods</td></tr>
+<tr><td style="width: 25%;"><a href="BunchKaufman-methods.html">BunchKaufman-methods</a></td>
+<td>Bunch-Kaufman Decomposition Methods</td></tr>
+</table>
+
+<h2><a name="C">-- C --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="abIseq.html">c.abIndex</a></td>
+<td>Sequence Generation of "abIndex", Abstract Index Vectors</td></tr>
+<tr><td style="width: 25%;"><a href="CAex.html">CAex</a></td>
+<td>Albers' example Matrix with "Difficult" Eigen Factorization</td></tr>
+<tr><td style="width: 25%;"><a href="cBind.html">cBind</a></td>
+<td>Versions of 'cbind' and 'rbind' recursively built on cbind2/rbind2</td></tr>
+<tr><td style="width: 25%;"><a href="Matrix-class.html">cbind2-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="denseMatrix-class.html">cbind2-method</a></td>
+<td>Virtual Class "denseMatrix" of All Dense Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="diagonalMatrix-class.html">cbind2-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="sparseMatrix-class.html">cbind2-method</a></td>
+<td>Virtual Class "sparseMatrix" - Mother of Sparse Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="CHMfactor-class.html">CHMfactor-class</a></td>
+<td>CHOLMOD-based Cholesky Factorizations</td></tr>
+<tr><td style="width: 25%;"><a href="CHMfactor-class.html">CHMsimpl-class</a></td>
+<td>CHOLMOD-based Cholesky Factorizations</td></tr>
+<tr><td style="width: 25%;"><a href="CHMfactor-class.html">CHMsuper-class</a></td>
+<td>CHOLMOD-based Cholesky Factorizations</td></tr>
+<tr><td style="width: 25%;"><a href="chol.html">chol</a></td>
+<td>Choleski Decomposition - 'Matrix' S4 Generic and Methods</td></tr>
+<tr><td style="width: 25%;"><a href="chol.html">chol-method</a></td>
+<td>Choleski Decomposition - 'Matrix' S4 Generic and Methods</td></tr>
+<tr><td style="width: 25%;"><a href="chol.html">chol-methods</a></td>
+<td>Choleski Decomposition - 'Matrix' S4 Generic and Methods</td></tr>
+<tr><td style="width: 25%;"><a href="chol2inv-methods.html">chol2inv-method</a></td>
+<td>Inverse from Choleski or QR Decomposition - Matrix Methods</td></tr>
+<tr><td style="width: 25%;"><a href="diagonalMatrix-class.html">chol2inv-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="chol2inv-methods.html">chol2inv-methods</a></td>
+<td>Inverse from Choleski or QR Decomposition - Matrix Methods</td></tr>
+<tr><td style="width: 25%;"><a href="Cholesky.html">Cholesky</a></td>
+<td>Cholesky Decomposition of a Sparse Matrix</td></tr>
+<tr><td style="width: 25%;"><a href="Cholesky-class.html">Cholesky-class</a></td>
+<td>Cholesky and Bunch-Kaufman Decompositions</td></tr>
+<tr><td style="width: 25%;"><a href="Cholesky.html">Cholesky-method</a></td>
+<td>Cholesky Decomposition of a Sparse Matrix</td></tr>
+<tr><td style="width: 25%;"><a href="MatrixFactorization-class.html">CholeskyFactorization-class</a></td>
+<td>Class "MatrixFactorization" of Matrix Factorizations</td></tr>
+<tr><td style="width: 25%;"><a href="CHMfactor-class.html">coerce-method</a></td>
+<td>CHOLMOD-based Cholesky Factorizations</td></tr>
+<tr><td style="width: 25%;"><a href="Cholesky-class.html">coerce-method</a></td>
+<td>Cholesky and Bunch-Kaufman Decompositions</td></tr>
+<tr><td style="width: 25%;"><a href="CsparseMatrix-class.html">coerce-method</a></td>
+<td>Class "CsparseMatrix" of Sparse Matrices in Column-compressed Form</td></tr>
+<tr><td style="width: 25%;"><a href="Matrix-class.html">coerce-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="RsparseMatrix-class.html">coerce-method</a></td>
+<td>Class "RsparseMatrix" of Sparse Matrices in Column-compressed Form</td></tr>
+<tr><td style="width: 25%;"><a href="SparseM-conv.html">coerce-method</a></td>
+<td>Sparse Matrix Coercion from and to those from package 'SparseM'</td></tr>
+<tr><td style="width: 25%;"><a href="TsparseMatrix-class.html">coerce-method</a></td>
+<td>Class "TsparseMatrix" of Sparse Matrices in Triplet Form</td></tr>
+<tr><td style="width: 25%;"><a href="abIndex-class.html">coerce-method</a></td>
+<td>Class "abIndex" of Abstract Index Vectors</td></tr>
+<tr><td style="width: 25%;"><a href="dMatrix-class.html">coerce-method</a></td>
+<td>(Virtual) Class "dMatrix" of "double" Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="ddenseMatrix-class.html">coerce-method</a></td>
+<td>Virtual Class "ddenseMatrix" of Numeric Dense Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="denseMatrix-class.html">coerce-method</a></td>
+<td>Virtual Class "denseMatrix" of All Dense Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dgCMatrix-class.html">coerce-method</a></td>
+<td>Compressed, sparse, column-oriented numeric matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dgTMatrix-class.html">coerce-method</a></td>
+<td>Sparse matrices in triplet form</td></tr>
+<tr><td style="width: 25%;"><a href="dgeMatrix-class.html">coerce-method</a></td>
+<td>Class "dgeMatrix" of Dense Numeric (S4 Class) Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="diagonalMatrix-class.html">coerce-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dpoMatrix-class.html">coerce-method</a></td>
+<td>Positive Semi-definite Dense Numeric Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dsCMatrix-class.html">coerce-method</a></td>
+<td>Numeric Symmetric Sparse (column compressed) Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dsyMatrix-class.html">coerce-method</a></td>
+<td>Symmetric Dense Numeric Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dtCMatrix-class.html">coerce-method</a></td>
+<td>Triangular, (compressed) sparse column matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dtpMatrix-class.html">coerce-method</a></td>
+<td>Packed Triangular Dense Matrices - "dtpMatrix"</td></tr>
+<tr><td style="width: 25%;"><a href="dtrMatrix-class.html">coerce-method</a></td>
+<td>Triangular, dense, numeric matrices</td></tr>
+<tr><td style="width: 25%;"><a href="graph2T.html">coerce-method</a></td>
+<td>Conversions "graph" &lt;-&gt; (sparse) Matrix</td></tr>
+<tr><td style="width: 25%;"><a href="indMatrix-class.html">coerce-method</a></td>
+<td>Index Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="ldenseMatrix-class.html">coerce-method</a></td>
+<td>Virtual Class "ldenseMatrix" of Dense Logical Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="ldiMatrix-class.html">coerce-method</a></td>
+<td>Class "ldiMatrix" of Diagonal Logical Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="lgeMatrix-class.html">coerce-method</a></td>
+<td>Class "lgeMatrix" of General Dense Logical Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="lsparseMatrix-classes.html">coerce-method</a></td>
+<td>Sparse logical matrices</td></tr>
+<tr><td style="width: 25%;"><a href="lsyMatrix-class.html">coerce-method</a></td>
+<td>Symmetric Dense Logical Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="ltrMatrix-class.html">coerce-method</a></td>
+<td>Triangular Dense Logical Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="nMatrix-class.html">coerce-method</a></td>
+<td>Class "nMatrix" of Non-zero Pattern Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="ndenseMatrix-class.html">coerce-method</a></td>
+<td>Virtual Class "ndenseMatrix" of Dense Logical Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="ngeMatrix-class.html">coerce-method</a></td>
+<td>Class "ngeMatrix" of General Dense Nonzero-pattern Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="nsparseMatrix-classes.html">coerce-method</a></td>
+<td>Sparse "pattern" Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="nsyMatrix-class.html">coerce-method</a></td>
+<td>Symmetric Dense Nonzero-Pattern Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="ntrMatrix-class.html">coerce-method</a></td>
+<td>Triangular Dense Logical Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="pMatrix-class.html">coerce-method</a></td>
+<td>Permutation matrices</td></tr>
+<tr><td style="width: 25%;"><a href="sparseMatrix-class.html">coerce-method</a></td>
+<td>Virtual Class "sparseMatrix" - Mother of Sparse Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="sparseVector-class.html">coerce-method</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td style="width: 25%;"><a href="symmetricMatrix-class.html">coerce-method</a></td>
+<td>Virtual Class of Symmetric Matrices in Package Matrix</td></tr>
+<tr><td style="width: 25%;"><a href="triangularMatrix-class.html">coerce-method</a></td>
+<td>Virtual Class of Triangular Matrices in Package Matrix</td></tr>
+<tr><td style="width: 25%;"><a href="colSums.html">colMeans</a></td>
+<td>Form Row and Column Sums and Means</td></tr>
+<tr><td style="width: 25%;"><a href="colSums.html">colMeans-method</a></td>
+<td>Form Row and Column Sums and Means</td></tr>
+<tr><td style="width: 25%;"><a href="dgeMatrix-class.html">colMeans-method</a></td>
+<td>Class "dgeMatrix" of Dense Numeric (S4 Class) Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="indMatrix-class.html">colMeans-method</a></td>
+<td>Index Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="colSums.html">colSums</a></td>
+<td>Form Row and Column Sums and Means</td></tr>
+<tr><td style="width: 25%;"><a href="colSums.html">colSums-method</a></td>
+<td>Form Row and Column Sums and Means</td></tr>
+<tr><td style="width: 25%;"><a href="dgeMatrix-class.html">colSums-method</a></td>
+<td>Class "dgeMatrix" of Dense Numeric (S4 Class) Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="indMatrix-class.html">colSums-method</a></td>
+<td>Index Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="CsparseMatrix-class.html">Compare-method</a></td>
+<td>Class "CsparseMatrix" of Sparse Matrices in Column-compressed Form</td></tr>
+<tr><td style="width: 25%;"><a href="dMatrix-class.html">Compare-method</a></td>
+<td>(Virtual) Class "dMatrix" of "double" Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="diagonalMatrix-class.html">Compare-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="lgeMatrix-class.html">Compare-method</a></td>
+<td>Class "lgeMatrix" of General Dense Logical Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="lsparseMatrix-classes.html">Compare-method</a></td>
+<td>Sparse logical matrices</td></tr>
+<tr><td style="width: 25%;"><a href="nMatrix-class.html">Compare-method</a></td>
+<td>Class "nMatrix" of Non-zero Pattern Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="ngeMatrix-class.html">Compare-method</a></td>
+<td>Class "ngeMatrix" of General Dense Nonzero-pattern Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="compMatrix-class.html">compMatrix-class</a></td>
+<td>Class "compMatrix" of Composite (Factorizable) Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="condest.html">condest</a></td>
+<td>Compute Approximate CONDition number and 1-Norm of (Large) Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dpoMatrix-class.html">corMatrix-class</a></td>
+<td>Positive Semi-definite Dense Numeric Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="Matrix-class.html">cov2cor-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="sparseMatrix-class.html">cov2cor-method</a></td>
+<td>Virtual Class "sparseMatrix" - Mother of Sparse Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="matrix-products.html">crossprod</a></td>
+<td>Matrix (Cross) Products (of Transpose)</td></tr>
+<tr><td style="width: 25%;"><a href="matrix-products.html">crossprod-method</a></td>
+<td>Matrix (Cross) Products (of Transpose)</td></tr>
+<tr><td style="width: 25%;"><a href="matrix-products.html">crossprod-methods</a></td>
+<td>Matrix (Cross) Products (of Transpose)</td></tr>
+<tr><td style="width: 25%;"><a href="CsparseMatrix-class.html">CsparseMatrix-class</a></td>
+<td>Class "CsparseMatrix" of Sparse Matrices in Column-compressed Form</td></tr>
+</table>
+
+<h2><a name="D">-- D --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="CHMfactor-class.html">dCHMsimpl-class</a></td>
+<td>CHOLMOD-based Cholesky Factorizations</td></tr>
+<tr><td style="width: 25%;"><a href="CHMfactor-class.html">dCHMsuper-class</a></td>
+<td>CHOLMOD-based Cholesky Factorizations</td></tr>
+<tr><td style="width: 25%;"><a href="ddenseMatrix-class.html">ddenseMatrix-class</a></td>
+<td>Virtual Class "ddenseMatrix" of Numeric Dense Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="ddiMatrix-class.html">ddiMatrix-class</a></td>
+<td>Class "ddiMatrix" of Diagonal Numeric Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="LU-class.html">denseLU-class</a></td>
+<td>LU (dense) Matrix Decompositions</td></tr>
+<tr><td style="width: 25%;"><a href="denseMatrix-class.html">denseMatrix-class</a></td>
+<td>Virtual Class "denseMatrix" of All Dense Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="Matrix-class.html">det</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="CHMfactor-class.html">determinant-method</a></td>
+<td>CHOLMOD-based Cholesky Factorizations</td></tr>
+<tr><td style="width: 25%;"><a href="Matrix-class.html">determinant-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="ddenseMatrix-class.html">determinant-method</a></td>
+<td>Virtual Class "ddenseMatrix" of Numeric Dense Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dgeMatrix-class.html">determinant-method</a></td>
+<td>Class "dgeMatrix" of Dense Numeric (S4 Class) Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="diagonalMatrix-class.html">determinant-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dpoMatrix-class.html">determinant-method</a></td>
+<td>Positive Semi-definite Dense Numeric Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dsCMatrix-class.html">determinant-method</a></td>
+<td>Numeric Symmetric Sparse (column compressed) Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dtpMatrix-class.html">determinant-method</a></td>
+<td>Packed Triangular Dense Matrices - "dtpMatrix"</td></tr>
+<tr><td style="width: 25%;"><a href="dtrMatrix-class.html">determinant-method</a></td>
+<td>Triangular, dense, numeric matrices</td></tr>
+<tr><td style="width: 25%;"><a href="indMatrix-class.html">determinant-method</a></td>
+<td>Index Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="pMatrix-class.html">determinant-method</a></td>
+<td>Permutation matrices</td></tr>
+<tr><td style="width: 25%;"><a href="sparseMatrix-class.html">determinant-method</a></td>
+<td>Virtual Class "sparseMatrix" - Mother of Sparse Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dgCMatrix-class.html">dgCMatrix-class</a></td>
+<td>Compressed, sparse, column-oriented numeric matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dgeMatrix-class.html">dgeMatrix-class</a></td>
+<td>Class "dgeMatrix" of Dense Numeric (S4 Class) Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dgRMatrix-class.html">dgRMatrix-class</a></td>
+<td>Sparse Compressed, Row-oriented Numeric Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dgTMatrix-class.html">dgTMatrix-class</a></td>
+<td>Sparse matrices in triplet form</td></tr>
+<tr><td style="width: 25%;"><a href="CsparseMatrix-class.html">diag-method</a></td>
+<td>Class "CsparseMatrix" of Sparse Matrices in Column-compressed Form</td></tr>
+<tr><td style="width: 25%;"><a href="Matrix-class.html">diag-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="ddenseMatrix-class.html">diag-method</a></td>
+<td>Virtual Class "ddenseMatrix" of Numeric Dense Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dgCMatrix-class.html">diag-method</a></td>
+<td>Compressed, sparse, column-oriented numeric matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dgRMatrix-class.html">diag-method</a></td>
+<td>Sparse Compressed, Row-oriented Numeric Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dgeMatrix-class.html">diag-method</a></td>
+<td>Class "dgeMatrix" of Dense Numeric (S4 Class) Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="diagonalMatrix-class.html">diag-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dsyMatrix-class.html">diag-method</a></td>
+<td>Symmetric Dense Numeric Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dtpMatrix-class.html">diag-method</a></td>
+<td>Packed Triangular Dense Matrices - "dtpMatrix"</td></tr>
+<tr><td style="width: 25%;"><a href="dtrMatrix-class.html">diag-method</a></td>
+<td>Triangular, dense, numeric matrices</td></tr>
+<tr><td style="width: 25%;"><a href="ldenseMatrix-class.html">diag-method</a></td>
+<td>Virtual Class "ldenseMatrix" of Dense Logical Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="lgeMatrix-class.html">diag-method</a></td>
+<td>Class "lgeMatrix" of General Dense Logical Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="lsyMatrix-class.html">diag-method</a></td>
+<td>Symmetric Dense Logical Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="ltrMatrix-class.html">diag-method</a></td>
+<td>Triangular Dense Logical Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="ndenseMatrix-class.html">diag-method</a></td>
+<td>Virtual Class "ndenseMatrix" of Dense Logical Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="sparseMatrix-class.html">diag-method</a></td>
+<td>Virtual Class "sparseMatrix" - Mother of Sparse Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dgeMatrix-class.html">diag&lt;--method</a></td>
+<td>Class "dgeMatrix" of Dense Numeric (S4 Class) Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dsyMatrix-class.html">diag&lt;--method</a></td>
+<td>Symmetric Dense Numeric Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dtpMatrix-class.html">diag&lt;--method</a></td>
+<td>Packed Triangular Dense Matrices - "dtpMatrix"</td></tr>
+<tr><td style="width: 25%;"><a href="dtrMatrix-class.html">diag&lt;--method</a></td>
+<td>Triangular, dense, numeric matrices</td></tr>
+<tr><td style="width: 25%;"><a href="lgeMatrix-class.html">diag&lt;--method</a></td>
+<td>Class "lgeMatrix" of General Dense Logical Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="lsyMatrix-class.html">diag&lt;--method</a></td>
+<td>Symmetric Dense Logical Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="ltrMatrix-class.html">diag&lt;--method</a></td>
+<td>Triangular Dense Logical Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="ngeMatrix-class.html">diag&lt;--method</a></td>
+<td>Class "ngeMatrix" of General Dense Nonzero-pattern Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="nsyMatrix-class.html">diag&lt;--method</a></td>
+<td>Symmetric Dense Nonzero-Pattern Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="ntrMatrix-class.html">diag&lt;--method</a></td>
+<td>Triangular Dense Logical Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="diagU2N.html">diagN2U</a></td>
+<td>Transform Triangular Matrices from Unit Triangular to General Triangular and Back</td></tr>
+<tr><td style="width: 25%;"><a href="Diagonal.html">Diagonal</a></td>
+<td>Create Diagonal Matrix Object</td></tr>
+<tr><td style="width: 25%;"><a href="diagonalMatrix-class.html">diagonalMatrix-class</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="diagU2N.html">diagU2N</a></td>
+<td>Transform Triangular Matrices from Unit Triangular to General Triangular and Back</td></tr>
+<tr><td style="width: 25%;"><a href="Matrix-class.html">diff-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="Matrix-class.html">dim-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="MatrixFactorization-class.html">dim-method</a></td>
+<td>Class "MatrixFactorization" of Matrix Factorizations</td></tr>
+<tr><td style="width: 25%;"><a href="dgCMatrix-class.html">dim-method</a></td>
+<td>Compressed, sparse, column-oriented numeric matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dgRMatrix-class.html">dim-method</a></td>
+<td>Sparse Compressed, Row-oriented Numeric Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dgeMatrix-class.html">dim-method</a></td>
+<td>Class "dgeMatrix" of Dense Numeric (S4 Class) Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="Matrix-class.html">dim&lt;--method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="denseMatrix-class.html">dim&lt;--method</a></td>
+<td>Virtual Class "denseMatrix" of All Dense Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="sparseMatrix-class.html">dim&lt;--method</a></td>
+<td>Virtual Class "sparseMatrix" - Mother of Sparse Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="sparseVector-class.html">dim&lt;--method</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td style="width: 25%;"><a href="Matrix-class.html">dimnames-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dgeMatrix-class.html">dimnames-method</a></td>
+<td>Class "dgeMatrix" of Dense Numeric (S4 Class) Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="symmetricMatrix-class.html">dimnames-method</a></td>
+<td>Virtual Class of Symmetric Matrices in Package Matrix</td></tr>
+<tr><td style="width: 25%;"><a href="Matrix-class.html">dimnames&lt;--method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="compMatrix-class.html">dimnames&lt;--method</a></td>
+<td>Class "compMatrix" of Composite (Factorizable) Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dMatrix-class.html">dMatrix-class</a></td>
+<td>(Virtual) Class "dMatrix" of "double" Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dpoMatrix-class.html">dpoMatrix-class</a></td>
+<td>Positive Semi-definite Dense Numeric Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dpoMatrix-class.html">dppMatrix-class</a></td>
+<td>Positive Semi-definite Dense Numeric Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="Matrix-class.html">drop-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="abIndex-class.html">drop-method</a></td>
+<td>Class "abIndex" of Abstract Index Vectors</td></tr>
+<tr><td style="width: 25%;"><a href="drop0.html">drop0</a></td>
+<td>Drop "Explicit Zeroes" from a Sparse Matrix</td></tr>
+<tr><td style="width: 25%;"><a href="dsCMatrix-class.html">dsCMatrix-class</a></td>
+<td>Numeric Symmetric Sparse (column compressed) Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dsparseMatrix-class.html">dsparseMatrix-class</a></td>
+<td>Virtual Class "dsparseMatrix" of Numeric Sparse Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="sparseVector-class.html">dsparseVector-class</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td style="width: 25%;"><a href="dsyMatrix-class.html">dspMatrix-class</a></td>
+<td>Symmetric Dense Numeric Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dsRMatrix-class.html">dsRMatrix-class</a></td>
+<td>Symmetric Sparse Compressed Row Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dsCMatrix-class.html">dsTMatrix-class</a></td>
+<td>Numeric Symmetric Sparse (column compressed) Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dsyMatrix-class.html">dsyMatrix-class</a></td>
+<td>Symmetric Dense Numeric Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dtCMatrix-class.html">dtCMatrix-class</a></td>
+<td>Triangular, (compressed) sparse column matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dtpMatrix-class.html">dtpMatrix-class</a></td>
+<td>Packed Triangular Dense Matrices - "dtpMatrix"</td></tr>
+<tr><td style="width: 25%;"><a href="dtRMatrix-class-def.html">dtRMatrix-class</a></td>
+<td>Triangular Sparse Compressed Row Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dtrMatrix-class.html">dtrMatrix-class</a></td>
+<td>Triangular, dense, numeric matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dtCMatrix-class.html">dtTMatrix-class</a></td>
+<td>Triangular, (compressed) sparse column matrices</td></tr>
+</table>
+
+<h2><a name="E">-- E --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="dgeMatrix-class.html">eigen-method</a></td>
+<td>Class "dgeMatrix" of Dense Numeric (S4 Class) Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="expand.html">expand</a></td>
+<td>Expand a Decomposition into Factors</td></tr>
+<tr><td style="width: 25%;"><a href="CHMfactor-class.html">expand-method</a></td>
+<td>CHOLMOD-based Cholesky Factorizations</td></tr>
+<tr><td style="width: 25%;"><a href="LU-class.html">expand-method</a></td>
+<td>LU (dense) Matrix Decompositions</td></tr>
+<tr><td style="width: 25%;"><a href="MatrixFactorization-class.html">expand-method</a></td>
+<td>Class "MatrixFactorization" of Matrix Factorizations</td></tr>
+<tr><td style="width: 25%;"><a href="sparseLU-class.html">expand-method</a></td>
+<td>Sparse LU decomposition of a square sparse matrix</td></tr>
+<tr><td style="width: 25%;"><a href="expm.html">expm</a></td>
+<td>Matrix Exponential</td></tr>
+<tr><td style="width: 25%;"><a href="expm.html">expm-method</a></td>
+<td>Matrix Exponential</td></tr>
+</table>
+
+<h2><a name="F">-- F --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="sparse.model.matrix.html">fac2Sparse</a></td>
+<td>Construct Sparse Design / Model Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="sparse.model.matrix.html">fac2sparse</a></td>
+<td>Construct Sparse Design / Model Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="facmul.html">facmul</a></td>
+<td>Multiplication by Decomposition Factors</td></tr>
+<tr><td style="width: 25%;"><a href="facmul.html">facmul.default</a></td>
+<td>Multiplication by Decomposition Factors</td></tr>
+<tr><td style="width: 25%;"><a href="forceSymmetric.html">forceSymmetric</a></td>
+<td>Force a Matrix to 'symmetricMatrix' Without Symmetry Checks</td></tr>
+<tr><td style="width: 25%;"><a href="forceSymmetric.html">forceSymmetric-method</a></td>
+<td>Force a Matrix to 'symmetricMatrix' Without Symmetry Checks</td></tr>
+<tr><td style="width: 25%;"><a href="sparseMatrix-class.html">format-method</a></td>
+<td>Virtual Class "sparseMatrix" - Mother of Sparse Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="formatSparseM.html">formatSparseM</a></td>
+<td>Formatting Sparse Numeric Matrices Utilities</td></tr>
+<tr><td style="width: 25%;"><a href="printSpMatrix.html">formatSpMatrix</a></td>
+<td>Format and Print Sparse Matrices Flexibly</td></tr>
+</table>
+
+<h2><a name="G">-- G --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="dMatrix-class.html">gamma-method</a></td>
+<td>(Virtual) Class "dMatrix" of "double" Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dgCMatrix-class.html">gamma-method</a></td>
+<td>Compressed, sparse, column-oriented numeric matrices</td></tr>
+<tr><td style="width: 25%;"><a href="generalMatrix-class.html">generalMatrix-class</a></td>
+<td>Class "generalMatrix" of General Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="graph2T.html">graph2T</a></td>
+<td>Conversions "graph" &lt;-&gt; (sparse) Matrix</td></tr>
+</table>
+
+<h2><a name="H">-- H --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="Matrix-class.html">head-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="sparseVector-class.html">head-method</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td style="width: 25%;"><a href="Hilbert.html">Hilbert</a></td>
+<td>Generate a Hilbert matrix</td></tr>
+</table>
+
+<h2><a name="I">-- I --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="image-methods.html">image-method</a></td>
+<td>Methods for image() in Package 'Matrix'</td></tr>
+<tr><td style="width: 25%;"><a href="image-methods.html">image-methods</a></td>
+<td>Methods for image() in Package 'Matrix'</td></tr>
+<tr><td style="width: 25%;"><a href="unused-classes.html">iMatrix-class</a></td>
+<td>Virtual Classes Not Yet Really Implemented and Used</td></tr>
+<tr><td style="width: 25%;"><a href="index-class.html">index-class</a></td>
+<td>Virtual Class "index" - Simple Class for Matrix Indices</td></tr>
+<tr><td style="width: 25%;"><a href="indMatrix-class.html">indMatrix-class</a></td>
+<td>Index Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="invPerm.html">invPerm</a></td>
+<td>Inverse Permutation Vector</td></tr>
+<tr><td style="width: 25%;"><a href="abIndex-class.html">is.finite-method</a></td>
+<td>Class "abIndex" of Abstract Index Vectors</td></tr>
+<tr><td style="width: 25%;"><a href="is.na-methods.html">is.finite-method</a></td>
+<td>is.na(), is.infinite() Methods for 'Matrix' Objects</td></tr>
+<tr><td style="width: 25%;"><a href="sparseVector-class.html">is.finite-method</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td style="width: 25%;"><a href="abIndex-class.html">is.infinite-method</a></td>
+<td>Class "abIndex" of Abstract Index Vectors</td></tr>
+<tr><td style="width: 25%;"><a href="is.na-methods.html">is.infinite-method</a></td>
+<td>is.na(), is.infinite() Methods for 'Matrix' Objects</td></tr>
+<tr><td style="width: 25%;"><a href="sparseVector-class.html">is.infinite-method</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td style="width: 25%;"><a href="abIndex-class.html">is.na-method</a></td>
+<td>Class "abIndex" of Abstract Index Vectors</td></tr>
+<tr><td style="width: 25%;"><a href="is.na-methods.html">is.na-method</a></td>
+<td>is.na(), is.infinite() Methods for 'Matrix' Objects</td></tr>
+<tr><td style="width: 25%;"><a href="nsparseMatrix-classes.html">is.na-method</a></td>
+<td>Sparse "pattern" Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="sparseVector-class.html">is.na-method</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td style="width: 25%;"><a href="is.na-methods.html">is.na-methods</a></td>
+<td>is.na(), is.infinite() Methods for 'Matrix' Objects</td></tr>
+<tr><td style="width: 25%;"><a href="is.null.DN.html">is.null.DN</a></td>
+<td>Are the Dimnames 'dn' NULL-like ?</td></tr>
+<tr><td style="width: 25%;"><a href="isTriangular.html">isDiagonal</a></td>
+<td>isTriangular() and isDiagonal() Methods</td></tr>
+<tr><td style="width: 25%;"><a href="isTriangular.html">isDiagonal-method</a></td>
+<td>isTriangular() and isDiagonal() Methods</td></tr>
+<tr><td style="width: 25%;"><a href="isTriangular.html">isDiagonal-methods</a></td>
+<td>isTriangular() and isDiagonal() Methods</td></tr>
+<tr><td style="width: 25%;"><a href="CHMfactor-class.html">isLDL</a></td>
+<td>CHOLMOD-based Cholesky Factorizations</td></tr>
+<tr><td style="width: 25%;"><a href="sparseVector-class.html">isparseVector-class</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td style="width: 25%;"><a href="dgCMatrix-class.html">isSymmetric-method</a></td>
+<td>Compressed, sparse, column-oriented numeric matrices</td></tr>
+<tr><td style="width: 25%;"><a href="indMatrix-class.html">isSymmetric-method</a></td>
+<td>Index Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="isSymmetric-methods.html">isSymmetric-method</a></td>
+<td>Methods for Function isSymmetric in Package 'Matrix'</td></tr>
+<tr><td style="width: 25%;"><a href="isSymmetric-methods.html">isSymmetric-methods</a></td>
+<td>Methods for Function isSymmetric in Package 'Matrix'</td></tr>
+<tr><td style="width: 25%;"><a href="isTriangular.html">isTriangular</a></td>
+<td>isTriangular() and isDiagonal() Methods</td></tr>
+<tr><td style="width: 25%;"><a href="isTriangular.html">isTriangular-method</a></td>
+<td>isTriangular() and isDiagonal() Methods</td></tr>
+<tr><td style="width: 25%;"><a href="isTriangular.html">isTriangular-methods</a></td>
+<td>isTriangular() and isDiagonal() Methods</td></tr>
+</table>
+
+<h2><a name="K">-- K --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="KhatriRao.html">KhatriRao</a></td>
+<td>Khatri-Rao Matrix Product</td></tr>
+<tr><td style="width: 25%;"><a href="KNex.html">KNex</a></td>
+<td>Koenker-Ng Example Sparse Model Matrix and Response Vector</td></tr>
+<tr><td style="width: 25%;"><a href="kronecker-methods.html">kronecker-method</a></td>
+<td>Methods for Function 'kronecker()' in Package 'Matrix'</td></tr>
+<tr><td style="width: 25%;"><a href="kronecker-methods.html">kronecker-methods</a></td>
+<td>Methods for Function 'kronecker()' in Package 'Matrix'</td></tr>
+</table>
+
+<h2><a name="L">-- L --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="ldenseMatrix-class.html">ldenseMatrix-class</a></td>
+<td>Virtual Class "ldenseMatrix" of Dense Logical Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="ldiMatrix-class.html">ldiMatrix-class</a></td>
+<td>Class "ldiMatrix" of Diagonal Logical Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="Matrix-class.html">length-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="abIndex-class.html">length-method</a></td>
+<td>Class "abIndex" of Abstract Index Vectors</td></tr>
+<tr><td style="width: 25%;"><a href="sparseVector-class.html">length-method</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td style="width: 25%;"><a href="dMatrix-class.html">lgamma-method</a></td>
+<td>(Virtual) Class "dMatrix" of "double" Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dgCMatrix-class.html">lgamma-method</a></td>
+<td>Compressed, sparse, column-oriented numeric matrices</td></tr>
+<tr><td style="width: 25%;"><a href="lsparseMatrix-classes.html">lgCMatrix-class</a></td>
+<td>Sparse logical matrices</td></tr>
+<tr><td style="width: 25%;"><a href="lgeMatrix-class.html">lgeMatrix-class</a></td>
+<td>Class "lgeMatrix" of General Dense Logical Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="lsparseMatrix-classes.html">lgRMatrix-class</a></td>
+<td>Sparse logical matrices</td></tr>
+<tr><td style="width: 25%;"><a href="lsparseMatrix-classes.html">lgTMatrix-class</a></td>
+<td>Sparse logical matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dMatrix-class.html">lMatrix-class</a></td>
+<td>(Virtual) Class "dMatrix" of "double" Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dMatrix-class.html">log-method</a></td>
+<td>(Virtual) Class "dMatrix" of "double" Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dgCMatrix-class.html">log-method</a></td>
+<td>Compressed, sparse, column-oriented numeric matrices</td></tr>
+<tr><td style="width: 25%;"><a href="CsparseMatrix-class.html">Logic-method</a></td>
+<td>Class "CsparseMatrix" of Sparse Matrices in Column-compressed Form</td></tr>
+<tr><td style="width: 25%;"><a href="Matrix-class.html">Logic-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dMatrix-class.html">Logic-method</a></td>
+<td>(Virtual) Class "dMatrix" of "double" Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="diagonalMatrix-class.html">Logic-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="ldenseMatrix-class.html">Logic-method</a></td>
+<td>Virtual Class "ldenseMatrix" of Dense Logical Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="lgeMatrix-class.html">Logic-method</a></td>
+<td>Class "lgeMatrix" of General Dense Logical Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="lsparseMatrix-classes.html">Logic-method</a></td>
+<td>Sparse logical matrices</td></tr>
+<tr><td style="width: 25%;"><a href="nMatrix-class.html">Logic-method</a></td>
+<td>Class "nMatrix" of Non-zero Pattern Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="ngeMatrix-class.html">Logic-method</a></td>
+<td>Class "ngeMatrix" of General Dense Nonzero-pattern Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="sparseVector-class.html">Logic-method</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td style="width: 25%;"><a href="lsparseMatrix-classes.html">lsCMatrix-class</a></td>
+<td>Sparse logical matrices</td></tr>
+<tr><td style="width: 25%;"><a href="lsparseMatrix-classes.html">lsparseMatrix-class</a></td>
+<td>Sparse logical matrices</td></tr>
+<tr><td style="width: 25%;"><a href="sparseVector-class.html">lsparseVector-class</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td style="width: 25%;"><a href="lsyMatrix-class.html">lspMatrix-class</a></td>
+<td>Symmetric Dense Logical Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="lsparseMatrix-classes.html">lsRMatrix-class</a></td>
+<td>Sparse logical matrices</td></tr>
+<tr><td style="width: 25%;"><a href="lsparseMatrix-classes.html">lsTMatrix-class</a></td>
+<td>Sparse logical matrices</td></tr>
+<tr><td style="width: 25%;"><a href="lsyMatrix-class.html">lsyMatrix-class</a></td>
+<td>Symmetric Dense Logical Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="lsparseMatrix-classes.html">ltCMatrix-class</a></td>
+<td>Sparse logical matrices</td></tr>
+<tr><td style="width: 25%;"><a href="ltrMatrix-class.html">ltpMatrix-class</a></td>
+<td>Triangular Dense Logical Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="lsparseMatrix-classes.html">ltRMatrix-class</a></td>
+<td>Sparse logical matrices</td></tr>
+<tr><td style="width: 25%;"><a href="ltrMatrix-class.html">ltrMatrix-class</a></td>
+<td>Triangular Dense Logical Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="lsparseMatrix-classes.html">ltTMatrix-class</a></td>
+<td>Sparse logical matrices</td></tr>
+<tr><td style="width: 25%;"><a href="lu.html">lu</a></td>
+<td>(Generalized) Triangular Decomposition of a Matrix</td></tr>
+<tr><td style="width: 25%;"><a href="LU-class.html">LU-class</a></td>
+<td>LU (dense) Matrix Decompositions</td></tr>
+<tr><td style="width: 25%;"><a href="ddenseMatrix-class.html">lu-method</a></td>
+<td>Virtual Class "ddenseMatrix" of Numeric Dense Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dsparseMatrix-class.html">lu-method</a></td>
+<td>Virtual Class "dsparseMatrix" of Numeric Sparse Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="lu.html">lu-method</a></td>
+<td>(Generalized) Triangular Decomposition of a Matrix</td></tr>
+<tr><td style="width: 25%;"><a href="sparseMatrix-class.html">lu-method</a></td>
+<td>Virtual Class "sparseMatrix" - Mother of Sparse Matrices</td></tr>
+</table>
+
+<h2><a name="M">-- M --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="CsparseMatrix-class.html">Math-method</a></td>
+<td>Class "CsparseMatrix" of Sparse Matrices in Column-compressed Form</td></tr>
+<tr><td style="width: 25%;"><a href="ddenseMatrix-class.html">Math-method</a></td>
+<td>Virtual Class "ddenseMatrix" of Numeric Dense Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="denseMatrix-class.html">Math-method</a></td>
+<td>Virtual Class "denseMatrix" of All Dense Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dgCMatrix-class.html">Math-method</a></td>
+<td>Compressed, sparse, column-oriented numeric matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dgeMatrix-class.html">Math-method</a></td>
+<td>Class "dgeMatrix" of Dense Numeric (S4 Class) Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="diagonalMatrix-class.html">Math-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="sparseMatrix-class.html">Math-method</a></td>
+<td>Virtual Class "sparseMatrix" - Mother of Sparse Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="sparseVector-class.html">Math-method</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td style="width: 25%;"><a href="Matrix-class.html">Math2-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dMatrix-class.html">Math2-method</a></td>
+<td>(Virtual) Class "dMatrix" of "double" Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="sparseVector-class.html">Math2-method</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td style="width: 25%;"><a href="Matrix.html">Matrix</a></td>
+<td>Construct a Classed Matrix</td></tr>
+<tr><td style="width: 25%;"><a href="Matrix-class.html">Matrix-class</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="MatrixClass.html">MatrixClass</a></td>
+<td>The Matrix (Super-) Class of a Class</td></tr>
+<tr><td style="width: 25%;"><a href="MatrixFactorization-class.html">MatrixFactorization-class</a></td>
+<td>Class "MatrixFactorization" of Matrix Factorizations</td></tr>
+<tr><td style="width: 25%;"><a href="Matrix-class.html">mean-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="sparseMatrix-class.html">mean-method</a></td>
+<td>Virtual Class "sparseMatrix" - Mother of Sparse Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="sparseVector-class.html">mean-method</a></td>
+<td>Sparse Vector Classes</td></tr>
+</table>
+
+<h2><a name="N">-- N --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="CHMfactor-class.html">nCHMsimpl-class</a></td>
+<td>CHOLMOD-based Cholesky Factorizations</td></tr>
+<tr><td style="width: 25%;"><a href="CHMfactor-class.html">nCHMsuper-class</a></td>
+<td>CHOLMOD-based Cholesky Factorizations</td></tr>
+<tr><td style="width: 25%;"><a href="ndenseMatrix-class.html">ndenseMatrix-class</a></td>
+<td>Virtual Class "ndenseMatrix" of Dense Logical Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="nearPD.html">nearPD</a></td>
+<td>Nearest Positive Definite Matrix</td></tr>
+<tr><td style="width: 25%;"><a href="nsparseMatrix-classes.html">ngCMatrix-class</a></td>
+<td>Sparse "pattern" Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="ngeMatrix-class.html">ngeMatrix-class</a></td>
+<td>Class "ngeMatrix" of General Dense Nonzero-pattern Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="nsparseMatrix-classes.html">ngRMatrix-class</a></td>
+<td>Sparse "pattern" Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="nsparseMatrix-classes.html">ngTMatrix-class</a></td>
+<td>Sparse "pattern" Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="nMatrix-class.html">nMatrix-class</a></td>
+<td>Class "nMatrix" of Non-zero Pattern Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="nnzero.html">nnzero</a></td>
+<td>The Number of Non-Zero Values of a Matrix</td></tr>
+<tr><td style="width: 25%;"><a href="nnzero.html">nnzero-method</a></td>
+<td>The Number of Non-Zero Values of a Matrix</td></tr>
+<tr><td style="width: 25%;"><a href="norm.html">norm</a></td>
+<td>Matrix Norms</td></tr>
+<tr><td style="width: 25%;"><a href="ddenseMatrix-class.html">norm-method</a></td>
+<td>Virtual Class "ddenseMatrix" of Numeric Dense Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dgeMatrix-class.html">norm-method</a></td>
+<td>Class "dgeMatrix" of Dense Numeric (S4 Class) Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="diagonalMatrix-class.html">norm-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dsyMatrix-class.html">norm-method</a></td>
+<td>Symmetric Dense Numeric Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dtpMatrix-class.html">norm-method</a></td>
+<td>Packed Triangular Dense Matrices - "dtpMatrix"</td></tr>
+<tr><td style="width: 25%;"><a href="dtrMatrix-class.html">norm-method</a></td>
+<td>Triangular, dense, numeric matrices</td></tr>
+<tr><td style="width: 25%;"><a href="ldenseMatrix-class.html">norm-method</a></td>
+<td>Virtual Class "ldenseMatrix" of Dense Logical Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="ndenseMatrix-class.html">norm-method</a></td>
+<td>Virtual Class "ndenseMatrix" of Dense Logical Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="norm.html">norm-method</a></td>
+<td>Matrix Norms</td></tr>
+<tr><td style="width: 25%;"><a href="sparseMatrix-class.html">norm-method</a></td>
+<td>Virtual Class "sparseMatrix" - Mother of Sparse Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="nsparseMatrix-classes.html">nsCMatrix-class</a></td>
+<td>Sparse "pattern" Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="nsparseMatrix-classes.html">nsparseMatrix-class</a></td>
+<td>Sparse "pattern" Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="sparseVector-class.html">nsparseVector-class</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td style="width: 25%;"><a href="nsyMatrix-class.html">nspMatrix-class</a></td>
+<td>Symmetric Dense Nonzero-Pattern Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="nsparseMatrix-classes.html">nsRMatrix-class</a></td>
+<td>Sparse "pattern" Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="nsparseMatrix-classes.html">nsTMatrix-class</a></td>
+<td>Sparse "pattern" Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="nsyMatrix-class.html">nsyMatrix-class</a></td>
+<td>Symmetric Dense Nonzero-Pattern Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="nsparseMatrix-classes.html">ntCMatrix-class</a></td>
+<td>Sparse "pattern" Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="ntrMatrix-class.html">ntpMatrix-class</a></td>
+<td>Triangular Dense Logical Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="nsparseMatrix-classes.html">ntRMatrix-class</a></td>
+<td>Sparse "pattern" Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="ntrMatrix-class.html">ntrMatrix-class</a></td>
+<td>Triangular Dense Logical Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="nsparseMatrix-classes.html">ntTMatrix-class</a></td>
+<td>Sparse "pattern" Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="number-class.html">number-class</a></td>
+<td>Class "number" of Possibly Complex Numbers</td></tr>
+</table>
+
+<h2><a name="O">-- O --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="condest.html">onenormest</a></td>
+<td>Compute Approximate CONDition number and 1-Norm of (Large) Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="Matrix-class.html">Ops-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="abIndex-class.html">Ops-method</a></td>
+<td>Class "abIndex" of Abstract Index Vectors</td></tr>
+<tr><td style="width: 25%;"><a href="dMatrix-class.html">Ops-method</a></td>
+<td>(Virtual) Class "dMatrix" of "double" Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="diagonalMatrix-class.html">Ops-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dpoMatrix-class.html">Ops-method</a></td>
+<td>Positive Semi-definite Dense Numeric Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="ldenseMatrix-class.html">Ops-method</a></td>
+<td>Virtual Class "ldenseMatrix" of Dense Logical Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="lsparseMatrix-classes.html">Ops-method</a></td>
+<td>Sparse logical matrices</td></tr>
+<tr><td style="width: 25%;"><a href="nMatrix-class.html">Ops-method</a></td>
+<td>Class "nMatrix" of Non-zero Pattern Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="ndenseMatrix-class.html">Ops-method</a></td>
+<td>Virtual Class "ndenseMatrix" of Dense Logical Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="nsparseMatrix-classes.html">Ops-method</a></td>
+<td>Sparse "pattern" Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="sparseMatrix-class.html">Ops-method</a></td>
+<td>Virtual Class "sparseMatrix" - Mother of Sparse Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="sparseVector-class.html">Ops-method</a></td>
+<td>Sparse Vector Classes</td></tr>
+</table>
+
+<h2><a name="P">-- P --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="unpack.html">pack</a></td>
+<td>Representation of Packed and Unpacked (Dense) Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="unpack.html">pack-method</a></td>
+<td>Representation of Packed and Unpacked (Dense) Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="Cholesky-class.html">pBunchKaufman-class</a></td>
+<td>Cholesky and Bunch-Kaufman Decompositions</td></tr>
+<tr><td style="width: 25%;"><a href="Cholesky-class.html">pCholesky-class</a></td>
+<td>Cholesky and Bunch-Kaufman Decompositions</td></tr>
+<tr><td style="width: 25%;"><a href="pMatrix-class.html">pMatrix-class</a></td>
+<td>Permutation matrices</td></tr>
+<tr><td style="width: 25%;"><a href="diagonalMatrix-class.html">print-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="sparseMatrix-class.html">print-method</a></td>
+<td>Virtual Class "sparseMatrix" - Mother of Sparse Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="Matrix-class.html">print.Matrix</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="sparseMatrix-class.html">print.sparseMatrix</a></td>
+<td>Virtual Class "sparseMatrix" - Mother of Sparse Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="printSpMatrix.html">printSpMatrix</a></td>
+<td>Format and Print Sparse Matrices Flexibly</td></tr>
+<tr><td style="width: 25%;"><a href="printSpMatrix.html">printSpMatrix2</a></td>
+<td>Format and Print Sparse Matrices Flexibly</td></tr>
+<tr><td style="width: 25%;"><a href="diagonalMatrix-class.html">prod-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+</table>
+
+<h2><a name="Q">-- Q --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="qr-methods.html">qr</a></td>
+<td>QR Decomposition - S4 Methods and Generic</td></tr>
+<tr><td style="width: 25%;"><a href="qr-methods.html">qr-method</a></td>
+<td>QR Decomposition - S4 Methods and Generic</td></tr>
+<tr><td style="width: 25%;"><a href="qr-methods.html">qr-methods</a></td>
+<td>QR Decomposition - S4 Methods and Generic</td></tr>
+<tr><td style="width: 25%;"><a href="sparseQR-class.html">qr.coef-method</a></td>
+<td>Sparse QR decomposition of a sparse matrix</td></tr>
+<tr><td style="width: 25%;"><a href="sparseQR-class.html">qr.fitted-method</a></td>
+<td>Sparse QR decomposition of a sparse matrix</td></tr>
+<tr><td style="width: 25%;"><a href="sparseQR-class.html">qr.Q</a></td>
+<td>Sparse QR decomposition of a sparse matrix</td></tr>
+<tr><td style="width: 25%;"><a href="sparseQR-class.html">qr.Q-method</a></td>
+<td>Sparse QR decomposition of a sparse matrix</td></tr>
+<tr><td style="width: 25%;"><a href="sparseQR-class.html">qr.qty-method</a></td>
+<td>Sparse QR decomposition of a sparse matrix</td></tr>
+<tr><td style="width: 25%;"><a href="sparseQR-class.html">qr.qy-method</a></td>
+<td>Sparse QR decomposition of a sparse matrix</td></tr>
+<tr><td style="width: 25%;"><a href="sparseQR-class.html">qr.R-method</a></td>
+<td>Sparse QR decomposition of a sparse matrix</td></tr>
+<tr><td style="width: 25%;"><a href="sparseQR-class.html">qr.resid-method</a></td>
+<td>Sparse QR decomposition of a sparse matrix</td></tr>
+<tr><td style="width: 25%;"><a href="qr-methods.html">qrR</a></td>
+<td>QR Decomposition - S4 Methods and Generic</td></tr>
+</table>
+
+<h2><a name="R">-- R --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="rankMatrix.html">rankMatrix</a></td>
+<td>Rank of a Matrix</td></tr>
+<tr><td style="width: 25%;"><a href="cBind.html">rBind</a></td>
+<td>Versions of 'cbind' and 'rbind' recursively built on cbind2/rbind2</td></tr>
+<tr><td style="width: 25%;"><a href="Matrix-class.html">rbind2-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="denseMatrix-class.html">rbind2-method</a></td>
+<td>Virtual Class "denseMatrix" of All Dense Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="diagonalMatrix-class.html">rbind2-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="indMatrix-class.html">rbind2-method</a></td>
+<td>Index Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="sparseMatrix-class.html">rbind2-method</a></td>
+<td>Virtual Class "sparseMatrix" - Mother of Sparse Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="rcond.html">rcond</a></td>
+<td>Estimate the Reciprocal Condition Number</td></tr>
+<tr><td style="width: 25%;"><a href="ddenseMatrix-class.html">rcond-method</a></td>
+<td>Virtual Class "ddenseMatrix" of Numeric Dense Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="denseMatrix-class.html">rcond-method</a></td>
+<td>Virtual Class "denseMatrix" of All Dense Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dgeMatrix-class.html">rcond-method</a></td>
+<td>Class "dgeMatrix" of Dense Numeric (S4 Class) Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dpoMatrix-class.html">rcond-method</a></td>
+<td>Positive Semi-definite Dense Numeric Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dsyMatrix-class.html">rcond-method</a></td>
+<td>Symmetric Dense Numeric Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dtpMatrix-class.html">rcond-method</a></td>
+<td>Packed Triangular Dense Matrices - "dtpMatrix"</td></tr>
+<tr><td style="width: 25%;"><a href="dtrMatrix-class.html">rcond-method</a></td>
+<td>Triangular, dense, numeric matrices</td></tr>
+<tr><td style="width: 25%;"><a href="rcond.html">rcond-method</a></td>
+<td>Estimate the Reciprocal Condition Number</td></tr>
+<tr><td style="width: 25%;"><a href="externalFormats.html">readHB</a></td>
+<td>Read and write external matrix formats</td></tr>
+<tr><td style="width: 25%;"><a href="externalFormats.html">readMM</a></td>
+<td>Read and write external matrix formats</td></tr>
+<tr><td style="width: 25%;"><a href="sparseVector-class.html">rep-method</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td style="width: 25%;"><a href="rep2abI.html">rep2abI</a></td>
+<td>Replicate Vectors into 'abIndex' Result</td></tr>
+<tr><td style="width: 25%;"><a href="replValue-class.html">replValue-class</a></td>
+<td>Virtual Class "replValue" - Simple Class for subassignment Values</td></tr>
+<tr><td style="width: 25%;"><a href="rleDiff-class.html">rleDiff-class</a></td>
+<td>Class "rleDiff" of rle(diff(.)) Stored Vectors</td></tr>
+<tr><td style="width: 25%;"><a href="dgCMatrix-class.html">round-method</a></td>
+<td>Compressed, sparse, column-oriented numeric matrices</td></tr>
+<tr><td style="width: 25%;"><a href="colSums.html">rowMeans</a></td>
+<td>Form Row and Column Sums and Means</td></tr>
+<tr><td style="width: 25%;"><a href="colSums.html">rowMeans-method</a></td>
+<td>Form Row and Column Sums and Means</td></tr>
+<tr><td style="width: 25%;"><a href="dgeMatrix-class.html">rowMeans-method</a></td>
+<td>Class "dgeMatrix" of Dense Numeric (S4 Class) Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="indMatrix-class.html">rowMeans-method</a></td>
+<td>Index Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="colSums.html">rowSums</a></td>
+<td>Form Row and Column Sums and Means</td></tr>
+<tr><td style="width: 25%;"><a href="colSums.html">rowSums-method</a></td>
+<td>Form Row and Column Sums and Means</td></tr>
+<tr><td style="width: 25%;"><a href="dgeMatrix-class.html">rowSums-method</a></td>
+<td>Class "dgeMatrix" of Dense Numeric (S4 Class) Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="indMatrix-class.html">rowSums-method</a></td>
+<td>Index Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="rsparsematrix.html">rsparsematrix</a></td>
+<td>Random Sparse Matrix</td></tr>
+<tr><td style="width: 25%;"><a href="RsparseMatrix-class.html">RsparseMatrix-class</a></td>
+<td>Class "RsparseMatrix" of Sparse Matrices in Column-compressed Form</td></tr>
+</table>
+
+<h2><a name="S">-- S --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="Schur.html">Schur</a></td>
+<td>Schur Decomposition of a Matrix</td></tr>
+<tr><td style="width: 25%;"><a href="Schur-class.html">Schur-class</a></td>
+<td>Class "Schur" of Schur Matrix Factorizations</td></tr>
+<tr><td style="width: 25%;"><a href="Schur.html">Schur-method</a></td>
+<td>Schur Decomposition of a Matrix</td></tr>
+<tr><td style="width: 25%;"><a href="abIndex-class.html">seqMat-class</a></td>
+<td>Class "abIndex" of Abstract Index Vectors</td></tr>
+<tr><td style="width: 25%;"><a href="Cholesky-class.html">show-method</a></td>
+<td>Cholesky and Bunch-Kaufman Decompositions</td></tr>
+<tr><td style="width: 25%;"><a href="Matrix-class.html">show-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="MatrixFactorization-class.html">show-method</a></td>
+<td>Class "MatrixFactorization" of Matrix Factorizations</td></tr>
+<tr><td style="width: 25%;"><a href="abIndex-class.html">show-method</a></td>
+<td>Class "abIndex" of Abstract Index Vectors</td></tr>
+<tr><td style="width: 25%;"><a href="dMatrix-class.html">show-method</a></td>
+<td>(Virtual) Class "dMatrix" of "double" Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="ddenseMatrix-class.html">show-method</a></td>
+<td>Virtual Class "ddenseMatrix" of Numeric Dense Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="denseMatrix-class.html">show-method</a></td>
+<td>Virtual Class "denseMatrix" of All Dense Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="diagonalMatrix-class.html">show-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dsyMatrix-class.html">show-method</a></td>
+<td>Symmetric Dense Numeric Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dtrMatrix-class.html">show-method</a></td>
+<td>Triangular, dense, numeric matrices</td></tr>
+<tr><td style="width: 25%;"><a href="nMatrix-class.html">show-method</a></td>
+<td>Class "nMatrix" of Non-zero Pattern Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="rleDiff-class.html">show-method</a></td>
+<td>Class "rleDiff" of rle(diff(.)) Stored Vectors</td></tr>
+<tr><td style="width: 25%;"><a href="sparseMatrix-class.html">show-method</a></td>
+<td>Virtual Class "sparseMatrix" - Mother of Sparse Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="sparseVector-class.html">show-method</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td style="width: 25%;"><a href="dgCMatrix-class.html">signif-method</a></td>
+<td>Compressed, sparse, column-oriented numeric matrices</td></tr>
+<tr><td style="width: 25%;"><a href="symmpart.html">skewpart</a></td>
+<td>Symmetric Part and Skew(symmetric) Part of a Matrix</td></tr>
+<tr><td style="width: 25%;"><a href="symmpart.html">skewpart-method</a></td>
+<td>Symmetric Part and Skew(symmetric) Part of a Matrix</td></tr>
+<tr><td style="width: 25%;"><a href="symmpart.html">skewpart-methods</a></td>
+<td>Symmetric Part and Skew(symmetric) Part of a Matrix</td></tr>
+<tr><td style="width: 25%;"><a href="solve-methods.html">solve</a></td>
+<td>Methods in Package Matrix for Function 'solve()'</td></tr>
+<tr><td style="width: 25%;"><a href="solve-methods.html">solve-method</a></td>
+<td>Methods in Package Matrix for Function 'solve()'</td></tr>
+<tr><td style="width: 25%;"><a href="solve-methods.html">solve-methods</a></td>
+<td>Methods in Package Matrix for Function 'solve()'</td></tr>
+<tr><td style="width: 25%;"><a href="sparse.model.matrix.html">sparse.model.matrix</a></td>
+<td>Construct Sparse Design / Model Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="sparseLU-class.html">sparseLU-class</a></td>
+<td>Sparse LU decomposition of a square sparse matrix</td></tr>
+<tr><td style="width: 25%;"><a href="SparseM-conv.html">SparseM-coerce-methods</a></td>
+<td>Sparse Matrix Coercion from and to those from package 'SparseM'</td></tr>
+<tr><td style="width: 25%;"><a href="sparseMatrix.html">sparseMatrix</a></td>
+<td>General Sparse Matrix Construction from Nonzero Entries</td></tr>
+<tr><td style="width: 25%;"><a href="sparseMatrix-class.html">sparseMatrix-class</a></td>
+<td>Virtual Class "sparseMatrix" - Mother of Sparse Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="sparseQR-class.html">sparseQR-class</a></td>
+<td>Sparse QR decomposition of a sparse matrix</td></tr>
+<tr><td style="width: 25%;"><a href="sparseVector.html">sparseVector</a></td>
+<td>Sparse Vector Construction from Nonzero Entries</td></tr>
+<tr><td style="width: 25%;"><a href="sparseVector-class.html">sparseVector-class</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td style="width: 25%;"><a href="spMatrix.html">spMatrix</a></td>
+<td>Sparse Matrix Constructor From Triplet</td></tr>
+<tr><td style="width: 25%;"><a href="Subassign-methods.html">Subassign-methods</a></td>
+<td>Methods for "[&lt;-" - Assigning to Subsets for 'Matrix'</td></tr>
+<tr><td style="width: 25%;"><a href="diagonalMatrix-class.html">sum-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="Matrix-class.html">Summary-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="abIndex-class.html">Summary-method</a></td>
+<td>Class "abIndex" of Abstract Index Vectors</td></tr>
+<tr><td style="width: 25%;"><a href="dMatrix-class.html">Summary-method</a></td>
+<td>(Virtual) Class "dMatrix" of "double" Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="ddenseMatrix-class.html">Summary-method</a></td>
+<td>Virtual Class "ddenseMatrix" of Numeric Dense Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="diagonalMatrix-class.html">Summary-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dsparseMatrix-class.html">Summary-method</a></td>
+<td>Virtual Class "dsparseMatrix" of Numeric Sparse Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="indMatrix-class.html">Summary-method</a></td>
+<td>Index Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="ldenseMatrix-class.html">Summary-method</a></td>
+<td>Virtual Class "ldenseMatrix" of Dense Logical Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="nMatrix-class.html">Summary-method</a></td>
+<td>Class "nMatrix" of Non-zero Pattern Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="ndenseMatrix-class.html">Summary-method</a></td>
+<td>Virtual Class "ndenseMatrix" of Dense Logical Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="pMatrix-class.html">Summary-method</a></td>
+<td>Permutation matrices</td></tr>
+<tr><td style="width: 25%;"><a href="sparseVector-class.html">Summary-method</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td style="width: 25%;"><a href="diagonalMatrix-class.html">summary-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="sparseMatrix-class.html">summary-method</a></td>
+<td>Virtual Class "sparseMatrix" - Mother of Sparse Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="symmetricMatrix-class.html">symmetricMatrix-class</a></td>
+<td>Virtual Class of Symmetric Matrices in Package Matrix</td></tr>
+<tr><td style="width: 25%;"><a href="symmpart.html">symmpart</a></td>
+<td>Symmetric Part and Skew(symmetric) Part of a Matrix</td></tr>
+<tr><td style="width: 25%;"><a href="symmpart.html">symmpart-method</a></td>
+<td>Symmetric Part and Skew(symmetric) Part of a Matrix</td></tr>
+<tr><td style="width: 25%;"><a href="symmpart.html">symmpart-methods</a></td>
+<td>Symmetric Part and Skew(symmetric) Part of a Matrix</td></tr>
+</table>
+
+<h2><a name="T">-- T --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="CsparseMatrix-class.html">t-method</a></td>
+<td>Class "CsparseMatrix" of Sparse Matrices in Column-compressed Form</td></tr>
+<tr><td style="width: 25%;"><a href="Matrix-class.html">t-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="RsparseMatrix-class.html">t-method</a></td>
+<td>Class "RsparseMatrix" of Sparse Matrices in Column-compressed Form</td></tr>
+<tr><td style="width: 25%;"><a href="TsparseMatrix-class.html">t-method</a></td>
+<td>Class "TsparseMatrix" of Sparse Matrices in Triplet Form</td></tr>
+<tr><td style="width: 25%;"><a href="ddenseMatrix-class.html">t-method</a></td>
+<td>Virtual Class "ddenseMatrix" of Numeric Dense Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dgCMatrix-class.html">t-method</a></td>
+<td>Compressed, sparse, column-oriented numeric matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dgRMatrix-class.html">t-method</a></td>
+<td>Sparse Compressed, Row-oriented Numeric Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dgeMatrix-class.html">t-method</a></td>
+<td>Class "dgeMatrix" of Dense Numeric (S4 Class) Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="diagonalMatrix-class.html">t-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dpoMatrix-class.html">t-method</a></td>
+<td>Positive Semi-definite Dense Numeric Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dsCMatrix-class.html">t-method</a></td>
+<td>Numeric Symmetric Sparse (column compressed) Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dsyMatrix-class.html">t-method</a></td>
+<td>Symmetric Dense Numeric Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dtCMatrix-class.html">t-method</a></td>
+<td>Triangular, (compressed) sparse column matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dtpMatrix-class.html">t-method</a></td>
+<td>Packed Triangular Dense Matrices - "dtpMatrix"</td></tr>
+<tr><td style="width: 25%;"><a href="dtrMatrix-class.html">t-method</a></td>
+<td>Triangular, dense, numeric matrices</td></tr>
+<tr><td style="width: 25%;"><a href="indMatrix-class.html">t-method</a></td>
+<td>Index Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="lgeMatrix-class.html">t-method</a></td>
+<td>Class "lgeMatrix" of General Dense Logical Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="lsparseMatrix-classes.html">t-method</a></td>
+<td>Sparse logical matrices</td></tr>
+<tr><td style="width: 25%;"><a href="lsyMatrix-class.html">t-method</a></td>
+<td>Symmetric Dense Logical Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="ltrMatrix-class.html">t-method</a></td>
+<td>Triangular Dense Logical Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="ngeMatrix-class.html">t-method</a></td>
+<td>Class "ngeMatrix" of General Dense Nonzero-pattern Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="nsparseMatrix-classes.html">t-method</a></td>
+<td>Sparse "pattern" Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="nsyMatrix-class.html">t-method</a></td>
+<td>Symmetric Dense Nonzero-Pattern Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="ntrMatrix-class.html">t-method</a></td>
+<td>Triangular Dense Logical Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="pMatrix-class.html">t-method</a></td>
+<td>Permutation matrices</td></tr>
+<tr><td style="width: 25%;"><a href="sparseVector-class.html">t-method</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td style="width: 25%;"><a href="graph2T.html">T2graph</a></td>
+<td>Conversions "graph" &lt;-&gt; (sparse) Matrix</td></tr>
+<tr><td style="width: 25%;"><a href="Matrix-class.html">tail-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="sparseVector-class.html">tail-method</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td style="width: 25%;"><a href="matrix-products.html">tcrossprod</a></td>
+<td>Matrix (Cross) Products (of Transpose)</td></tr>
+<tr><td style="width: 25%;"><a href="matrix-products.html">tcrossprod-method</a></td>
+<td>Matrix (Cross) Products (of Transpose)</td></tr>
+<tr><td style="width: 25%;"><a href="matrix-products.html">tcrossprod-methods</a></td>
+<td>Matrix (Cross) Products (of Transpose)</td></tr>
+<tr><td style="width: 25%;"><a href="sparseVector-class.html">toeplitz-method</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td style="width: 25%;"><a href="triangularMatrix-class.html">triangularMatrix-class</a></td>
+<td>Virtual Class of Triangular Matrices in Package Matrix</td></tr>
+<tr><td style="width: 25%;"><a href="band.html">tril</a></td>
+<td>Extract bands of a matrix</td></tr>
+<tr><td style="width: 25%;"><a href="band.html">tril-method</a></td>
+<td>Extract bands of a matrix</td></tr>
+<tr><td style="width: 25%;"><a href="band.html">tril-methods</a></td>
+<td>Extract bands of a matrix</td></tr>
+<tr><td style="width: 25%;"><a href="band.html">triu</a></td>
+<td>Extract bands of a matrix</td></tr>
+<tr><td style="width: 25%;"><a href="band.html">triu-method</a></td>
+<td>Extract bands of a matrix</td></tr>
+<tr><td style="width: 25%;"><a href="band.html">triu-methods</a></td>
+<td>Extract bands of a matrix</td></tr>
+<tr><td style="width: 25%;"><a href="TsparseMatrix-class.html">TsparseMatrix-class</a></td>
+<td>Class "TsparseMatrix" of Sparse Matrices in Triplet Form</td></tr>
+</table>
+
+<h2><a name="U">-- U --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="uniqTsparse.html">uniqTsparse</a></td>
+<td>Unique TsparseMatrix Representations</td></tr>
+<tr><td style="width: 25%;"><a href="Matrix-class.html">unname-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="unpack.html">unpack</a></td>
+<td>Representation of Packed and Unpacked (Dense) Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="unpack.html">unpack-method</a></td>
+<td>Representation of Packed and Unpacked (Dense) Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="CHMfactor-class.html">update-method</a></td>
+<td>CHOLMOD-based Cholesky Factorizations</td></tr>
+<tr><td style="width: 25%;"><a href="updown.html">updown</a></td>
+<td>Up- and Down-Dating a Cholesky Decomposition</td></tr>
+<tr><td style="width: 25%;"><a href="updown.html">updown-method</a></td>
+<td>Up- and Down-Dating a Cholesky Decomposition</td></tr>
+<tr><td style="width: 25%;"><a href="updown.html">updown-methods</a></td>
+<td>Up- and Down-Dating a Cholesky Decomposition</td></tr>
+<tr><td style="width: 25%;"><a href="USCounties.html">USCounties</a></td>
+<td>USCounties Contiguity Matrix</td></tr>
+</table>
+
+<h2><a name="W">-- W --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="diagonalMatrix-class.html">which-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="ldenseMatrix-class.html">which-method</a></td>
+<td>Virtual Class "ldenseMatrix" of Dense Logical Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="lsparseMatrix-classes.html">which-method</a></td>
+<td>Sparse logical matrices</td></tr>
+<tr><td style="width: 25%;"><a href="ndenseMatrix-class.html">which-method</a></td>
+<td>Virtual Class "ndenseMatrix" of Dense Logical Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="nsparseMatrix-classes.html">which-method</a></td>
+<td>Sparse "pattern" Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="externalFormats.html">writeMM</a></td>
+<td>Read and write external matrix formats</td></tr>
+<tr><td style="width: 25%;"><a href="externalFormats.html">writeMM-method</a></td>
+<td>Read and write external matrix formats</td></tr>
+</table>
+
+<h2><a name="X">-- X --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="sparseVector-class.html">xsparseVector-class</a></td>
+<td>Sparse Vector Classes</td></tr>
+</table>
+
+<h2><a name="Z">-- Z --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="dMatrix-class.html">zapsmall-method</a></td>
+<td>(Virtual) Class "dMatrix" of "double" Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="unused-classes.html">zMatrix-class</a></td>
+<td>Virtual Classes Not Yet Really Implemented and Used</td></tr>
+<tr><td style="width: 25%;"><a href="sparseVector-class.html">zsparseVector-class</a></td>
+<td>Sparse Vector Classes</td></tr>
+</table>
+
+<h2><a name="misc">-- misc --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="Matrix-class.html">!-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="ldenseMatrix-class.html">!-method</a></td>
+<td>Virtual Class "ldenseMatrix" of Dense Logical Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="ldiMatrix-class.html">!-method</a></td>
+<td>Class "ldiMatrix" of Diagonal Logical Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="lgeMatrix-class.html">!-method</a></td>
+<td>Class "lgeMatrix" of General Dense Logical Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="lsparseMatrix-classes.html">!-method</a></td>
+<td>Sparse logical matrices</td></tr>
+<tr><td style="width: 25%;"><a href="ltrMatrix-class.html">!-method</a></td>
+<td>Triangular Dense Logical Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="ndenseMatrix-class.html">!-method</a></td>
+<td>Virtual Class "ndenseMatrix" of Dense Logical Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="ngeMatrix-class.html">!-method</a></td>
+<td>Class "ngeMatrix" of General Dense Nonzero-pattern Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="nsparseMatrix-classes.html">!-method</a></td>
+<td>Sparse "pattern" Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="ntrMatrix-class.html">!-method</a></td>
+<td>Triangular Dense Logical Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="sparseVector-class.html">!-method</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td style="width: 25%;"><a href="diagonalMatrix-class.html">%%-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="boolean-matprod.html">%&amp;%</a></td>
+<td>Boolean Arithmetic Matrix Products: '%&amp;%' and Methods</td></tr>
+<tr><td style="width: 25%;"><a href="boolean-matprod.html">%&amp;%-method</a></td>
+<td>Boolean Arithmetic Matrix Products: '%&amp;%' and Methods</td></tr>
+<tr><td style="width: 25%;"><a href="boolean-matprod.html">%&amp;%-methods</a></td>
+<td>Boolean Arithmetic Matrix Products: '%&amp;%' and Methods</td></tr>
+<tr><td style="width: 25%;"><a href="matrix-products.html">%*%</a></td>
+<td>Matrix (Cross) Products (of Transpose)</td></tr>
+<tr><td style="width: 25%;"><a href="matrix-products.html">%*%-method</a></td>
+<td>Matrix (Cross) Products (of Transpose)</td></tr>
+<tr><td style="width: 25%;"><a href="matrix-products.html">%*%-methods</a></td>
+<td>Matrix (Cross) Products (of Transpose)</td></tr>
+<tr><td style="width: 25%;"><a href="diagonalMatrix-class.html">%/%-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="diagonalMatrix-class.html">&amp;-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="diagonalMatrix-class.html">*-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="Matrix-class.html">+-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="dgTMatrix-class.html">+-method</a></td>
+<td>Sparse matrices in triplet form</td></tr>
+<tr><td style="width: 25%;"><a href="Matrix-class.html">--method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="denseMatrix-class.html">--method</a></td>
+<td>Virtual Class "denseMatrix" of All Dense Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="diagonalMatrix-class.html">--method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="indMatrix-class.html">--method</a></td>
+<td>Index Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="lsparseMatrix-classes.html">--method</a></td>
+<td>Sparse logical matrices</td></tr>
+<tr><td style="width: 25%;"><a href="nsparseMatrix-classes.html">--method</a></td>
+<td>Sparse "pattern" Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="pMatrix-class.html">--method</a></td>
+<td>Permutation matrices</td></tr>
+<tr><td style="width: 25%;"><a href="sparseMatrix-class.html">--method</a></td>
+<td>Virtual Class "sparseMatrix" - Mother of Sparse Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="sparseVector-class.html">--method</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td style="width: 25%;"><a href="bdiag.html">.bdiag</a></td>
+<td>Construct a Block Diagonal Matrix</td></tr>
+<tr><td style="width: 25%;"><a href="diagU2N.html">.diagU2N</a></td>
+<td>Transform Triangular Matrices from Unit Triangular to General Triangular and Back</td></tr>
+<tr><td style="width: 25%;"><a href="dsyMatrix-class.html">.dsy2mat</a></td>
+<td>Symmetric Dense Numeric Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="formatSparseM.html">.formatSparseSimple</a></td>
+<td>Formatting Sparse Numeric Matrices Utilities</td></tr>
+<tr><td style="width: 25%;"><a href="Diagonal.html">.sparseDiagonal</a></td>
+<td>Create Diagonal Matrix Object</td></tr>
+<tr><td style="width: 25%;"><a href="Cholesky.html">.SuiteSparse_version</a></td>
+<td>Cholesky Decomposition of a Sparse Matrix</td></tr>
+<tr><td style="width: 25%;"><a href="Diagonal.html">.symDiagonal</a></td>
+<td>Create Diagonal Matrix Object</td></tr>
+<tr><td style="width: 25%;"><a href="CHMfactor-class.html">.updateCHMfactor</a></td>
+<td>CHOLMOD-based Cholesky Factorizations</td></tr>
+<tr><td style="width: 25%;"><a href="CsparseMatrix-class.html">.validateCsparse</a></td>
+<td>Class "CsparseMatrix" of Sparse Matrices in Column-compressed Form</td></tr>
+<tr><td style="width: 25%;"><a href="diagonalMatrix-class.html">/-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="Xtrct-methods.html">[-method</a></td>
+<td>Methods for "[": Extraction or Subsetting in Package 'Matrix'</td></tr>
+<tr><td style="width: 25%;"><a href="abIndex-class.html">[-method</a></td>
+<td>Class "abIndex" of Abstract Index Vectors</td></tr>
+<tr><td style="width: 25%;"><a href="dMatrix-class.html">[-method</a></td>
+<td>(Virtual) Class "dMatrix" of "double" Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="sparseVector-class.html">[-method</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td style="width: 25%;"><a href="Xtrct-methods.html">[-methods</a></td>
+<td>Methods for "[": Extraction or Subsetting in Package 'Matrix'</td></tr>
+<tr><td style="width: 25%;"><a href="Subassign-methods.html">[&lt;--method</a></td>
+<td>Methods for "[&lt;-" - Assigning to Subsets for 'Matrix'</td></tr>
+<tr><td style="width: 25%;"><a href="sparseVector-class.html">[&lt;--method</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td style="width: 25%;"><a href="Subassign-methods.html">[&lt;--methods</a></td>
+<td>Methods for "[&lt;-" - Assigning to Subsets for 'Matrix'</td></tr>
+<tr><td style="width: 25%;"><a href="diagonalMatrix-class.html">^-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+</table>
+</body></html>

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/html/00Index.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/doc/SuiteSparse/COLAMD.txt
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/doc/SuiteSparse/COLAMD.txt	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/doc/SuiteSparse/COLAMD.txt	(revision 2477)
@@ -0,0 +1,118 @@
+COLAMD, Copyright 1998-2012, Timothy A. Davis.  http://www.suitesparse.com
+-------------------------------------------------------------------------------
+
+The COLAMD column approximate minimum degree ordering algorithm computes
+a permutation vector P such that the LU factorization of A (:,P)
+tends to be sparser than that of A.  The Cholesky factorization of
+(A (:,P))'*(A (:,P)) will also tend to be sparser than that of A'*A.
+SYMAMD is a symmetric minimum degree ordering method based on COLAMD,
+available as a MATLAB-callable function.  It constructs a matrix M such
+that M'*M has the same pattern as A, and then uses COLAMD to compute a column
+ordering of M.  Colamd and symamd tend to be faster and generate better
+orderings than their MATLAB counterparts, colmmd and symmmd.
+
+To compile and test the colamd m-files and mexFunctions, just unpack the
+COLAMD/ directory from the COLAMD.tar.gz file, and run MATLAB from
+within that directory.  Next, type colamd_test to compile and test colamd
+and symamd.  This will work on any computer with MATLAB (Unix, PC, or Mac).
+Alternatively, type "make" (in Unix) to compile and run a simple example C
+code, without using MATLAB.
+
+To compile and install the colamd m-files and mexFunctions, just cd to
+COLAMD/MATLAB and type colamd_install in the MATLAB command window.
+A short demo will run.  Optionally, type colamd_test to run an extensive tests.
+Type "make" in Unix in the COLAMD directory to compile the C-callable
+library and to run a short demo.
+
+Colamd is a built-in routine in MATLAB, available from The 
+Mathworks, Inc.  Under most cases, the compiled COLAMD from Versions 2.0 to the
+current version do not differ.  Colamd Versions 2.2 and 2.3 differ only in their
+mexFunction interaces to MATLAB.  v2.4 fixes a bug in the symamd routine in
+v2.3.  The bug (in v2.3 and earlier) has no effect on the MATLAB symamd
+mexFunction.  v2.5 adds additional checks for integer overflow, so that
+the "int" version can be safely used with 64-bit pointers.  Refer to the
+ChangeLog for more details.
+
+To use colamd and symamd within an application written in C, all you need are
+colamd.c, colamd_global.c, and colamd.h, which are the C-callable
+colamd/symamd codes.  See colamd.c for more information on how to call
+colamd from a C program.
+
+Requires SuiteSparse_config, in the ../SuiteSparse_config directory relative to
+this directory.
+
+See the colamd.c file or http://www.suitesparse.com for the license to COLAMD.
+
+Related papers:
+
+	T. A. Davis, J. R. Gilbert, S. Larimore, E. Ng, An approximate column
+	minimum degree ordering algorithm, ACM Transactions on Mathematical
+	Software, vol. 30, no. 3., pp. 353-376, 2004.
+
+	T. A. Davis, J. R. Gilbert, S. Larimore, E. Ng, Algorithm 836: COLAMD,
+	an approximate column minimum degree ordering algorithm, ACM
+	Transactions on Mathematical Software, vol. 30, no. 3., pp. 377-380,
+	2004.
+
+	"An approximate minimum degree column ordering algorithm",
+	S. I. Larimore, MS Thesis, Dept. of Computer and Information
+	Science and Engineering, University of Florida, Gainesville, FL,
+	1998.  CISE Tech Report TR-98-016.
+
+	Approximate Deficiency for Ordering the Columns of a Matrix,
+	J. L. Kern, Senior Thesis, Dept. of Computer and Information
+	Science and Engineering, University of Florida, Gainesville, FL,
+	1999.
+
+
+Authors:  Stefan I. Larimore and Timothy A. Davis,
+in collaboration with John Gilbert, Xerox PARC (now at UC Santa Barbara),
+and Esmong Ng, Lawrence Berkeley National Laboratory (much of this work
+he did while at Oak Ridge National Laboratory). 
+
+COLAMD files:
+
+    Demo	    simple demo
+    Doc		    additional documentation (see colamd.c for more)
+    Include	    include file
+    Lib		    compiled C-callable library
+    Makefile	    primary Unix Makefile
+    MATLAB	    MATLAB functions
+    README.txt	    this file
+    Source	    C source code
+
+    ./Demo:
+    colamd_example.c	    simple example
+    colamd_example.out	    output of colamd_example.c
+    colamd_l_example.c	    simple example, long integers
+    colamd_l_example.out    output of colamd_l_example.c
+    Makefile		    Makefile for C demos
+
+    ./Doc:
+    ChangeLog	    change log
+    lesser.txt	    license
+
+    ./Include:
+    colamd.h	    include file
+
+    ./Lib:
+    Makefile	    Makefile for C-callable library
+
+    ./MATLAB:
+    colamd2.m		MATLAB interface for colamd2
+    colamd_demo.m	simple demo
+    colamd_install.m	compile and install colamd2 and symamd2
+    colamd_make.m	compile colamd2 and symamd2
+    colamdmex.ca	MATLAB mexFunction for colamd2
+    colamd_test.m	extensive test
+    colamdtestmex.c	test function for colamd
+    Contents.m		contents of the MATLAB directory
+    luflops.m		test code
+    Makefile		Makefile for MATLAB functions
+    symamd2.m		MATLAB interface for symamd2
+    symamdmex.c		MATLAB mexFunction for symamd2
+    symamdtestmex.c	test function for symamd
+
+    ./Source:
+    colamd.c		primary source code
+    colamd_global.c	globally defined function pointers (malloc, free, ...)

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/doc/SuiteSparse/COLAMD.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/doc/SuiteSparse/UserGuides.txt
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/doc/SuiteSparse/UserGuides.txt	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/doc/SuiteSparse/UserGuides.txt	(revision 2477)
@@ -0,0 +1,20 @@
+PDF files of the User's Guides for the CHOLMOD, AMD and CAMD sparse
+matrix libraries are available from Tim Davis's web site for his
+sparse matrix packages.  The base URL for the web site is
+
+http://www.cise.ufl.edu/research/sparse
+
+A direct link to "The CHOLMOD User's Guide" is
+
+http://www.cise.ufl.edu/research/sparse/cholmod/current/CHOLMOD/Doc/UserGuide.pdf
+
+A direct link to "The AMD User's Guide" is
+
+http://www.cise.ufl.edu/research/sparse/amd/current/AMD/Doc/AMD_UserGuide.pdf
+
+(Apparently Tim has taken Oscar Wilde's observation that "consistency
+is the last refuge of the unimaginative" to heart.)
+
+A direct link to "The CAMD User's Guide" is
+
+http://www.cise.ufl.edu/research/sparse/camd/current/CAMD/Doc/AMD_UserGuide.pdf

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/doc/SuiteSparse/UserGuides.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/doc/SuiteSparse/AMD.txt
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/doc/SuiteSparse/AMD.txt	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/doc/SuiteSparse/AMD.txt	(revision 2477)
@@ -0,0 +1,213 @@
+AMD, Copyright (c) 2009-2012 by Timothy A. Davis (http://www.suitesparse.com),
+Patrick R. Amestoy, and Iain S. Duff.  All Rights Reserved.  AMD is available
+under alternate licences; contact T. Davis for details.
+
+AMD:  a set of routines for permuting sparse matrices prior to
+    factorization.  Includes a version in C, a version in Fortran, and a MATLAB
+    mexFunction.
+
+Requires SuiteSparse_config, in the ../SuiteSparse_config directory relative to
+this directory.
+
+Quick start (Unix, or Windows with Cygwin):
+
+    To compile, test, and install AMD, you may wish to first configure the
+    installation by editting the ../SuiteSparse_config/SuiteSparse_config.mk
+    file.  Next, cd to this directory (AMD) and type "make" (or "make lib" if
+    you do not have MATLAB).  To compile and run a demo program for the Fortran
+    version, type "make fortran".  When done, type "make clean" to remove
+    unused *.o files (keeps the compiled libraries and demo programs).  See the
+    User Guide (Doc/AMD_UserGuide.pdf), or
+    ../SuiteSparse_config/SuiteSparse_config.mk for more details.
+
+Quick start (for MATLAB users);
+
+    To compile, test, and install the AMD mexFunction, cd to the
+    AMD/MATLAB directory and type amd_make at the MATLAB prompt.
+
+-------------------------------------------------------------------------------
+
+AMD License:
+
+    Your use or distribution of AMD or any modified version of
+    AMD implies that you agree to this License.
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public
+    License along with this library; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
+    USA
+
+    Permission is hereby granted to use or copy this program under the
+    terms of the GNU LGPL, provided that the Copyright, this License,
+    and the Availability of the original version is retained on all copies.
+    User documentation of any code that uses this code or any modified
+    version of this code must cite the Copyright, this License, the
+    Availability note, and "Used by permission." Permission to modify
+    the code and to distribute modified code is granted, provided the
+    Copyright, this License, and the Availability note are retained,
+    and a notice that the code was modified is included.
+
+Availability:
+
+    http://www.suitesparse.com
+
+-------------------------------------------------------------------------------
+
+This is the AMD README file.  It is a terse overview of AMD.
+Refer to the User Guide (Doc/AMD_UserGuide.pdf) for how to install
+and use AMD.
+
+Description:
+
+    AMD is a set of routines for pre-ordering sparse matrices prior to Cholesky
+    or LU factorization, using the approximate minimum degree ordering
+    algorithm.  Written in ANSI/ISO C with a MATLAB interface, and in
+    Fortran 77.
+
+Authors:
+
+    Timothy A. Davis (DrTimothyAldenDavis@gmail.com)
+    Patrick R. Amestory, ENSEEIHT, Toulouse, France.
+    Iain S. Duff, Rutherford Appleton Laboratory, UK.
+
+Acknowledgements:
+
+    This work was supported by the National Science Foundation, under
+    grants DMS-9504974, DMS-9803599, and CCR-0203270.
+
+    Portions of this work were done while on sabbatical at Stanford University
+    and Lawrence Berkeley National Laboratory (with funding from the SciDAC
+    program).  I would like to thank Gene Golub, Esmond Ng, and Horst Simon
+    for making this sabbatical possible.
+
+-------------------------------------------------------------------------------
+Files and directories in the AMD distribution:
+-------------------------------------------------------------------------------
+
+    ---------------------------------------------------------------------------
+    Subdirectories of the AMD directory:
+    ---------------------------------------------------------------------------
+
+    Doc		documentation
+    Source	primary source code
+    Include	include file for use in your code that calls AMD
+    Demo	demo programs.  also serves as test of the AMD installation.
+    MATLAB	AMD mexFunction for MATLAB, and supporting m-files
+    Lib		where the compiled C-callable and Fortran-callable
+		AMD libraries placed.
+
+    ---------------------------------------------------------------------------
+    Files in the AMD directory:
+    ---------------------------------------------------------------------------
+
+    Makefile	top-level Makefile for GNU make or original make.
+		Windows users would require Cygwin to use "make"
+
+    README.txt	this file
+
+    ---------------------------------------------------------------------------
+    Doc directory: documentation
+    ---------------------------------------------------------------------------
+
+    ChangeLog			change log
+    License			the AMD License
+    Makefile			for creating the documentation
+    AMD_UserGuide.bib		AMD User Guide (references)
+    AMD_UserGuide.tex		AMD User Guide (LaTeX)
+    AMD_UserGuide.pdf		AMD User Guide (PDF)
+    lesser.txt			the GNU LGPL license
+
+    ---------------------------------------------------------------------------
+    Source directory:
+    ---------------------------------------------------------------------------
+
+    amd_order.c			user-callable, primary AMD ordering routine
+    amd_control.c		user-callable, prints the control parameters
+    amd_defaults.c		user-callable, sets default control parameters
+    amd_info.c			user-callable, prints the statistics from AMD
+
+    amd_1.c			non-user-callable, construct A+A'
+    amd_2.c			user-callable, primary ordering kernel
+				(a C version of amd.f and amdbar.f, with
+				post-ordering added)
+    amd_aat.c			non-user-callable, computes nnz (A+A')
+    amd_dump.c			non-user-callable, debugging routines
+    amd_postorder.c		non-user-callable, postorder
+    amd_post_tree.c		non-user-callable, postorder just one tree
+    amd_valid.c			non-user-callable, verifies a matrix
+    amd_preprocess.c		non-user-callable, computes A', removes duplic
+
+    amd.f			user-callable Fortran 77 version
+    amdbar.f			user-callable Fortran 77 version
+
+    ---------------------------------------------------------------------------
+    Include directory:
+    ---------------------------------------------------------------------------
+
+    amd.h			include file for C programs that use AMD
+    amd_internal.h		non-user-callable, include file for AMD
+
+    ---------------------------------------------------------------------------
+    Demo directory:
+    ---------------------------------------------------------------------------
+
+    Makefile			for GNU make or original make
+
+    amd_demo.c			C demo program for AMD
+    amd_demo.out		output of amd_demo.c
+
+    amd_demo2.c			C demo program for AMD, jumbled matrix
+    amd_demo2.out		output of amd_demo2.c
+
+    amd_l_demo.c		C demo program for AMD (long integer version)
+    amd_l_demo.out		output of amd_l_demo.c
+
+    amd_simple.c		simple C demo program for AMD
+    amd_simple.out		output of amd_simple.c
+
+    amd_f77demo.f		Fortran 77 demo program for AMD
+    amd_f77demo.out		output of amd_f77demo.f
+
+    amd_f77simple.c		simple Fortran 77 demo program for AMD
+    amd_f77simple.out		output of amd_f77simple.f
+
+    amd_f77cross.f		Fortran 77 demo, calls the C version of AMD
+    amd_f77cross.out		output of amd_f77cross.f
+    amd_f77wrapper.c		Fortran-callable wrapper for C version of AMD
+
+    ---------------------------------------------------------------------------
+    MATLAB directory:
+    ---------------------------------------------------------------------------
+
+    GNUmakefile			a nice Makefile, for GNU make
+    Makefile			an ugly Unix Makefile (for older make's)
+
+    Contents.m			for "help amd2" listing of toolbox contents
+
+    amd2.m			MATLAB help file for AMD
+    amd_make.m			MATLAB m-file for compiling AMD mexFunction
+    amd_install.m		compile and install the AMD mexFunction
+
+    amd_mex.c			AMD mexFunction for MATLAB
+
+    amd_demo.m			MATLAB demo for AMD
+    amd_demo.m.out		diary output of amd_demo.m
+    can_24.mat			input file for AMD demo
+
+    ---------------------------------------------------------------------------
+    Lib directory:  libamd.a and libamdf77.a libraries placed here
+    ---------------------------------------------------------------------------
+
+    GNUmakefile			a nice Makefile, for GNU make
+    Makefile			an ugly Unix Makefile (for older make's)
+    libamd.def			AMD definitions for Windows

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/doc/SuiteSparse/AMD.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/doc/SuiteSparse/CHOLMOD.txt
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/doc/SuiteSparse/CHOLMOD.txt	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/doc/SuiteSparse/CHOLMOD.txt	(revision 2477)
@@ -0,0 +1,81 @@
+CHOLMOD: a sparse CHOLesky MODification package, Copyright (c) 2005-2012.
+http://www.suitesparse.com
+-----------------------------------------------
+
+    CHOLMOD is a set of routines for factorizing sparse symmetric positive
+    definite matrices of the form A or AA', updating/downdating a sparse
+    Cholesky factorization, solving linear systems, updating/downdating
+    the solution to the triangular system Lx=b, and many other sparse matrix
+    functions for both symmetric and unsymmetric matrices.  Its supernodal
+    Cholesky factorization relies on LAPACK and the Level-3 BLAS, and obtains
+    a substantial fraction of the peak performance of the BLAS.  Both real and
+    complex matrices are supported.  CHOLMOD is written in ANSI/ISO C, with both
+    C and MATLAB interfaces.  This code works on Microsoft Windows and many
+    versions of Unix and Linux.
+
+
+Some Modules of CHOLMOD are copyrighted by the University of Florida (the
+Core and Partition Modules).  The rest are copyrighted by the authors:
+Timothy A. Davis (all of them), and William W. Hager (the Modify Module).
+
+CHOLMOD relies on several other packages:  AMD, CAMD, COLAMD, CCOLAMD,
+SuiteSparse_config, METIS, the BLAS, and LAPACK.  All but METIS, the BLAS, and
+LAPACK are part of SuiteSparse.
+
+AMD is authored by T. Davis, Iain Duff, and Patrick Amestoy.
+COLAMD is authored by T. Davis and Stefan Larimore, with algorithmic design
+in collaboration with John Gilbert and Esmond Ng.
+CCOLAMD is authored by T. Davis and Siva Rajamanickam.
+CAMD is authored by T. Davis and Y. Chen.
+
+LAPACK and the BLAS are authored by Jack Dongarra and many others.
+LAPACK is available at http://www.netlib.org/lapack
+
+METIS is authored by George Karypis, Univ. of Minnesota.  Its use in CHOLMOD
+is optional.  See http://www-users.cs.umn.edu/~karypis/metis.
+Place a copy of the metis-4.0 directory in the same directory that
+contains the CHOLMOD, AMD, COLAMD, and CCOLAMD directories prior to compiling
+with "make".
+
+If you do not wish to use METIS, you must edit SuiteSparse_config and change
+the line:
+
+    CHOLMOD_CONFIG =
+
+to
+
+    CHOLMOD_CONFIG = -DNPARTITION
+
+The CHOLMOD, AMD, COLAMD, CCOLAMD, and SuiteSparse)config directories must all
+reside in a common parent directory.  To compile all these libraries, edit
+SuiteSparse)config/SuiteSparse)config.mk to reflect your environment (C
+compiler, location of the BLAS, and so on) and then type "make" in either the
+CHOLMOD directory or in the parent directory of CHOLMOD.  See each package for
+more details on how to compile them.
+
+For use in MATLAB (on any system, including Windows):  start MATLAB,
+cd to the CHOLMOD/MATLAB directory, and type cholmod_make in the MATLAB
+Command Window.  This is the best way to compile CHOLMOD for MATLAB; it
+provides a workaround for a METIS design feature, in which METIS terminates
+your program (and thus MATLAB) if it runs out of memory.  Using cholmod_make
+also ensures your mexFunctions are compiled with -fexceptions, so that
+exceptions are handled properly (when hitting control-C in the MATLAB command
+window, for example).
+
+On the Pentium, do NOT use the Intel MKL BLAS prior to MKL Version 8.0 with
+CHOLMOD.  Older versions (prior to 8.0) have a bug in dgemm when computing
+A*B'.  The bug generates a NaN result, when the inputs are well-defined.  Use
+the Goto BLAS or the MKL v8.0 BLAS instead.  The Goto BLAS is faster and more
+reliable.  See http://www.tacc.utexas.edu/~kgoto/ or
+http://www.cs.utexas.edu/users/flame/goto/.
+Sadly, the Intel MKL BLAS 7.x is the default for MATLAB 7.0.4.  See
+http://www.mathworks.com/support/bugreports/details.html?rp=252103 for more
+details.  To workaround this problem on Linux, set environment variable
+BLAS_VERSION to libmkl_p3.so:libguide.so. On Windows, set environment variable
+BLAS_VERSION to mkl_p3.dll.  Better yet, get MATLAB 7sp3 (MATLAB 7.1) or later.
+
+Acknowledgements:  this work was supported in part by the National Science
+Foundation (NFS CCR-0203270 and DMS-9803599), and a grant from Sandia National
+Laboratories (Dept. of Energy) which supported the development of CHOLMOD's
+Partition Module.
+

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/doc/SuiteSparse/CHOLMOD.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/doc/SuiteSparse/SPQR.txt
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/doc/SuiteSparse/SPQR.txt	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/doc/SuiteSparse/SPQR.txt	(revision 2477)
@@ -0,0 +1,56 @@
+SuiteSparseQR version 1.1.0, Sept 20, 2008, Copyright (c) 2008, Timothy A. Davis
+
+SuiteSparseQR is a a multithread, multifrontal, rank-revealing sparse QR
+factorization method.
+
+QUICK START FOR MATLAB USERS (on Windows, Linux, Solaris, or the Mac OS): To
+compile and test the MATLAB mexFunctions, do this in the MATLAB command window:
+
+    cd SuiteSparse/SPQR/MATLAB
+    spqr_install
+    spqr_demo
+
+FOR MORE DETAILS: please see the User Guide in Doc/spqr_user_guide.pdf.
+
+FOR LINUX/UNIX/Mac USERS who want to use the C++ callable library:
+
+    To compile the C++ library and run a short demo, just type "make" in
+        the Unix shell.
+
+    To compile the SuiteSparseQR C++ library, in the Unix shell, do:
+
+        cd Lib ; make
+
+    To compile and test an exhaustive test, edit the Tcov/Makefile to select
+    the LAPACK and BLAS libraries, and then do (in the Unix shell):
+
+        cd Tcov ; make
+
+    Compilation options in UFconfig/UFconfig.mk, SPQR/*/Makefile,
+    or SPQR/MATLAB/spqr_make.m:
+
+        -DNPARTITION    to compile without METIS (default is to use METIS)
+
+        -DNEXPERT       to compile without the min 2-norm solution option
+                        (default is to include the Expert routines)
+
+        -DHAVE_TBB      to compile with Intel's Threading Building Blocks
+                        (default is to not use Intel TBB)
+
+        -DTIMING        to compile with timing and exact flop counts enabled
+                        (default is to not compile with timing and flop counts)
+
+--------------------------------------------------------------------------------
+
+SuiteSparseQR is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+SuiteSparseQR is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this Module; if not, write to the Free Software Foundation, Inc., 51 Franklin
+Street, Fifth Floor, Boston, MA  02110-1301, USA.

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/doc/SuiteSparse/SPQR.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/doc/SuiteSparse/SuiteSparse_config.txt
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/doc/SuiteSparse/SuiteSparse_config.txt	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/doc/SuiteSparse/SuiteSparse_config.txt	(revision 2477)
@@ -0,0 +1,48 @@
+SuiteSparse_config, 2013, Timothy A. Davis, http://www.suitesparse.com
+(formerly the UFconfig package)
+
+SuiteSparse_config contains configuration settings for all many of the software
+packages that I develop or co-author.  Note that older versions of some of
+these packages do not require SuiteSparse_config.
+
+  Package  Description
+  -------  -----------
+  AMD      approximate minimum degree ordering
+  CAMD     constrained AMD
+  COLAMD   column approximate minimum degree ordering
+  CCOLAMD  constrained approximate minimum degree ordering
+  UMFPACK  sparse LU factorization, with the BLAS
+  CXSparse int/long/real/complex version of CSparse
+  CHOLMOD  sparse Cholesky factorization, update/downdate
+  KLU      sparse LU factorization, BLAS-free
+  BTF      permutation to block triangular form
+  LDL      concise sparse LDL'
+  LPDASA   LP Dual Active Set Algorithm
+  RBio     read/write files in Rutherford/Boeing format
+  SPQR     sparse QR factorization (full name: SuiteSparseQR)
+
+SuiteSparse_config is not required by these packages:
+
+  CSparse       a Concise Sparse matrix package
+  MATLAB_Tools  toolboxes for use in MATLAB
+
+In addition, the xerbla/ directory contains Fortan and C versions of the
+BLAS/LAPACK xerbla routine, which is called when an invalid input is passed to
+the BLAS or LAPACK.  The xerbla provided here does not print any message, so
+the entire Fortran I/O library does not need to be linked into a C application.
+Most versions of the BLAS contain xerbla, but those from K. Goto do not.  Use
+this if you need too.
+
+If you edit this directory (SuiteSparse_config.mk in particular) then you
+must do "make purge ; make" in the parent directory to recompile all of
+SuiteSparse.  Otherwise, the changes will not necessarily be applied.
+
+--------------------------------------------------------------------------------
+A note on the update to SuiteSparse Version 4.0.0:  The SuiteSparse_long macro
+defines an integer that is 64-bits in size on 64-bit platforms, and 32-bits on
+32-bit platforms.  It was formerly called UF_long, but UF_long has been removed
+because of potential name conflicts.  UF_long is still available to user codes,
+but it can now be safely #undef'd in case of name conflicts in user code.
+Future codes should use SuiteSparse_long in place of UF_long.
+--------------------------------------------------------------------------------
+

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Matrix/doc/SuiteSparse/SuiteSparse_config.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/minqa/help/minqa.rdb
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/minqa/help/minqa.rdb
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/minqa/help/minqa.rdx
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/minqa/help/minqa.rdx
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/minqa/help/AnIndex
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/minqa/help/AnIndex	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/minqa/help/AnIndex	(revision 2477)
@@ -0,0 +1,3 @@
+bobyqa	bobyqa
+newuoa	newuoa
+uobyqa	uobyqa
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/minqa/help/paths.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/minqa/help/paths.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/minqa/help/aliases.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/minqa/help/aliases.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/minqa/libs/minqa.so.dSYM/Contents/Resources/DWARF/minqa.so
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/minqa/libs/minqa.so.dSYM/Contents/Resources/DWARF/minqa.so
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/minqa/libs/minqa.so.dSYM/Contents/Info.plist
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/minqa/libs/minqa.so.dSYM/Contents/Info.plist	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/minqa/libs/minqa.so.dSYM/Contents/Info.plist	(revision 2477)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+	<dict>
+		<key>CFBundleDevelopmentRegion</key>
+		<string>English</string>
+		<key>CFBundleIdentifier</key>
+		<string>com.apple.xcode.dsym.minqa.so</string>
+		<key>CFBundleInfoDictionaryVersion</key>
+		<string>6.0</string>
+		<key>CFBundlePackageType</key>
+		<string>dSYM</string>
+		<key>CFBundleSignature</key>
+		<string>????</string>
+		<key>CFBundleShortVersionString</key>
+		<string>1.0</string>
+		<key>CFBundleVersion</key>
+		<string>1</string>
+	</dict>
+</plist>
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/minqa/R/minqa
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/minqa/R/minqa	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/minqa/R/minqa	(revision 2477)
@@ -0,0 +1,27 @@
+#  File share/R/nspackloader.R
+#  Part of the R package, http://www.R-project.org
+#
+#  Copyright (C) 1995-2012 The R Core Team
+#
+#  This program is free software; you can redistribute it and/or modify
+#  it under the terms of the GNU General Public License as published by
+#  the Free Software Foundation; either version 2 of the License, or
+#  (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  A copy of the GNU General Public License is available at
+#  http://www.r-project.org/Licenses/
+
+local({
+    info <- loadingNamespaceInfo()
+    pkg <- info$pkgname
+    ns <- .getNamespace(as.name(pkg))
+    if (is.null(ns))
+        stop("cannot find namespace environment for ", pkg, domain = NA);
+    dbbase <- file.path(info$libname, pkg, "R", pkg)
+    lazyLoad(dbbase, ns, filter = function(n) n != ".__NAMESPACE__.")
+})
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/minqa/R/minqa.rdb
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/minqa/R/minqa.rdb
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/minqa/R/minqa.rdx
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/minqa/R/minqa.rdx
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/minqa/html/R.css
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/minqa/html/R.css	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/minqa/html/R.css	(revision 2477)
@@ -0,0 +1,97 @@
+body {
+    background: white;
+    color: black;
+}
+
+a:link {
+    background: white;
+    color: blue;
+}
+
+a:visited {
+    background: white;
+    color: rgb(50%, 0%, 50%);
+}
+
+h1 {
+    background: white;
+    color: rgb(55%, 55%, 55%);
+    font-family: monospace;
+    font-size: x-large;
+    text-align: center;
+}
+
+h2 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-size: large;
+    text-align: center;
+}
+
+h3 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-size: large;
+}
+
+h4 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-style: italic;
+    font-size: large;
+}
+
+h5 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+}
+
+h6 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-style: italic;
+}
+		
+img.toplogo {
+    width: 4em;
+    vertical-align: middle;
+}
+
+img.arrow {
+    width: 30px;
+    height: 30px;
+    border: 0;
+}
+
+span.acronym {
+    font-size: small;
+}
+
+span.env {
+    font-family: monospace;
+}
+
+span.file {
+    font-family: monospace;
+}
+
+span.option{
+    font-family: monospace;
+}
+
+span.pkg {
+    font-weight: bold;
+}
+
+span.samp{
+    font-family: monospace;
+}
+
+div.vignettes a:hover {
+    background: rgb(85%, 85%, 85%);
+}

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/minqa/html/R.css
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/minqa/html/00Index.html
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/minqa/html/00Index.html	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/minqa/html/00Index.html	(revision 2477)
@@ -0,0 +1,32 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title>R: Derivative-free optimization algorithms by quadratic
+approximation</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<link rel="stylesheet" type="text/css" href="R.css" />
+</head><body>
+<h1> Derivative-free optimization algorithms by quadratic
+approximation
+<img class="toplogo" src="../../../doc/html/Rlogo.svg" alt="[R logo]" />
+</h1>
+<hr/>
+<div style="text-align: center;">
+<a href="../../../doc/html/packages.html"><img class="arrow" src="../../../doc/html/left.jpg" alt="[Up]" /></a>
+<a href="../../../doc/html/index.html"><img class="arrow" src="../../../doc/html/up.jpg" alt="[Top]" /></a>
+</div><h2>Documentation for package &lsquo;minqa&rsquo; version 1.2.4</h2>
+
+<ul><li><a href="../DESCRIPTION">DESCRIPTION file</a>.</li>
+</ul>
+
+<h2>Help Pages</h2>
+
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="bobyqa.html">bobyqa</a></td>
+<td>An R interface to the bobyqa implementation of Powell</td></tr>
+<tr><td style="width: 25%;"><a href="newuoa.html">newuoa</a></td>
+<td>An R interface to the NEWUOA implementation of Powell</td></tr>
+<tr><td style="width: 25%;"><a href="uobyqa.html">uobyqa</a></td>
+<td>An R interface to the uobyqa implementation of Powell</td></tr>
+</table>
+</body></html>

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/minqa/html/00Index.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/Eigen/src/LU/arch/Inverse_SSE.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/Eigen/src/LU/arch/Inverse_SSE.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/Eigen/src/LU/arch/Inverse_SSE.h	(revision 2477)
@@ -0,0 +1,329 @@
+// This file is part of Eigen, a lightweight C++ template library
+// for linear algebra.
+//
+// Copyright (C) 2001 Intel Corporation
+// Copyright (C) 2010 Gael Guennebaud <gael.guennebaud@inria.fr>
+// Copyright (C) 2009 Benoit Jacob <jacob.benoit.1@gmail.com>
+//
+// This Source Code Form is subject to the terms of the Mozilla
+// Public License v. 2.0. If a copy of the MPL was not distributed
+// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+// The SSE code for the 4x4 float and double matrix inverse in this file
+// comes from the following Intel's library:
+// http://software.intel.com/en-us/articles/optimized-matrix-library-for-use-with-the-intel-pentiumr-4-processors-sse2-instructions/
+//
+// Here is the respective copyright and license statement:
+//
+//   Copyright (c) 2001 Intel Corporation.
+//
+// Permition is granted to use, copy, distribute and prepare derivative works
+// of this library for any purpose and without fee, provided, that the above
+// copyright notice and this statement appear in all copies.
+// Intel makes no representations about the suitability of this software for
+// any purpose, and specifically disclaims all warranties.
+// See LEGAL.TXT for all the legal information.
+
+#ifndef EIGEN_INVERSE_SSE_H
+#define EIGEN_INVERSE_SSE_H
+
+namespace Eigen { 
+
+namespace internal {
+
+template<typename MatrixType, typename ResultType>
+struct compute_inverse_size4<Architecture::SSE, float, MatrixType, ResultType>
+{
+  enum {
+    MatrixAlignment     = bool(MatrixType::Flags&AlignedBit),
+    ResultAlignment     = bool(ResultType::Flags&AlignedBit),
+    StorageOrdersMatch  = (MatrixType::Flags&RowMajorBit) == (ResultType::Flags&RowMajorBit)
+  };
+  
+  static void run(const MatrixType& matrix, ResultType& result)
+  {
+    EIGEN_ALIGN16 const unsigned int _Sign_PNNP[4] = { 0x00000000, 0x80000000, 0x80000000, 0x00000000 };
+
+    // Load the full matrix into registers
+    __m128 _L1 = matrix.template packet<MatrixAlignment>( 0);
+    __m128 _L2 = matrix.template packet<MatrixAlignment>( 4);
+    __m128 _L3 = matrix.template packet<MatrixAlignment>( 8);
+    __m128 _L4 = matrix.template packet<MatrixAlignment>(12);
+
+    // The inverse is calculated using "Divide and Conquer" technique. The
+    // original matrix is divide into four 2x2 sub-matrices. Since each
+    // register holds four matrix element, the smaller matrices are
+    // represented as a registers. Hence we get a better locality of the
+    // calculations.
+
+    __m128 A, B, C, D; // the four sub-matrices
+    if(!StorageOrdersMatch)
+    {
+      A = _mm_unpacklo_ps(_L1, _L2);
+      B = _mm_unpacklo_ps(_L3, _L4);
+      C = _mm_unpackhi_ps(_L1, _L2);
+      D = _mm_unpackhi_ps(_L3, _L4);
+    }
+    else
+    {
+      A = _mm_movelh_ps(_L1, _L2);
+      B = _mm_movehl_ps(_L2, _L1);
+      C = _mm_movelh_ps(_L3, _L4);
+      D = _mm_movehl_ps(_L4, _L3);
+    }
+
+    __m128 iA, iB, iC, iD,                 // partial inverse of the sub-matrices
+            DC, AB;
+    __m128 dA, dB, dC, dD;                 // determinant of the sub-matrices
+    __m128 det, d, d1, d2;
+    __m128 rd;                             // reciprocal of the determinant
+
+    //  AB = A# * B
+    AB = _mm_mul_ps(_mm_shuffle_ps(A,A,0x0F), B);
+    AB = _mm_sub_ps(AB,_mm_mul_ps(_mm_shuffle_ps(A,A,0xA5), _mm_shuffle_ps(B,B,0x4E)));
+    //  DC = D# * C
+    DC = _mm_mul_ps(_mm_shuffle_ps(D,D,0x0F), C);
+    DC = _mm_sub_ps(DC,_mm_mul_ps(_mm_shuffle_ps(D,D,0xA5), _mm_shuffle_ps(C,C,0x4E)));
+
+    //  dA = |A|
+    dA = _mm_mul_ps(_mm_shuffle_ps(A, A, 0x5F),A);
+    dA = _mm_sub_ss(dA, _mm_movehl_ps(dA,dA));
+    //  dB = |B|
+    dB = _mm_mul_ps(_mm_shuffle_ps(B, B, 0x5F),B);
+    dB = _mm_sub_ss(dB, _mm_movehl_ps(dB,dB));
+
+    //  dC = |C|
+    dC = _mm_mul_ps(_mm_shuffle_ps(C, C, 0x5F),C);
+    dC = _mm_sub_ss(dC, _mm_movehl_ps(dC,dC));
+    //  dD = |D|
+    dD = _mm_mul_ps(_mm_shuffle_ps(D, D, 0x5F),D);
+    dD = _mm_sub_ss(dD, _mm_movehl_ps(dD,dD));
+
+    //  d = trace(AB*DC) = trace(A#*B*D#*C)
+    d = _mm_mul_ps(_mm_shuffle_ps(DC,DC,0xD8),AB);
+
+    //  iD = C*A#*B
+    iD = _mm_mul_ps(_mm_shuffle_ps(C,C,0xA0), _mm_movelh_ps(AB,AB));
+    iD = _mm_add_ps(iD,_mm_mul_ps(_mm_shuffle_ps(C,C,0xF5), _mm_movehl_ps(AB,AB)));
+    //  iA = B*D#*C
+    iA = _mm_mul_ps(_mm_shuffle_ps(B,B,0xA0), _mm_movelh_ps(DC,DC));
+    iA = _mm_add_ps(iA,_mm_mul_ps(_mm_shuffle_ps(B,B,0xF5), _mm_movehl_ps(DC,DC)));
+
+    //  d = trace(AB*DC) = trace(A#*B*D#*C) [continue]
+    d  = _mm_add_ps(d, _mm_movehl_ps(d, d));
+    d  = _mm_add_ss(d, _mm_shuffle_ps(d, d, 1));
+    d1 = _mm_mul_ss(dA,dD);
+    d2 = _mm_mul_ss(dB,dC);
+
+    //  iD = D*|A| - C*A#*B
+    iD = _mm_sub_ps(_mm_mul_ps(D,_mm_shuffle_ps(dA,dA,0)), iD);
+
+    //  iA = A*|D| - B*D#*C;
+    iA = _mm_sub_ps(_mm_mul_ps(A,_mm_shuffle_ps(dD,dD,0)), iA);
+
+    //  det = |A|*|D| + |B|*|C| - trace(A#*B*D#*C)
+    det = _mm_sub_ss(_mm_add_ss(d1,d2),d);
+    rd  = _mm_div_ss(_mm_set_ss(1.0f), det);
+
+//     #ifdef ZERO_SINGULAR
+//         rd = _mm_and_ps(_mm_cmpneq_ss(det,_mm_setzero_ps()), rd);
+//     #endif
+
+    //  iB = D * (A#B)# = D*B#*A
+    iB = _mm_mul_ps(D, _mm_shuffle_ps(AB,AB,0x33));
+    iB = _mm_sub_ps(iB, _mm_mul_ps(_mm_shuffle_ps(D,D,0xB1), _mm_shuffle_ps(AB,AB,0x66)));
+    //  iC = A * (D#C)# = A*C#*D
+    iC = _mm_mul_ps(A, _mm_shuffle_ps(DC,DC,0x33));
+    iC = _mm_sub_ps(iC, _mm_mul_ps(_mm_shuffle_ps(A,A,0xB1), _mm_shuffle_ps(DC,DC,0x66)));
+
+    rd = _mm_shuffle_ps(rd,rd,0);
+    rd = _mm_xor_ps(rd, _mm_load_ps((float*)_Sign_PNNP));
+
+    //  iB = C*|B| - D*B#*A
+    iB = _mm_sub_ps(_mm_mul_ps(C,_mm_shuffle_ps(dB,dB,0)), iB);
+
+    //  iC = B*|C| - A*C#*D;
+    iC = _mm_sub_ps(_mm_mul_ps(B,_mm_shuffle_ps(dC,dC,0)), iC);
+
+    //  iX = iX / det
+    iA = _mm_mul_ps(rd,iA);
+    iB = _mm_mul_ps(rd,iB);
+    iC = _mm_mul_ps(rd,iC);
+    iD = _mm_mul_ps(rd,iD);
+
+    result.template writePacket<ResultAlignment>( 0, _mm_shuffle_ps(iA,iB,0x77));
+    result.template writePacket<ResultAlignment>( 4, _mm_shuffle_ps(iA,iB,0x22));
+    result.template writePacket<ResultAlignment>( 8, _mm_shuffle_ps(iC,iD,0x77));
+    result.template writePacket<ResultAlignment>(12, _mm_shuffle_ps(iC,iD,0x22));
+  }
+
+};
+
+template<typename MatrixType, typename ResultType>
+struct compute_inverse_size4<Architecture::SSE, double, MatrixType, ResultType>
+{
+  enum {
+    MatrixAlignment = bool(MatrixType::Flags&AlignedBit),
+    ResultAlignment = bool(ResultType::Flags&AlignedBit),
+    StorageOrdersMatch  = (MatrixType::Flags&RowMajorBit) == (ResultType::Flags&RowMajorBit)
+  };
+  static void run(const MatrixType& matrix, ResultType& result)
+  {
+    const __m128d _Sign_NP = _mm_castsi128_pd(_mm_set_epi32(0x0,0x0,0x80000000,0x0));
+    const __m128d _Sign_PN = _mm_castsi128_pd(_mm_set_epi32(0x80000000,0x0,0x0,0x0));
+
+    // The inverse is calculated using "Divide and Conquer" technique. The
+    // original matrix is divide into four 2x2 sub-matrices. Since each
+    // register of the matrix holds two element, the smaller matrices are
+    // consisted of two registers. Hence we get a better locality of the
+    // calculations.
+
+    // the four sub-matrices
+    __m128d A1, A2, B1, B2, C1, C2, D1, D2;
+    
+    if(StorageOrdersMatch)
+    {
+      A1 = matrix.template packet<MatrixAlignment>( 0); B1 = matrix.template packet<MatrixAlignment>( 2);
+      A2 = matrix.template packet<MatrixAlignment>( 4); B2 = matrix.template packet<MatrixAlignment>( 6);
+      C1 = matrix.template packet<MatrixAlignment>( 8); D1 = matrix.template packet<MatrixAlignment>(10);
+      C2 = matrix.template packet<MatrixAlignment>(12); D2 = matrix.template packet<MatrixAlignment>(14);
+    }
+    else
+    {
+      __m128d tmp;
+      A1 = matrix.template packet<MatrixAlignment>( 0); C1 = matrix.template packet<MatrixAlignment>( 2);
+      A2 = matrix.template packet<MatrixAlignment>( 4); C2 = matrix.template packet<MatrixAlignment>( 6);
+      tmp = A1;
+      A1 = _mm_unpacklo_pd(A1,A2);
+      A2 = _mm_unpackhi_pd(tmp,A2);
+      tmp = C1;
+      C1 = _mm_unpacklo_pd(C1,C2);
+      C2 = _mm_unpackhi_pd(tmp,C2);
+      
+      B1 = matrix.template packet<MatrixAlignment>( 8); D1 = matrix.template packet<MatrixAlignment>(10);
+      B2 = matrix.template packet<MatrixAlignment>(12); D2 = matrix.template packet<MatrixAlignment>(14);
+      tmp = B1;
+      B1 = _mm_unpacklo_pd(B1,B2);
+      B2 = _mm_unpackhi_pd(tmp,B2);
+      tmp = D1;
+      D1 = _mm_unpacklo_pd(D1,D2);
+      D2 = _mm_unpackhi_pd(tmp,D2);
+    }
+    
+    __m128d iA1, iA2, iB1, iB2, iC1, iC2, iD1, iD2,     // partial invese of the sub-matrices
+            DC1, DC2, AB1, AB2;
+    __m128d dA, dB, dC, dD;     // determinant of the sub-matrices
+    __m128d det, d1, d2, rd;
+
+    //  dA = |A|
+    dA = _mm_shuffle_pd(A2, A2, 1);
+    dA = _mm_mul_pd(A1, dA);
+    dA = _mm_sub_sd(dA, _mm_shuffle_pd(dA,dA,3));
+    //  dB = |B|
+    dB = _mm_shuffle_pd(B2, B2, 1);
+    dB = _mm_mul_pd(B1, dB);
+    dB = _mm_sub_sd(dB, _mm_shuffle_pd(dB,dB,3));
+
+    //  AB = A# * B
+    AB1 = _mm_mul_pd(B1, _mm_shuffle_pd(A2,A2,3));
+    AB2 = _mm_mul_pd(B2, _mm_shuffle_pd(A1,A1,0));
+    AB1 = _mm_sub_pd(AB1, _mm_mul_pd(B2, _mm_shuffle_pd(A1,A1,3)));
+    AB2 = _mm_sub_pd(AB2, _mm_mul_pd(B1, _mm_shuffle_pd(A2,A2,0)));
+
+    //  dC = |C|
+    dC = _mm_shuffle_pd(C2, C2, 1);
+    dC = _mm_mul_pd(C1, dC);
+    dC = _mm_sub_sd(dC, _mm_shuffle_pd(dC,dC,3));
+    //  dD = |D|
+    dD = _mm_shuffle_pd(D2, D2, 1);
+    dD = _mm_mul_pd(D1, dD);
+    dD = _mm_sub_sd(dD, _mm_shuffle_pd(dD,dD,3));
+
+    //  DC = D# * C
+    DC1 = _mm_mul_pd(C1, _mm_shuffle_pd(D2,D2,3));
+    DC2 = _mm_mul_pd(C2, _mm_shuffle_pd(D1,D1,0));
+    DC1 = _mm_sub_pd(DC1, _mm_mul_pd(C2, _mm_shuffle_pd(D1,D1,3)));
+    DC2 = _mm_sub_pd(DC2, _mm_mul_pd(C1, _mm_shuffle_pd(D2,D2,0)));
+
+    //  rd = trace(AB*DC) = trace(A#*B*D#*C)
+    d1 = _mm_mul_pd(AB1, _mm_shuffle_pd(DC1, DC2, 0));
+    d2 = _mm_mul_pd(AB2, _mm_shuffle_pd(DC1, DC2, 3));
+    rd = _mm_add_pd(d1, d2);
+    rd = _mm_add_sd(rd, _mm_shuffle_pd(rd, rd,3));
+
+    //  iD = C*A#*B
+    iD1 = _mm_mul_pd(AB1, _mm_shuffle_pd(C1,C1,0));
+    iD2 = _mm_mul_pd(AB1, _mm_shuffle_pd(C2,C2,0));
+    iD1 = _mm_add_pd(iD1, _mm_mul_pd(AB2, _mm_shuffle_pd(C1,C1,3)));
+    iD2 = _mm_add_pd(iD2, _mm_mul_pd(AB2, _mm_shuffle_pd(C2,C2,3)));
+
+    //  iA = B*D#*C
+    iA1 = _mm_mul_pd(DC1, _mm_shuffle_pd(B1,B1,0));
+    iA2 = _mm_mul_pd(DC1, _mm_shuffle_pd(B2,B2,0));
+    iA1 = _mm_add_pd(iA1, _mm_mul_pd(DC2, _mm_shuffle_pd(B1,B1,3)));
+    iA2 = _mm_add_pd(iA2, _mm_mul_pd(DC2, _mm_shuffle_pd(B2,B2,3)));
+
+    //  iD = D*|A| - C*A#*B
+    dA = _mm_shuffle_pd(dA,dA,0);
+    iD1 = _mm_sub_pd(_mm_mul_pd(D1, dA), iD1);
+    iD2 = _mm_sub_pd(_mm_mul_pd(D2, dA), iD2);
+
+    //  iA = A*|D| - B*D#*C;
+    dD = _mm_shuffle_pd(dD,dD,0);
+    iA1 = _mm_sub_pd(_mm_mul_pd(A1, dD), iA1);
+    iA2 = _mm_sub_pd(_mm_mul_pd(A2, dD), iA2);
+
+    d1 = _mm_mul_sd(dA, dD);
+    d2 = _mm_mul_sd(dB, dC);
+
+    //  iB = D * (A#B)# = D*B#*A
+    iB1 = _mm_mul_pd(D1, _mm_shuffle_pd(AB2,AB1,1));
+    iB2 = _mm_mul_pd(D2, _mm_shuffle_pd(AB2,AB1,1));
+    iB1 = _mm_sub_pd(iB1, _mm_mul_pd(_mm_shuffle_pd(D1,D1,1), _mm_shuffle_pd(AB2,AB1,2)));
+    iB2 = _mm_sub_pd(iB2, _mm_mul_pd(_mm_shuffle_pd(D2,D2,1), _mm_shuffle_pd(AB2,AB1,2)));
+
+    //  det = |A|*|D| + |B|*|C| - trace(A#*B*D#*C)
+    det = _mm_add_sd(d1, d2);
+    det = _mm_sub_sd(det, rd);
+
+    //  iC = A * (D#C)# = A*C#*D
+    iC1 = _mm_mul_pd(A1, _mm_shuffle_pd(DC2,DC1,1));
+    iC2 = _mm_mul_pd(A2, _mm_shuffle_pd(DC2,DC1,1));
+    iC1 = _mm_sub_pd(iC1, _mm_mul_pd(_mm_shuffle_pd(A1,A1,1), _mm_shuffle_pd(DC2,DC1,2)));
+    iC2 = _mm_sub_pd(iC2, _mm_mul_pd(_mm_shuffle_pd(A2,A2,1), _mm_shuffle_pd(DC2,DC1,2)));
+
+    rd = _mm_div_sd(_mm_set_sd(1.0), det);
+//     #ifdef ZERO_SINGULAR
+//         rd = _mm_and_pd(_mm_cmpneq_sd(det,_mm_setzero_pd()), rd);
+//     #endif
+    rd = _mm_shuffle_pd(rd,rd,0);
+
+    //  iB = C*|B| - D*B#*A
+    dB = _mm_shuffle_pd(dB,dB,0);
+    iB1 = _mm_sub_pd(_mm_mul_pd(C1, dB), iB1);
+    iB2 = _mm_sub_pd(_mm_mul_pd(C2, dB), iB2);
+
+    d1 = _mm_xor_pd(rd, _Sign_PN);
+    d2 = _mm_xor_pd(rd, _Sign_NP);
+
+    //  iC = B*|C| - A*C#*D;
+    dC = _mm_shuffle_pd(dC,dC,0);
+    iC1 = _mm_sub_pd(_mm_mul_pd(B1, dC), iC1);
+    iC2 = _mm_sub_pd(_mm_mul_pd(B2, dC), iC2);
+
+    result.template writePacket<ResultAlignment>( 0, _mm_mul_pd(_mm_shuffle_pd(iA2, iA1, 3), d1));     // iA# / det
+    result.template writePacket<ResultAlignment>( 4, _mm_mul_pd(_mm_shuffle_pd(iA2, iA1, 0), d2));
+    result.template writePacket<ResultAlignment>( 2, _mm_mul_pd(_mm_shuffle_pd(iB2, iB1, 3), d1));     // iB# / det
+    result.template writePacket<ResultAlignment>( 6, _mm_mul_pd(_mm_shuffle_pd(iB2, iB1, 0), d2));
+    result.template writePacket<ResultAlignment>( 8, _mm_mul_pd(_mm_shuffle_pd(iC2, iC1, 3), d1));     // iC# / det
+    result.template writePacket<ResultAlignment>(12, _mm_mul_pd(_mm_shuffle_pd(iC2, iC1, 0), d2));
+    result.template writePacket<ResultAlignment>(10, _mm_mul_pd(_mm_shuffle_pd(iD2, iD1, 3), d1));     // iD# / det
+    result.template writePacket<ResultAlignment>(14, _mm_mul_pd(_mm_shuffle_pd(iD2, iD1, 0), d2));
+  }
+};
+
+} // end namespace internal
+
+} // end namespace Eigen
+
+#endif // EIGEN_INVERSE_SSE_H
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/Splines
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/Splines	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/Splines	(revision 2477)
@@ -0,0 +1,31 @@
+// This file is part of Eigen, a lightweight C++ template library
+// for linear algebra.
+//
+// Copyright (C) 20010-2011 Hauke Heibel <hauke.heibel@gmail.com>
+//
+// This Source Code Form is subject to the terms of the Mozilla
+// Public License v. 2.0. If a copy of the MPL was not distributed
+// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#ifndef EIGEN_SPLINES_MODULE_H
+#define EIGEN_SPLINES_MODULE_H
+
+namespace Eigen 
+{
+/**
+  * \defgroup Splines_Module Spline and spline fitting module
+  *
+  * This module provides a simple multi-dimensional spline class while
+  * offering most basic functionality to fit a spline to point sets.
+  *
+  * \code
+  * #include <unsupported/Eigen/Splines>
+  * \endcode
+  */
+}
+
+#include "src/Splines/SplineFwd.h"
+#include "src/Splines/Spline.h"
+#include "src/Splines/SplineFitting.h"
+
+#endif // EIGEN_SPLINES_MODULE_H
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/MPRealSupport
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/MPRealSupport	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/MPRealSupport	(revision 2477)
@@ -0,0 +1,203 @@
+// This file is part of a joint effort between Eigen, a lightweight C++ template library
+// for linear algebra, and MPFR C++, a C++ interface to MPFR library (http://www.holoborodko.com/pavel/)
+//
+// Copyright (C) 2010-2012 Pavel Holoborodko <pavel@holoborodko.com>
+// Copyright (C) 2010 Konstantin Holoborodko <konstantin@holoborodko.com>
+// Copyright (C) 2010 Gael Guennebaud <gael.guennebaud@inria.fr>
+//
+// This Source Code Form is subject to the terms of the Mozilla
+// Public License v. 2.0. If a copy of the MPL was not distributed
+// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#ifndef EIGEN_MPREALSUPPORT_MODULE_H
+#define EIGEN_MPREALSUPPORT_MODULE_H
+
+#include <Eigen/Core>
+#include <mpreal.h>
+
+namespace Eigen {
+  
+/**
+  * \defgroup MPRealSupport_Module MPFRC++ Support module
+  * \code
+  * #include <Eigen/MPRealSupport>
+  * \endcode
+  *
+  * This module provides support for multi precision floating point numbers
+  * via the <a href="http://www.holoborodko.com/pavel/mpfr">MPFR C++</a>
+  * library which itself is built upon <a href="http://www.mpfr.org/">MPFR</a>/<a href="http://gmplib.org/">GMP</a>.
+  *
+  * You can find a copy of MPFR C++ that is known to be compatible in the unsupported/test/mpreal folder.
+  *
+  * Here is an example:
+  *
+\code
+#include <iostream>
+#include <Eigen/MPRealSupport>
+#include <Eigen/LU>
+using namespace mpfr;
+using namespace Eigen;
+int main()
+{
+  // set precision to 256 bits (double has only 53 bits)
+  mpreal::set_default_prec(256);
+  // Declare matrix and vector types with multi-precision scalar type
+  typedef Matrix<mpreal,Dynamic,Dynamic>  MatrixXmp;
+  typedef Matrix<mpreal,Dynamic,1>        VectorXmp;
+
+  MatrixXmp A = MatrixXmp::Random(100,100);
+  VectorXmp b = VectorXmp::Random(100);
+
+  // Solve Ax=b using LU
+  VectorXmp x = A.lu().solve(b);
+  std::cout << "relative error: " << (A*x - b).norm() / b.norm() << std::endl;
+  return 0;
+}
+\endcode
+  *
+  */
+	
+  template<> struct NumTraits<mpfr::mpreal>
+    : GenericNumTraits<mpfr::mpreal>
+  {
+    enum {
+      IsInteger = 0,
+      IsSigned = 1,
+      IsComplex = 0,
+      RequireInitialization = 1,
+      ReadCost = 10,
+      AddCost = 10,
+      MulCost = 40
+    };
+
+    typedef mpfr::mpreal Real;
+    typedef mpfr::mpreal NonInteger;
+    
+    inline static Real highest   (long Precision = mpfr::mpreal::get_default_prec())  { return  mpfr::maxval(Precision); }
+    inline static Real lowest    (long Precision = mpfr::mpreal::get_default_prec())  { return -mpfr::maxval(Precision); }
+
+    // Constants
+    inline static Real Pi       (long Precision = mpfr::mpreal::get_default_prec())     {    return mpfr::const_pi(Precision);        }
+    inline static Real Euler    (long Precision = mpfr::mpreal::get_default_prec())     {    return mpfr::const_euler(Precision);     }
+    inline static Real Log2     (long Precision = mpfr::mpreal::get_default_prec())     {    return mpfr::const_log2(Precision);      }
+    inline static Real Catalan  (long Precision = mpfr::mpreal::get_default_prec())     {    return mpfr::const_catalan(Precision);   }
+
+    inline static Real epsilon  (long Precision = mpfr::mpreal::get_default_prec())     {    return mpfr::machine_epsilon(Precision); }
+    inline static Real epsilon  (const Real& x)                                         {    return mpfr::machine_epsilon(x); }
+
+    inline static Real dummy_precision()   
+    { 
+        unsigned int weak_prec = ((mpfr::mpreal::get_default_prec()-1) * 90) / 100;
+        return mpfr::machine_epsilon(weak_prec);
+    }
+  };
+
+  namespace internal {
+
+  template<> inline mpfr::mpreal random<mpfr::mpreal>()
+  {
+    return mpfr::random();
+  }
+
+  template<> inline mpfr::mpreal random<mpfr::mpreal>(const mpfr::mpreal& a, const mpfr::mpreal& b)
+  {
+    return a + (b-a) * random<mpfr::mpreal>();
+  }
+
+  inline bool isMuchSmallerThan(const mpfr::mpreal& a, const mpfr::mpreal& b, const mpfr::mpreal& eps)
+  {
+    return mpfr::abs(a) <= mpfr::abs(b) * eps;
+  }
+
+  inline bool isApprox(const mpfr::mpreal& a, const mpfr::mpreal& b, const mpfr::mpreal& eps)
+  {
+    return mpfr::isEqualFuzzy(a,b,eps);
+  }
+
+  inline bool isApproxOrLessThan(const mpfr::mpreal& a, const mpfr::mpreal& b, const mpfr::mpreal& eps)
+  {
+    return a <= b || mpfr::isEqualFuzzy(a,b,eps);
+  }
+
+  template<> inline long double cast<mpfr::mpreal,long double>(const mpfr::mpreal& x)
+  { return x.toLDouble(); }
+
+  template<> inline double cast<mpfr::mpreal,double>(const mpfr::mpreal& x)
+  { return x.toDouble(); }
+
+  template<> inline long cast<mpfr::mpreal,long>(const mpfr::mpreal& x)
+  { return x.toLong(); }
+
+  template<> inline int cast<mpfr::mpreal,int>(const mpfr::mpreal& x)
+  { return int(x.toLong()); }
+
+  // Specialize GEBP kernel and traits for mpreal (no need for peeling, nor complicated stuff)
+  // This also permits to directly call mpfr's routines and avoid many temporaries produced by mpreal
+    template<>
+    class gebp_traits<mpfr::mpreal, mpfr::mpreal, false, false>
+    {
+    public:
+      typedef mpfr::mpreal ResScalar;
+      enum {
+        nr = 2, // must be 2 for proper packing...
+        mr = 1,
+        WorkSpaceFactor = nr,
+        LhsProgress = 1,
+        RhsProgress = 1
+      };
+    };
+
+    template<typename Index, int mr, int nr, bool ConjugateLhs, bool ConjugateRhs>
+    struct gebp_kernel<mpfr::mpreal,mpfr::mpreal,Index,mr,nr,ConjugateLhs,ConjugateRhs>
+    {
+      typedef mpfr::mpreal mpreal;
+
+      EIGEN_DONT_INLINE
+      void operator()(mpreal* res, Index resStride, const mpreal* blockA, const mpreal* blockB, Index rows, Index depth, Index cols, mpreal alpha,
+                      Index strideA=-1, Index strideB=-1, Index offsetA=0, Index offsetB=0, mpreal* /*unpackedB*/ = 0)
+      {
+        mpreal acc1, acc2, tmp;
+        
+        if(strideA==-1) strideA = depth;
+        if(strideB==-1) strideB = depth;
+
+        for(Index j=0; j<cols; j+=nr)
+        {
+          Index actual_nr = (std::min<Index>)(nr,cols-j);
+          mpreal *C1 = res + j*resStride;
+          mpreal *C2 = res + (j+1)*resStride;
+          for(Index i=0; i<rows; i++)
+          {
+            mpreal *B = const_cast<mpreal*>(blockB) + j*strideB + offsetB*actual_nr;
+            mpreal *A = const_cast<mpreal*>(blockA) + i*strideA + offsetA;
+            acc1 = 0;
+            acc2 = 0;
+            for(Index k=0; k<depth; k++)
+            {
+              mpfr_mul(tmp.mpfr_ptr(), A[k].mpfr_ptr(), B[0].mpfr_ptr(), mpreal::get_default_rnd());
+              mpfr_add(acc1.mpfr_ptr(), acc1.mpfr_ptr(), tmp.mpfr_ptr(),  mpreal::get_default_rnd());
+              
+              if(actual_nr==2) {
+                mpfr_mul(tmp.mpfr_ptr(), A[k].mpfr_ptr(), B[1].mpfr_ptr(), mpreal::get_default_rnd());
+                mpfr_add(acc2.mpfr_ptr(), acc2.mpfr_ptr(), tmp.mpfr_ptr(),  mpreal::get_default_rnd());
+              }
+              
+              B+=actual_nr;
+            }
+            
+            mpfr_mul(acc1.mpfr_ptr(), acc1.mpfr_ptr(), alpha.mpfr_ptr(), mpreal::get_default_rnd());
+            mpfr_add(C1[i].mpfr_ptr(), C1[i].mpfr_ptr(), acc1.mpfr_ptr(),  mpreal::get_default_rnd());
+            
+            if(actual_nr==2) {
+              mpfr_mul(acc2.mpfr_ptr(), acc2.mpfr_ptr(), alpha.mpfr_ptr(), mpreal::get_default_rnd());
+              mpfr_add(C2[i].mpfr_ptr(), C2[i].mpfr_ptr(), acc2.mpfr_ptr(),  mpreal::get_default_rnd());
+            }
+          }
+        }
+      }
+    };
+
+  } // end namespace internal
+}
+
+#endif // EIGEN_MPREALSUPPORT_MODULE_H
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/Skyline
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/Skyline	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/Skyline	(revision 2477)
@@ -0,0 +1,39 @@
+// This file is part of Eigen, a lightweight C++ template library
+// for linear algebra.
+//
+//
+// This Source Code Form is subject to the terms of the Mozilla
+// Public License v. 2.0. If a copy of the MPL was not distributed
+// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#ifndef EIGEN_SKYLINE_MODULE_H
+#define EIGEN_SKYLINE_MODULE_H
+
+
+#include "Eigen/Core"
+
+#include "Eigen/src/Core/util/DisableStupidWarnings.h"
+
+#include <map>
+#include <cstdlib>
+#include <cstring>
+#include <algorithm>
+
+/**
+ *  \defgroup Skyline_Module Skyline module
+ *
+ *
+ *
+ *
+ */
+
+#include "src/Skyline/SkylineUtil.h"
+#include "src/Skyline/SkylineMatrixBase.h"
+#include "src/Skyline/SkylineStorage.h"
+#include "src/Skyline/SkylineMatrix.h"
+#include "src/Skyline/SkylineInplaceLU.h"
+#include "src/Skyline/SkylineProduct.h"
+
+#include "Eigen/src/Core/util/ReenableStupidWarnings.h"
+
+#endif // EIGEN_SKYLINE_MODULE_H
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/BVH
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/BVH	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/BVH	(revision 2477)
@@ -0,0 +1,95 @@
+// This file is part of Eigen, a lightweight C++ template library
+// for linear algebra.
+//
+// Copyright (C) 2009 Ilya Baran <ibaran@mit.edu>
+//
+// This Source Code Form is subject to the terms of the Mozilla
+// Public License v. 2.0. If a copy of the MPL was not distributed
+// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#ifndef EIGEN_BVH_MODULE_H
+#define EIGEN_BVH_MODULE_H
+
+#include <Eigen/Core>
+#include <Eigen/Geometry>
+#include <Eigen/StdVector>
+#include <algorithm>
+#include <queue>
+
+namespace Eigen {
+
+/**
+  * \defgroup BVH_Module BVH module
+  * \brief This module provides generic bounding volume hierarchy algorithms
+  * and reference tree implementations.
+  *
+  *
+  * \code
+  * #include <unsupported/Eigen/BVH>
+  * \endcode
+  *
+  * A bounding volume hierarchy (BVH) can accelerate many geometric queries.  This module provides a generic implementation
+  * of the two basic algorithms over a BVH: intersection of a query object against all objects in the hierarchy and minimization
+  * of a function over the objects in the hierarchy.  It also provides intersection and minimization over a cartesian product of
+  * two BVH's.  A BVH accelerates intersection by using the fact that if a query object does not intersect a volume, then it cannot
+  * intersect any object contained in that volume.  Similarly, a BVH accelerates minimization because the minimum of a function
+  * over a volume is no greater than the minimum of a function over any object contained in it.
+  *
+  * Some sample queries that can be written in terms of intersection are:
+  *   - Determine all points where a ray intersects a triangle mesh
+  *   - Given a set of points, determine which are contained in a query sphere
+  *   - Given a set of spheres, determine which contain the query point
+  *   - Given a set of disks, determine if any is completely contained in a query rectangle (represent each 2D disk as a point \f$(x,y,r)\f$
+  *     in 3D and represent the rectangle as a pyramid based on the original rectangle and shrinking in the \f$r\f$ direction)
+  *   - Given a set of points, count how many pairs are \f$d\pm\epsilon\f$ apart (done by looking at the cartesian product of the set
+  *     of points with itself)
+  *
+  * Some sample queries that can be written in terms of function minimization over a set of objects are:
+  *   - Find the intersection between a ray and a triangle mesh closest to the ray origin (function is infinite off the ray)
+  *   - Given a polyline and a query point, determine the closest point on the polyline to the query
+  *   - Find the diameter of a point cloud (done by looking at the cartesian product and using negative distance as the function)
+  *   - Determine how far two meshes are from colliding (this is also a cartesian product query)
+  *
+  * This implementation decouples the basic algorithms both from the type of hierarchy (and the types of the bounding volumes) and
+  * from the particulars of the query.  To enable abstraction from the BVH, the BVH is required to implement a generic mechanism
+  * for traversal.  To abstract from the query, the query is responsible for keeping track of results.
+  *
+  * To be used in the algorithms, a hierarchy must implement the following traversal mechanism (see KdBVH for a sample implementation): \code
+      typedef Volume  //the type of bounding volume
+      typedef Object  //the type of object in the hierarchy
+      typedef Index   //a reference to a node in the hierarchy--typically an int or a pointer
+      typedef VolumeIterator //an iterator type over node children--returns Index
+      typedef ObjectIterator //an iterator over object (leaf) children--returns const Object &
+      Index getRootIndex() const //returns the index of the hierarchy root
+      const Volume &getVolume(Index index) const //returns the bounding volume of the node at given index
+      void getChildren(Index index, VolumeIterator &outVBegin, VolumeIterator &outVEnd,
+                      ObjectIterator &outOBegin, ObjectIterator &outOEnd) const
+      //getChildren takes a node index and makes [outVBegin, outVEnd) range over its node children
+      //and [outOBegin, outOEnd) range over its object children
+    \endcode
+  *
+  * To use the hierarchy, call BVIntersect or BVMinimize, passing it a BVH (or two, for cartesian product) and a minimizer or intersector.
+  * For an intersection query on a single BVH, the intersector encapsulates the query and must provide two functions:
+  * \code
+      bool intersectVolume(const Volume &volume) //returns true if the query intersects the volume
+      bool intersectObject(const Object &object) //returns true if the intersection search should terminate immediately
+    \endcode
+  * The guarantee that BVIntersect provides is that intersectObject will be called on every object whose bounding volume
+  * intersects the query (but possibly on other objects too) unless the search is terminated prematurely.  It is the
+  * responsibility of the intersectObject function to keep track of the results in whatever manner is appropriate.
+  * The cartesian product intersection and the BVMinimize queries are similar--see their individual documentation.
+  *
+  * The following is a simple but complete example for how to use the BVH to accelerate the search for a closest red-blue point pair:
+  * \include BVH_Example.cpp
+  * Output: \verbinclude BVH_Example.out
+  */
+}
+
+//@{
+
+#include "src/BVH/BVAlgorithms.h"
+#include "src/BVH/KdBVH.h"
+
+//@}
+
+#endif // EIGEN_BVH_MODULE_H
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/FFT
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/FFT	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/FFT	(revision 2477)
@@ -0,0 +1,418 @@
+// This file is part of Eigen, a lightweight C++ template library
+// for linear algebra. 
+//
+// Copyright (C) 2009 Mark Borgerding mark a borgerding net
+//
+// This Source Code Form is subject to the terms of the Mozilla
+// Public License v. 2.0. If a copy of the MPL was not distributed
+// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#ifndef EIGEN_FFT_H
+#define EIGEN_FFT_H
+
+#include <complex>
+#include <vector>
+#include <map>
+#include <Eigen/Core>
+
+
+/**
+  * \defgroup FFT_Module Fast Fourier Transform module
+  *
+  * \code
+  * #include <unsupported/Eigen/FFT>
+  * \endcode
+  *
+  * This module provides Fast Fourier transformation, with a configurable backend
+  * implementation.
+  *
+  * The default implementation is based on kissfft. It is a small, free, and
+  * reasonably efficient default.
+  *
+  * There are currently two implementation backend:
+  *
+  * - fftw (http://www.fftw.org) : faster, GPL -- incompatible with Eigen in LGPL form, bigger code size.
+  * - MKL (http://en.wikipedia.org/wiki/Math_Kernel_Library) : fastest, commercial -- may be incompatible with Eigen in GPL form.
+  *
+  * \section FFTDesign Design
+  *
+  * The following design decisions were made concerning scaling and
+  * half-spectrum for real FFT.
+  *
+  * The intent is to facilitate generic programming and ease migrating code
+  * from  Matlab/octave.
+  * We think the default behavior of Eigen/FFT should favor correctness and
+  * generality over speed. Of course, the caller should be able to "opt-out" from this
+  * behavior and get the speed increase if they want it.
+  *
+  * 1) %Scaling:
+  * Other libraries (FFTW,IMKL,KISSFFT)  do not perform scaling, so there
+  * is a constant gain incurred after the forward&inverse transforms , so 
+  * IFFT(FFT(x)) = Kx;  this is done to avoid a vector-by-value multiply.  
+  * The downside is that algorithms that worked correctly in Matlab/octave 
+  * don't behave the same way once implemented in C++.
+  *
+  * How Eigen/FFT differs: invertible scaling is performed so IFFT( FFT(x) ) = x. 
+  *
+  * 2) Real FFT half-spectrum
+  * Other libraries use only half the frequency spectrum (plus one extra 
+  * sample for the Nyquist bin) for a real FFT, the other half is the 
+  * conjugate-symmetric of the first half.  This saves them a copy and some 
+  * memory.  The downside is the caller needs to have special logic for the 
+  * number of bins in complex vs real.
+  *
+  * How Eigen/FFT differs: The full spectrum is returned from the forward 
+  * transform.  This facilitates generic template programming by obviating 
+  * separate specializations for real vs complex.  On the inverse
+  * transform, only half the spectrum is actually used if the output type is real.
+  */
+ 
+
+#ifdef EIGEN_FFTW_DEFAULT
+// FFTW: faster, GPL -- incompatible with Eigen in LGPL form, bigger code size
+#  include <fftw3.h>
+#  include "src/FFT/ei_fftw_impl.h"
+   namespace Eigen {
+     //template <typename T> typedef struct internal::fftw_impl  default_fft_impl; this does not work
+     template <typename T> struct default_fft_impl : public internal::fftw_impl<T> {};
+   }
+#elif defined EIGEN_MKL_DEFAULT
+// TODO 
+// intel Math Kernel Library: fastest, commercial -- may be incompatible with Eigen in GPL form
+#  include "src/FFT/ei_imklfft_impl.h"
+   namespace Eigen {
+     template <typename T> struct default_fft_impl : public internal::imklfft_impl {};
+   }
+#else
+// internal::kissfft_impl:  small, free, reasonably efficient default, derived from kissfft
+//
+# include "src/FFT/ei_kissfft_impl.h"
+  namespace Eigen {
+     template <typename T> 
+       struct default_fft_impl : public internal::kissfft_impl<T> {};
+  }
+#endif
+
+namespace Eigen {
+
+ 
+// 
+template<typename T_SrcMat,typename T_FftIfc> struct fft_fwd_proxy;
+template<typename T_SrcMat,typename T_FftIfc> struct fft_inv_proxy;
+
+namespace internal {
+template<typename T_SrcMat,typename T_FftIfc>
+struct traits< fft_fwd_proxy<T_SrcMat,T_FftIfc> >
+{
+  typedef typename T_SrcMat::PlainObject ReturnType;
+};
+template<typename T_SrcMat,typename T_FftIfc>
+struct traits< fft_inv_proxy<T_SrcMat,T_FftIfc> >
+{
+  typedef typename T_SrcMat::PlainObject ReturnType;
+};
+}
+
+template<typename T_SrcMat,typename T_FftIfc> 
+struct fft_fwd_proxy
+ : public ReturnByValue<fft_fwd_proxy<T_SrcMat,T_FftIfc> >
+{
+  typedef DenseIndex Index;
+
+  fft_fwd_proxy(const T_SrcMat& src,T_FftIfc & fft, Index nfft) : m_src(src),m_ifc(fft), m_nfft(nfft) {}
+
+  template<typename T_DestMat> void evalTo(T_DestMat& dst) const;
+
+  Index rows() const { return m_src.rows(); }
+  Index cols() const { return m_src.cols(); }
+protected:
+  const T_SrcMat & m_src;
+  T_FftIfc & m_ifc;
+  Index m_nfft;
+private:
+  fft_fwd_proxy& operator=(const fft_fwd_proxy&);
+};
+
+template<typename T_SrcMat,typename T_FftIfc> 
+struct fft_inv_proxy
+ : public ReturnByValue<fft_inv_proxy<T_SrcMat,T_FftIfc> >
+{
+  typedef DenseIndex Index;
+
+  fft_inv_proxy(const T_SrcMat& src,T_FftIfc & fft, Index nfft) : m_src(src),m_ifc(fft), m_nfft(nfft) {}
+
+  template<typename T_DestMat> void evalTo(T_DestMat& dst) const;
+
+  Index rows() const { return m_src.rows(); }
+  Index cols() const { return m_src.cols(); }
+protected:
+  const T_SrcMat & m_src;
+  T_FftIfc & m_ifc;
+  Index m_nfft;
+private:
+  fft_inv_proxy& operator=(const fft_inv_proxy&);
+};
+
+
+template <typename T_Scalar,
+         typename T_Impl=default_fft_impl<T_Scalar> >
+class FFT
+{
+  public:
+    typedef T_Impl impl_type;
+    typedef DenseIndex Index;
+    typedef typename impl_type::Scalar Scalar;
+    typedef typename impl_type::Complex Complex;
+
+    enum Flag {
+      Default=0, // goof proof
+      Unscaled=1,
+      HalfSpectrum=2,
+      // SomeOtherSpeedOptimization=4
+      Speedy=32767
+    };
+
+    FFT( const impl_type & impl=impl_type() , Flag flags=Default ) :m_impl(impl),m_flag(flags) { }
+
+    inline
+    bool HasFlag(Flag f) const { return (m_flag & (int)f) == f;}
+
+    inline
+    void SetFlag(Flag f) { m_flag |= (int)f;}
+
+    inline
+    void ClearFlag(Flag f) { m_flag &= (~(int)f);}
+
+    inline
+    void fwd( Complex * dst, const Scalar * src, Index nfft)
+    {
+        m_impl.fwd(dst,src,static_cast<int>(nfft));
+        if ( HasFlag(HalfSpectrum) == false)
+          ReflectSpectrum(dst,nfft);
+    }
+
+    inline
+    void fwd( Complex * dst, const Complex * src, Index nfft)
+    {
+        m_impl.fwd(dst,src,static_cast<int>(nfft));
+    }
+
+    /*
+    inline 
+    void fwd2(Complex * dst, const Complex * src, int n0,int n1)
+    {
+      m_impl.fwd2(dst,src,n0,n1);
+    }
+    */
+
+    template <typename _Input>
+    inline
+    void fwd( std::vector<Complex> & dst, const std::vector<_Input> & src) 
+    {
+      if ( NumTraits<_Input>::IsComplex == 0 && HasFlag(HalfSpectrum) )
+        dst.resize( (src.size()>>1)+1); // half the bins + Nyquist bin
+      else
+        dst.resize(src.size());
+      fwd(&dst[0],&src[0],src.size());
+    }
+
+    template<typename InputDerived, typename ComplexDerived>
+    inline
+    void fwd( MatrixBase<ComplexDerived> & dst, const MatrixBase<InputDerived> & src, Index nfft=-1)
+    {
+      typedef typename ComplexDerived::Scalar dst_type;
+      typedef typename InputDerived::Scalar src_type;
+      EIGEN_STATIC_ASSERT_VECTOR_ONLY(InputDerived)
+      EIGEN_STATIC_ASSERT_VECTOR_ONLY(ComplexDerived)
+      EIGEN_STATIC_ASSERT_SAME_VECTOR_SIZE(ComplexDerived,InputDerived) // size at compile-time
+      EIGEN_STATIC_ASSERT((internal::is_same<dst_type, Complex>::value),
+            YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY)
+      EIGEN_STATIC_ASSERT(int(InputDerived::Flags)&int(ComplexDerived::Flags)&DirectAccessBit,
+            THIS_METHOD_IS_ONLY_FOR_EXPRESSIONS_WITH_DIRECT_MEMORY_ACCESS_SUCH_AS_MAP_OR_PLAIN_MATRICES)
+
+      if (nfft<1)
+        nfft = src.size();
+
+      if ( NumTraits< src_type >::IsComplex == 0 && HasFlag(HalfSpectrum) )
+        dst.derived().resize( (nfft>>1)+1);
+      else
+        dst.derived().resize(nfft);
+
+      if ( src.innerStride() != 1 || src.size() < nfft ) {
+        Matrix<src_type,1,Dynamic> tmp;
+        if (src.size()<nfft) {
+          tmp.setZero(nfft);
+          tmp.block(0,0,src.size(),1 ) = src;
+        }else{
+          tmp = src;
+        }
+        fwd( &dst[0],&tmp[0],nfft );
+      }else{
+        fwd( &dst[0],&src[0],nfft );
+      }
+    }
+ 
+    template<typename InputDerived>
+    inline
+    fft_fwd_proxy< MatrixBase<InputDerived>, FFT<T_Scalar,T_Impl> >
+    fwd( const MatrixBase<InputDerived> & src, Index nfft=-1)
+    {
+      return fft_fwd_proxy< MatrixBase<InputDerived> ,FFT<T_Scalar,T_Impl> >( src, *this,nfft );
+    }
+
+    template<typename InputDerived>
+    inline
+    fft_inv_proxy< MatrixBase<InputDerived>, FFT<T_Scalar,T_Impl> >
+    inv( const MatrixBase<InputDerived> & src, Index nfft=-1)
+    {
+      return  fft_inv_proxy< MatrixBase<InputDerived> ,FFT<T_Scalar,T_Impl> >( src, *this,nfft );
+    }
+
+    inline
+    void inv( Complex * dst, const Complex * src, Index nfft)
+    {
+      m_impl.inv( dst,src,static_cast<int>(nfft) );
+      if ( HasFlag( Unscaled ) == false)
+        scale(dst,Scalar(1./nfft),nfft); // scale the time series
+    }
+
+    inline
+    void inv( Scalar * dst, const Complex * src, Index nfft)
+    {
+      m_impl.inv( dst,src,static_cast<int>(nfft) );
+      if ( HasFlag( Unscaled ) == false)
+        scale(dst,Scalar(1./nfft),nfft); // scale the time series
+    }
+
+    template<typename OutputDerived, typename ComplexDerived>
+    inline
+    void inv( MatrixBase<OutputDerived> & dst, const MatrixBase<ComplexDerived> & src, Index nfft=-1)
+    {
+      typedef typename ComplexDerived::Scalar src_type;
+      typedef typename OutputDerived::Scalar dst_type;
+      const bool realfft= (NumTraits<dst_type>::IsComplex == 0);
+      EIGEN_STATIC_ASSERT_VECTOR_ONLY(OutputDerived)
+      EIGEN_STATIC_ASSERT_VECTOR_ONLY(ComplexDerived)
+      EIGEN_STATIC_ASSERT_SAME_VECTOR_SIZE(ComplexDerived,OutputDerived) // size at compile-time
+      EIGEN_STATIC_ASSERT((internal::is_same<src_type, Complex>::value),
+            YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY)
+      EIGEN_STATIC_ASSERT(int(OutputDerived::Flags)&int(ComplexDerived::Flags)&DirectAccessBit,
+            THIS_METHOD_IS_ONLY_FOR_EXPRESSIONS_WITH_DIRECT_MEMORY_ACCESS_SUCH_AS_MAP_OR_PLAIN_MATRICES)
+
+      if (nfft<1) { //automatic FFT size determination
+        if ( realfft && HasFlag(HalfSpectrum) ) 
+          nfft = 2*(src.size()-1); //assume even fft size
+        else
+          nfft = src.size();
+      }
+      dst.derived().resize( nfft );
+
+      // check for nfft that does not fit the input data size
+      Index resize_input= ( realfft && HasFlag(HalfSpectrum) )
+        ? ( (nfft/2+1) - src.size() )
+        : ( nfft - src.size() );
+
+      if ( src.innerStride() != 1 || resize_input ) {
+        // if the vector is strided, then we need to copy it to a packed temporary
+        Matrix<src_type,1,Dynamic> tmp;
+        if ( resize_input ) {
+          size_t ncopy = (std::min)(src.size(),src.size() + resize_input);
+          tmp.setZero(src.size() + resize_input);
+          if ( realfft && HasFlag(HalfSpectrum) ) {
+            // pad at the Nyquist bin
+            tmp.head(ncopy) = src.head(ncopy);
+            tmp(ncopy-1) = real(tmp(ncopy-1)); // enforce real-only Nyquist bin
+          }else{
+            size_t nhead,ntail;
+            nhead = 1+ncopy/2-1; // range  [0:pi)
+            ntail = ncopy/2-1;   // range (-pi:0)
+            tmp.head(nhead) = src.head(nhead);
+            tmp.tail(ntail) = src.tail(ntail);
+            if (resize_input<0) { //shrinking -- create the Nyquist bin as the average of the two bins that fold into it
+              tmp(nhead) = ( src(nfft/2) + src( src.size() - nfft/2 ) )*src_type(.5);
+            }else{ // expanding -- split the old Nyquist bin into two halves
+              tmp(nhead) = src(nhead) * src_type(.5);
+              tmp(tmp.size()-nhead) = tmp(nhead);
+            }
+          }
+        }else{
+          tmp = src;
+        }
+        inv( &dst[0],&tmp[0], nfft);
+      }else{
+        inv( &dst[0],&src[0], nfft);
+      }
+    }
+
+    template <typename _Output>
+    inline
+    void inv( std::vector<_Output> & dst, const std::vector<Complex> & src,Index nfft=-1)
+    {
+      if (nfft<1)
+        nfft = ( NumTraits<_Output>::IsComplex == 0 && HasFlag(HalfSpectrum) ) ? 2*(src.size()-1) : src.size();
+      dst.resize( nfft );
+      inv( &dst[0],&src[0],nfft);
+    }
+
+
+    /*
+    // TODO: multi-dimensional FFTs
+    inline 
+    void inv2(Complex * dst, const Complex * src, int n0,int n1)
+    {
+      m_impl.inv2(dst,src,n0,n1);
+      if ( HasFlag( Unscaled ) == false)
+          scale(dst,1./(n0*n1),n0*n1);
+    }
+  */
+
+    inline
+    impl_type & impl() {return m_impl;}
+  private:
+
+    template <typename T_Data>
+    inline
+    void scale(T_Data * x,Scalar s,Index nx)
+    {
+#if 1
+      for (int k=0;k<nx;++k)
+        *x++ *= s;
+#else
+      if ( ((ptrdiff_t)x) & 15 )
+        Matrix<T_Data, Dynamic, 1>::Map(x,nx) *= s;
+      else
+        Matrix<T_Data, Dynamic, 1>::MapAligned(x,nx) *= s;
+         //Matrix<T_Data, Dynamic, Dynamic>::Map(x,nx) * s;
+#endif  
+    }
+
+    inline
+    void ReflectSpectrum(Complex * freq, Index nfft)
+    {
+      // create the implicit right-half spectrum (conjugate-mirror of the left-half)
+      Index nhbins=(nfft>>1)+1;
+      for (Index k=nhbins;k < nfft; ++k )
+        freq[k] = conj(freq[nfft-k]);
+    }
+
+    impl_type m_impl;
+    int m_flag;
+};
+
+template<typename T_SrcMat,typename T_FftIfc> 
+template<typename T_DestMat> inline 
+void fft_fwd_proxy<T_SrcMat,T_FftIfc>::evalTo(T_DestMat& dst) const
+{
+    m_ifc.fwd( dst, m_src, m_nfft);
+}
+
+template<typename T_SrcMat,typename T_FftIfc> 
+template<typename T_DestMat> inline 
+void fft_inv_proxy<T_SrcMat,T_FftIfc>::evalTo(T_DestMat& dst) const
+{
+    m_ifc.inv( dst, m_src, m_nfft);
+}
+
+}
+#endif
+/* vim: set filetype=cpp et sw=2 ts=2 ai: */
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/OpenGLSupport
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/OpenGLSupport	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/OpenGLSupport	(revision 2477)
@@ -0,0 +1,322 @@
+// This file is part of Eigen, a lightweight C++ template library
+// for linear algebra.
+//
+// Copyright (C) 2010 Gael Guennebaud <gael.guennebaud@inria.fr>
+//
+// This Source Code Form is subject to the terms of the Mozilla
+// Public License v. 2.0. If a copy of the MPL was not distributed
+// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#ifndef EIGEN_OPENGL_MODULE
+#define EIGEN_OPENGL_MODULE
+
+#include <Eigen/Geometry>
+
+#if defined(__APPLE_CC__)
+  #include <OpenGL/gl.h>
+#else
+  #include <GL/gl.h>
+#endif
+
+namespace Eigen {
+
+/**
+  * \defgroup OpenGLSUpport_Module OpenGL Support module
+  *
+  * This module provides wrapper functions for a couple of OpenGL functions
+  * which simplify the way to pass Eigen's object to openGL.
+  * Here is an exmaple:
+  * 
+  * \code
+  * // You need to add path_to_eigen/unsupported to your include path.
+  * #include <Eigen/OpenGLSupport>
+  * // ...
+  * Vector3f x, y;
+  * Matrix3f rot;
+  * 
+  * glVertex(y + x * rot);
+  * 
+  * Quaternion q;
+  * glRotate(q);
+  * 
+  * // ...
+  * \endcode
+  *
+  */
+//@{
+
+#define EIGEN_GL_FUNC_DECLARATION(FUNC)                                                                             \
+namespace internal {                                                                                                \
+  template< typename XprType,                                                                                       \
+            typename Scalar = typename XprType::Scalar,                                                             \
+            int Rows = XprType::RowsAtCompileTime,                                                                  \
+            int Cols = XprType::ColsAtCompileTime,                                                                  \
+            bool IsGLCompatible = bool(XprType::Flags&LinearAccessBit)                                              \
+                              && bool(XprType::Flags&DirectAccessBit)                                               \
+                              && (XprType::IsVectorAtCompileTime || (XprType::Flags&RowMajorBit)==0)>               \
+  struct EIGEN_CAT(EIGEN_CAT(gl_,FUNC),_impl);                                                                      \
+                                                                                                                    \
+  template<typename XprType, typename Scalar, int Rows, int Cols>                                                   \
+  struct EIGEN_CAT(EIGEN_CAT(gl_,FUNC),_impl)<XprType,Scalar,Rows,Cols,false> {                                     \
+    inline static void run(const XprType& p) {                                                                      \
+      EIGEN_CAT(EIGEN_CAT(gl_,FUNC),_impl)<typename plain_matrix_type_column_major<XprType>::type>::run(p); }       \
+  };                                                                                                                \
+}                                                                                                                   \
+                                                                                                                    \
+template<typename Derived> inline void FUNC(const Eigen::DenseBase<Derived>& p) {                                   \
+  EIGEN_CAT(EIGEN_CAT(internal::gl_,FUNC),_impl)<Derived>::run(p.derived());                                        \
+}
+
+
+#define EIGEN_GL_FUNC_SPECIALIZATION_MAT(FUNC,SCALAR,ROWS,COLS,SUFFIX)                                              \
+namespace internal {                                                                                                \
+  template< typename XprType> struct EIGEN_CAT(EIGEN_CAT(gl_,FUNC),_impl)<XprType, SCALAR, ROWS, COLS, true> {      \
+    inline static void run(const XprType& p) { FUNC##SUFFIX(p.data()); }                                            \
+  };                                                                                                                \
+}
+
+  
+#define EIGEN_GL_FUNC_SPECIALIZATION_VEC(FUNC,SCALAR,SIZE,SUFFIX)                                                   \
+namespace internal {                                                                                                \
+  template< typename XprType> struct EIGEN_CAT(EIGEN_CAT(gl_,FUNC),_impl)<XprType, SCALAR, SIZE, 1, true> {         \
+    inline static void run(const XprType& p) { FUNC##SUFFIX(p.data()); }                                            \
+  };                                                                                                                \
+  template< typename XprType> struct EIGEN_CAT(EIGEN_CAT(gl_,FUNC),_impl)<XprType, SCALAR, 1, SIZE, true> {         \
+    inline static void run(const XprType& p) { FUNC##SUFFIX(p.data()); }                                            \
+  };                                                                                                                \
+}
+
+  
+EIGEN_GL_FUNC_DECLARATION       (glVertex)
+EIGEN_GL_FUNC_SPECIALIZATION_VEC(glVertex,int,    2,2iv)
+EIGEN_GL_FUNC_SPECIALIZATION_VEC(glVertex,short,  2,2sv)
+EIGEN_GL_FUNC_SPECIALIZATION_VEC(glVertex,float,  2,2fv)
+EIGEN_GL_FUNC_SPECIALIZATION_VEC(glVertex,double, 2,2dv)
+EIGEN_GL_FUNC_SPECIALIZATION_VEC(glVertex,int,    3,3iv)
+EIGEN_GL_FUNC_SPECIALIZATION_VEC(glVertex,short,  3,3sv)
+EIGEN_GL_FUNC_SPECIALIZATION_VEC(glVertex,float,  3,3fv)
+EIGEN_GL_FUNC_SPECIALIZATION_VEC(glVertex,double, 3,3dv)
+EIGEN_GL_FUNC_SPECIALIZATION_VEC(glVertex,int,    4,4iv)
+EIGEN_GL_FUNC_SPECIALIZATION_VEC(glVertex,short,  4,4sv)
+EIGEN_GL_FUNC_SPECIALIZATION_VEC(glVertex,float,  4,4fv)
+EIGEN_GL_FUNC_SPECIALIZATION_VEC(glVertex,double, 4,4dv)
+
+EIGEN_GL_FUNC_DECLARATION       (glTexCoord)
+EIGEN_GL_FUNC_SPECIALIZATION_VEC(glTexCoord,int,    2,2iv)
+EIGEN_GL_FUNC_SPECIALIZATION_VEC(glTexCoord,short,  2,2sv)
+EIGEN_GL_FUNC_SPECIALIZATION_VEC(glTexCoord,float,  2,2fv)
+EIGEN_GL_FUNC_SPECIALIZATION_VEC(glTexCoord,double, 2,2dv)
+EIGEN_GL_FUNC_SPECIALIZATION_VEC(glTexCoord,int,    3,3iv)
+EIGEN_GL_FUNC_SPECIALIZATION_VEC(glTexCoord,short,  3,3sv)
+EIGEN_GL_FUNC_SPECIALIZATION_VEC(glTexCoord,float,  3,3fv)
+EIGEN_GL_FUNC_SPECIALIZATION_VEC(glTexCoord,double, 3,3dv)
+EIGEN_GL_FUNC_SPECIALIZATION_VEC(glTexCoord,int,    4,4iv)
+EIGEN_GL_FUNC_SPECIALIZATION_VEC(glTexCoord,short,  4,4sv)
+EIGEN_GL_FUNC_SPECIALIZATION_VEC(glTexCoord,float,  4,4fv)
+EIGEN_GL_FUNC_SPECIALIZATION_VEC(glTexCoord,double, 4,4dv)
+
+EIGEN_GL_FUNC_DECLARATION       (glColor)
+EIGEN_GL_FUNC_SPECIALIZATION_VEC(glColor,int,    2,2iv)
+EIGEN_GL_FUNC_SPECIALIZATION_VEC(glColor,short,  2,2sv)
+EIGEN_GL_FUNC_SPECIALIZATION_VEC(glColor,float,  2,2fv)
+EIGEN_GL_FUNC_SPECIALIZATION_VEC(glColor,double, 2,2dv)
+EIGEN_GL_FUNC_SPECIALIZATION_VEC(glColor,int,    3,3iv)
+EIGEN_GL_FUNC_SPECIALIZATION_VEC(glColor,short,  3,3sv)
+EIGEN_GL_FUNC_SPECIALIZATION_VEC(glColor,float,  3,3fv)
+EIGEN_GL_FUNC_SPECIALIZATION_VEC(glColor,double, 3,3dv)
+EIGEN_GL_FUNC_SPECIALIZATION_VEC(glColor,int,    4,4iv)
+EIGEN_GL_FUNC_SPECIALIZATION_VEC(glColor,short,  4,4sv)
+EIGEN_GL_FUNC_SPECIALIZATION_VEC(glColor,float,  4,4fv)
+EIGEN_GL_FUNC_SPECIALIZATION_VEC(glColor,double, 4,4dv)
+
+EIGEN_GL_FUNC_DECLARATION       (glNormal)
+EIGEN_GL_FUNC_SPECIALIZATION_VEC(glNormal,int,    3,3iv)
+EIGEN_GL_FUNC_SPECIALIZATION_VEC(glNormal,short,  3,3sv)
+EIGEN_GL_FUNC_SPECIALIZATION_VEC(glNormal,float,  3,3fv)
+EIGEN_GL_FUNC_SPECIALIZATION_VEC(glNormal,double, 3,3dv)
+
+inline void glScale2fv(const float*  v) { glScalef(v[0], v[1], 1.f);  }
+inline void glScale2dv(const double* v) { glScaled(v[0], v[1], 1.0);  }
+inline void glScale3fv(const float*  v) { glScalef(v[0], v[1], v[2]); }
+inline void glScale3dv(const double* v) { glScaled(v[0], v[1], v[2]); }
+
+EIGEN_GL_FUNC_DECLARATION       (glScale)
+EIGEN_GL_FUNC_SPECIALIZATION_VEC(glScale,float,  2,2fv)
+EIGEN_GL_FUNC_SPECIALIZATION_VEC(glScale,double, 2,2dv)
+EIGEN_GL_FUNC_SPECIALIZATION_VEC(glScale,float,  3,3fv)
+EIGEN_GL_FUNC_SPECIALIZATION_VEC(glScale,double, 3,3dv)
+
+template<typename Scalar> void glScale(const UniformScaling<Scalar>& s)  { glScale(Matrix<Scalar,3,1>::Constant(s.factor())); }
+
+inline void glTranslate2fv(const float*  v) { glTranslatef(v[0], v[1], 0.f);  }
+inline void glTranslate2dv(const double* v) { glTranslated(v[0], v[1], 0.0);  }
+inline void glTranslate3fv(const float*  v) { glTranslatef(v[0], v[1], v[2]); }
+inline void glTranslate3dv(const double* v) { glTranslated(v[0], v[1], v[2]); }
+
+EIGEN_GL_FUNC_DECLARATION       (glTranslate)
+EIGEN_GL_FUNC_SPECIALIZATION_VEC(glTranslate,float,  2,2fv)
+EIGEN_GL_FUNC_SPECIALIZATION_VEC(glTranslate,double, 2,2dv)
+EIGEN_GL_FUNC_SPECIALIZATION_VEC(glTranslate,float,  3,3fv)
+EIGEN_GL_FUNC_SPECIALIZATION_VEC(glTranslate,double, 3,3dv)
+
+template<typename Scalar> void glTranslate(const Translation<Scalar,2>& t)  { glTranslate(t.vector()); }
+template<typename Scalar> void glTranslate(const Translation<Scalar,3>& t)  { glTranslate(t.vector()); }
+
+EIGEN_GL_FUNC_DECLARATION       (glMultMatrix)
+EIGEN_GL_FUNC_SPECIALIZATION_MAT(glMultMatrix,float,  4,4,f)
+EIGEN_GL_FUNC_SPECIALIZATION_MAT(glMultMatrix,double, 4,4,d)
+
+template<typename Scalar> void glMultMatrix(const Transform<Scalar,3,Affine>& t)        { glMultMatrix(t.matrix()); }
+template<typename Scalar> void glMultMatrix(const Transform<Scalar,3,Projective>& t)    { glMultMatrix(t.matrix()); }
+template<typename Scalar> void glMultMatrix(const Transform<Scalar,3,AffineCompact>& t) { glMultMatrix(Transform<Scalar,3,Affine>(t).matrix()); }
+
+EIGEN_GL_FUNC_DECLARATION       (glLoadMatrix)
+EIGEN_GL_FUNC_SPECIALIZATION_MAT(glLoadMatrix,float,  4,4,f)
+EIGEN_GL_FUNC_SPECIALIZATION_MAT(glLoadMatrix,double, 4,4,d)
+
+template<typename Scalar> void glLoadMatrix(const Transform<Scalar,3,Affine>& t)        { glLoadMatrix(t.matrix()); }
+template<typename Scalar> void glLoadMatrix(const Transform<Scalar,3,Projective>& t)    { glLoadMatrix(t.matrix()); }
+template<typename Scalar> void glLoadMatrix(const Transform<Scalar,3,AffineCompact>& t) { glLoadMatrix(Transform<Scalar,3,Affine>(t).matrix()); }
+
+inline void glRotate(const Rotation2D<float>& rot)
+{
+  glRotatef(rot.angle()*180.f/float(M_PI), 0.f, 0.f, 1.f);
+}
+inline void glRotate(const Rotation2D<double>& rot)
+{
+  glRotated(rot.angle()*180.0/M_PI, 0.0, 0.0, 1.0);
+}
+
+template<typename Derived> void glRotate(const RotationBase<Derived,3>& rot)
+{  
+  Transform<typename Derived::Scalar,3,Projective> tr(rot);
+  glMultMatrix(tr.matrix());
+}
+
+#define EIGEN_GL_MAKE_CONST_const const
+#define EIGEN_GL_MAKE_CONST__ 
+#define EIGEN_GL_EVAL(X) X
+
+#define EIGEN_GL_FUNC1_DECLARATION(FUNC,ARG1,CONST)                                                                             \
+namespace internal {                                                                                                            \
+  template< typename XprType,                                                                                                   \
+            typename Scalar = typename XprType::Scalar,                                                                         \
+            int Rows = XprType::RowsAtCompileTime,                                                                              \
+            int Cols = XprType::ColsAtCompileTime,                                                                              \
+            bool IsGLCompatible = bool(XprType::Flags&LinearAccessBit)                                                          \
+                              && bool(XprType::Flags&DirectAccessBit)                                                           \
+                              && (XprType::IsVectorAtCompileTime || (XprType::Flags&RowMajorBit)==0)>                           \
+  struct EIGEN_CAT(EIGEN_CAT(gl_,FUNC),_impl);                                                                                  \
+                                                                                                                                \
+  template<typename XprType, typename Scalar, int Rows, int Cols>                                                               \
+  struct EIGEN_CAT(EIGEN_CAT(gl_,FUNC),_impl)<XprType,Scalar,Rows,Cols,false> {                                                 \
+    inline static void run(ARG1 a,EIGEN_GL_EVAL(EIGEN_GL_MAKE_CONST_##CONST) XprType& p) {                                      \
+      EIGEN_CAT(EIGEN_CAT(gl_,FUNC),_impl)<typename plain_matrix_type_column_major<XprType>::type>::run(a,p); }                 \
+  };                                                                                                                            \
+}                                                                                                                               \
+                                                                                                                                \
+template<typename Derived> inline void FUNC(ARG1 a,EIGEN_GL_EVAL(EIGEN_GL_MAKE_CONST_##CONST) Eigen::DenseBase<Derived>& p) {   \
+  EIGEN_CAT(EIGEN_CAT(internal::gl_,FUNC),_impl)<Derived>::run(a,p.derived());                                                  \
+}
+
+
+#define EIGEN_GL_FUNC1_SPECIALIZATION_MAT(FUNC,ARG1,CONST,SCALAR,ROWS,COLS,SUFFIX)                                              \
+namespace internal {                                                                                                            \
+  template< typename XprType> struct EIGEN_CAT(EIGEN_CAT(gl_,FUNC),_impl)<XprType, SCALAR, ROWS, COLS, true> {                  \
+    inline static void run(ARG1 a, EIGEN_GL_EVAL(EIGEN_GL_MAKE_CONST_##CONST) XprType& p) { FUNC##SUFFIX(a,p.data()); }         \
+  }; \
+}
+
+  
+#define EIGEN_GL_FUNC1_SPECIALIZATION_VEC(FUNC,ARG1,CONST,SCALAR,SIZE,SUFFIX)                                                   \
+namespace internal {                                                                                                            \
+  template< typename XprType> struct EIGEN_CAT(EIGEN_CAT(gl_,FUNC),_impl)<XprType, SCALAR, SIZE, 1, true> {                     \
+    inline static void run(ARG1 a, EIGEN_GL_EVAL(EIGEN_GL_MAKE_CONST_##CONST) XprType& p) { FUNC##SUFFIX(a,p.data()); }         \
+  };                                                                                                                            \
+  template< typename XprType> struct EIGEN_CAT(EIGEN_CAT(gl_,FUNC),_impl)<XprType, SCALAR, 1, SIZE, true> {                     \
+    inline static void run(ARG1 a, EIGEN_GL_EVAL(EIGEN_GL_MAKE_CONST_##CONST) XprType& p) { FUNC##SUFFIX(a,p.data()); }         \
+  };                                                                                                                            \
+}
+
+EIGEN_GL_FUNC1_DECLARATION       (glGet,GLenum,_)
+EIGEN_GL_FUNC1_SPECIALIZATION_MAT(glGet,GLenum,_,float,  4,4,Floatv)
+EIGEN_GL_FUNC1_SPECIALIZATION_MAT(glGet,GLenum,_,double, 4,4,Doublev)
+
+// glUniform API
+
+#ifdef GL_VERSION_2_0
+
+inline void glUniform2fv_ei  (GLint loc, const float* v)         { glUniform2fv(loc,1,v); }
+inline void glUniform2iv_ei  (GLint loc, const int* v)           { glUniform2iv(loc,1,v); }
+
+inline void glUniform3fv_ei  (GLint loc, const float* v)         { glUniform3fv(loc,1,v); }
+inline void glUniform3iv_ei  (GLint loc, const int* v)           { glUniform3iv(loc,1,v); }
+
+inline void glUniform4fv_ei  (GLint loc, const float* v)         { glUniform4fv(loc,1,v); }
+inline void glUniform4iv_ei  (GLint loc, const int* v)           { glUniform4iv(loc,1,v); }
+
+inline void glUniformMatrix2fv_ei  (GLint loc, const float* v)         { glUniformMatrix2fv(loc,1,false,v); }
+inline void glUniformMatrix3fv_ei  (GLint loc, const float* v)         { glUniformMatrix3fv(loc,1,false,v); }
+inline void glUniformMatrix4fv_ei  (GLint loc, const float* v)         { glUniformMatrix4fv(loc,1,false,v); }
+
+
+EIGEN_GL_FUNC1_DECLARATION       (glUniform,GLint,const)
+EIGEN_GL_FUNC1_SPECIALIZATION_VEC(glUniform,GLint,const,float,        2,2fv_ei)
+EIGEN_GL_FUNC1_SPECIALIZATION_VEC(glUniform,GLint,const,int,          2,2iv_ei)
+EIGEN_GL_FUNC1_SPECIALIZATION_VEC(glUniform,GLint,const,float,        3,3fv_ei)
+EIGEN_GL_FUNC1_SPECIALIZATION_VEC(glUniform,GLint,const,int,          3,3iv_ei)
+EIGEN_GL_FUNC1_SPECIALIZATION_VEC(glUniform,GLint,const,float,        4,4fv_ei)
+EIGEN_GL_FUNC1_SPECIALIZATION_VEC(glUniform,GLint,const,int,          4,4iv_ei)
+
+EIGEN_GL_FUNC1_SPECIALIZATION_MAT(glUniform,GLint,const,float,        2,2,Matrix2fv_ei)
+EIGEN_GL_FUNC1_SPECIALIZATION_MAT(glUniform,GLint,const,float,        3,3,Matrix3fv_ei)
+EIGEN_GL_FUNC1_SPECIALIZATION_MAT(glUniform,GLint,const,float,        4,4,Matrix4fv_ei)
+
+#endif
+
+#ifdef GL_VERSION_2_1
+
+static void glUniformMatrix2x3fv_ei(GLint loc, const float* v)         { glUniformMatrix2x3fv(loc,1,false,v); }
+static void glUniformMatrix3x2fv_ei(GLint loc, const float* v)         { glUniformMatrix3x2fv(loc,1,false,v); }
+static void glUniformMatrix2x4fv_ei(GLint loc, const float* v)         { glUniformMatrix2x4fv(loc,1,false,v); }
+static void glUniformMatrix4x2fv_ei(GLint loc, const float* v)         { glUniformMatrix4x2fv(loc,1,false,v); }
+static void glUniformMatrix3x4fv_ei(GLint loc, const float* v)         { glUniformMatrix3x4fv(loc,1,false,v); }
+static void glUniformMatrix4x3fv_ei(GLint loc, const float* v)         { glUniformMatrix4x3fv(loc,1,false,v); }
+
+EIGEN_GL_FUNC1_SPECIALIZATION_MAT(glUniform,GLint,const,float,        2,3,Matrix2x3fv_ei)
+EIGEN_GL_FUNC1_SPECIALIZATION_MAT(glUniform,GLint,const,float,        3,2,Matrix3x2fv_ei)
+EIGEN_GL_FUNC1_SPECIALIZATION_MAT(glUniform,GLint,const,float,        2,4,Matrix2x4fv_ei)
+EIGEN_GL_FUNC1_SPECIALIZATION_MAT(glUniform,GLint,const,float,        4,2,Matrix4x2fv_ei)
+EIGEN_GL_FUNC1_SPECIALIZATION_MAT(glUniform,GLint,const,float,        3,4,Matrix3x4fv_ei)
+EIGEN_GL_FUNC1_SPECIALIZATION_MAT(glUniform,GLint,const,float,        4,3,Matrix4x3fv_ei)
+
+#endif
+
+#ifdef GL_VERSION_3_0
+
+inline void glUniform2uiv_ei (GLint loc, const unsigned int* v)  { glUniform2uiv(loc,1,v); }
+inline void glUniform3uiv_ei (GLint loc, const unsigned int* v)  { glUniform3uiv(loc,1,v); }
+inline void glUniform4uiv_ei (GLint loc, const unsigned int* v)  { glUniform4uiv(loc,1,v); }
+
+EIGEN_GL_FUNC1_SPECIALIZATION_VEC(glUniform,GLint,const,unsigned int, 2,2uiv_ei)
+EIGEN_GL_FUNC1_SPECIALIZATION_VEC(glUniform,GLint,const,unsigned int, 3,3uiv_ei)
+EIGEN_GL_FUNC1_SPECIALIZATION_VEC(glUniform,GLint,const,unsigned int, 4,4uiv_ei)
+
+#endif
+
+#ifdef GL_ARB_gpu_shader_fp64
+inline void glUniform2dv_ei  (GLint loc, const double* v)        { glUniform2dv(loc,1,v); }
+inline void glUniform3dv_ei  (GLint loc, const double* v)        { glUniform3dv(loc,1,v); }
+inline void glUniform4dv_ei  (GLint loc, const double* v)        { glUniform4dv(loc,1,v); }
+
+EIGEN_GL_FUNC1_SPECIALIZATION_VEC(glUniform,GLint,const,double,       2,2dv_ei)
+EIGEN_GL_FUNC1_SPECIALIZATION_VEC(glUniform,GLint,const,double,       3,3dv_ei)
+EIGEN_GL_FUNC1_SPECIALIZATION_VEC(glUniform,GLint,const,double,       4,4dv_ei)
+#endif
+
+
+//@}
+
+}
+
+#endif // EIGEN_OPENGL_MODULE
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/MoreVectorization
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/MoreVectorization	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/MoreVectorization	(revision 2477)
@@ -0,0 +1,24 @@
+// This file is part of Eigen, a lightweight C++ template library
+// for linear algebra.
+//
+//
+// This Source Code Form is subject to the terms of the Mozilla
+// Public License v. 2.0. If a copy of the MPL was not distributed
+// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#ifndef EIGEN_MOREVECTORIZATION_MODULE_H
+#define EIGEN_MOREVECTORIZATION_MODULE_H
+
+#include <Eigen/Core>
+
+namespace Eigen {
+
+/**
+  * \defgroup MoreVectorization More vectorization module
+  */
+
+}
+
+#include "src/MoreVectorization/MathFunctions.h"
+
+#endif // EIGEN_MOREVECTORIZATION_MODULE_H
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/KroneckerProduct
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/KroneckerProduct	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/KroneckerProduct	(revision 2477)
@@ -0,0 +1,34 @@
+// This file is part of Eigen, a lightweight C++ template library
+// for linear algebra.
+//
+//
+// This Source Code Form is subject to the terms of the Mozilla
+// Public License v. 2.0. If a copy of the MPL was not distributed
+// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#ifndef EIGEN_KRONECKER_PRODUCT_MODULE_H
+#define EIGEN_KRONECKER_PRODUCT_MODULE_H
+
+#include "../../Eigen/Core"
+
+#include "../../Eigen/src/Core/util/DisableStupidWarnings.h"
+
+namespace Eigen {
+
+/**
+  * \defgroup KroneckerProduct_Module KroneckerProduct module
+  *
+  * This module contains an experimental Kronecker product implementation.
+  *
+  * \code
+  * #include <Eigen/KroneckerProduct>
+  * \endcode
+  */
+
+} // namespace Eigen
+
+#include "src/KroneckerProduct/KroneckerTensorProduct.h"
+
+#include "../../Eigen/src/Core/util/ReenableStupidWarnings.h"
+
+#endif // EIGEN_KRONECKER_PRODUCT_MODULE_H
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/LevenbergMarquardt
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/LevenbergMarquardt	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/LevenbergMarquardt	(revision 2477)
@@ -0,0 +1,45 @@
+// This file is part of Eigen, a lightweight C++ template library
+// for linear algebra.
+//
+// Copyright (C) 2009 Thomas Capricelli <orzel@freehackers.org>
+//
+// This Source Code Form is subject to the terms of the Mozilla
+// Public License v. 2.0. If a copy of the MPL was not distributed
+// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#ifndef EIGEN_LEVENBERGMARQUARDT_MODULE
+#define EIGEN_LEVENBERGMARQUARDT_MODULE
+
+// #include <vector>
+
+#include <Eigen/Core>
+#include <Eigen/Jacobi>
+#include <Eigen/QR>
+#include <unsupported/Eigen/NumericalDiff> 
+
+#include <Eigen/SparseQR>
+
+/**
+  * \defgroup LevenbergMarquardt_Module Levenberg-Marquardt module
+  *
+  * \code
+  * #include </Eigen/LevenbergMarquardt>
+  * \endcode
+  *
+  * 
+  */
+
+#include "Eigen/SparseCore"
+#ifndef EIGEN_PARSED_BY_DOXYGEN
+
+#include "src/LevenbergMarquardt/LMqrsolv.h"
+#include "src/LevenbergMarquardt/LMcovar.h"
+#include "src/LevenbergMarquardt/LMpar.h"
+
+#endif
+
+#include "src/LevenbergMarquardt/LevenbergMarquardt.h"
+#include "src/LevenbergMarquardt/LMonestep.h"
+
+
+#endif // EIGEN_LEVENBERGMARQUARDT_MODULE
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/SVD
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/SVD	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/SVD	(revision 2477)
@@ -0,0 +1,39 @@
+#ifndef EIGEN_SVD_MODULE_H
+#define EIGEN_SVD_MODULE_H
+
+#include <Eigen/QR>
+#include <Eigen/Householder>
+#include <Eigen/Jacobi>
+
+#include "../../Eigen/src/Core/util/DisableStupidWarnings.h"
+
+/** \defgroup SVD_Module SVD module
+  *
+  *
+  *
+  * This module provides SVD decomposition for matrices (both real and complex).
+  * This decomposition is accessible via the following MatrixBase method:
+  *  - MatrixBase::jacobiSvd()
+  *
+  * \code
+  * #include <Eigen/SVD>
+  * \endcode
+  */
+
+#include "../../Eigen/src/misc/Solve.h"
+#include "../../Eigen/src/SVD/UpperBidiagonalization.h"
+#include "src/SVD/SVDBase.h"
+#include "src/SVD/JacobiSVD.h"
+#include "src/SVD/BDCSVD.h"
+#if defined(EIGEN_USE_LAPACKE) && !defined(EIGEN_USE_LAPACKE_STRICT)
+#include "../../Eigen/src/SVD/JacobiSVD_MKL.h"
+#endif
+
+#ifdef EIGEN2_SUPPORT
+#include "../../Eigen/src/Eigen2Support/SVD.h"
+#endif
+
+#include "../../Eigen/src/Core/util/ReenableStupidWarnings.h"
+
+#endif // EIGEN_SVD_MODULE_H
+/* vim: set filetype=cpp et sw=2 ts=2 ai: */
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/NonLinearOptimization
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/NonLinearOptimization	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/NonLinearOptimization	(revision 2477)
@@ -0,0 +1,134 @@
+// This file is part of Eigen, a lightweight C++ template library
+// for linear algebra.
+//
+// Copyright (C) 2009 Thomas Capricelli <orzel@freehackers.org>
+//
+// This Source Code Form is subject to the terms of the Mozilla
+// Public License v. 2.0. If a copy of the MPL was not distributed
+// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#ifndef EIGEN_NONLINEAROPTIMIZATION_MODULE
+#define EIGEN_NONLINEAROPTIMIZATION_MODULE
+
+#include <vector>
+
+#include <Eigen/Core>
+#include <Eigen/Jacobi>
+#include <Eigen/QR>
+#include <unsupported/Eigen/NumericalDiff>
+
+/**
+  * \defgroup NonLinearOptimization_Module Non linear optimization module
+  *
+  * \code
+  * #include <unsupported/Eigen/NonLinearOptimization>
+  * \endcode
+  *
+  * This module provides implementation of two important algorithms in non linear
+  * optimization. In both cases, we consider a system of non linear functions. Of
+  * course, this should work, and even work very well if those functions are
+  * actually linear. But if this is so, you should probably better use other
+  * methods more fitted to this special case.
+  *
+  * One algorithm allows to find an extremum of such a system (Levenberg
+  * Marquardt algorithm) and the second one is used to find 
+  * a zero for the system (Powell hybrid "dogleg" method).
+  *
+  * This code is a port of minpack (http://en.wikipedia.org/wiki/MINPACK).
+  * Minpack is a very famous, old, robust and well-reknown package, written in 
+  * fortran. Those implementations have been carefully tuned, tested, and used
+  * for several decades.
+  *
+  * The original fortran code was automatically translated using f2c (http://en.wikipedia.org/wiki/F2c) in C,
+  * then c++, and then cleaned by several different authors.
+  * The last one of those cleanings being our starting point : 
+  * http://devernay.free.fr/hacks/cminpack.html
+  * 
+  * Finally, we ported this code to Eigen, creating classes and API
+  * coherent with Eigen. When possible, we switched to Eigen
+  * implementation, such as most linear algebra (vectors, matrices, stable norms).
+  *
+  * Doing so, we were very careful to check the tests we setup at the very
+  * beginning, which ensure that the same results are found.
+  *
+  * \section Tests Tests
+  * 
+  * The tests are placed in the file unsupported/test/NonLinear.cpp.
+  * 
+  * There are two kinds of tests : those that come from examples bundled with cminpack.
+  * They guaranty we get the same results as the original algorithms (value for 'x',
+  * for the number of evaluations of the function, and for the number of evaluations
+  * of the jacobian if ever).
+  * 
+  * Other tests were added by myself at the very beginning of the 
+  * process and check the results for levenberg-marquardt using the reference data 
+  * on http://www.itl.nist.gov/div898/strd/nls/nls_main.shtml. Since then i've 
+  * carefully checked that the same results were obtained when modifiying the 
+  * code. Please note that we do not always get the exact same decimals as they do,
+  * but this is ok : they use 128bits float, and we do the tests using the C type 'double',
+  * which is 64 bits on most platforms (x86 and amd64, at least).
+  * I've performed those tests on several other implementations of levenberg-marquardt, and
+  * (c)minpack performs VERY well compared to those, both in accuracy and speed.
+  * 
+  * The documentation for running the tests is on the wiki
+  * http://eigen.tuxfamily.org/index.php?title=Tests
+  * 
+  * \section API API : overview of methods
+  * 
+  * Both algorithms can use either the jacobian (provided by the user) or compute 
+  * an approximation by themselves (actually using Eigen \ref NumericalDiff_Module).
+  * The part of API referring to the latter use 'NumericalDiff' in the method names
+  * (exemple: LevenbergMarquardt.minimizeNumericalDiff() ) 
+  * 
+  * The methods LevenbergMarquardt.lmder1()/lmdif1()/lmstr1() and 
+  * HybridNonLinearSolver.hybrj1()/hybrd1() are specific methods from the original 
+  * minpack package that you probably should NOT use until you are porting a code that
+  *  was previously using minpack. They just define a 'simple' API with default values 
+  * for some parameters.
+  * 
+  * All algorithms are provided using Two APIs :
+  *     - one where the user inits the algorithm, and uses '*OneStep()' as much as he wants : 
+  * this way the caller have control over the steps
+  *     - one where the user just calls a method (optimize() or solve()) which will 
+  * handle the loop: init + loop until a stop condition is met. Those are provided for
+  *  convenience.
+  * 
+  * As an example, the method LevenbergMarquardt::minimize() is 
+  * implemented as follow : 
+  * \code
+  * Status LevenbergMarquardt<FunctorType,Scalar>::minimize(FVectorType  &x, const int mode)
+  * {
+  *     Status status = minimizeInit(x, mode);
+  *     do {
+  *         status = minimizeOneStep(x, mode);
+  *     } while (status==Running);
+  *     return status;
+  * }
+  * \endcode
+  * 
+  * \section examples Examples
+  * 
+  * The easiest way to understand how to use this module is by looking at the many examples in the file
+  * unsupported/test/NonLinearOptimization.cpp.
+  */
+
+#ifndef EIGEN_PARSED_BY_DOXYGEN
+
+#include "src/NonLinearOptimization/qrsolv.h"
+#include "src/NonLinearOptimization/r1updt.h"
+#include "src/NonLinearOptimization/r1mpyq.h"
+#include "src/NonLinearOptimization/rwupdt.h"
+#include "src/NonLinearOptimization/fdjac1.h"
+#include "src/NonLinearOptimization/lmpar.h"
+#include "src/NonLinearOptimization/dogleg.h"
+#include "src/NonLinearOptimization/covar.h"
+
+#include "src/NonLinearOptimization/chkder.h"
+
+#endif
+
+#include "src/NonLinearOptimization/HybridNonLinearSolver.h"
+#include "src/NonLinearOptimization/LevenbergMarquardt.h"
+
+
+#endif // EIGEN_NONLINEAROPTIMIZATION_MODULE
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/MatrixFunctions
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/MatrixFunctions	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/MatrixFunctions	(revision 2477)
@@ -0,0 +1,447 @@
+// This file is part of Eigen, a lightweight C++ template library
+// for linear algebra.
+//
+// Copyright (C) 2009 Jitse Niesen <jitse@maths.leeds.ac.uk>
+// Copyright (C) 2012 Chen-Pang He <jdh8@ms63.hinet.net>
+//
+// This Source Code Form is subject to the terms of the Mozilla
+// Public License v. 2.0. If a copy of the MPL was not distributed
+// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#ifndef EIGEN_MATRIX_FUNCTIONS
+#define EIGEN_MATRIX_FUNCTIONS
+
+#include <cfloat>
+#include <list>
+#include <functional>
+#include <iterator>
+
+#include <Eigen/Core>
+#include <Eigen/LU>
+#include <Eigen/Eigenvalues>
+
+/**
+  * \defgroup MatrixFunctions_Module Matrix functions module
+  * \brief This module aims to provide various methods for the computation of
+  * matrix functions. 
+  *
+  * To use this module, add 
+  * \code
+  * #include <unsupported/Eigen/MatrixFunctions>
+  * \endcode
+  * at the start of your source file.
+  *
+  * This module defines the following MatrixBase methods.
+  *  - \ref matrixbase_cos "MatrixBase::cos()", for computing the matrix cosine
+  *  - \ref matrixbase_cosh "MatrixBase::cosh()", for computing the matrix hyperbolic cosine
+  *  - \ref matrixbase_exp "MatrixBase::exp()", for computing the matrix exponential
+  *  - \ref matrixbase_log "MatrixBase::log()", for computing the matrix logarithm
+  *  - \ref matrixbase_pow "MatrixBase::pow()", for computing the matrix power
+  *  - \ref matrixbase_matrixfunction "MatrixBase::matrixFunction()", for computing general matrix functions
+  *  - \ref matrixbase_sin "MatrixBase::sin()", for computing the matrix sine
+  *  - \ref matrixbase_sinh "MatrixBase::sinh()", for computing the matrix hyperbolic sine
+  *  - \ref matrixbase_sqrt "MatrixBase::sqrt()", for computing the matrix square root
+  *
+  * These methods are the main entry points to this module. 
+  *
+  * %Matrix functions are defined as follows.  Suppose that \f$ f \f$
+  * is an entire function (that is, a function on the complex plane
+  * that is everywhere complex differentiable).  Then its Taylor
+  * series
+  * \f[ f(0) + f'(0) x + \frac{f''(0)}{2} x^2 + \frac{f'''(0)}{3!} x^3 + \cdots \f]
+  * converges to \f$ f(x) \f$. In this case, we can define the matrix
+  * function by the same series:
+  * \f[ f(M) = f(0) + f'(0) M + \frac{f''(0)}{2} M^2 + \frac{f'''(0)}{3!} M^3 + \cdots \f]
+  *
+  */
+
+#include "src/MatrixFunctions/MatrixExponential.h"
+#include "src/MatrixFunctions/MatrixFunction.h"
+#include "src/MatrixFunctions/MatrixSquareRoot.h"
+#include "src/MatrixFunctions/MatrixLogarithm.h"
+#include "src/MatrixFunctions/MatrixPower.h"
+
+
+/** 
+\page matrixbaseextra_page
+\ingroup MatrixFunctions_Module
+
+\section matrixbaseextra MatrixBase methods defined in the MatrixFunctions module
+
+The remainder of the page documents the following MatrixBase methods
+which are defined in the MatrixFunctions module.
+
+
+
+\subsection matrixbase_cos MatrixBase::cos()
+
+Compute the matrix cosine.
+
+\code
+const MatrixFunctionReturnValue<Derived> MatrixBase<Derived>::cos() const
+\endcode
+
+\param[in]  M  a square matrix.
+\returns  expression representing \f$ \cos(M) \f$.
+
+This function calls \ref matrixbase_matrixfunction "matrixFunction()" with StdStemFunctions::cos().
+
+\sa \ref matrixbase_sin "sin()" for an example.
+
+
+
+\subsection matrixbase_cosh MatrixBase::cosh()
+
+Compute the matrix hyberbolic cosine.
+
+\code
+const MatrixFunctionReturnValue<Derived> MatrixBase<Derived>::cosh() const
+\endcode
+
+\param[in]  M  a square matrix.
+\returns  expression representing \f$ \cosh(M) \f$
+
+This function calls \ref matrixbase_matrixfunction "matrixFunction()" with StdStemFunctions::cosh().
+
+\sa \ref matrixbase_sinh "sinh()" for an example.
+
+
+
+\subsection matrixbase_exp MatrixBase::exp()
+
+Compute the matrix exponential.
+
+\code
+const MatrixExponentialReturnValue<Derived> MatrixBase<Derived>::exp() const
+\endcode
+
+\param[in]  M  matrix whose exponential is to be computed.
+\returns    expression representing the matrix exponential of \p M.
+
+The matrix exponential of \f$ M \f$ is defined by
+\f[ \exp(M) = \sum_{k=0}^\infty \frac{M^k}{k!}. \f]
+The matrix exponential can be used to solve linear ordinary
+differential equations: the solution of \f$ y' = My \f$ with the
+initial condition \f$ y(0) = y_0 \f$ is given by
+\f$ y(t) = \exp(M) y_0 \f$.
+
+The cost of the computation is approximately \f$ 20 n^3 \f$ for
+matrices of size \f$ n \f$. The number 20 depends weakly on the
+norm of the matrix.
+
+The matrix exponential is computed using the scaling-and-squaring
+method combined with Pad&eacute; approximation. The matrix is first
+rescaled, then the exponential of the reduced matrix is computed
+approximant, and then the rescaling is undone by repeated
+squaring. The degree of the Pad&eacute; approximant is chosen such
+that the approximation error is less than the round-off
+error. However, errors may accumulate during the squaring phase.
+
+Details of the algorithm can be found in: Nicholas J. Higham, "The
+scaling and squaring method for the matrix exponential revisited,"
+<em>SIAM J. %Matrix Anal. Applic.</em>, <b>26</b>:1179&ndash;1193,
+2005.
+
+Example: The following program checks that
+\f[ \exp \left[ \begin{array}{ccc}
+      0 & \frac14\pi & 0 \\
+      -\frac14\pi & 0 & 0 \\
+      0 & 0 & 0
+    \end{array} \right] = \left[ \begin{array}{ccc}
+      \frac12\sqrt2 & -\frac12\sqrt2 & 0 \\
+      \frac12\sqrt2 & \frac12\sqrt2 & 0 \\
+      0 & 0 & 1
+    \end{array} \right]. \f]
+This corresponds to a rotation of \f$ \frac14\pi \f$ radians around
+the z-axis.
+
+\include MatrixExponential.cpp
+Output: \verbinclude MatrixExponential.out
+
+\note \p M has to be a matrix of \c float, \c double, \c long double
+\c complex<float>, \c complex<double>, or \c complex<long double> .
+
+
+\subsection matrixbase_log MatrixBase::log()
+
+Compute the matrix logarithm.
+
+\code
+const MatrixLogarithmReturnValue<Derived> MatrixBase<Derived>::log() const
+\endcode
+
+\param[in]  M  invertible matrix whose logarithm is to be computed.
+\returns    expression representing the matrix logarithm root of \p M.
+
+The matrix logarithm of \f$ M \f$ is a matrix \f$ X \f$ such that 
+\f$ \exp(X) = M \f$ where exp denotes the matrix exponential. As for
+the scalar logarithm, the equation \f$ \exp(X) = M \f$ may have
+multiple solutions; this function returns a matrix whose eigenvalues
+have imaginary part in the interval \f$ (-\pi,\pi] \f$.
+
+In the real case, the matrix \f$ M \f$ should be invertible and
+it should have no eigenvalues which are real and negative (pairs of
+complex conjugate eigenvalues are allowed). In the complex case, it
+only needs to be invertible.
+
+This function computes the matrix logarithm using the Schur-Parlett
+algorithm as implemented by MatrixBase::matrixFunction(). The
+logarithm of an atomic block is computed by MatrixLogarithmAtomic,
+which uses direct computation for 1-by-1 and 2-by-2 blocks and an
+inverse scaling-and-squaring algorithm for bigger blocks, with the
+square roots computed by MatrixBase::sqrt().
+
+Details of the algorithm can be found in Section 11.6.2 of:
+Nicholas J. Higham,
+<em>Functions of Matrices: Theory and Computation</em>,
+SIAM 2008. ISBN 978-0-898716-46-7.
+
+Example: The following program checks that
+\f[ \log \left[ \begin{array}{ccc} 
+      \frac12\sqrt2 & -\frac12\sqrt2 & 0 \\
+      \frac12\sqrt2 & \frac12\sqrt2 & 0 \\
+      0 & 0 & 1
+    \end{array} \right] = \left[ \begin{array}{ccc}
+      0 & \frac14\pi & 0 \\ 
+      -\frac14\pi & 0 & 0 \\
+      0 & 0 & 0 
+    \end{array} \right]. \f]
+This corresponds to a rotation of \f$ \frac14\pi \f$ radians around
+the z-axis. This is the inverse of the example used in the
+documentation of \ref matrixbase_exp "exp()".
+
+\include MatrixLogarithm.cpp
+Output: \verbinclude MatrixLogarithm.out
+
+\note \p M has to be a matrix of \c float, \c double, <tt>long
+double</tt>, \c complex<float>, \c complex<double>, or \c complex<long
+double> .
+
+\sa MatrixBase::exp(), MatrixBase::matrixFunction(), 
+    class MatrixLogarithmAtomic, MatrixBase::sqrt().
+
+
+\subsection matrixbase_pow MatrixBase::pow()
+
+Compute the matrix raised to arbitrary real power.
+
+\code
+const MatrixPowerReturnValue<Derived> MatrixBase<Derived>::pow(RealScalar p) const
+\endcode
+
+\param[in]  M  base of the matrix power, should be a square matrix.
+\param[in]  p  exponent of the matrix power, should be real.
+
+The matrix power \f$ M^p \f$ is defined as \f$ \exp(p \log(M)) \f$,
+where exp denotes the matrix exponential, and log denotes the matrix
+logarithm.
+
+The matrix \f$ M \f$ should meet the conditions to be an argument of
+matrix logarithm. If \p p is not of the real scalar type of \p M, it
+is casted into the real scalar type of \p M.
+
+This function computes the matrix power using the Schur-Pad&eacute;
+algorithm as implemented by class MatrixPower. The exponent is split
+into integral part and fractional part, where the fractional part is
+in the interval \f$ (-1, 1) \f$. The main diagonal and the first
+super-diagonal is directly computed.
+
+Details of the algorithm can be found in: Nicholas J. Higham and
+Lijing Lin, "A Schur-Pad&eacute; algorithm for fractional powers of a
+matrix," <em>SIAM J. %Matrix Anal. Applic.</em>,
+<b>32(3)</b>:1056&ndash;1078, 2011.
+
+Example: The following program checks that
+\f[ \left[ \begin{array}{ccc}
+      \cos1 & -\sin1 & 0 \\
+      \sin1 & \cos1 & 0 \\
+      0 & 0 & 1
+    \end{array} \right]^{\frac14\pi} = \left[ \begin{array}{ccc}
+      \frac12\sqrt2 & -\frac12\sqrt2 & 0 \\
+      \frac12\sqrt2 & \frac12\sqrt2 & 0 \\
+      0 & 0 & 1
+    \end{array} \right]. \f]
+This corresponds to \f$ \frac14\pi \f$ rotations of 1 radian around
+the z-axis.
+
+\include MatrixPower.cpp
+Output: \verbinclude MatrixPower.out
+
+MatrixBase::pow() is user-friendly. However, there are some
+circumstances under which you should use class MatrixPower directly.
+MatrixPower can save the result of Schur decomposition, so it's
+better for computing various powers for the same matrix.
+
+Example:
+\include MatrixPower_optimal.cpp
+Output: \verbinclude MatrixPower_optimal.out
+
+\note \p M has to be a matrix of \c float, \c double, <tt>long
+double</tt>, \c complex<float>, \c complex<double>, or \c complex<long
+double> .
+
+\sa MatrixBase::exp(), MatrixBase::log(), class MatrixPower.
+
+
+\subsection matrixbase_matrixfunction MatrixBase::matrixFunction()
+
+Compute a matrix function.
+
+\code
+const MatrixFunctionReturnValue<Derived> MatrixBase<Derived>::matrixFunction(typename internal::stem_function<typename internal::traits<Derived>::Scalar>::type f) const
+\endcode
+
+\param[in]  M  argument of matrix function, should be a square matrix.
+\param[in]  f  an entire function; \c f(x,n) should compute the n-th
+derivative of f at x.
+\returns  expression representing \p f applied to \p M.
+
+Suppose that \p M is a matrix whose entries have type \c Scalar. 
+Then, the second argument, \p f, should be a function with prototype
+\code 
+ComplexScalar f(ComplexScalar, int) 
+\endcode
+where \c ComplexScalar = \c std::complex<Scalar> if \c Scalar is
+real (e.g., \c float or \c double) and \c ComplexScalar =
+\c Scalar if \c Scalar is complex. The return value of \c f(x,n)
+should be \f$ f^{(n)}(x) \f$, the n-th derivative of f at x.
+
+This routine uses the algorithm described in:
+Philip Davies and Nicholas J. Higham, 
+"A Schur-Parlett algorithm for computing matrix functions", 
+<em>SIAM J. %Matrix Anal. Applic.</em>, <b>25</b>:464&ndash;485, 2003.
+
+The actual work is done by the MatrixFunction class.
+
+Example: The following program checks that
+\f[ \exp \left[ \begin{array}{ccc} 
+      0 & \frac14\pi & 0 \\ 
+      -\frac14\pi & 0 & 0 \\
+      0 & 0 & 0 
+    \end{array} \right] = \left[ \begin{array}{ccc}
+      \frac12\sqrt2 & -\frac12\sqrt2 & 0 \\
+      \frac12\sqrt2 & \frac12\sqrt2 & 0 \\
+      0 & 0 & 1
+    \end{array} \right]. \f]
+This corresponds to a rotation of \f$ \frac14\pi \f$ radians around
+the z-axis. This is the same example as used in the documentation
+of \ref matrixbase_exp "exp()".
+
+\include MatrixFunction.cpp
+Output: \verbinclude MatrixFunction.out
+
+Note that the function \c expfn is defined for complex numbers 
+\c x, even though the matrix \c A is over the reals. Instead of
+\c expfn, we could also have used StdStemFunctions::exp:
+\code
+A.matrixFunction(StdStemFunctions<std::complex<double> >::exp, &B);
+\endcode
+
+
+
+\subsection matrixbase_sin MatrixBase::sin()
+
+Compute the matrix sine.
+
+\code
+const MatrixFunctionReturnValue<Derived> MatrixBase<Derived>::sin() const
+\endcode
+
+\param[in]  M  a square matrix.
+\returns  expression representing \f$ \sin(M) \f$.
+
+This function calls \ref matrixbase_matrixfunction "matrixFunction()" with StdStemFunctions::sin().
+
+Example: \include MatrixSine.cpp
+Output: \verbinclude MatrixSine.out
+
+
+
+\subsection matrixbase_sinh MatrixBase::sinh()
+
+Compute the matrix hyperbolic sine.
+
+\code
+MatrixFunctionReturnValue<Derived> MatrixBase<Derived>::sinh() const
+\endcode
+
+\param[in]  M  a square matrix.
+\returns  expression representing \f$ \sinh(M) \f$
+
+This function calls \ref matrixbase_matrixfunction "matrixFunction()" with StdStemFunctions::sinh().
+
+Example: \include MatrixSinh.cpp
+Output: \verbinclude MatrixSinh.out
+
+
+\subsection matrixbase_sqrt MatrixBase::sqrt()
+
+Compute the matrix square root.
+
+\code
+const MatrixSquareRootReturnValue<Derived> MatrixBase<Derived>::sqrt() const
+\endcode
+
+\param[in]  M  invertible matrix whose square root is to be computed.
+\returns    expression representing the matrix square root of \p M.
+
+The matrix square root of \f$ M \f$ is the matrix \f$ M^{1/2} \f$
+whose square is the original matrix; so if \f$ S = M^{1/2} \f$ then
+\f$ S^2 = M \f$. 
+
+In the <b>real case</b>, the matrix \f$ M \f$ should be invertible and
+it should have no eigenvalues which are real and negative (pairs of
+complex conjugate eigenvalues are allowed). In that case, the matrix
+has a square root which is also real, and this is the square root
+computed by this function. 
+
+The matrix square root is computed by first reducing the matrix to
+quasi-triangular form with the real Schur decomposition. The square
+root of the quasi-triangular matrix can then be computed directly. The
+cost is approximately \f$ 25 n^3 \f$ real flops for the real Schur
+decomposition and \f$ 3\frac13 n^3 \f$ real flops for the remainder
+(though the computation time in practice is likely more than this
+indicates).
+
+Details of the algorithm can be found in: Nicholas J. Highan,
+"Computing real square roots of a real matrix", <em>Linear Algebra
+Appl.</em>, 88/89:405&ndash;430, 1987.
+
+If the matrix is <b>positive-definite symmetric</b>, then the square
+root is also positive-definite symmetric. In this case, it is best to
+use SelfAdjointEigenSolver::operatorSqrt() to compute it.
+
+In the <b>complex case</b>, the matrix \f$ M \f$ should be invertible;
+this is a restriction of the algorithm. The square root computed by
+this algorithm is the one whose eigenvalues have an argument in the
+interval \f$ (-\frac12\pi, \frac12\pi] \f$. This is the usual branch
+cut.
+
+The computation is the same as in the real case, except that the
+complex Schur decomposition is used to reduce the matrix to a
+triangular matrix. The theoretical cost is the same. Details are in:
+&Aring;ke Bj&ouml;rck and Sven Hammarling, "A Schur method for the
+square root of a matrix", <em>Linear Algebra Appl.</em>,
+52/53:127&ndash;140, 1983.
+
+Example: The following program checks that the square root of
+\f[ \left[ \begin{array}{cc} 
+              \cos(\frac13\pi) & -\sin(\frac13\pi) \\
+              \sin(\frac13\pi) & \cos(\frac13\pi)
+    \end{array} \right], \f]
+corresponding to a rotation over 60 degrees, is a rotation over 30 degrees:
+\f[ \left[ \begin{array}{cc} 
+              \cos(\frac16\pi) & -\sin(\frac16\pi) \\
+              \sin(\frac16\pi) & \cos(\frac16\pi)
+    \end{array} \right]. \f]
+
+\include MatrixSquareRoot.cpp
+Output: \verbinclude MatrixSquareRoot.out
+
+\sa class RealSchur, class ComplexSchur, class MatrixSquareRoot,
+    SelfAdjointEigenSolver::operatorSqrt().
+
+*/
+
+#endif // EIGEN_MATRIX_FUNCTIONS
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/ArpackSupport
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/ArpackSupport	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/ArpackSupport	(revision 2477)
@@ -0,0 +1,31 @@
+// This file is part of Eigen, a lightweight C++ template library
+// for linear algebra.
+//
+//
+// This Source Code Form is subject to the terms of the Mozilla
+// Public License v. 2.0. If a copy of the MPL was not distributed
+// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#ifndef EIGEN_ARPACKSUPPORT_MODULE_H
+#define EIGEN_ARPACKSUPPORT_MODULE_H
+
+#include <Eigen/Core>
+
+#include <Eigen/src/Core/util/DisableStupidWarnings.h>
+
+/** \defgroup ArpackSupport_Module Arpack support module
+  *
+  * This module provides a wrapper to Arpack, a library for sparse eigenvalue decomposition.
+  *
+  * \code
+  * #include <Eigen/ArpackSupport>
+  * \endcode
+  */
+
+#include <Eigen/SparseCholesky>
+#include "src/Eigenvalues/ArpackSelfAdjointEigenSolver.h"
+
+#include <Eigen/src/Core/util/ReenableStupidWarnings.h>
+
+#endif // EIGEN_ARPACKSUPPORT_MODULE_H
+/* vim: set filetype=cpp et sw=2 ts=2 ai: */
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/SparseExtra
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/SparseExtra	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/SparseExtra	(revision 2477)
@@ -0,0 +1,56 @@
+// This file is part of Eigen, a lightweight C++ template library
+// for linear algebra.
+//
+// Copyright (C) 2008-2009 Gael Guennebaud <g.gael@free.fr>
+//
+// This Source Code Form is subject to the terms of the Mozilla
+// Public License v. 2.0. If a copy of the MPL was not distributed
+// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#ifndef EIGEN_SPARSE_EXTRA_MODULE_H
+#define EIGEN_SPARSE_EXTRA_MODULE_H
+
+#include "../../Eigen/Sparse"
+
+#include "../../Eigen/src/Core/util/DisableStupidWarnings.h"
+
+#include <vector>
+#include <map>
+#include <cstdlib>
+#include <cstring>
+#include <algorithm>
+#include <fstream>
+#include <sstream>
+
+#ifdef EIGEN_GOOGLEHASH_SUPPORT
+  #include <google/dense_hash_map>
+#endif
+
+/**
+  * \defgroup SparseExtra_Module SparseExtra module
+  *
+  * This module contains some experimental features extending the sparse module.
+  *
+  * \code
+  * #include <Eigen/SparseExtra>
+  * \endcode
+  */
+
+
+#include "../../Eigen/src/misc/Solve.h"
+#include "../../Eigen/src/misc/SparseSolve.h"
+
+#include "src/SparseExtra/DynamicSparseMatrix.h"
+#include "src/SparseExtra/BlockOfDynamicSparseMatrix.h"
+#include "src/SparseExtra/RandomSetter.h"
+
+#include "src/SparseExtra/MarketIO.h"
+
+#if !defined(_WIN32)
+#include <dirent.h>
+#include "src/SparseExtra/MatrixMarketIterator.h"
+#endif
+
+#include "../../Eigen/src/Core/util/ReenableStupidWarnings.h"
+
+#endif // EIGEN_SPARSE_EXTRA_MODULE_H
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/AutoDiff
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/AutoDiff	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/AutoDiff	(revision 2477)
@@ -0,0 +1,40 @@
+// This file is part of Eigen, a lightweight C++ template library
+// for linear algebra.
+//
+// Copyright (C) 2008-2009 Gael Guennebaud <g.gael@free.fr>
+//
+// This Source Code Form is subject to the terms of the Mozilla
+// Public License v. 2.0. If a copy of the MPL was not distributed
+// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#ifndef EIGEN_AUTODIFF_MODULE
+#define EIGEN_AUTODIFF_MODULE
+
+namespace Eigen {
+
+/**
+  * \defgroup AutoDiff_Module Auto Diff module
+  *
+  * This module features forward automatic differentation via a simple
+  * templated scalar type wrapper AutoDiffScalar.
+  *
+  * Warning : this should NOT be confused with numerical differentiation, which
+  * is a different method and has its own module in Eigen : \ref NumericalDiff_Module.
+  *
+  * \code
+  * #include <unsupported/Eigen/AutoDiff>
+  * \endcode
+  */
+//@{
+
+}
+
+#include "src/AutoDiff/AutoDiffScalar.h"
+// #include "src/AutoDiff/AutoDiffVector.h"
+#include "src/AutoDiff/AutoDiffJacobian.h"
+
+namespace Eigen {
+//@}
+}
+
+#endif // EIGEN_AUTODIFF_MODULE
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/Polynomials
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/Polynomials	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/Polynomials	(revision 2477)
@@ -0,0 +1,138 @@
+// This file is part of Eigen, a lightweight C++ template library
+// for linear algebra.
+//
+//
+// This Source Code Form is subject to the terms of the Mozilla
+// Public License v. 2.0. If a copy of the MPL was not distributed
+// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#ifndef EIGEN_POLYNOMIALS_MODULE_H
+#define EIGEN_POLYNOMIALS_MODULE_H
+
+#include <Eigen/Core>
+
+#include <Eigen/src/Core/util/DisableStupidWarnings.h>
+
+#include <Eigen/Eigenvalues>
+
+// Note that EIGEN_HIDE_HEAVY_CODE has to be defined per module
+#if (defined EIGEN_EXTERN_INSTANTIATIONS) && (EIGEN_EXTERN_INSTANTIATIONS>=2)
+  #ifndef EIGEN_HIDE_HEAVY_CODE
+  #define EIGEN_HIDE_HEAVY_CODE
+  #endif
+#elif defined EIGEN_HIDE_HEAVY_CODE
+  #undef EIGEN_HIDE_HEAVY_CODE
+#endif
+
+/**
+  * \defgroup Polynomials_Module Polynomials module
+  * \brief This module provides a QR based polynomial solver.
+	*
+  * To use this module, add
+  * \code
+  * #include <unsupported/Eigen/Polynomials>
+  * \endcode
+	* at the start of your source file.
+  */
+
+#include "src/Polynomials/PolynomialUtils.h"
+#include "src/Polynomials/Companion.h"
+#include "src/Polynomials/PolynomialSolver.h"
+
+/**
+	\page polynomials Polynomials defines functions for dealing with polynomials
+	and a QR based polynomial solver.
+	\ingroup Polynomials_Module
+
+	The remainder of the page documents first the functions for evaluating, computing
+	polynomials, computing estimates about polynomials and next the QR based polynomial
+	solver.
+
+	\section polynomialUtils convenient functions to deal with polynomials
+	\subsection roots_to_monicPolynomial
+	The function
+	\code
+	void roots_to_monicPolynomial( const RootVector& rv, Polynomial& poly )
+	\endcode
+	computes the coefficients \f$ a_i \f$ of
+
+	\f$ p(x) = a_0 + a_{1}x + ... + a_{n-1}x^{n-1} + x^n \f$
+
+	where \f$ p \f$ is known through its roots i.e. \f$ p(x) = (x-r_1)(x-r_2)...(x-r_n) \f$.
+
+	\subsection poly_eval
+	The function
+	\code
+	T poly_eval( const Polynomials& poly, const T& x )
+	\endcode
+	evaluates a polynomial at a given point using stabilized H&ouml;rner method.
+
+	The following code: first computes the coefficients in the monomial basis of the monic polynomial that has the provided roots;
+	then, it evaluates the computed polynomial, using a stabilized H&ouml;rner method.
+
+	\include PolynomialUtils1.cpp
+  Output: \verbinclude PolynomialUtils1.out
+
+	\subsection Cauchy bounds
+	The function
+	\code
+	Real cauchy_max_bound( const Polynomial& poly )
+	\endcode
+	provides a maximum bound (the Cauchy one: \f$C(p)\f$) for the absolute value of a root of the given polynomial i.e.
+	\f$ \forall r_i \f$ root of \f$ p(x) = \sum_{k=0}^d a_k x^k \f$,
+	\f$ |r_i| \le C(p) = \sum_{k=0}^{d} \left | \frac{a_k}{a_d} \right | \f$
+	The leading coefficient \f$ p \f$: should be non zero \f$a_d \neq 0\f$.
+
+
+	The function
+	\code
+	Real cauchy_min_bound( const Polynomial& poly )
+	\endcode
+	provides a minimum bound (the Cauchy one: \f$c(p)\f$) for the absolute value of a non zero root of the given polynomial i.e.
+	\f$ \forall r_i \neq 0 \f$ root of \f$ p(x) = \sum_{k=0}^d a_k x^k \f$,
+	\f$ |r_i| \ge c(p) = \left( \sum_{k=0}^{d} \left | \frac{a_k}{a_0} \right | \right)^{-1} \f$
+
+
+
+
+	\section QR polynomial solver class
+	Computes the complex roots of a polynomial by computing the eigenvalues of the associated companion matrix with the QR algorithm.
+	
+	The roots of \f$ p(x) = a_0 + a_1 x + a_2 x^2 + a_{3} x^3 + x^4 \f$ are the eigenvalues of
+	\f$
+	\left [
+	\begin{array}{cccc}
+	0 & 0 &  0 & a_0 \\
+	1 & 0 &  0 & a_1 \\
+	0 & 1 &  0 & a_2 \\
+	0 & 0 &  1 & a_3
+	\end{array} \right ]
+	\f$
+
+	However, the QR algorithm is not guaranteed to converge when there are several eigenvalues with same modulus.
+
+	Therefore the current polynomial solver is guaranteed to provide a correct result only when the complex roots \f$r_1,r_2,...,r_d\f$ have distinct moduli i.e.
+	
+	\f$ \forall i,j \in [1;d],~ \| r_i \| \neq \| r_j \| \f$.
+
+	With 32bit (float) floating types this problem shows up frequently.
+  However, almost always, correct accuracy is reached even in these cases for 64bit
+  (double) floating types and small polynomial degree (<20).
+
+	\include PolynomialSolver1.cpp
+	
+	In the above example:
+	
+	-# a simple use of the polynomial solver is shown;
+	-# the accuracy problem with the QR algorithm is presented: a polynomial with almost conjugate roots is provided to the solver.
+	Those roots have almost same module therefore the QR algorithm failed to converge: the accuracy
+	of the last root is bad;
+	-# a simple way to circumvent the problem is shown: use doubles instead of floats.
+
+  Output: \verbinclude PolynomialSolver1.out
+*/
+
+#include <Eigen/src/Core/util/ReenableStupidWarnings.h>
+
+#endif // EIGEN_POLYNOMIALS_MODULE_H
+/* vim: set filetype=cpp et sw=2 ts=2 ai: */
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/AdolcForward
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/AdolcForward	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/AdolcForward	(revision 2477)
@@ -0,0 +1,156 @@
+// This file is part of Eigen, a lightweight C++ template library
+// for linear algebra.
+//
+// Copyright (C) 2008-2009 Gael Guennebaud <g.gael@free.fr>
+//
+// This Source Code Form is subject to the terms of the Mozilla
+// Public License v. 2.0. If a copy of the MPL was not distributed
+// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#ifndef EIGEN_ADLOC_FORWARD
+#define EIGEN_ADLOC_FORWARD
+
+//--------------------------------------------------------------------------------
+//
+// This file provides support for adolc's adouble type in forward mode.
+// ADOL-C is a C++ automatic differentiation library,
+// see https://projects.coin-or.org/ADOL-C for more information.
+//
+// Note that the maximal number of directions is controlled by
+// the preprocessor token NUMBER_DIRECTIONS. The default is 2.
+//
+//--------------------------------------------------------------------------------
+
+#define ADOLC_TAPELESS
+#ifndef NUMBER_DIRECTIONS
+# define NUMBER_DIRECTIONS 2
+#endif
+#include <adolc/adouble.h>
+
+// adolc defines some very stupid macros:
+#if defined(malloc)
+# undef malloc
+#endif
+
+#if defined(calloc)
+# undef calloc
+#endif
+
+#if defined(realloc)
+# undef realloc
+#endif
+
+#include <Eigen/Core>
+
+namespace Eigen {
+
+/**
+  * \defgroup AdolcForward_Module Adolc forward module
+  * This module provides support for adolc's adouble type in forward mode.
+  * ADOL-C is a C++ automatic differentiation library,
+  * see https://projects.coin-or.org/ADOL-C for more information.
+  * It mainly consists in:
+  *  - a struct Eigen::NumTraits<adtl::adouble> specialization
+  *  - overloads of internal::* math function for adtl::adouble type.
+  *
+  * Note that the maximal number of directions is controlled by
+  * the preprocessor token NUMBER_DIRECTIONS. The default is 2.
+  *
+  * \code
+  * #include <unsupported/Eigen/AdolcSupport>
+  * \endcode
+  */
+  //@{
+
+} // namespace Eigen
+
+// Eigen's require a few additional functions which must be defined in the same namespace
+// than the custom scalar type own namespace
+namespace adtl {
+
+inline const adouble& conj(const adouble& x)  { return x; }
+inline const adouble& real(const adouble& x)  { return x; }
+inline adouble imag(const adouble&)    { return 0.; }
+inline adouble abs(const adouble&  x)  { return fabs(x); }
+inline adouble abs2(const adouble& x)  { return x*x; }
+
+}
+
+namespace Eigen {
+
+template<> struct NumTraits<adtl::adouble>
+    : NumTraits<double>
+{
+  typedef adtl::adouble Real;
+  typedef adtl::adouble NonInteger;
+  typedef adtl::adouble Nested;
+  enum {
+    IsComplex = 0,
+    IsInteger = 0,
+    IsSigned = 1,
+    RequireInitialization = 1,
+    ReadCost = 1,
+    AddCost = 1,
+    MulCost = 1
+  };
+};
+
+template<typename Functor> class AdolcForwardJacobian : public Functor
+{
+  typedef adtl::adouble ActiveScalar;
+public:
+
+  AdolcForwardJacobian() : Functor() {}
+  AdolcForwardJacobian(const Functor& f) : Functor(f) {}
+
+  // forward constructors
+  template<typename T0>
+  AdolcForwardJacobian(const T0& a0) : Functor(a0) {}
+  template<typename T0, typename T1>
+  AdolcForwardJacobian(const T0& a0, const T1& a1) : Functor(a0, a1) {}
+  template<typename T0, typename T1, typename T2>
+  AdolcForwardJacobian(const T0& a0, const T1& a1, const T1& a2) : Functor(a0, a1, a2) {}
+
+  typedef typename Functor::InputType InputType;
+  typedef typename Functor::ValueType ValueType;
+  typedef typename Functor::JacobianType JacobianType;
+
+  typedef Matrix<ActiveScalar, InputType::SizeAtCompileTime, 1> ActiveInput;
+  typedef Matrix<ActiveScalar, ValueType::SizeAtCompileTime, 1> ActiveValue;
+
+  void operator() (const InputType& x, ValueType* v, JacobianType* _jac) const
+  {
+    eigen_assert(v!=0);
+    if (!_jac)
+    {
+      Functor::operator()(x, v);
+      return;
+    }
+
+    JacobianType& jac = *_jac;
+
+    ActiveInput ax = x.template cast<ActiveScalar>();
+    ActiveValue av(jac.rows());
+
+    for (int j=0; j<jac.cols(); j++)
+      for (int i=0; i<jac.cols(); i++)
+        ax[i].setADValue(j, i==j ? 1 : 0);
+
+    Functor::operator()(ax, &av);
+
+    for (int i=0; i<jac.rows(); i++)
+    {
+      (*v)[i] = av[i].getValue();
+      for (int j=0; j<jac.cols(); j++)
+        jac.coeffRef(i,j) = av[i].getADValue(j);
+    }
+  }
+protected:
+
+};
+
+//@}
+
+}
+
+#endif // EIGEN_ADLOC_FORWARD
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/NumericalDiff
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/NumericalDiff	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/NumericalDiff	(revision 2477)
@@ -0,0 +1,56 @@
+// This file is part of Eigen, a lightweight C++ template library
+// for linear algebra.
+//
+// Copyright (C) 2009 Thomas Capricelli <orzel@freehackers.org>
+//
+// This Source Code Form is subject to the terms of the Mozilla
+// Public License v. 2.0. If a copy of the MPL was not distributed
+// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#ifndef EIGEN_NUMERICALDIFF_MODULE
+#define EIGEN_NUMERICALDIFF_MODULE
+
+#include <Eigen/Core>
+
+namespace Eigen {
+
+/**
+  * \defgroup NumericalDiff_Module Numerical differentiation module
+  *
+  * \code
+  * #include <unsupported/Eigen/NumericalDiff>
+  * \endcode
+  *
+  * See http://en.wikipedia.org/wiki/Numerical_differentiation
+  *
+  * Warning : this should NOT be confused with automatic differentiation, which
+  * is a different method and has its own module in Eigen : \ref
+  * AutoDiff_Module.
+  *
+  * Currently only "Forward" and "Central" schemes are implemented. Those
+  * are basic methods, and there exist some more elaborated way of
+  * computing such approximates. They are implemented using both
+  * proprietary and free software, and usually requires linking to an
+  * external library. It is very easy for you to write a functor
+  * using such software, and the purpose is quite orthogonal to what we
+  * want to achieve with Eigen.
+  *
+  * This is why we will not provide wrappers for every great numerical
+  * differentiation software that exist, but should rather stick with those
+  * basic ones, that still are useful for testing.
+  *
+  * Also, the \ref NonLinearOptimization_Module needs this in order to
+  * provide full features compatibility with the original (c)minpack
+  * package.
+  *
+  */
+}
+
+//@{
+
+#include "src/NumericalDiff/NumericalDiff.h"
+
+//@}
+
+
+#endif // EIGEN_NUMERICALDIFF_MODULE
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/AlignedVector3
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/AlignedVector3	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/AlignedVector3	(revision 2477)
@@ -0,0 +1,190 @@
+// This file is part of Eigen, a lightweight C++ template library
+// for linear algebra.
+//
+// Copyright (C) 2009 Gael Guennebaud <g.gael@free.fr>
+//
+// This Source Code Form is subject to the terms of the Mozilla
+// Public License v. 2.0. If a copy of the MPL was not distributed
+// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#ifndef EIGEN_ALIGNED_VECTOR3
+#define EIGEN_ALIGNED_VECTOR3
+
+#include <Eigen/Geometry>
+
+namespace Eigen {
+
+/**
+  * \defgroup AlignedVector3_Module Aligned vector3 module
+  *
+  * \code
+  * #include <unsupported/Eigen/AlignedVector3>
+  * \endcode
+  */
+  //@{
+
+
+/** \class AlignedVector3
+  *
+  * \brief A vectorization friendly 3D vector
+  *
+  * This class represents a 3D vector internally using a 4D vector
+  * such that vectorization can be seamlessly enabled. Of course,
+  * the same result can be achieved by directly using a 4D vector.
+  * This class makes this process simpler.
+  *
+  */
+// TODO specialize Cwise
+template<typename _Scalar> class AlignedVector3;
+
+namespace internal {
+template<typename _Scalar> struct traits<AlignedVector3<_Scalar> >
+  : traits<Matrix<_Scalar,3,1,0,4,1> >
+{
+};
+}
+
+template<typename _Scalar> class AlignedVector3
+  : public MatrixBase<AlignedVector3<_Scalar> >
+{
+    typedef Matrix<_Scalar,4,1> CoeffType;
+    CoeffType m_coeffs;
+  public:
+
+    typedef MatrixBase<AlignedVector3<_Scalar> > Base;	
+    EIGEN_DENSE_PUBLIC_INTERFACE(AlignedVector3)
+    using Base::operator*;
+
+    inline Index rows() const { return 3; }
+    inline Index cols() const { return 1; }
+
+    inline const Scalar& coeff(Index row, Index col) const
+    { return m_coeffs.coeff(row, col); }
+
+    inline Scalar& coeffRef(Index row, Index col)
+    { return m_coeffs.coeffRef(row, col); }
+
+    inline const Scalar& coeff(Index index) const
+    { return m_coeffs.coeff(index); }
+
+    inline Scalar& coeffRef(Index index)
+    { return m_coeffs.coeffRef(index);}
+
+
+    inline AlignedVector3(const Scalar& x, const Scalar& y, const Scalar& z)
+      : m_coeffs(x, y, z, Scalar(0))
+    {}
+
+    inline AlignedVector3(const AlignedVector3& other)
+      : Base(), m_coeffs(other.m_coeffs)
+    {}
+
+    template<typename XprType, int Size=XprType::SizeAtCompileTime>
+    struct generic_assign_selector {};
+
+    template<typename XprType> struct generic_assign_selector<XprType,4>
+    {
+      inline static void run(AlignedVector3& dest, const XprType& src)
+      {
+        dest.m_coeffs = src;
+      }
+    };
+
+    template<typename XprType> struct generic_assign_selector<XprType,3>
+    {
+      inline static void run(AlignedVector3& dest, const XprType& src)
+      {
+        dest.m_coeffs.template head<3>() = src;
+        dest.m_coeffs.w() = Scalar(0);
+      }
+    };
+
+    template<typename Derived>
+    inline explicit AlignedVector3(const MatrixBase<Derived>& other)
+    {
+      generic_assign_selector<Derived>::run(*this,other.derived());
+    }
+
+    inline AlignedVector3& operator=(const AlignedVector3& other)
+    { m_coeffs = other.m_coeffs; return *this; }
+
+
+    inline AlignedVector3 operator+(const AlignedVector3& other) const
+    { return AlignedVector3(m_coeffs + other.m_coeffs); }
+
+    inline AlignedVector3& operator+=(const AlignedVector3& other)
+    { m_coeffs += other.m_coeffs; return *this; }
+
+    inline AlignedVector3 operator-(const AlignedVector3& other) const
+    { return AlignedVector3(m_coeffs - other.m_coeffs); }
+
+    inline AlignedVector3 operator-=(const AlignedVector3& other)
+    { m_coeffs -= other.m_coeffs; return *this; }
+
+    inline AlignedVector3 operator*(const Scalar& s) const
+    { return AlignedVector3(m_coeffs * s); }
+
+    inline friend AlignedVector3 operator*(const Scalar& s,const AlignedVector3& vec)
+    { return AlignedVector3(s * vec.m_coeffs); }
+
+    inline AlignedVector3& operator*=(const Scalar& s)
+    { m_coeffs *= s; return *this; }
+
+    inline AlignedVector3 operator/(const Scalar& s) const
+    { return AlignedVector3(m_coeffs / s); }
+
+    inline AlignedVector3& operator/=(const Scalar& s)
+    { m_coeffs /= s; return *this; }
+
+    inline Scalar dot(const AlignedVector3& other) const
+    {
+      eigen_assert(m_coeffs.w()==Scalar(0));
+      eigen_assert(other.m_coeffs.w()==Scalar(0));
+      return m_coeffs.dot(other.m_coeffs);
+    }
+
+    inline void normalize()
+    {
+      m_coeffs /= norm();
+    }
+
+    inline AlignedVector3 normalized()
+    {
+      return AlignedVector3(m_coeffs / norm());
+    }
+
+    inline Scalar sum() const
+    {
+      eigen_assert(m_coeffs.w()==Scalar(0));
+      return m_coeffs.sum();
+    }
+
+    inline Scalar squaredNorm() const
+    {
+      eigen_assert(m_coeffs.w()==Scalar(0));
+      return m_coeffs.squaredNorm();
+    }
+
+    inline Scalar norm() const
+    {
+      using std::sqrt;
+      return sqrt(squaredNorm());
+    }
+
+    inline AlignedVector3 cross(const AlignedVector3& other) const
+    {
+      return AlignedVector3(m_coeffs.cross3(other.m_coeffs));
+    }
+
+    template<typename Derived>
+    inline bool isApprox(const MatrixBase<Derived>& other, const RealScalar& eps=NumTraits<Scalar>::dummy_precision()) const
+    {
+      return m_coeffs.template head<3>().isApprox(other,eps);
+    }
+};
+
+//@}
+
+}
+
+#endif // EIGEN_ALIGNED_VECTOR3
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/IterativeSolvers
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/IterativeSolvers	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/RcppEigen/include/unsupported/Eigen/IterativeSolvers	(revision 2477)
@@ -0,0 +1,45 @@
+// This file is part of Eigen, a lightweight C++ template library
+// for linear algebra.
+//
+// Copyright (C) 2008-2009 Gael Guennebaud <g.gael@free.fr>
+//
+// This Source Code Form is subject to the terms of the Mozilla
+// Public License v. 2.0. If a copy of the MPL was not distributed
+// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#ifndef EIGEN_ITERATIVE_SOLVERS_MODULE_H
+#define EIGEN_ITERATIVE_SOLVERS_MODULE_H
+
+#include <Eigen/Sparse>
+
+/**
+  * \defgroup IterativeSolvers_Module Iterative solvers module
+  * This module aims to provide various iterative linear and non linear solver algorithms.
+  * It currently provides:
+  *  - a constrained conjugate gradient
+  *  - a Householder GMRES implementation
+  * \code
+  * #include <unsupported/Eigen/IterativeSolvers>
+  * \endcode
+  */
+//@{
+
+#include "../../Eigen/src/misc/Solve.h"
+#include "../../Eigen/src/misc/SparseSolve.h"
+
+#ifndef EIGEN_MPL2_ONLY
+#include "src/IterativeSolvers/IterationController.h"
+#include "src/IterativeSolvers/ConstrainedConjGrad.h"
+#endif
+
+#include "src/IterativeSolvers/IncompleteLU.h"
+#include "../../Eigen/Jacobi"
+#include "../../Eigen/Householder"
+#include "src/IterativeSolvers/GMRES.h"
+#include "src/IterativeSolvers/IncompleteCholesky.h"
+//#include "src/IterativeSolvers/SSORPreconditioner.h"
+#include "src/IterativeSolvers/MINRES.h"
+
+//@}
+
+#endif // EIGEN_ITERATIVE_SOLVERS_MODULE_H
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/po/fr/LC_MESSAGES/R-lattice.mo
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/po/fr/LC_MESSAGES/R-lattice.mo
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/po/de/LC_MESSAGES/R-lattice.mo
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/po/de/LC_MESSAGES/R-lattice.mo
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/po/ko/LC_MESSAGES/R-lattice.mo
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/po/ko/LC_MESSAGES/R-lattice.mo
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/po/en@quot/LC_MESSAGES/R-lattice.mo
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/po/en@quot/LC_MESSAGES/R-lattice.mo
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/po/pl/LC_MESSAGES/R-lattice.mo
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/po/pl/LC_MESSAGES/R-lattice.mo
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/R/lattice
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/R/lattice	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/R/lattice	(revision 2477)
@@ -0,0 +1,27 @@
+#  File share/R/nspackloader.R
+#  Part of the R package, http://www.R-project.org
+#
+#  Copyright (C) 1995-2012 The R Core Team
+#
+#  This program is free software; you can redistribute it and/or modify
+#  it under the terms of the GNU General Public License as published by
+#  the Free Software Foundation; either version 2 of the License, or
+#  (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  A copy of the GNU General Public License is available at
+#  http://www.r-project.org/Licenses/
+
+local({
+    info <- loadingNamespaceInfo()
+    pkg <- info$pkgname
+    ns <- .getNamespace(as.name(pkg))
+    if (is.null(ns))
+        stop("cannot find namespace environment for ", pkg, domain = NA);
+    dbbase <- file.path(info$libname, pkg, "R", pkg)
+    lazyLoad(dbbase, ns, filter = function(n) n != ".__NAMESPACE__.")
+})
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/R/lattice.rdb
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/R/lattice.rdb
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/R/lattice.rdx
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/R/lattice.rdx
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/tests/test.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/tests/test.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/tests/test.R	(revision 2477)
@@ -0,0 +1,137 @@
+postscript("test.ps")
+library(lattice)
+
+lattice.options(default.args =
+                list(page = function(n) {
+                    grid::grid.text(label = paste(deparse(trellis.last.object()$call, width.cutoff = 150L), collapse = "\n"),
+                                    x = 0.01, y = 0.99, just = c("left", "top"))
+                }))
+
+densityplot(~ 5)
+densityplot(~ 1:5 | letters[1:5])
+
+x <- rnorm(200)
+y <- rnorm(200)
+z <- equal.count(rnorm(200))
+a <- factor(rep(1:3, len = 200))
+
+df.test <- list(xx = x+1-min(x), yy = y, zz = z, aa = a)
+
+xyplot(y ~ x | z * a, strip = function(...) strip.default(..., style = 4),
+       par.strip.text = list(cex = 2, col = "blue", font = 2),
+       ##scales = list(x = list(draw = FALSE),  y = "sliced"))
+       scales = list(x = list(rot = 0), y = list(rot = 0)))
+
+xyplot(a ~ x | z,
+       main = "xyplot call with modified options",
+       lattice.options =
+       list(panel.xyplot = "panel.bwplot",
+            default.args = list(between = list(x = 1, y = 1))))
+
+
+
+
+bwplot(zz ~ xx | aa, df.test)
+
+bwplot(aa ~ xx | zz, df.test, 
+       scales =
+       list(x = list(log = "e", tck = 5, rot = 90,  cex = 2),
+            y = list(col = "red", tck = 3, alternating = TRUE, cex = 5,  rot = 0),
+            tick.number = 20),
+       main = list("main", cex = 5),
+       sub = list("sub", cex = 5),
+       xlab = list("xlab", cex = 5),
+       ylab = list("ylab", cex = 5))
+
+
+bwplot(~zz , df.test)
+bwplot(~xx , df.test)
+
+dotplot(zz ~ xx | aa, df.test)
+dotplot(aa ~ xx | zz, df.test)
+
+dotplot(~zz , df.test)
+dotplot(~xx , df.test)
+
+stripplot(zz ~ xx | aa, df.test)
+stripplot(aa ~ xx | zz, df.test)
+stripplot(~zz , df.test)
+stripplot(~xx , df.test)
+
+
+
+xa <- 1:8
+xb <- rep( c( NA, 10 ), 4 )
+
+xc <- rep( c( 'C2', 'C1' ), 4 )
+xyplot( xa ~ xb | xc)
+xyplot( xa ~ xb | xc, scales = "free")
+
+xc <- rep( c( 'C1', 'C2' ), 4 )
+xyplot( xa ~ xb | xc)
+xyplot( xa ~ xb | xc, scales = "free")
+
+x = sample(1:3, 100, replace=TRUE)
+histogram( ~ x, breaks=c(0,1.5,2.5,3.5), type='count')
+histogram( ~ x, breaks=c(0,1.5,2.5,3.5), type='density')
+
+
+## splom pscales
+
+data(iris)
+iris2 <- iris[,1:4]
+
+splom(iris2, groups = iris$Species,
+      pscales = 10)
+
+splom(iris2, groups = iris$Species,
+      pscales = list(list(at = 6, lab = "six"), list(at = 3), list(at = 4), list(at = 1)))
+
+splom(iris2, groups = iris$Species,
+      pscales = list(list(at = 6, lab = "six", limits = c(-10, 10)),
+      list(at = 3), list(at = 4), list(limits = c(-5, 5))))
+
+
+## factors in formula
+
+data(barley)
+levelplot(yield ~ year * variety | site, barley,
+          panel = function(x, y, ...) {
+              x <- as.numeric(x)
+              y <- as.numeric(y)
+              panel.levelplot(x, y, ...)
+          })
+
+
+data(volcano)
+levelplot(volcano, key = list(x = .5, y = .5, points = list(col = 1:3)),
+          legend = list(top = list(fun = grid::textGrob("This \nis \na \nstupid \nlegend"))))
+
+
+## demo of seekViewport
+
+library(grid)
+
+splom(~iris[1:3]|Species, data = iris, 
+      layout=c(2,2), pscales = 0,
+      varnames = c("Sepal\nLength", "Sepal\nWidth", "Petal\nLength"),
+      page = function(...) {
+          ltext(x = seq(.6, .8, len = 4), 
+                y = seq(.9, .6, len = 4), 
+                lab = c("Three", "Varieties", "of", "Iris"),
+                cex = 2)
+      }, par.settings = list(clip = list(panel = FALSE)))
+
+seekViewport(vpPath(trellis.vpname("panel", 1, 1), "pairs", "subpanel.2.3"))
+grid.yaxis(main = TRUE)
+
+seekViewport(vpPath(trellis.vpname("panel", 2, 1), "pairs", "subpanel.2.1"))
+grid.yaxis(main = FALSE)
+
+seekViewport(vpPath(trellis.vpname("panel", 1, 2), "pairs", "subpanel.2.2"))
+grid.yaxis(main = FALSE)
+
+demo("lattice")
+dev.off()
+
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/tests/dates.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/tests/dates.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/tests/dates.R	(revision 2477)
@@ -0,0 +1,25 @@
+
+postscript("date.ps")
+library(lattice)
+
+## POSIXt handling
+
+y <- Sys.time() + 10000 * 1:100
+x <- rnorm(100)
+b <- gl(3,1,100)
+
+xyplot(y ~ x | b)
+xyplot(y ~ x | b, scales = list(relation = "free", rot = 0))
+xyplot(y ~ x | b, scales = "sliced")
+
+## Date handling
+
+dat <-
+    data.frame(a = 1:10,
+               b = seq(as.Date("2003/1/1"), as.Date("2003/1/10"), by="day"))
+xyplot(a~b, dat)
+xyplot(a~b, dat, scales=list(x=list(at=dat$b)))
+
+
+dev.off()
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/tests/fontsize.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/tests/fontsize.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/tests/fontsize.R	(revision 2477)
@@ -0,0 +1,14 @@
+pdf("fontsize.pdf", pointsize = 5)
+library(lattice)
+
+splom(iris, sub = "fontsize : 5")
+
+trellis.par.set(grid.pars = list(fontsize = 10))
+splom(iris, sub = "fontsize : 10")
+
+trellis.par.set(fontsize = list(text = 15))
+splom(iris, sub = "fontsize : 15")
+
+
+
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/tests/wireframe.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/tests/wireframe.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/tests/wireframe.R	(revision 2477)
@@ -0,0 +1,113 @@
+
+library(lattice)
+data(volcano)
+
+foo <-
+    data.frame(z = as.vector(volcano),
+               x = rep(1:87, 61),
+               y = rep(1:61, each = 87))
+
+wireframe(z ~ x * y, foo)
+
+## this used to give an error, but seems fine now (?)
+wireframe(z ~ x * y, foo, subset = z > 150)
+
+
+## Example 1 (a). valgrind shows warnings, starting with
+
+
+## ==9058== Invalid read of size 8
+## ==9058==    at 0xA450AFF: wireframePanelCalculations (threeDplot.c:291)
+
+## and subsequently in various other places in that function leading to
+
+## ==9058== Conditional jump or move depends on uninitialised value(s)
+## ==9058==    at 0x3FFAA466CF: __printf_fp (in /lib64/libc-2.4.so)
+## ==9058==    by 0x3FFAA423AE: vfprintf (in /lib64/libc-2.4.so)
+## ==9058==    by 0x3FFAA4A477: fprintf (in /lib64/libc-2.4.so)
+## ==9058==    by 0x94975BE: PostScriptRLineTo (devPS.c:2683)
+
+## A bit more tracing shows it is accessing element 4016 in an array of
+## length 2456, and the plot seems nonsense (and random) when viewed on
+## screen. (BDR, 2006/09/17)
+
+## DS's earlier comment: what's this supposed to do ?  weird thing is,
+## result is random (probably indicator of memory access errors)
+
+if (FALSE)
+{
+
+    wireframe(z + I(z + 100) ~ x * y, foo,
+              subset = z > 150,
+              scales = list(arrows = FALSE))
+}
+
+## this works as expected
+
+wireframe(z + I(z + 100) ~ x * y, foo)
+
+## Example 1 (b).  Another way of seeing the problem:
+
+## this is OK:
+
+bar <- foo
+bar$z[bar$z < 150] <- NA
+wireframe(z + I(z + 100) ~ x * y, bar,
+          scales = list(arrows = FALSE))
+
+## but this is not
+if (FALSE)
+{
+    wireframe(z + I(z + 100) ~ x * y,
+              subset(bar, !is.na(z)),
+              scales = list(arrows = FALSE))
+}
+
+
+## Example 2.  Probably another example of the same "bug": see
+## https://stat.ethz.ch/pipermail/r-devel/2005-September/034544.html
+
+
+library(lattice)
+
+n <- 20
+psteps <- 50
+binomtable <- function(n, psteps)
+{
+    x <- (0:(10*n))/10
+    p <- (0:psteps)/psteps
+    dd <- expand.grid(x=x,p=p)
+    dd$F <- pbinom(dd$x,n,dd$p)
+    dd$x0 <-trunc(dd$x)
+    dd
+}
+
+bt <- binomtable(n = 5, psteps = 100)
+bt[bt$x - bt$x0 >= 0.9, ]$F <- NA
+
+if (FALSE)
+{
+    ## this is problematic
+    wireframe(F ~ x * p, bt,
+              groups = bt$x0, shade = TRUE,
+              scales = list(arrows = FALSE)) 
+}
+
+## this one OK
+wireframe(F ~ x * p, bt, shade = TRUE,
+          scales = list(arrows = FALSE))
+
+## this too
+wireframe(F ~ x * p | factor(x0), bt,
+          ## groups = bt$x0,
+          shade = TRUE,
+          scales = list(arrows = FALSE)) 
+
+
+## Working hypothesis: the problem crops up when there are groups
+## (specified either directly or through the formula interface) AND x
+## and y values for each group don't represent the full evaluation
+## grid.  The second condition is a bit unclear.  In example 2, each
+## group's support is disjoint from that of the others.  In example 1,
+## both groups have the same support, they are just not the full grid.
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/tests/MASSch04.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/tests/MASSch04.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/tests/MASSch04.R	(revision 2477)
@@ -0,0 +1,179 @@
+#-*- R -*-
+
+## Script from Fourth Edition of `Modern Applied Statistics with S'
+
+# Chapter 4   Graphical Output
+
+library(MASS)
+library(lattice)
+trellis.device(postscript, file="ch04.ps", width=8, height=6,
+               pointsize=9)
+options(echo=T, width=65, digits=5)
+
+
+# 4.2  Basic plotting functions
+
+topo.loess <- loess(z ~ x * y, topo, degree = 2, span = 0.25)
+topo.mar <- list(x = seq(0, 6.5, 0.2), y=seq(0, 6.5, 0.2))
+topo.lo <- predict(topo.loess, expand.grid(topo.mar))
+topo.lo1 <- cbind(expand.grid(x=topo.mar$x, y=topo.mar$y),
+                  z=as.vector(topo.lo))
+contourplot(z ~ x * y, topo.lo1, aspect = 1,
+  at = seq(700, 1000, 25), xlab = "", ylab = "",
+  panel = function(x, y, subscripts, ...) {
+     panel.levelplot(x, y, subscripts, ...)
+     panel.xyplot(topo$x, topo$y, cex = 0.5)
+  }
+)
+
+
+
+
+
+
+
+# 4.5  Trellis graphics
+
+
+xyplot(time ~ dist, data = hills,
+  panel = function(x, y, ...) {
+     panel.xyplot(x, y, ...)
+     panel.lmline(x, y, type = "l")
+     panel.abline(lqs(y ~ x), lty = 3)
+#     identify(x, y, row.names(hills))
+  }
+)
+
+bwplot(Expt ~ Speed, data = michelson, ylab = "Experiment No.",
+       main = "Speed of Light Data")
+
+
+data(swiss)
+splom(~ swiss, aspect = "fill",
+  panel = function(x, y, ...) {
+     panel.xyplot(x, y, ...); panel.loess(x, y, ...)
+  }
+)
+
+sps <- trellis.par.get("superpose.symbol")
+sps$pch <- 1:7
+trellis.par.set("superpose.symbol", sps)
+xyplot(Time ~ Viscosity, data = stormer, groups = Wt,
+   panel = panel.superpose, type = "b",
+   key = list(columns = 3,
+       text = list(paste(c("Weight:   ", "", ""),
+                         unique(stormer$Wt), "gms")),
+       points = Rows(sps, 1:3)
+       )
+)
+rm(sps)
+
+topo.plt <- expand.grid(topo.mar)
+topo.plt$pred <- as.vector(predict(topo.loess, topo.plt))
+levelplot(pred ~ x * y, topo.plt, aspect = 1,
+  at = seq(690, 960, 10), xlab = "", ylab = "",
+  panel = function(x, y, subscripts, ...) {
+     panel.levelplot(x, y, subscripts, ...)
+     panel.xyplot(topo$x,topo$y, cex = 0.5, col = 1)
+  }
+)
+
+## if (F) {
+wireframe(pred ~ x * y, topo.plt, aspect = c(1, 0.5),
+  drape = T, screen = list(z = -150, x = -60),
+  colorkey = list(space="right", height=0.6))
+## }
+
+lcrabs.pc <- predict(princomp(log(crabs[,4:8])))
+crabs.grp <- c("B", "b", "O", "o")[rep(1:4, each = 50)]
+splom(~ lcrabs.pc[, 1:3], groups = crabs.grp,
+   panel = panel.superpose,
+   key = list(text = list(c("Blue male", "Blue female",
+                            "Orange Male", "Orange female")),
+       points = Rows(trellis.par.get("superpose.symbol"), 1:4),
+       columns = 4)
+  )
+
+sex <- crabs$sex
+levels(sex) <- c("Female", "Male")
+sp <- crabs$sp
+levels(sp) <- c("Blue", "Orange")
+splom(~ lcrabs.pc[, 1:3] | sp*sex, cex = 0.5, pscales = 0)
+
+Quine <- quine
+levels(Quine$Eth) <- c("Aboriginal", "Non-aboriginal")
+levels(Quine$Sex) <- c("Female", "Male")
+levels(Quine$Age) <- c("primary", "first form",
+                      "second form", "third form")
+levels(Quine$Lrn) <- c("Average learner", "Slow learner")
+bwplot(Age ~ Days | Sex*Lrn*Eth, data = Quine)
+
+bwplot(Age ~ Days | Sex*Lrn*Eth, data = Quine, layout = c(4, 2),
+      strip = function(...) strip.default(..., style = 1))
+
+stripplot(Age ~ Days | Sex*Lrn*Eth, data = Quine,
+         jitter = TRUE, layout = c(4, 2))
+
+stripplot(Age ~ Days | Eth*Sex, data = Quine,
+   groups = Lrn, jitter = TRUE,
+   panel = function(x, y, subscripts, jitter.data = F, ...) {
+       if(jitter.data)  y <- jitter(as.numeric(y))
+       panel.superpose(x, y, subscripts, ...)
+   },
+   xlab = "Days of absence",
+   between = list(y = 1), par.strip.text = list(cex = 0.7),
+   key = list(columns = 2, text = list(levels(Quine$Lrn)),
+       points = Rows(trellis.par.get("superpose.symbol"), 1:2)
+       ),
+   strip = function(...)
+        strip.default(..., strip.names = c(TRUE, TRUE), style = 1)
+)
+
+fgl0 <- fgl[ ,-10] # omit type.
+fgl.df <- data.frame(type = rep(fgl$type, 9),
+  y = as.vector(as.matrix(fgl0)),
+  meas = factor(rep(1:9, each = 214), labels = names(fgl0)))
+stripplot(type ~ y | meas, data = fgl.df,
+  scales = list(x = "free"), xlab = "", cex = 0.5,
+  strip = function(...) strip.default(style = 1, ...))
+
+if(F) { # no data supplied
+xyplot(ratio ~ scant | subject, data = A5,
+      xlab = "scan interval (years)",
+      ylab = "ventricle/brain volume normalized to 1 at start",
+      subscripts = TRUE, ID = A5$ID,
+      strip = function(factor, ...)
+         strip.default(..., factor.levels = labs, style = 1),
+      layout = c(8, 5, 1),
+      skip = c(rep(FALSE, 37), rep(TRUE, 1), rep(FALSE, 1)),
+      panel = function(x, y, subscripts, ID) {
+          panel.xyplot(x, y, type = "b", cex = 0.5)
+          which <- unique(ID[subscripts])
+          panel.xyplot(c(0, 1.5), pr3[names(pr3) == which],
+                       type = "l", lty = 3)
+          if(which == 303 || which == 341) points(1.4, 1.3)
+      })
+}
+
+Cath <- equal.count(swiss$Catholic, number = 6, overlap = 0.25)
+xyplot(Fertility ~ Education | Cath, data = swiss,
+  span = 1, layout = c(6, 1), aspect = 1,
+  panel = function(x, y, span) {
+     panel.xyplot(x, y); panel.loess(x, y, span)
+  }
+)
+
+Cath2 <- equal.count(swiss$Catholic, number = 2, overlap = 0)
+Agr <- equal.count(swiss$Agric, number = 3, overlap = 0.25)
+xyplot(Fertility ~ Education | Agr * Cath2, data = swiss,
+  span = 1, aspect = "xy",
+  panel = function(x, y, span) {
+     panel.xyplot(x, y); panel.loess(x, y, span)
+  }
+)
+
+Cath
+levels(Cath)
+plot(Cath, aspect = 0.3)
+
+# End of ch04
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/tests/temp.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/tests/temp.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/tests/temp.R	(revision 2477)
@@ -0,0 +1,141 @@
+
+postscript("temp.ps")
+library(lattice)
+
+
+## dotplot labels problem
+
+xx <- 1:10
+names(xx) <- rep(letters[1:5], 2)
+dotplot(xx)
+
+
+
+
+
+
+## missing levels of factors
+## drop unused levels
+
+x <- 1:100
+y <- rnorm(100)
+g <- gl(4, 25, 100)
+
+xyplot(y ~ x | g)
+xyplot(y ~ x | g, subset = g != "2")
+xyplot(y ~ x | g, subset = g != "2",
+       panel = function(x, y, subscripts) {
+           print(subscripts)
+           ltext(x, y, lab = subscripts)
+       })
+
+
+
+## subset & subscript interaction
+
+x <- rnorm(50)
+y <- rnorm(50)
+subset <- 20:40
+
+xyplot(y ~ x,
+       panel = function(x, y, subscripts) {
+           print(subscripts)
+           ltext(x, y, lab = subscripts)
+       })
+
+## gives subscripts = 20:40
+xyplot(y ~ x, subset = subset,
+       panel = function(x, y, subscripts) {
+           print(subscripts)
+           ltext(x, y, lab = subscripts)
+       })
+
+g <- gl(2,1,50)
+
+xyplot(y ~ x, groups = g, panel = panel.superpose)
+xyplot(y ~ x, groups = g, panel = panel.superpose, subset = subset)
+
+
+
+
+
+
+
+
+## reordering tests
+
+data(iris)
+iris$foo <- equal.count(iris$Sepal.Length)
+
+foo <- xyplot(Petal.Length ~ Petal.Width | Species + foo, iris)
+
+foo
+
+foo$subset.cond <- list(1:3, 1:6)
+foo$perm.cond <- 1:2
+foo
+
+foo$perm.cond <- 2:1
+foo$subset.cond <- list(c(1,2,3,1), 2:4)
+foo
+
+
+
+bar <- xyplot(Petal.Length ~ Petal.Width | Species + foo, iris, skip = c(F, T))
+bar
+
+bar <- xyplot(Petal.Length ~ Petal.Width | Species + foo, iris, skip = c(F, T), scales = "free")
+bar
+
+
+
+
+
+## other stuff
+
+x <- numeric(0)
+y <- numeric(0)
+
+bwplot(y ~ x)  # fails? FIXME
+
+
+x <- c(rnorm(10), rep(NA, 10))
+y <- gl(1, 20)
+a <- gl(2, 10)
+
+bwplot(x ~ y | a)
+
+
+## warning: why ?
+bwplot(x ~ y | a * a)
+
+
+
+
+## example from Wolfram Fischer
+
+
+my.barley <- subset( barley, ! ( site == "Grand Rapids" & year == "1932" ) )
+
+dotplot(variety ~ yield | year * site, my.barley,
+        layout=c(6,2), between=list(x=c(0,6)))
+
+
+
+dotplot(variety ~ yield | year * site, data = my.barley,
+        layout=c(6,2),
+        scales =
+        list(rot = 0,
+             y =
+             list(relation='sliced', 
+                  at = rep( list( FALSE, NULL ), 6 ))),
+        par.settings =
+        list(layout.widths = list(axis.panel = rep(c(1, 0), 3))))
+
+
+
+
+dev.off()
+
+
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/tests/levelplot.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/tests/levelplot.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/tests/levelplot.R	(revision 2477)
@@ -0,0 +1,115 @@
+
+postscript("levelplot.ps")
+library(lattice)
+
+data(volcano)
+
+foo <-
+    data.frame(z = as.vector(volcano),
+               x = rep(1:87, 61),
+               y = rep(1:61, each = 87))
+
+levelplot(z ~ x * y, subset(foo, z > 150), contour = T)
+levelplot(z ~ x * y, foo, subset = z > 150, contour = T)
+contourplot(z ~ x * y, foo, subset = z > 150, cuts = 10)
+
+## subset group interaction has problems (does it any longer):
+
+cloud(Sepal.Length ~ Petal.Length * Petal.Width, 
+      data = iris, cex = 0.8, groups = Species, subpanel = panel.superpose, 
+      main = "Stereo", screen = list(z = 20, x = -70, y = 0), subset = 30:60)
+
+cloud(Sepal.Length ~ Petal.Length * Petal.Width, 
+      data = iris[30:60, ], cex = 0.8, groups = Species, subpanel = panel.superpose, 
+      main = "Stereo", screen = list(z = 20, x = -70, y = 0))
+
+
+levelplot(Sepal.Length ~ Petal.Length * Petal.Width, 
+          data = iris, groups = Species, 
+          subset = 30:60)
+
+
+
+
+cloud(z ~ x * y, foo)
+cloud(z ~ x * y, foo, subset = z > 150)
+
+
+
+## long format: NA's clipped at the beginning (??)
+
+splom(~iris[,1:4], iris, groups = Species)
+splom(~iris[,1:4], iris, groups = Species, subset = 70:130, auto.key = T)
+
+parallel(~iris[,1:4] | Species, iris, subset = 30:130)
+
+## NA-s in matrix
+
+volna <- volcano
+volna[20:40, 20:40] <- NA
+levelplot(volna)
+cloud(volna)
+wireframe(volna)
+
+
+
+dev.off()
+
+
+
+
+# grid.newpage()
+# pushViewport(viewport())
+# grid.lines(x = c(1:5, NA, 7:10) / 10,
+#            y = c(1:5, NA, 7:10) / 10)
+
+# grid.points(x = c(1:5, NA, 7:10) / 10,
+#             y = c(1:5, 6, 7:10) / 10)
+
+
+
+
+# grid.points(x = .5, y = .1, pch = 16, gp = gpar(cex  = 1))
+# grid.points(x = .5, y = .2, pch = 16, gp = gpar(cex  = 3))
+
+# grid.points(x = .5, y = .3, pch = '+', gp = gpar(cex  = 1))
+# grid.points(x = .5, y = .4, pch = '+', gp = gpar(cex  = 3))
+
+
+
+
+# viewport[ROOT] ->
+
+#     (viewport[GRIDVP1182]->
+
+#      (viewport[GRIDVP1185],
+#       viewport[GRIDVP1187],
+#       viewport[GRIDVP1189],
+#       viewport[GRIDVP1190],
+
+#       viewport[panel.1]->
+
+#       (viewport[GRIDVP1184]->
+       
+#        (viewport[subpanel.1.1],
+#         viewport[subpanel.1.2], viewport[subpanel.1.3],
+#         viewport[subpanel.2.1], viewport[subpanel.2.2],
+#         viewport[subpanel.2.3], viewport[subpanel.3.1],
+#         viewport[subpanel.3.2], viewport[subpanel.3.3])),
+
+#       viewport[panel.2]->
+#       (viewport[GRIDVP1186]->
+#        (viewport[subpanel.1.1],
+#         viewport[subpanel.1.2], viewport[subpanel.1.3],
+#         viewport[subpanel.2.1], viewport[subpanel.2.2],
+#         viewport[subpanel.2.3], viewport[subpanel.3.1],
+#         viewport[subpanel.3.2], viewport[subpanel.3.3])),
+
+#       viewport[panel.3]->
+#       (viewport[GRIDVP1188]->
+#        (viewport[subpanel.1.1],
+#         viewport[subpanel.1.2], viewport[subpanel.1.3],
+#         viewport[subpanel.2.1], viewport[subpanel.2.2],
+#         viewport[subpanel.2.3], viewport[subpanel.3.1],
+#         viewport[subpanel.3.2], viewport[subpanel.3.3]))))
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/tests/dotplotscoping.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/tests/dotplotscoping.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/tests/dotplotscoping.R	(revision 2477)
@@ -0,0 +1,13 @@
+postscript("dotplotscoping.ps")
+library(lattice)
+
+fubar <- function() {
+    k <- 2
+    kkk <- 1:10
+    names(kkk) <- 1:10
+    data = list(x=kkk)
+    dotplot(~x^k + rnorm(10), data)
+}
+
+fubar()
+dev.off()
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/tests/scales.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/tests/scales.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/tests/scales.R	(revision 2477)
@@ -0,0 +1,174 @@
+
+postscript("scales.ps")
+## Testing weird scales options
+
+library(lattice)
+
+
+
+## relation = "free" for factors
+
+dat <- data.frame(a=letters[1:5], b=c("A","A","A","B","B"), y=1:5) 
+dotplot(y ~ a | b, data=dat, scales = "same") 
+dotplot(y ~ a | b, data=dat, scales = "free") 
+dotplot(y ~ a | b, data=dat, scales = "sliced") 
+
+
+
+dat <-
+    data.frame(a = letters[1:10],
+               b = c("A","A","A","B","B","A","B","B", "A", "A"))
+
+dat <- dat[sample(1:10, 200, rep = TRUE), ]
+dat$y <- rnorm(200, mean = unclass(as.factor(dat$a)))
+
+bwplot(a ~ y | b, data=dat, scales = "same") 
+bwplot(a ~ y | b, data=dat, scales = "free") 
+bwplot(a ~ y | b, data=dat, scales = "sliced") 
+
+
+
+
+
+
+## text axis colors
+
+xyplot(1:10 ~ 1:10,
+       scales =
+       list(y = list(font = 2,
+            cex = 1,
+            col = "green", col.line = "cyan", tck = 5)),
+       xlab = list("one to ten",  fontfamily = "HersheySerif"),
+       par.settings =
+       list(axis.text = list(col = "red", font = 4, cex = 3),
+            axis.line = list(col = "yellow")))
+
+
+
+
+x <- rnorm(100)
+y <- 2 + 3 * runif(100)
+a <- gl(3, 1, 100)
+
+xyplot(y ~ x | a)
+
+xyplot(y ~ x | a, scales = list(axs = "i"))
+
+xyplot(y ~ x | a, xlim = c(-5, 5), scales = list(limits = c(-6, 6)))
+
+xyplot(y ~ x | a, xlim = c(-5, 5), ylim = letters[1:5])
+
+
+## Should produce an error
+cat(try(print(xyplot(y ~ x | a, scales = list(x = list( relation = "same", axs = "i", limits = list( c(-5, 5), c(-4, 4), c(-3, 3)  ) )))), silent = TRUE))
+xyplot(y ~ x | a, scales = list(x = list( relation = "free", axs = "i", limits = list( c(-5, 5), c(-4, 4), c(-3, 3)  ) )))
+xyplot(y ~ x | a, scales = list(x = list( relation = "sliced", axs = "i", limits = list( c(-5, 5), c(-4, 4), c(-3, 3)  ) )))
+
+## Should produce an error
+cat(try(print(xyplot(y ~ x | a, xlim = list( c(-5, 5), c(-4, 4), c(-3, 3)  ), scales = list(x = list( relation = "same", axs = "i")))), silent = TRUE))
+xyplot(y ~ x | a, xlim = list( c(-5, 5), c(-4, 4), c(-3, 3)  ), scales = list(x = list( relation = "free", axs = "i")))
+xyplot(y ~ x | a, xlim = list( c(-5, 5), c(-4, 4), c(-3, 3)  ), scales = list(x = list( relation = "sliced", axs = "i")))
+
+
+
+
+xyplot(y ~ x | a, scales = list(x = list( relation = "free"  )))
+
+xyplot(y ~ x | a, scales = list(x = list( relation = "free", limits = c(-5, 5))))
+
+xyplot(y ~ x | a, scales = list(x = list( relation = "free", axs = "i", limits = list( c(-5, 5), c(-4, 4), c(-3, 3)  ) )))
+
+xyplot(y ~ x | a, scales = list(x = list( relation = "free",
+                                limits = list( c(-5, 5), c(-4, 4), c(-3, 3)  ),
+                                at = c(-3, 3, 0))))
+
+xyplot(y ~ x | a, scales = list(x = list( relation = "free",
+                                limits = list( c(-5, 5), c(-4, 4), c(-3, 3)  ),
+                                at = list( c(0, 5, -5) , c(-4, 0, 4), c(-3, 3, 0)  ))))
+
+xyplot(y ~ x | a, scales = list(x = list( relation = "free",
+                                limits = list( c(-5, 5), c(-4, 4), c(-3, 3)  ),
+                                at = list( c(0, 5, -5) , c(-4, 0, 4), c(-3, 3, 0)  ),
+                                labels = list( as.character(c(0, 5, -5)) , letters[5:7], c(-3, 3, 0)  ))))
+
+xyplot(y ~ x | a, scales = list(x = list( relation = "free",
+                                limits = list( c(-5, 5), c(-4, 4), letters[1:5]  ),
+                                at = list( c(0, 5, -5) , c(-4, 0, 4), c(-3, 3, 0)  ),
+                                labels = list( as.character(c(0, 5, -5)) , letters[5:7], c(-3, 3, 0)  ))))
+
+xyplot(y ~ x | a, scales = list(x = list( relation = "free",
+                                limits = list( c(-5, 5), c(-4, 4), letters[1:5]  ),
+                                at = list( c(0, 5, -5) , c(-4, 0, 4), FALSE ),
+                                labels = list( as.character(c(0, 5, -5)) , letters[5:7], FALSE  ))))
+
+xyplot(y ~ x | a, scales = list(x = list( relation = "free",
+                                limits = list( c(-5, 5), c(-4, 4), letters[1:5]  ),
+                                at = list( c(0, 5, -5) , c(-4, 0, 4), 1:5 ),
+                                labels = list( as.character(c(0, 5, -5)) , letters[5:7], FALSE  ))))
+
+xyplot(y ~ x | a, scales = list(x = list( relation = "free", rot = 45,
+                                limits = list( c(-5, 5), c(-4, 4), letters[1:5]  ),
+                                at = list( c(0, 5, -5) , c(-4, 0, 4), 1:5 ),
+                                labels = list( as.character(c(0, 5, -5)) , letters[5:7], month.name[1:5]  ))))
+
+
+
+
+
+
+
+
+
+xyplot(y ~ x | a, scales = list(x = list( relation = "sliced"  )))
+xyplot(y ~ x | a, scales = list(x = list( relation = "sliced" , axs = "i" )))
+
+xyplot(y ~ x | a, scales = list(x = list( relation = "sliced", limits = c(-5, 5))))
+
+xyplot(y ~ x | a, scales = list(x = list( relation = "sliced", axs = "i", limits = list( c(-5, 5), c(-4, 4), c(-3, 3)  ) )))
+
+xyplot(y ~ x | a, scales = list(x = list( relation = "sliced",
+                                limits = list( c(-5, 5), c(-4, 4), c(-3, 3)  ),
+                                at = c(-3, 3, 0))))
+
+xyplot(y ~ x | a, scales = list(x = list( relation = "sliced",
+                                limits = list( c(-5, 5), c(-4, 4), c(-3, 3)  ),
+                                at = list( c(0, 5, -5) , c(-4, 0, 4), c(-3, 3, 0)  ))))
+
+xyplot(y ~ x | a, scales = list(x = list( relation = "sliced",
+                                limits = list( c(-5, 5), c(-4, 4), c(-3, 3)  ),
+                                at = list( c(0, 5, -5) , c(-4, 0, 4), c(-3, 3, 0)  ),
+                                labels = list( as.character(c(0, 5, -5)) , letters[5:7], c(-3, 3, 0)  ))))
+
+xyplot(y ~ x | a, scales = list(x = list( relation = "sliced",
+                                limits = list( c(-5, 5), c(-4, 4), letters[1:5]  ),
+                                at = list( c(0, 5, -5) , c(-4, 0, 4), c(-3, 3, 0)  ),
+                                labels = list( as.character(c(0, 5, -5)) , letters[5:7], c(-3, 3, 0)  ))))
+
+xyplot(y ~ x | a, scales = list(x = list( relation = "sliced",
+                                limits = list( c(-5, 5), c(-4, 4), letters[1:5]  ),
+                                at = list( c(0, 5, -5) , c(-4, 0, 4), FALSE ),
+                                labels = list( as.character(c(0, 5, -5)) , letters[5:7], FALSE  ))))
+
+xyplot(y ~ x | a, scales = list(x = list( relation = "sliced",
+                                limits = list( c(-5, 5), c(-4, 4), letters[1:5]  ),
+                                at = list( c(0, 5, -5) , c(-4, 0, 4), 1:5 ),
+                                labels = list( as.character(c(0, 5, -5)) , letters[5:7], FALSE  ))))
+
+xyplot(y ~ x | a, scales = list(x = list( relation = "sliced", rot = 45,
+                                limits = list( c(-5, 5), c(-4, 4), letters[1:5]  ),
+                                at = list( c(0, 5, -5) , c(-4, 0, 4), 1:5 ),
+                                labels = list( as.character(c(0, 5, -5)) , letters[5:7], month.name[1:5]  ))))
+
+
+
+
+xyplot(y ~ x | a, scales = list(x = list( relation = "free", at = list( c(0, 5, -5) , c(-4, 0, 4), 1:5 ))))
+xyplot(y ~ x | a, scales = list(x = list( relation = "sliced", at = list( c(0, 5, -5) , c(-4, 0, 4), 1:5 ))))
+
+## should produce an error
+cat(try(print(xyplot(y ~ x | a, scales = list(y = list( relation = "same", at = list( c(0, 5, -5) , c(-4, 0, 4), 1:5 ))))), silent = TRUE))
+
+
+## problem
+stripplot(rep(1:20, 5) ~ x | a, scales = list(relation = "free", col = "transparent"))
+dev.off()
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/demo/lattice.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/demo/lattice.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/demo/lattice.R	(revision 2477)
@@ -0,0 +1,164 @@
+
+require(grid)
+old.prompt <- devAskNewPage(TRUE)
+## store current settings, to be restored later
+old.settings <- trellis.par.get()
+
+## changing settings to new 'theme'
+trellis.par.set(theme = col.whitebg())
+
+## simulated example, histogram and kernel density estimate superposed
+x <- rnorm(500)
+densityplot(~x)
+histogram(x, type = "density", 
+          panel = function(x, ...) {
+              panel.histogram(x, ...) 
+              panel.densityplot(x, col = "brown", plot.points = FALSE)
+          })
+
+## Using a custom panel function to superpose a fitted normal density
+## on a Kernel Density Estimate
+
+densityplot( ~ height | voice.part, data = singer, layout = c(2, 4),  
+            xlab = "Height (inches)",
+            ylab = "Kernel Density\n with Normal Fit",
+            main = list("Estimated Density", cex = 1.4, col = "DarkOliveGreen"),
+            panel = function(x, ...) {
+                panel.densityplot(x, ...)
+                panel.mathdensity(dmath = dnorm,
+                                  args = list(mean=mean(x),sd=sd(x)))
+            } )
+
+## user defined panel functions and fonts
+
+states <- data.frame(state.x77,
+                     state.name = dimnames(state.x77)[[1]], 
+                     state.region = factor(state.region)) 
+
+xyplot(Murder ~ Population | state.region, data = states, 
+       groups = state.name,
+       panel = function(x, y, subscripts, groups)  
+       ltext(x = x, y = y, labels = groups[subscripts],
+             cex=.9, fontfamily = "HersheySans", fontface = "italic"),
+       par.strip.text = list(cex = 1.3, font = 4, col = "brown"),
+       xlab = list("Estimated Population, July 1, 1975", font = 2),
+       ylab = list("Murder Rate (per 100,000 population), 1976", font = 2),
+       main = list("Murder Rates in US states", col = "brown", font = 4))
+
+##graphical parameters for xlab etc can also be changed permanently
+trellis.par.set(list(par.xlab.text = list(font = 2),
+                     par.ylab.text = list(font = 2),
+                     par.main.text = list(font = 4, col = "brown")))
+
+## Same with some multiple line text
+levels(states$state.region) <-
+    c("Northeast", "South", "North\n Central",  "West")
+xyplot(Murder  ~ Population | state.region, data = states,
+       groups = as.character(state.name),
+       panel = function(x, y, subscripts, groups)
+       ltext(x = x, y = y, labels = groups[subscripts], srt = -50, col = "blue",
+             cex=.9, fontfamily = "HersheySans"),
+       par.strip.text = list(cex = 1.3, font = 4, col = "brown", lines = 2),
+       xlab = "Estimated Population\nJuly 1, 1975", 
+       ylab = "Murder Rate \n(per 100,000 population)\n 1976", 
+       main = "Murder Rates in US states")
+
+##setting these back to their defaults
+trellis.par.set(list(par.xlab.text = list(font = 1),
+                     par.ylab.text = list(font = 1),
+                     par.main.text = list(font = 2, col = "black")))
+
+
+##levelplot
+
+levelplot(volcano, colorkey = list(space = "top"),
+          sub = "Maunga Whau volcano", aspect = "iso")
+
+## wireframe
+wireframe(volcano, shade = TRUE,
+          aspect = c(61/87, 0.4),
+          screen = list(z = -120, x = -45),
+          light.source = c(0,0,10), distance = .2,
+          shade.colors.palette = function(irr, ref, height, w = .5)
+          grey(w * irr + (1 - w) * (1 - (1-ref)^.4)))
+
+## 3-D surface parametrized on a 2-D grid
+
+n <- 50
+tx <- matrix(seq(-pi, pi, length.out = 2*n), 2*n, n)
+ty <- matrix(seq(-pi, pi, length.out = n) / 2, 2*n, n, byrow = T)
+xx <- cos(tx) * cos(ty)
+yy <- sin(tx) * cos(ty)
+zz <- sin(ty)
+
+zzz <- zz
+zzz[,1:12 * 4] <- NA
+wireframe(zzz ~ xx * yy, shade = TRUE, light.source = c(3,3,3))
+
+
+
+## Example with panel.superpose. 
+
+xyplot(Petal.Length~Petal.Width, data = iris, groups=Species, 
+       panel = panel.superpose,
+       type = c("p", "smooth"), span=.75,
+       col.line = trellis.par.get("strip.background")$col,
+       col.symbol = trellis.par.get("strip.shingle")$col,
+       key = list(title = "Iris Data", x = .15, y=.85, corner = c(0,1),
+           border = TRUE, 
+           points = list(col=trellis.par.get("strip.shingle")$col[1:3],
+           pch = trellis.par.get("superpose.symbol")$pch[1:3],
+           cex = trellis.par.get("superpose.symbol")$cex[1:3]
+           ),
+           text = list(levels(iris$Species))))
+
+
+
+## non-trivial strip function
+
+barchart(variety ~ yield | year * site, barley, origin = 0,
+         layout = c(4, 3),
+         between = list(x = c(0, 0.5, 0)),
+         ## par.settings = list(clip = list(strip = "on")),
+         strip =
+         function(which.given,
+                  which.panel,
+                  factor.levels,
+                  bg = trellis.par.get("strip.background")$col[which.given],
+                  ...) {
+             axis.line <- trellis.par.get("axis.line")
+             pushViewport(viewport(clip = trellis.par.get("clip")$strip,
+                                   name = trellis.vpname("strip")))
+             if (which.given == 1)
+             {
+                 grid.rect(x = .26, just = "right",
+                           name = trellis.grobname("fill", type="strip"),
+                           gp = gpar(fill = bg, col = "transparent"))
+                 ltext(factor.levels[which.panel[which.given]],
+                       x = .24, y = .5, adj = 1,
+                       name.type = "strip")
+             }
+             if (which.given == 2)
+             {
+                 grid.rect(x = .26, just = "left",
+                           name = trellis.grobname("fill", type="strip"),
+                           gp = gpar(fill = bg, col = "transparent"))
+                 ltext(factor.levels[which.panel[which.given]],
+                       x = .28, y = .5, adj = 0,
+                       name.type = "strip")
+             }
+             upViewport()
+             grid.rect(name = trellis.grobname("border", type="strip"),
+                       gp =
+                       gpar(col = axis.line$col,
+                            lty = axis.line$lty,
+                            lwd = axis.line$lwd,
+                            alpha = axis.line$alpha,
+                            fill = "transparent"))
+         }, par.strip.text = list(lines = 0.4))
+
+
+trellis.par.set(theme = old.settings, strict = 2)
+devAskNewPage(old.prompt)
+
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/demo/intervals.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/demo/intervals.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/demo/intervals.R	(revision 2477)
@@ -0,0 +1,93 @@
+
+
+
+library(lattice)
+
+## prepanel and panel function for displaying confidence intervals
+
+prepanel.ci <- function(x, y, lx, ux, subscripts, ...)
+{
+    x <- as.numeric(x)
+    lx <- as.numeric(lx[subscripts])
+    ux <- as.numeric(ux[subscripts])
+    list(xlim = range(x, ux, lx, finite = TRUE))
+}
+
+
+panel.ci <- function(x, y, lx, ux, subscripts, pch = 16, ...)
+{
+    x <- as.numeric(x)
+    y <- as.numeric(y)
+    lx <- as.numeric(lx[subscripts])
+    ux <- as.numeric(ux[subscripts])
+    panel.abline(h = unique(y), col = "grey")
+    panel.arrows(lx, y, ux, y, col = 'black',
+                 length = 0.25, unit = "native",
+                 angle = 90, code = 3)
+    panel.xyplot(x, y, pch = pch, ...)
+}
+
+
+
+## constructing an example for confidence intervals for medians (see
+## ?boxplot.stats for a discussion of what the intervals mean)
+
+singer.split <-
+    with(singer,
+         split(height, voice.part))
+
+singer.ucl <-
+    sapply(singer.split,
+           function(x) {
+               st <- boxplot.stats(x)
+               c(st$stats[3], st$conf)
+           })
+
+singer.ucl <- as.data.frame(t(singer.ucl))
+names(singer.ucl) <- c("median", "lower", "upper")
+singer.ucl$voice.part <-
+    factor(rownames(singer.ucl),
+           levels = rownames(singer.ucl))
+    
+singer.ucl
+
+
+
+
+with(singer.ucl,
+     dotplot(voice.part ~ median,
+             lx = lower, ux = upper,
+             prepanel = prepanel.ci,
+             panel = panel.ci))
+singer.split <-
+    with(singer,
+         split(height, voice.part))
+
+singer.ucl <-
+    sapply(singer.split,
+           function(x) {
+               st <- boxplot.stats(x)
+               c(st$stats[3], st$conf)
+           })
+
+singer.ucl <- as.data.frame(t(singer.ucl))
+names(singer.ucl) <- c("median", "lower", "upper")
+singer.ucl$voice.part <-
+    factor(rownames(singer.ucl),
+           levels = rownames(singer.ucl))
+    
+singer.ucl
+
+
+
+
+with(singer.ucl,
+     xyplot(voice.part ~ median,
+            lx = lower, ux = upper,
+            prepanel = prepanel.ci,
+            panel = panel.ci))
+
+
+
+
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/demo/panel.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/demo/panel.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/demo/panel.R	(revision 2477)
@@ -0,0 +1,121 @@
+
+
+panel.stackedDens <-
+    function(x, y,
+             overlap = 0.3,
+             horizontal = TRUE,
+
+             alpha = plot.polygon$alpha,
+             border = plot.polygon$border,
+             lty = plot.polygon$lty,
+             lwd = plot.polygon$lwd,
+             col = plot.polygon$col,
+
+             varwidth = FALSE,
+             ref = TRUE,
+
+             bw = NULL,
+             adjust = NULL,
+             kernel = NULL,
+             window = NULL,
+             width = NULL,
+             n = 50,
+             from = NULL,
+             to = NULL,
+             cut = NULL,
+             na.rm = TRUE,
+             
+             ...)
+{
+    if (all(is.na(x) | is.na(y))) return()
+    x <- as.numeric(x)
+    y <- as.numeric(y)
+
+    reference.line <- trellis.par.get("reference.line")
+    plot.polygon <- trellis.par.get("plot.polygon")
+
+    ## density doesn't handle unrecognized arguments (not even to
+    ## ignore it).  A tedious but effective way to handle that is to
+    ## have all arguments to density be formal arguments to this panel
+    ## function, as follows:
+
+    darg <- list()
+    darg$bw <- bw
+    darg$adjust <- adjust
+    darg$kernel <- kernel
+    darg$window <- window
+    darg$width <- width
+    darg$n <- n
+    darg$from <- from
+    darg$to <- to
+    darg$cut <- cut
+    darg$na.rm <- na.rm
+
+    my.density <- function(x) do.call("density", c(list(x = x), darg))
+
+    numeric.list <- if (horizontal) split(x, factor(y)) else split(y, factor(x))
+    levels.fos <- as.numeric(names(numeric.list))
+    d.list <- lapply(numeric.list, my.density)
+    ## n.list <- sapply(numeric.list, length)  UNNECESSARY
+    dx.list <- lapply(d.list, "[[", "x")
+    dy.list <- lapply(d.list, "[[", "y")
+
+    max.d <- sapply(dy.list, max)
+    if (varwidth) max.d[] <- max(max.d)
+
+    ##str(max.d)
+    
+    xscale <- current.panel.limits()$xlim
+    yscale <- current.panel.limits()$ylim
+    height <- (1 + overlap)
+
+    if (horizontal)
+    {
+        for (i in rev(seq_along(levels.fos)))
+        {
+            n <- length(dx.list[[i]])
+            panel.polygon(x = dx.list[[i]][c(1, 1:n, n)],
+                          y = levels.fos[i] - 0.5 + height * c(0, dy.list[[i]], 0) / max.d[i],
+                          col = col, border = border,
+                          lty = lty, lwd = lwd, alpha = alpha)
+            if (ref)
+            {
+                panel.abline(h = levels.fos[i] - 0.5,
+                             col = reference.line$col,
+                             lty = reference.line$lty,
+                             lwd = reference.line$lwd,
+                             alpha = reference.line$alpha)
+            }
+        }
+    }
+    else
+    {
+        for (i in rev(seq_along(levels.fos)))
+        {
+            n <- length(dx.list[[i]])
+            panel.polygon(x = levels.fos[i] - 0.5 + height * c(0, dy.list[[i]], 0) / max.d[i],
+                          y = dx.list[[i]][c(1, 1:n, n)],
+                          col = col, border = border,
+                          lty = lty, lwd = lwd, alpha = alpha)
+            if (ref)
+            {
+                panel.abline(v = levels.fos[i] - 0.5,
+                             col = reference.line$col,
+                             lty = reference.line$lty,
+                             lwd = reference.line$lwd,
+                             alpha = reference.line$alpha)
+            }
+        }
+    }
+    invisible()
+}
+
+
+overlap <- 0.3
+
+bwplot(voice.part ~ height, singer,
+       panel = panel.stackedDens,
+       overlap = overlap,
+       lattice.options = list(axis.padding = list(factor = c(0.6, 1 + overlap))))
+
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/demo/labels.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/demo/labels.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/demo/labels.R	(revision 2477)
@@ -0,0 +1,46 @@
+
+## Demo of expressions
+
+x <- rnorm(400)
+y <- rnorm(400)
+a <- gl(4, 100)
+
+xyplot(y ~ x | a, aspect = "fill",
+       strip = function(factor.levels, strip.names, var.name, ...) {
+           strip.default(factor.levels = expression(alpha, beta, gamma, delta),
+                         strip.names = TRUE,
+                         var.name = expression(frac(epsilon, 2)),
+                         ...) },
+       par.strip.text = list(lines = 2),
+       xlab=list(expression(sigma[i]), cex = 2),
+       ylab=expression(gamma^2),
+       main=expression(pi*sum(x, i=0, n)),
+       scales=
+       list(relation = "free", 
+            x=list(at=c(-2, 0, 2), labels=expression(frac(-pi, 2), 0, frac(pi, 2))),
+            y=list(at=c(-2, 0, 2), labels=expression(alpha, beta, gamma))),
+       key = list(space="right", transparent = TRUE,
+       title = expression(e[i[1]]^{alpha + 2 ^ beta}),
+       cex.title = 2,
+       points=list(pch=1:2),
+       text = list(c('small', 'BIG'), cex = c(.8, 3)),
+       lines = list(lty = 1:2),
+       text=list(expression(theta, zeta))),
+       sub=expression(frac(demonstrating, expressions)))
+
+
+## grob's as xlab, ylab 
+
+qq(gl(2, 100) ~ c(runif(100, min = -2, max = 2), rnorm(100)),
+   xlab =
+   textGrob(rep("Uniform", 2), 
+            x = unit(.5, "npc") + unit(c(.5, 0), "mm"),
+            y = unit(.5, "npc") + unit(c(0, .5), "mm"),
+            gp = gpar(col = c("black", "red"), cex = 3)),
+   ylab =
+   textGrob(rep("Normal", 2), rot = 90,
+            x = unit(.5, "npc") + unit(c(.5, 0), "mm"),
+            y = unit(.5, "npc") + unit(c(0, .5), "mm"),
+            gp = gpar(col = c("black", "red"), cex = 3)),
+   main = "Q-Q plot")
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/html/R.css
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/html/R.css	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/html/R.css	(revision 2477)
@@ -0,0 +1,97 @@
+body {
+    background: white;
+    color: black;
+}
+
+a:link {
+    background: white;
+    color: blue;
+}
+
+a:visited {
+    background: white;
+    color: rgb(50%, 0%, 50%);
+}
+
+h1 {
+    background: white;
+    color: rgb(55%, 55%, 55%);
+    font-family: monospace;
+    font-size: x-large;
+    text-align: center;
+}
+
+h2 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-size: large;
+    text-align: center;
+}
+
+h3 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-size: large;
+}
+
+h4 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-style: italic;
+    font-size: large;
+}
+
+h5 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+}
+
+h6 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-style: italic;
+}
+		
+img.toplogo {
+    width: 4em;
+    vertical-align: middle;
+}
+
+img.arrow {
+    width: 30px;
+    height: 30px;
+    border: 0;
+}
+
+span.acronym {
+    font-size: small;
+}
+
+span.env {
+    font-family: monospace;
+}
+
+span.file {
+    font-family: monospace;
+}
+
+span.option{
+    font-family: monospace;
+}
+
+span.pkg {
+    font-weight: bold;
+}
+
+span.samp{
+    font-family: monospace;
+}
+
+div.vignettes a:hover {
+    background: rgb(85%, 85%, 85%);
+}

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/html/R.css
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/html/00Index.html
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/html/00Index.html	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/html/00Index.html	(revision 2477)
@@ -0,0 +1,592 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title>R: Trellis Graphics for R</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<link rel="stylesheet" type="text/css" href="R.css" />
+</head><body>
+<h1> Trellis Graphics for R
+<img class="toplogo" src="../../../doc/html/Rlogo.svg" alt="[R logo]" />
+</h1>
+<hr/>
+<div style="text-align: center;">
+<a href="../../../doc/html/packages.html"><img class="arrow" src="../../../doc/html/left.jpg" alt="[Up]" /></a>
+<a href="../../../doc/html/index.html"><img class="arrow" src="../../../doc/html/up.jpg" alt="[Top]" /></a>
+</div><h2>Documentation for package &lsquo;lattice&rsquo; version 0.20-34</h2>
+
+<ul><li><a href="../DESCRIPTION">DESCRIPTION file</a>.</li>
+<li><a href="../demo">Code demos</a>.  Use <a href="../../utils/help/demo">demo()</a> to run them.</li>
+<li><a href="../NEWS">Package NEWS</a>.</li>
+</ul>
+
+<h2>Help Pages</h2>
+
+
+<p style="text-align: center;">
+<a href="# "> </a>
+<a href="#A">A</a>
+<a href="#B">B</a>
+<a href="#C">C</a>
+<a href="#D">D</a>
+<a href="#E">E</a>
+<a href="#H">H</a>
+<a href="#I">I</a>
+<a href="#L">L</a>
+<a href="#M">M</a>
+<a href="#O">O</a>
+<a href="#P">P</a>
+<a href="#Q">Q</a>
+<a href="#R">R</a>
+<a href="#S">S</a>
+<a href="#T">T</a>
+<a href="#U">U</a>
+<a href="#W">W</a>
+<a href="#X">X</a>
+<a href="#Y">Y</a>
+<a href="#misc">misc</a>
+</p>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="Lattice.html">lattice-package</a></td>
+<td>Lattice Graphics</td></tr>
+</table>
+
+<h2><a name="A">-- A --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="shingles.html">as.character.shingleLevel</a></td>
+<td>shingles</td></tr>
+<tr><td style="width: 25%;"><a href="shingles.html">as.data.frame.shingle</a></td>
+<td>shingles</td></tr>
+<tr><td style="width: 25%;"><a href="shingles.html">as.factorOrShingle</a></td>
+<td>shingles</td></tr>
+<tr><td style="width: 25%;"><a href="shingles.html">as.shingle</a></td>
+<td>shingles</td></tr>
+<tr><td style="width: 25%;"><a href="axis.default.html">axis.default</a></td>
+<td>Default axis annotation utilities</td></tr>
+</table>
+
+<h2><a name="B">-- B --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="banking.html">banking</a></td>
+<td>Banking</td></tr>
+<tr><td style="width: 25%;"><a href="xyplot.html">barchart</a></td>
+<td>Common Bivariate Trellis Plots</td></tr>
+<tr><td style="width: 25%;"><a href="barchart.table.html">barchart.array</a></td>
+<td>table methods for barchart and dotplot</td></tr>
+<tr><td style="width: 25%;"><a href="xyplot.html">barchart.default</a></td>
+<td>Common Bivariate Trellis Plots</td></tr>
+<tr><td style="width: 25%;"><a href="xyplot.html">barchart.formula</a></td>
+<td>Common Bivariate Trellis Plots</td></tr>
+<tr><td style="width: 25%;"><a href="barchart.table.html">barchart.matrix</a></td>
+<td>table methods for barchart and dotplot</td></tr>
+<tr><td style="width: 25%;"><a href="xyplot.html">barchart.numeric</a></td>
+<td>Common Bivariate Trellis Plots</td></tr>
+<tr><td style="width: 25%;"><a href="barchart.table.html">barchart.table</a></td>
+<td>table methods for barchart and dotplot</td></tr>
+<tr><td style="width: 25%;"><a href="barley.html">barley</a></td>
+<td>Yield data from a Minnesota barley trial</td></tr>
+<tr><td style="width: 25%;"><a href="xyplot.html">bwplot</a></td>
+<td>Common Bivariate Trellis Plots</td></tr>
+<tr><td style="width: 25%;"><a href="xyplot.html">bwplot.formula</a></td>
+<td>Common Bivariate Trellis Plots</td></tr>
+<tr><td style="width: 25%;"><a href="xyplot.html">bwplot.numeric</a></td>
+<td>Common Bivariate Trellis Plots</td></tr>
+</table>
+
+<h2><a name="C">-- C --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="trellis.device.html">canonical.theme</a></td>
+<td>Initializing Trellis Displays</td></tr>
+<tr><td style="width: 25%;"><a href="cloud.html">cloud</a></td>
+<td>3d Scatter Plot and Wireframe Surface Plot</td></tr>
+<tr><td style="width: 25%;"><a href="cloud.html">cloud.formula</a></td>
+<td>3d Scatter Plot and Wireframe Surface Plot</td></tr>
+<tr><td style="width: 25%;"><a href="cloud.html">cloud.matrix</a></td>
+<td>3d Scatter Plot and Wireframe Surface Plot</td></tr>
+<tr><td style="width: 25%;"><a href="cloud.html">cloud.table</a></td>
+<td>3d Scatter Plot and Wireframe Surface Plot</td></tr>
+<tr><td style="width: 25%;"><a href="trellis.device.html">col.whitebg</a></td>
+<td>Initializing Trellis Displays</td></tr>
+<tr><td style="width: 25%;"><a href="levelplot.html">contourplot</a></td>
+<td>Level plots and contour plots</td></tr>
+<tr><td style="width: 25%;"><a href="levelplot.html">contourplot.array</a></td>
+<td>Level plots and contour plots</td></tr>
+<tr><td style="width: 25%;"><a href="levelplot.html">contourplot.formula</a></td>
+<td>Level plots and contour plots</td></tr>
+<tr><td style="width: 25%;"><a href="levelplot.html">contourplot.matrix</a></td>
+<td>Level plots and contour plots</td></tr>
+<tr><td style="width: 25%;"><a href="levelplot.html">contourplot.table</a></td>
+<td>Level plots and contour plots</td></tr>
+<tr><td style="width: 25%;"><a href="panel.number.html">current.column</a></td>
+<td>Accessing Auxiliary Information During Plotting</td></tr>
+<tr><td style="width: 25%;"><a href="panel.axis.html">current.panel.limits</a></td>
+<td>Panel Function for Drawing Axis Ticks and Labels</td></tr>
+<tr><td style="width: 25%;"><a href="panel.number.html">current.row</a></td>
+<td>Accessing Auxiliary Information During Plotting</td></tr>
+</table>
+
+<h2><a name="D">-- D --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="histogram.html">densityplot</a></td>
+<td>Histograms and Kernel Density Plots</td></tr>
+<tr><td style="width: 25%;"><a href="histogram.html">densityplot.formula</a></td>
+<td>Histograms and Kernel Density Plots</td></tr>
+<tr><td style="width: 25%;"><a href="histogram.html">densityplot.numeric</a></td>
+<td>Histograms and Kernel Density Plots</td></tr>
+<tr><td style="width: 25%;"><a href="panel.pairs.html">diag.panel.splom</a></td>
+<td>Default Superpanel Function for splom</td></tr>
+<tr><td style="width: 25%;"><a href="print.trellis.html">dim.trellis</a></td>
+<td>Plot and Summarize Trellis Objects</td></tr>
+<tr><td style="width: 25%;"><a href="print.trellis.html">dimnames.trellis</a></td>
+<td>Plot and Summarize Trellis Objects</td></tr>
+<tr><td style="width: 25%;"><a href="histogram.html">do.breaks</a></td>
+<td>Histograms and Kernel Density Plots</td></tr>
+<tr><td style="width: 25%;"><a href="xyplot.html">dotplot</a></td>
+<td>Common Bivariate Trellis Plots</td></tr>
+<tr><td style="width: 25%;"><a href="barchart.table.html">dotplot.array</a></td>
+<td>table methods for barchart and dotplot</td></tr>
+<tr><td style="width: 25%;"><a href="xyplot.html">dotplot.default</a></td>
+<td>Common Bivariate Trellis Plots</td></tr>
+<tr><td style="width: 25%;"><a href="xyplot.html">dotplot.formula</a></td>
+<td>Common Bivariate Trellis Plots</td></tr>
+<tr><td style="width: 25%;"><a href="barchart.table.html">dotplot.matrix</a></td>
+<td>table methods for barchart and dotplot</td></tr>
+<tr><td style="width: 25%;"><a href="xyplot.html">dotplot.numeric</a></td>
+<td>Common Bivariate Trellis Plots</td></tr>
+<tr><td style="width: 25%;"><a href="barchart.table.html">dotplot.table</a></td>
+<td>table methods for barchart and dotplot</td></tr>
+<tr><td style="width: 25%;"><a href="draw.colorkey.html">draw.colorkey</a></td>
+<td>Produce a Colorkey for levelplot</td></tr>
+<tr><td style="width: 25%;"><a href="draw.key.html">draw.key</a></td>
+<td>Produce a Legend or Key</td></tr>
+</table>
+
+<h2><a name="E">-- E --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="environmental.html">environmental</a></td>
+<td>Atmospheric environmental conditions in New York City</td></tr>
+<tr><td style="width: 25%;"><a href="shingles.html">equal.count</a></td>
+<td>shingles</td></tr>
+<tr><td style="width: 25%;"><a href="ethanol.html">ethanol</a></td>
+<td>Engine exhaust fumes from burning ethanol</td></tr>
+</table>
+
+<h2><a name="H">-- H --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="histogram.html">histogram</a></td>
+<td>Histograms and Kernel Density Plots</td></tr>
+<tr><td style="width: 25%;"><a href="histogram.html">histogram.factor</a></td>
+<td>Histograms and Kernel Density Plots</td></tr>
+<tr><td style="width: 25%;"><a href="histogram.html">histogram.formula</a></td>
+<td>Histograms and Kernel Density Plots</td></tr>
+<tr><td style="width: 25%;"><a href="histogram.html">histogram.numeric</a></td>
+<td>Histograms and Kernel Density Plots</td></tr>
+</table>
+
+<h2><a name="I">-- I --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="shingles.html">is.shingle</a></td>
+<td>shingles</td></tr>
+</table>
+
+<h2><a name="L">-- L --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="llines.html">larrows</a></td>
+<td>Replacements of traditional graphics functions</td></tr>
+<tr><td style="width: 25%;"><a href="Lattice.html">Lattice</a></td>
+<td>Lattice Graphics</td></tr>
+<tr><td style="width: 25%;"><a href="Lattice.html">lattice</a></td>
+<td>Lattice Graphics</td></tr>
+<tr><td style="width: 25%;"><a href="lattice.options.html">lattice.getOption</a></td>
+<td>Low-level Options Controlling Behaviour of Lattice</td></tr>
+<tr><td style="width: 25%;"><a href="lattice.options.html">lattice.options</a></td>
+<td>Low-level Options Controlling Behaviour of Lattice</td></tr>
+<tr><td style="width: 25%;"><a href="latticeParseFormula.html">latticeParseFormula</a></td>
+<td>Parse Trellis formula</td></tr>
+<tr><td style="width: 25%;"><a href="level.colors.html">level.colors</a></td>
+<td>A function to compute false colors representing a numeric or categorical variable</td></tr>
+<tr><td style="width: 25%;"><a href="levelplot.html">levelplot</a></td>
+<td>Level plots and contour plots</td></tr>
+<tr><td style="width: 25%;"><a href="levelplot.html">levelplot.array</a></td>
+<td>Level plots and contour plots</td></tr>
+<tr><td style="width: 25%;"><a href="levelplot.html">levelplot.formula</a></td>
+<td>Level plots and contour plots</td></tr>
+<tr><td style="width: 25%;"><a href="levelplot.html">levelplot.matrix</a></td>
+<td>Level plots and contour plots</td></tr>
+<tr><td style="width: 25%;"><a href="levelplot.html">levelplot.table</a></td>
+<td>Level plots and contour plots</td></tr>
+<tr><td style="width: 25%;"><a href="llines.html">llines</a></td>
+<td>Replacements of traditional graphics functions</td></tr>
+<tr><td style="width: 25%;"><a href="llines.html">llines.default</a></td>
+<td>Replacements of traditional graphics functions</td></tr>
+<tr><td style="width: 25%;"><a href="llines.html">lplot.xy</a></td>
+<td>Replacements of traditional graphics functions</td></tr>
+<tr><td style="width: 25%;"><a href="llines.html">lpoints</a></td>
+<td>Replacements of traditional graphics functions</td></tr>
+<tr><td style="width: 25%;"><a href="llines.html">lpoints.default</a></td>
+<td>Replacements of traditional graphics functions</td></tr>
+<tr><td style="width: 25%;"><a href="llines.html">lpolygon</a></td>
+<td>Replacements of traditional graphics functions</td></tr>
+<tr><td style="width: 25%;"><a href="llines.html">lrect</a></td>
+<td>Replacements of traditional graphics functions</td></tr>
+<tr><td style="width: 25%;"><a href="llines.html">lsegments</a></td>
+<td>Replacements of traditional graphics functions</td></tr>
+<tr><td style="width: 25%;"><a href="lset.html">lset</a></td>
+<td>Interface to modify Trellis Settings - Defunct</td></tr>
+<tr><td style="width: 25%;"><a href="llines.html">ltext</a></td>
+<td>Replacements of traditional graphics functions</td></tr>
+<tr><td style="width: 25%;"><a href="llines.html">ltext.default</a></td>
+<td>Replacements of traditional graphics functions</td></tr>
+<tr><td style="width: 25%;"><a href="utilities.3d.html">ltransform3dMatrix</a></td>
+<td>Utility functions for 3-D plots</td></tr>
+<tr><td style="width: 25%;"><a href="utilities.3d.html">ltransform3dto3d</a></td>
+<td>Utility functions for 3-D plots</td></tr>
+</table>
+
+<h2><a name="M">-- M --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="make.groups.html">make.groups</a></td>
+<td>Grouped data from multiple vectors</td></tr>
+<tr><td style="width: 25%;"><a href="melanoma.html">melanoma</a></td>
+<td>Melanoma skin cancer incidence</td></tr>
+</table>
+
+<h2><a name="O">-- O --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="oneway.html">oneway</a></td>
+<td>Fit One-way Model</td></tr>
+</table>
+
+<h2><a name="P">-- P --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="panel.number.html">packet.number</a></td>
+<td>Accessing Auxiliary Information During Plotting</td></tr>
+<tr><td style="width: 25%;"><a href="packet.panel.default.html">packet.panel.default</a></td>
+<td>Associating Packets with Panels</td></tr>
+<tr><td style="width: 25%;"><a href="utilities.3d.html">palette.shade</a></td>
+<td>Utility functions for 3-D plots</td></tr>
+<tr><td style="width: 25%;"><a href="panel.cloud.html">panel.3dscatter</a></td>
+<td>Default Panel Function for cloud</td></tr>
+<tr><td style="width: 25%;"><a href="panel.cloud.html">panel.3dwire</a></td>
+<td>Default Panel Function for cloud</td></tr>
+<tr><td style="width: 25%;"><a href="panel.functions.html">panel.abline</a></td>
+<td>Useful Panel Function Components</td></tr>
+<tr><td style="width: 25%;"><a href="llines.html">panel.arrows</a></td>
+<td>Replacements of traditional graphics functions</td></tr>
+<tr><td style="width: 25%;"><a href="panel.functions.html">panel.average</a></td>
+<td>Useful Panel Function Components</td></tr>
+<tr><td style="width: 25%;"><a href="panel.axis.html">panel.axis</a></td>
+<td>Panel Function for Drawing Axis Ticks and Labels</td></tr>
+<tr><td style="width: 25%;"><a href="panel.barchart.html">panel.barchart</a></td>
+<td>Default Panel Function for barchart</td></tr>
+<tr><td style="width: 25%;"><a href="interaction.html">panel.brush.splom</a></td>
+<td>Functions to Interact with Lattice Plots</td></tr>
+<tr><td style="width: 25%;"><a href="panel.bwplot.html">panel.bwplot</a></td>
+<td>Default Panel Function for bwplot</td></tr>
+<tr><td style="width: 25%;"><a href="panel.cloud.html">panel.cloud</a></td>
+<td>Default Panel Function for cloud</td></tr>
+<tr><td style="width: 25%;"><a href="panel.levelplot.html">panel.contourplot</a></td>
+<td>Panel Functions for levelplot and contourplot</td></tr>
+<tr><td style="width: 25%;"><a href="panel.functions.html">panel.curve</a></td>
+<td>Useful Panel Function Components</td></tr>
+<tr><td style="width: 25%;"><a href="panel.densityplot.html">panel.densityplot</a></td>
+<td>Default Panel Function for densityplot</td></tr>
+<tr><td style="width: 25%;"><a href="panel.dotplot.html">panel.dotplot</a></td>
+<td>Default Panel Function for dotplot</td></tr>
+<tr><td style="width: 25%;"><a href="print.trellis.html">panel.error</a></td>
+<td>Plot and Summarize Trellis Objects</td></tr>
+<tr><td style="width: 25%;"><a href="panel.functions.html">panel.fill</a></td>
+<td>Useful Panel Function Components</td></tr>
+<tr><td style="width: 25%;"><a href="panel.functions.html">panel.functions</a></td>
+<td>Useful Panel Function Components</td></tr>
+<tr><td style="width: 25%;"><a href="panel.functions.html">panel.grid</a></td>
+<td>Useful Panel Function Components</td></tr>
+<tr><td style="width: 25%;"><a href="panel.histogram.html">panel.histogram</a></td>
+<td>Default Panel Function for histogram</td></tr>
+<tr><td style="width: 25%;"><a href="interaction.html">panel.identify</a></td>
+<td>Functions to Interact with Lattice Plots</td></tr>
+<tr><td style="width: 25%;"><a href="interaction.html">panel.identify.cloud</a></td>
+<td>Functions to Interact with Lattice Plots</td></tr>
+<tr><td style="width: 25%;"><a href="interaction.html">panel.identify.qqmath</a></td>
+<td>Functions to Interact with Lattice Plots</td></tr>
+<tr><td style="width: 25%;"><a href="panel.levelplot.html">panel.levelplot</a></td>
+<td>Panel Functions for levelplot and contourplot</td></tr>
+<tr><td style="width: 25%;"><a href="panel.levelplot.html">panel.levelplot.raster</a></td>
+<td>Panel Functions for levelplot and contourplot</td></tr>
+<tr><td style="width: 25%;"><a href="panel.functions.html">panel.linejoin</a></td>
+<td>Useful Panel Function Components</td></tr>
+<tr><td style="width: 25%;"><a href="llines.html">panel.lines</a></td>
+<td>Replacements of traditional graphics functions</td></tr>
+<tr><td style="width: 25%;"><a href="interaction.html">panel.link.splom</a></td>
+<td>Functions to Interact with Lattice Plots</td></tr>
+<tr><td style="width: 25%;"><a href="panel.functions.html">panel.lmline</a></td>
+<td>Useful Panel Function Components</td></tr>
+<tr><td style="width: 25%;"><a href="panel.loess.html">panel.loess</a></td>
+<td>Panel Function to Add a LOESS Smooth</td></tr>
+<tr><td style="width: 25%;"><a href="panel.functions.html">panel.mathdensity</a></td>
+<td>Useful Panel Function Components</td></tr>
+<tr><td style="width: 25%;"><a href="panel.number.html">panel.number</a></td>
+<td>Accessing Auxiliary Information During Plotting</td></tr>
+<tr><td style="width: 25%;"><a href="panel.pairs.html">panel.pairs</a></td>
+<td>Default Superpanel Function for splom</td></tr>
+<tr><td style="width: 25%;"><a href="panel.parallel.html">panel.parallel</a></td>
+<td>Default Panel Function for parallel</td></tr>
+<tr><td style="width: 25%;"><a href="llines.html">panel.points</a></td>
+<td>Replacements of traditional graphics functions</td></tr>
+<tr><td style="width: 25%;"><a href="llines.html">panel.polygon</a></td>
+<td>Replacements of traditional graphics functions</td></tr>
+<tr><td style="width: 25%;"><a href="panel.xyplot.html">panel.qq</a></td>
+<td>Default Panel Function for xyplot</td></tr>
+<tr><td style="width: 25%;"><a href="panel.qqmath.html">panel.qqmath</a></td>
+<td>Default Panel Function for qqmath</td></tr>
+<tr><td style="width: 25%;"><a href="panel.qqmathline.html">panel.qqmathline</a></td>
+<td>Useful panel function with qqmath</td></tr>
+<tr><td style="width: 25%;"><a href="llines.html">panel.rect</a></td>
+<td>Replacements of traditional graphics functions</td></tr>
+<tr><td style="width: 25%;"><a href="panel.functions.html">panel.refline</a></td>
+<td>Useful Panel Function Components</td></tr>
+<tr><td style="width: 25%;"><a href="panel.functions.html">panel.rug</a></td>
+<td>Useful Panel Function Components</td></tr>
+<tr><td style="width: 25%;"><a href="llines.html">panel.segments</a></td>
+<td>Replacements of traditional graphics functions</td></tr>
+<tr><td style="width: 25%;"><a href="panel.smoothScatter.html">panel.smoothScatter</a></td>
+<td>Lattice panel function analogous to smoothScatter</td></tr>
+<tr><td style="width: 25%;"><a href="panel.spline.html">panel.spline</a></td>
+<td>Panel Function to Add a Spline Smooth</td></tr>
+<tr><td style="width: 25%;"><a href="panel.xyplot.html">panel.splom</a></td>
+<td>Default Panel Function for xyplot</td></tr>
+<tr><td style="width: 25%;"><a href="panel.stripplot.html">panel.stripplot</a></td>
+<td>Default Panel Function for stripplot</td></tr>
+<tr><td style="width: 25%;"><a href="panel.superpose.html">panel.superpose</a></td>
+<td>Panel Function for Display Marked by groups</td></tr>
+<tr><td style="width: 25%;"><a href="panel.superpose.html">panel.superpose.2</a></td>
+<td>Panel Function for Display Marked by groups</td></tr>
+<tr><td style="width: 25%;"><a href="panel.superpose.html">panel.superpose.plain</a></td>
+<td>Panel Function for Display Marked by groups</td></tr>
+<tr><td style="width: 25%;"><a href="llines.html">panel.text</a></td>
+<td>Replacements of traditional graphics functions</td></tr>
+<tr><td style="width: 25%;"><a href="tmd.html">panel.tmd.default</a></td>
+<td>Tukey Mean-Difference Plot</td></tr>
+<tr><td style="width: 25%;"><a href="tmd.html">panel.tmd.qqmath</a></td>
+<td>Tukey Mean-Difference Plot</td></tr>
+<tr><td style="width: 25%;"><a href="panel.violin.html">panel.violin</a></td>
+<td>Panel Function to create Violin Plots</td></tr>
+<tr><td style="width: 25%;"><a href="panel.cloud.html">panel.wireframe</a></td>
+<td>Default Panel Function for cloud</td></tr>
+<tr><td style="width: 25%;"><a href="panel.xyplot.html">panel.xyplot</a></td>
+<td>Default Panel Function for xyplot</td></tr>
+<tr><td style="width: 25%;"><a href="splom.html">parallel</a></td>
+<td>Scatter Plot Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="splom.html">parallelplot</a></td>
+<td>Scatter Plot Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="splom.html">parallelplot.data.frame</a></td>
+<td>Scatter Plot Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="splom.html">parallelplot.formula</a></td>
+<td>Scatter Plot Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="splom.html">parallelplot.matrix</a></td>
+<td>Scatter Plot Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="shingles.html">plot.shingle</a></td>
+<td>shingles</td></tr>
+<tr><td style="width: 25%;"><a href="print.trellis.html">plot.trellis</a></td>
+<td>Plot and Summarize Trellis Objects</td></tr>
+<tr><td style="width: 25%;"><a href="prepanel.default.html">prepanel.default.bwplot</a></td>
+<td>Default Prepanel Functions</td></tr>
+<tr><td style="width: 25%;"><a href="prepanel.default.html">prepanel.default.cloud</a></td>
+<td>Default Prepanel Functions</td></tr>
+<tr><td style="width: 25%;"><a href="prepanel.default.html">prepanel.default.densityplot</a></td>
+<td>Default Prepanel Functions</td></tr>
+<tr><td style="width: 25%;"><a href="prepanel.default.html">prepanel.default.histogram</a></td>
+<td>Default Prepanel Functions</td></tr>
+<tr><td style="width: 25%;"><a href="prepanel.default.html">prepanel.default.levelplot</a></td>
+<td>Default Prepanel Functions</td></tr>
+<tr><td style="width: 25%;"><a href="prepanel.default.html">prepanel.default.parallel</a></td>
+<td>Default Prepanel Functions</td></tr>
+<tr><td style="width: 25%;"><a href="prepanel.default.html">prepanel.default.qq</a></td>
+<td>Default Prepanel Functions</td></tr>
+<tr><td style="width: 25%;"><a href="prepanel.default.html">prepanel.default.qqmath</a></td>
+<td>Default Prepanel Functions</td></tr>
+<tr><td style="width: 25%;"><a href="prepanel.default.html">prepanel.default.splom</a></td>
+<td>Default Prepanel Functions</td></tr>
+<tr><td style="width: 25%;"><a href="prepanel.default.html">prepanel.default.xyplot</a></td>
+<td>Default Prepanel Functions</td></tr>
+<tr><td style="width: 25%;"><a href="prepanel.functions.html">prepanel.lmline</a></td>
+<td>Useful Prepanel Function for Lattice</td></tr>
+<tr><td style="width: 25%;"><a href="prepanel.functions.html">prepanel.loess</a></td>
+<td>Useful Prepanel Function for Lattice</td></tr>
+<tr><td style="width: 25%;"><a href="prepanel.functions.html">prepanel.qqmathline</a></td>
+<td>Useful Prepanel Function for Lattice</td></tr>
+<tr><td style="width: 25%;"><a href="prepanel.functions.html">prepanel.spline</a></td>
+<td>Useful Prepanel Function for Lattice</td></tr>
+<tr><td style="width: 25%;"><a href="tmd.html">prepanel.tmd.default</a></td>
+<td>Tukey Mean-Difference Plot</td></tr>
+<tr><td style="width: 25%;"><a href="tmd.html">prepanel.tmd.qqmath</a></td>
+<td>Tukey Mean-Difference Plot</td></tr>
+<tr><td style="width: 25%;"><a href="shingles.html">print.shingle</a></td>
+<td>shingles</td></tr>
+<tr><td style="width: 25%;"><a href="shingles.html">print.shingleLevel</a></td>
+<td>shingles</td></tr>
+<tr><td style="width: 25%;"><a href="print.trellis.html">print.trellis</a></td>
+<td>Plot and Summarize Trellis Objects</td></tr>
+</table>
+
+<h2><a name="Q">-- Q --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="qq.html">qq</a></td>
+<td>Quantile-Quantile Plots of Two Samples</td></tr>
+<tr><td style="width: 25%;"><a href="qq.html">qq.formula</a></td>
+<td>Quantile-Quantile Plots of Two Samples</td></tr>
+<tr><td style="width: 25%;"><a href="qqmath.html">qqmath</a></td>
+<td>Q-Q Plot with Theoretical Distribution</td></tr>
+<tr><td style="width: 25%;"><a href="qqmath.html">qqmath.formula</a></td>
+<td>Q-Q Plot with Theoretical Distribution</td></tr>
+<tr><td style="width: 25%;"><a href="qqmath.html">qqmath.numeric</a></td>
+<td>Q-Q Plot with Theoretical Distribution</td></tr>
+</table>
+
+<h2><a name="R">-- R --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="rfs.html">rfs</a></td>
+<td>Residual and Fit Spread Plots</td></tr>
+<tr><td style="width: 25%;"><a href="Rows.html">Rows</a></td>
+<td>Extract rows from a list</td></tr>
+</table>
+
+<h2><a name="S">-- S --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="shingles.html">shingle</a></td>
+<td>shingles</td></tr>
+<tr><td style="width: 25%;"><a href="trellis.par.get.html">show.settings</a></td>
+<td>Graphical Parameters for Trellis Displays</td></tr>
+<tr><td style="width: 25%;"><a href="simpleKey.html">simpleKey</a></td>
+<td>Function to generate a simple key</td></tr>
+<tr><td style="width: 25%;"><a href="simpleTheme.html">simpleTheme</a></td>
+<td>Function to generate a simple theme</td></tr>
+<tr><td style="width: 25%;"><a href="singer.html">singer</a></td>
+<td>Heights of New York Choral Society singers</td></tr>
+<tr><td style="width: 25%;"><a href="splom.html">splom</a></td>
+<td>Scatter Plot Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="splom.html">splom.data.frame</a></td>
+<td>Scatter Plot Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="splom.html">splom.formula</a></td>
+<td>Scatter Plot Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="splom.html">splom.matrix</a></td>
+<td>Scatter Plot Matrices</td></tr>
+<tr><td style="width: 25%;"><a href="trellis.device.html">standard.theme</a></td>
+<td>Initializing Trellis Displays</td></tr>
+<tr><td style="width: 25%;"><a href="strip.default.html">strip.custom</a></td>
+<td>Default Trellis Strip Function</td></tr>
+<tr><td style="width: 25%;"><a href="strip.default.html">strip.default</a></td>
+<td>Default Trellis Strip Function</td></tr>
+<tr><td style="width: 25%;"><a href="xyplot.html">stripplot</a></td>
+<td>Common Bivariate Trellis Plots</td></tr>
+<tr><td style="width: 25%;"><a href="xyplot.html">stripplot.formula</a></td>
+<td>Common Bivariate Trellis Plots</td></tr>
+<tr><td style="width: 25%;"><a href="xyplot.html">stripplot.numeric</a></td>
+<td>Common Bivariate Trellis Plots</td></tr>
+<tr><td style="width: 25%;"><a href="shingles.html">summary.shingle</a></td>
+<td>shingles</td></tr>
+<tr><td style="width: 25%;"><a href="print.trellis.html">summary.trellis</a></td>
+<td>Plot and Summarize Trellis Objects</td></tr>
+</table>
+
+<h2><a name="T">-- T --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="update.trellis.html">t.trellis</a></td>
+<td>Retrieve and Update Trellis Object</td></tr>
+<tr><td style="width: 25%;"><a href="tmd.html">tmd</a></td>
+<td>Tukey Mean-Difference Plot</td></tr>
+<tr><td style="width: 25%;"><a href="tmd.html">tmd.formula</a></td>
+<td>Tukey Mean-Difference Plot</td></tr>
+<tr><td style="width: 25%;"><a href="tmd.html">tmd.trellis</a></td>
+<td>Tukey Mean-Difference Plot</td></tr>
+<tr><td style="width: 25%;"><a href="panel.number.html">trellis.currentLayout</a></td>
+<td>Accessing Auxiliary Information During Plotting</td></tr>
+<tr><td style="width: 25%;"><a href="trellis.device.html">trellis.device</a></td>
+<td>Initializing Trellis Displays</td></tr>
+<tr><td style="width: 25%;"><a href="interaction.html">trellis.focus</a></td>
+<td>Functions to Interact with Lattice Plots</td></tr>
+<tr><td style="width: 25%;"><a href="interaction.html">trellis.grobname</a></td>
+<td>Functions to Interact with Lattice Plots</td></tr>
+<tr><td style="width: 25%;"><a href="update.trellis.html">trellis.last.object</a></td>
+<td>Retrieve and Update Trellis Object</td></tr>
+<tr><td style="width: 25%;"><a href="trellis.object.html">trellis.object</a></td>
+<td>A Trellis Plot Object</td></tr>
+<tr><td style="width: 25%;"><a href="interaction.html">trellis.panelArgs</a></td>
+<td>Functions to Interact with Lattice Plots</td></tr>
+<tr><td style="width: 25%;"><a href="trellis.par.get.html">trellis.par.get</a></td>
+<td>Graphical Parameters for Trellis Displays</td></tr>
+<tr><td style="width: 25%;"><a href="trellis.par.get.html">trellis.par.set</a></td>
+<td>Graphical Parameters for Trellis Displays</td></tr>
+<tr><td style="width: 25%;"><a href="interaction.html">trellis.switchFocus</a></td>
+<td>Functions to Interact with Lattice Plots</td></tr>
+<tr><td style="width: 25%;"><a href="interaction.html">trellis.unfocus</a></td>
+<td>Functions to Interact with Lattice Plots</td></tr>
+<tr><td style="width: 25%;"><a href="interaction.html">trellis.vpname</a></td>
+<td>Functions to Interact with Lattice Plots</td></tr>
+</table>
+
+<h2><a name="U">-- U --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="update.trellis.html">update.trellis</a></td>
+<td>Retrieve and Update Trellis Object</td></tr>
+<tr><td style="width: 25%;"><a href="utilities.3d.html">utilities.3d</a></td>
+<td>Utility functions for 3-D plots</td></tr>
+</table>
+
+<h2><a name="W">-- W --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="panel.number.html">which.packet</a></td>
+<td>Accessing Auxiliary Information During Plotting</td></tr>
+<tr><td style="width: 25%;"><a href="cloud.html">wireframe</a></td>
+<td>3d Scatter Plot and Wireframe Surface Plot</td></tr>
+<tr><td style="width: 25%;"><a href="cloud.html">wireframe.formula</a></td>
+<td>3d Scatter Plot and Wireframe Surface Plot</td></tr>
+<tr><td style="width: 25%;"><a href="cloud.html">wireframe.matrix</a></td>
+<td>3d Scatter Plot and Wireframe Surface Plot</td></tr>
+</table>
+
+<h2><a name="X">-- X --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="axis.default.html">xscale.components.default</a></td>
+<td>Default axis annotation utilities</td></tr>
+<tr><td style="width: 25%;"><a href="xyplot.html">xyplot</a></td>
+<td>Common Bivariate Trellis Plots</td></tr>
+<tr><td style="width: 25%;"><a href="xyplot.html">xyplot.formula</a></td>
+<td>Common Bivariate Trellis Plots</td></tr>
+<tr><td style="width: 25%;"><a href="xyplot.ts.html">xyplot.ts</a></td>
+<td>Time series plotting methods</td></tr>
+</table>
+
+<h2><a name="Y">-- Y --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="axis.default.html">yscale.components.default</a></td>
+<td>Default axis annotation utilities</td></tr>
+</table>
+
+<h2><a name="misc">-- misc --</a></h2>
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="shingles.html">[.shingle</a></td>
+<td>shingles</td></tr>
+<tr><td style="width: 25%;"><a href="update.trellis.html">[.trellis</a></td>
+<td>Retrieve and Update Trellis Object</td></tr>
+</table>
+</body></html>

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/html/00Index.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/data/Rdata.rdx
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/data/Rdata.rdx
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/data/Rdata.rdb
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/data/Rdata.rdb
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/data/Rdata.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/lattice/data/Rdata.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/R/FactoMineR.rdx
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/R/FactoMineR.rdx
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/R/FactoMineR
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/R/FactoMineR	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/R/FactoMineR	(revision 2477)
@@ -0,0 +1,27 @@
+#  File share/R/nspackloader.R
+#  Part of the R package, http://www.R-project.org
+#
+#  Copyright (C) 1995-2012 The R Core Team
+#
+#  This program is free software; you can redistribute it and/or modify
+#  it under the terms of the GNU General Public License as published by
+#  the Free Software Foundation; either version 2 of the License, or
+#  (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  A copy of the GNU General Public License is available at
+#  http://www.r-project.org/Licenses/
+
+local({
+    info <- loadingNamespaceInfo()
+    pkg <- info$pkgname
+    ns <- .getNamespace(as.name(pkg))
+    if (is.null(ns))
+        stop("cannot find namespace environment for ", pkg, domain = NA);
+    dbbase <- file.path(info$libname, pkg, "R", pkg)
+    lazyLoad(dbbase, ns, filter = function(n) n != ".__NAMESPACE__.")
+})
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/R/FactoMineR.rdb
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/R/FactoMineR.rdb
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/html/R.css
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/html/R.css	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/html/R.css	(revision 2477)
@@ -0,0 +1,97 @@
+body {
+    background: white;
+    color: black;
+}
+
+a:link {
+    background: white;
+    color: blue;
+}
+
+a:visited {
+    background: white;
+    color: rgb(50%, 0%, 50%);
+}
+
+h1 {
+    background: white;
+    color: rgb(55%, 55%, 55%);
+    font-family: monospace;
+    font-size: x-large;
+    text-align: center;
+}
+
+h2 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-size: large;
+    text-align: center;
+}
+
+h3 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-size: large;
+}
+
+h4 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-style: italic;
+    font-size: large;
+}
+
+h5 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+}
+
+h6 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-style: italic;
+}
+		
+img.toplogo {
+    width: 4em;
+    vertical-align: middle;
+}
+
+img.arrow {
+    width: 30px;
+    height: 30px;
+    border: 0;
+}
+
+span.acronym {
+    font-size: small;
+}
+
+span.env {
+    font-family: monospace;
+}
+
+span.file {
+    font-family: monospace;
+}
+
+span.option{
+    font-family: monospace;
+}
+
+span.pkg {
+    font-weight: bold;
+}
+
+span.samp{
+    font-family: monospace;
+}
+
+div.vignettes a:hover {
+    background: rgb(85%, 85%, 85%);
+}

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/html/R.css
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/html/00Index.html
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/html/00Index.html	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/html/00Index.html	(revision 2477)
@@ -0,0 +1,189 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title>R: Multivariate Exploratory Data Analysis and Data Mining</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<link rel="stylesheet" type="text/css" href="R.css" />
+</head><body>
+<h1> Multivariate Exploratory Data Analysis and Data Mining
+<img class="toplogo" src="../../../doc/html/Rlogo.svg" alt="[R logo]" />
+</h1>
+<hr/>
+<div style="text-align: center;">
+<a href="../../../doc/html/packages.html"><img class="arrow" src="../../../doc/html/left.jpg" alt="[Up]" /></a>
+<a href="../../../doc/html/index.html"><img class="arrow" src="../../../doc/html/up.jpg" alt="[Top]" /></a>
+</div><h2>Documentation for package &lsquo;FactoMineR&rsquo; version 1.35</h2>
+
+<ul><li><a href="../DESCRIPTION">DESCRIPTION file</a>.</li>
+<li><a href="../doc/index.html">User guides, package vignettes and other documentation.</a></li>
+</ul>
+
+<h2>Help Pages</h2>
+
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="FactoMineR-package.html">FactoMineR-package</a></td>
+<td>Multivariate Exploratory Data Analysis and Data Mining with R</td></tr>
+<tr><td style="width: 25%;"><a href="AovSum.html">AovSum</a></td>
+<td>Analysis of variance with the contrasts sum (the sum of the coefficients is 0)</td></tr>
+<tr><td style="width: 25%;"><a href="autoLab.html">autoLab</a></td>
+<td>Function to better position the labels on the graphs</td></tr>
+<tr><td style="width: 25%;"><a href="CA.html">CA</a></td>
+<td>Correspondence Analysis (CA)</td></tr>
+<tr><td style="width: 25%;"><a href="CaGalt.html">CaGalt</a></td>
+<td>Correspondence Analysis on Generalised Aggregated Lexical Table (CaGalt)</td></tr>
+<tr><td style="width: 25%;"><a href="catdes.html">catdes</a></td>
+<td>Categories description</td></tr>
+<tr><td style="width: 25%;"><a href="children.html">children</a></td>
+<td>Children (data)</td></tr>
+<tr><td style="width: 25%;"><a href="coeffRV.html">coeffRV</a></td>
+<td>Calculate the RV coefficient and test its significance</td></tr>
+<tr><td style="width: 25%;"><a href="condes.html">condes</a></td>
+<td>Continuous variable description</td></tr>
+<tr><td style="width: 25%;"><a href="coord.ellipse.html">coord.ellipse</a></td>
+<td>Construct confidence ellipses</td></tr>
+<tr><td style="width: 25%;"><a href="decathlon.html">decathlon</a></td>
+<td>Performance in decathlon (data)</td></tr>
+<tr><td style="width: 25%;"><a href="desfreq.html">descfreq</a></td>
+<td>Description of frequencies</td></tr>
+<tr><td style="width: 25%;"><a href="dimdesc.html">dimdesc</a></td>
+<td>Dimension description</td></tr>
+<tr><td style="width: 25%;"><a href="DMFA.html">DMFA</a></td>
+<td>Dual Multiple Factor Analysis (DMFA)</td></tr>
+<tr><td style="width: 25%;"><a href="ellipseCA.html">ellipseCA</a></td>
+<td>Draw confidence ellipses in CA</td></tr>
+<tr><td style="width: 25%;"><a href="estim_ncp.html">estim_ncp</a></td>
+<td>Estimate the number of components in Principal Component Analysis</td></tr>
+<tr><td style="width: 25%;"><a href="FactoMineR-package.html">FactoMineR</a></td>
+<td>Multivariate Exploratory Data Analysis and Data Mining with R</td></tr>
+<tr><td style="width: 25%;"><a href="FAMD.html">FAMD</a></td>
+<td>Factor Analysis for Mixed Data</td></tr>
+<tr><td style="width: 25%;"><a href="footsize.html">footsize</a></td>
+<td>footsize</td></tr>
+<tr><td style="width: 25%;"><a href="geomorphology.html">geomorphology</a></td>
+<td>geomorphology(data)</td></tr>
+<tr><td style="width: 25%;"><a href="gpa.html">GPA</a></td>
+<td>Generalised Procrustes Analysis</td></tr>
+<tr><td style="width: 25%;"><a href="graph.var.html">graph.var</a></td>
+<td>Make graph of variables</td></tr>
+<tr><td style="width: 25%;"><a href="HCPC.html">HCPC</a></td>
+<td>Hierarchical Clustering on Principle Components (HCPC)</td></tr>
+<tr><td style="width: 25%;"><a href="health.html">health</a></td>
+<td>health (data)</td></tr>
+<tr><td style="width: 25%;"><a href="HMFA.html">HMFA</a></td>
+<td>Hierarchical Multiple Factor Analysis</td></tr>
+<tr><td style="width: 25%;"><a href="hobbies.html">hobbies</a></td>
+<td>hobbies (data)</td></tr>
+<tr><td style="width: 25%;"><a href="JO.html">JO</a></td>
+<td>Number of medals in athletism during olympic games per country</td></tr>
+<tr><td style="width: 25%;"><a href="MCA.html">MCA</a></td>
+<td>Multiple Correspondence Analysis (MCA)</td></tr>
+<tr><td style="width: 25%;"><a href="MFA.html">MFA</a></td>
+<td>Multiple Factor Analysis (MFA)</td></tr>
+<tr><td style="width: 25%;"><a href="milk.html">milk</a></td>
+<td>milk</td></tr>
+<tr><td style="width: 25%;"><a href="mortality.html">mortality</a></td>
+<td>The cause of mortality in France in 1979 and 2006</td></tr>
+<tr><td style="width: 25%;"><a href="PCA.html">PCA</a></td>
+<td>Principal Component Analysis (PCA)</td></tr>
+<tr><td style="width: 25%;"><a href="plot.CA.html">plot.CA</a></td>
+<td>Draw the Correspondence Analysis (CA) graphs</td></tr>
+<tr><td style="width: 25%;"><a href="plot.CaGalt.html">plot.CaGalt</a></td>
+<td>Draw the Correspondence Analysis on Generalised Aggregated Lexical Table (CaGalt) graphs</td></tr>
+<tr><td style="width: 25%;"><a href="plot.catdes.html">plot.catdes</a></td>
+<td>Plots for description of clusters (catdes)</td></tr>
+<tr><td style="width: 25%;"><a href="plot.DMFA.html">plot.DMFA</a></td>
+<td>Draw the Dual Multiple Factor Analysis (DMFA) graphs</td></tr>
+<tr><td style="width: 25%;"><a href="plot.FAMD.html">plot.FAMD</a></td>
+<td>Draw the Multiple Factor Analysis for Mixt Data graphs</td></tr>
+<tr><td style="width: 25%;"><a href="plot.GPA.html">plot.GPA</a></td>
+<td>Draw the General Procrustes Analysis (GPA) map</td></tr>
+<tr><td style="width: 25%;"><a href="plot.HCPC.html">plot.HCPC</a></td>
+<td>Plots for Hierarchical Classification on Principle Components (HCPC) results</td></tr>
+<tr><td style="width: 25%;"><a href="plot.HMFA.html">plot.HMFA</a></td>
+<td>Draw the Hierarchical Multiple Factor Analysis (HMFA) graphs</td></tr>
+<tr><td style="width: 25%;"><a href="plot.MCA.html">plot.MCA</a></td>
+<td>Draw the Multiple Correspondence Analysis (MCA) graphs</td></tr>
+<tr><td style="width: 25%;"><a href="plot.MFA.html">plot.MFA</a></td>
+<td>Draw the Multiple Factor Analysis (MFA) graphs</td></tr>
+<tr><td style="width: 25%;"><a href="plot.PCA.html">plot.PCA</a></td>
+<td>Draw the Principal Component Analysis (PCA) graphs</td></tr>
+<tr><td style="width: 25%;"><a href="plotellipses.html">plotellipses</a></td>
+<td>Draw confidence ellipses around the categories</td></tr>
+<tr><td style="width: 25%;"><a href="plot.GPApartial.html">plotGPApartial</a></td>
+<td>Draw an interactive General Procrustes Analysis (GPA) map</td></tr>
+<tr><td style="width: 25%;"><a href="plot.MFApartial.html">plotMFApartial</a></td>
+<td>Plot an interactive Multiple Factor Analysis (MFA) graph</td></tr>
+<tr><td style="width: 25%;"><a href="poison.html">poison</a></td>
+<td>Poison</td></tr>
+<tr><td style="width: 25%;"><a href="poison.text.html">poison.text</a></td>
+<td>Poison</td></tr>
+<tr><td style="width: 25%;"><a href="poulet.html">poulet</a></td>
+<td>Genomic data for chicken</td></tr>
+<tr><td style="width: 25%;"><a href="predict.CA.html">predict.CA</a></td>
+<td>Predict projection for new rows with Correspondence Analysis</td></tr>
+<tr><td style="width: 25%;"><a href="predict.FAMD.html">predict.FAMD</a></td>
+<td>Predict projection for new rows with Factor Analysis of Mixed Data</td></tr>
+<tr><td style="width: 25%;"><a href="predict.MCA.html">predict.MCA</a></td>
+<td>Predict projection for new rows with Multiple Correspondence Analysis</td></tr>
+<tr><td style="width: 25%;"><a href="predict.MFA.html">predict.MFA</a></td>
+<td>Predict projection for new rows with Multiple Factor Analysis</td></tr>
+<tr><td style="width: 25%;"><a href="predict.PCA.html">predict.PCA</a></td>
+<td>Predict projection for new rows with Principal Component Analysis</td></tr>
+<tr><td style="width: 25%;"><a href="prefpls.html">prefpls</a></td>
+<td>Scatter plot and additional variables with quality of representation contour lines</td></tr>
+<tr><td style="width: 25%;"><a href="print.AovSum.html">print.AovSum</a></td>
+<td>Print the AovSum results</td></tr>
+<tr><td style="width: 25%;"><a href="print.CA.html">print.CA</a></td>
+<td>Print the Correspondance Analysis (CA) results</td></tr>
+<tr><td style="width: 25%;"><a href="print.CaGalt.html">print.CaGalt</a></td>
+<td>Print the Correspondence Analysis on Generalised Aggregated Lexical Table (CaGalt) results</td></tr>
+<tr><td style="width: 25%;"><a href="print.FAMD.html">print.FAMD</a></td>
+<td>Print the Multiple Factor Analysis of mixt Data (FAMD) results</td></tr>
+<tr><td style="width: 25%;"><a href="print.GPA.html">print.GPA</a></td>
+<td>Print the Generalized Procrustes Analysis (GPA) results</td></tr>
+<tr><td style="width: 25%;"><a href="print.HCPC.html">print.HCPC</a></td>
+<td>Print the Hierarchical Clustering on Principal Components (HCPC) results</td></tr>
+<tr><td style="width: 25%;"><a href="print.HMFA.html">print.HMFA</a></td>
+<td>Print the Hierarchical Multiple Factor Analysis results</td></tr>
+<tr><td style="width: 25%;"><a href="print.MCA.html">print.MCA</a></td>
+<td>Print the Multiple Correspondance Analysis (MCA) results</td></tr>
+<tr><td style="width: 25%;"><a href="print.MFA.html">print.MFA</a></td>
+<td>Print the Multiple Factor Analysis results</td></tr>
+<tr><td style="width: 25%;"><a href="print.PCA.html">print.PCA</a></td>
+<td>Print the Principal Component Analysis (PCA) results</td></tr>
+<tr><td style="width: 25%;"><a href="reconst.html">reconst</a></td>
+<td>Reconstruction of the data from the PCA, CA or MFA results</td></tr>
+<tr><td style="width: 25%;"><a href="RegBest.html">RegBest</a></td>
+<td>Select variables in multiple linear regression</td></tr>
+<tr><td style="width: 25%;"><a href="senso.html">senso</a></td>
+<td>senso</td></tr>
+<tr><td style="width: 25%;"><a href="simule.html">simule</a></td>
+<td>Simulate by bootstrap</td></tr>
+<tr><td style="width: 25%;"><a href="summary.CA.html">summary.CA</a></td>
+<td>Printing summeries of ca objects</td></tr>
+<tr><td style="width: 25%;"><a href="summary.CaGalt.html">summary.CaGalt</a></td>
+<td>Printing summaries of CaGalt objects</td></tr>
+<tr><td style="width: 25%;"><a href="summary.FAMD.html">summary.FAMD</a></td>
+<td>Printing summeries of FAMD objects</td></tr>
+<tr><td style="width: 25%;"><a href="summary.MCA.html">summary.MCA</a></td>
+<td>Printing summeries of MCA objects</td></tr>
+<tr><td style="width: 25%;"><a href="summary.MFA.html">summary.MFA</a></td>
+<td>Printing summaries of MFA objects</td></tr>
+<tr><td style="width: 25%;"><a href="summary.PCA.html">summary.PCA</a></td>
+<td>Printing summeries of PCA objects</td></tr>
+<tr><td style="width: 25%;"><a href="svd.triplet.html">svd.triplet</a></td>
+<td>Singular Value Decomposition of a Matrix</td></tr>
+<tr><td style="width: 25%;"><a href="tab.disjonctif.html">tab.disjonctif</a></td>
+<td>Make a disjonctif table</td></tr>
+<tr><td style="width: 25%;"><a href="tab.disjonctif.prop.html">tab.disjonctif.prop</a></td>
+<td>Make a disjunctive table when missing values are present</td></tr>
+<tr><td style="width: 25%;"><a href="tea.html">tea</a></td>
+<td>tea (data)</td></tr>
+<tr><td style="width: 25%;"><a href="textual.html">textual</a></td>
+<td>Text mining</td></tr>
+<tr><td style="width: 25%;"><a href="wine.html">wine</a></td>
+<td>Wine</td></tr>
+<tr><td style="width: 25%;"><a href="write.infile.html">write.infile</a></td>
+<td>Print in a file</td></tr>
+</table>
+</body></html>

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/html/00Index.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/doc/clustering.pdf
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/doc/clustering.pdf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/doc/FactoMineR.Rmd
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/doc/FactoMineR.Rmd	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/doc/FactoMineR.Rmd	(revision 2477)
@@ -0,0 +1,36 @@
+<!--
+%\VignetteEngine{knitr::knitr}
+%\VignetteIndexEntry{FactoMineR}
+-->
+
+---
+title: "FactoMineR"
+author: "Fran\ccois Husson"
+output:
+  pdf_document:
+    fig_height: 6
+    keep_tex: yes
+  html_document: default
+  word_document: default
+---
+
+
+# Introduction
+
+The FactoMineR package is a package dedicated to exploratory multivariate data analysis using R. 
+One of the main reasons for developing this package is that we felt a need for a multivariate
+approach closer to our practice via:
+* the introduction of ``supplementary'' information;
+* the use of a more geometrical point of view than the one
+usually adopted by most of the Anglo-American practitioners.
+Another reason is that obviously it represents a convenient way to
+implement new methodologies (or methodologies dedicated to the
+advanced practitioner) as the ones we're presenting thereafter
+that take into account different structure on the data such as:
+* a partition on the variables;
+* a partition on the individuals;
+* a hierarchy structure on the variables.
+
+You can see more information about the package with the paper published in 
+the Journal of Statistical Software: 
+http://www.jstatsoft.org/article/view/v025i01/
\ No newline at end of file
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/doc/index.html
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/doc/index.html	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/doc/index.html	(revision 2477)
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title>R: Vignettes and other documentation</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<link rel="stylesheet" type="text/css" href="/doc/html/R.css" />
+</head><body>
+<h1> Vignettes and other documentation
+<img class="toplogo" src="/doc/html/Rlogo.svg" alt="[R logo]" />
+</h1>
+<hr/>
+<div style="text-align: center;">
+<a href="/doc/html/index.html"><img class="arrow" src="/doc/html/up.jpg" alt="[Top]" /></a>
+</div>
+<h2>Vignettes from package 'FactoMineR'</h2>
+<table width="100%">
+<col style="width: 22%;" />
+<col style="width:  2%;" />
+<col style="width: 50%;" />
+<col style="width:  8%;" />
+<col style="width:  8%;" />
+<col style="width:  8%;" />
+<tr><td style="text-align: right; vertical-align: top;"><a href="../../../library/FactoMineR/doc/FactoMineR.pdf">FactoMineR::FactoMineR</a></td>
+<td></td><td valign="top">FactoMineR</td>
+<td valign="top"><a href="../../../library/FactoMineR/doc/FactoMineR.pdf">PDF</a></td>
+<td valign="top"><a href="../../../library/FactoMineR/doc/FactoMineR.Rmd">source</a></td>
+<td valign="top" style="white-space: nowrap"></td></tr>
+<tr><td style="text-align: right; vertical-align: top;"><a href="../../../library/FactoMineR/doc/clustering.pdf">FactoMineR::clustering</a></td>
+<td></td><td valign="top">clustering</td>
+<td valign="top"><a href="../../../library/FactoMineR/doc/clustering.pdf">PDF</a></td>
+<td valign="top"><a href="../../../library/FactoMineR/doc/clustering.Rmd">source</a></td>
+<td valign="top" style="white-space: nowrap"></td></tr>
+</table>
+</body></html>

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/doc/index.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/doc/FactoMineR.pdf
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/doc/FactoMineR.pdf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/doc/clustering.Rmd
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/doc/clustering.Rmd	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/doc/clustering.Rmd	(revision 2477)
@@ -0,0 +1,21 @@
+<!--
+%\VignetteEngine{knitr::knitr}
+%\VignetteIndexEntry{clustering}
+-->
+
+---
+title: "Clustering"
+author: "Fran\ccois Husson"
+output:
+  pdf_document:
+    fig_height: 6
+    keep_tex: yes
+  html_document: default
+  word_document: default
+---
+
+
+# Introduction
+
+This preprint gives some ideas about the use of Principal Component methods 
+with clustering methods.
\ No newline at end of file
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/Meta/package.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/Meta/package.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/Meta/nsInfo.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/Meta/nsInfo.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/Meta/hsearch.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/Meta/hsearch.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/Meta/links.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/Meta/links.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/Meta/Rd.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/Meta/Rd.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/Meta/vignette.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/Meta/vignette.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/Meta/data.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/Meta/data.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/help/FactoMineR.rdb
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/help/FactoMineR.rdb
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/help/FactoMineR.rdx
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/help/FactoMineR.rdx
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/help/AnIndex
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/help/AnIndex	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/help/AnIndex	(revision 2477)
@@ -0,0 +1,82 @@
+FactoMineR-package	FactoMineR-package
+AovSum	AovSum
+autoLab	autoLab
+CA	CA
+CaGalt	CaGalt
+catdes	catdes
+children	children
+coeffRV	coeffRV
+condes	condes
+coord.ellipse	coord.ellipse
+decathlon	decathlon
+descfreq	desfreq
+dimdesc	dimdesc
+DMFA	DMFA
+ellipseCA	ellipseCA
+estim_ncp	estim_ncp
+FactoMineR	FactoMineR-package
+FAMD	FAMD
+footsize	footsize
+geomorphology	geomorphology
+GPA	gpa
+graph.var	graph.var
+HCPC	HCPC
+health	health
+HMFA	HMFA
+hobbies	hobbies
+JO	JO
+MCA	MCA
+MFA	MFA
+milk	milk
+mortality	mortality
+PCA	PCA
+plot.CA	plot.CA
+plot.CaGalt	plot.CaGalt
+plot.catdes	plot.catdes
+plot.DMFA	plot.DMFA
+plot.FAMD	plot.FAMD
+plot.GPA	plot.GPA
+plot.HCPC	plot.HCPC
+plot.HMFA	plot.HMFA
+plot.MCA	plot.MCA
+plot.MFA	plot.MFA
+plot.PCA	plot.PCA
+plotellipses	plotellipses
+plotGPApartial	plot.GPApartial
+plotMFApartial	plot.MFApartial
+poison	poison
+poison.text	poison.text
+poulet	poulet
+predict.CA	predict.CA
+predict.FAMD	predict.FAMD
+predict.MCA	predict.MCA
+predict.MFA	predict.MFA
+predict.PCA	predict.PCA
+prefpls	prefpls
+print.AovSum	print.AovSum
+print.CA	print.CA
+print.CaGalt	print.CaGalt
+print.FAMD	print.FAMD
+print.GPA	print.GPA
+print.HCPC	print.HCPC
+print.HMFA	print.HMFA
+print.MCA	print.MCA
+print.MFA	print.MFA
+print.PCA	print.PCA
+reconst	reconst
+RegBest	RegBest
+senso	senso
+simule	simule
+summary.CA	summary.CA
+summary.CaGalt	summary.CaGalt
+summary.FAMD	summary.FAMD
+summary.MCA	summary.MCA
+summary.MFA	summary.MFA
+summary.PCA	summary.PCA
+svd.triplet	svd.triplet
+tab.disjonctif	tab.disjonctif
+tab.disjonctif.prop	tab.disjonctif.prop
+tea	tea
+textual	textual
+wine	wine
+write.infile	write.infile
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/help/paths.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/help/paths.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/help/aliases.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/help/aliases.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/data/datalist
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/data/datalist	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/data/datalist	(revision 2477)
@@ -0,0 +1,15 @@
+JO
+children
+decathlon
+footsize
+geomorphology
+health
+hobbies
+milk
+mortality
+poison
+poison.text
+poulet
+senso
+tea
+wine
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/data/decathlon.rda
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/data/decathlon.rda
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/data/footsize.rda
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/data/footsize.rda
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/data/wine.rda
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/data/wine.rda
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/data/mortality.rda
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/data/mortality.rda
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/data/health.rda
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/data/health.rda
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/data/poison.rda
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/data/poison.rda
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/data/senso.rda
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/data/senso.rda
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/data/JO.rda
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/data/JO.rda
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/data/children.rda
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/data/children.rda
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/data/tea.rda
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/data/tea.rda
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/data/geomorphology.rda
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/data/geomorphology.rda
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/data/poison.text.rda
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/data/poison.text.rda
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/data/hobbies.rda
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/data/hobbies.rda
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/data/milk.rda
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/FactoMineR/data/milk.rda
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/rpart/html/R.css
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/rpart/html/R.css	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/rpart/html/R.css	(revision 2477)
@@ -0,0 +1,97 @@
+body {
+    background: white;
+    color: black;
+}
+
+a:link {
+    background: white;
+    color: blue;
+}
+
+a:visited {
+    background: white;
+    color: rgb(50%, 0%, 50%);
+}
+
+h1 {
+    background: white;
+    color: rgb(55%, 55%, 55%);
+    font-family: monospace;
+    font-size: x-large;
+    text-align: center;
+}
+
+h2 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-size: large;
+    text-align: center;
+}
+
+h3 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-size: large;
+}
+
+h4 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-style: italic;
+    font-size: large;
+}
+
+h5 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+}
+
+h6 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-style: italic;
+}
+		
+img.toplogo {
+    width: 4em;
+    vertical-align: middle;
+}
+
+img.arrow {
+    width: 30px;
+    height: 30px;
+    border: 0;
+}
+
+span.acronym {
+    font-size: small;
+}
+
+span.env {
+    font-family: monospace;
+}
+
+span.file {
+    font-family: monospace;
+}
+
+span.option{
+    font-family: monospace;
+}
+
+span.pkg {
+    font-weight: bold;
+}
+
+span.samp{
+    font-family: monospace;
+}
+
+div.vignettes a:hover {
+    background: rgb(85%, 85%, 85%);
+}

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/rpart/html/R.css
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/rpart/html/00Index.html
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/rpart/html/00Index.html	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/rpart/html/00Index.html	(revision 2477)
@@ -0,0 +1,86 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title>R: Recursive Partitioning and Regression Trees</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<link rel="stylesheet" type="text/css" href="R.css" />
+</head><body>
+<h1> Recursive Partitioning and Regression Trees
+<img class="toplogo" src="../../../doc/html/Rlogo.svg" alt="[R logo]" />
+</h1>
+<hr/>
+<div style="text-align: center;">
+<a href="../../../doc/html/packages.html"><img class="arrow" src="../../../doc/html/left.jpg" alt="[Up]" /></a>
+<a href="../../../doc/html/index.html"><img class="arrow" src="../../../doc/html/up.jpg" alt="[Top]" /></a>
+</div><h2>Documentation for package &lsquo;rpart&rsquo; version 4.1-10</h2>
+
+<ul><li><a href="../DESCRIPTION">DESCRIPTION file</a>.</li>
+<li><a href="../doc/index.html">User guides, package vignettes and other documentation.</a></li>
+<li><a href="../NEWS">Package NEWS</a>.</li>
+</ul>
+
+<h2>Help Pages</h2>
+
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="car.test.frame.html">car.test.frame</a></td>
+<td>Automobile Data from 'Consumer Reports' 1990</td></tr>
+<tr><td style="width: 25%;"><a href="car90.html">car90</a></td>
+<td>Automobile Data from 'Consumer Reports' 1990</td></tr>
+<tr><td style="width: 25%;"><a href="cu.summary.html">cu.summary</a></td>
+<td>Automobile Data from 'Consumer Reports' 1990</td></tr>
+<tr><td style="width: 25%;"><a href="kyphosis.html">kyphosis</a></td>
+<td>Data on Children who have had Corrective Spinal Surgery</td></tr>
+<tr><td style="width: 25%;"><a href="labels.rpart.html">labels.rpart</a></td>
+<td>Create Split Labels For an Rpart Object</td></tr>
+<tr><td style="width: 25%;"><a href="meanvar.rpart.html">meanvar</a></td>
+<td>Mean-Variance Plot for an Rpart Object</td></tr>
+<tr><td style="width: 25%;"><a href="meanvar.rpart.html">meanvar.rpart</a></td>
+<td>Mean-Variance Plot for an Rpart Object</td></tr>
+<tr><td style="width: 25%;"><a href="na.rpart.html">na.rpart</a></td>
+<td>Handles Missing Values in an Rpart Object</td></tr>
+<tr><td style="width: 25%;"><a href="path.rpart.html">path.rpart</a></td>
+<td>Follow Paths to Selected Nodes of an Rpart Object</td></tr>
+<tr><td style="width: 25%;"><a href="plot.rpart.html">plot.rpart</a></td>
+<td>Plot an Rpart Object</td></tr>
+<tr><td style="width: 25%;"><a href="plotcp.html">plotcp</a></td>
+<td>Plot a Complexity Parameter Table for an Rpart Fit</td></tr>
+<tr><td style="width: 25%;"><a href="post.rpart.html">post</a></td>
+<td>PostScript Presentation Plot of an Rpart Object</td></tr>
+<tr><td style="width: 25%;"><a href="post.rpart.html">post.rpart</a></td>
+<td>PostScript Presentation Plot of an Rpart Object</td></tr>
+<tr><td style="width: 25%;"><a href="predict.rpart.html">predict.rpart</a></td>
+<td>Predictions from a Fitted Rpart Object</td></tr>
+<tr><td style="width: 25%;"><a href="print.rpart.html">print.rpart</a></td>
+<td>Print an Rpart Object</td></tr>
+<tr><td style="width: 25%;"><a href="printcp.html">printcp</a></td>
+<td>Displays CP table for Fitted Rpart Object</td></tr>
+<tr><td style="width: 25%;"><a href="prune.rpart.html">prune</a></td>
+<td>Cost-complexity Pruning of an Rpart Object</td></tr>
+<tr><td style="width: 25%;"><a href="prune.rpart.html">prune.rpart</a></td>
+<td>Cost-complexity Pruning of an Rpart Object</td></tr>
+<tr><td style="width: 25%;"><a href="residuals.rpart.html">residuals.rpart</a></td>
+<td>Residuals From a Fitted Rpart Object</td></tr>
+<tr><td style="width: 25%;"><a href="rpart.html">rpart</a></td>
+<td>Recursive Partitioning and Regression Trees</td></tr>
+<tr><td style="width: 25%;"><a href="rpart.control.html">rpart.control</a></td>
+<td>Control for Rpart Fits</td></tr>
+<tr><td style="width: 25%;"><a href="rpart.exp.html">rpart.exp</a></td>
+<td>Initialization function for exponential fitting</td></tr>
+<tr><td style="width: 25%;"><a href="rpart.object.html">rpart.object</a></td>
+<td>Recursive Partitioning and Regression Trees Object</td></tr>
+<tr><td style="width: 25%;"><a href="rsq.rpart.html">rsq.rpart</a></td>
+<td>Plots the Approximate R-Square for the Different Splits</td></tr>
+<tr><td style="width: 25%;"><a href="snip.rpart.html">snip.rpart</a></td>
+<td>Snip Subtrees of an Rpart Object</td></tr>
+<tr><td style="width: 25%;"><a href="solder.html">solder</a></td>
+<td>Soldering of Components on Printed-Circuit Boards</td></tr>
+<tr><td style="width: 25%;"><a href="stagec.html">stagec</a></td>
+<td>Stage C Prostate Cancer</td></tr>
+<tr><td style="width: 25%;"><a href="summary.rpart.html">summary.rpart</a></td>
+<td>Summarize a Fitted Rpart Object</td></tr>
+<tr><td style="width: 25%;"><a href="text.rpart.html">text.rpart</a></td>
+<td>Place Text on a Dendrogram Plot</td></tr>
+<tr><td style="width: 25%;"><a href="xpred.rpart.html">xpred.rpart</a></td>
+<td>Return Cross-Validated Predictions</td></tr>
+</table>
+</body></html>

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/rpart/html/00Index.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/rpart/data/Rdata.rdb
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/rpart/data/Rdata.rdb
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/rpart/data/Rdata.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/rpart/data/Rdata.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/rpart/data/Rdata.rdx
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/rpart/data/Rdata.rdx
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/rpart/po/ru/LC_MESSAGES/R-rpart.mo
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/rpart/po/ru/LC_MESSAGES/R-rpart.mo
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/rpart/po/ru/LC_MESSAGES/rpart.mo
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/rpart/po/ru/LC_MESSAGES/rpart.mo
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/rpart/po/fr/LC_MESSAGES/R-rpart.mo
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/rpart/po/fr/LC_MESSAGES/R-rpart.mo
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/rpart/po/fr/LC_MESSAGES/rpart.mo
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/rpart/po/fr/LC_MESSAGES/rpart.mo
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/rpart/po/de/LC_MESSAGES/R-rpart.mo
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/rpart/po/de/LC_MESSAGES/R-rpart.mo
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/rpart/po/de/LC_MESSAGES/rpart.mo
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/rpart/po/de/LC_MESSAGES/rpart.mo
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/rpart/po/ko/LC_MESSAGES/R-rpart.mo
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/rpart/po/ko/LC_MESSAGES/R-rpart.mo
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/rpart/po/ko/LC_MESSAGES/rpart.mo
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/rpart/po/ko/LC_MESSAGES/rpart.mo
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/rpart/po/en@quot/LC_MESSAGES/R-rpart.mo
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/rpart/po/en@quot/LC_MESSAGES/R-rpart.mo
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/rpart/po/en@quot/LC_MESSAGES/rpart.mo
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/rpart/po/en@quot/LC_MESSAGES/rpart.mo
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/rpart/po/pl/LC_MESSAGES/R-rpart.mo
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/rpart/po/pl/LC_MESSAGES/R-rpart.mo
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/rpart/po/pl/LC_MESSAGES/rpart.mo
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/rpart/po/pl/LC_MESSAGES/rpart.mo
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/rpart/R/rpart.rdb
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/rpart/R/rpart.rdb
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/rpart/R/rpart.rdx
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/rpart/R/rpart.rdx
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/rpart/R/rpart
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/rpart/R/rpart	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/rpart/R/rpart	(revision 2477)
@@ -0,0 +1,27 @@
+#  File share/R/nspackloader.R
+#  Part of the R package, http://www.R-project.org
+#
+#  Copyright (C) 1995-2012 The R Core Team
+#
+#  This program is free software; you can redistribute it and/or modify
+#  it under the terms of the GNU General Public License as published by
+#  the Free Software Foundation; either version 2 of the License, or
+#  (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  A copy of the GNU General Public License is available at
+#  http://www.r-project.org/Licenses/
+
+local({
+    info <- loadingNamespaceInfo()
+    pkg <- info$pkgname
+    ns <- .getNamespace(as.name(pkg))
+    if (is.null(ns))
+        stop("cannot find namespace environment for ", pkg, domain = NA);
+    dbbase <- file.path(info$libname, pkg, "R", pkg)
+    lazyLoad(dbbase, ns, filter = function(n) n != ".__NAMESPACE__.")
+})
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/rpart/tests/Examples/rpart-Ex.Rout.save
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/rpart/tests/Examples/rpart-Ex.Rout.save	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/rpart/tests/Examples/rpart-Ex.Rout.save	(revision 2477)
@@ -0,0 +1,1075 @@
+
+R version 3.1.2 Patched (2015-02-23 r67886) -- "Pumpkin Helmet"
+Copyright (C) 2015 The R Foundation for Statistical Computing
+Platform: x86_64-unknown-linux-gnu (64-bit)
+
+R is free software and comes with ABSOLUTELY NO WARRANTY.
+You are welcome to redistribute it under certain conditions.
+Type 'license()' or 'licence()' for distribution details.
+
+  Natural language support but running in an English locale
+
+R is a collaborative project with many contributors.
+Type 'contributors()' for more information and
+'citation()' on how to cite R or R packages in publications.
+
+Type 'demo()' for some demos, 'help()' for on-line help, or
+'help.start()' for an HTML browser interface to help.
+Type 'q()' to quit R.
+
+> pkgname <- "rpart"
+> source(file.path(R.home("share"), "R", "examples-header.R"))
+> options(warn = 1)
+> library('rpart')
+> 
+> base::assign(".oldSearch", base::search(), pos = 'CheckExEnv')
+> cleanEx()
+> nameEx("car.test.frame")
+> ### * car.test.frame
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: car.test.frame
+> ### Title: Automobile Data from 'Consumer Reports' 1990
+> ### Aliases: car.test.frame
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> z.auto <- rpart(Mileage ~ Weight, car.test.frame)
+> summary(z.auto)
+Call:
+rpart(formula = Mileage ~ Weight, data = car.test.frame)
+  n= 60 
+
+          CP nsplit rel error    xerror       xstd
+1 0.59534912      0 1.0000000 1.0319924 0.17931937
+2 0.13452819      1 0.4046509 0.4875114 0.07613003
+3 0.01282843      2 0.2701227 0.3802248 0.06685452
+4 0.01000000      3 0.2572943 0.3945980 0.06605572
+
+Variable importance
+Weight 
+   100 
+
+Node number 1: 60 observations,    complexity param=0.5953491
+  mean=24.58333, MSE=22.57639 
+  left son=2 (45 obs) right son=3 (15 obs)
+  Primary splits:
+      Weight < 2567.5 to the right, improve=0.5953491, (0 missing)
+
+Node number 2: 45 observations,    complexity param=0.1345282
+  mean=22.46667, MSE=8.026667 
+  left son=4 (22 obs) right son=5 (23 obs)
+  Primary splits:
+      Weight < 3087.5 to the right, improve=0.5045118, (0 missing)
+
+Node number 3: 15 observations
+  mean=30.93333, MSE=12.46222 
+
+Node number 4: 22 observations
+  mean=20.40909, MSE=2.78719 
+
+Node number 5: 23 observations,    complexity param=0.01282843
+  mean=24.43478, MSE=5.115312 
+  left son=10 (15 obs) right son=11 (8 obs)
+  Primary splits:
+      Weight < 2747.5 to the right, improve=0.1476996, (0 missing)
+
+Node number 10: 15 observations
+  mean=23.8, MSE=4.026667 
+
+Node number 11: 8 observations
+  mean=25.625, MSE=4.984375 
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("car90")
+> ### * car90
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: car90
+> ### Title: Automobile Data from 'Consumer Reports' 1990
+> ### Aliases: car90
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> data(car90)
+> plot(car90$Price/1000, car90$Weight,
++      xlab = "Price (thousands)", ylab = "Weight (lbs)")
+> mlowess <- function(x, y, ...) {
++     keep <- !(is.na(x) | is.na(y))
++     lowess(x[keep], y[keep], ...)
++ }
+> with(car90, lines(mlowess(Price/1000, Weight, f = 0.5)))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("cu.summary")
+> ### * cu.summary
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: cu.summary
+> ### Title: Automobile Data from 'Consumer Reports' 1990
+> ### Aliases: cu.summary
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> fit <- rpart(Price ~ Mileage + Type + Country, cu.summary)
+> par(xpd = TRUE)
+> plot(fit, compress = TRUE)
+> text(fit, use.n = TRUE)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("kyphosis")
+> ### * kyphosis
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: kyphosis
+> ### Title: Data on Children who have had Corrective Spinal Surgery
+> ### Aliases: kyphosis
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> fit <- rpart(Kyphosis ~ Age + Number + Start, data = kyphosis)
+> fit2 <- rpart(Kyphosis ~ Age + Number + Start, data = kyphosis,
++               parms = list(prior = c(0.65, 0.35), split = "information"))
+> fit3 <- rpart(Kyphosis ~ Age + Number + Start, data=kyphosis,
++               control = rpart.control(cp = 0.05))
+> par(mfrow = c(1,2), xpd = TRUE)
+> plot(fit)
+> text(fit, use.n = TRUE)
+> plot(fit2)
+> text(fit2, use.n = TRUE)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("meanvar.rpart")
+> ### * meanvar.rpart
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: meanvar.rpart
+> ### Title: Mean-Variance Plot for an Rpart Object
+> ### Aliases: meanvar meanvar.rpart
+> ### Keywords: tree
+> 
+> ### ** Examples
+> 
+> z.auto <- rpart(Mileage ~ Weight, car.test.frame)
+> meanvar(z.auto, log = 'xy')
+> 
+> 
+> 
+> cleanEx()
+> nameEx("path.rpart")
+> ### * path.rpart
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: path.rpart
+> ### Title: Follow Paths to Selected Nodes of an Rpart Object
+> ### Aliases: path.rpart
+> ### Keywords: tree
+> 
+> ### ** Examples
+> 
+> fit <- rpart(Kyphosis ~ Age + Number + Start, data = kyphosis)
+> print(fit)
+n= 81 
+
+node), split, n, loss, yval, (yprob)
+      * denotes terminal node
+
+ 1) root 81 17 absent (0.79012346 0.20987654)  
+   2) Start>=8.5 62  6 absent (0.90322581 0.09677419)  
+     4) Start>=14.5 29  0 absent (1.00000000 0.00000000) *
+     5) Start< 14.5 33  6 absent (0.81818182 0.18181818)  
+      10) Age< 55 12  0 absent (1.00000000 0.00000000) *
+      11) Age>=55 21  6 absent (0.71428571 0.28571429)  
+        22) Age>=111 14  2 absent (0.85714286 0.14285714) *
+        23) Age< 111 7  3 present (0.42857143 0.57142857) *
+   3) Start< 8.5 19  8 present (0.42105263 0.57894737) *
+> path.rpart(fit, node = c(11, 22))
+
+ node number: 11 
+   root
+   Start>=8.5
+   Start< 14.5
+   Age>=55
+
+ node number: 22 
+   root
+   Start>=8.5
+   Start< 14.5
+   Age>=55
+   Age>=111
+> 
+> 
+> 
+> cleanEx()
+> nameEx("plot.rpart")
+> ### * plot.rpart
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: plot.rpart
+> ### Title: Plot an Rpart Object
+> ### Aliases: plot.rpart
+> ### Keywords: tree
+> 
+> ### ** Examples
+> 
+> fit <- rpart(Price ~ Mileage + Type + Country, cu.summary)
+> par(xpd = TRUE)
+> plot(fit, compress = TRUE)
+> text(fit, use.n = TRUE)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("post.rpart")
+> ### * post.rpart
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: post.rpart
+> ### Title: PostScript Presentation Plot of an Rpart Object
+> ### Aliases: post.rpart post
+> ### Keywords: tree
+> 
+> ### ** Examples
+> 
+> z.auto <- rpart(Mileage ~ Weight, car.test.frame)
+> post(z.auto, file = "")   # display tree on active device
+>    # now construct postscript version on file "pretty.ps"
+>    # with no title
+> post(z.auto, file = "pretty.ps", title = " ")
+> z.hp <- rpart(Mileage ~ Weight + HP, car.test.frame)
+> post(z.hp)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("predict.rpart")
+> ### * predict.rpart
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: predict.rpart
+> ### Title: Predictions from a Fitted Rpart Object
+> ### Aliases: predict.rpart
+> ### Keywords: tree
+> 
+> ### ** Examples
+> 
+> z.auto <- rpart(Mileage ~ Weight, car.test.frame)
+> predict(z.auto)
+               Eagle Summit 4               Ford Escort   4 
+                     30.93333                      30.93333 
+               Ford Festiva 4                 Honda Civic 4 
+                     30.93333                      30.93333 
+              Mazda Protege 4              Mercury Tracer 4 
+                     30.93333                      30.93333 
+              Nissan Sentra 4              Pontiac LeMans 4 
+                     30.93333                      30.93333 
+              Subaru Loyale 4                Subaru Justy 3 
+                     30.93333                      30.93333 
+             Toyota Corolla 4               Toyota Tercel 4 
+                     30.93333                      30.93333 
+           Volkswagen Jetta 4           Chevrolet Camaro V8 
+                     30.93333                      20.40909 
+                Dodge Daytona               Ford Mustang V8 
+                     23.80000                      20.40909 
+                   Ford Probe          Honda Civic CRX Si 4 
+                     25.62500                      30.93333 
+       Honda Prelude Si 4WS 4                Nissan 240SX 4 
+                     25.62500                      23.80000 
+               Plymouth Laser                   Subaru XT 4 
+                     23.80000                      30.93333 
+                    Audi 80 4               Buick Skylark 4 
+                     25.62500                      25.62500 
+          Chevrolet Beretta 4          Chrysler Le Baron V6 
+                     25.62500                      23.80000 
+                 Ford Tempo 4                Honda Accord 4 
+                     23.80000                      23.80000 
+                  Mazda 626 4           Mitsubishi Galant 4 
+                     23.80000                      25.62500 
+          Mitsubishi Sigma V6               Nissan Stanza 4 
+                     20.40909                      23.80000 
+          Oldsmobile Calais 4                 Peugeot 405 4 
+                     25.62500                      25.62500 
+              Subaru Legacy 4                Toyota Camry 4 
+                     23.80000                      23.80000 
+                  Volvo 240 4               Acura Legend V6 
+                     23.80000                      20.40909 
+              Buick Century 4       Chrysler Le Baron Coupe 
+                     23.80000                      23.80000 
+       Chrysler New Yorker V6              Eagle Premier V6 
+                     20.40909                      20.40909 
+               Ford Taurus V6           Ford Thunderbird V6 
+                     20.40909                      20.40909 
+             Hyundai Sonata 4                  Mazda 929 V6 
+                     23.80000                      20.40909 
+             Nissan Maxima V6    Oldsmobile Cutlass Ciera 4 
+                     20.40909                      23.80000 
+Oldsmobile Cutlass Supreme V6             Toyota Cressida 6 
+                     20.40909                      20.40909 
+            Buick Le Sabre V6          Chevrolet Caprice V8 
+                     20.40909                      20.40909 
+   Ford LTD Crown Victoria V8       Chevrolet Lumina APV V6 
+                     20.40909                      20.40909 
+       Dodge Grand Caravan V6              Ford Aerostar V6 
+                     20.40909                      20.40909 
+                 Mazda MPV V6            Mitsubishi Wagon 4 
+                     20.40909                      20.40909 
+              Nissan Axxess 4                  Nissan Van 4 
+                     20.40909                      20.40909 
+> 
+> fit <- rpart(Kyphosis ~ Age + Number + Start, data = kyphosis)
+> predict(fit, type = "prob")   # class probabilities (default)
+      absent   present
+1  0.4210526 0.5789474
+2  0.8571429 0.1428571
+3  0.4210526 0.5789474
+4  0.4210526 0.5789474
+5  1.0000000 0.0000000
+6  1.0000000 0.0000000
+7  1.0000000 0.0000000
+8  1.0000000 0.0000000
+9  1.0000000 0.0000000
+10 0.4285714 0.5714286
+11 0.4285714 0.5714286
+12 1.0000000 0.0000000
+13 0.4210526 0.5789474
+14 1.0000000 0.0000000
+15 1.0000000 0.0000000
+16 1.0000000 0.0000000
+17 1.0000000 0.0000000
+18 0.8571429 0.1428571
+19 1.0000000 0.0000000
+20 1.0000000 0.0000000
+21 1.0000000 0.0000000
+22 0.4210526 0.5789474
+23 0.4285714 0.5714286
+24 0.4210526 0.5789474
+25 0.4210526 0.5789474
+26 1.0000000 0.0000000
+27 0.4210526 0.5789474
+28 0.4285714 0.5714286
+29 1.0000000 0.0000000
+30 1.0000000 0.0000000
+31 1.0000000 0.0000000
+32 0.8571429 0.1428571
+33 0.8571429 0.1428571
+34 1.0000000 0.0000000
+35 0.8571429 0.1428571
+36 1.0000000 0.0000000
+37 1.0000000 0.0000000
+38 0.4210526 0.5789474
+39 1.0000000 0.0000000
+40 0.4285714 0.5714286
+41 0.4210526 0.5789474
+42 1.0000000 0.0000000
+43 0.4210526 0.5789474
+44 0.4210526 0.5789474
+45 1.0000000 0.0000000
+46 0.8571429 0.1428571
+47 1.0000000 0.0000000
+48 0.8571429 0.1428571
+49 0.4210526 0.5789474
+50 0.8571429 0.1428571
+51 0.4285714 0.5714286
+52 1.0000000 0.0000000
+53 0.4210526 0.5789474
+54 1.0000000 0.0000000
+55 1.0000000 0.0000000
+56 1.0000000 0.0000000
+57 1.0000000 0.0000000
+58 0.4210526 0.5789474
+59 1.0000000 0.0000000
+60 0.4285714 0.5714286
+61 0.4210526 0.5789474
+62 0.4210526 0.5789474
+63 0.4210526 0.5789474
+64 1.0000000 0.0000000
+65 1.0000000 0.0000000
+66 1.0000000 0.0000000
+67 1.0000000 0.0000000
+68 0.8571429 0.1428571
+69 1.0000000 0.0000000
+70 1.0000000 0.0000000
+71 0.8571429 0.1428571
+72 0.8571429 0.1428571
+73 1.0000000 0.0000000
+74 0.8571429 0.1428571
+75 1.0000000 0.0000000
+76 1.0000000 0.0000000
+77 0.8571429 0.1428571
+78 1.0000000 0.0000000
+79 0.8571429 0.1428571
+80 0.4210526 0.5789474
+81 1.0000000 0.0000000
+> predict(fit, type = "vector") # level numbers
+ 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 
+ 2  1  2  2  1  1  1  1  1  2  2  1  2  1  1  1  1  1  1  1  1  2  2  2  2  1 
+27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 
+ 2  2  1  1  1  1  1  1  1  1  1  2  1  2  2  1  2  2  1  1  1  1  2  1  2  1 
+53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 
+ 2  1  1  1  1  2  1  2  2  2  2  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1 
+79 80 81 
+ 1  2  1 
+> predict(fit, type = "class")  # factor
+      1       2       3       4       5       6       7       8       9      10 
+present  absent present present  absent  absent  absent  absent  absent present 
+     11      12      13      14      15      16      17      18      19      20 
+present  absent present  absent  absent  absent  absent  absent  absent  absent 
+     21      22      23      24      25      26      27      28      29      30 
+ absent present present present present  absent present present  absent  absent 
+     31      32      33      34      35      36      37      38      39      40 
+ absent  absent  absent  absent  absent  absent  absent present  absent present 
+     41      42      43      44      45      46      47      48      49      50 
+present  absent present present  absent  absent  absent  absent present  absent 
+     51      52      53      54      55      56      57      58      59      60 
+present  absent present  absent  absent  absent  absent present  absent present 
+     61      62      63      64      65      66      67      68      69      70 
+present present present  absent  absent  absent  absent  absent  absent  absent 
+     71      72      73      74      75      76      77      78      79      80 
+ absent  absent  absent  absent  absent  absent  absent  absent  absent present 
+     81 
+ absent 
+Levels: absent present
+> predict(fit, type = "matrix") # level number, class frequencies, probabilities
+   [,1] [,2] [,3]      [,4]      [,5]       [,6]
+1     2    8   11 0.4210526 0.5789474 0.23456790
+2     1   12    2 0.8571429 0.1428571 0.17283951
+3     2    8   11 0.4210526 0.5789474 0.23456790
+4     2    8   11 0.4210526 0.5789474 0.23456790
+5     1   29    0 1.0000000 0.0000000 0.35802469
+6     1   29    0 1.0000000 0.0000000 0.35802469
+7     1   29    0 1.0000000 0.0000000 0.35802469
+8     1   29    0 1.0000000 0.0000000 0.35802469
+9     1   29    0 1.0000000 0.0000000 0.35802469
+10    2    3    4 0.4285714 0.5714286 0.08641975
+11    2    3    4 0.4285714 0.5714286 0.08641975
+12    1   29    0 1.0000000 0.0000000 0.35802469
+13    2    8   11 0.4210526 0.5789474 0.23456790
+14    1   12    0 1.0000000 0.0000000 0.14814815
+15    1   29    0 1.0000000 0.0000000 0.35802469
+16    1   29    0 1.0000000 0.0000000 0.35802469
+17    1   29    0 1.0000000 0.0000000 0.35802469
+18    1   12    2 0.8571429 0.1428571 0.17283951
+19    1   29    0 1.0000000 0.0000000 0.35802469
+20    1   12    0 1.0000000 0.0000000 0.14814815
+21    1   29    0 1.0000000 0.0000000 0.35802469
+22    2    8   11 0.4210526 0.5789474 0.23456790
+23    2    3    4 0.4285714 0.5714286 0.08641975
+24    2    8   11 0.4210526 0.5789474 0.23456790
+25    2    8   11 0.4210526 0.5789474 0.23456790
+26    1   12    0 1.0000000 0.0000000 0.14814815
+27    2    8   11 0.4210526 0.5789474 0.23456790
+28    2    3    4 0.4285714 0.5714286 0.08641975
+29    1   29    0 1.0000000 0.0000000 0.35802469
+30    1   29    0 1.0000000 0.0000000 0.35802469
+31    1   29    0 1.0000000 0.0000000 0.35802469
+32    1   12    2 0.8571429 0.1428571 0.17283951
+33    1   12    2 0.8571429 0.1428571 0.17283951
+34    1   29    0 1.0000000 0.0000000 0.35802469
+35    1   12    2 0.8571429 0.1428571 0.17283951
+36    1   29    0 1.0000000 0.0000000 0.35802469
+37    1   12    0 1.0000000 0.0000000 0.14814815
+38    2    8   11 0.4210526 0.5789474 0.23456790
+39    1   12    0 1.0000000 0.0000000 0.14814815
+40    2    3    4 0.4285714 0.5714286 0.08641975
+41    2    8   11 0.4210526 0.5789474 0.23456790
+42    1   12    0 1.0000000 0.0000000 0.14814815
+43    2    8   11 0.4210526 0.5789474 0.23456790
+44    2    8   11 0.4210526 0.5789474 0.23456790
+45    1   29    0 1.0000000 0.0000000 0.35802469
+46    1   12    2 0.8571429 0.1428571 0.17283951
+47    1   29    0 1.0000000 0.0000000 0.35802469
+48    1   12    2 0.8571429 0.1428571 0.17283951
+49    2    8   11 0.4210526 0.5789474 0.23456790
+50    1   12    2 0.8571429 0.1428571 0.17283951
+51    2    3    4 0.4285714 0.5714286 0.08641975
+52    1   29    0 1.0000000 0.0000000 0.35802469
+53    2    8   11 0.4210526 0.5789474 0.23456790
+54    1   29    0 1.0000000 0.0000000 0.35802469
+55    1   29    0 1.0000000 0.0000000 0.35802469
+56    1   29    0 1.0000000 0.0000000 0.35802469
+57    1   12    0 1.0000000 0.0000000 0.14814815
+58    2    8   11 0.4210526 0.5789474 0.23456790
+59    1   12    0 1.0000000 0.0000000 0.14814815
+60    2    3    4 0.4285714 0.5714286 0.08641975
+61    2    8   11 0.4210526 0.5789474 0.23456790
+62    2    8   11 0.4210526 0.5789474 0.23456790
+63    2    8   11 0.4210526 0.5789474 0.23456790
+64    1   29    0 1.0000000 0.0000000 0.35802469
+65    1   29    0 1.0000000 0.0000000 0.35802469
+66    1   12    0 1.0000000 0.0000000 0.14814815
+67    1   29    0 1.0000000 0.0000000 0.35802469
+68    1   12    2 0.8571429 0.1428571 0.17283951
+69    1   12    0 1.0000000 0.0000000 0.14814815
+70    1   29    0 1.0000000 0.0000000 0.35802469
+71    1   12    2 0.8571429 0.1428571 0.17283951
+72    1   12    2 0.8571429 0.1428571 0.17283951
+73    1   29    0 1.0000000 0.0000000 0.35802469
+74    1   12    2 0.8571429 0.1428571 0.17283951
+75    1   29    0 1.0000000 0.0000000 0.35802469
+76    1   29    0 1.0000000 0.0000000 0.35802469
+77    1   12    2 0.8571429 0.1428571 0.17283951
+78    1   12    0 1.0000000 0.0000000 0.14814815
+79    1   12    2 0.8571429 0.1428571 0.17283951
+80    2    8   11 0.4210526 0.5789474 0.23456790
+81    1   12    0 1.0000000 0.0000000 0.14814815
+> 
+> sub <- c(sample(1:50, 25), sample(51:100, 25), sample(101:150, 25))
+> fit <- rpart(Species ~ ., data = iris, subset = sub)
+> fit
+n= 75 
+
+node), split, n, loss, yval, (yprob)
+      * denotes terminal node
+
+1) root 75 50 setosa (0.33333333 0.33333333 0.33333333)  
+  2) Petal.Length< 2.35 25  0 setosa (1.00000000 0.00000000 0.00000000) *
+  3) Petal.Length>=2.35 50 25 versicolor (0.00000000 0.50000000 0.50000000)  
+    6) Petal.Width< 1.65 27  2 versicolor (0.00000000 0.92592593 0.07407407) *
+    7) Petal.Width>=1.65 23  0 virginica (0.00000000 0.00000000 1.00000000) *
+> table(predict(fit, iris[-sub,], type = "class"), iris[-sub, "Species"])
+            
+             setosa versicolor virginica
+  setosa         25          0         0
+  versicolor      0         23         2
+  virginica       0          2        23
+> 
+> 
+> 
+> cleanEx()
+> nameEx("print.rpart")
+> ### * print.rpart
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: print.rpart
+> ### Title: Print an Rpart Object
+> ### Aliases: print.rpart
+> ### Keywords: tree
+> 
+> ### ** Examples
+> 
+> z.auto <- rpart(Mileage ~ Weight, car.test.frame)
+> z.auto
+n= 60 
+
+node), split, n, deviance, yval
+      * denotes terminal node
+
+ 1) root 60 1354.58300 24.58333  
+   2) Weight>=2567.5 45  361.20000 22.46667  
+     4) Weight>=3087.5 22   61.31818 20.40909 *
+     5) Weight< 3087.5 23  117.65220 24.43478  
+      10) Weight>=2747.5 15   60.40000 23.80000 *
+      11) Weight< 2747.5 8   39.87500 25.62500 *
+   3) Weight< 2567.5 15  186.93330 30.93333 *
+> ## Not run: 
+> ##D node), split, n, deviance, yval
+> ##D       * denotes terminal node
+> ##D 
+> ##D  1) root 60 1354.58300 24.58333  
+> ##D    2) Weight>=2567.5 45  361.20000 22.46667  
+> ##D      4) Weight>=3087.5 22   61.31818 20.40909 *
+> ##D      5) Weight<3087.5 23  117.65220 24.43478  
+> ##D       10) Weight>=2747.5 15   60.40000 23.80000 *
+> ##D       11) Weight<2747.5 8   39.87500 25.62500 *
+> ##D    3) Weight<2567.5 15  186.93330 30.93333 *
+> ## End(Not run)
+> 
+> 
+> cleanEx()
+> nameEx("printcp")
+> ### * printcp
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: printcp
+> ### Title: Displays CP table for Fitted Rpart Object
+> ### Aliases: printcp
+> ### Keywords: tree
+> 
+> ### ** Examples
+> 
+> z.auto <- rpart(Mileage ~ Weight, car.test.frame)
+> printcp(z.auto)
+
+Regression tree:
+rpart(formula = Mileage ~ Weight, data = car.test.frame)
+
+Variables actually used in tree construction:
+[1] Weight
+
+Root node error: 1354.6/60 = 22.576
+
+n= 60 
+
+        CP nsplit rel error  xerror     xstd
+1 0.595349      0   1.00000 1.03199 0.179319
+2 0.134528      1   0.40465 0.48751 0.076130
+3 0.012828      2   0.27012 0.38022 0.066855
+4 0.010000      3   0.25729 0.39460 0.066056
+> ## Not run: 
+> ##D Regression tree:
+> ##D rpart(formula = Mileage ~ Weight, data = car.test.frame)
+> ##D 
+> ##D Variables actually used in tree construction:
+> ##D [1] Weight
+> ##D 
+> ##D Root node error: 1354.6/60 = 22.576
+> ##D 
+> ##D         CP nsplit rel error  xerror     xstd 
+> ##D 1 0.595349      0   1.00000 1.03436 0.178526
+> ##D 2 0.134528      1   0.40465 0.60508 0.105217
+> ##D 3 0.012828      2   0.27012 0.45153 0.083330
+> ##D 4 0.010000      3   0.25729 0.44826 0.076998
+> ## End(Not run)
+> 
+> 
+> cleanEx()
+> nameEx("prune.rpart")
+> ### * prune.rpart
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: prune.rpart
+> ### Title: Cost-complexity Pruning of an Rpart Object
+> ### Aliases: prune.rpart prune
+> ### Keywords: tree
+> 
+> ### ** Examples
+> 
+> z.auto <- rpart(Mileage ~ Weight, car.test.frame)
+> zp <- prune(z.auto, cp = 0.1)
+> plot(zp) #plot smaller rpart object
+> 
+> 
+> 
+> cleanEx()
+> nameEx("residuals.rpart")
+> ### * residuals.rpart
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: residuals.rpart
+> ### Title: Residuals From a Fitted Rpart Object
+> ### Aliases: residuals.rpart
+> ### Keywords: tree
+> 
+> ### ** Examples
+> 
+> fit <- rpart(skips ~ Opening + Solder + Mask + PadType + Panel,
++              data = solder, method = "anova")
+> summary(residuals(fit))
+    Min.  1st Qu.   Median     Mean  3rd Qu.     Max. 
+-13.8000  -1.0360  -0.6833   0.0000   0.9639  16.2000 
+> plot(predict(fit),residuals(fit))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("rpart")
+> ### * rpart
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: rpart
+> ### Title: Recursive Partitioning and Regression Trees
+> ### Aliases: rpart
+> ### Keywords: tree
+> 
+> ### ** Examples
+> 
+> fit <- rpart(Kyphosis ~ Age + Number + Start, data = kyphosis)
+> fit2 <- rpart(Kyphosis ~ Age + Number + Start, data = kyphosis,
++               parms = list(prior = c(.65,.35), split = "information"))
+> fit3 <- rpart(Kyphosis ~ Age + Number + Start, data = kyphosis,
++               control = rpart.control(cp = 0.05))
+> par(mfrow = c(1,2), xpd = NA) # otherwise on some devices the text is clipped
+> plot(fit)
+> text(fit, use.n = TRUE)
+> plot(fit2)
+> text(fit2, use.n = TRUE)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("rsq.rpart")
+> ### * rsq.rpart
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: rsq.rpart
+> ### Title: Plots the Approximate R-Square for the Different Splits
+> ### Aliases: rsq.rpart
+> ### Keywords: tree
+> 
+> ### ** Examples
+> 
+> z.auto <- rpart(Mileage ~ Weight, car.test.frame)
+> rsq.rpart(z.auto)
+
+Regression tree:
+rpart(formula = Mileage ~ Weight, data = car.test.frame)
+
+Variables actually used in tree construction:
+[1] Weight
+
+Root node error: 1354.6/60 = 22.576
+
+n= 60 
+
+        CP nsplit rel error  xerror     xstd
+1 0.595349      0   1.00000 1.03199 0.179319
+2 0.134528      1   0.40465 0.48751 0.076130
+3 0.012828      2   0.27012 0.38022 0.066855
+4 0.010000      3   0.25729 0.39460 0.066056
+> 
+> 
+> 
+> cleanEx()
+> nameEx("snip.rpart")
+> ### * snip.rpart
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: snip.rpart
+> ### Title: Snip Subtrees of an Rpart Object
+> ### Aliases: snip.rpart
+> ### Keywords: tree
+> 
+> ### ** Examples
+> 
+> ## dataset not in R
+> ## Not run: 
+> ##D z.survey <- rpart(market.survey) # grow the rpart object
+> ##D plot(z.survey) # plot the tree
+> ##D z.survey2 <- snip.rpart(z.survey, toss = 2) # trim subtree at node 2
+> ##D plot(z.survey2) # plot new tree
+> ##D 
+> ##D # can also interactively select the node using the mouse in the
+> ##D # graphics window
+> ## End(Not run)
+> 
+> 
+> cleanEx()
+> nameEx("solder")
+> ### * solder
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: solder
+> ### Title: Soldering of Components on Printed-Circuit Boards
+> ### Aliases: solder
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> fit <- rpart(skips ~ Opening + Solder + Mask + PadType + Panel,
++              data = solder, method = "anova")
+> summary(residuals(fit))
+    Min.  1st Qu.   Median     Mean  3rd Qu.     Max. 
+-13.8000  -1.0360  -0.6833   0.0000   0.9639  16.2000 
+> plot(predict(fit), residuals(fit))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("stagec")
+> ### * stagec
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: stagec
+> ### Title: Stage C Prostate Cancer
+> ### Aliases: stagec
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> require(survival)
+Loading required package: survival
+> rpart(Surv(pgtime, pgstat) ~ ., stagec)
+n= 146 
+
+node), split, n, deviance, yval
+      * denotes terminal node
+
+ 1) root 146 192.111100 1.0000000  
+   2) grade< 2.5 61  44.799010 0.3634439  
+     4) g2< 11.36 33   9.117405 0.1229835 *
+     5) g2>=11.36 28  27.602190 0.7345610  
+      10) gleason< 5.5 20  14.297110 0.5304115 *
+      11) gleason>=5.5 8  11.094650 1.3069940 *
+   3) grade>=2.5 85 122.441500 1.6148600  
+     6) age>=56.5 75 103.062900 1.4255040  
+      12) gleason< 7.5 50  66.119800 1.1407320  
+        24) g2< 13.475 24  27.197170 0.8007306 *
+        25) g2>=13.475 26  36.790960 1.4570210  
+          50) g2>=17.915 15  20.332740 0.9789825 *
+          51) g2< 17.915 11  13.459010 2.1714480 *
+      13) gleason>=7.5 25  33.487250 2.0307290  
+        26) g2>=15.29 10  11.588480 1.2156230 *
+        27) g2< 15.29 15  18.939150 2.7053610 *
+     7) age< 56.5 10  13.769010 3.1822320 *
+> 
+> 
+> 
+> cleanEx()
+
+detaching ‘package:survival’
+
+> nameEx("summary.rpart")
+> ### * summary.rpart
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: summary.rpart
+> ### Title: Summarize a Fitted Rpart Object
+> ### Aliases: summary.rpart
+> ### Keywords: tree
+> 
+> ### ** Examples
+> 
+> ## a regression tree
+> z.auto <- rpart(Mileage ~ Weight, car.test.frame)
+> summary(z.auto)
+Call:
+rpart(formula = Mileage ~ Weight, data = car.test.frame)
+  n= 60 
+
+          CP nsplit rel error    xerror       xstd
+1 0.59534912      0 1.0000000 1.0319924 0.17931937
+2 0.13452819      1 0.4046509 0.4875114 0.07613003
+3 0.01282843      2 0.2701227 0.3802248 0.06685452
+4 0.01000000      3 0.2572943 0.3945980 0.06605572
+
+Variable importance
+Weight 
+   100 
+
+Node number 1: 60 observations,    complexity param=0.5953491
+  mean=24.58333, MSE=22.57639 
+  left son=2 (45 obs) right son=3 (15 obs)
+  Primary splits:
+      Weight < 2567.5 to the right, improve=0.5953491, (0 missing)
+
+Node number 2: 45 observations,    complexity param=0.1345282
+  mean=22.46667, MSE=8.026667 
+  left son=4 (22 obs) right son=5 (23 obs)
+  Primary splits:
+      Weight < 3087.5 to the right, improve=0.5045118, (0 missing)
+
+Node number 3: 15 observations
+  mean=30.93333, MSE=12.46222 
+
+Node number 4: 22 observations
+  mean=20.40909, MSE=2.78719 
+
+Node number 5: 23 observations,    complexity param=0.01282843
+  mean=24.43478, MSE=5.115312 
+  left son=10 (15 obs) right son=11 (8 obs)
+  Primary splits:
+      Weight < 2747.5 to the right, improve=0.1476996, (0 missing)
+
+Node number 10: 15 observations
+  mean=23.8, MSE=4.026667 
+
+Node number 11: 8 observations
+  mean=25.625, MSE=4.984375 
+
+> 
+> ## a classification tree with multiple variables and surrogate splits.
+> summary(rpart(Kyphosis ~ Age + Number + Start, data = kyphosis))
+Call:
+rpart(formula = Kyphosis ~ Age + Number + Start, data = kyphosis)
+  n= 81 
+
+          CP nsplit rel error   xerror      xstd
+1 0.17647059      0 1.0000000 1.000000 0.2155872
+2 0.01960784      1 0.8235294 1.352941 0.2387187
+3 0.01000000      4 0.7647059 1.294118 0.2354756
+
+Variable importance
+ Start    Age Number 
+    64     24     12 
+
+Node number 1: 81 observations,    complexity param=0.1764706
+  predicted class=absent   expected loss=0.2098765  P(node) =1
+    class counts:    64    17
+   probabilities: 0.790 0.210 
+  left son=2 (62 obs) right son=3 (19 obs)
+  Primary splits:
+      Start  < 8.5  to the right, improve=6.762330, (0 missing)
+      Number < 5.5  to the left,  improve=2.866795, (0 missing)
+      Age    < 39.5 to the left,  improve=2.250212, (0 missing)
+  Surrogate splits:
+      Number < 6.5  to the left,  agree=0.802, adj=0.158, (0 split)
+
+Node number 2: 62 observations,    complexity param=0.01960784
+  predicted class=absent   expected loss=0.09677419  P(node) =0.7654321
+    class counts:    56     6
+   probabilities: 0.903 0.097 
+  left son=4 (29 obs) right son=5 (33 obs)
+  Primary splits:
+      Start  < 14.5 to the right, improve=1.0205280, (0 missing)
+      Age    < 55   to the left,  improve=0.6848635, (0 missing)
+      Number < 4.5  to the left,  improve=0.2975332, (0 missing)
+  Surrogate splits:
+      Number < 3.5  to the left,  agree=0.645, adj=0.241, (0 split)
+      Age    < 16   to the left,  agree=0.597, adj=0.138, (0 split)
+
+Node number 3: 19 observations
+  predicted class=present  expected loss=0.4210526  P(node) =0.2345679
+    class counts:     8    11
+   probabilities: 0.421 0.579 
+
+Node number 4: 29 observations
+  predicted class=absent   expected loss=0  P(node) =0.3580247
+    class counts:    29     0
+   probabilities: 1.000 0.000 
+
+Node number 5: 33 observations,    complexity param=0.01960784
+  predicted class=absent   expected loss=0.1818182  P(node) =0.4074074
+    class counts:    27     6
+   probabilities: 0.818 0.182 
+  left son=10 (12 obs) right son=11 (21 obs)
+  Primary splits:
+      Age    < 55   to the left,  improve=1.2467530, (0 missing)
+      Start  < 12.5 to the right, improve=0.2887701, (0 missing)
+      Number < 3.5  to the right, improve=0.1753247, (0 missing)
+  Surrogate splits:
+      Start  < 9.5  to the left,  agree=0.758, adj=0.333, (0 split)
+      Number < 5.5  to the right, agree=0.697, adj=0.167, (0 split)
+
+Node number 10: 12 observations
+  predicted class=absent   expected loss=0  P(node) =0.1481481
+    class counts:    12     0
+   probabilities: 1.000 0.000 
+
+Node number 11: 21 observations,    complexity param=0.01960784
+  predicted class=absent   expected loss=0.2857143  P(node) =0.2592593
+    class counts:    15     6
+   probabilities: 0.714 0.286 
+  left son=22 (14 obs) right son=23 (7 obs)
+  Primary splits:
+      Age    < 111  to the right, improve=1.71428600, (0 missing)
+      Start  < 12.5 to the right, improve=0.79365080, (0 missing)
+      Number < 3.5  to the right, improve=0.07142857, (0 missing)
+
+Node number 22: 14 observations
+  predicted class=absent   expected loss=0.1428571  P(node) =0.1728395
+    class counts:    12     2
+   probabilities: 0.857 0.143 
+
+Node number 23: 7 observations
+  predicted class=present  expected loss=0.4285714  P(node) =0.08641975
+    class counts:     3     4
+   probabilities: 0.429 0.571 
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("text.rpart")
+> ### * text.rpart
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: text.rpart
+> ### Title: Place Text on a Dendrogram Plot
+> ### Aliases: text.rpart
+> ### Keywords: tree
+> 
+> ### ** Examples
+> 
+> freen.tr <- rpart(y ~ ., freeny)
+> par(xpd = TRUE)
+> plot(freen.tr)
+> text(freen.tr, use.n = TRUE, all = TRUE)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("xpred.rpart")
+> ### * xpred.rpart
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: xpred.rpart
+> ### Title: Return Cross-Validated Predictions
+> ### Aliases: xpred.rpart
+> ### Keywords: tree
+> 
+> ### ** Examples
+> 
+> fit <- rpart(Mileage ~ Weight, car.test.frame)
+> xmat <- xpred.rpart(fit)
+> xerr <- (xmat - car.test.frame$Mileage)^2
+> apply(xerr, 2, sum)   # cross-validated error estimate
+0.79767456 0.28300396 0.04154257 0.01132626 
+ 1423.9568   740.4845   544.3925   536.6344 
+> 
+> # approx same result as rel. error from printcp(fit)
+> apply(xerr, 2, sum)/var(car.test.frame$Mileage) 
+0.79767456 0.28300396 0.04154257 0.01132626 
+  62.02162   32.25242   23.71147   23.37355 
+> printcp(fit)
+
+Regression tree:
+rpart(formula = Mileage ~ Weight, data = car.test.frame)
+
+Variables actually used in tree construction:
+[1] Weight
+
+Root node error: 1354.6/60 = 22.576
+
+n= 60 
+
+        CP nsplit rel error  xerror     xstd
+1 0.595349      0   1.00000 1.03199 0.179319
+2 0.134528      1   0.40465 0.48751 0.076130
+3 0.012828      2   0.27012 0.38022 0.066855
+4 0.010000      3   0.25729 0.39460 0.066056
+> 
+> 
+> 
+> ### * <FOOTER>
+> ###
+> options(digits = 7L)
+> base::cat("Time elapsed: ", proc.time() - base::get("ptime", pos = 'CheckExEnv'),"\n")
+Time elapsed:  0.284 0.011 0.295 0 0 
+> grDevices::dev.off()
+null device 
+          1 
+> ###
+> ### Local variables: ***
+> ### mode: outline-minor ***
+> ### outline-regexp: "\\(> \\)?### [*]+" ***
+> ### End: ***
+> quit('no')
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/po/en@quot/LC_MESSAGES/R-nlme.mo
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/po/en@quot/LC_MESSAGES/R-nlme.mo
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/po/en@quot/LC_MESSAGES/nlme.mo
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/po/en@quot/LC_MESSAGES/nlme.mo
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/po/pl/LC_MESSAGES/nlme.mo
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/po/pl/LC_MESSAGES/nlme.mo
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/po/pl/LC_MESSAGES/R-nlme.mo
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/po/pl/LC_MESSAGES/R-nlme.mo
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/po/fr/LC_MESSAGES/R-nlme.mo
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/po/fr/LC_MESSAGES/R-nlme.mo
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/po/fr/LC_MESSAGES/nlme.mo
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/po/fr/LC_MESSAGES/nlme.mo
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/po/de/LC_MESSAGES/R-nlme.mo
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/po/de/LC_MESSAGES/R-nlme.mo
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/po/de/LC_MESSAGES/nlme.mo
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/po/de/LC_MESSAGES/nlme.mo
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/po/ko/LC_MESSAGES/nlme.mo
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/po/ko/LC_MESSAGES/nlme.mo
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/po/ko/LC_MESSAGES/R-nlme.mo
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/po/ko/LC_MESSAGES/R-nlme.mo
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/gls.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/gls.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/gls.R	(revision 2477)
@@ -0,0 +1,32 @@
+## reported by simon bond <shug0131@yahoo.co.uk> to R-help 2007-03-16
+
+library(nlme)
+x <- rnorm(10, 0.1, 1)
+try(gls(x ~ 0))  # segfaulted in 3.1-79
+
+
+## PR#10364
+# copied verbatim from Pinheiro & Bates 8.3.3
+fm1Dial.gnls <-
+  gnls(rate ~ SSasympOff(pressure, Asym, lrc, c0),
+       data = Dialyzer, params = list(Asym + lrc ~ QB, c0 ~ 1),
+       start = c(53.6, 8.6, 0.51, -0.26, 0.225))
+(p1 <- predict(fm1Dial.gnls))
+(p2 <- predict(fm1Dial.gnls, newdata = Dialyzer))
+# failed, factor levels complaint
+# also, missed row names as names
+stopifnot(all.equal(as.vector(p1), as.vector(p2)), # 'label' differs
+          identical(names(p1), names(p2)))
+
+## PR#13418
+fm1 <- gls(weight ~ Time * Diet, BodyWeight)
+(V10 <- Variogram(fm1, form = ~ Time | Rat)[1:10,])
+## failed in 3.1-89
+stopifnot(all.equal(V10$variog,
+                    c(0.0072395216, 0.014584634, 0.014207936, 0.018442267,
+                      0.011128505, 0.019910082, 0.027072311, 0.034140379,
+                      0.028320657, 0.037525507)),
+          V10$dist == c(1, 6, 7, 8, 13, 14, 15, 20, 21, 22),
+          V10$n.pairs == 16*c(1, 1, 9, 1, 1, 8, 1, 1, 7, 1))
+
+intervals(fm1)
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/contrMat.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/contrMat.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/contrMat.R	(revision 2477)
@@ -0,0 +1,61 @@
+## problem reported by Christian Ritz on R-help, Tue, 20 Mar 2007 14:55:38
+
+## Dataset PestSci from package drc [w/ 'CURVE' as factor]
+PestSci <-
+data.frame(CURVE = gl(5, 21),
+           HERBICIDE = rep(c("bentazon", "diuron"), times = c(63, 42)),
+           DOSE = rep(c(0, 0.62, 1.85, 5.56, 16.67, 50, 150, 0, 0.62,
+           1.85, 5.56, 16.67, 50, 150, 0, 0.15, 0.59, 2.34, 9.38, 37.5,
+           150, 0, 0.01, 0.03, 0.1, 0.3, 1, 3, 0, 0.01, 0.03, 0.1, 0.3, 1, 3),
+           each = 3),
+           SLOPE = c(1.81295, 1.86704, 1.95606, 1.39073, 1.15721, 1.06126,
+    0.99409, 0.83298, 0.8334, 0.72513, 0.69548, 0.65299, 0.49855,
+    0.36873, 0.42617, 0.26666, 0.26896, 0.25989, 0.16074, 0.16404,
+    0.1475, 1.02654, 0.91306, 0.89371, 0.59074, 0.669, 0.5965,
+    0.37561, 0.44823, 0.42093, 0.31874, 0.27342, 0.2725, 0.27182,
+    0.21752, 0.19981, 0.17332, 0.17949, 0.15623, 0.12855, 0.14524,
+    0.11533, 1.03872, 1.0917, 1.10324, 0.94274, 0.91256, 1.02352,
+    0.78689, 0.69706, 0.65989, 0.5372, 0.51324, 0.54981, 0.37401,
+    0.34033, 0.32491, 0.30518, 0.24593, 0.289, 0.17414, 0.12275,
+    0.14788, 2.20963, 2.27931, 2.14703, 2.18831, 2.08863, 2.06676,
+    2.18827, 2.10748, 1.84474, 1.78805, 1.75547, 1.61381, 0.70295,
+    0.6983, 0.74045, 0.20673, 0.20784, 0.22402, 0.05268, 0.06519,
+    0.09258, 1.94033, 1.80193, 1.71586, 1.71586, 1.98471, 1.74905,
+    1.87795, 1.64081, 1.53094, 1.50709, 1.41035, 1.35367, 0.64427,
+    0.62185, 0.60337, 0.14073, 0.12928, 0.15016, 8e-05, 0.00262,
+    0.00303))
+
+
+library(nlme)
+sv <- c(0.43355869, 2.49963220, 0.05861799, 1.73290589, 0.38153146, 0.24316978)
+
+## bug only triggered from the  " factor(.) " below:
+fm <- nlme(SLOPE ~ c + (d-c)/(1+exp(b*(log(DOSE)-log(e)))),
+           fixed = list(b ~ factor(HERBICIDE)-1,
+                        c ~ 1,
+                        d ~ 1,
+                        e ~ factor(HERBICIDE)-1),
+           random = d ~ 1 | CURVE,
+           start = sv, data = PestSci)
+fm
+## failed in contrMat / contr.treatment in 3.1-78
+
+stopifnot(
+    all.equal(as.numeric(VarCorr(fm)[,"StdDev"]),
+	      c(0.46996772, 0.07139796), tol = 5e-5)
+    ,
+    all.equal(as.numeric(fixef(fm)),
+	      c(0.563538644, 1.7912626,
+		0.0519817224, 1.57545308,
+		1.5714210, 0.201112468), tol = 1e-7)
+)
+(sfm <- summary(fm))
+cfT <- sfm$tTable
+stopifnot(is.matrix(cfT), identical(cfT[,"Value"], fixef(fm)),
+	  all.equal(as.vector(cfT[,"Std.Error"]),
+		    c(0.0363115, 0.106345, 0.022107,
+		      0.217066, 0.191389, 0.00771419), tol = 5e-5)
+	  ,
+	  all.equal(as.numeric(sfm[c("AIC", "BIC", "logLik")]),
+		    c(-211.36462, -190.13294, 113.68231), tol = 1e-7)
+	  )
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/anova.gls.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/anova.gls.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/anova.gls.R	(revision 2477)
@@ -0,0 +1,59 @@
+## Example of scoping problem.
+## Originally from a report by Markus Jantti:
+## https://stat.ethz.ch/pipermail/r-help/2005-November/081382.html
+library(nlme)
+data(Ovary)
+## stolen from example(anova.gls)
+# AR(1) errors within each Mare
+fm1 <- gls(follicles ~ sin(2*pi*Time) + cos(2*pi*Time), Ovary,
+           correlation = corAR1(form = ~ 1 | Mare))
+(int1 <- intervals(fm1))
+stopifnot(
+    all.equal(int1$corStruct["Phi",],
+	      c(lower=0.66842829, est.=0.753207889, upper=0.81866619),
+	      tol = 6e-6)# 3.44e-6 needed on solaris-x86
+   ,
+    all.equal(as.vector(int1$sigma),
+	      c(3.9747061, 4.61617157, 5.361161), tol = 6e-6)
+)
+
+# variance changes with a power of the absolute fitted values?
+fm2 <- update(fm1, weights = varPower())
+(a12 <- anova(fm1, fm2))
+stopifnot(identical(a12, anova(fm1, fm2, type = "seq")))# latter had failed
+
+## now define a little function
+dummy <- function(obj) anova(obj[[1]], obj[[2]])
+(d12 <- dummy(list(fm1, fm2)))
+## last failed < 3.1-66
+rownames(d12) <- rownames(a12)
+stopifnot(all.equal(a12, d12, tol = 1e-15),
+          all.equal(a12[2,"p-value"], 0.111752516, tol = 1e-5)
+)
+
+## PR#13567
+fm1Orth.gls <- gls(distance ~ Sex * I(age - 11), Orthodont,
+                   correlation = corSymm(form = ~ 1 | Subject),
+                   weights = varIdent(form = ~ 1 | age))
+(aOr <- anova(fm1Orth.gls, Terms = "Sex"))
+stopifnot(all.equal(aOr[,"F-value"], 9.4030752449,
+		    aOr[,"p-value"], 0.0027608643857))
+
+## anova.gls(.) -- REML & ML
+(a1  <- anova(fm1))
+(a1m <- anova(fm1, type="marginal"))
+##
+fm1M <- update(fm1, method = "ML")
+(a1M <- anova(fm1M))
+(a1Mm <- anova(fm1M, type = "marginal"))
+stopifnot(
+    all.equal(a1M[,"F-value"],
+              c(378.774471, 19.1105834, 1.71334909),
+              tolerance = 1e-7)
+   ,
+    all.equal(summary(fm1M)$tTable[,"t-value"] ^ 2,
+	      as.matrix(a1Mm)[,"F-value"], tolerance = 1e-14)
+   ,
+    all.equal(summary(fm1 )$tTable[,"t-value"] ^ 2,
+              as.matrix(a1m )[,"F-value"], tolerance = 1e-14)
+)
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/nlme.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/nlme.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/nlme.R	(revision 2477)
@@ -0,0 +1,38 @@
+library(nlme)
+fm1 <- nlsList(SSasymp, Loblolly)
+
+fm1
+stopifnot(
+    all.equal(as.matrix(coef(fm1)),
+              array(c(94.1282, 94.9406, 89.8849, 110.699, 111.003, 109.986, 101.056,
+                      127.134, 101.087, 95.6669, 95.5563, 113.514, 105.718, 99.1719,
+                      -8.25075, -7.75749, -8.75902, -8.16943, -8.46261, -8.55854, -8.44363,
+                      -7.67936, -8.50234, -9.07824, -9.66503, -7.59562, -8.90608, -9.91665,
+                      -3.21758, -3.22932, -3.08622, -3.39034, -3.39757, -3.36252, -3.23282,
+                      -3.57533, -3.21402, -3.11638, -3.09227, -3.35282, -3.22296, -3.08484),
+                    dim = c(14L, 3L),
+                    dimnames = list(c("329", "327", "325", "307", "331", "311", "315",
+                                      "321", "319", "301", "323", "309", "303", "305"),
+                                    c("Asym", "R0", "lrc"))),
+              tol = 1e-5)
+    ,
+    all.equal(pooledSD(fm1), structure(0.70039649, df = 42), tol = 1e-5)
+    ,
+    84 == sum(vapply(lapply(fm1, fitted), length, 1L)) # total deg.freedom
+    )
+
+fm2 <- nlme(fm1, random = Asym ~ 1)
+fm2
+stopifnot(
+    all.equal(fixef(fm2),
+              c(Asym = 101.4483, R0 = -8.6274937, lrc = -3.2337304), tol = 4e-7)
+    ,
+    all.equal(logLik(fm2),
+              structure(-114.743, class = "logLik", nall = 84, nobs = 84, df = 5),
+              tol = 4e-6)
+    )
+
+pm2.0 <- predict(fm2, Loblolly, level=0)## failed in nlme 3.1-123
+stopifnot(all.equal(head(pm2.0),
+		    c(3.64694, 11.0597, 27.2258, 40.5006, 51.4012, 60.3522),
+		    tol = 1e-5)) # 4e-7 {64b nb-mm4}
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/missing.Rout.save
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/missing.Rout.save	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/missing.Rout.save	(revision 2477)
@@ -0,0 +1,767 @@
+
+R version 3.2.3 beta (2015-11-29 r69717) -- "Wooden Christmas-Tree"
+Copyright (C) 2015 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
+
+R is free software and comes with ABSOLUTELY NO WARRANTY.
+You are welcome to redistribute it under certain conditions.
+Type 'license()' or 'licence()' for distribution details.
+
+R is a collaborative project with many contributors.
+Type 'contributors()' for more information and
+'citation()' on how to cite R or R packages in publications.
+
+Type 'demo()' for some demos, 'help()' for on-line help, or
+'help.start()' for an HTML browser interface to help.
+Type 'q()' to quit R.
+
+> library(nlme)
+> 
+> op <- options(digits = 3) # reduce rounding differences
+> 
+> Ovary[c(1,272), 2] <- NA
+> fm1 <- gls(follicles ~ sin(2*pi*Time) + cos(2*pi*Time), Ovary,
++            correlation = corAR1(form = ~ 1 | Mare), na.action=na.exclude)
+> fitted(fm1)
+    1     2     3     4     5     6     7     8     9    10    11    12    13 
+   NA 12.86 12.06 11.27 10.55  9.96  9.54  9.34  9.36  9.60 10.05 10.67 11.41 
+   14    15    16    17    18    19    20    21    22    23    24    25    26 
+12.21 13.00 13.71 14.31 14.72 14.93 14.91 14.66 14.21 13.59 12.86 12.06 11.27 
+   27    28    29    30    31    32    33    34    35    36    37    38    39 
+10.55  9.96  9.54 13.79 13.01 12.14 11.27 10.49  9.86  9.46  9.32  9.45  9.85 
+   40    41    42    43    44    45    46    47    48    49    50    51    52 
+10.47 11.26 12.13 13.00 13.78 14.41 14.81 14.95 14.81 14.41 13.79 13.01 12.14 
+   53    54    55    56    57    58    59    60    61    62    63    64    65 
+11.27 10.49  9.86  9.46 13.90 13.10 12.19 11.27 10.45  9.81  9.42  9.32  9.53 
+   66    67    68    69    70    71    72    73    74    75    76    77    78 
+10.03 10.75 11.62 12.54 13.42 14.17 14.69 14.93 14.87 14.52 13.90 13.10 12.19 
+   79    80    81    82    83    84    85    86    87    88    89    90    91 
+11.27 10.45  9.81  9.42 13.59 12.86 12.06 11.27 10.55  9.96  9.54  9.34  9.36 
+   92    93    94    95    96    97    98    99   100   101   102   103   104 
+ 9.60 10.05 10.67 11.41 12.21 13.00 13.71 14.31 14.72 14.93 14.91 14.66 14.21 
+  105   106   107   108   109   110   111   112   113   114   115   116   117 
+13.59 12.86 12.06 11.27 10.55  9.96  9.54 13.59 12.86 12.06 11.27 10.55  9.96 
+  118   119   120   121   122   123   124   125   126   127   128   129   130 
+ 9.54  9.34  9.36  9.60 10.05 10.67 11.41 12.21 13.00 13.71 14.31 14.72 14.93 
+  131   132   133   134   135   136   137   138   139   140   141   142   143 
+14.91 14.66 14.21 13.59 12.86 12.06 11.27 10.55  9.96  9.54 13.59 12.86 12.06 
+  144   145   146   147   148   149   150   151   152   153   154   155   156 
+11.27 10.55  9.96  9.54  9.34  9.36  9.60 10.05 10.67 11.41 12.21 13.00 13.71 
+  157   158   159   160   161   162   163   164   165   166   167   168   169 
+14.31 14.72 14.93 14.91 14.66 14.21 13.59 12.86 12.06 11.27 10.55  9.96  9.54 
+  170   171   172   173   174   175   176   177   178   179   180   181   182 
+13.79 13.01 12.14 11.27 10.49  9.86  9.46  9.32  9.45  9.85 10.47 11.26 12.13 
+  183   184   185   186   187   188   189   190   191   192   193   194   195 
+13.00 13.78 14.41 14.81 14.95 14.81 14.41 13.79 13.01 12.14 11.27 10.49  9.86 
+  196   197   198   199   200   201   202   203   204   205   206   207   208 
+ 9.46 13.42 12.73 11.99 11.27 10.61 10.05  9.63  9.38  9.32  9.45  9.77 10.24 
+  209   210   211   212   213   214   215   216   217   218   219   220   221 
+10.85 11.54 12.27 13.00 13.66 14.22 14.64 14.88 14.94 14.81 14.50 14.02 13.42 
+  222   223   224   225   226   227   228   229   230   231   232   233   234 
+12.73 11.99 11.27 10.61 10.05  9.63 14.02 13.19 12.24 11.27 10.41  9.75  9.38 
+  235   236   237   238   239   240   241   242   243   244   245   246   247 
+ 9.35  9.64 10.24 11.07 12.03 13.00 13.86 14.52 14.88 14.92 14.62 14.02 13.19 
+  248   249   250   251   252   253   254   255   256   257   258   259   260 
+12.24 11.27 10.41  9.75  9.38 13.59 12.86 12.06 11.27 10.55  9.96  9.54  9.34 
+  261   262   263   264   265   266   267   268   269   270   271   272   273 
+ 9.36  9.60 10.05 10.67 11.41 12.21 13.00 13.71 14.31 14.72 14.93    NA 14.66 
+  274   275   276   277   278   279   280   281   282   283   284   285   286 
+14.21 13.59 12.86 12.06 11.27 10.55  9.96  9.54 13.79 13.01 12.14 11.27 10.49 
+  287   288   289   290   291   292   293   294   295   296   297   298   299 
+ 9.86  9.46  9.32  9.45  9.85 10.47 11.26 12.13 13.00 13.78 14.41 14.81 14.95 
+  300   301   302   303   304   305   306   307   308 
+14.81 14.41 13.79 13.01 12.14 11.27 10.49  9.86  9.46 
+attr(,"label")
+[1] "Fitted values"
+> residuals(fm1)
+       1        2        3        4        5        6        7        8 
+      NA   2.1439   6.9394   4.7290   2.4488   0.0405   2.4560   4.6618 
+       9       10       11       12       13       14       15       16 
+  3.6412  10.3959  11.9456   4.3270   6.5900   4.7945   1.0049   4.2851 
+      17       18       19       20       21       22       23       24 
+ -0.3066   1.2779   2.0720   3.0927   3.3380   2.7883   0.4069  -0.8561 
+      25       26       27       28       29       30       31       32 
+ -0.0606   2.7290  -0.5512   1.0405   6.4560  -7.7936  -7.0102  -4.1410 
+      33       34       35       36       37       38       39       40 
+ -4.2710   5.5146   0.1390   3.5409  -0.3189  -2.4542  -3.8517  -2.4725 
+      41       42       43       44       45       46       47       48 
+ -3.2559  -6.1251  -4.9951  -6.7808  -5.4051  -8.8070 -10.9472  -9.8119 
+      49       50       51       52       53       54       55       56 
+ -6.4144  -2.7936  -0.0102  -2.1410  -5.2710  -3.4854  -3.8610  -4.4591 
+      57       58       59       60       61       62       63       64 
+ -0.9042  -2.0982  -2.1875  -5.2710  -2.4479  -3.8074  -0.4189  -0.3245 
+      65       66       67       68       69       70       71       72 
+  0.4655  -2.0261   3.2540   1.3838   1.4576   2.5757   5.8338   6.3122 
+      73       74       75       76       77       78       79       80 
+ 10.0674   8.1260   4.4817   8.0958   2.9018   8.8125   7.7290   9.5521 
+      81       82       83       84       85       86       87       88 
+  7.1926  14.5811  -4.5931  -3.8561  -5.0606  -5.2710  -3.5512  -3.9595 
+      89       90       91       92       93       94       95       96 
+ -8.5440  -8.3382  -8.3588  -4.6041  -4.0544  -7.6730  -6.4100  -9.2055 
+      97       98       99      100      101      102      103      104 
+ -6.9951  -5.7149  -8.3066  -9.7221  -8.9280  -6.9073  -3.6620  -0.2117 
+     105      106      107      108      109      110      111      112 
+ -5.5931  -3.8561  -2.0606  -4.2710  -3.5512  -3.9595   1.4560  -3.5931 
+     113      114      115      116      117      118      119      120 
+ -0.8561  -0.0606   5.7290  -1.5512   0.0405  -6.5440   2.6618   3.6412 
+     121      122      123      124      125      126      127      128 
+ -0.6041  -6.0544  -3.6730  -7.4100  -0.2055   1.0049  -1.7149   0.6934 
+     129      130      131      132      133      134      135      136 
+  2.2779   0.0720  -1.9073   3.3380   4.7883  -0.5931  -3.8561  -0.0606 
+     137      138      139      140      141      142      143      144 
+ -3.2710  -0.5512  -4.9595   4.4560   2.4069   4.1439   0.9394   5.7290 
+     145      146      147      148      149      150      151      152 
+  4.4488  -0.9595  -1.5440  -4.3382  -0.3588  -1.6041  -2.0544   2.3270 
+     153      154      155      156      157      158      159      160 
+  2.5900   0.7945   1.0049   0.2851  -3.3066   2.2779   6.0720   6.0927 
+     161      162      163      164      165      166      167      168 
+  6.3380   5.7883   3.4069   5.1439   9.9394  -1.2710   0.4488   1.0405 
+     169      170      171      172      173      174      175      176 
+  2.4560   4.2064  -0.0102   1.8590   0.7290   0.5146  -1.8610  -4.4591 
+     177      178      179      180      181      182      183      184 
+ -1.3189   0.5458   1.1483  -0.4725   0.7441  -2.1251  -3.9951  -1.7808 
+     185      186      187      188      189      190      191      192 
+ -0.4051   1.1930  -1.9472  -3.8119  -1.4144  -0.7936  -2.0102  -1.1410 
+     193      194      195      196      197      198      199      200 
+ -3.2710   3.5146  -5.8610  -2.4591  -0.4177  -3.7259   3.0063   3.7290 
+     201      202      203      204      205      206      207      208 
+  1.3930  -2.0471   0.3708  -3.3821  -0.3224  -1.4542   0.2314  -4.2441 
+     209      210      211      212      213      214      215      216 
+ -2.8484   1.4598  -0.2724  -0.9951   1.3409   6.7809  10.3631   6.1159 
+     217      218      219      220      221      222      223      224 
+  6.0562   9.1881   5.5025   5.9780   4.5823   7.2741   8.0063   7.7290 
+     225      226      227      228      229      230      231      232 
+  1.3930  -3.0471  -1.6292  -4.0220   0.8054  -0.2392  -1.2710  -3.4068 
+     233      234      235      236      237      238      239      240 
+  2.2493   0.6179  -1.3452   0.3554   4.7559   3.9285  -0.0269   6.0049 
+     241      242      243      244      245      246      247      248 
+  1.1406   1.4846   0.1159   2.0791  -0.6215   1.9780   1.8054  -1.2392 
+     249      250      251      252      253      254      255      256 
+ -1.2710  -3.4067  -5.7507  -1.3821  -2.5931   3.1439   2.9394   0.7290 
+     257      258      259      260      261      262      263      264 
+  0.4488  -3.9595   1.4560   2.6618   1.6412   6.3959   4.9456   0.3270 
+     265      266      267      268      269      270      271      272 
+ -4.4100   1.7945   7.0049   8.2851   8.6934   6.2779   6.0720       NA 
+     273      274      275      276      277      278      279      280 
+  7.3380   7.7883   3.4069   4.1439   4.9394   5.7290   3.4488   2.0405 
+     281      282      283      284      285      286      287      288 
+  1.4560  -4.7936  -5.0102  -4.1410  -3.2710  -2.4854  -3.8610  -2.4591 
+     289      290      291      292      293      294      295      296 
+ -1.3189   0.5458   0.1483   3.5275   1.7441  -4.1251  -4.9951  -5.7808 
+     297      298      299      300      301      302      303      304 
+ -5.4051   1.1930  -2.9472  -4.8119  -2.4144  -1.7936  -4.0102  -6.1410 
+     305      306      307      308 
+ -2.2710  -3.4854  -4.8610  -4.4591 
+attr(,"std")
+  [1]   NA 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58
+ [16] 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58
+ [31] 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58
+ [46] 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58
+ [61] 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58
+ [76] 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58
+ [91] 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58
+[106] 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58
+[121] 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58
+[136] 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58
+[151] 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58
+[166] 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58
+[181] 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58
+[196] 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58
+[211] 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58
+[226] 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58
+[241] 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58
+[256] 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58
+[271] 4.58   NA 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58
+[286] 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58
+[301] 4.58 4.58 4.58 4.58 4.58 4.58 4.58 4.58
+attr(,"label")
+[1] "Residuals"
+> summary(fm1)
+Generalized least squares fit by REML
+  Model: follicles ~ sin(2 * pi * Time) + cos(2 * pi * Time) 
+  Data: Ovary 
+   AIC  BIC logLik
+  1560 1579   -775
+
+Correlation Structure: AR(1)
+ Formula: ~1 | Mare 
+ Parameter estimate(s):
+ Phi 
+0.75 
+
+Coefficients:
+                   Value Std.Error t-value p-value
+(Intercept)        12.13     0.657   18.46   0.000
+sin(2 * pi * Time) -2.68     0.644   -4.16   0.000
+cos(2 * pi * Time) -0.86     0.690   -1.25   0.213
+
+ Correlation: 
+                   (Intr) s(*p*T
+sin(2 * pi * Time) -0.007       
+cos(2 * pi * Time) -0.295  0.003
+
+Standardized residuals:
+    Min      Q1     Med      Q3     Max 
+-2.3897 -0.7565 -0.0132  0.6396  3.1830 
+
+Residual standard error: 4.58 
+Degrees of freedom: 306 total; 303 residual
+> 
+> Orthodont[100:102, 2] <- NA
+> fm2 <- lme(distance ~ age + Sex, data = Orthodont, random = ~ 1,
++            na.action=na.exclude)
+> fitted(fm2, 0:1)
+    fixed Subject
+1    23.0    25.4
+2    24.3    26.7
+3    25.6    28.0
+4    27.0    29.4
+5    23.0    21.6
+6    24.3    22.9
+7    25.6    24.3
+8    27.0    25.6
+9    23.0    22.3
+10   24.3    23.7
+11   25.6    25.0
+12   27.0    26.4
+13   23.0    24.4
+14   24.3    25.7
+15   25.6    27.1
+16   27.0    28.4
+17   23.0    21.3
+18   24.3    22.6
+19   25.6    23.9
+20   27.0    25.3
+21   23.0    24.2
+22   24.3    25.5
+23   25.6    26.9
+24   27.0    28.2
+25   23.0    21.9
+26   24.3    23.2
+27   25.6    24.6
+28   27.0    25.9
+29   23.0    22.0
+30   24.3    23.4
+31   25.6    24.7
+32   27.0    26.0
+33   23.0    23.1
+34   24.3    24.4
+35   25.6    25.8
+36   27.0    27.1
+37   23.0    26.9
+38   24.3    28.2
+39   25.6    29.5
+40   27.0    30.9
+41   23.0    21.8
+42   24.3    23.1
+43   25.6    24.5
+44   27.0    25.8
+45   23.0    22.3
+46   24.3    23.7
+47   25.6    25.0
+48   27.0    26.4
+49   23.0    22.3
+50   24.3    23.7
+51   25.6    25.0
+52   27.0    26.4
+53   23.0    22.9
+54   24.3    24.2
+55   25.6    25.6
+56   27.0    26.9
+57   23.0    23.7
+58   24.3    25.1
+59   25.6    26.4
+60   27.0    27.8
+61   23.0    21.3
+62   24.3    22.6
+63   25.6    23.9
+64   27.0    25.3
+65   20.7    19.5
+66   22.0    20.9
+67   23.4    22.2
+68   24.7    23.6
+69   20.7    20.9
+70   22.0    22.3
+71   23.4    23.6
+72   24.7    25.0
+73   20.7    21.6
+74   22.0    22.9
+75   23.4    24.3
+76   24.7    25.6
+77   20.7    22.6
+78   22.0    23.9
+79   23.4    25.2
+80   24.7    26.6
+81   20.7    20.6
+82   22.0    22.0
+83   23.4    23.3
+84   24.7    24.6
+85   20.7    19.3
+86   22.0    20.7
+87   23.4    22.0
+88   24.7    23.4
+89   20.7    20.9
+90   22.0    22.3
+91   23.4    23.6
+92   24.7    25.0
+93   20.7    21.3
+94   22.0    22.6
+95   23.4    24.0
+96   24.7    25.3
+97   20.7    19.8
+98   22.0    21.2
+99   23.4    22.5
+100    NA      NA
+101    NA      NA
+102    NA      NA
+103  23.4    19.7
+104  24.7    21.1
+105  20.7    23.9
+106  22.0    25.2
+107  23.4    26.5
+108  24.7    27.9
+> fitted(fm2)
+ M01  M01  M01  M01  M02  M02  M02  M02  M03  M03  M03  M03  M04  M04  M04  M04 
+25.4 26.7 28.0 29.4 21.6 22.9 24.3 25.6 22.3 23.7 25.0 26.4 24.4 25.7 27.1 28.4 
+ M05  M05  M05  M05  M06  M06  M06  M06  M07  M07  M07  M07  M08  M08  M08  M08 
+21.3 22.6 23.9 25.3 24.2 25.5 26.9 28.2 21.9 23.2 24.6 25.9 22.0 23.4 24.7 26.0 
+ M09  M09  M09  M09  M10  M10  M10  M10  M11  M11  M11  M11  M12  M12  M12  M12 
+23.1 24.4 25.8 27.1 26.9 28.2 29.5 30.9 21.8 23.1 24.5 25.8 22.3 23.7 25.0 26.4 
+ M13  M13  M13  M13  M14  M14  M14  M14  M15  M15  M15  M15  M16  M16  M16  M16 
+22.3 23.7 25.0 26.4 22.9 24.2 25.6 26.9 23.7 25.1 26.4 27.8 21.3 22.6 23.9 25.3 
+ F01  F01  F01  F01  F02  F02  F02  F02  F03  F03  F03  F03  F04  F04  F04  F04 
+19.5 20.9 22.2 23.6 20.9 22.3 23.6 25.0 21.6 22.9 24.3 25.6 22.6 23.9 25.2 26.6 
+ F05  F05  F05  F05  F06  F06  F06  F06  F07  F07  F07  F07  F08  F08  F08  F08 
+20.6 22.0 23.3 24.6 19.3 20.7 22.0 23.4 20.9 22.3 23.6 25.0 21.3 22.6 24.0 25.3 
+ F09  F09  F09 <NA> <NA> <NA>  F10  F10  F11  F11  F11  F11 
+19.8 21.2 22.5   NA   NA   NA 19.7 21.1 23.9 25.2 26.5 27.9 
+attr(,"label")
+[1] "Fitted values (mm)"
+> residuals(fm2, 0:1)
+      fixed  Subject
+1    3.0453  0.64827
+2    0.7026 -1.69443
+3    3.3599  0.96286
+4    4.0172  1.62016
+5   -1.4547 -0.08111
+6   -1.7974 -0.42382
+7   -2.6401 -1.26652
+8   -0.4828  0.89078
+9    0.0453  0.66476
+10  -1.7974 -1.17794
+11  -1.6401 -1.02064
+12   0.5172  1.13665
+13   2.5453  1.11786
+14   3.2026  1.77515
+15   0.8599 -0.56755
+16   0.0172 -1.41025
+17  -2.9547 -1.25792
+18  -0.7974  0.89938
+19  -3.1401 -1.44332
+20  -0.9828  0.71397
+21   1.5453  0.33332
+22   1.2026 -0.00938
+23   1.3599  0.14791
+24   1.5172  0.30521
+25  -0.9547  0.09569
+26  -2.2974 -1.24701
+27  -1.1401 -0.08972
+28  -0.4828  0.56758
+29   1.0453  1.98796
+30  -2.7974 -1.85474
+31  -1.1401 -0.19745
+32  -1.4828 -0.54015
+33   0.0453 -0.08936
+34  -3.7974 -3.93206
+35   5.3599  5.22523
+36  -0.9828 -1.11747
+37   4.5453  0.64002
+38   3.7026 -0.20268
+39   5.3599  1.45461
+40   4.5172  0.61191
+41   0.0453  1.20342
+42  -1.2974 -0.13928
+43  -2.1401 -0.98198
+44  -1.9828 -0.82469
+45  -1.4547 -0.83524
+46  -0.7974 -0.17794
+47  -1.6401 -1.02064
+48   1.0172  1.63665
+49  -5.9547 -5.33524
+50   0.2026  0.82206
+51   0.3599  0.97936
+52   2.5172  3.13665
+53  -0.4547 -0.37390
+54   1.2026  1.28340
+55  -0.1401 -0.05930
+56  -0.9828 -0.90201
+57   0.0453 -0.73575
+58   0.2026 -0.57846
+59   0.3599 -0.42116
+60   3.0172  2.23614
+61  -0.9547  0.74208
+62  -2.7974 -1.10062
+63  -2.1401 -0.44332
+64  -1.9828 -0.28603
+65   0.3135  1.45594
+66  -2.0292 -0.88676
+67  -1.8719 -0.72947
+68  -1.7146 -0.57217
+69   0.3135  0.05543
+70  -0.5292 -0.78728
+71   0.6281  0.37002
+72   0.7854  0.52732
+73  -0.1865 -1.09097
+74   1.9708  1.06633
+75   1.1281  0.22363
+76   1.2854  0.38092
+77   2.8135  0.93945
+78   2.4708  0.59674
+79   1.6281 -0.24596
+80   1.7854 -0.08866
+81   0.8135  0.87862
+82   0.9708  1.03592
+83  -0.8719 -0.80678
+84  -1.2146 -1.14949
+85  -0.6865  0.67141
+86  -1.0292  0.32870
+87  -2.3719 -1.01400
+88  -2.2146 -0.85670
+89   0.8135  0.55543
+90   0.4708  0.21272
+91  -0.3719 -0.62998
+92   0.2854  0.02732
+93   2.3135  1.73223
+94   0.9708  0.38953
+95   0.1281 -0.45318
+96  -0.7146 -1.29588
+97  -0.6865  0.16148
+98  -1.0292 -0.18122
+99  -1.3719 -0.52392
+100      NA       NA
+101      NA       NA
+102      NA       NA
+103 -4.3719 -0.74222
+104 -5.2146 -1.58492
+105  3.8135  0.64666
+106  2.9708 -0.19604
+107  4.6281  1.46126
+108  3.2854  0.11855
+> round(residuals(fm2), 2)
+  M01   M01   M01   M01   M02   M02   M02   M02   M03   M03   M03   M03   M04 
+ 0.65 -1.69  0.96  1.62 -0.08 -0.42 -1.27  0.89  0.66 -1.18 -1.02  1.14  1.12 
+  M04   M04   M04   M05   M05   M05   M05   M06   M06   M06   M06   M07   M07 
+ 1.78 -0.57 -1.41 -1.26  0.90 -1.44  0.71  0.33 -0.01  0.15  0.31  0.10 -1.25 
+  M07   M07   M08   M08   M08   M08   M09   M09   M09   M09   M10   M10   M10 
+-0.09  0.57  1.99 -1.85 -0.20 -0.54 -0.09 -3.93  5.23 -1.12  0.64 -0.20  1.45 
+  M10   M11   M11   M11   M11   M12   M12   M12   M12   M13   M13   M13   M13 
+ 0.61  1.20 -0.14 -0.98 -0.82 -0.84 -0.18 -1.02  1.64 -5.34  0.82  0.98  3.14 
+  M14   M14   M14   M14   M15   M15   M15   M15   M16   M16   M16   M16   F01 
+-0.37  1.28 -0.06 -0.90 -0.74 -0.58 -0.42  2.24  0.74 -1.10 -0.44 -0.29  1.46 
+  F01   F01   F01   F02   F02   F02   F02   F03   F03   F03   F03   F04   F04 
+-0.89 -0.73 -0.57  0.06 -0.79  0.37  0.53 -1.09  1.07  0.22  0.38  0.94  0.60 
+  F04   F04   F05   F05   F05   F05   F06   F06   F06   F06   F07   F07   F07 
+-0.25 -0.09  0.88  1.04 -0.81 -1.15  0.67  0.33 -1.01 -0.86  0.56  0.21 -0.63 
+  F07   F08   F08   F08   F08   F09   F09   F09  <NA>  <NA>  <NA>   F10   F10 
+ 0.03  1.73  0.39 -0.45 -1.30  0.16 -0.18 -0.52    NA    NA    NA -0.74 -1.58 
+  F11   F11   F11   F11 
+ 0.65 -0.20  1.46  0.12 
+attr(,"label")
+[1] "Residuals (mm)"
+> summary(fm2)
+Linear mixed-effects model fit by REML
+ Data: Orthodont 
+  AIC BIC logLik
+  437 450   -213
+
+Random effects:
+ Formula: ~1 | Subject
+        (Intercept) Residual
+StdDev:         1.8     1.44
+
+Fixed effects: distance ~ age + Sex 
+            Value Std.Error DF t-value p-value
+(Intercept) 17.58     0.850 77   20.68  0.0000
+age          0.67     0.064 77   10.56  0.0000
+SexFemale   -2.27     0.762 25   -2.98  0.0064
+ Correlation: 
+          (Intr) age   
+age       -0.822       
+SexFemale -0.357 -0.006
+
+Standardized Within-Group Residuals:
+    Min      Q1     Med      Q3     Max 
+-3.7079 -0.5471 -0.0564  0.4666  3.6314 
+
+Number of Observations: 105
+Number of Groups: 27 
+> 
+> Soybean[1:5, "Time"] <- NA
+> fm3 <- gnls(weight ~ SSlogis(Time, Asym, xmid, scal), Soybean,
++             weights = varPower(), na.action=na.exclude)
+> fitted(fm3)
+     1      2      3      4      5      6      7      8      9     10     11 
+    NA     NA     NA     NA     NA  7.047 10.958 14.082 15.894 16.756  0.120 
+    12     13     14     15     16     17     18     19     20     21     22 
+ 0.298  0.726  1.708  3.724  7.047 10.958 15.894 16.756  0.120  0.298  0.726 
+    23     24     25     26     27     28     29     30     31     32     33 
+ 1.708  3.724  7.047 10.958 14.082 15.894 16.756  0.120  0.298  0.726  1.708 
+    34     35     36     37     38     39     40     41     42     43     44 
+ 3.724  7.047 10.958 14.082 15.894 16.756  0.120  0.298  0.726  1.708  3.724 
+    45     46     47     48     49     50     51     52     53     54     55 
+ 7.047 10.958 15.894  0.120  0.298  0.726  1.708  3.724  7.047 10.958 14.082 
+    56     57     58     59     60     61     62     63     64     65     66 
+15.894 16.756  0.120  0.298  0.726  1.708  3.724  7.047 10.958 15.894 16.756 
+    67     68     69     70     71     72     73     74     75     76     77 
+ 0.120  0.298  0.726  1.708  3.724  7.047 10.958 14.082 15.894 16.756  0.120 
+    78     79     80     81     82     83     84     85     86     87     88 
+ 0.298  0.726  1.708  3.724  7.047 10.958 14.082 15.894 16.756  0.120  0.298 
+    89     90     91     92     93     94     95     96     97     98     99 
+ 0.726  1.708  3.724  7.047 10.958 14.082 15.894 16.756  0.120  0.298  0.726 
+   100    101    102    103    104    105    106    107    108    109    110 
+ 1.708  3.724  7.047 10.958 14.082 15.894 16.756  0.120  0.298  0.726  1.708 
+   111    112    113    114    115    116    117    118    119    120    121 
+ 3.724  7.047 10.958 14.082 15.894 16.756  0.120  0.298  0.726  1.708  3.724 
+   122    123    124    125    126    127    128    129    130    131    132 
+ 7.047 10.958 14.082 15.894 16.756  0.120  0.298  0.726  1.708  3.724  7.047 
+   133    134    135    136    137    138    139    140    141    142    143 
+10.958 14.082 15.894 16.756  0.120  0.298  0.726  1.708  3.724  7.047 10.958 
+   144    145    146    147    148    149    150    151    152    153    154 
+14.082 15.894 16.756  0.120  0.298  0.726  1.708  3.724  7.047 10.958 14.082 
+   155    156    157    158    159    160    161    162    163    164    165 
+15.894 16.756  0.120  0.262  0.640  1.517  3.355 10.419 15.706 17.127  0.120 
+   166    167    168    169    170    171    172    173    174    175    176 
+ 0.262  0.640  1.517  3.355 10.419 15.706 17.127  0.120  0.262  0.640  1.517 
+   177    178    179    180    181    182    183    184    185    186    187 
+ 3.355 10.419 15.706 17.127  0.120  0.262  0.640  1.517  3.355 10.419 15.706 
+   188    189    190    191    192    193    194    195    196    197    198 
+17.127  0.120  0.262  0.640  1.517  3.355 10.419 15.706 17.127  0.120  0.262 
+   199    200    201    202    203    204    205    206    207    208    209 
+ 0.640  1.517  3.355 10.419 15.706 17.127  0.120  0.262  0.640  1.517  3.355 
+   210    211    212    213    214    215    216    217    218    219    220 
+10.419 15.706 17.127  0.120  0.262  0.640  1.517  3.355 10.419 15.706 17.127 
+   221    222    223    224    225    226    227    228    229    230    231 
+ 0.120  0.262  0.640  1.517  3.355 10.419 15.706 17.127  0.120  0.262  0.640 
+   232    233    234    235    236    237    238    239    240    241    242 
+ 1.517  3.355 10.419 15.706 17.127  0.120  0.262  0.640  1.517  3.355 10.419 
+   243    244    245    246    247    248    249    250    251    252    253 
+15.706 17.127  0.120  0.262  0.640  1.517  3.355 10.419 15.706 17.127  0.120 
+   254    255    256    257    258    259    260    261    262    263    264 
+ 0.262  0.640  1.517  3.355 10.419 15.706 17.127  0.120  0.262  0.640  1.517 
+   265    266    267    268    269    270    271    272    273    274    275 
+ 3.355 10.419 15.706 17.127  0.120  0.262  0.640  1.517  3.355 10.419 15.706 
+   276    277    278    279    280    281    282    283    284    285    286 
+17.127  0.120  0.262  0.640  1.517  3.355 10.419 15.706 17.127  0.137  0.385 
+   287    288    289    290    291    292    293    294    295    296    297 
+ 0.932  2.157  4.121  8.166 14.418 16.897  0.137  0.385  0.932  2.157  4.121 
+   298    299    300    301    302    303    304    305    306    307    308 
+ 8.166 14.418 16.897  0.137  0.385  0.932  2.157  4.121  8.166 14.418 16.897 
+   309    310    311    312    313    314    315    316    317    318    319 
+ 0.137  0.385  0.932  2.157  4.121  8.166 14.418 16.897  0.137  0.385  0.932 
+   320    321    322    323    324    325    326    327    328    329    330 
+ 2.157  4.121  8.166 14.418 16.897  0.137  0.385  0.932  2.157  4.121  8.166 
+   331    332    333    334    335    336    337    338    339    340    341 
+14.418 16.897  0.137  0.385  0.932  2.157  4.121  8.166 14.418 16.897  0.137 
+   342    343    344    345    346    347    348    349    350    351    352 
+ 0.385  0.932  2.157  4.121  8.166 14.418 16.897  0.137  0.385  0.932  2.157 
+   353    354    355    356    357    358    359    360    361    362    363 
+ 4.121  8.166 14.418 16.897  0.137  0.385  0.932  2.157  4.121  8.166 14.418 
+   364    365    366    367    368    369    370    371    372    373    374 
+16.897  0.137  0.385  0.932  2.157  4.121  8.166 14.418 16.897  0.137  0.385 
+   375    376    377    378    379    380    381    382    383    384    385 
+ 0.932  2.157  4.121  8.166 14.418 16.897  0.137  0.385  0.932  2.157  4.121 
+   386    387    388    389    390    391    392    393    394    395    396 
+ 8.166 14.418 16.897  0.137  0.385  0.932  2.157  4.121  8.166 14.418 16.897 
+   397    398    399    400    401    402    403    404    405    406    407 
+ 0.137  0.385  0.932  2.157  4.121  8.166 14.418 16.897  0.137  0.385  0.932 
+   408    409    410    411    412 
+ 2.157  4.121  8.166 14.418 16.897 
+attr(,"label")
+[1] "Fitted values (g)"
+> residuals(fm3)
+       1        2        3        4        5        6        7        8 
+      NA       NA       NA       NA       NA -0.81724 -2.24772 -0.73203 
+       9       10       11       12       13       14       15       16 
+ 0.44774  0.99485 -0.01627 -0.02870  0.05209  0.41153 -0.79366 -1.75724 
+      17       18       19       20       21       22       23       24 
+-1.45772  1.07274  0.99072 -0.01227 -0.00670 -0.05891  0.34153  0.08634 
+      25       26       27       28       29       30       31       32 
+-0.91724 -0.67772  3.99797  4.28854  5.05482 -0.01527  0.00130  0.11809 
+      33       34       35       36       37       38       39       40 
+-0.38847 -1.48366 -2.36724 -2.13772  1.00797 -1.23396 -2.75138 -0.01927 
+      41       42       43       44       45       46       47       48 
+-0.02470  0.12209  0.24153  1.04634 -1.03724 -1.04772  3.36834 -0.01427 
+      49       50       51       52       53       54       55       56 
+ 0.03930 -0.02691 -0.17847  0.14634 -1.44724 -1.52772 -0.35203  1.48684 
+      57       58       59       60       61       62       63       64 
+ 3.17632 -0.01827 -0.02270  0.04109 -0.25847  0.22634 -2.10724 -1.31772 
+      65       66       67       68       69       70       71       72 
+ 1.98604  0.96822 -0.01727 -0.02470  0.01609 -0.29847 -0.71366 -1.78724 
+      73       74       75       76       77       78       79       80 
+-1.14772 -1.23203  2.32021  2.92402  0.01073  0.04030 -0.02491 -0.04847 
+      81       82       83       84       85       86       87       88 
+ 0.52634  2.19276  1.19228  2.69797  0.03104  0.51632  0.00773  0.10630 
+      89       90       91       92       93       94       95       96 
+ 0.17109  0.07153  0.18634  0.35276 -0.88772  4.77797  1.11774 10.61402 
+      97       98       99      100      101      102      103      104 
+ 0.01073  0.08130  0.40009  0.73153  0.16634 -0.13724  1.53228  1.58797 
+     105      106      107      108      109      110      111      112 
+ 7.86934  4.73482  0.03373  0.05930  0.45509  0.12153  0.98634  3.66276 
+     113      114      115      116      117      118      119      120 
+-1.04772  1.42797 -0.93606  5.04402  0.01873  0.03030  0.20609  0.28153 
+     121      122      123      124      125      126      127      128 
+-0.26366 -0.02724  0.83228  1.74797  0.02687  0.68572  0.01873  0.09130 
+     129      130      131      132      133      134      135      136 
+ 0.36809  0.42153  0.31634  0.57276  1.52228  3.84797 -1.47226 13.51572 
+     137      138      139      140      141      142      143      144 
+ 0.02473  0.06830  0.07309 -0.09847 -0.21366 -0.25724 -1.00772  0.45797 
+     145      146      147      148      149      150      151      152 
+ 3.38604  5.81675  0.00973  0.05730  0.36409  0.57153  0.21634 -2.08724 
+     153      154      155      156      157      158      159      160 
+-0.03772 -0.06203  2.10024  5.61482 -0.07327 -0.12571 -0.36726 -0.53373 
+     161      162      163      164      165      166      167      168 
+-1.55813 -6.30167 -4.66844 -6.72407 -0.08527 -0.14971 -0.37209 -0.46373 
+     169      170      171      172      173      174      175      176 
+-1.63980 -3.69048 -5.39225 -6.03907 -0.07627 -0.11571 -0.27959 -0.74206 
+     177      178      179      180      181      182      183      184 
+-1.71313 -6.67048 -4.83058 -1.09990 -0.07127 -0.16471 -0.41259 -0.68373 
+     185      186      187      188      189      190      191      192 
+-2.00080 -4.43048 -5.12058 -6.21597 -0.08127 -0.14071 -0.36842 -0.85873 
+     193      194      195      196      197      198      199      200 
+-0.96480 -4.93548 -5.76891 -8.23907 -0.09127 -0.16971 -0.38909 -0.97539 
+     201      202      203      204      205      206      207      208 
+-2.29313 -5.58881 -9.43391 -8.54407 -0.07927 -0.11671 -0.23476 -0.75706 
+     209      210      211      212      213      214      215      216 
+-1.86147 -4.17048 -4.59388 -8.24740 -0.08227 -0.13471 -0.29992 -0.52306 
+     217      218      219      220      221      222      223      224 
+-1.07313 -1.91281 -6.73225 -5.49540 -0.05027 -0.05371 -0.03926  0.38461 
+     225      226      227      228      229      230      231      232 
+-0.38980 -2.27548 -0.00558  2.76090 -0.05227 -0.00971 -0.05959  0.49694 
+     233      234      235      236      237      238      239      240 
+-0.68147 -1.61881 -1.22058  5.51590 -0.04327 -0.03771 -0.29876  0.22294 
+     241      242      243      244      245      246      247      248 
+ 1.16920  1.23789  4.61112  4.27460 -0.02127 -0.06371 -0.14892 -0.31206 
+     249      250      251      252      253      254      255      256 
+-0.55480 -3.05548 -0.56391  0.05927 -0.05227 -0.02971 -0.20409 -0.07373 
+     257      258      259      260      261      262      263      264 
+-0.09480 -2.21048  3.70112 -1.46573 -0.05727 -0.05271  0.10074 -0.24873 
+     265      266      267      268      269      270      271      272 
+ 0.53520 -1.32681 -1.21558  1.96760  0.01273  0.04129  0.47691  0.66294 
+     273      274      275      276      277      278      279      280 
+ 0.18187  2.74119  0.08442 -2.35240 -0.03927 -0.00671  0.12474 -0.42373 
+     281      282      283      284      285      286      287      288 
+-0.30313 -2.31381  8.71842  1.79090 -0.02776 -0.00104  0.23005  0.18344 
+     289      290      291      292      293      294      295      296 
+-1.25117  1.37221 -1.73490  1.73667 -0.04196 -0.04654 -0.17329  0.36344 
+     297      298      299      300      301      302      303      304 
+-1.60284 -3.04945 -5.84320 -2.72333 -0.04896  0.22830  0.38338  0.86511 
+     305      306      307      308      309      310      311      312 
+ 1.72883 -0.74945 -3.08650 -0.01333 -0.04824  0.21180  0.14338  0.91844 
+     313      314      315      316      317      318      319      320 
+-0.16284 -2.13279 -3.98153  0.90664 -0.03566 -0.00954  0.99005  0.05011 
+     321      322      323      324      325      326      327      328 
+ 0.64383  0.97388  1.42180  1.21164 -0.02720  0.09846  0.37505  1.79844 
+     329      330      331      332      333      334      335      336 
+ 0.18383 -0.13445  1.66513  2.67664 -0.03402  0.02963  0.73171 -0.76656 
+     337      338      339      340      341      342      343      344 
+-1.11950 -1.32112  1.79180  2.17664 -0.06027 -0.01304 -0.18662  0.09011 
+     345      346      347      348      349      350      351      352 
+ 0.37383 -2.49112  1.72680  2.03504  0.01178  0.30213  0.64005  1.65677 
+     353      354      355      356      357      358      359      360 
+ 0.69050  3.48721  2.95850  1.00004  0.01680  0.20930  0.26838  0.98844 
+     361      362      363      364      365      366      367      368 
+-0.31784 -0.74945 -0.83820  3.96334 -0.01280  0.36546  0.52671  3.60177 
+     369      370      371      372      373      374      375      376 
+ 1.87550  0.80555  2.65350  0.92004  0.04150  0.49596  0.45005  1.47178 
+     377      378      379      380      381      382      383      384 
+ 1.07217 -2.97612  1.36180  4.64501  0.00218  0.07096  0.65171  1.89844 
+     385      386      387      388      389      390      391      392 
+ 0.38883 -0.00445  4.29680  1.05834  0.02574  0.38880  0.04338  1.35511 
+     393      394      395      396      397      398      399      400 
+ 0.38883 -0.38279  3.70013 -0.94999 -0.02653  0.07113  0.43838 -0.01156 
+     401      402      403      404      405      406      407      408 
+ 1.70883  0.63721 -2.18320  0.88834  0.00904  0.17880  0.54671  0.44511 
+     409      410      411      412 
+ 2.22216 -2.03445  1.99350  0.05004 
+attr(,"std")
+  [1]     NA     NA     NA     NA     NA 2.0514 3.0228 3.7679 4.1905 4.3895
+ [11] 0.0575 0.1274 0.2786 0.5909 1.1714 2.0514 3.0228 4.1905 4.3895 0.0575
+ [21] 0.1274 0.2786 0.5909 1.1714 2.0514 3.0228 3.7679 4.1905 4.3895 0.0575
+ [31] 0.1274 0.2786 0.5909 1.1714 2.0514 3.0228 3.7679 4.1905 4.3895 0.0575
+ [41] 0.1274 0.2786 0.5909 1.1714 2.0514 3.0228 4.1905 0.0575 0.1274 0.2786
+ [51] 0.5909 1.1714 2.0514 3.0228 3.7679 4.1905 4.3895 0.0575 0.1274 0.2786
+ [61] 0.5909 1.1714 2.0514 3.0228 4.1905 4.3895 0.0575 0.1274 0.2786 0.5909
+ [71] 1.1714 2.0514 3.0228 3.7679 4.1905 4.3895 0.0575 0.1274 0.2786 0.5909
+ [81] 1.1714 2.0514 3.0228 3.7679 4.1905 4.3895 0.0575 0.1274 0.2786 0.5909
+ [91] 1.1714 2.0514 3.0228 3.7679 4.1905 4.3895 0.0575 0.1274 0.2786 0.5909
+[101] 1.1714 2.0514 3.0228 3.7679 4.1905 4.3895 0.0575 0.1274 0.2786 0.5909
+[111] 1.1714 2.0514 3.0228 3.7679 4.1905 4.3895 0.0575 0.1274 0.2786 0.5909
+[121] 1.1714 2.0514 3.0228 3.7679 4.1905 4.3895 0.0575 0.1274 0.2786 0.5909
+[131] 1.1714 2.0514 3.0228 3.7679 4.1905 4.3895 0.0575 0.1274 0.2786 0.5909
+[141] 1.1714 2.0514 3.0228 3.7679 4.1905 4.3895 0.0575 0.1274 0.2786 0.5909
+[151] 1.1714 2.0514 3.0228 3.7679 4.1905 4.3895 0.0575 0.1137 0.2495 0.5324
+[161] 1.0689 2.8919 4.1469 4.4749 0.0575 0.1137 0.2495 0.5324 1.0689 2.8919
+[171] 4.1469 4.4749 0.0575 0.1137 0.2495 0.5324 1.0689 2.8919 4.1469 4.4749
+[181] 0.0575 0.1137 0.2495 0.5324 1.0689 2.8919 4.1469 4.4749 0.0575 0.1137
+[191] 0.2495 0.5324 1.0689 2.8919 4.1469 4.4749 0.0575 0.1137 0.2495 0.5324
+[201] 1.0689 2.8919 4.1469 4.4749 0.0575 0.1137 0.2495 0.5324 1.0689 2.8919
+[211] 4.1469 4.4749 0.0575 0.1137 0.2495 0.5324 1.0689 2.8919 4.1469 4.4749
+[221] 0.0575 0.1137 0.2495 0.5324 1.0689 2.8919 4.1469 4.4749 0.0575 0.1137
+[231] 0.2495 0.5324 1.0689 2.8919 4.1469 4.4749 0.0575 0.1137 0.2495 0.5324
+[241] 1.0689 2.8919 4.1469 4.4749 0.0575 0.1137 0.2495 0.5324 1.0689 2.8919
+[251] 4.1469 4.4749 0.0575 0.1137 0.2495 0.5324 1.0689 2.8919 4.1469 4.4749
+[261] 0.0575 0.1137 0.2495 0.5324 1.0689 2.8919 4.1469 4.4749 0.0575 0.1137
+[271] 0.2495 0.5324 1.0689 2.8919 4.1469 4.4749 0.0575 0.1137 0.2495 0.5324
+[281] 1.0689 2.8919 4.1469 4.4749 0.0644 0.1596 0.3469 0.7251 1.2806 2.3348
+[291] 3.8468 4.4219 0.0644 0.1596 0.3469 0.7251 1.2806 2.3348 3.8468 4.4219
+[301] 0.0644 0.1596 0.3469 0.7251 1.2806 2.3348 3.8468 4.4219 0.0644 0.1596
+[311] 0.3469 0.7251 1.2806 2.3348 3.8468 4.4219 0.0644 0.1596 0.3469 0.7251
+[321] 1.2806 2.3348 3.8468 4.4219 0.0644 0.1596 0.3469 0.7251 1.2806 2.3348
+[331] 3.8468 4.4219 0.0644 0.1596 0.3469 0.7251 1.2806 2.3348 3.8468 4.4219
+[341] 0.0644 0.1596 0.3469 0.7251 1.2806 2.3348 3.8468 4.4219 0.0644 0.1596
+[351] 0.3469 0.7251 1.2806 2.3348 3.8468 4.4219 0.0644 0.1596 0.3469 0.7251
+[361] 1.2806 2.3348 3.8468 4.4219 0.0644 0.1596 0.3469 0.7251 1.2806 2.3348
+[371] 3.8468 4.4219 0.0644 0.1596 0.3469 0.7251 1.2806 2.3348 3.8468 4.4219
+[381] 0.0644 0.1596 0.3469 0.7251 1.2806 2.3348 3.8468 4.4219 0.0644 0.1596
+[391] 0.3469 0.7251 1.2806 2.3348 3.8468 4.4219 0.0644 0.1596 0.3469 0.7251
+[401] 1.2806 2.3348 3.8468 4.4219 0.0644 0.1596 0.3469 0.7251 1.2806 2.3348
+[411] 3.8468 4.4219
+attr(,"label")
+[1] "Residuals (g)"
+> summary(fm3)
+Generalized nonlinear least squares fit
+  Model: weight ~ SSlogis(Time, Asym, xmid, scal) 
+  Data: Soybean 
+  AIC  BIC logLik
+  987 1007   -489
+
+Variance function:
+ Structure: Power of variance covariate
+ Formula: ~fitted(.) 
+ Parameter estimates:
+power 
+0.878 
+
+Coefficients:
+     Value Std.Error t-value p-value
+Asym  17.4     0.525    33.1       0
+xmid  51.9     0.598    86.8       0
+scal   7.6     0.142    54.0       0
+
+ Correlation: 
+     Asym  xmid 
+xmid 0.788      
+scal 0.488 0.842
+
+Standardized residuals:
+    Min      Q1     Med      Q3     Max 
+-2.3066 -0.6545 -0.0019  0.5012  4.9676 
+
+Residual standard error: 0.369 
+Degrees of freedom: 407 total; 404 residual
+> 
+> options(op)# revert when this file is source()d
+> 
+> proc.time()
+   user  system elapsed 
+  0.302   0.033   0.399 
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/coef.Rout.save
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/coef.Rout.save	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/coef.Rout.save	(revision 2477)
@@ -0,0 +1,72 @@
+
+R Under development (unstable) (2016-02-26 r70230) -- "Unsuffered Consequences"
+Copyright (C) 2016 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
+
+R is free software and comes with ABSOLUTELY NO WARRANTY.
+You are welcome to redistribute it under certain conditions.
+Type 'license()' or 'licence()' for distribution details.
+
+R is a collaborative project with many contributors.
+Type 'contributors()' for more information and
+'citation()' on how to cite R or R packages in publications.
+
+Type 'demo()' for some demos, 'help()' for on-line help, or
+'help.start()' for an HTML browser interface to help.
+Type 'q()' to quit R.
+
+> ## tests of fix for PR#9831
+> library(nlme)
+> val <- c("10"=1.10,"14"=1.14)
+> vf <- varIdent(value=val, form=~1|age, fixed=c("12"=1.12))
+> vfi <- Initialize(vf,Orthodont)
+> vfi
+Variance function structure of class varIdent representing
+   8   10   14   12 
+1.00 1.10 1.14 1.12 
+> str(vfi)
+Classes 'varIdent', 'varFunc'  atomic [1:2] 0.0953 0.131
+  ..- attr(*, "groupNames")= chr [1:4] "8" "10" "14" "12"
+  ..- attr(*, "fixed")= Named num 0.113
+  .. ..- attr(*, "names")= chr "12"
+  ..- attr(*, "formula")=Class 'formula'  language ~1 | age
+  .. .. ..- attr(*, ".Environment")=<environment: R_GlobalEnv> 
+  ..- attr(*, "groups")= chr [1:108] "8" "10" "12" "14" ...
+  ..- attr(*, "whichFix")= logi [1:3] FALSE FALSE TRUE
+  ..- attr(*, "weights")= Named num [1:108] 1 0.909 0.893 0.877 1 ...
+  .. ..- attr(*, "names")= chr [1:108] "8" "10" "12" "14" ...
+  ..- attr(*, "logLik")= num -9.17
+> stopifnot(
++     all.equal(coef(vfi), c(0.0953101798043, 0.131028262406)),
++     all.equal(coef(vfi, unconstrained = FALSE, allCoef = TRUE),
++               c("8" = 1, "10" = 1.1, "14" = 1.14, "12" = 1.12)))
+> 
+> vfiCopy <- vfi        # copy of an initialized object
+> length(vfiCopy)             # length is 2
+[1] 2
+> coef(vfiCopy) <- c(11,12)   # error in 3.1-84
+> stopifnot(identical(coef(vfiCopy), c(11,12)))
+> 
+> ## error in 3.1-84
+> (gls. <- gls(distance ~ age, weights = vfi, data=Orthodont))
+Generalized least squares fit by REML
+  Model: distance ~ age 
+  Data: Orthodont 
+  Log-restricted-likelihood: -253.4207
+
+Coefficients:
+(Intercept)         age 
+  16.746600    0.659796 
+
+Variance function:
+ Structure: Different standard deviations per stratum
+ Formula: ~1 | age 
+ Parameter estimates:
+       8       10       14       12 
+1.000000 0.872009 1.121849 1.120000 
+Degrees of freedom: 108 total; 106 residual
+Residual standard error: 2.453257 
+> 
+> proc.time()
+   user  system elapsed 
+  0.192   0.027   0.207 
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/data.frame.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/data.frame.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/data.frame.R	(revision 2477)
@@ -0,0 +1,5 @@
+library(nlme)
+subs <- rep(LETTERS[1:10],rep(3,10))
+set.seed(101)# make reproducible
+resp <- rnorm(30)
+groupedData(resp ~ 1|subs)
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/lme.Rout.save
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/lme.Rout.save	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/lme.Rout.save	(revision 2477)
@@ -0,0 +1,187 @@
+
+R Under development (unstable) (2016-05-02 r70575) -- "Unsuffered Consequences"
+Copyright (C) 2016 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
+
+R is free software and comes with ABSOLUTELY NO WARRANTY.
+You are welcome to redistribute it under certain conditions.
+Type 'license()' or 'licence()' for distribution details.
+
+R is a collaborative project with many contributors.
+Type 'contributors()' for more information and
+'citation()' on how to cite R or R packages in publications.
+
+Type 'demo()' for some demos, 'help()' for on-line help, or
+'help.start()' for an HTML browser interface to help.
+Type 'q()' to quit R.
+
+> library(nlme)
+> 
+> options(digits = 6)# <==> less platform dependency in print() output
+> if(!dev.interactive(orNone=TRUE)) pdf("test_lme.pdf")
+> 
+> fm1 <- lmList(Oxboys)
+> fm1
+Call:
+  Model: height ~ age | Subject 
+   Data: Oxboys 
+
+Coefficients:
+   (Intercept)     age
+10     130.262 3.72291
+26     137.993 5.58878
+25     139.210 4.02408
+9      138.137 6.00906
+2      142.858 5.44018
+6      146.791 3.96317
+7      146.128 4.99005
+17     142.978 8.61178
+16     147.545 4.54520
+15     144.276 7.12426
+8      148.293 6.46471
+20     151.471 4.37447
+1      148.120 7.17815
+18     151.180 5.95779
+5      151.429 6.24613
+23     151.065 7.18512
+11     150.047 8.50608
+21     150.521 7.49779
+3      155.651 4.77467
+24     153.140 6.76470
+22     154.567 8.08751
+12     156.811 7.01547
+13     156.071 8.49381
+14     159.474 8.67089
+19     164.576 9.06562
+4      165.072 9.36056
+
+Degrees of freedom: 234 total; 182 residual
+Residual standard error: 0.659888
+> fm2 <- lme(fm1)
+> fm2
+Linear mixed-effects model fit by REML
+  Data: Oxboys 
+  Log-restricted-likelihood: -362.045
+  Fixed: height ~ age 
+(Intercept)         age 
+  149.37175     6.52547 
+
+Random effects:
+ Formula: ~age | Subject
+ Structure: General positive-definite, Log-Cholesky parametrization
+            StdDev   Corr  
+(Intercept) 8.081077 (Intr)
+age         1.680717 0.641 
+Residual    0.659889       
+
+Number of Observations: 234
+Number of Groups: 26 
+> vc2 <- VarCorr(fm2)
+> stopifnot(
++     all.equal(fixef(fm2), c("(Intercept)" = 149.371753,
++                             age = 6.52546866), tol=1e-8),
++     all.equal(as.numeric(vc2[,"StdDev"]),
++               c(8.081077, 1.680717, 0.659889), tol=4e-7))
+> 
+> # bug report from Arne.Mueller@sanofi-aventis.com
+> mod <- distance ~ age + Sex
+> fm3 <- lme(mod, Orthodont, random = ~ 1)
+> pm3 <- predict(fm3, Orthodont)
+> stopifnot(all.equal(mean(pm3), 24.023148148),
++ 	  all.equal(  sd(pm3), 2.4802195115),
++ 	  all.equal(quantile(pm3), c("0%"  = 17.0817792, "25%" = 22.3481813,
++ 				     "50%" = 23.9271016, "75%" = 25.5740014,
++ 				     "100%"= 30.8662241)))
+> 
+> 
+> ## bug report and fix from Dimitris Rizopoulos and Spencer Graves:
+> ## when 'returnObject = TRUE', do not stop() but give warning() on non-convergence:
+> tools::assertWarning(
++ fm1 <- lme(distance ~ age, data = Orthodont,
++ 	   control = lmeControl(msMaxIter = 1, returnObject = TRUE))
++ )
+> 
+> ## based on bug report on R-help
+> (p3.1 <- predict(fm3, Orthodont[1,]))
+    M01 
+25.3924 
+attr(,"label")
+[1] "Predicted values (mm)"
+> # failed in 3.1-88
+> stopifnot(all.equal(pm3[1], p3.1,
++ 		    check.attributes=FALSE, tolerance = 1e-14))
+> 
+> ## Intervals failed in a patch proposal (Nov.2015):
+> (fm4 <- lme(distance ~ age, Orthodont, random = ~ age | Subject))
+Linear mixed-effects model fit by REML
+  Data: Orthodont 
+  Log-restricted-likelihood: -221.318
+  Fixed: distance ~ age 
+(Intercept)         age 
+  16.761111    0.660185 
+
+Random effects:
+ Formula: ~age | Subject
+ Structure: General positive-definite, Log-Cholesky parametrization
+            StdDev   Corr  
+(Intercept) 2.327034 (Intr)
+age         0.226428 -0.609
+Residual    1.310040       
+
+Number of Observations: 108
+Number of Groups: 27 
+> i4 <- intervals(fm4)
+> ## from  dput(signif(i4$reStruct$Subject, 8))
+> ## R-devel 2016-01-11; 64-bit :
+> reSS <- data.frame(lower = c(0.9485605, 0.10250901, -0.93825047),
++                    est.  = c(2.3270341, 0.22642779, -0.60933286),
++                    upper = c(5.7087424, 0.50014674,  0.29816857))
+> ## R-devel 2016-01-11; 32-bit :
+> ## reSS <- data.frame(lower = c(0.94962127,0.10262181, -0.93804767),
+> ##                    est.  = c(2.3270339, 0.22642779, -0.60933284),
+> ##                    upper = c(5.7023648, 0.49959695,  0.29662651))
+> rownames(reSS) <- rownames(i4$reStruct$Subject)
+> sm4 <- summary(fm4)
+> stopifnot(
++     all.equal(fixef(fm4),
++               c("(Intercept)" = 16.761111, age = 0.66018519)),
++     identical(fixef(fm4), sm4$tTable[,"Value"]),
++     all.equal(sm4$tTable[,"Std.Error"],
++               c("(Intercept)" = 0.77524603, age = 0.071253264), tol=6e-8),
++     all.equal(i4$reStruct$Subject[,"est."], reSS[,"est."], tol= 1e-7)
++     ## (lower, upper) cannot be very accurate for these : ==> tol = *e-4
++    ,## "interestingly" 32-bit values changed from 3.2.3 to R-devel(3.3.0):
++     all.equal(i4$reStruct$Subject[,c(1,3)], reSS[,c(1,3)], tol = .005)
++    ,
++     all.equal(as.vector(i4$sigma),
++               ##  lower     est.        upper
++               c(1.0849772, 1.3100397, 1.5817881), tol=8e-4)
++    ,
++     all.equal(as.vector(i4$fixed),
++               as.vector(rbind(c(15.218322, 16.761111, 18.3039),
++                               c(0.51838667, 0.66018519, 0.8019837))),
++               tol = 1e-6)
++ )
+> 
+> 
+> ## wrong results from getData:
+> load("ss2.rda")
+> m1 <- lme(PV1MATH ~  ESCS + Age +time ,
++           random = ~   time|SCHOOLID,
++           data = ss2,
++           weights = varIdent(form=~1|time),
++           corr = corCompSymm(form=~1|SCHOOLID/StIDStd),
++           na.action = na.omit)
+> plot(m1, resid(.) ~ WEALTH)
+> 
+> m2 <- lme(PV1MATH ~  ESCS + Age +time ,
++           random = ~   time|SCHOOLID,
++           data = ss2,
++           weights = varIdent(form=~1|time),
++           corr = corCompSymm(form=~1|SCHOOLID/StIDStd),
++           na.action = na.omit)
+> plot(m2, resid(.) ~ WEALTH)
+> 
+> proc.time()
+   user  system elapsed 
+  1.900   0.087   2.040 
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/lmList.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/lmList.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/lmList.R	(revision 2477)
@@ -0,0 +1,11 @@
+## PR#13788
+
+library(nlme)
+qm <-  lmList(height ~ age | Subject, data = Oxboys)
+nd <- with(Oxboys,
+           expand.grid(age = seq(min(age),max(age),length=50),
+                       Subject = levels(Subject))
+           )
+
+## failed in 3.1-92
+res <- predict(qm, nd, se=TRUE)
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/augPred_lab.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/augPred_lab.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/augPred_lab.R	(revision 2477)
@@ -0,0 +1,84 @@
+library(nlme)
+if(require("Hmisc")) {
+    T.aug <- Orthodont
+    label(T.aug$age) <- 'anyL'
+    foo <- augPred(lme(distance ~ age, random = ~1|Subject, data=T.aug))
+    ## failed in 3.1-72
+}
+
+## failed even if there is a variable with a class that is not being used.
+T.aug <- Orthodont
+T.aug$newage <- T.aug$age
+class(T.aug$newage) <- 'anyC'
+foo <- augPred(lme(distance ~ age, random = ~1|Subject, data=T.aug))
+## failed in 3.1-72
+
+## [Bug 16715] New: nlme: unable to use  predict and augPredict functions in non linear mixed models
+## Date: Wed, 17 Feb 2016
+
+M1.lis <- nlsList( SSlogis, data=Soybean)
+## prints "Error in qr.solve(QR.B, cc): singular matrix 'a' in solve"
+## ==> MM: 2016-03-11 "fixed": now prints it as warning [you could suppress or catch]
+## ==> one NA row '1989P8' in this:
+M1.lis
+##  Nonlinear Logistic Growth -- each of the 3 par. (Asym, xmid, scal) has RE term
+##  Model: weight ~ SSlogis(Time, Asym, xmid, scal) | Plot
+
+M1.nlme <- nlme( M1.lis )
+summary(M1.nlme)
+## R 3.2.2 (nlme 3.1-121) :
+## Nonlinear mixed-effects model fit by maximum likelihood
+##   Model: weight ~ SSlogis(Time, Asym, xmid, scal)
+##  Data: Soybean
+##        AIC      BIC    logLik
+##   1499.671 1539.881 -739.8354
+
+## Random effects:
+##  Formula: list(Asym ~ 1, xmid ~ 1, scal ~ 1)
+##  Level: Plot
+##  Structure: General positive-definite, Log-Cholesky parametrization
+##          StdDev   Corr
+## Asym     5.201186 Asym  xmid
+## xmid     4.197467 0.721
+## scal     1.404737 0.711 0.958
+## Residual 1.123461
+
+## Fixed effects: list(Asym ~ 1, xmid ~ 1, scal ~ 1)
+##         Value Std.Error  DF  t-value p-value
+## Asym 19.25301 0.8031921 362 23.97062       0
+## xmid 55.01985 0.7272721 362 75.65235       0
+## scal  8.40333 0.3152893 362 26.65276       0
+##  Correlation:
+##      Asym  xmid
+## xmid 0.724
+## scal 0.620 0.807
+
+## Standardized Within-Group Residuals:
+##         Min          Q1         Med          Q3         Max
+## -6.08691772 -0.22160816 -0.03390491  0.29741145  4.84688248
+
+## Number of Observations: 412
+## Number of Groups: 48
+
+M1.Fix <- fixef(M1.nlme)
+## add fixed effect 'Variety' :
+M2.nlme <- update(M1.nlme, fixed = Asym + xmid + scal ~ Variety,
+                  start = c(M1.Fix[1], 1, M1.Fix[2], 1, M1.Fix[3], 1))
+summary(M2.nlme)
+pred.m2 <- predict(M2.nlme, level = 0:1)
+stopifnot(is.data.frame(pred.m2), dim(pred.m2) == c(412, 3))
+
+augp.m2 <- augPred(M2.nlme, level = 0:1)
+## failed in nlme-3.1-124/5
+
+stopifnot(is.data.frame(augp.m2), dim(augp.m2) == c(5308, 4)
+          ,
+          all.equal(colMeans(augp.m2[,c("Time","weight")]),
+                    c(Time = 48.585908, weight =7.8599693), tolerance = 1e-7)# 2e-9
+          ,
+          identical(c(table(augp.m2[,".type"])),
+                    c(predict.fixed = 2448L, predict.Plot = 2448L, original = 412L))
+          ,
+          identical(c(table(as.vector(table(augp.m2[,".groups"])))),
+                    c("110" = 33L, "111" = 2L, "112" = 13L))
+)
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/sigma-fixed-etc.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/sigma-fixed-etc.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/sigma-fixed-etc.R	(revision 2477)
@@ -0,0 +1,418 @@
+#### Testing Examples --- related to the new  "sigma = fixed" feature
+#### ================================================================
+
+## library(nlme,lib.loc=lib.loc)
+library(nlme)
+
+## possibly move to ../R/ or ../inst/ if used in more places
+doExtras <- function ()
+{
+    interactive() || nzchar(Sys.getenv("R_nlme_check_extra")) ||
+        identical("true", unname(Sys.getenv("R_PKG_CHECKING_doExtras")))
+}
+doExtras()
+
+##===   example 1 general linear model page 251  gls ML  and LME ================
+##
+ex <- "ex1_gls_page251"; .pt <- proc.time()
+##
+cat("\n example ", ex,"\n")
+sigma <- 2
+cat("\nFixed sigma= ",sigma,"  estimation method 'ML'\n")
+t1.fix.ML.gls <- gls(distance ~ Sex *I(age-11), data = Orthodont,
+                     correlation = corSymm(form = ~1 | Subject),
+                     weights = varIdent(form = ~1 |age),
+                     control = glsControl(sigma = sigma),
+                     method = "ML")
+(s1M <- summary(t1.fix.ML.gls))
+(a1M <-   anova(t1.fix.ML.gls)) # sequential
+(a1Mm<-   anova(t1.fix.ML.gls, type = "marginal"))
+## t_{n} ^2  ==  F_{1,n}:
+stopifnot(all.equal(as.vector(s1M$tTable[,"t-value"] ^ 2),
+                    a1Mm[,"F-value"], tolerance = 1e-14))
+
+##
+cat("\nFixed sigma= ",sigma,"  estimation method 'REML'\n")
+t1.fix.REML.gls <- gls(distance ~ Sex*I(age-11), data = Orthodont,
+                       correlation = corSymm(form = ~1 | Subject),
+                       weights = varIdent(form = ~1 |age),
+                       control = glsControl(sigma = sigma,
+                                            maxIter = 1000, msMaxIter = 200),
+                       method = "REML")
+(s1R <- summary(t1.fix.REML.gls))
+(a1R  <-   anova(t1.fix.REML.gls))
+(a1Rm <-   anova(t1.fix.REML.gls, type="marginal"))
+intervals(t1.fix.REML.gls) # now work (via 'apVar')
+## t_{n} ^2  ==  F_{1,n}:
+stopifnot(all.equal(as.vector(s1R$tTable[,"t-value"] ^ 2),
+                    a1Rm[,"F-value"], tolerance = 1e-14))
+
+cat("Time elapsed: ", (proc.time() - .pt)[1:3], "\n")
+
+##===   example 2  linear mixed model page 147  lme ML  and REML ================
+ex <- "ex2_lme_page147"; .pt <- proc.time()
+##
+cat("\n example ", ex,"\n")
+##
+method <- "ML"
+sigma <- 1
+cat("\nFixed sigma= ",sigma,"  estimation method ", method,"\n")
+t1.fix.ML.lme <- lme(distance ~ I(age-11), data = Orthodont,
+                     control = lmeControl(sigma = sigma),
+                     method = method)
+ summary (t1.fix.ML.lme)
+   anova (t1.fix.ML.lme)
+intervals(t1.fix.ML.lme)
+
+
+method <- "REML"
+cat("\nFixed sigma= ",sigma,"  estimation method ", method,"\n")
+t1.fix.REML.lme <- lme(distance ~ I(age-11), data = Orthodont,
+                       control = lmeControl(sigma = sigma), method = method)
+ summary (t1.fix.REML.lme)
+   anova (t1.fix.REML.lme)
+intervals(t1.fix.REML.lme)
+cat("Time elapsed: ", (proc.time() - .pt)[1:3], "\n")
+
+##===   example 3  general non-linear  model page 402/ page 512  gnls ls ========
+ex <- "ex3_gnls_page402"; .pt <- proc.time()
+##
+cat("\n example ", ex,"\n")
+##
+method <- "LS"
+sigma <- 1
+cat("\nFixed sigma= ",sigma,"  estimation method ", method,"\n")
+t1.fix.gnls <- gnls( rate ~SSasympOff(pressure, Asym, lrc, c0), data = Dialyzer,
+                    params = list(Asym + lrc ~ QB, c0 ~ 1),
+                    start = c(53.6,8.6,0.51,-0.26, 0.225),
+                    control = gnlsControl(sigma = 1))
+stopifnot(is.null(t1.fix.gnls$apVar)) ## as is has  *no*  varying ranef-parameters
+ summary (t1.fix.gnls)
+   anova (t1.fix.gnls)
+cat("Time elapsed: ", (proc.time() - .pt)[1:3], "\n"); .pt <- proc.time()
+t1.fix.w <- update(t1.fix.gnls, weights = varPower())
+ summary (t1.fix.w)
+   anova (t1.fix.w)
+(it1fw <- intervals(t1.fix.w))
+stopifnot(all.equal(it1fw$varStruct["power",],
+		    c(lower = 0.33147895,
+		      est.  = 0.36474755,
+		      upper = 0.39801614), tol = 1e-6))
+cat("Time elapsed: ", (proc.time() - .pt)[1:3], "\n")
+
+##===   example 4  mixed non-linear  model  page 363 nlme =======================
+ex <- "ex4_nlme_page363"; .pt <- proc.time()
+##
+cat("\n example ", ex,"\n")
+method <- "ML"
+cat("\nVariable sigma; estimation method ", method,"\n")
+t1.ML.nlme <- nlme(conc ~ SSfol(Dose, Time, lKe, lKa, lCl), data = Theoph,
+                   fixed = lKe + lKa + lCl ~ 1,
+                   method = method, start = c(-2.4,0.45,-3.2))
+## default control, no fixed sigma
+t1.ML.nlme$numIter # 23 (32-bit)
+stopifnot(all.equal(as.vector(t1.ML.nlme$sigma), 0.6818253, tol = 1e-5))
+
+sigma <- 0.7
+cat("\nFixed sigma= ",sigma,"  estimation method ", method,"\n")
+set.seed(44)
+system.time(# *not* fast :
+t1.fix.ML.nlme <- nlme(conc ~ SSfol(Dose, Time, lKe, lKa, lCl), data = Theoph,
+                       fixed = lKe + lKa + lCl ~ 1,
+                       method = method, start = c(-2.4,0.45,-3.2),
+                       control = nlmeControl(sigma=sigma, maxIter = 200),
+                       verbose = interactive())
+)
+t1.fix.ML.nlme$numIter # 58 or 61 (and now 22)..
+(sM4 <- summary(t1.fix.ML.nlme))
+(aM4 <- anova  (t1.fix.ML.nlme))
+t1.fix.ML.nlme$apVar ## "Non-positive definite approximate variance-covariance"
+##(iM4 <- intervals(t1.fix.ML.nlme))
+stopifnot(
+    all.equal(fixef(t1.fix.ML.nlme),
+              c(lKe = -2.432512, lKa = 0.450163, lCl = -3.2144713), tol= 8e-6)
+    ,
+    all.equal(sM4$tTable[,"Std.Error"],
+              c(lKe = 0.0640155, lKa = 0.196058, lCl = 0.0808379), tol = 5e-5)
+    ,
+    all.equal(aM4[,"F-value"],
+              c(65.439, 9.09557, 1581.21), tol = 5e-5)
+)
+
+##
+##   REML method
+if(doExtras()) { ## -- takes 2--3 minutes
+method <- "REML"
+sigma <- 0.7
+cat("\nFixed sigma= ", sigma,"  estimation method ", method,"\n")
+##
+## only converges when tolerance is not small (and still takes long!) :
+t1.fix.REML.nlme <- update(t1.fix.ML.nlme, method = method,
+                           control = nlmeControl(tolerance = 0.0005,
+                                                 sigma=sigma,
+                                                 pnlsMaxIter = 20, # not just 7
+                                                 maxIter = 1000),
+                           verbose = interactive())
+cat(" -> numIter: ", t1.fix.REML.nlme$numIter, "\n") # 380 or so
+print(summary(t1.fix.REML.nlme))
+print( anova(t1.fix.REML.nlme))
+it1.fRn <- try( intervals(t1.fix.REML.nlme) ) ## cannot get .. Non-positive ...
+}# only if(doExtras())
+
+cat("Time elapsed: ", (proc.time() - .pt)[1:3], "\n")
+
+##===   example 5  mixed non-linear  model  page 358 nlme =======================
+##
+##
+ex <- "ex5_nlme_page365"; .pt <- proc.time()
+cat("\n example ", ex,"\n")
+##
+method <- "ML"
+sigma <- 1
+cat("\nFixed sigma= ",sigma,"  estimation method ", method,"\n")
+t5.fix.ML.nlme <- nlme(circumference ~ SSlogis(age,Asym,xmid,scal), data = Orange,
+                       fixed = Asym + xmid + scal ~ 1,
+                       method = method, start = c(192,727,356),
+                       control = nlmeControl(sigma = sigma))
+(sM5 <- summary(t5.fix.ML.nlme))
+(aM5 <- anova  (t5.fix.ML.nlme))
+(t5.fix.ML.nlme$apVar) ## Non-positive definite  [FIXME?]
+stopifnot(
+    all.equal(fixef(t5.fix.ML.nlme),
+              c(Asym= 192.79023, xmid= 726.36351, scal= 355.62941), tol= 1e-7)
+    ,
+    all.equal(sM5$tTable[,"Std.Error"],
+              c(Asym= 14.1688, xmid= 35.3425, scal=16.3637), tol = 5e-5)
+    ,
+    all.equal(aM5[,"F-value"],
+              c(4879.5, 208.534, 472.316), tol = 5e-5)
+)
+
+## REML method
+method <-"REML"
+cat("\nFixed sigma= ",sigma,"  estimation method ", method,"\n")
+t5.fix.REML.nlme <- update(t5.fix.ML.nlme, method = method,
+                           control = nlmeControl(sigma=sigma),
+                           verbose = interactive())
+## converges very quickly (when started from ML!)
+(sR5 <- summary(t5.fix.REML.nlme))
+(aR5 <- anova  (t5.fix.REML.nlme))
+(               t5.fix.REML.nlme$apVar) ## Non-positive definite  [FIXME?]
+stopifnot(
+    ## ML and REML : fixed effects are very close
+    all.equal(fixef(t5.fix.REML.nlme), fixef(t5.fix.ML.nlme), tol = 1e-6)
+    ,
+    all.equal(sR5$tTable[,"Std.Error"],
+              c(Asym= 13.548, xmid= 33.794, scal=15.6467), tol = 5e-5)
+    ,
+    all.equal(aR5[,"F-value"],
+              c(5336.29, 228.076, 516.594), tol = 5e-5)
+)
+cat("Time elapsed: ", (proc.time() - .pt)[1:3], "\n")
+
+##===   example 6  linear mixed model page 177  lme ML  and REML ================
+##
+ex <- "ex6_lme_page177"; .pt <- proc.time()
+cat("\n example ", ex,"\n")
+##
+method <- "ML"
+sigma <- 1
+cat("\nFixed sigma= ",sigma,"  estimation method ", method,"\n")
+t6.fix.ML.lme <- lme(distance ~ I(age-11), data = Orthodont,
+                     weights = varIdent(form = ~1 | Sex),
+                     method = method,
+                     control = lmeControl(sigma = sigma))
+(sM6 <-  summary (t6.fix.ML.lme))
+(aM6 <-   anova  (t6.fix.ML.lme))
+(iM6 <- intervals(t6.fix.ML.lme))
+stopifnot(
+    all.equal(fixef(t6.fix.ML.lme),
+              c("(Intercept)"= 24.009565, "I(age - 11)"= 0.64760432), tol= 1e-7)
+    ,
+    all.equal(sM6$tTable[,"Std.Error"],
+              c("(Intercept)"= 0.426561, "I(age - 11)"= 0.066832), tol = 5e-5)
+    ,
+    all.equal(aM6[,"F-value"], c(3162.47, 93.8969), tol = 5e-5)
+    ,
+    all.equal(iM6$varStruct["Female",],
+	      c(lower = 0.51230063,
+		est.  = 0.65065925,
+		upper = 0.82638482), tol = 5e-5)
+)
+
+##-------------
+method <- "REML"
+sigma <- 1
+cat("\nFixed sigma= ",sigma,"  estimation method ", method,"\n")
+
+t6.fix.REML.lme <- lme(distance ~I(age-11), data = Orthodont,
+                       weights = varIdent(form = ~1 | Sex),
+                       method = method,
+                       control = lmeControl(sigma = sigma))
+(sR6 <-  summary (t6.fix.REML.lme))
+(aR6 <-   anova  (t6.fix.REML.lme))
+(iR6 <- intervals(t6.fix.REML.lme))
+stopifnot(
+    all.equal(fixef(t6.fix.REML.lme),
+              c("(Intercept)"= 24.010662, "I(age - 11)"= 0.64879966), tol= 1e-7)
+    ,
+    all.equal(sR6$tTable[,"Std.Error"],
+              c("(Intercept)"= 0.436365, "I(age - 11)"= 0.0687549), tol = 5e-5)
+    ,
+    all.equal(aR6[,"F-value"], c(3019.86, 89.046), tol = 5e-5)
+    ,
+    all.equal(iR6$varStruct["Female",],
+	      c(lower = 0.51774671,
+		est.  = 0.66087796,
+		upper = 0.8435779), tol = 5e-5)
+)
+cat("Time elapsed: ", (proc.time() - .pt)[1:3], "\n")
+
+##===   example 7  linear mixed model page 172  lme ML  and REML ================
+ex <- "ex7_lme_page172"; .pt <- proc.time()
+
+cat("\n example ", ex,"\n")
+method <- "ML"
+sigma <- 1
+cat("\nFixed sigma= ",sigma,"  estimation method ", method,"\n")
+set.seed(107)
+t7.fix.ML.lme <- lme( current ~ voltage + I(voltage^2), data = Wafer,
+                     random = list(Wafer = pdDiag(~voltage + I(voltage^2)),
+                                   Site  = pdDiag(~voltage + I(voltage^2)) ),
+                     method = method,
+                     control = lmeControl(sigma = 1,
+                                          ## nlminb: false convergence on 32-bit
+                                          msVerbose = TRUE, opt = "optim"))
+(ss7 <- summary(t7.fix.ML.lme))
+(aa7 <- anova(t7.fix.ML.lme))
+stopifnot(
+    all.equal(fixef(t7.fix.ML.lme),
+              c("(Intercept)" = -4.4611657, "voltage" = 5.9033709,
+                "I(voltage^2)" = 1.1704027), tol = 1e-7)
+    ,
+    all.equal(ss7$tTable[,"Std.Error"],
+              c("(Intercept)" = 0.446086, "voltage" = 0.608571,
+                "I(voltage^2)"= 0.187459), tol = 5e-5)
+    ,
+    all.equal(aa7[,"F-value"],
+              c(2634.2137, 8851.0513, 38.981463), tol = 5e-5)
+          )
+##------------------------------------------------------ REML ---
+method <- "REML"
+cat("\nFixed sigma= ",sigma,"  estimation method ", method,"\n")
+t7.fix.REML.lme <- lme( current ~voltage + I(voltage^2), data = Wafer,
+                       random = list(Wafer = pdDiag(~voltage + I(voltage^2)),
+                                     Site  = pdDiag(~voltage + I(voltage^2)) ),
+                       control = lmeControl(sigma = 1),
+                       method = method)
+(sR7 <- summary(t7.fix.REML.lme))
+(aR7 <-   anova(t7.fix.REML.lme))
+stopifnot(
+    all.equal(fixef(t7.fix.REML.lme), fixef(t7.fix.ML.lme),
+              ## should not change much from ML to REML !
+              tol = 1e-6)
+    ,
+    all.equal(sR7$tTable[,"Std.Error"],
+              c("(Intercept)" = 0.44441, "voltage" = 0.606321,
+                "I(voltage^2)"= 0.186754), tol = 5e-5)
+    ,
+    all.equal(aR7[,"F-value"],
+              c(2575.3253, 8880.9144, 39.276122), tol = 1e-6)
+          )
+cat("Time elapsed: ", (proc.time() - .pt)[1:3], "\n")
+
+##===   example 8  mixed non-linear  model  page 364 nlme =======================
+##
+ex <- "ex8_nlme_page364"; .pt <- proc.time()
+##
+cat("\n example ", ex,"\n")
+method <- "ML"
+sigma <- 1
+cat("\nFixed sigma= ",sigma,"  estimation method ", method,"\n")
+set.seed(8^2)
+t8.fix.ML.nlme <- nlme(conc ~ SSfol(Dose, Time, lKe, lKa, lCl), data = Theoph,
+                       fixed = lKe + lKa + lCl ~ 1,
+                       random = pdDiag(lKe + lKa + lCl ~ 1),
+                       method = method, start = c(-2.4,0.5,-3.3),
+                       control = nlmeControl(sigma = 1))
+(sM8 <- summary(t8.fix.ML.nlme))
+(aM8 <- anova  (t8.fix.ML.nlme))
+stopifnot(
+    all.equal(fixef(t8.fix.ML.nlme),
+              c(lKe = -2.4554999, lKa = 0.44870292, lCl = -3.2296957),
+              tol = 1e-7)
+    ,
+    all.equal(sM8$tTable[,"Std.Error"],
+              c(lKe = 0.0739269, lKa = 0.197524, lCl = 0.0683049),
+              tol = 5e-5)
+    ,
+    all.equal(aM8[,"F-value"],
+              c(10.9426, 17.4101, 2235.73), tol = 5e-5)
+          )
+##   REML method
+method <- "REML"
+cat("\nFixed sigma= ",sigma,"  estimation method ", method,"\n")
+t8.fix.REML.nlme <- update(t8.fix.ML.nlme, method = method)
+(sR8 <- summary(t8.fix.REML.nlme))
+(aR8 <- anova  (t8.fix.REML.nlme))
+stopifnot(
+    all.equal(fixef(t8.fix.REML.nlme), fixef(t8.fix.ML.nlme),
+              ## should not change much from ML to REML !
+              tol = 1e-6)
+    ,
+    all.equal(sR8$tTable[,"Std.Error"],
+              c(lKe = 0.073082, lKa = 0.195266, lCl = 0.0675243),
+              tol = 5e-5)
+    ,
+    all.equal(aR8[,"F-value"],
+              c(11.1971, 17.815, 2287.72), tol = 5e-5)
+)
+cat("Time elapsed: ", (proc.time() - .pt)[1:3], "\n")
+
+##===   example 9  mixed non-linear  model  page 365 nlme =======================
+##
+ex <- "ex9_nlme_page365"; .pt <- proc.time()
+##
+cat("\n example ", ex,"\n")
+method <- "ML"
+sigma <- 1
+cat("\nFixed sigma= ",sigma,"  estimation method ", method,"\n")
+set.seed(909)
+t9.fix.ML.nlme <- nlme(conc ~ SSfol(Dose, Time, lKe, lKa, lCl), data = Theoph,
+                       fixed = lKe + lKa + lCl ~ 1,
+                       random = pdDiag( lKa + lCl ~ 1),
+                       method = method, start = c(-2.4,0.5,-3.3),
+                       control = nlmeControl(sigma = 1))
+(sM9 <- summary(t9.fix.ML.nlme))
+(aM9 <- anova  (t9.fix.ML.nlme))
+stopifnot(
+    all.equal(fixef(t9.fix.ML.nlme),
+              c(lKe = -2.4555745, lKa = 0.44894103, lCl = -3.2297273),
+              tol = 1e-7)
+    ,
+    all.equal(sM9$tTable[,"Std.Error"],
+              c(lKe = 0.0739266, lKa = 0.197459, lCl = 0.0683082),
+              tol = 5e-5)
+    ,
+    all.equal(aM9[,"F-value"],
+              c(10.9669, 17.4108, 2235.56), tol = 5e-5)
+          )
+##   REML method
+method <- "REML"
+cat("\nFixed sigma= ",sigma,"  estimation method ", method,"\n")
+t9.fix.REML.nlme <- update(t9.fix.ML.nlme, method = method)
+(sR9 <- summary(t9.fix.REML.nlme))
+(aR9 <- anova  (t9.fix.REML.nlme))
+stopifnot(
+    all.equal(fixef(t9.fix.REML.nlme), fixef(t9.fix.ML.nlme),
+              ## should not change much from ML to REML !
+              tol = 1e-6)
+    ,
+    all.equal(sR9$tTable[,"Std.Error"],
+              c(lKe = 0.0730817, lKa = 0.195202, lCl = 0.0675275),
+              tol = 5e-5)
+    ,
+    all.equal(aR9[,"F-value"],
+              c(11.2219, 17.8157, 2287.55), tol = 5e-5)
+)
+cat("Time elapsed: ", (proc.time() - .pt)[1:3], "\n")
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/predict.lme.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/predict.lme.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/predict.lme.R	(revision 2477)
@@ -0,0 +1,109 @@
+## from PR#8905
+library(nlme)
+data(Orthodont)
+fm <- lme(distance ~ poly(age, 3) + Sex, data = Orthodont, random = ~ 1)
+# data for predictions
+Newdata <- head(Orthodont)
+Newdata$Sex <- factor(Newdata$Sex, levels = levels(Orthodont$Sex))
+(pr <- predict(fm, Newdata))
+stopifnot(all.equal(c(pr), fitted(fm)[1:6]))
+
+## https://stat.ethz.ch/pipermail/r-devel/2013-September/067600.html
+## but with a different fix.
+
+m0 <- lme(distance ~ Sex, random = ~1|Subject, data = Orthodont)
+Fitted <- predict(m0, level = 0)
+Fitted.Newdata <- predict(m0, level = 0, newdata = Orthodont)
+stopifnot(sum(abs(Fitted - Fitted.Newdata)) == 0)
+
+Fitted <- predict(m0, level = 1)
+Fitted.Newdata <- predict(m0, level = 1, newdata = Orthodont)
+sum(abs(Fitted - Fitted.Newdata))
+stopifnot(sum(abs(Fitted - Fitted.Newdata)) == 0)
+
+m1 <- lme(distance ~ 1, random = ~1|Subject, data = Orthodont)
+Fitted <- predict(m1, level = 0)
+Fitted.Newdata <- predict(m1, level = 0, newdata = Orthodont)
+stopifnot(sum(abs(Fitted - Fitted.Newdata)) == 0)
+
+Fitted <- predict(m1, level = 1)
+Fitted.Newdata <- predict(m1, level = 1, newdata = Orthodont)
+stopifnot(sum(abs(Fitted - Fitted.Newdata)) == 0)
+
+m2 <- lme(distance ~ 0, random = ~1|Subject, data = Orthodont)
+Fitted <- predict(m2, level = 0)
+Fitted.Newdata <- predict(m2, level = 0, newdata = Orthodont)
+stopifnot(sum(abs(Fitted - Fitted.Newdata)) == 0)
+
+Fitted <- predict(m2, level = 1)
+Fitted.Newdata <- predict(m2, level = 1, newdata = Orthodont)
+stopifnot(sum(abs(Fitted - Fitted.Newdata)) == 0)
+
+
+m3 <- lme(fixed = distance ~ age, data = Orthodont,
+          random = ~ 1 | Subject)
+m4 <- update(m3, random = ~ age | Subject)
+m5 <- update(m4, fixed = distance ~ age * Sex)
+
+newD <- expand.grid(age = seq(7,15, by = .25),
+                    Sex = c("Male", "Female"),
+                    Subject = c("M01", "F01"))
+(n.age <- attr(newD, "out.attrs")$dim[["age"]]) # 33
+str(p5 <- predict(m5, newdata = newD, asList = TRUE, level=0:1))
+pp5 <- cbind(newD, p5[,-1])
+stopifnot(identical(colnames(pp5),
+                    c("age", "Sex", "Subject", "predict.fixed", "predict.Subject")))
+fixef(m5) # (Intercept) age SexF age:SexF
+p5Mf <- pp5[pp5$Sex == "Male", "predict.fixed"]
+p5MS <- subset(pp5, subset = Subject == "M01" & Sex == "Male",
+               select = "predict.Subject", drop=TRUE)
+X.1 <- cbind(1, newD[1:n.age,"age"])
+stopifnot(all.equal(p5Mf[  1:n.age],
+                    p5Mf[-(1:n.age)], tol = 1e-15)
+         ,
+          all.equal(p5Mf[  1:n.age],
+                    c(X.1 %*% fixef(m5)[1:2]), tol = 1e-15)
+         ,
+          all.equal(p5MS,
+                    c(X.1 %*% (fixef(m5)[1:2] + as.numeric(ranef(m5)["M01",]))), tole = 1e-15)
+          )
+
+##--- simulate():---------
+
+## border cases
+ort.0 <- simulate(m3, method = character())# "nothing" stored
+ort.M <- simulate(m3, method = "ML",   seed=47)
+ort.R <- simulate(m3, method = "REML", seed=47)
+stopifnot(identical(names(ort.0), "null"),
+          identical(names(ort.M), "null"),
+          identical(names(ort.R), "null"),
+          identical(ort.0$null, list()),
+          identical(names(ort.M$null), "ML"),
+          identical(names(ort.R$null), "REML"),
+          all.equal(loM <- ort.M$null$ML  [,"logLik"], -215.437, tol = 2e-6)
+         ,
+          all.equal(loR <- ort.R$null$REML[,"logLik"], -217.325, tol = 2e-6)
+          )
+
+system.time(
+ orthS3 <- simulate.lme(list(fixed = distance ~ age, data = Orthodont,
+                              random = ~ 1 | Subject), nsim = 3,
+                         m2 = list(random = ~ age | Subject), seed = 47)
+)
+## the same, starting from two fitted models :
+ort.S3 <- simulate(m3, m2 = m4, nsim = 3, seed = 47)
+attr(ort.S3, "call") <- attr(orthS3, "call")
+stopifnot(all.equal(orthS3, ort.S3, tolerance = 1e-15))
+
+logL <- sapply(orthS3, function(E) sapply(E,
+                       function(M) M[,"logLik"]), simplify="array")
+
+stopifnot(is.array(logL), length(d <- dim(logL)) == 3, d == c(3,2,2),
+    sapply(orthS3, function(E) sapply(E, function(M) M[,"info"])) == 0
+   , # typically even identical():
+    all.equal(logL[1,,"null"], c(ML = loM, REML = loR), tol = 1e-15)
+   ,
+    all.equal(c(logL) + 230,
+              c(14.563 , 2.86712, 1.00026, 12.6749, 1.1615,-0.602989,
+                16.2301, 2.95877, 2.12854, 14.3586, 1.2534, 0.582263), tol=8e-6)
+)
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/getData.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/getData.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/getData.R	(revision 2477)
@@ -0,0 +1,8 @@
+library(nlme)
+fm1 <- lme(distance ~ age, Orthodont)
+str(o1 <- getData(fm1))
+
+df <- Orthodont # note that the name conflicts with df in the stats
+fm2 <- lme(distance ~ age, df)
+str(o2 <- getData(fm2))
+stopifnot(identical(o1, o2))
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/missing.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/missing.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/missing.R	(revision 2477)
@@ -0,0 +1,28 @@
+library(nlme)
+
+op <- options(digits = 3) # reduce rounding differences
+
+Ovary[c(1,272), 2] <- NA
+fm1 <- gls(follicles ~ sin(2*pi*Time) + cos(2*pi*Time), Ovary,
+           correlation = corAR1(form = ~ 1 | Mare), na.action=na.exclude)
+fitted(fm1)
+residuals(fm1)
+summary(fm1)
+
+Orthodont[100:102, 2] <- NA
+fm2 <- lme(distance ~ age + Sex, data = Orthodont, random = ~ 1,
+           na.action=na.exclude)
+fitted(fm2, 0:1)
+fitted(fm2)
+residuals(fm2, 0:1)
+round(residuals(fm2), 2)
+summary(fm2)
+
+Soybean[1:5, "Time"] <- NA
+fm3 <- gnls(weight ~ SSlogis(Time, Asym, xmid, scal), Soybean,
+            weights = varPower(), na.action=na.exclude)
+fitted(fm3)
+residuals(fm3)
+summary(fm3)
+
+options(op)# revert when this file is source()d
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/coef.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/coef.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/coef.R	(revision 2477)
@@ -0,0 +1,19 @@
+## tests of fix for PR#9831
+library(nlme)
+val <- c("10"=1.10,"14"=1.14)
+vf <- varIdent(value=val, form=~1|age, fixed=c("12"=1.12))
+vfi <- Initialize(vf,Orthodont)
+vfi
+str(vfi)
+stopifnot(
+    all.equal(coef(vfi), c(0.0953101798043, 0.131028262406)),
+    all.equal(coef(vfi, unconstrained = FALSE, allCoef = TRUE),
+              c("8" = 1, "10" = 1.1, "14" = 1.14, "12" = 1.12)))
+
+vfiCopy <- vfi        # copy of an initialized object
+length(vfiCopy)             # length is 2
+coef(vfiCopy) <- c(11,12)   # error in 3.1-84
+stopifnot(identical(coef(vfiCopy), c(11,12)))
+
+## error in 3.1-84
+(gls. <- gls(distance ~ age, weights = vfi, data=Orthodont))
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/ss2.rda
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/ss2.rda
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/varIdent.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/varIdent.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/varIdent.R	(revision 2477)
@@ -0,0 +1,7 @@
+## test for PR#9765
+library(nlme)
+Orth <- subset(Orthodont, Subject %in% c("M01","F01"))
+# Argument fixed in varIdent is ignored
+vf  <- varIdent(form=~1|Sex,fixed=c(Female=0.5))
+vf <- Initialize(vf, data=Orth)
+stopifnot(varWeights(vf) == rep(c(1,2), each=4))
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/lme.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/lme.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/lme.R	(revision 2477)
@@ -0,0 +1,93 @@
+library(nlme)
+
+options(digits = 6)# <==> less platform dependency in print() output
+if(!dev.interactive(orNone=TRUE)) pdf("test_lme.pdf")
+
+fm1 <- lmList(Oxboys)
+fm1
+fm2 <- lme(fm1)
+fm2
+vc2 <- VarCorr(fm2)
+stopifnot(
+    all.equal(fixef(fm2), c("(Intercept)" = 149.371753,
+                            age = 6.52546866), tol=1e-8),
+    all.equal(as.numeric(vc2[,"StdDev"]),
+              c(8.081077, 1.680717, 0.659889), tol=4e-7))
+
+# bug report from Arne.Mueller@sanofi-aventis.com
+mod <- distance ~ age + Sex
+fm3 <- lme(mod, Orthodont, random = ~ 1)
+pm3 <- predict(fm3, Orthodont)
+stopifnot(all.equal(mean(pm3), 24.023148148),
+	  all.equal(  sd(pm3), 2.4802195115),
+	  all.equal(quantile(pm3), c("0%"  = 17.0817792, "25%" = 22.3481813,
+				     "50%" = 23.9271016, "75%" = 25.5740014,
+				     "100%"= 30.8662241)))
+
+
+## bug report and fix from Dimitris Rizopoulos and Spencer Graves:
+## when 'returnObject = TRUE', do not stop() but give warning() on non-convergence:
+tools::assertWarning(
+fm1 <- lme(distance ~ age, data = Orthodont,
+	   control = lmeControl(msMaxIter = 1, returnObject = TRUE))
+)
+
+## based on bug report on R-help
+(p3.1 <- predict(fm3, Orthodont[1,]))
+# failed in 3.1-88
+stopifnot(all.equal(pm3[1], p3.1,
+		    check.attributes=FALSE, tolerance = 1e-14))
+
+## Intervals failed in a patch proposal (Nov.2015):
+(fm4 <- lme(distance ~ age, Orthodont, random = ~ age | Subject))
+i4 <- intervals(fm4)
+## from  dput(signif(i4$reStruct$Subject, 8))
+## R-devel 2016-01-11; 64-bit :
+reSS <- data.frame(lower = c(0.9485605, 0.10250901, -0.93825047),
+                   est.  = c(2.3270341, 0.22642779, -0.60933286),
+                   upper = c(5.7087424, 0.50014674,  0.29816857))
+## R-devel 2016-01-11; 32-bit :
+## reSS <- data.frame(lower = c(0.94962127,0.10262181, -0.93804767),
+##                    est.  = c(2.3270339, 0.22642779, -0.60933284),
+##                    upper = c(5.7023648, 0.49959695,  0.29662651))
+rownames(reSS) <- rownames(i4$reStruct$Subject)
+sm4 <- summary(fm4)
+stopifnot(
+    all.equal(fixef(fm4),
+              c("(Intercept)" = 16.761111, age = 0.66018519)),
+    identical(fixef(fm4), sm4$tTable[,"Value"]),
+    all.equal(sm4$tTable[,"Std.Error"],
+              c("(Intercept)" = 0.77524603, age = 0.071253264), tol=6e-8),
+    all.equal(i4$reStruct$Subject[,"est."], reSS[,"est."], tol= 1e-7)
+    ## (lower, upper) cannot be very accurate for these : ==> tol = *e-4
+   ,## "interestingly" 32-bit values changed from 3.2.3 to R-devel(3.3.0):
+    all.equal(i4$reStruct$Subject[,c(1,3)], reSS[,c(1,3)], tol = .005)
+   ,
+    all.equal(as.vector(i4$sigma),
+              ##  lower     est.        upper
+              c(1.0849772, 1.3100397, 1.5817881), tol=8e-4)
+   ,
+    all.equal(as.vector(i4$fixed),
+              as.vector(rbind(c(15.218322, 16.761111, 18.3039),
+                              c(0.51838667, 0.66018519, 0.8019837))),
+              tol = 1e-6)
+)
+
+
+## wrong results from getData:
+load("ss2.rda")
+m1 <- lme(PV1MATH ~  ESCS + Age +time ,
+          random = ~   time|SCHOOLID,
+          data = ss2,
+          weights = varIdent(form=~1|time),
+          corr = corCompSymm(form=~1|SCHOOLID/StIDStd),
+          na.action = na.omit)
+plot(m1, resid(.) ~ WEALTH)
+
+m2 <- lme(PV1MATH ~  ESCS + Age +time ,
+          random = ~   time|SCHOOLID,
+          data = ss2,
+          weights = varIdent(form=~1|time),
+          corr = corCompSymm(form=~1|SCHOOLID/StIDStd),
+          na.action = na.omit)
+plot(m2, resid(.) ~ WEALTH)
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/nlme2.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/nlme2.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/nlme2.R	(revision 2477)
@@ -0,0 +1,120 @@
+library(nlme)
+is64bit <- .Machine$sizeof.pointer == 8
+
+options(digits = 10)# <- see more, as we have *no* *.Rout.save file here
+## https://stat.ethz.ch/pipermail/r-help/2014-September/422123.html
+nfm <- nlme(circumference ~ SSlogis(age, Asym, xmid, scal),
+            data = Orange,
+            fixed = Asym + xmid + scal ~ 1)
+(sO <- summary(nfm))
+vc <- VarCorr(nfm, rdig = 5)# def. 3
+storage.mode(vc) <- "double" # -> (correct) NA warning
+cfO <- sO$tTable
+if(FALSE)
+    dput(signif(cfO[,c("Std.Error", "t-value")], 8))
+cfO.T <- array(
+    if(is64bit)## R-devel 2016-01-11; [lynne]:
+        c(14.052671, 34.587947, 30.497593,
+          13.669776, 21.036087, 11.692943)
+    else ## R-devel 2016-01-11; [f32sfs-2]:
+        c(14.053663, 34.589821, 30.49412,
+          13.668653, 21.034544, 11.693889)
+   , dim = 3:2, dimnames = list(c("Asym", "xmid", "scal"),
+				c("Std.Error", "t-value")))
+if(FALSE)
+    dput(signif(as.vector(vc[,"StdDev"]), 8))
+vcSD <- setNames(if(is64bit)## R-devel 2016-01-11; [lynne]:
+		     c(27.051312, 24.258159, 36.597078, 7.321525)
+		 else ## R-devel 2016-01-11; [f32sfs-2]:
+		     c(27.053964, 24.275286, 36.58682, 7.321365),
+		 c("Asym", "xmid", "scal", "Residual"))
+stopifnot(
+    identical(cfO[,"Value"], fixef(nfm)),
+    all.equal(cfO[,c("Std.Error", "t-value")], cfO.T, tol = 2e-4)# 8.7e-5 (R 3.0.3, 32b)
+   ,
+    cfO[,"DF"] == 28,
+    all.equal(vc[,"Variance"], vc[,"StdDev"]^2, tol= 5e-7)
+   ,
+    all.equal(vc[,"StdDev"], vcSD, tol = 6e-4) # 3.5e-4 (R 3.0.3, 32b)
+   ,
+    all.equal(unname(vc[2:3, 3:4]), # "Corr"
+              rbind(c(-0.3273, NA),
+		    c(-0.9920, 0.4430)), tol = 2e-3)# ~ 2e-4 / 8e-4
+)
+
+## Confirm  predict(*, newdata=.)  works
+(n <- nrow(Orange)) # 35
+set.seed(17)
+newOr <- within(Orange[sample(n, 64, replace=TRUE), ],
+		age <- round(jitter(age, amount = 50)))
+fit.v <- predict(nfm, newdata = newOr)
+resiv <- newOr$circumference - fit.v
+res.T <- c(48, 115, 74, 15, 44, -94, 47, -51, 20, -52, -16, 12, -135,
+           -85, 136, 100, 24, 181, -88, -102, -26, 52, -148, 8, -83, 73,
+           -27, -34, 91, 42, 34, -8, 0, 83, 84, -90, -123, 94, -157, -11,
+           56, -164, -28, 72, 15, 148, 95, -122, 169, 84, -19, -124, 45,
+           -66, -10, 119, -110, -43, 12, 94, -108, 45, 48, 46)
+if(!all((res10 <- round(10 * as.vector(resiv))) == res.T)) {
+    iD <- which(res10 != res.T)
+    cat("Differing rounded residuals, at indices", paste(iD, collapse=", "),
+        "; with values:\n")
+    print(cbind(resiv, res10, res.T)[iD,])
+}
+## -> indices  14 [64-bit]  or  27 [32-bit], respectively
+
+
+## [Bug 16715] New: nlme: unable to use predict and augPredict ..
+## Date: 17 Feb 2016 -- part 2 -- predict():
+##
+## Comment 4 daveauty@gmail.com 2016-03-08 -- modified by MM --
+
+## simulate density data then fit Michaelis-Menten equation of density as
+## function of ring age. TreeIDs grouped by SP (spacing)
+set.seed(1)
+df <- data.frame(SP = rep(LETTERS[1:5], 60),
+		 expand.grid(TreeID = factor(1:12), age = seq(2, 50, 2)))
+df[,"dens"] <- with(df, (runif(1,10,20)*age)/(runif(1,9,10)+age)) + rnorm(25, 0, 1)
+str(df)
+## 'data.frame':	300 obs. of  4 variables:
+##  $ SP    : Factor w/ 5 levels "A","B","C","D",..: 1 2 3 4 5 1 2 3 4 5 ...
+##  $ TreeID: Factor w/ 12 levels "1","2","3","4",..: 1 2 3 4 5 6 7 8 9 10 ...
+##  $ age   : num  2 2 2 2 2 2 2 2 2 2 ...
+##  $ dens  : num  2.41 1.39 3.82 2.56 1.41 ...
+
+## mixed-effects model
+fit1 <- nlme(dens ~ a*age/(b+age),
+	     fixed = a+b ~ 1, random= a ~ 1|TreeID,
+	     start = c(a=15, b=5), data=df)
+summary(fit1)
+fit1R <- update(fit1, method = "REML")
+## allow fixed effects parameters to vary by 'SP':
+fit2 <- update(fit1, fixed = list(a ~ SP, b ~ SP),
+               start = c(a = rep(14, 5), b = rep(4, 5)))
+summary(fit2)
+
+## make new data for predictions
+newdat <- expand.grid(SP = LETTERS[1:5], age = seq(1, 50, 1))
+n.pred1 <- predict(fit1, newdat, level=0) # works fine
+n.pred2 <- predict(fit2, newdat, level=0)
+## in nlme 3.1-124, throws the error:
+## Error in eval(expr, envir, enclos) : object 'SP' not found
+
+## New data with  never-yet observed levels of a random effect -- PR#16614 :
+set.seed(47)
+newD <- expand.grid(SP = LETTERS[2:4], age = runif(16, 1,50),
+                    TreeID = sample(c(sample(1:12, 7), 100:102)))
+n1prD0 <- predict(fit1, newD, level=0)
+n2prD0 <- predict(fit2, newD, level=0)
+n1prD1 <- predict(fit1, newD, level=1)   # failed in nlme <= 3.1-126
+n2prD1 <- predict(fit2, newD, level=1)   # ditto
+(n1prD01 <- predict(fit1, newD, level=0:1))#  "
+(n2prD01 <- predict(fit2, newD, level=0:1))#  "
+## consistency :
+stopifnot(
+    identical(is.na(n1prD1), is.na(n2prD1)),
+    identical(sort(unique(newD[is.na(n2prD1), "TreeID"])), 100:102),
+    sort(unique( newD[is.na(n2prD1), "TreeID"] )) %in% 100:102 ,
+    all.equal(as.vector(n1prD0), n1prD01[,"predict.fixed"], tolerance= 1e-15),
+    all.equal(as.vector(n2prD0), n2prD01[,"predict.fixed"], tolerance= 1e-15),
+    all.equal(as.vector(n1prD1), n1prD01[,"predict.TreeID"],tolerance= 1e-15),
+    all.equal(as.vector(n2prD1), n2prD01[,"predict.TreeID"],tolerance= 1e-15))
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/fitted.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/fitted.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/fitted.R	(revision 2477)
@@ -0,0 +1,18 @@
+## PR#15678
+
+library(nlme)
+set.seed(1)
+X1 <- gl(2,4)
+X2 <- gl(2,2,8)
+Y <- rnorm(8)
+mis.dat <- data.frame(Y = Y,X1 = X1,X2 = X2)
+mis.dat[3, "Y"] <- NA
+
+## Fit model -----------------------
+model <- lme(Y ~ 1, random = ~ 1 | X1/X2, data = mis.dat, na.action = na.omit)
+summary(model)
+
+labs <- with(na.omit(mis.dat), paste(X1, X2, sep = "/" ))
+fit <- fitted(model)
+stopifnot(identical(names(fit), labs))
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/updateLme.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/updateLme.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/updateLme.R	(revision 2477)
@@ -0,0 +1,52 @@
+library(nlme)
+
+## Example 1  --- was  ./update.R  ---
+data(petrol, package = 'MASS')
+Petrol <- petrol
+Petrol[, 2:5] <- scale(Petrol[, 2:5], scale = FALSE)
+pet3.lme <- lme(Y ~ SG + VP + V10 + EP,
+                random = ~ 1 | No, data = Petrol, method="ML")
+upet3 <- update(pet3.lme, Y ~ SG + VP + V10)
+upet3
+vc3 <- VarCorr(upet3)
+upet2 <- lme(Y ~ SG + VP + V10, random = ~ 1 | No, data = Petrol, method = "ML")
+stopifnot(
+    all.equal(upet3, upet2, tol = 1e-15)
+    ,
+    all.equal(fixef(upet3),
+	      c("(Intercept)" = 19.659375, SG = 0.125045632,
+		VP = 2.27818601, V10 = 0.0672413592), tol = 1e-8)# 1e-9
+    ,
+    all.equal(as.numeric(vc3[,"StdDev"]),
+	      c(0.00029397, 9.69657845), tol=1e-6)
+)
+
+## Example 2  ---
+data(Assay)
+as1 <- lme(logDens~sample*dilut, data=Assay,
+           random=pdBlocked(list(
+                     pdIdent(~1),
+                     pdIdent(~sample-1),
+                     pdIdent(~dilut-1))))
+
+as1s <- update(as1, random=pdCompSymm(~sample-1))
+(an.1s <- anova(as1, as1s)) # non significant
+stopifnot(
+    all.equal(drop(data.matrix(an.1s[2,-1])),
+              c(Model = 2, df = 33, AIC = -10.958851, BIC = 35.280663,
+                logLik = 38.479425, Test = 2,
+                L.Ratio = 0.11370211, `p-value` = 0.73596807), tol=8e-8))
+
+as1S <- update(as1, . ~ sample+dilut) # dropping FE interaction
+tools::assertWarning(anova(as1, as1S))# REML not ok for different FE.
+as1M  <- update(as1,  method = "ML")
+as1SM <- update(as1S, method = "ML")
+(anM <- anova(as1M, as1SM)) # anova() OK: comparing MLE fits
+## ==> significant: P ~= 0.0054
+stopifnot(
+    all.equal(drop(data.matrix(anM[2,])[,-(1:2)]),
+	      c(df = 14, AIC = -169.588248, BIC = -140.267424, logLik = 98.7941241,
+		Test = 2, L.Ratio = 39.7345188, `p-value` = 0.0053958561),
+	      tol = 8e-8)
+)
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/augPredmissing.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/augPredmissing.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/augPredmissing.R	(revision 2477)
@@ -0,0 +1,7 @@
+library(nlme)
+data(Orthodont)
+# add a column with an NA that is not used in the fit
+Orthodont$Others = runif(nrow(Orthodont))
+is.na(Orthodont$Others[3]) = TRUE
+fm1 = lme(Orthodont, random = ~1)
+augPred(fm1, length.out = 2, level = c(0,1))
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/deparse.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/deparse.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/tests/deparse.R	(revision 2477)
@@ -0,0 +1,202 @@
+## Tests to make sure that the deparse(as.vector(x)) construction is not
+## tripping us up again.
+library(nlme)
+options(digits = 7)
+data(Loblolly)
+fm1 <- nlme(height ~ SSasymp(age, Asym, R0, lrc),
+            data = Loblolly,
+            fixed = Asym + R0 + lrc ~ 1,
+            random = Asym ~ 1,
+            start = c(Asym = 103, R0 = -8.5, lrc = -3.3))
+fm1
+vcV <- VarCorr(fm1)[,"Variance"]
+stopifnot(
+    all.equal(fixef(fm1),
+	      c(Asym = 101.4496, R0 = -8.6273307, lrc = -3.2337507))
+   ,
+    all.equal(as.numeric(vcV),
+              c(13.3271856, 0.5167634), tol = 1e-6)
+)
+
+
+model <- height ~ SSasymp(age, Asym, R0, lrc)
+fixed <- Asym + R0 + lrc ~ 1
+random <- Asym ~ 1
+start <- c(Asym = 103, R0 = -8.5, lrc = -3.3)
+fm2 <- nlme(model,
+            data = Loblolly,
+            fixed = fixed,
+            random = random,
+            start = start)
+fm2
+## equal apart from 'call' :
+fm2$call <- fm1$call
+stopifnot(all.equal(fm1, fm2, tolerance = 1e-15))
+
+## deparse can give multiple lines
+## example from https://stat.ethz.ch/pipermail/r-help/2006-February/086648.html
+"mydata2" <-
+structure(list(Tps = c(1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3,
+3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6,
+6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9,
+9, 9, 9, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 14,
+14, 14, 14, 14, 17, 17, 17, 17, 17, 20, 20, 20, 20, 25, 28, 29,
+50, 50, 50, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
+1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4,
+4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7,
+7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10,
+10, 10, 11, 11, 11, 11, 11, 11, 14, 14, 14, 14, 14, 17, 17, 17,
+17, 17, 20, 20, 20, 20, 25, 28, 29, 50, 50, 50, 136, 136, 136,
+136, 136, 136, 136, 136, 136, 136, 1, 1, 1, 1, 1, 1, 2, 2, 2,
+2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5,
+6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8,
+8, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11,
+11, 11, 14, 14, 14, 14, 14, 17, 17, 17, 17, 17, 20, 20, 20, 20,
+25, 28, 29, 50, 50, 50, 136, 136, 136, 136, 136, 136, 136, 136,
+136, 136), Conc = c(0, 0, 0, 0, 0, 0, 0, 0.807852503274902,
+0.204371494701886,
+0.579222129993907, 0.989062273721619, 0, 1.11728297897571,
+1.41057428121324,
+0.888883702851307, 1.259907624008, 1.45753269675829, 1.07077516747401,
+0.843279379, 0, 0.763110069196737, 1.11297791434297, 1.10087763997637,
+0.946929594501016, 1.33112168, 0.654041755, 0.694167499, 1.289548703,
+1.117139864, 0.807196192, 0.720221376552025, 0.560082823, 0.476583438,
+2.590855204, 0.51510972, 1.072946887, 0.537999938614396, 0.886684225905255,
+0.630178116793598, 1.31534758842196, 1.33333958571746, 0.922032210748255,
+0.429930193046174, 1.35881467717335, 0.790045927902363, 1.22484702570724,
+0.808104508207897, 1.31185966817903, 1.51837686425553, 1.74105163638734,
+1.80365598487402, 1.13240352674377, 1.50086243061644, 2.06355364280445,
+0.439350890906039, 1.54692793444949, 1.78758216051046, 1.09043400023239,
+0.811328376840514, 0.459192443530981, 0.695333473157298, 0.387995007681174,
+0.784627063444921, 1.02282256375842, 0.382687104107726, 0.554290634950242,
+0.130420456296453, 0.324194753224919, 0.31106140274139, 0.513473505828888,
+0.878620320248701, 1.18404358659996, 0.136926837896477, 0, 0,
+0.835588760032974, 0.558617235576616, 1.21002805866839, 0.769381068031404,
+1.04514254228094, 0.373251847173678, 0.389005898972802, 0.183141006154896,
+0.223596336820146, 0.315526423315647, 0.0930349732768131,
+0.169959185212759,
+0.161878841748425, 0, 0.0483041009105874, 0, 0, 0, 0.0777005553478052,
+0, 0.153175826795441, 0.0428171049833677, 0, 0, 0, 0, 0, 0, 0,
+0, 0, 0, 26.564295705327, 5.5893744508169, 7.22612934071834,
+36.6563989567777, 0, 28.8967184437329, 28.4030370337251, 28.0886043901352,
+26.1230935842208, 28.8895673910072, 42.6814210131968, 32.3555695551062,
+0.76883326657205, 34.6159136622156, 38.329242204291, 56.4476583636484,
+26.6249506083603, 31.3001451026823, 23.7339071829084, 23.3702284599355,
+36.669903715038, 44.7377244306005, 31.2079335923023, 32.8613384312272,
+29.4259634309146, 45.6112405959009, 48.1231689836687, 55.0037961570027,
+32.9822316456421, 20.0382768189682, 26.0986380308655, 28.8915584506145,
+28.7949023823068, 30.0278417498425, 58.8089779973569, 20.3602570111197,
+29.6269605259023, 28.4404986724604, 30.2165182590977, 19.9204461889074,
+31.1019196559556, 30.3847467747055, 36.8726911479995, 51.0618036275519,
+23.5408013442579, 36.6948355347593, 27.4753860809429, 24.1341667099646,
+27.5411488989643, 35.9021799354022, 19.7417897046158, 31.1403887303244,
+46.1743622734049, 34.8235854891765, 22.1714704189293, 33.6805966894274,
+35.2814908686112, 42.9767437212852, 38.1264997164547, 5.3651357974451,
+42.8990434918385, 25.4908883698364, 25.99649502, 36.4958105490917,
+40.8004126550705, 5.36867162116895, 0.00898476265269363, 0,
+27.6810997945798,
+28.7918300045713, 45.7577183830352, 35.9276318604787, 34.9717618087238,
+29.620354272564, 24.6537513599869, 13.5363982464958, 25.8289073574818,
+12.0090406245759, 4.753436805, 11.849214652228, 8.41410147611612,
+0, 1.80855352862552, 1.1987530031681, 1.01148025243171, 0.495675369574172,
+1.62701127228732, 0, 16.6288242287241, 1.23656061354912, 0.323708776035328,
+0, 0.566916625204436, 0, 0, 0, 0, 0, 0, 0, 2.53578781871283,
+3.50083667130797, 0, 0.98049572179098, 0, 3.57129673217304,
+2.77298867949388,
+2.12302645642669, 4.11923869203499, 4.69069462193674, 2.8698666062651,
+2.05079837323067, 0.0602771574448942, 5.96454350250626, 2.26267114439802,
+3.06911285674854, 2.04233129537404, 2.62181873844029, 1.51813653072598,
+1.46193772981073, 2.69864635755833, 3.44016493913122, 2.50834832469627,
+3.48170744166168, 1.00637581555435, 1.67065398473081, 4.18855363095027,
+3.39649762611015, 1.72804613460423, 1.40053679329531, 2.37032387724109,
+3.19332545080983, 2.49474373894248, 2.17800931288708, 2.7601484443213,
+0.91266104095844, 1.93485048639199, 1.19692593420788, 1.79537330666258,
+2.14020930767983, 3.0122526724942, 2.81112226980754, 3.54890724398174,
+3.01022926452999, 2.38263226710738, 3.53569238341869, 3.47869329713911,
+0.679333339820719, 2.4764260756438, 3.82615100065366, 2.20449890383871,
+1.371303113329, 1.2427787019995, 1.73319133880954, 0.391268883238408,
+1.73610193837913, 2.68494324646718, 1.77065393606844, 1.45079980147062,
+0.763775702906329, 0.98566725668627, 0.37838763208699, 0.841811919286804,
+1.46436462204795, 1.98409602726, 0.507005887891038, 0.465515668274195,
+0, 1.873365675227, 1.69023864630648, 2.65530855919137, 2.34392199908302,
+1.61917643594837, 1.05165934333345, 0.564642823436471, 0.121621029620328,
+0.515007625737071, 0.524345809084086, 0.130898614090571, 0.332427740242623,
+0.110214989555118, 0, 0.128642193589, 0.119407067173878, 0.128926224027295,
+0.0622331866694357, 0.215645168287442, 0, 0.859343941945178,
+0.0500810300696456, 0, 0, 0.0628746592609754), Organ =
+structure(as.integer(c(1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3,
+3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+2, 2, 2, 2, 2)), .Label = c("Carc", "TD", "Foie"), class = c("ordered",
+"factor"))), .Names = c("Tps", "Conc", "Organ"), row.names = c("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", "42", "43", "44", "45", "46",
+"47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57",
+"58", "59", "60", "61", "62", "63", "64", "65", "66", "67", "68",
+"69", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79",
+"80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "90",
+"91", "92", "93", "94", "95", "96", "97", "98", "99", "100",
+"101", "102", "103", "104", "105", "106", "107", "108", "109",
+"110", "111", "112", "113", "114", "115", "116", "117", "118",
+"119", "120", "121", "122", "123", "124", "125", "126", "127",
+"128", "129", "130", "131", "132", "133", "134", "135", "136",
+"137", "138", "139", "140", "141", "142", "143", "144", "145",
+"146", "147", "148", "149", "150", "151", "152", "153", "154",
+"155", "156", "157", "158", "159", "160", "161", "162", "163",
+"164", "165", "166", "167", "168", "169", "170", "171", "172",
+"173", "174", "175", "176", "177", "178", "179", "180", "181",
+"182", "183", "184", "185", "186", "187", "188", "189", "190",
+"191", "192", "193", "194", "195", "196", "197", "198", "199",
+"200", "201", "202", "203", "204", "205", "206", "207", "208",
+"209", "210", "211", "212", "213", "214", "215", "216", "217",
+"218", "219", "220", "221", "222", "223", "224", "225", "226",
+"227", "228", "229", "230", "231", "232", "233", "234", "235",
+"236", "237", "238", "239", "240", "241", "242", "243", "244",
+"245", "246", "247", "248", "249", "250", "251", "252", "253",
+"254", "255", "256", "257", "258", "259", "260", "261", "262",
+"263", "264", "265", "266", "267", "268", "269", "270", "271",
+"272", "273", "274", "275", "276", "277", "278", "279", "280",
+"281", "282", "283", "284", "285", "286", "287", "288", "289",
+"290", "291", "292", "293", "294", "295", "296", "297", "298",
+"299", "300"), class = c("nfnGroupedData", "nfGroupedData", "groupedData",
+"data.frame"), formula = quote(Conc ~ Tps | Organ), FUN = function (x)
+max(x, na.rm = TRUE), order.groups = TRUE)
+
+mydata2$Dose <- 100
+mymod3 <- nlsList(Conc+1 ~ Dose * exp(lKe+lKa-lCl) *
+   (exp(-exp(lKe)*Tps)-exp(-exp(lKa)*Tps)) /(exp(lKa)-exp(lKe)) | Organ,
+   data=mydata2, start= c(lKe=-2.77, lKa=-1.41, lCl=-1.13))
+mymod3
+(sm3 <- summary(mymod3))
+
+stopifnot(
+    all.equal(coef(sm3),
+              array(c(-5.0742843, -3.0284227, -2.9006161, 2.9998357, 1.7851301,
+                      0.26206915, -1.6915208, -1.6964717, -11.068132, 4.263934e-43,
+                      1.4546246e-17, 4.9468128e-09, -0.18001926, -0.67150218, -1.3685062,
+                      2.9213761, 1.6846644, 0.22295774, -0.061621391, -0.39859699,
+                      -6.1379624, 0.37741845, 0.015884023, 0.0005718832, -1.1485352,
+                      0.086542979, -2.2452234, 2.769282, 1.177223, 0.13378181, -0.41474113,
+                      0.073514514, -16.782726, 3.9250025e-08, 0.65176229, 4.8777767e-16),
+                    dim = c(3L, 4L, 3L),
+                    dimnames =
+                        list(c("Carc", "TD", "Foie"),
+                             c("Estimate", "Std. Error", "t value", "Pr(>|t|)"),
+                             c("lKe", "lKa", "lCl"))),
+              tolerance = 1e-7)
+)
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/data/Rdata.rdb
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/data/Rdata.rdb
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/data/Rdata.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/data/Rdata.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/data/Rdata.rdx
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/nlme/data/Rdata.rdx
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/tests/completion.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/tests/completion.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/tests/completion.R	(revision 2477)
@@ -0,0 +1,37 @@
+
+## test some typical completion attempts
+
+testLine <- function(line, cursor = nchar(line))
+{
+    str(utils:::.win32consoleCompletion(line, cursor))
+}
+
+testLine("")
+
+testLine("lib")
+testLine("data(")
+testLine("data(US")
+testLine("data(US", 3)
+
+testLine("?INS")
+
+testLine("utils::data")
+testLine("utils:::.show_help_on_topic_")
+testLine("utils::.show_help_on_topic_")
+
+testLine("update(")
+
+testLine("version$m")
+testLine("nchar(version[")
+
+
+
+testLine("method?coe")
+testLine("?coe")
+testLine("?\"coerce,AN")
+testLine("method?\"coerce,AN")
+
+
+## testLine("")
+## testLine("")
+## testLine("")
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/tests/keepsource.Rnw
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/tests/keepsource.Rnw	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/tests/keepsource.Rnw	(revision 2477)
@@ -0,0 +1,12 @@
+\SweaveOpts{keep.source=TRUE}
+
+Now a chunk starting with a comment, lost in R 2.12.0 patched:
+<<ex>>=
+## This is an initial comment line. Let's hope it's not being lost
+"Above there's a comment."
+1:10 # a comment here is preserved
+pi   # also, there's one the next (last) line - which used to get lost
+## and a last comment here ... lost also in earlier R versions
+@
+
+and some more text.
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/tests/Sexpr-verb-ex.Rnw
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/tests/Sexpr-verb-ex.Rnw	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/tests/Sexpr-verb-ex.Rnw	(revision 2477)
@@ -0,0 +1,44 @@
+\documentclass[11pt,a4paper]{article}
+
+%% *** automatically switched by 'make' ( ./Makefile ) --- CARE!! in changing
+\SweaveOpts{echo=FALSE,eval=FALSE,results=hide}   % Exercise mode
+%\SweaveOpts{echo=TRUE,eval=TRUE,results=verbatim} % Solution mode
+%% other Sweave options
+\SweaveOpts{engine=R, keep.source=TRUE, strip.white=true}
+
+\newif\ifSolution
+\Solutiontrue% if solution
+\Solutionfalse%if exercise
+%
+\ifSolution\newcommand{\commentSol}[1]{#1}
+\else      \newcommand{\commentSol}[1]{}
+\fi
+\newcommand{\T}[1]{\texttt{#1}}
+
+\begin{document}
+
+<<preliminaries,echo=FALSE,results=hide>>=
+options(width = 75, digits = 5, str=list(vec.len=2))
+@
+
+We work with the data set \T{airquality} which is part of R....
+You can address it simply by \T{airquality}. Use \T{?airquality} to read about the
+meaning of the variables contained in the dataset.
+
+Get a summary of the data,
+<<s-air-2,echo=TRUE,eval=TRUE>>=
+summary(airquality)
+@
+
+\commentSol{The data set contains \Sexpr{nrow(airquality)} observations. The data is
+complete for all but the first two variables \T{Ozone}, \T{Solar.R},
+which contain \Sexpr{sum(is.na(airquality[,1]))} and
+\Sexpr{sum(is.na(airquality[,2]))} missing values, respectively.
+}
+
+The above works in solution mode,
+but in exercise mode, the $\backslash$Sexpr results are put out verbatim,
+unfortunately using $\backslash$\verb|verb{bla bla{|  and the left brace
+\emph{really} messes up the $\backslash$commentSol\verb|{..}| command...
+
+\end{document}
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/tests/swv-keepSrc-1.Rnw
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/tests/swv-keepSrc-1.Rnw	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/tests/swv-keepSrc-1.Rnw	(revision 2477)
@@ -0,0 +1,48 @@
+\documentclass{article}
+\SweaveOpts{engine=R,eps=FALSE,pdf=TRUE,strip.white=true,keep.source=TRUE}
+
+\usepackage{Sweave}
+
+\begin{document}
+<<preliminaries, echo=FALSE, results=hide>>=
+options(width=70, useFancyQuotes = FALSE, prompt="R> ", continue="+  ")
+@
+\subsection*{Introduction}
+
+We generate 3D gaussian data,
+We generate 3D Gaussian data,
+<<ex1-U3>>=
+set.seed(1)
+n <- 100
+x <- rnorm(n); y <- 2*x + rnorm(n)/2
+U3 <- cbind(x, y, z = -3*x + y + rnorm(n)/4)
+@
+look at its structure
+<<str>>=
+str(U3) # its structure ((comment kept))
+@
+and load package \texttt{lattice}
+<<req-lattice>>=
+if(!require("lattice")) q("no")
+@
+to visualize it by a simple scatter plot matrix
+\begin{figure}[h!]
+\centering
+<<splom-def, eval=false>>=
+splom(U3, xlab ="", cex = 0.4)
+<<splom, echo=FALSE, fig=TRUE, height=5>>=
+print(
+<<splom-def>>
+     )
+@
+\caption{\Sexpr{n} vectors of random variates ... ...}
+\label{fig:AC_Joe}
+\end{figure}
+
+\subsection*{Session Information}
+
+<<sessionInfo, results=tex>>=
+toLatex(sessionInfo())
+@
+
+\end{document}
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/tests/customgraphics.Rnw
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/tests/customgraphics.Rnw	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/tests/customgraphics.Rnw	(revision 2477)
@@ -0,0 +1,20 @@
+Test file for custom graphics devices
+<<results=hide>>=
+my.Swd <- function(name, width, height, ...) {
+  cat("running my.Swd\n")
+  grDevices::png(filename = paste(name, "png", sep = "."),
+                 width = width, height = height, res = 100, units = "in",
+                 bg = "transparent")
+}
+my.Swd.off <- function() {
+    cat("shutting down my.Swd\n")
+    grDevices::dev.off()
+}
+<<fig=TRUE, grdevice=my.Swd>>=
+plot(1:2)
+<<fig=TRUE, pdf=TRUE, grdevice=my.Swd>>=
+plot(1:3)
+<<fig=TRUE, grdevice=my.Swd, pdf=TRUE>>=
+plot(1:4)
+@
+Done!
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/tests/Sweave-tst.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/tests/Sweave-tst.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/tests/Sweave-tst.R	(revision 2477)
@@ -0,0 +1,84 @@
+#  File src/library/utils/tests/Sweave-tst.R
+#  Part of the R package, https://www.R-project.org
+#
+#  This program is free software; you can redistribute it and/or modify
+#  it under the terms of the GNU General Public License as published by
+#  the Free Software Foundation; either version 2 of the License, or
+#  (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  A copy of the GNU General Public License is available at
+#  https://www.R-project.org/Licenses/
+
+## Testing Sweave
+
+.proctime00 <- proc.time()
+library(utils)
+options(digits = 5) # to avoid trivial printed differences
+options(show.signif.stars = FALSE) # avoid fancy quotes in o/p
+
+SweaveTeX <- function(file, ...) {
+    if(!file.exists(file))
+        stop("File", file, "does not exist in", getwd())
+    texF <- sub("\\.[RSrs]nw$", ".tex", file)
+    Sweave(file, ...)
+    if(!file.exists(texF))
+        stop("File", texF, "does not exist in", getwd())
+    readLines(texF)
+}
+
+p0 <- paste0
+latexEnv <- function(lines, name) {
+    stopifnot(is.character(lines), is.character(name),
+	      length(lines) >= 2, length(name) == 1)
+    beg <- p0("\\begin{",name,"}")
+    end <- p0("\\end{",name,"}")
+    i <- grep(beg, lines, fixed=TRUE)
+    j <- grep(end, lines, fixed=TRUE)
+    if((n <- length(i)) != length(j))
+	stop(sprintf("different number of %s / %s", beg,end))
+    if(any(j-1 < i+1))
+	stop(sprintf("positionally mismatched %s / %s", beg,end))
+    lapply(mapply(seq, i+1,j-1, SIMPLIFY=FALSE),
+	   function(ind) lines[ind])
+}
+
+## now, Sweave() and check  *.Rnw  examples :
+
+### ------------------------------------ 1 ----------------------------------
+t1 <- SweaveTeX("swv-keepSrc-1.Rnw")
+if(FALSE)## look at it
+writeLines(t1)
+
+inp <- latexEnv(t1, "Sinput")
+out <- latexEnv(t1, "Soutput")
+## This may have to be updated when the *.Rnw changes:
+stopifnot(length(inp) == 5,
+	  grepl("#", inp[[2]]), length(inp[[3]]) == 1,
+	  length(out) == 1,
+	  any(grepl("\\includegraphics", t1)))
+
+### ------------------------------------ 2 ----------------------------------
+## Sweave() comments with  keep.source=TRUE
+t2 <- SweaveTeX("keepsource.Rnw")
+comml <- grep("##", t2, value=TRUE)
+stopifnot(length(comml) == 2,
+	  grepl("initial comment line", comml[1]),
+	  grepl("last comment", comml[2]))
+## the first was lost in 2.12.0;  the last in most/all previous versions of R
+
+### ------------------------------------ 3 ----------------------------------
+## custom graphics devices
+Sweave("customgraphics.Rnw")
+
+### ------------------------------------ 4 ----------------------------------
+## SweaveOpts + \Sexpr --> \verb... output
+Sweave(f <- "Sexpr-verb-ex.Rnw")
+tools::texi2pdf(sub("Rnw$","tex", f))# used to fail
+
+
+cat('Time elapsed: ', proc.time() - .proctime00,'\n')
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/doc/Sweave.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/doc/Sweave.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/doc/Sweave.R	(revision 2477)
@@ -0,0 +1,39 @@
+### R code from vignette source 'Sweave.Rnw'
+
+###################################################
+### code chunk number 1: Sweave.Rnw:127-129
+###################################################
+rnwfile <- system.file("Sweave", "example-1.Rnw", package = "utils")
+Sweave(rnwfile)
+
+
+###################################################
+### code chunk number 2: Sweave.Rnw:134-135
+###################################################
+tools::texi2pdf("example-1.tex")
+
+
+###################################################
+### code chunk number 3: Sweave.Rnw:374-375
+###################################################
+SweaveSyntConv(rnwfile, SweaveSyntaxLatex)
+
+
+###################################################
+### code chunk number 4: Sweave.Rnw:485-486 (eval = FALSE)
+###################################################
+## help("Sweave")
+
+
+###################################################
+### code chunk number 5: Sweave.Rnw:495-496 (eval = FALSE)
+###################################################
+## help("RweaveLatex")
+
+
+###################################################
+### code chunk number 6: Sweave.Rnw:609-610 (eval = FALSE)
+###################################################
+## help("Rtangle")
+
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/doc/index.html
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/doc/index.html	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/doc/index.html	(revision 2477)
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title>R: Vignettes and other documentation</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<link rel="stylesheet" type="text/css" href="/doc/html/R.css" />
+</head><body>
+<h1> Vignettes and other documentation
+<img class="toplogo" src="/doc/html/Rlogo.svg" alt="[R logo]" />
+</h1>
+<hr/>
+<div style="text-align: center;">
+<a href="/doc/html/index.html"><img class="arrow" src="/doc/html/up.jpg" alt="[Top]" /></a>
+</div>
+<h2>Vignettes from package 'utils'</h2>
+<table width="100%">
+<col style="width: 22%;" />
+<col style="width:  2%;" />
+<col style="width: 50%;" />
+<col style="width:  8%;" />
+<col style="width:  8%;" />
+<col style="width:  8%;" />
+<tr><td style="text-align: right; vertical-align: top;"><a href="../../../library/utils/doc/Sweave.pdf">utils::Sweave</a></td>
+<td></td><td valign="top">Sweave User Manual</td>
+<td valign="top"><a href="../../../library/utils/doc/Sweave.pdf">PDF</a></td>
+<td valign="top"><a href="../../../library/utils/doc/Sweave.Rnw">source</a></td>
+<td valign="top" style="white-space: nowrap"><a href="../../../library/utils/doc/Sweave.R">R code</a></td></tr>
+</table>
+</body></html>

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/doc/index.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/doc/Sweave.Rnw
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/doc/Sweave.Rnw	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/doc/Sweave.Rnw	(revision 2477)
@@ -0,0 +1,829 @@
+% File src/library/utils/vignettes/Sweave.Rnw
+% Part of the R package, https://www.R-project.org
+% Copyright 2002-2014 Friedrich Leisch and the R Core Team
+% Distributed under GPL 2 or later
+
+\documentclass[a4paper]{article}
+
+%\VignetteIndexEntry{Sweave User Manual}
+%\VignettePackage{utils}
+%\VignetteDepends{tools}
+%\VignetteDepends{datasets}
+%\VignetteDepends{stats}
+
+\title{Sweave User Manual}
+\author{Friedrich Leisch and R-core}
+
+\usepackage[round]{natbib}
+\usepackage{graphicx, Rd}
+\usepackage{listings}
+
+\lstset{frame=trbl,basicstyle=\small\tt}
+\usepackage{hyperref}
+\usepackage{color}
+\definecolor{Blue}{rgb}{0,0,0.8}
+\hypersetup{%
+colorlinks,%
+plainpages=true,%
+linkcolor=black,%
+citecolor=black,%
+urlcolor=Blue,%
+%pdfstartview=FitH,% or Fit
+pdfstartview={XYZ null null 1},%
+pdfview={XYZ null null null},%
+pdfpagemode=UseNone,% for no outline
+pdfauthor={Friedrich Leisch and R-core},%
+pdftitle={Sweave User Manual},%
+pdfsubject={R vignette documentation system}%
+}
+
+\sloppy
+
+\begin{document}
+
+\maketitle
+
+\section{Introduction}
+\label{sec:intro}
+
+Sweave provides a flexible framework for mixing text and \R{} code for
+automatic document generation. A single source file contains both
+documentation text and \R{} code, which are then \emph{woven} into a
+final document containing
+\begin{itemize}
+ \item the documentation text together with
+ \item the \R{} code and/or
+ \item the output of the code (text, graphs)
+\end{itemize}
+This allows the re-generation of a report if the input data change and
+documents the code to reproduce the analysis in the same file that
+contains the report. The \R{} code of the complete analysis is embedded
+into a \LaTeX{} document\footnote{\url{http://www.ctan.org}} using the
+\texttt{noweb} syntax \citep{flm:Ramsey:1998} which is usually used
+for literate programming \cite{fla:Knuth:1984}.  Hence, the full power
+of \LaTeX{} (for high-quality typesetting) and \R{} (for data analysis)
+can be used simultaneously. See \cite{e1071-papers:Leisch:2002} and
+references therein for more general thoughts on dynamic report
+generation and pointers to other systems.
+
+Sweave uses a modular concept using different drivers for the actual
+translations. Obviously different drivers are needed for different
+text markup languages (\LaTeX{}, HTML, \ldots). Several packages on
+CRAN provide support for other word processing systems (see
+Appendix~A).
+
+
+\section{Noweb files}
+\label{sec:noweb}
+
+\texttt{noweb} \citep{flm:Ramsey:1998} is a simple
+literate-programming tool which allows combining program source code
+and the corresponding documentation into a single file.  A
+\texttt{noweb} file is a simple text file which consists of a sequence
+of code and documentation segments, called \emph{chunks}:
+\begin{description}
+\item[Documentation chunks] start with a line that has an at sign
+  (\verb|@|) as first character, followed by a space or newline
+  character. The rest of this line is a comment and ignored.
+  Typically documentation chunks will contain text in a markup
+  language like \LaTeX{}.  The chunk continues until a new code or
+  documentation chunk is started: note that Sweave does not interpret
+  the contents of documentation chunks, and so will identify chunk
+  indicators even inside \LaTeX{} verbatim environments.
+
+\item[Code chunks] start with \verb|<<options>>=| at the beginning of
+  a line; again the rest of the line is a comment and ignored.
+\end{description}
+The default for the first chunk is documentation.
+
+In the simplest usage of \texttt{noweb}, the options (if present) of
+the code chunks give the names of source code files, and the tool
+\texttt{notangle} can be used to extract the code chunks from the
+\texttt{noweb} file. Multiple code chunks can have the same name, the
+corresponding code chunks are the concatenated when the source code is
+extracted. \texttt{noweb} has some additional mechanisms to
+cross-reference code chunks (the \verb|[[...]]| operator, etc.),
+Sweave does currently not use nor support these features, so they are
+not described here.
+
+
+\section{Sweave files}
+\label{sec:sweavefile}
+
+\subsection{A simple example}
+
+Sweave source files are \texttt{noweb} files with some additional
+syntax that allows some additional control over the final
+output. Traditional \texttt{noweb} files have the extension
+\file{.nw}, which is also fine for Sweave files (and fully supported
+by the software). Additionally, Sweave currently recognizes files with
+extensions \file{.rnw}, \file{.Rnw}, \file{.snw} and
+\file{.Snw} to directly indicate a \texttt{noweb} file with Sweave
+extensions. We will use \file{.Rnw} throughout this document.
+
+A minimal Sweave file is shown in Figure~\ref{fig:ex1.Rnw}, which
+contains two code chunks embedded in a simple \LaTeX{}
+document. Running
+<<>>=
+rnwfile <- system.file("Sweave", "example-1.Rnw", package = "utils")
+Sweave(rnwfile)
+@
+translates this into the \LaTeX{} document shown in
+Figures~\ref{fig:ex1.tex} and~\ref{fig:ex1.pdf}. The latter can also
+be created directly from within \R{} using
+<<>>=
+tools::texi2pdf("example-1.tex")
+@
+
+The first difference between \file{example-1.Rnw} and
+\file{example-1.tex} is that the \LaTeX{} style file
+\file{Sweave.sty} is automatically loaded, which provides
+environments for typesetting \R{} input and output (the \LaTeX{}
+environments \texttt{Sinput} and \texttt{Soutput}). Otherwise, the
+documentation chunks are copied without any modification from
+\file{example-1.Rnw} to \file{example-1.tex}.
+
+\begin{figure}[htbp]
+  \centering
+  \begin{minipage}{0.9\textwidth}
+    \lstinputlisting{\Sexpr{rnwfile}}
+  \end{minipage}
+  \caption{A minimal Sweave file: \file{example-1.Rnw}.}
+  \label{fig:ex1.Rnw}
+\end{figure}
+
+The real work of Sweave is done on the code chunks: The first code
+chunk has no name, hence the default behavior of Sweave is used, which
+transfers both the \R{} commands and their respective output to the \LaTeX{}
+file, embedded in \texttt{Sinput} and \texttt{Soutput} environments,
+respectively.
+
+The second code chunk shows one of the Sweave extension to the
+\texttt{noweb} syntax: Code chunk names can be used to pass options to
+Sweave which control the final output.
+\begin{itemize}
+\item The chunk is marked as a figure chunk (\texttt{fig=TRUE}) such
+  that Sweave creates (by default) a PDF file of the plot created by
+  the commands in the chunk. Furthermore, a
+  \verb|\includegraphics{example-1-002}| statement is inserted into
+  the \LaTeX{} file (details on the choice of file names for figures
+  follow later in this manual).
+\item Option \texttt{echo=FALSE} indicates that the \R{} input should not
+  be included in the final document (no \texttt{Sinput} environment).
+\end{itemize}
+
+\begin{figure}[htbp]
+  \centering
+  \begin{minipage}{0.9\textwidth}
+    \lstinputlisting{example-1.tex}
+  \end{minipage}
+  \caption{Running \texttt{Sweave("example-1.Rnw")} produces the file
+    \file{example-1.tex}.}
+  \label{fig:ex1.tex}
+\end{figure}
+
+\begin{figure}[htbp]
+  \centering
+  \fbox{\begin{minipage}{0.8\textwidth}
+    \includegraphics[width=\textwidth]{example-1}
+  \end{minipage}}
+  \caption{The final document is created by running \texttt{pdflatex} on
+    \file{example-1.tex}.}
+  \label{fig:ex1.pdf}
+\end{figure}
+
+
+\subsection{Sweave options}
+
+Options control how code chunks and their output (text, figures) are
+transferred from the \file{.Rnw} file to the \file{.tex} file. All
+options have the form \texttt{key=value}, where \texttt{value} can be
+a number, string or logical value.  Several options can be specified at
+once (separated by commas), all options must take a value (which must
+not contain a comma or equal sign). Logical options can take the
+values \texttt{TRUE}, \texttt{FALSE}, \texttt{T}, \texttt{F} as well
+as lower-case and capitalized versions of the first two.
+
+In the \file{.Rnw} file options can be specified either
+\begin{enumerate}
+ \item inside the angle brackets at the beginning of a code chunk,
+  modifying the behaviour \emph{only for this chunk}, or
+ \item anywhere in a documentation chunk using the command %
+  \begin{quote}
+    \verb|\SweaveOpts{opt1=value1, opt2=value2, ..., optN=valueN}|
+  \end{quote}
+  which modifies the defaults for the rest of the document, i.e.,
+  \emph{all code chunks after the statement}. Hence, an
+  \verb|\SweaveOpts| statement in the preamble of the document sets
+  defaults for all code chunks.
+\end{enumerate}
+Further, global options can be specified (as a comma-separated list of
+\texttt{key=value} items) in the environment variable
+\verb|SWEAVE_OPTIONS|, and via the \verb|--options=| flag of
+\verb|R CMD Sweave|.
+
+Which options are supported depends on the driver in use. All drivers
+should at least support the following options (all options appear
+together with their default value, if any):
+\begin{description}
+  \item[split=FALSE:] a logical value. If \texttt{TRUE}, then the output is
+   distributed over several files, if \texttt{FALSE} all output is
+   written to a single file.  Details depend on the driver.
+
+ \item[label:] a text label for the code chunk, which is used for
+   file-name creation when \texttt{split=TRUE}.  It is also used in
+   the comments added above the chunk when the file is processed by
+   \texttt{Rtangle} (provided the \texttt{annotate} option is true, as
+   it is by default), and as part of the file names for files
+   generated by figure chunks.
+
+   Because labels can be part of file names, they should contain only
+   alphanumeric characters and \texttt{\#+-\_}.  (Including \texttt{.}
+   can cause confusion with file extensions.)
+\end{description}
+
+The first (and only the first) option in a code chunk name can be
+optionally without a name, then it is taken to be a label. I.e.,
+starting a code chunk with
+\begin{quote}
+  \verb|<<hello, split=FALSE>>|
+\end{quote}
+is the same as
+\begin{quote}
+  \verb|<<split=FALSE, label=hello>>|
+\end{quote}
+but
+\begin{quote}
+  \verb|<<split=FALSE, hello>>|
+\end{quote}
+gives a syntax error. Having an unnamed first argument for labels is
+needed for \texttt{noweb} compatibility. If only \verb|\SweaveOpts| is used for
+setting options, then Sweave files can be written to be fully
+compatible with \texttt{noweb} (as only file names appear in code chunk
+names).
+
+Note that \texttt{split=TRUE} should \textbf{not} be used in package
+vignettes.
+
+The help pages for \texttt{RweaveLatex} and \texttt{Rtangle} list the
+options supported by the default Sweave and Stangle drivers.
+
+Now for the promised details on the file names corresponding to
+figures.  These are of the form \texttt{prefix-label.ext}.  Here
+\texttt{prefix} can be set by the option \texttt{prefix.string},
+otherwise is the basename of the output file (which unless specified
+otherwise is the basename of the input file).  \texttt{label} is the
+label of the code chunk if it has one, otherwise the number of the
+code chunk in the range \texttt{001} to \texttt{999}.  \texttt{ext} is
+the appropriate extension for the type of graphics, e.g.{}
+\texttt{pdf}, \texttt{eps}, \ldots{}.  So for the
+\file{example-1.Rnw} file, the PDF version of the boxplot is
+\file{example-1-002.pdf}, since it is the second code chunk in the
+document.  Note that if \texttt{prefix.string} is used it can specify
+a directory as part of the prefix, so that for example if
+\verb|\SweaveOpts{prefix.string=figures/fig}|, the auto-generated
+figures will be placed in sub-directory \verb|figures|: the Sweave
+document should arrange to create this before use.
+
+\subsection{Using multiple input files}
+
+\LaTeX{} files can include others via \verb|\input{}| commands.  These
+can also be used in Sweave files, but the included files will be
+included by \LaTeX{} and are not processed by Sweave.  The equivalent
+if you want the included files to be processed is the
+\verb|\SweaveInput{}| command.
+
+Included files should use the same Sweave syntax (see below) and
+encoding as the main file.
+
+
+\subsection{Using scalars in text}
+
+There is limited support for using the values of \R{} objects in text
+chunks. Any occurrence of \verb|\Sexpr|\verb|{|\texttt{\textit{expr}}\verb|}|
+is replaced by the string resulting from coercing the value of the
+expression \texttt{expr} to a character vector; only the first element
+of this vector is used. E.g., \verb|\Sexpr{sqrt(9)}| will be replaced
+by the string \texttt{'3'} (without any quotes).
+
+The expression is evaluated in the same environment as the code
+chunks, hence one can access all objects defined in the code chunks
+which have appeared before the expression and were evaluated. The
+expression may contain any valid \R{} code, only braces (\verb|{ }|) are
+not allowed. (This is not really a limitation because more complicated
+computations can be easily done in a hidden code chunk and the result
+then be used inside a \verb|\Sexpr|.)
+
+\subsection{Code chunk reuse}
+
+Named code chunks can be reused in other code chunks following later
+in the document. Consider the simple example
+\begin{quote}% NB: this is indented to avoid interpretation by Sweave.
+\begin{verbatim}
+ <<a>>=
+ x <- 10
+ @
+
+ <<b>>=
+ x + y
+ @
+
+ <<c>>=
+ <<a>>
+ y <- 20
+ <<b>>
+@
+\end{verbatim}
+\end{quote}
+which is equivalent to defining the last code chunk as
+\begin{quote}
+\begin{verbatim}
+ <<c>>=
+ x <- 10
+ y <- 20
+ x + y
+ @
+\end{verbatim}
+\end{quote}
+
+The chunk reference operator \verb|<<>>| takes only the name of the
+chunk as its argument: no additional Sweave options are allowed.
+It has to occur at the beginning of a line.
+
+References to unknown chunk names are omitted, with a warning.
+
+\subsection{Syntax definition}
+
+So far we have only talked about Sweave files using \texttt{noweb} syntax
+(which is the default). However, Sweave allows the user to redefine
+the syntax marking documentation and code chunks, using scalars in
+text or reuse code chunks.
+
+\begin{figure}[htbp]
+  \centering
+  \begin{minipage}{0.9\textwidth}
+    \lstinputlisting{example-1.Stex}
+  \end{minipage}
+  \caption{An Sweave file using \LaTeX{} syntax: \file{example-1.Stex}.}
+  \label{fig:ex1.Stex}
+\end{figure}
+
+Figure~\ref{fig:ex1.Stex} shows the example from
+Figure~\ref{fig:ex1.Rnw} using the \texttt{SweaveSyntaxLatex}
+definition. It can be created using
+<<>>=
+SweaveSyntConv(rnwfile, SweaveSyntaxLatex)
+@
+
+Code chunks are now enclosed in \texttt{Scode}
+environments, code chunk reuse is performed using
+\verb|\Scoderef{chunkname}|. All other operators are the same as in
+the noweb-style syntax.
+
+Which syntax is used for a document is determined by the extension of
+the input file, files with extension\footnote{or the lowercase
+  versions, for convenience on case-insensitive file systems.}
+\file{.Rtex} or \file{.Stex} are assumed to follow the
+\LaTeX-style syntax. Alternatively the syntax can be changed at any
+point within the document using the commands
+\begin{quote}
+  \verb|\SweaveSyntax{SweaveSyntaxLatex}|
+\end{quote}
+or
+\begin{quote}
+  \verb|\SweaveSyntax{SweaveSyntaxNoweb}|
+\end{quote}
+at the beginning of a line within a documentation chunk. Syntax
+definitions are simply lists of regular expression for several Sweave
+commands: see the two default definitions mentioned above for
+examples.  (More detailed instructions will follow once the API has
+stabilized).
+
+\subsection{Encoding}
+
+\LaTeX{} documents are traditionally written entirely in ASCII, using
+\LaTeX{} escapes such as \verb|\'e| for accented characters.  This
+can be inconvenient when writing a non-English document, and an
+alternative input encoding can be selected by using a statement such as
+\begin{quote}
+  \verb|\usepackage[latin1]{inputenc}|
+\end{quote}
+in the document's preamble, to tell \LaTeX{} to translate the input to
+its own escapes.  There is a wide range of input encodings which are
+supported, at least partially, and the more recent \LaTeX{} package
+\texttt{inputenx} supports more.  Other encodings commonly encountered
+in Sweave documents are \texttt{latin9}, \texttt{utf8} and
+\texttt{ansinew} (the CP1252 codepage on Windows).  Greater
+coverage\footnote{including Eastern European, Greek and Hebrew
+  letters.}  of UTF-8 can be obtained by
+\begin{quote}
+  \verb|\usepackage[utf8]{inputenx}|
+  \verb|\input{ix-utf8enc.dfu}|
+\end{quote}
+
+As from \R{} 3.1.0, the UTF-8 encoding is handled preferentially to
+other encodings.  Whereas Sweave will convert R code to the local
+encoding in general, it leaves UTF-8 code in that encoding, and
+outputs in that encoding as well.  Besides the declaration scheme
+above, a UTF-8 encoding may be obtained by the \LaTeX{} comment
+\begin{quote}
+  \verb|%\SweaveUTF8|
+\end{quote}
+
+The previous paragraphs covered the documentation sections, but what of
+the code sections where \LaTeX{} escapes cannot be used?  The first
+piece of advice is to use only ASCII code sections as anything else
+will reduce the portability of your document.  But \R{} code can be
+included if in the input encoding declared in the preamble.
+
+The next complication is inclusions: the final vignette may well
+include \R{} output, \LaTeX{} or other Sweave files \emph{via}
+\verb|\input{}| and \verb|\SweaveInput{}| lines, a bibliography and
+figures. It is the user's responsibility that the text inclusions are
+covered by the declared input encoding.  \LaTeX{} allows the input
+encoding to be changed by
+\begin{quote}
+  \verb|\inputencoding{something}|
+\end{quote}
+statements: these may not work well in Sweave processing.  Since
+\verb|\usepackage[latin1]{inputenc}| is typically not legal \LaTeX{} code
+in an included file, it is easiest to declare the encoding to Sweave
+using the \verb|%\SweaveUTF8| comment.
+
+It is all too easy for BiBTeX to pick up UTF-8-encoded references for
+a Latin-1 document, or \emph{vice versa}.
+
+R output is again to a large extent under the user's control.  If a
+Latin-1 Sweave document is processed by \R{} running a Latin-1 locale or
+a UTF-8 document is processed in a UTF-8 locale, the only problems
+which are likely to arise are from handling data in another encoding,
+but it may be necessary to declare the document's encoding to cover
+the \R{} output which is generated even if the document is itself ASCII.
+One common problem is the quotes produced by \verb|\sQuote()| and
+\verb|\dQuote()|: these will be in UTF-8 when \R{} is run in a UTF-8
+locale, and will be in CP1252 when Sweave is run from \verb|Rgui.exe|
+on Windows.  Two possible solutions are to suppress fancy quotes by
+\verb|options(useFancyQuotes=FALSE)| or to force UTF-8 by
+\verb|options(useFancyQuotes="UTF-8")|.
+
+The encoding of figures is not usually an issue as they are either
+bitmaps or include encoding information: it may be necessary to use
+the \texttt{pdf.encoding} Sweave option to set the \texttt{pdf()}
+device up appropriately.
+
+
+\section{Tangling and weaving}
+
+The user front-ends of the Sweave system are the two \R{} functions
+\texttt{Stangle()} and \texttt{Sweave()}, both are contained in
+package~\pkg{utils}.  \texttt{Stangle} can be used to extract only
+the code chunks from an \file{.Rnw} file and write to one or several
+files.  \texttt{Sweave()} runs the code chunks through \R{} and replaces
+them with the respective input and/or output.  \texttt{Stangle} is
+actually just a wrapper function for \texttt{Sweave}, which uses a
+tangling instead of a weaving driver by default. See
+<<eval=FALSE>>=
+help("Sweave")
+@
+for more details and arguments of the functions.
+
+\subsection{The \texttt{RweaveLatex} driver}
+
+This driver transforms \file{.Rnw} files with \LaTeX{} documentation
+chunks and \R{} code chunks to proper \LaTeX{} files (for typesetting both
+with standard \texttt{latex} or \texttt{pdflatex}), see
+<<eval=FALSE>>=
+help("RweaveLatex")
+@
+for details, including the supported options.
+
+\subsubsection{Writing to separate files}
+
+If \texttt{split} is set to \texttt{TRUE}, then all text corresponding
+to code chunks (the \texttt{Sinput} and \texttt{Soutput} environments)
+is written to separate files. The file names are of form
+\file{prefix.string-label.tex}, if several code chunks have the same
+label, their outputs are concatenated. If a code chunk has no label,
+then the number of the chunk is used instead. The same naming scheme
+applies to figures.  You do need to ensure that the file names
+generated are valid and not so long that there are not regarded as the
+same by your OS (some file systems only recognize 13 characters).
+
+\subsubsection{\LaTeX{} style file}
+
+The driver automatically inserts a \verb|\usepackage{Sweave.sty}|
+command as last line before the \verb|\begin{document}| statement of
+  the final \LaTeX{} file if no \verb|\usepackage{Sweave}| is found in
+  the Sweave source file. This style file defines the environments
+  \texttt{Sinput} and \texttt{Soutput} for typesetting code chunks. If
+  you do not want to include the standard style file, e.g., because
+  you have your own definitions for \texttt{Sinput} and
+  \texttt{Soutput} environments in a different place, simply insert a
+  comment like
+\begin{verbatim}
+% \usepackage{Sweave}
+\end{verbatim}
+in the preamble of your latex file, this will prevent automatic
+insertion of the line.
+
+
+\subsubsection{Figure sizes}
+
+\file{Sweave.sty} sets the default \emph{\LaTeX{}} figure width (which
+is independent of the size of the generated EPS or PDF files).  The
+current default is
+\begin{verbatim}
+\setkeys{Gin}{width=0.8\textwidth}
+\end{verbatim}
+if you want to use another width for the figures that are
+automatically generated and included by Sweave, simply add a line
+similar to the one above \emph{after} \verb|\begin{document}|. If you
+want no default width for figures insert a
+\verb|\usepackage[nogin]{Sweave}| in the header of your file.  Note
+that a new graphics device is opened for each figure chunk (one with
+option \texttt{fig=TRUE}), hence all graphical parameters of the
+\texttt{par()} command must be set in each single figure chunk and
+are forgotten after the respective chunk (because the device is
+closed when leaving the chunk).
+
+Attention: One thing that gets easily confused are the width/height
+parameters of the \R{} graphics devices and the corresponding arguments
+to the \LaTeX{} \verb|\includegraphics| command. The Sweave options
+\texttt{width} and \texttt{height} are passed to the \R{} graphics
+devices, and hence affect the default size of the produced EPS and PDF
+files. They do not affect the size of figures in the document, by
+default they will always be 80\% of the current text width. Use
+\verb|\setkeys{Gin}| to modify figure sizes or use explicit
+\verb|\includegraphics| commands in combination with the Sweave option
+\texttt{include=FALSE}.
+
+\subsubsection{Prompts and text width}
+
+By default the driver gets the prompts used for input lines
+and continuation lines from R's \texttt{options()} settings. To set new
+prompts use something like
+\begin{verbatim}
+options(prompt = "MyR> ", continue = "...")
+\end{verbatim}
+see \texttt{help(options)} for details. Similarly the output text
+width is controlled by option \texttt{"width"}.
+
+
+\subsubsection{Graphics devices}
+
+The default graphics device for \texttt{fig=TRUE} chunks is
+\texttt{pdf()}: the standard options \texttt{pdf}, \texttt{eps},
+\texttt{png} and \texttt{jpg} allow one or more of these to be
+selected for a particular chunk or (via \verb|\SweaveOpts|) for the
+whole document.  It can be convenient to select PNG for a particular
+figure chunk by something like
+\verb|<<figN, fig=TRUE, pdf=FALSE, png=TRUE>>|: \texttt{pdflatex}
+should automatically include the PNG file for that chunk.
+
+You can define your own graphics devices and select one of them by the
+option \texttt{grdevice=my.Swd} where the device function (here
+\texttt{my.Swd}) is defined in a hidden code chunk. For example, we
+could make use of the \texttt{cairo\_pdf} device by
+\begin{verbatim}
+my.Swd <- function(name, width, height, ...)
+  grDevices::cairo_pdf(filename = paste(name, "pdf", sep = "."),
+                       width = width, height = height)
+\end{verbatim}
+Specialized custom graphics devices may need a customized way to shut
+them down in place of \verb|graphics.off()|: this can be supplied
+\emph{via} a companion function \verb|my.Swd.off|, which is called
+with no arguments.
+
+For a complete example see the file
+\file{src/library/utils/tests/customgraphics.Rnw} in the \R{} sources.
+
+\subsection{The \texttt{Rtangle} driver}
+
+This driver can be used to extract \R{} code chunks from a \file{.Rnw}
+file. Code chunks can either be written to one large file or separate
+files (one for each code chunk). The options \texttt{split},
+\texttt{prefix}, and \texttt{prefix.string} have the same defaults and
+interpretation as for the \texttt{RweaveLatex} driver. Use the
+standard \texttt{noweb} command line tool \texttt{notangle} if chunks
+other than \R{} code should be extracted. See
+<<eval=FALSE>>=
+help("Rtangle")
+@
+for details.
+
+Note that \texttt{split=TRUE} rarely makes much sense, as the files
+produced are often interdependent and need to be run in a particular
+order, an order which is often not the alphabetical order of the
+files.
+
+
+\section{Adding Sweave Drivers}
+
+Adding drivers is relatively simple by modelling them on\footnote{but
+  if you copy, \textbf{do} be careful not to infringe R-core's
+  copyright: the copyright notices in the \R{} sources \textbf{must} also
+  be copied.} the existing \texttt{RweaveLatex} and \texttt{Rtangle}
+drivers.
+
+An Sweave driver is a function of no arguments which should return a
+list of five functions:
+\begin{description}
+\item{\texttt{setup(file, syntax, \dots)}:} Set up the driver, e.g.{}
+    open the output file.  Its return value is an object which is
+    passed to the next three functions, and can be updated by the next
+    two.  The value should be a list, and contain a component
+    \texttt{options}, a named list of the default settings for the
+    options needed by \texttt{runcode}.
+\item{\texttt{runcode(object, chunk, options)}:} Process a code
+    chunk.  Returns a possibly updated \texttt{object}.  Argument
+    \texttt{chunk} is a character vector, and \texttt{options} is a
+    options list for this chunk.
+\item{\texttt{writedoc(object, chunk)}:} Write out a documentation
+    chunk.  Returns a possibly updated \texttt{object}.
+\item{\texttt{finish(object, error)}:} Finish up, or clean up if
+    \texttt{error} is true.
+\item{\texttt{checkopts(options)}:} Converts/validates \texttt{options}
+    given as a named list of character strings.
+\end{description}
+
+Note that the \texttt{setup} function should have a \texttt{\ldots}
+argument.  It will be passed additional arguments from a
+\texttt{Sweave()} call, but in future \texttt{Sweave} may itself set
+options and pass them on the setup function: one such may be the
+encoding used for the text to be processed.
+
+\bibliographystyle{jss}
+\bibliography{Sweave}
+
+\newpage
+\appendix
+
+
+\section{Frequently Asked Questions}
+\label{sec:faq}
+
+  \subsection{How can I get Emacs to automatically recognize files
+    in Sweave format?}
+
+  Recent versions of ESS (Emacs speaks statistics,
+  \url{https://ESS.R-project.org/}) automatically recognize files with
+  extension \file{.Rnw} as Sweave files and turn on the correct
+  modes. Please follow the instructions on the ESS homepage on how to
+  install ESS on your computer.
+
+  \subsection{Can I run Sweave directly from a shell?}
+
+  E.g., for writing makefiles it can be useful to run Sweave directly
+  from a shell rather than manually starting \R{} and then running
+  Sweave. This can easily be done using
+\begin{verbatim}
+R CMD Sweave file.Rnw
+\end{verbatim}
+
+   % A more elaborate solution which also includes automatically running
+   % \texttt{latex} has been written by Gregor Gorjanc and is available
+   % at \url{http://www.bfro.uni-lj.si/MR/ggorjan/software/shell/Sweave.sh}.
+
+  \subsection{Why does \LaTeX{} not find my EPS and PDF graphic files when
+     the file name contains a dot?}
+
+   Sweave uses the standard \LaTeX{} package \texttt{graphicx} to
+   handle graphic files, which automatically chooses the type of file,
+   provided the basename given in the \verb|\includegraphics{}|
+   statement has no extension.  Hence, you may run into trouble with
+   graphics handling if the basename of your Sweave file contains
+   dots: \file{foo.Rnw} is OK, while \file{foo.bar.Rnw} is not.
+
+   \subsection{Empty figure chunks give \LaTeX{} errors.}
+
+   When a code chunk with \texttt{fig=TRUE} does not call any plotting
+   functions, invalid PDF (or EPS) files may be created. Sweave cannot
+   know if the code in a figure chunk actually plotted something or
+   not, so it will try to include the graphics, which is bound to
+   fail.
+
+   \subsection{Why do R lattice graphics not work?}
+
+   In recent versions of Sweave they do if they would when run at the
+   command line: some calls (e.g.{} those inside loops) need to be
+   explicitly \code{print()}-ed.
+
+   \subsection{How can I get Black \& White lattice graphics?}
+
+   What is the most elegant way to specify that strip panels are to have
+   transparent backgrounds and graphs are to be in black and white when
+   lattice is being used with Sweave?  I would prefer a global option that
+   stays in effect for multiple plots.
+
+   Answer by Deepayan Sarkar: I'd do something like this as part of
+   the initialization:
+\begin{verbatim}
+ <<...>>
+ library(lattice)
+ ltheme <- canonical.theme(color = FALSE)     ## in-built B&W theme
+ ltheme$strip.background$col <- "transparent" ## change strip bg
+ lattice.options(default.theme = ltheme)      ## set as default
+ @
+\end{verbatim}
+
+  \subsection{Creating several figures from one figure chunk does
+     not work}
+
+   Consider that you want to create several graphs in a loop similar
+   to
+\begin{verbatim}
+ <<fig=TRUE>>
+ for (i in 1:4) plot(rnorm(100)+i)
+ @
+\end{verbatim}
+   This will currently \textbf{not} work, because Sweave allows
+   \textbf{only one graph} per figure chunk. The simple reason is that
+   Sweave opens a \texttt{pdf} device before executing the code and
+   closes it afterwards. If you need to plot in a loop, you have to
+   program it along the lines of
+\begin{verbatim}
+ <<results=tex,echo=FALSE>>=
+ for(i in 1:4){
+    fname <- paste("myfile", i, ".pdf", sep = "")
+    pdf(file = fname, width = 6, height = 6)
+    plot(rnorm(100)+i)
+    dev.off()
+    cat("\\includegraphics{", fname, "}\n\n", sep = "")
+ }
+ @
+\end{verbatim}
+
+
+ \subsection{How can I set default \texttt{par()} settings for figure
+    chunks?}
+
+  Because Sweave opens a new device for each graphics file in each
+  figure chunk, using \texttt{par()} has only an effect if it is used
+  inside a figure chunk. If you want to use the same settings for a
+  series of figures, it is easier to use a hook function than
+  repeating the same \texttt{par()} statement in each figure chunk.
+
+  The effect of
+\begin{verbatim}
+  options(SweaveHooks = list(fig = function() par(bg = "red", fg = "blue")))
+\end{verbatim}
+  should be easy to spot.
+
+  \subsection{How can I change the formatting of R input and output
+     chunks?}
+
+   Sweave uses the \texttt{fancyvrb} package for formatting all \R{} code
+   and text output. \texttt{fancyvrb} is a very powerful and flexible
+   package that allows fine control for layouting text in verbatim
+   environments. If you want to change the default layout, simply read
+   the \texttt{fancyvrb} documentation and modify the definitions of
+   the \texttt{Sinput} and \texttt{Soutput} environments in
+   \file{Sweave.sty}, respectively.
+
+
+  \subsection{How can I change the line length of R input and
+     output?}
+
+   Sweave respects the usual way of specifying the desired line length
+   in R, namely \texttt{options(width)}. E.g., after
+   \texttt{options(width = 40)} lines will be formatted to have at most 40
+   characters (if possible).
+
+
+  \subsection{Can I use Sweave for Word files?}
+
+  Not directly, but package~\pkg{SWord} provides similar
+  functionality for Microsoft Word on Windows platforms.
+
+  \subsection{Can I use Sweave for OpenOffice files?}
+
+   Yes, package \CRANpkg{odfWeave} provides functions for using Sweave in
+   combination with OpenOffice Writer rather than \LaTeX.
+
+   \subsection{Can I use Sweave for HTML files?}
+
+   Yes, package \CRANpkg{R2HTML} provides a driver for using Sweave in
+   combination with HTML rather than \LaTeX.
+
+   \subsection{After loading package \pkg{R2HTML} Sweave doesn't
+     work properly!}
+
+   Package \CRANpkg{R2HTML} registers an Sweave driver for HTML files
+   using the same file extensions as the default \texttt{noweb}
+   syntax, and after that its syntax is on the search list before the
+   default syntax.  Using
+\begin{verbatim}
+  options(SweaveSyntax = "SweaveSyntaxNoweb")
+\end{verbatim}
+or calling Sweave like
+\begin{verbatim}
+  Sweave(..., syntax = "SweaveSyntaxNoweb")
+\end{verbatim}
+ensures the default syntax even after loading package \CRANpkg{R2HTML}.
+
+\end{document}
+
+%%% Local Variables:
+%%% mode: latex
+%%% TeX-master: t
+%%% End:
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/doc/Sweave.pdf
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/doc/Sweave.pdf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/Meta/links.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/Meta/links.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/Meta/Rd.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/Meta/Rd.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/Meta/vignette.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/Meta/vignette.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/Meta/package.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/Meta/package.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/Meta/nsInfo.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/Meta/nsInfo.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/Meta/hsearch.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/Meta/hsearch.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/help/AnIndex
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/help/AnIndex	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/help/AnIndex	(revision 2477)
@@ -0,0 +1,301 @@
+utils-package	utils-package
+$.person	person
+.DollarNames	rcompgen
+.DollarNames.default	rcompgen
+.DollarNames.environment	rcompgen
+.DollarNames.list	rcompgen
+.romans	roman
+.S3methods	methods
+?	Question
+??	help.search
+adist	adist
+alarm	alarm
+apropos	apropos
+aregexec	aregexec
+argsAnywhere	getAnywhere
+as.character.person	person
+as.person	person
+as.person.default	person
+as.personList	person
+as.personList.default	person
+as.personList.person	person
+as.relistable	relist
+as.roman	roman
+aspell	aspell
+aspell-utils	aspell-utils
+aspell_package_C_files	aspell-utils
+aspell_package_Rd_files	aspell-utils
+aspell_package_R_files	aspell-utils
+aspell_package_vignettes	aspell-utils
+aspell_write_personal_dictionary_file	aspell-utils
+assignInMyNamespace	getFromNamespace
+assignInNamespace	getFromNamespace
+available.packages	available.packages
+BATCH	BATCH
+bibentry	bibentry
+browseEnv	browseEnv
+browseURL	browseURL
+browseVignettes	browseVignettes
+bug.report	bug.report
+build	PkgUtils
+c.person	person
+capture.output	capture.output
+changedFiles	changedFiles
+check	PkgUtils
+checkCRAN	mirrorAdmin
+chooseBioCmirror	chooseBioCmirror
+chooseCRANmirror	chooseCRANmirror
+CITATION	citation
+citation	citation
+cite	cite
+citeNatbib	cite
+citEntry	citEntry
+citFooter	citEntry
+citHeader	citEntry
+close.socket	close.socket
+close.txtProgressBar	txtProgressBar
+combn	combn
+compareVersion	compareVersion
+COMPILE	COMPILE
+completion	rcompgen
+contrib.url	contrib.url
+count.fields	count.fields
+CRAN.packages	utils-defunct
+create.post	create.post
+data	data
+data.entry	dataentry
+dataentry	dataentry
+de	dataentry
+de.ncols	dataentry
+de.restore	dataentry
+de.setup	dataentry
+debugger	debugger
+demo	demo
+download.file	download.file
+download.packages	download.packages
+dump.frames	debugger
+edit	edit
+edit.data.frame	edit.data.frame
+edit.default	edit
+edit.matrix	edit.data.frame
+edit.vignette	vignette
+emacs	edit
+example	example
+file.edit	file.edit
+fileSnapshot	changedFiles
+file_test	filetest
+find	apropos
+findLineNum	findLineNum
+fix	fix
+fixInNamespace	getFromNamespace
+flush.console	flush.console
+format.object_size	object.size
+format.person	person
+formatOL	format
+formatUL	format
+getAnywhere	getAnywhere
+getBioCmirrors	chooseBioCmirror
+getCRANmirrors	chooseCRANmirror
+getFromNamespace	getFromNamespace
+getParseData	getParseData
+getParseText	getParseData
+getS3method	getS3method
+getSrcDirectory	sourceutils
+getSrcFilename	sourceutils
+getSrcLocation	sourceutils
+getSrcref	sourceutils
+getTxtProgressBar	txtProgressBar
+glob2rx	glob2rx
+globalVariables	globalVariables
+head	head
+head.data.frame	head
+head.default	head
+head.ftable	head
+head.function	head
+head.matrix	head
+head.table	head
+help	help
+help.request	help.request
+help.search	help.search
+help.start	help.start
+history	savehistory
+hsearch_db	hsearch-utils
+hsearch_db_concepts	hsearch-utils
+hsearch_db_keywords	hsearch-utils
+INSTALL	INSTALL
+install.packages	install.packages
+installed.packages	installed.packages
+is.relistable	relist
+isS3method	isS3method
+limitedLabels	recover
+LINK	LINK
+loadhistory	savehistory
+localeToCharset	localeToCharset
+ls.str	ls_str
+lsf.str	ls_str
+maintainer	maintainer
+make.packages.html	make.packages.html
+make.socket	make.socket
+makeRweaveLatexCodeRunner	SweaveUtils
+memory.limit	memory.size
+memory.size	memory.size
+menu	menu
+methods	methods
+mirror2html	mirrorAdmin
+mirrorAdmin	mirrorAdmin
+modifyList	modifyList
+new.packages	update.packages
+news	news
+nsl	nsl
+object.size	object.size
+old.packages	update.packages
+package.contents	utils-defunct
+package.skeleton	package.skeleton
+packageDescription	packageDescription
+packageName	packageName
+packageStatus	packageStatus
+packageVersion	packageDescription
+page	page
+person	person
+personList	person
+pico	edit
+print.bibentry	bibentry
+print.Bibtex	toLatex
+print.browseVignettes	browseVignettes
+print.changedFiles	changedFiles
+print.fileSnapshot	changedFiles
+print.getAnywhere	getAnywhere
+print.hsearch	help.search
+print.Latex	toLatex
+print.ls_str	ls_str
+print.MethodsFunction	methods
+print.news_db	news
+print.object_size	object.size
+print.packageDescription	packageDescription
+print.packageIQR	data
+print.packageStatus	packageStatus
+print.person	person
+print.sessionInfo	sessionInfo
+print.socket	make.socket
+print.vignette	vignette
+process.events	process.events
+prompt	prompt
+prompt.data.frame	prompt
+prompt.default	prompt
+promptData	promptData
+promptImport	prompt
+promptPackage	promptPackage
+Question	Question
+rc.getOption	rcompgen
+rc.options	rcompgen
+rc.settings	rcompgen
+rc.status	rcompgen
+rcompgen	rcompgen
+read.csv	read.table
+read.csv2	read.table
+read.delim	read.table
+read.delim2	read.table
+read.DIF	read.DIF
+read.fortran	read.fortran
+read.fwf	read.fwf
+read.socket	read.socket
+read.table	read.table
+readCitationFile	citation
+recover	recover
+relist	relist
+relist.default	relist
+relist.factor	relist
+relist.list	relist
+relist.matrix	relist
+REMOVE	REMOVE
+remove.packages	remove.packages
+removeSource	removeSource
+RHOME	RHOME
+Rprof	Rprof
+Rprofmem	Rprofmem
+Rscript	Rscript
+RShowDoc	RShowDoc
+RSiteSearch	RSiteSearch
+rtags	rtags
+Rtangle	Rtangle
+RtangleSetup	Rtangle
+RtangleWritedoc	SweaveUtils
+RweaveChunkPrefix	SweaveUtils
+RweaveEvalWithOpt	SweaveUtils
+RweaveLatex	RweaveLatex
+RweaveLatexFinish	SweaveUtils
+RweaveLatexOptions	SweaveUtils
+RweaveLatexSetup	RweaveLatex
+RweaveLatexWritedoc	SweaveUtils
+RweaveTryStop	SweaveUtils
+R_INSTALL_TAR	INSTALL
+savehistory	savehistory
+select.list	select.list
+sessionInfo	sessionInfo
+setBreakpoint	findLineNum
+setRepositories	setRepositories
+setTxtProgressBar	txtProgressBar
+SHLIB	SHLIB
+stack	stack
+stack.data.frame	stack
+stack.default	stack
+Stangle	Sweave
+str	str
+str.data.frame	str
+str.default	str
+strOptions	str
+summary.packageStatus	packageStatus
+summaryRprof	summaryRprof
+suppressForeignCheck	globalVariables
+Sweave	Sweave
+SweaveHooks	SweaveUtils
+SweaveSyntaxLatex	Sweave
+SweaveSyntaxNoweb	Sweave
+SweaveSyntConv	SweaveSyntConv
+SweaveUtils	SweaveUtils
+tail	head
+tail.data.frame	head
+tail.default	head
+tail.ftable	head
+tail.function	head
+tail.matrix	head
+tail.table	head
+tar	tar
+timestamp	savehistory
+toBibtex	toLatex
+toBibtex.person	person
+toLatex	toLatex
+toLatex.sessionInfo	sessionInfo
+txtProgressBar	txtProgressBar
+type.convert	type.convert
+unlist.relistable	relist
+unstack	stack
+unstack.data.frame	stack
+unstack.default	stack
+untar	untar
+unzip	unzip
+update.packages	update.packages
+update.packageStatus	packageStatus
+upgrade	packageStatus
+upgrade.packageStatus	packageStatus
+url.show	url.show
+URLdecode	URLencode
+URLencode	URLencode
+utils	utils-package
+utils-defunct	utils-defunct
+utils-deprecated	utils-deprecated
+vi	edit
+View	View
+vignette	vignette
+vignettes	vignette
+write.csv	write.table
+write.csv2	write.table
+write.socket	read.socket
+write.table	write.table
+wsbrowser	browseEnv
+xedit	edit
+xemacs	edit
+zip	zip
+zip.file.extract	utils-defunct
+[.getAnywhere	getAnywhere
+[.person	person
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/help/paths.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/help/paths.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/help/utils.rdb
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/help/utils.rdb
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/help/aliases.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/help/aliases.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/help/utils.rdx
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/help/utils.rdx
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/Sweave/Sweave-test-1.Rnw
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/Sweave/Sweave-test-1.Rnw	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/Sweave/Sweave-test-1.Rnw	(revision 2477)
@@ -0,0 +1,71 @@
+% -*- mode: noweb; noweb-default-code-mode: R-mode; -*-
+\documentclass[a4paper]{article}
+
+\title{A Test File}
+\author{Friedrich Leisch}
+
+\SweaveOpts{echo=FALSE}
+\usepackage{a4wide}
+
+\begin{document}
+
+\maketitle
+
+A simple example: the integers from 1 to 10 are
+<<print=TRUE>>=
+1:10
+<<results=hide>>=
+print(1:20)
+@ % the above is just to ensure that 2 code chunks can follow each other
+
+We can also emulate a simple calculator:
+<<echo=TRUE,print=TRUE>>=
+1 + 1
+1 + pi
+sin(pi/2)
+@
+
+Now we look at Gaussian data:
+
+<<>>=
+library(stats)
+x <- rnorm(20)
+print(x)
+print(t1 <- t.test(x))
+@
+Note that we can easily integrate some numbers into standard text: The
+third element of vector \texttt{x} is \Sexpr{x[3]}, the
+$p$-value of the test is \Sexpr{format.pval(t1$p.value)}. % $
+
+Now we look at a summary of the famous \texttt{iris} data set, and we
+want to see the commands in the code chunks:
+
+\SweaveOpts{echo=true}
+
+<<>>=
+data(iris)
+summary(iris)
+@ %def
+
+
+\begin{figure}[htbp]
+  \begin{center}
+<<fig=TRUE>>=
+library(graphics)
+pairs(iris)
+@
+     \caption{Pairs plot of the iris data.}
+  \end{center}
+\end{figure}
+
+\begin{figure}[htbp]
+  \begin{center}
+<<fig=true>>=
+boxplot(Sepal.Length~Species, data=iris)
+@
+    \caption{Boxplot of sepal length grouped by species.}
+  \end{center}
+\end{figure}
+@
+
+\end{document}
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/Sweave/example-1.Rnw
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/Sweave/example-1.Rnw	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/Sweave/example-1.Rnw	(revision 2477)
@@ -0,0 +1,29 @@
+\documentclass[a4paper]{article}
+
+\title{Sweave Example 1}
+\author{Friedrich Leisch}
+
+\begin{document}
+
+\maketitle
+
+In this example we embed parts of the examples from the
+\texttt{kruskal.test} help page into a \LaTeX{} document:
+
+<<>>=
+data(airquality, package="datasets")
+library("stats")
+kruskal.test(Ozone ~ Month, data = airquality)
+@
+which shows that the location parameter of the Ozone 
+distribution varies significantly from month to month. Finally we
+include a boxplot of the data:
+
+\begin{center}
+<<fig=TRUE,echo=FALSE>>=
+library("graphics")
+boxplot(Ozone ~ Month, data = airquality)
+@
+\end{center}
+
+\end{document}
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/misc/exDIF.csv
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/misc/exDIF.csv	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/misc/exDIF.csv	(revision 2477)
@@ -0,0 +1,5 @@
+Var1,Var2
+2.7,A
+3.14,B
+10,A
+-7,A
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/misc/exDIF.dif
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/misc/exDIF.dif	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/utils/misc/exDIF.dif	(revision 2477)
@@ -0,0 +1,44 @@
+TABLE
+0,1
+"EXCEL"
+VECTORS
+0,5
+""
+TUPLES
+0,2
+""
+DATA
+0,0
+""
+-1,0
+BOT
+1,0
+"Var1"
+1,0
+"Var2"
+-1,0
+BOT
+0,2.7
+V
+1,0
+"A"
+-1,0
+BOT
+0,3.14
+V
+1,0
+"B"
+-1,0
+BOT
+0,10
+V
+1,0
+"A"
+-1,0
+BOT
+0,-7
+V
+1,0
+"A"
+-1,0
+EOD
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/help/Rcpp.rdx
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/help/Rcpp.rdx
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/help/AnIndex
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/help/AnIndex	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/help/AnIndex	(revision 2477)
@@ -0,0 +1,56 @@
+Rcpp-package	Rcpp-package
+$,C++Class-method	CppClass-class
+$,C++Object-method	CppObject-class
+$,Module-method	Module-class
+$<-,C++Object-method	CppObject-class
+.DollarNames,ANY-method	DollarNames-methods
+.DollarNames,C++Object-method	DollarNames-methods
+.DollarNames,Module-method	DollarNames-methods
+.DollarNames-methods	DollarNames-methods
+areMacrosDefined	evalCpp
+C++Class-class	CppClass-class
+C++Constructor-class	CppConstructor-class
+C++Field-class	CppField-class
+C++Function-class	CppFunction-class
+C++Object-class	CppObject-class
+C++OverloadedMethods-class	CppOverloadedMethods-class
+compileAttributes	compileAttributes
+compilerCheck	compilerCheck
+cppFunction	cppFunction
+cpp_object_dummy	Rcpp-internal
+cpp_object_initializer	Rcpp-internal
+demangle	demangle
+dependsAttribute	dependsAttribute
+evalCpp	evalCpp
+exportAttribute	exportAttribute
+exposeClass	exposeClass
+formals<-,C++Function-method	formals
+formals<--methods	formals
+initialize,Module-method	Module-class
+interfacesAttribute	interfacesAttribute
+LdFlags	RcppLdFlags
+loadModule	loadModule
+loadRcppClass	setRcppClass
+loadRcppModules	loadRcppModules-deprecated
+Module	Module
+Module-class	Module-class
+pluginsAttribute	pluginsAttribute
+populate	populate
+print.bytes	demangle
+prompt,Module-method	Module-class
+Rcpp	Rcpp-package
+Rcpp-deprecated	Rcpp-deprecated
+Rcpp-internal	Rcpp-internal
+Rcpp.package.skeleton	Rcpp.package.skeleton
+Rcpp.plugin.maker	Rcpp.plugin.maker
+RcppClass-class	setRcppClass
+RcppLdFlags	RcppLdFlags
+RcppUnitTests	RcppUnitTests
+registerPlugin	registerPlugin
+setRcppClass	setRcppClass
+show,C++Class-method	CppClass-class
+show,C++Function-method	CppFunction-class
+show,C++Object-method	CppObject-class
+show,Module-method	Module-class
+sizeof	demangle
+sourceCpp	sourceCpp
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/help/paths.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/help/paths.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/help/aliases.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/help/aliases.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/help/Rcpp.rdb
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/help/Rcpp.rdb
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/R/Rcpp
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/R/Rcpp	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/R/Rcpp	(revision 2477)
@@ -0,0 +1,27 @@
+#  File share/R/nspackloader.R
+#  Part of the R package, http://www.R-project.org
+#
+#  Copyright (C) 1995-2012 The R Core Team
+#
+#  This program is free software; you can redistribute it and/or modify
+#  it under the terms of the GNU General Public License as published by
+#  the Free Software Foundation; either version 2 of the License, or
+#  (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  A copy of the GNU General Public License is available at
+#  http://www.r-project.org/Licenses/
+
+local({
+    info <- loadingNamespaceInfo()
+    pkg <- info$pkgname
+    ns <- .getNamespace(as.name(pkg))
+    if (is.null(ns))
+        stop("cannot find namespace environment for ", pkg, domain = NA);
+    dbbase <- file.path(info$libname, pkg, "R", pkg)
+    lazyLoad(dbbase, ns, filter = function(n) n != ".__NAMESPACE__.")
+})
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/R/Rcpp.rdb
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/R/Rcpp.rdb
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/R/Rcpp.rdx
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/R/Rcpp.rdx
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppClass/src/Num.cpp
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppClass/src/Num.cpp	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppClass/src/Num.cpp	(revision 2477)
@@ -0,0 +1,32 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+
+#include "rcpp_hello_world.h"
+
+class Num{
+public:
+    Num() : x(0.0), y(0){} ;
+
+    double getX() { return x ; }
+    void setX(double value){ x = value ; }
+
+    int getY() { return y ; }
+
+private:
+    double x ;
+    int y ;
+};
+
+RCPP_MODULE(NumEx){
+    using namespace Rcpp ;
+
+    class_<Num>( "Num" )
+
+        .default_constructor()
+
+        // read and write property
+        .property( "x", &Num::getX, &Num::setX )
+
+        // read-only property
+        .property( "y", &Num::getY )
+	;
+}
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppClass/src/rcpp_hello_world.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppClass/src/rcpp_hello_world.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppClass/src/rcpp_hello_world.h	(revision 2477)
@@ -0,0 +1,8 @@
+#ifndef _testRcppModule_RCPP_HELLO_WORLD_H
+#define _testRcppModule_RCPP_HELLO_WORLD_H
+
+#include <Rcpp.h>
+
+RcppExport SEXP rcpp_hello_world() ;
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppClass/src/rcpp_module.cpp
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppClass/src/rcpp_module.cpp	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppClass/src/rcpp_module.cpp	(revision 2477)
@@ -0,0 +1,53 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+
+#include <Rcpp.h>
+
+int bar(int x) {
+    return x*2;
+}
+
+double foo(int x, double y) {
+    return x * y;
+}
+
+void bla() {
+    Rprintf("hello\\n");
+}
+
+void bla1(int x) {
+    Rprintf("hello (x = %d)\\n", x);
+}
+
+void bla2(int x, double y) {
+    Rprintf("hello (x = %d, y = %5.2f)\\n", x, y);
+}
+
+class RcppClassWorld {
+public:
+    RcppClassWorld() : msg("hello") {}
+    void set(std::string msg) { this->msg = msg; }
+    std::string greet() { return msg; }
+
+private:
+    std::string msg;
+};
+
+
+
+RCPP_MODULE(RcppClassModule) {
+    using namespace Rcpp;
+
+    function("bar"   , &bar );
+    function("foo"   , &foo );
+    function("bla"   , &bla );
+    function("bla1"  , &bla1);
+    function("bla2"  , &bla2);
+
+    class_<RcppClassWorld>( "RcppClassWorld" )
+
+        .default_constructor()
+
+        .method("greet", &RcppClassWorld::greet)
+        .method("set", &RcppClassWorld::set)
+	;
+}
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppClass/src/stdVector.cpp
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppClass/src/stdVector.cpp	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppClass/src/stdVector.cpp	(revision 2477)
@@ -0,0 +1,71 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+
+#include "rcpp_hello_world.h"
+
+// convenience typedef
+typedef std::vector<double> vec ;
+
+// helpers
+void vec_assign( vec* obj, Rcpp::NumericVector data ){
+    obj->assign( data.begin(), data.end() ) ;
+}
+
+void vec_insert( vec* obj, int position, Rcpp::NumericVector data){
+    vec::iterator it = obj->begin() + position ;
+    obj->insert( it, data.begin(), data.end() ) ;
+}
+
+Rcpp::NumericVector vec_asR( vec* obj ){
+    return Rcpp::wrap( *obj ) ;
+}
+
+void vec_set( vec* obj, int i, double value ){
+    obj->at( i ) = value ;
+}
+
+void vec_resize( vec* obj, int n){ obj->resize( n ) ; }
+void vec_push_back( vec* obj, double x ){ obj->push_back( x ); }
+
+// Wrappers for member functions that return a reference
+// Required on Solaris
+double vec_back(vec *obj){ return obj->back() ; }
+double vec_front(vec *obj){ return obj->front() ; }
+double vec_at(vec *obj, int i){ return obj->at(i) ; }
+
+RCPP_MODULE(stdVector){
+    using namespace Rcpp ;
+
+    // we expose the class std::vector<double> as "vec" on the R side
+    class_<vec>( "vec")
+
+    // exposing the default constructor
+    .constructor()
+
+    // exposing member functions
+    .method( "size", &vec::size)
+    .method( "max_size", &vec::max_size)
+    .method( "capacity", &vec::capacity)
+    .method( "empty", &vec::empty)
+    .method( "reserve", &vec::reserve)
+    .method( "pop_back", &vec::pop_back )
+    .method( "clear", &vec::clear )
+
+    // specifically exposing const member functions
+    .method( "back", &vec_back )
+    .method( "front", &vec_front )
+    .method( "at", &vec_at )
+    .method( "set", &vec_set )
+
+    // exposing free functions taking a std::vector<double>*
+    // as their first argument
+    .method( "assign", &vec_assign )
+    .method( "insert", &vec_insert )
+    .method( "as.vector", &vec_asR )
+    .method( "push_back", &vec_push_back )
+    .method( "resize", &vec_resize)
+
+    // special methods for indexing
+    // .method( "[[", &vec_at )
+    // .method( "[[<-", &vec_set )
+	;
+}
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppClass/src/rcpp_hello_world.cpp
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppClass/src/rcpp_hello_world.cpp	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppClass/src/rcpp_hello_world.cpp	(revision 2477)
@@ -0,0 +1,11 @@
+#include "rcpp_hello_world.h"
+
+SEXP rcpp_hello_world(){
+    using namespace Rcpp ;
+
+    CharacterVector x = CharacterVector::create( "foo", "bar" )  ;
+    NumericVector y   = NumericVector::create( 0.0, 1.0 ) ;
+    List z            = List::create( x, y ) ;
+
+    return z ;
+}
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppClass/man/Rcpp_class_examples.Rd
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppClass/man/Rcpp_class_examples.Rd	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppClass/man/Rcpp_class_examples.Rd	(revision 2477)
@@ -0,0 +1,30 @@
+\name{Rcpp Modules Examples}
+\alias{Num}
+\alias{RcppClassWorld}
+\alias{bar}
+\alias{bla}
+\alias{baz}
+\alias{bla1}
+\alias{baz1}
+\alias{bla2}
+\alias{foo}
+\alias{vec}
+\alias{hello}
+\alias{genWorld}
+\alias{stdNumeric}
+\alias{Rcpp_Num-class}
+\alias{Rcpp_RcppClassWorld-class}
+\alias{Rcpp_vec-class}
+\alias{stdNumeric-class}
+\alias{RcppClassWorld-class}
+\alias{C++Object-class}
+\title{
+  Functions and Objects created by Rcpp Modules Example
+}
+\description{
+  These function and objects are accessible from R via the Rcpp Modules mechanism
+  which creates them based on the declaration in the C++ file.  
+}
+\seealso{
+  The Rcpp Modules vignette.
+}
\ No newline at end of file
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppClass/man/rcpp_hello_world.Rd
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppClass/man/rcpp_hello_world.Rd	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppClass/man/rcpp_hello_world.Rd	(revision 2477)
@@ -0,0 +1,17 @@
+\name{rcpp_hello_world}
+\alias{rcpp_hello_world}
+\docType{package}
+\title{
+Simple function using Rcpp
+}
+\description{
+Simple function using Rcpp
+}
+\usage{
+rcpp_hello_world()	
+}
+\examples{
+\dontrun{
+rcpp_hello_world()
+}
+}
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppClass/man/testRcppClass-package.Rd
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppClass/man/testRcppClass-package.Rd	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppClass/man/testRcppClass-package.Rd	(revision 2477)
@@ -0,0 +1,22 @@
+\name{testRcppClass-package}
+\alias{testRcppClass-package}
+\alias{testRcppClass}
+\docType{package}
+\title{
+Dummy package part of Rcpp unit testing
+}
+\description{
+Dummy package part of Rcpp unit testing
+}
+\details{
+\tabular{ll}{
+Package: \tab testRcppClass\cr
+Type: \tab Package\cr
+Version: \tab 1.0\cr
+Date: \tab 2010-09-06\cr
+License: \tab GPL (>=2)\cr
+LazyLoad: \tab yes\cr
+}
+}
+\keyword{ package }
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppClass/R/load.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppClass/R/load.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppClass/R/load.R	(revision 2477)
@@ -0,0 +1,53 @@
+setRcppClass("RcppClassWorld", module = "RcppClassModule", fields = list(more = "character"),
+             methods = list(test = function(what) message("Testing: ", what, "; ", more)),
+             saveAs = "genWorld"
+             )
+
+setRcppClass("stdNumeric", "vec", "stdVector")
+
+## some methods that use C++ methods
+evalqOnLoad({
+    ##library(methods)
+    stdNumeric$methods(
+        getEl = function(i) {
+            i <- as.integer(i)
+            if(i < 1 || i > size())
+                NA_real_
+            else
+                at(i-1L)
+        },
+        setEl = function(i, value) {
+            value <- as.numeric(value)
+            if(length(value) != 1)
+                stop("Only assigns single values")
+            i <- as.integer(i)
+            if(i < 1 || i > size())
+                stop("index out of bounds")
+            else
+                set(i-1L, value)
+        },
+        initialize = function(data = numeric()) {
+            callSuper()
+            data <- as.double(data)
+            n <- as.integer(max(50, length(data) * 2))
+            reserve(n)
+            assign(data)
+        }
+    )
+})
+
+
+## loadModule("NumEx")
+
+## loading the module should have defined the C++ class
+
+## setRcppClass("NumEx", "Num")
+
+
+## For R 2.15.1 and later this also works. Note that calling loadModule() triggers
+## a load action, so this does not have to be placed in .onLoad() or evalqOnLoad().
+loadModule("NumEx", TRUE)
+loadModule("RcppClassModule", TRUE)
+loadModule("stdVector", TRUE)
+
+loadModule("RcppClassModule", c("bar", baz = "bla", baz1 = "bla1", "foo"))
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppClass/R/rcpp_hello_world.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppClass/R/rcpp_hello_world.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppClass/R/rcpp_hello_world.R	(revision 2477)
@@ -0,0 +1,5 @@
+
+rcpp_hello_world <- function(){
+    .Call("rcpp_hello_world", PACKAGE = "testRcppClass")
+}
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppClass/tests/classes.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppClass/tests/classes.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppClass/tests/classes.R	(revision 2477)
@@ -0,0 +1,25 @@
+library(testRcppClass)
+
+v <- stdNumeric$new()
+data <- 1:10
+v$assign(data)
+v$set(3L, v$at(3L) + 1)
+
+data[[4]] <- data[[4]] +1
+
+stopifnot(identical(all.equal(v$as.vector(), data), TRUE))
+
+## a few function calls
+
+stopifnot(all.equal(bar(2), 4))
+stopifnot(all.equal(foo(2,3), 6))
+
+## Uncomment this when a C++Class can be found w/o extracting from module
+## as in commented code in R/load.R
+
+## nn <- new("NumEx")
+## nn$x <- pi
+## stopifnot(all.equal(nn$x, pi))
+
+
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppModule/src/rcpp_hello_world.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppModule/src/rcpp_hello_world.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppModule/src/rcpp_hello_world.h	(revision 2477)
@@ -0,0 +1,8 @@
+#ifndef _testRcppModule_RCPP_HELLO_WORLD_H
+#define _testRcppModule_RCPP_HELLO_WORLD_H
+
+#include <Rcpp.h>
+
+RcppExport SEXP rcpp_hello_world() ;
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppModule/src/rcpp_module.cpp
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppModule/src/rcpp_module.cpp	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppModule/src/rcpp_module.cpp	(revision 2477)
@@ -0,0 +1,74 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+//
+// rcpp_module.cpp: Rcpp R/C++ interface class library -- Rcpp Module examples
+//
+// Copyright (C) 2010 - 2015  Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+
+#include <Rcpp.h>               // need to include the main Rcpp header file only
+
+int bar(int x) {                // simple free function returning an int
+    return x*2;
+}
+
+double foo(int x, double y) {   // simple free function returning a double
+    return x * y;
+}
+
+void bla( ) {                   // no input or return but output side effect
+    Rprintf( "hello\n" );
+}
+
+void bla1(int x) {              // output reflecting a single input
+    Rprintf("hello (x = %d)\n", x);
+}
+
+void bla2(int x, double y) {    // output reflecting two inputs
+    Rprintf("hello (x = %d, y = %5.2f)\n", x, y);
+}
+
+
+class RcppModuleWorld {                   // a simple class with a setter and getter
+public:
+    RcppModuleWorld() : msg("hello"){}
+    void set(std::string msg) { this->msg = msg; }
+    std::string greet() { return msg; }
+
+private:
+    std::string msg;
+};
+
+
+
+RCPP_MODULE(RcppModuleWorld) {
+    using namespace Rcpp;
+
+    function("bar"   , &bar );
+    function("foo"   , &foo );
+    function("bla"   , &bla );
+    function("bla1"  , &bla1);
+    function("bla2"  , &bla2);
+
+    class_<RcppModuleWorld>( "RcppModuleWorld")
+        .default_constructor()
+        .method("greet", &RcppModuleWorld::greet)
+        .method("set", &RcppModuleWorld::set)
+	;
+}
+
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppModule/src/stdVector.cpp
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppModule/src/stdVector.cpp	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppModule/src/stdVector.cpp	(revision 2477)
@@ -0,0 +1,90 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+//
+// stdVector.cpp: Rcpp R/C++ interface class library -- Rcpp Module class example
+//
+// Copyright (C) 2010 - 2012  Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#include <Rcpp.h>               // need to include the main Rcpp header file only
+
+// convenience typedef
+typedef std::vector<double> vec;
+
+// helpers
+void vec_assign( vec* obj, Rcpp::NumericVector data) {
+    obj->assign( data.begin(), data.end() ) ;
+}
+
+void vec_insert( vec* obj, int position, Rcpp::NumericVector data) {
+    vec::iterator it = obj->begin() + position;
+    obj->insert( it, data.begin(), data.end() );
+}
+
+Rcpp::NumericVector vec_asR( vec* obj) {
+    return Rcpp::wrap( *obj );
+}
+
+void vec_set( vec* obj, int i, double value) {
+    obj->at( i ) = value;
+}
+
+void vec_resize( vec* obj, int n) { obj->resize( n ); }
+void vec_push_back( vec* obj, double x ) { obj->push_back( x ); }
+
+// Wrappers for member functions that return a reference
+// Required on Solaris
+double vec_back(vec *obj){ return obj->back() ; }
+double vec_front(vec *obj){ return obj->front() ; }
+double vec_at(vec *obj, int i){ return obj->at(i) ; }
+
+RCPP_MODULE(stdVector){
+    using namespace Rcpp ;
+
+    // we expose the class std::vector<double> as "vec" on the R side
+    class_<vec>("vec")
+
+        // exposing the default constructor
+        .constructor()
+
+        // exposing member functions -- taken directly from std::vector<double>
+        .method( "size",     &vec::size)
+        .method( "max_size", &vec::max_size)
+        .method( "capacity", &vec::capacity)
+        .method( "empty",    &vec::empty)
+        .method( "reserve",  &vec::reserve)
+        .method( "pop_back", &vec::pop_back )
+        .method( "clear",    &vec::clear )
+
+        // specifically exposing const member functions defined above
+        .method( "back",     &vec_back )
+        .method( "front",    &vec_front )
+        .method( "at",       &vec_at )
+
+        // exposing free functions taking a std::vector<double>*
+        // as their first argument
+        .method( "assign",   &vec_assign )
+        .method( "insert",   &vec_insert )
+        .method( "as.vector",&vec_asR )
+        .method( "push_back",&vec_push_back )
+        .method( "resize",   &vec_resize)
+
+        // special methods for indexing
+        .method( "[[",       &vec_at )
+        .method( "[[<-",     &vec_set )
+
+	;
+}
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppModule/src/rcpp_hello_world.cpp
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppModule/src/rcpp_hello_world.cpp	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppModule/src/rcpp_hello_world.cpp	(revision 2477)
@@ -0,0 +1,11 @@
+#include "rcpp_hello_world.h"
+
+SEXP rcpp_hello_world(){
+    using namespace Rcpp ;
+
+    CharacterVector x = CharacterVector::create( "foo", "bar" )  ;
+    NumericVector y   = NumericVector::create( 0.0, 1.0 ) ;
+    List z            = List::create( x, y ) ;
+
+    return z ;
+}
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppModule/src/Num.cpp
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppModule/src/Num.cpp	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppModule/src/Num.cpp	(revision 2477)
@@ -0,0 +1,51 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+//
+// Num.cpp: Rcpp R/C++ interface class library -- Rcpp Module example
+//
+// Copyright (C) 2010 - 2015  Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#include <Rcpp.h>
+
+class RcppModuleNum {           // simple class with two private variables
+public:                         // which have a getter/setter and getter
+    RcppModuleNum() : x(0.0), y(0){} ;
+
+    double getX() { return x ; }
+    void setX(double value){ x = value ; }
+
+    int getY() { return y ; }
+
+private:
+    double x ;
+    int y ;
+};
+
+RCPP_MODULE(RcppModuleNumEx){
+    using namespace Rcpp ;
+
+    class_<RcppModuleNum>( "RcppModuleNum" )
+
+        .default_constructor()
+
+        // read and write property
+        .property( "x", &RcppModuleNum::getX, &RcppModuleNum::setX )
+
+        // read-only property
+        .property( "y", &RcppModuleNum::getY )
+	;
+}
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppModule/man/rcpp_hello_world.Rd
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppModule/man/rcpp_hello_world.Rd	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppModule/man/rcpp_hello_world.Rd	(revision 2477)
@@ -0,0 +1,17 @@
+\name{rcpp_hello_world}
+\alias{rcpp_hello_world}
+\docType{package}
+\title{
+Simple function using Rcpp
+}
+\description{
+Simple function using Rcpp
+}
+\usage{
+rcpp_hello_world()	
+}
+\examples{
+\dontrun{
+rcpp_hello_world()
+}
+}
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppModule/man/testRcppModule-package.Rd
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppModule/man/testRcppModule-package.Rd	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppModule/man/testRcppModule-package.Rd	(revision 2477)
@@ -0,0 +1,22 @@
+\name{testRcppModule-package}
+\alias{testRcppModule-package}
+\alias{testRcppModule}
+\docType{package}
+\title{
+Dummy package part of Rcpp unit testing
+}
+\description{
+Dummy package part of Rcpp unit testing
+}
+\details{
+\tabular{ll}{
+Package: \tab testRcppModule\cr
+Type: \tab Package\cr
+Version: \tab 1.0\cr
+Date: \tab 2010-09-06\cr
+License: \tab GPL (>=2)\cr
+LazyLoad: \tab yes\cr
+}
+}
+\keyword{ package }
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppModule/man/Rcpp_modules_examples.Rd
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppModule/man/Rcpp_modules_examples.Rd	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppModule/man/Rcpp_modules_examples.Rd	(revision 2477)
@@ -0,0 +1,24 @@
+\name{Rcpp Modules Examples}
+\alias{Num}
+\alias{World}
+\alias{bar}
+\alias{bla}
+\alias{bla1}
+\alias{bla2}
+\alias{foo}
+\alias{vec}
+\alias{hello}
+\alias{Rcpp_Num-class}
+\alias{Rcpp_World-class}
+\alias{Rcpp_vec-class}
+\alias{C++Object-class}
+\title{
+  Functions and Objects created by Rcpp Modules Example
+}
+\description{
+  These function and objects are accessible from R via the Rcpp Modules mechanism
+  which creates them based on the declaration in the C++ file.  
+}
+\seealso{
+  The Rcpp Modules vignette.
+}
\ No newline at end of file
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppModule/NAMESPACE
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppModule/NAMESPACE	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppModule/NAMESPACE	(revision 2477)
@@ -0,0 +1,4 @@
+useDynLib(testRcppModule)
+exportPattern("^[[:alpha:]]+")
+import(Rcpp,methods)
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppModule/R/zzz.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppModule/R/zzz.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppModule/R/zzz.R	(revision 2477)
@@ -0,0 +1,11 @@
+#
+#.onLoad <- function(libname, pkgname){
+#    loadRcppModules()
+#}
+
+## For R 2.15.1 and later this also works. Note that calling loadModule() triggers
+## a load action, so this does not have to be placed in .onLoad() or evalqOnLoad().
+loadModule("RcppModuleNumEx", TRUE)
+loadModule("RcppModuleWorld", TRUE)
+loadModule("stdVector", TRUE)
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppModule/R/rcpp_hello_world.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppModule/R/rcpp_hello_world.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppModule/R/rcpp_hello_world.R	(revision 2477)
@@ -0,0 +1,5 @@
+
+rcpp_hello_world <- function(){
+    .Call( "rcpp_hello_world", PACKAGE = "testRcppModule" )
+}
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppModule/DESCRIPTION
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppModule/DESCRIPTION	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppModule/DESCRIPTION	(revision 2477)
@@ -0,0 +1,15 @@
+Package: testRcppModule
+Type: Package
+Title: Some test examples using Rcpp with the Module feature
+Version: 0.1
+Date: 2010-09-06
+Author: John Chambers
+Maintainer: John Chambers <jmc@stat.stanford.edu>
+Description: Some examples taken (and perhaps modified) from the Rcpp Modules documentation.
+License: GPL (>=2)
+LazyLoad: yes
+Depends: methods, Rcpp (>= 0.8.5)
+LinkingTo: Rcpp
+RcppModules: RcppModuleWorld, stdVector, NumEx
+Packaged: 2010-09-09 18:42:28 UTC; jmc
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/bin/amd64/r-cran-testrcpppackage_0.1.0-1_amd64.deb
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/bin/amd64/r-cran-testrcpppackage_0.1.0-1_amd64.deb
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppPackage/src/rcpp_hello_world.cpp
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppPackage/src/rcpp_hello_world.cpp	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppPackage/src/rcpp_hello_world.cpp	(revision 2477)
@@ -0,0 +1,19 @@
+#include "rcpp_hello_world.h"
+
+SEXP rcpp_hello_world(){
+    using namespace Rcpp ;
+    CharacterVector x = CharacterVector::create( "foo", "bar" )  ;
+    NumericVector y   = NumericVector::create( 0.0, 1.0 ) ;
+    List z = List::create( x, y ) ;
+    return z ;
+}
+
+SEXP hello_world_ex(){
+    try{
+        throw std::range_error( "boom" ) ;
+    } catch( std::exception& __ex__ ){
+        forward_exception_to_r( __ex__ ) ;
+    }
+    return R_NilValue ;
+}
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppPackage/src/rcpp_hello_world.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppPackage/src/rcpp_hello_world.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppPackage/src/rcpp_hello_world.h	(revision 2477)
@@ -0,0 +1,9 @@
+#ifndef _testRcppPackage_RCPP_HELLO_WORLD_H
+#define _testRcppPackage_RCPP_HELLO_WORLD_H
+
+#include <Rcpp.h>
+
+RcppExport SEXP rcpp_hello_world() ;
+RcppExport SEXP hello_world_ex() ;
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppPackage/man/testRcppPackage-package.Rd
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppPackage/man/testRcppPackage-package.Rd	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppPackage/man/testRcppPackage-package.Rd	(revision 2477)
@@ -0,0 +1,20 @@
+\name{testRcppPackage-package}
+\alias{testRcppPackage-package}
+\alias{testRcppPackage}
+\docType{package}
+\title{
+Dummy package part of Rcpp unit tests
+}
+\description{
+Dummy package part of Rcpp unit tests
+}
+\details{
+\tabular{ll}{
+Package: \tab testRcppPackage\cr
+Type: \tab Package\cr
+Version: \tab 0.1.0\cr
+Date: \tab 2014-11-02\cr
+License: \tab GPL (>= 2)\cr
+LazyLoad: \tab yes\cr
+}
+}
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppPackage/NAMESPACE
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppPackage/NAMESPACE	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppPackage/NAMESPACE	(revision 2477)
@@ -0,0 +1,2 @@
+useDynLib(testRcppPackage)
+import(Rcpp)
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppPackage/R/rcpp_hello_world.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppPackage/R/rcpp_hello_world.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppPackage/R/rcpp_hello_world.R	(revision 2477)
@@ -0,0 +1,3 @@
+rcpp_hello_world <- function() {
+    .Call("rcpp_hello_world", PACKAGE = "testRcppPackage")
+}
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppPackage/DESCRIPTION
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppPackage/DESCRIPTION	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/unitTests/testRcppPackage/DESCRIPTION	(revision 2477)
@@ -0,0 +1,12 @@
+Package: testRcppPackage
+Type: Package
+Title: Small Test Package for Rcpp and Part of Rcpp Unit Tests
+Version: 0.1.0
+Date: 2014-11-02
+Author: Dirk Eddelbuettel and Romain Francois
+Maintainer: Dirk Eddelbuettel <edd@debian.org>
+Description: Small test package uses as part of Rcpp unit tests
+License: GPL (>= 2)
+LazyLoad: yes
+Imports: Rcpp
+LinkingTo: Rcpp
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/html/R.css
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/html/R.css	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/html/R.css	(revision 2477)
@@ -0,0 +1,97 @@
+body {
+    background: white;
+    color: black;
+}
+
+a:link {
+    background: white;
+    color: blue;
+}
+
+a:visited {
+    background: white;
+    color: rgb(50%, 0%, 50%);
+}
+
+h1 {
+    background: white;
+    color: rgb(55%, 55%, 55%);
+    font-family: monospace;
+    font-size: x-large;
+    text-align: center;
+}
+
+h2 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-size: large;
+    text-align: center;
+}
+
+h3 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-size: large;
+}
+
+h4 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-style: italic;
+    font-size: large;
+}
+
+h5 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+}
+
+h6 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-style: italic;
+}
+		
+img.toplogo {
+    width: 4em;
+    vertical-align: middle;
+}
+
+img.arrow {
+    width: 30px;
+    height: 30px;
+    border: 0;
+}
+
+span.acronym {
+    font-size: small;
+}
+
+span.env {
+    font-family: monospace;
+}
+
+span.file {
+    font-family: monospace;
+}
+
+span.option{
+    font-family: monospace;
+}
+
+span.pkg {
+    font-weight: bold;
+}
+
+span.samp{
+    font-family: monospace;
+}
+
+div.vignettes a:hover {
+    background: rgb(85%, 85%, 85%);
+}

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/html/R.css
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/html/00Index.html
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/html/00Index.html	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/html/00Index.html	(revision 2477)
@@ -0,0 +1,128 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title>R: Seamless R and C++ Integration</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<link rel="stylesheet" type="text/css" href="R.css" />
+</head><body>
+<h1> Seamless R and C++ Integration
+<img class="toplogo" src="../../../doc/html/Rlogo.svg" alt="[R logo]" />
+</h1>
+<hr/>
+<div style="text-align: center;">
+<a href="../../../doc/html/packages.html"><img class="arrow" src="../../../doc/html/left.jpg" alt="[Up]" /></a>
+<a href="../../../doc/html/index.html"><img class="arrow" src="../../../doc/html/up.jpg" alt="[Top]" /></a>
+</div><h2>Documentation for package &lsquo;Rcpp&rsquo; version 0.12.9</h2>
+
+<ul><li><a href="../DESCRIPTION">DESCRIPTION file</a>.</li>
+<li><a href="../doc/index.html">User guides, package vignettes and other documentation.</a></li>
+<li><a href="../NEWS">Package NEWS</a>.</li>
+</ul>
+
+<h2>Help Pages</h2>
+
+
+<table width="100%">
+<tr><td style="width: 25%;"><a href="Rcpp-package.html">Rcpp-package</a></td>
+<td>R / C++ interface</td></tr>
+<tr><td style="width: 25%;"><a href="CppClass-class.html">$-method</a></td>
+<td>Reflection information for an internal c++ class</td></tr>
+<tr><td style="width: 25%;"><a href="CppObject-class.html">$-method</a></td>
+<td>c++ internal objects</td></tr>
+<tr><td style="width: 25%;"><a href="Module-class.html">$-method</a></td>
+<td>Rcpp modules</td></tr>
+<tr><td style="width: 25%;"><a href="CppObject-class.html">$&lt;--method</a></td>
+<td>c++ internal objects</td></tr>
+<tr><td style="width: 25%;"><a href="DollarNames-methods.html">.DollarNames-method</a></td>
+<td>completion</td></tr>
+<tr><td style="width: 25%;"><a href="DollarNames-methods.html">.DollarNames-methods</a></td>
+<td>completion</td></tr>
+<tr><td style="width: 25%;"><a href="evalCpp.html">areMacrosDefined</a></td>
+<td>Evaluate a C++ Expression</td></tr>
+<tr><td style="width: 25%;"><a href="CppClass-class.html">C++Class-class</a></td>
+<td>Reflection information for an internal c++ class</td></tr>
+<tr><td style="width: 25%;"><a href="CppConstructor-class.html">C++Constructor-class</a></td>
+<td>Class "C++Constructor"</td></tr>
+<tr><td style="width: 25%;"><a href="CppField-class.html">C++Field-class</a></td>
+<td>Class "C++Field"</td></tr>
+<tr><td style="width: 25%;"><a href="CppFunction-class.html">C++Function-class</a></td>
+<td>Class "C++Function"</td></tr>
+<tr><td style="width: 25%;"><a href="CppObject-class.html">C++Object-class</a></td>
+<td>c++ internal objects</td></tr>
+<tr><td style="width: 25%;"><a href="CppOverloadedMethods-class.html">C++OverloadedMethods-class</a></td>
+<td>Class "C++OverloadedMethods"</td></tr>
+<tr><td style="width: 25%;"><a href="compileAttributes.html">compileAttributes</a></td>
+<td>Compile Rcpp Attributes for a Package</td></tr>
+<tr><td style="width: 25%;"><a href="compilerCheck.html">compilerCheck</a></td>
+<td>Check for Minimal (g++) Compiler Version</td></tr>
+<tr><td style="width: 25%;"><a href="cppFunction.html">cppFunction</a></td>
+<td>Define an R Function with a C++ Implementation</td></tr>
+<tr><td style="width: 25%;"><a href="demangle.html">demangle</a></td>
+<td>c++ type information</td></tr>
+<tr><td style="width: 25%;"><a href="dependsAttribute.html">dependsAttribute</a></td>
+<td>Rcpp::depends Attribute</td></tr>
+<tr><td style="width: 25%;"><a href="evalCpp.html">evalCpp</a></td>
+<td>Evaluate a C++ Expression</td></tr>
+<tr><td style="width: 25%;"><a href="exportAttribute.html">exportAttribute</a></td>
+<td>Rcpp::export Attribute</td></tr>
+<tr><td style="width: 25%;"><a href="exposeClass.html">exposeClass</a></td>
+<td>Create an Rcpp Module to Expose a C++ Class in R</td></tr>
+<tr><td style="width: 25%;"><a href="formals.html">formals&lt;--method</a></td>
+<td>Set the formal arguments of a C++ function</td></tr>
+<tr><td style="width: 25%;"><a href="formals.html">formals&lt;--methods</a></td>
+<td>Set the formal arguments of a C++ function</td></tr>
+<tr><td style="width: 25%;"><a href="Module-class.html">initialize-method</a></td>
+<td>Rcpp modules</td></tr>
+<tr><td style="width: 25%;"><a href="interfacesAttribute.html">interfacesAttribute</a></td>
+<td>Rcpp::interfaces Attribute</td></tr>
+<tr><td style="width: 25%;"><a href="RcppLdFlags.html">LdFlags</a></td>
+<td>(Deprecated) Rcpp Linker Flags</td></tr>
+<tr><td style="width: 25%;"><a href="loadModule.html">loadModule</a></td>
+<td>Load an Rcpp Module into a Package</td></tr>
+<tr><td style="width: 25%;"><a href="setRcppClass.html">loadRcppClass</a></td>
+<td>Create a Class Extending a C++ Class</td></tr>
+<tr><td style="width: 25%;"><a href="loadRcppModules-deprecated.html">loadRcppModules</a></td>
+<td>Loads Rcpp modules on package startup</td></tr>
+<tr><td style="width: 25%;"><a href="Module.html">Module</a></td>
+<td>Retrieves an Rcpp module</td></tr>
+<tr><td style="width: 25%;"><a href="Module-class.html">Module-class</a></td>
+<td>Rcpp modules</td></tr>
+<tr><td style="width: 25%;"><a href="pluginsAttribute.html">pluginsAttribute</a></td>
+<td>Rcpp::plugins Attribute</td></tr>
+<tr><td style="width: 25%;"><a href="populate.html">populate</a></td>
+<td>Populates a namespace or an environment with the content of a module</td></tr>
+<tr><td style="width: 25%;"><a href="demangle.html">print.bytes</a></td>
+<td>c++ type information</td></tr>
+<tr><td style="width: 25%;"><a href="Module-class.html">prompt-method</a></td>
+<td>Rcpp modules</td></tr>
+<tr><td style="width: 25%;"><a href="Rcpp-package.html">Rcpp</a></td>
+<td>R / C++ interface</td></tr>
+<tr><td style="width: 25%;"><a href="Rcpp-deprecated.html">Rcpp-deprecated</a></td>
+<td>Deprecated Functions in the Rcpp Package</td></tr>
+<tr><td style="width: 25%;"><a href="Rcpp.package.skeleton.html">Rcpp.package.skeleton</a></td>
+<td>Create a skeleton for a new package depending on Rcpp</td></tr>
+<tr><td style="width: 25%;"><a href="Rcpp.plugin.maker.html">Rcpp.plugin.maker</a></td>
+<td>Facilitating making package plugins</td></tr>
+<tr><td style="width: 25%;"><a href="setRcppClass.html">RcppClass-class</a></td>
+<td>Create a Class Extending a C++ Class</td></tr>
+<tr><td style="width: 25%;"><a href="RcppLdFlags.html">RcppLdFlags</a></td>
+<td>(Deprecated) Rcpp Linker Flags</td></tr>
+<tr><td style="width: 25%;"><a href="RcppUnitTests.html">RcppUnitTests</a></td>
+<td>Rcpp : unit tests results</td></tr>
+<tr><td style="width: 25%;"><a href="registerPlugin.html">registerPlugin</a></td>
+<td>Register an inline plugin</td></tr>
+<tr><td style="width: 25%;"><a href="setRcppClass.html">setRcppClass</a></td>
+<td>Create a Class Extending a C++ Class</td></tr>
+<tr><td style="width: 25%;"><a href="CppClass-class.html">show-method</a></td>
+<td>Reflection information for an internal c++ class</td></tr>
+<tr><td style="width: 25%;"><a href="CppFunction-class.html">show-method</a></td>
+<td>Class "C++Function"</td></tr>
+<tr><td style="width: 25%;"><a href="CppObject-class.html">show-method</a></td>
+<td>c++ internal objects</td></tr>
+<tr><td style="width: 25%;"><a href="Module-class.html">show-method</a></td>
+<td>Rcpp modules</td></tr>
+<tr><td style="width: 25%;"><a href="demangle.html">sizeof</a></td>
+<td>c++ type information</td></tr>
+<tr><td style="width: 25%;"><a href="sourceCpp.html">sourceCpp</a></td>
+<td>Source C++ Code from a File or String</td></tr>
+</table>
+</body></html>

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/html/00Index.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-FAQ.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-FAQ.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-FAQ.R	(revision 2477)
@@ -0,0 +1,219 @@
+### R code from vignette source 'Rcpp-FAQ.Rnw'
+
+###################################################
+### code chunk number 1: Rcpp-FAQ.Rnw:50-55
+###################################################
+prettyVersion <- packageDescription("Rcpp")$Version
+prettyDate <- format(Sys.Date(), "%B %e, %Y")
+require(Rcpp)
+require(inline)
+require(highlight)
+
+
+###################################################
+### code chunk number 2: Rcpp-FAQ.Rnw:83-85 (eval = FALSE)
+###################################################
+## vignette("Rcpp-introduction")
+## vignette("Rcpp-attributes")      
+
+
+###################################################
+### code chunk number 3: Rcpp-FAQ.Rnw:212-213 (eval = FALSE)
+###################################################
+## vignette("Rcpp-package")
+
+
+###################################################
+### code chunk number 4: Rcpp-FAQ.Rnw:237-243
+###################################################
+fx <- cxxfunction(signature(x = "numeric"),
+    'NumericVector xx(x);
+     return wrap(std::accumulate(xx.begin(), xx.end(), 0.0));',
+    plugin = "Rcpp")
+res <- fx(seq(1, 10, by=0.5))
+res
+
+
+###################################################
+### code chunk number 5: Rcpp-FAQ.Rnw:244-245
+###################################################
+stopifnot(identical(res, sum(seq(1, 10, by=0.5))))
+
+
+###################################################
+### code chunk number 6: Rcpp-FAQ.Rnw:259-261 (eval = FALSE)
+###################################################
+## fx <- cxxfunction(signature(), paste(readLines("myfile.cpp"), collapse="\n"),
+##                   plugin = "Rcpp")
+
+
+###################################################
+### code chunk number 7: Rcpp-FAQ.Rnw:281-286
+###################################################
+cppFunction('double accu(NumericVector x) {
+   return(std::accumulate(x.begin(), x.end(), 0.0));
+}')
+res <- accu(seq(1, 10, by=0.5))
+res
+
+
+###################################################
+### code chunk number 18: Rcpp-FAQ.Rnw:714-733
+###################################################
+inc <- 'template <typename T>
+        class square : public std::unary_function<T,T> {
+        public:
+            T operator()( T t) const { return t*t ;}
+        };
+       '
+
+src <- '
+       double x = Rcpp::as<double>(xs);
+       int i = Rcpp::as<int>(is);
+       square<double> sqdbl;
+       square<int> sqint;
+       return Rcpp::DataFrame::create(Rcpp::Named("x", sqdbl(x)),
+                                      Rcpp::Named("i", sqint(i)));
+       '
+fun <- cxxfunction(signature(xs="numeric", is="integer"),
+                   body=src, include=inc, plugin="Rcpp")
+
+fun(2.2, 3L)
+
+
+###################################################
+### code chunk number 21: Rcpp-FAQ.Rnw:814-818 (eval = FALSE)
+###################################################
+## fx <- cxxfunction(signature(x_="numeric", Y_="matrix", z_="numeric" ),
+##                   paste(readLines("myfile.cpp"), collapse="\n"),
+##                   plugin="RcppArmadillo" )
+## fx(1:4, diag(4), 1:4)
+
+
+###################################################
+### code chunk number 22: Rcpp-FAQ.Rnw:820-821
+###################################################
+unlink("myfile.cpp")
+
+
+###################################################
+### code chunk number 24: Rcpp-FAQ.Rnw:880-887
+###################################################
+fx <- cxxfunction(signature(), 
+                  'RNGScope();
+                   return rnorm(5, 0, 100);',
+                  plugin="Rcpp")
+set.seed(42)
+fx()
+fx()
+
+
+###################################################
+### code chunk number 25: Rcpp-FAQ.Rnw:896-903
+###################################################
+cppFunction('Rcpp::NumericVector ff(int n) { return rnorm(n, 0, 100); }')
+set.seed(42)
+ff(5)
+ff(5)
+set.seed(42)
+rnorm(5, 0, 100)
+rnorm(5, 0, 100)
+
+
+###################################################
+### code chunk number 26: Rcpp-FAQ.Rnw:918-926
+###################################################
+src <- 'Rcpp::NumericVector v(4);
+        v[0] = R_NegInf;  // -Inf
+        v[1] = NA_REAL;   // NA
+        v[2] = R_PosInf;  // Inf
+        v[3] = 42;        // see the Hitchhiker Guide
+        return Rcpp::wrap(v);'
+fun <- cxxfunction(signature(), src, plugin="Rcpp")
+fun()
+
+
+###################################################
+### code chunk number 28: Rcpp-FAQ.Rnw:954-962 (eval = FALSE)
+###################################################
+## txt <- 'arma::mat Am = Rcpp::as< arma::mat >(A);
+##         arma::mat Bm = Rcpp::as< arma::mat >(B);
+##         return Rcpp::wrap( Am * Bm );'
+## mmult <- cxxfunction(signature(A="numeric", B="numeric"),
+##                      body=txt, plugin="RcppArmadillo")
+## A <- matrix(1:9, 3, 3)
+## B <- matrix(9:1, 3, 3)
+## C <- mmult(A, B)
+
+
+###################################################
+### code chunk number 30: Rcpp-FAQ.Rnw:1009-1027 (eval = FALSE)
+###################################################
+## ## simple example of seeding RNG and drawing one random number
+## gslrng <- '
+## int seed = Rcpp::as<int>(par) ;
+## gsl_rng_env_setup();
+## gsl_rng *r = gsl_rng_alloc (gsl_rng_default);
+## gsl_rng_set (r, (unsigned long) seed);
+## double v = gsl_rng_get (r);
+## gsl_rng_free(r);
+## return Rcpp::wrap(v);'
+## 
+## plug <- Rcpp:::Rcpp.plugin.maker(
+##     include.before = "#include <gsl/gsl_rng.h>",
+##     libs = paste("-L/usr/local/lib/R/site-library/Rcpp/lib -lRcpp",
+##                  "-Wl,-rpath,/usr/local/lib/R/site-library/Rcpp/lib",
+##                  "-L/usr/lib -lgsl -lgslcblas -lm"))
+## registerPlugin("gslDemo", plug )
+## fun <- cxxfunction(signature(par="numeric"), gslrng, plugin="gslDemo")
+## fun(0)
+
+
+###################################################
+### code chunk number 31: Rcpp-FAQ.Rnw:1048-1055 (eval = FALSE)
+###################################################
+## myplugin <- getPlugin("Rcpp")
+## myplugin$env$PKG_CXXFLAGS <- "-std=c++11"
+## f <- cxxfunction(signature(), settings=myplugin, body='
+## +    std::vector<double> x = { 1.0, 2.0, 3.0 };  // fails without -std=c++0x
+## +    return Rcpp::wrap(x);
+## + ')
+## f()
+
+
+###################################################
+### code chunk number 32: Rcpp-FAQ.Rnw:1071-1083 (eval = FALSE)
+###################################################
+## src <- '
+##   Rcpp::NumericMatrix x(2,2);
+##   x.fill(42);                           // or more interesting values
+##   Rcpp::List dimnms =                   // two vec. with static names
+##       Rcpp::List::create(Rcpp::CharacterVector::create("cc", "dd"),
+##                          Rcpp::CharacterVector::create("ee", "ff"));
+##   // and assign it
+##   x.attr("dimnames") = dimnms;
+##   return(x);
+## '
+## fun <- cxxfunction(signature(), body=src, plugin="Rcpp")
+## fun()
+
+
+###################################################
+### code chunk number 34: Rcpp-FAQ.Rnw:1113-1127 (eval = FALSE)
+###################################################
+## BigInts <- cxxfunction(signature(),
+##   'std::vector<long> bigints;
+##    bigints.push_back(12345678901234567LL);
+##    bigints.push_back(12345678901234568LL);
+##    Rprintf("Difference of %ld\\n", 12345678901234568LL - 12345678901234567LL);
+##    return wrap(bigints);', plugin="Rcpp", includes="#include <vector>")
+## 
+## retval<-BigInts()
+## 
+## # Unique 64-bit integers were cast to identical lower precision numerics
+## # behind my back with no warnings or errors whatsoever.  Error.
+## 
+## 
+## stopifnot(length(unique(retval)) == 2)
+
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-unitTests.Rnw
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-unitTests.Rnw	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-unitTests.Rnw	(revision 2477)
@@ -0,0 +1,77 @@
+\documentclass[10pt]{article}
+%\VignetteIndexEntry{Rcpp-unitTests}
+%\VignetteKeywords{R,Rcpp,unit tests}
+%\VignetteDepends{Rcpp}
+\SweaveOpts{concordance=FALSE}
+
+\usepackage{vmargin}
+\setmargrb{0.75in}{0.75in}{0.75in}{0.75in}
+
+\usepackage{microtype}                     %% cf http://www.khirevich.com/latex/microtype/
+\usepackage[T1]{fontenc}		   %% cf http://www.khirevich.com/latex/font/
+\usepackage[bitstream-charter]{mathdesign} %% cf http://www.khirevich.com/latex/font/
+
+<<echo=FALSE,print=FALSE>>=
+require(Rcpp)
+prettyVersion <- packageDescription("Rcpp")$Version
+prettyDate <- format(Sys.Date(), "%B %e, %Y")
+library(RUnit)
+@
+
+\usepackage[colorlinks]{hyperref}
+\author{Dirk Eddelbuettel \and Romain Fran\c{c}ois}
+\title{\textbf{Rcpp}: Unit testing results}
+\date{Rcpp version \Sexpr{prettyVersion} as of \Sexpr{prettyDate}}
+
+\begin{document}
+\maketitle
+
+\section*{Test Execution}
+
+<<unitTesting,echo=FALSE,print=FALSE>>=
+pkg <- "Rcpp"
+
+if( Sys.getenv( "TRAVIS" ) == "true" ){
+  writeLines( "not running any tests as part of checking the vignette when doing continuous integration with travis" )
+} else {  
+  
+  ## Check the environemnt variable to see if all tests should be run
+  if (Sys.getenv("RunAllRcppTests") != "yes") {
+      writeLines("The environment variable 'RunAllRcppTests' was not set to 'yes', so skipping some tests.")
+  }
+  
+  if (file.exists("unitTests-results")) unlink("unitTests-results", recursive = TRUE)
+  dir.create("unitTests-results")
+  path <- system.file("unitTests", package=pkg)
+  testSuite <- defineTestSuite(name=paste(pkg, "unit testing"), dirs=path)
+  tests <- runTestSuite(testSuite)
+  err <- getErrors(tests)
+  if (err$nFail > 0) stop(sprintf("unit test problems: %d failures", err$nFail))
+  if (err$nErr > 0) stop( sprintf("unit test problems: %d errors", err$nErr))
+  printHTMLProtocol(tests, fileName=sprintf("unitTests-results/%s-unitTests.html", pkg))
+  printTextProtocol(tests, fileName=sprintf("unitTests-results/%s-unitTests.txt" , pkg))
+  
+  #if (file.exists("/tmp")) {
+  #    invisible(sapply(c("txt", "html"), function(ext) {
+  #        fname <- sprintf("unitTests-results/%s-unitTests.%s", pkg, ext)
+  #        file.copy(fname, "/tmp", overwrite=TRUE)
+  #    }))
+  #}
+}
+@
+
+\section*{Test Results}
+
+\begin{verbatim}
+<<importResults,echo=FALSE,results=tex>>=
+results <- "unitTests-results/Rcpp-unitTests.txt"
+if (file.exists(results)) {
+    writeLines(readLines(results))
+} else{
+    writeLines("Unit test results not available")
+}
+@
+
+\end{verbatim}
+
+\end{document}
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-modules.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-modules.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-modules.R	(revision 2477)
@@ -0,0 +1,241 @@
+### R code from vignette source 'Rcpp-modules.Rnw'
+
+###################################################
+### code chunk number 1: Rcpp-modules.Rnw:38-41
+###################################################
+suppressMessages(require(Rcpp))
+prettyVersion <- packageDescription("Rcpp")$Version
+prettyDate <- format(Sys.Date(), "%B %e, %Y")
+
+
+###################################################
+### code chunk number 7: Rcpp-modules.Rnw:212-214 (eval = FALSE)
+###################################################
+## f1 <- cxxfunction( , "", includes = unifModCode, plugin = "Rcpp" )
+## getDynLib(f1)  ## will display information about 'f1' just created
+
+
+###################################################
+### code chunk number 8: Rcpp-modules.Rnw:220-239 (eval = FALSE)
+###################################################
+## setClass( "Uniform", representation( pointer = "externalptr" ) )
+## 
+## # helper
+## Uniform_method <- function(name) {
+##     paste( "Uniform", name, sep = "__" )
+## }
+## 
+## # syntactic sugar to allow object$method( ... )
+## setMethod( "$", "Uniform", function(x, name ) {
+##     function(...) .Call( Uniform_method(name) , x@pointer, ... )
+## } )
+## # syntactic sugar to allow new( "Uniform", ... )
+## setMethod( "initialize", "Uniform", function(.Object, ...) {
+##     .Object@pointer <- .Call( Uniform_method("new"), ... )
+##     .Object
+## } )
+## 
+## u <- new( "Uniform", 0, 10 )
+## u$draw( 10L )
+
+
+###################################################
+### code chunk number 10: Rcpp-modules.Rnw:290-304 (eval = FALSE)
+###################################################
+## inc <- '
+## using namespace Rcpp;
+## 
+## double norm( double x, double y ) {
+##     return sqrt( x*x + y*y );
+## }
+## 
+## RCPP_MODULE(mod) {
+##     function( "norm", &norm );
+## }
+## '
+## 
+## fx <- cxxfunction(signature(), plugin="Rcpp", include=inc)
+## mod <- Module("mod", getDynLib(fx))
+
+
+###################################################
+### code chunk number 11: Rcpp-modules.Rnw:314-317 (eval = FALSE)
+###################################################
+## require(nameOfMyModulePackage)
+## mod <- new( mod )
+## mod$norm( 3, 4 )
+
+
+###################################################
+### code chunk number 14: Rcpp-modules.Rnw:369-378 (eval = FALSE)
+###################################################
+## require( Rcpp )
+## 
+## yd <- Module("yada", getDynLib(fx))
+## yd$bar(2L)
+## yd$foo(2L, 10.0)
+## yd$hello()
+## yd$bla()
+## yd$bla1(2L)
+## yd$bla2(2L, 5.0)
+
+
+###################################################
+### code chunk number 15: Rcpp-modules.Rnw:385-393 (eval = FALSE)
+###################################################
+## require(myModulePackage)    ## or whichever name was chose
+## 
+## bar(2L)
+## foo(2L, 10.0)
+## hello()
+## bla()
+## bla1(2L)
+## bla2(2L, 5.0)
+
+
+###################################################
+### code chunk number 17: Rcpp-modules.Rnw:430-432 (eval = FALSE)
+###################################################
+## mod <- Module("mod", getDynLib(fx))
+## show(mod$norm)
+
+
+###################################################
+### code chunk number 19: Rcpp-modules.Rnw:458-463 (eval = FALSE)
+###################################################
+## norm <- mod$norm
+## norm()
+## norm( y = 2 )
+## norm( x = 2, y = 3 )
+## args( norm )
+
+
+###################################################
+### code chunk number 21: Rcpp-modules.Rnw:484-486 (eval = FALSE)
+###################################################
+## norm <- mod$norm
+## args(norm)
+
+
+###################################################
+### code chunk number 23: Rcpp-modules.Rnw:505-507 (eval = FALSE)
+###################################################
+## norm <- mod$norm
+## args( norm )
+
+
+###################################################
+### code chunk number 25: Rcpp-modules.Rnw:555-564 (eval = FALSE)
+###################################################
+## ## assumes   fx_unif <- cxxfunction(...)   has ben run
+## unif_module <- Module( "unif_module", getDynLib(fx_unif ) )
+## Uniform <- unif_module$Uniform
+## u <- new( Uniform, 0, 10 )
+## u$draw( 10L )
+## u$range()
+## u$max <- 1
+## u$range()
+## u$draw( 10 )
+
+
+###################################################
+### code chunk number 35: Rcpp-modules.Rnw:729-735 (eval = FALSE)
+###################################################
+## Bar <- mod_bar$Bar
+## b <- new( Bar, 10 )
+## b$x + b$x
+## b$stats()
+## b$x <- 10
+## b$stats()
+
+
+###################################################
+### code chunk number 38: Rcpp-modules.Rnw:812-816 (eval = FALSE)
+###################################################
+## setMethod( "show", yada$World , function(object) {
+##     msg <- paste( "World object with message : ", object$greet() )
+##     writeLines( msg )
+## } )
+
+
+###################################################
+### code chunk number 40: Rcpp-modules.Rnw:879-892 (eval = FALSE)
+###################################################
+## ## for code compiled on the fly using cxxfunction() into 'fx_vec', we use
+## mod_vec <- Module( "mod_vec", getDynLib(fx_vec), mustStart = TRUE )
+## vec <- mod_vec$vec
+## ## and that is not needed in a package setup as e.g. one created
+## ## via Rcpp.package.skeleton(..., module=TRUE)
+## v <- new( vec )
+## v$reserve( 50L )
+## v$assign( 1:10 )
+## v$push_back( 10 )
+## v$size()
+## v$capacity()
+## v[[ 0L ]]
+## v$as.vector()
+
+
+###################################################
+### code chunk number 41: Rcpp-modules.Rnw:906-907
+###################################################
+options( prompt = " ", continue = " " )
+
+
+###################################################
+### code chunk number 42: Rcpp-modules.Rnw:910-911 (eval = FALSE)
+###################################################
+## import(Rcpp)
+
+
+###################################################
+### code chunk number 43: Rcpp-modules.Rnw:916-917 (eval = FALSE)
+###################################################
+## import(Rcpp, evalCpp)
+
+
+###################################################
+### code chunk number 44: Rcpp-modules.Rnw:931-934 (eval = FALSE)
+###################################################
+## .onLoad <- function(libname, pkgname) {
+##     loadRcppModules()
+## }
+
+
+###################################################
+### code chunk number 45: Rcpp-modules.Rnw:962-965 (eval = FALSE)
+###################################################
+## loadModule("yada")
+## loadModule("stdVector")
+## loadModule("NumEx")
+
+
+###################################################
+### code chunk number 46: Rcpp-modules.Rnw:977-982 (eval = FALSE)
+###################################################
+## yada <- Module( "yada" )
+## 
+## .onLoad <- function(libname, pkgname) {
+##     # placeholder
+## }
+
+
+###################################################
+### code chunk number 47: Rcpp-modules.Rnw:985-986
+###################################################
+options( prompt = "> ", continue = "+ " )
+
+
+###################################################
+### code chunk number 48: Rcpp-modules.Rnw:996-997 (eval = FALSE)
+###################################################
+## Rcpp.package.skeleton( "testmod", module = TRUE )
+
+
+###################################################
+### code chunk number 49: Rcpp-modules.Rnw:1010-1012 (eval = FALSE)
+###################################################
+## yada <- Module( "yada" )
+## prompt( yada, "yada-module.Rd" )
+
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/index.html
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/index.html	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/index.html	(revision 2477)
@@ -0,0 +1,68 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title>R: Vignettes and other documentation</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<link rel="stylesheet" type="text/css" href="/doc/html/R.css" />
+</head><body>
+<h1> Vignettes and other documentation
+<img class="toplogo" src="/doc/html/Rlogo.svg" alt="[R logo]" />
+</h1>
+<hr/>
+<div style="text-align: center;">
+<a href="/doc/html/index.html"><img class="arrow" src="/doc/html/up.jpg" alt="[Top]" /></a>
+</div>
+<h2>Vignettes from package 'Rcpp'</h2>
+<table width="100%">
+<col style="width: 22%;" />
+<col style="width:  2%;" />
+<col style="width: 50%;" />
+<col style="width:  8%;" />
+<col style="width:  8%;" />
+<col style="width:  8%;" />
+<tr><td style="text-align: right; vertical-align: top;"><a href="../../../library/Rcpp/doc/Rcpp-FAQ.pdf">Rcpp::Rcpp-FAQ</a></td>
+<td></td><td valign="top">Rcpp-FAQ</td>
+<td valign="top"><a href="../../../library/Rcpp/doc/Rcpp-FAQ.pdf">PDF</a></td>
+<td valign="top"><a href="../../../library/Rcpp/doc/Rcpp-FAQ.Rnw">source</a></td>
+<td valign="top" style="white-space: nowrap"><a href="../../../library/Rcpp/doc/Rcpp-FAQ.R">R code</a></td></tr>
+<tr><td style="text-align: right; vertical-align: top;"><a href="../../../library/Rcpp/doc/Rcpp-attributes.pdf">Rcpp::Rcpp-attributes</a></td>
+<td></td><td valign="top">Rcpp-attributes</td>
+<td valign="top"><a href="../../../library/Rcpp/doc/Rcpp-attributes.pdf">PDF</a></td>
+<td valign="top"><a href="../../../library/Rcpp/doc/Rcpp-attributes.Rnw">source</a></td>
+<td valign="top" style="white-space: nowrap"><a href="../../../library/Rcpp/doc/Rcpp-attributes.R">R code</a></td></tr>
+<tr><td style="text-align: right; vertical-align: top;"><a href="../../../library/Rcpp/doc/Rcpp-extending.pdf">Rcpp::Rcpp-extending</a></td>
+<td></td><td valign="top">Rcpp-extending</td>
+<td valign="top"><a href="../../../library/Rcpp/doc/Rcpp-extending.pdf">PDF</a></td>
+<td valign="top"><a href="../../../library/Rcpp/doc/Rcpp-extending.Rnw">source</a></td>
+<td valign="top" style="white-space: nowrap"><a href="../../../library/Rcpp/doc/Rcpp-extending.R">R code</a></td></tr>
+<tr><td style="text-align: right; vertical-align: top;"><a href="../../../library/Rcpp/doc/Rcpp-modules.pdf">Rcpp::Rcpp-modules</a></td>
+<td></td><td valign="top">Rcpp-modules</td>
+<td valign="top"><a href="../../../library/Rcpp/doc/Rcpp-modules.pdf">PDF</a></td>
+<td valign="top"><a href="../../../library/Rcpp/doc/Rcpp-modules.Rnw">source</a></td>
+<td valign="top" style="white-space: nowrap"><a href="../../../library/Rcpp/doc/Rcpp-modules.R">R code</a></td></tr>
+<tr><td style="text-align: right; vertical-align: top;"><a href="../../../library/Rcpp/doc/Rcpp-package.pdf">Rcpp::Rcpp-package</a></td>
+<td></td><td valign="top">Rcpp-package</td>
+<td valign="top"><a href="../../../library/Rcpp/doc/Rcpp-package.pdf">PDF</a></td>
+<td valign="top"><a href="../../../library/Rcpp/doc/Rcpp-package.Rnw">source</a></td>
+<td valign="top" style="white-space: nowrap"><a href="../../../library/Rcpp/doc/Rcpp-package.R">R code</a></td></tr>
+<tr><td style="text-align: right; vertical-align: top;"><a href="../../../library/Rcpp/doc/Rcpp-quickref.pdf">Rcpp::Rcpp-quickref</a></td>
+<td></td><td valign="top">Rcpp-quickref</td>
+<td valign="top"><a href="../../../library/Rcpp/doc/Rcpp-quickref.pdf">PDF</a></td>
+<td valign="top"><a href="../../../library/Rcpp/doc/Rcpp-quickref.Rnw">source</a></td>
+<td valign="top" style="white-space: nowrap"><a href="../../../library/Rcpp/doc/Rcpp-quickref.R">R code</a></td></tr>
+<tr><td style="text-align: right; vertical-align: top;"><a href="../../../library/Rcpp/doc/Rcpp-sugar.pdf">Rcpp::Rcpp-sugar</a></td>
+<td></td><td valign="top">Rcpp-sugar</td>
+<td valign="top"><a href="../../../library/Rcpp/doc/Rcpp-sugar.pdf">PDF</a></td>
+<td valign="top"><a href="../../../library/Rcpp/doc/Rcpp-sugar.Rnw">source</a></td>
+<td valign="top" style="white-space: nowrap"><a href="../../../library/Rcpp/doc/Rcpp-sugar.R">R code</a></td></tr>
+<tr><td style="text-align: right; vertical-align: top;"><a href="../../../library/Rcpp/doc/Rcpp-introduction.pdf">Rcpp::Rcpp-introduction</a></td>
+<td></td><td valign="top">Rcpp-introduction</td>
+<td valign="top"><a href="../../../library/Rcpp/doc/Rcpp-introduction.pdf">PDF</a></td>
+<td valign="top"><a href="../../../library/Rcpp/doc/Rcpp-introduction.Rnw">source</a></td>
+<td valign="top" style="white-space: nowrap"><a href="../../../library/Rcpp/doc/Rcpp-introduction.R">R code</a></td></tr>
+<tr><td style="text-align: right; vertical-align: top;"><a href="../../../library/Rcpp/doc/Rcpp-unitTests.pdf">Rcpp::Rcpp-unitTests</a></td>
+<td></td><td valign="top">Rcpp-unitTests</td>
+<td valign="top"><a href="../../../library/Rcpp/doc/Rcpp-unitTests.pdf">PDF</a></td>
+<td valign="top"><a href="../../../library/Rcpp/doc/Rcpp-unitTests.Rnw">source</a></td>
+<td valign="top" style="white-space: nowrap"><a href="../../../library/Rcpp/doc/Rcpp-unitTests.R">R code</a></td></tr>
+</table>
+</body></html>

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/index.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-quickref.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-quickref.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-quickref.R	(revision 2477)
@@ -0,0 +1,11 @@
+### R code from vignette source 'Rcpp-quickref.Rnw'
+
+###################################################
+### code chunk number 1: Rcpp-quickref.Rnw:29-33
+###################################################
+options( width= 50)
+library( "Rcpp" )
+prettyVersion <- packageDescription("Rcpp")$Version
+prettyDate <- format(Sys.Date(), "%B %e, %Y")
+
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-unitTests.pdf
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-unitTests.pdf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-FAQ.Rnw
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-FAQ.Rnw	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-FAQ.Rnw	(revision 2477)
@@ -0,0 +1,1334 @@
+% !Rnw driver = highlight::HighlightWeaveLatex()
+\documentclass[10pt]{article}
+%\VignetteIndexEntry{Rcpp-FAQ}
+%\VignetteEngine{highlight::highlight}
+%\VignetteKeywords{Rcpp, FAQ}
+%\VignetteDepends{Rcpp}
+
+\usepackage[USletter]{vmargin}
+\setmargrb{0.75in}{0.75in}{0.75in}{0.75in}
+
+\usepackage{color,alltt}
+\usepackage[authoryear,round,longnamesfirst]{natbib}
+\usepackage[colorlinks]{hyperref}
+\definecolor{link}{rgb}{0,0,0.3}	%% next few lines courtesy of RJournal.sty
+\hypersetup{
+    colorlinks,%
+    citecolor=link,%
+    filecolor=link,%
+    linkcolor=link,%
+    urlcolor=link
+}
+
+\usepackage{microtype}                     %% cf http://www.khirevich.com/latex/microtype/
+\usepackage[T1]{fontenc}		   %% cf http://www.khirevich.com/latex/font/
+\usepackage[bitstream-charter]{mathdesign} %% cf http://www.khirevich.com/latex/font/
+
+\newcommand{\proglang}[1]{\textsf{#1}}
+\newcommand{\pkg}[1]{{\fontseries{b}\selectfont #1}}
+\newcommand{\code}[1]{\texttt{#1}}
+\newcommand{\R}[0]{\proglang{R}}
+
+%% defined as a stop-gap measure til interaction with highlight is sorted out
+\newcommand{\hlboxlessthan}{   \hlnormalsizeboxlessthan}
+\newcommand{\hlboxgreaterthan}{\hlnormalsizeboxgreaterthan}
+\newcommand{\hlboxopenbrace}{  \hlnormalsizeboxopenbrace}
+\newcommand{\hlboxclosebrace}{ \hlnormalsizeboxclosebrace}
+\newcommand{\hlboxbacktick}{   \hlnormalsizeboxbacktick}
+\newcommand{\hlboxunderscore}{ \hlnormalsizeboxunderscore}
+
+%% This corresponds to setting boxes=TRUE for highlight
+\newsavebox{\hlbox}
+\definecolor{hlBg}{rgb}{0.949019607843137,0.949019607843137,0.949019607843137}
+\definecolor{hlBd}{rgb}{0.9,0.9,0.9} % border
+\renewenvironment{Hchunk}{\vspace{0.5em}\noindent\begin{lrbox}{\hlbox}\begin{minipage}[b]{.9\textwidth}}%
+    {\end{minipage}\end{lrbox}\fcolorbox{hlBd}{hlBg}{\usebox{\hlbox}}\vspace{0.5em}}
+
+\newcommand{\faq}[1]{FAQ~\ref{#1}}
+\newcommand{\rdoc}[2]{\href{http://www.rdocumentation.org/packages/#1/functions/#2}{\code{#2}}}
+
+<<echo=FALSE,print=FALSE>>=
+prettyVersion <- packageDescription("Rcpp")$Version
+prettyDate <- format(Sys.Date(), "%B %e, %Y")
+require(Rcpp)
+require(inline)
+require(highlight)
+@
+
+\author{Dirk Eddelbuettel \and Romain Fran\c{c}ois}
+\title{Frequently Asked Questions about \pkg{Rcpp}}
+\date{\pkg{Rcpp} version \Sexpr{prettyVersion} as of \Sexpr{prettyDate}}
+
+
+\begin{document}
+\maketitle
+
+\abstract{
+  \noindent This document attempts to answer the most Frequently Asked
+  Questions (FAQ) regarding the \pkg{Rcpp}
+  \citep{CRAN:Rcpp,JSS:Rcpp,Eddelbuettel:2013:Rcpp} package. 
+}
+
+\tableofcontents
+
+\section{Getting started}
+
+\subsection{How do I get started ?}
+
+If you have \pkg{Rcpp} installed, please execute the following command in \proglang{R}
+to access the introductory vignette (which is a variant of the \citet{JSS:Rcpp}
+paper) for a detailed introduction, ideally followed by at least the 
+Rcpp Attributes \citep{CRAN:Rcpp:Attributes} vignette:
+
+<<eval=FALSE>>=
+vignette("Rcpp-introduction")
+vignette("Rcpp-attributes")      
+@
+
+If you do not have \pkg{Rcpp} installed, these documents should also be available
+whereever you found this document, \textsl{i.e.,} on every mirror of CRAN site.
+
+\subsection{What do I need ?}
+
+Obviously, \proglang{R} must be installed. \pkg{Rcpp} provides a
+\proglang{C++} API as an extension to the \proglang{R} system.  As such, it
+is bound by the choices made by \proglang{R} and is also influenced by how
+\proglang{R} is configured.
+
+In general, the standard environment for building a CRAN package from source
+(particularly when it contains \proglang{C} or \proglang{C++} code) is required. This
+means one needs:
+\begin{itemize}
+\item a development environment with a suitable compiler (see
+  below), header files and required libraries;
+\item \proglang{R} should be built in a way that permits linking and possibly
+  embedding of \proglang{R}; this is typically ensured by the
+  \texttt{--enable-shared-lib} option;
+\item standard development tools such as \texttt{make} etc.
+\end{itemize}
+
+Also see the \href{http://www.rstudio.com/ide/docs/packages/prerequisites}{RStudio
+  documentation} on pre-requisites for R package development.
+
+\subsection{What compiler can I use ?}
+
+On almost all platforms, the GNU Compiler Collection (or \texttt{gcc}, which
+is also the name of its \proglang{C} language compiler) has to be used along
+with the corresponding \texttt{g++} compiler for the \proglang{C++} language.
+A minimal suitable version is a final 4.2.* release; earlier 4.2.* were
+lacking some \proglang{C++} features (and even 4.2.1, still used on OS X as the
+last gcc release), has issues).  
+
+Generally speaking, the default compilers on all the common platforms are suitable.
+
+Specific per-platform notes:
+\begin{description}
+  \item[Windows] users need the \texttt{Rtools} package from the site maintained by
+    Duncan Murdoch which contains all the required tools in a single package;
+    complete instructions specific to Windows are in the `R Administration'
+    manual \citep[Appendix D]{R:Administration}. As of August 2014, it still
+    installs the \texttt{gcc/g++} 4.6.* compiler which limits the ability to use
+    modern C++ standards so only \code{s-std=c++0x} is supported. R 3.1.0 and
+    above detect this and set appropriate flags.
+  \item[OS X] users, as noted in the `R Administration' manual \citep[Appendix
+    C.4]{R:Administration}, need to install the Apple Developer Tools
+    (\textsl{e.g.}, \href{https://itunes.apple.com/us/app/xcode/id497799835?mt=12}{Xcode} (OS X $\le 10.8$) or \href{https://developer.apple.com/library/ios/technotes/tn2339/_index.html}{Xcode Command Line Tools} (OS X $\ge 10.9$) (as well as \texttt{gfortran} if \proglang{R} or
+    Fortran-using packages are to be built); also see \faq{q:OSX} and
+    \faq{q:OSXArma} below. Depending on whether on OS X release before or after
+    Mavericks is used, different additional installation may be needed. Consult
+    the \code{r-sig-mac} list (and its archives) for (current) details.
+  \item[Linux] user need to install the standard developement packages. Some
+    distributions provide helper packages which pull in all the required
+    packages; the \texttt{r-base-dev} package on Debian and Ubuntu is an example.
+\end{description}
+
+The \texttt{clang} and \texttt{clang++} compilers from the LLVM project can
+also be used. On Linux, they are inter-operable with \texttt{gcc} et al. On
+OS X, they are unfortunately not ABI compatible.  The \texttt{clang++}
+compiler is interesting as it emits much more comprehensible error messages
+than \texttt{g++} (though \texttt{g++} 4.8 and 4.9 have caught up).
+
+The Intel \texttt{icc} family has also been used successfully  as its output
+files can also be combined with those from \texttt{gcc}.
+
+\subsection{What other packages are useful ?}
+
+Additional packages that we have found useful are
+
+\begin{description}
+\item[\pkg{inline}] which is invaluable for direct compilation, linking and loading
+  of short code snippets---but now effectively superseded by the Rcpp
+  Attributes (see \faq{using-attributes} and
+  \faq{prototype-using-attributes}) feature provided by \pkg{Rcpp};
+\item[\pkg{RUnit}] is used for unit testing; the package is recommended and
+  will be needed to re-run some of our tests but it is not strictly required
+  during use of \pkg{Rcpp};
+\item[\pkg{rbenchmark}] to run simple timing comparisons and benchmarks; it is also
+  recommended but not required.
+\item[\pkg{microbenchmark}] is an alternative for benchmarking.
+\item[\pkg{devtools}] can help the process of building, compiling and testing
+  a package but it too is entirely optional.
+\end{description}
+
+\subsection{What licenses can I choose for my code?}
+
+The \pkg{Rcpp} package is licensed under the terms of the
+\href{http://www.gnu.org/licenses/gpl-2.0.html}{GNU GPL 2 or later}, just like
+\proglang{R} itself. A key goal of the \pkg{Rcpp} package is to make
+extending \proglang{R} more seamless.  But by \textsl{linking} your code against
+\proglang{R} (as well as \pkg{Rcpp}), the combination is bound by the GPL as
+well.  This is very clearly 
+stated at the 
+\href{https://www.gnu.org/licenses/gpl-faq.html#GPLStaticVsDynamic}{FSF website}:
+
+\begin{quote}
+  Linking a GPL covered work statically or dynamically with other modules is
+  making a combined work based on the GPL covered work. Thus, the terms and
+  conditions of the GNU General Public License cover the whole combination. 
+\end{quote}
+
+So you are free to license your work under whichever terms you find suitable
+(provided they are GPL-compatible, see the 
+\href{http://www.gnu.org/licenses/licenses.html}{FSF site for details}). However,
+the combined work will remain under the terms and conditions of the GNU General
+Public License.  This restriction comes from both \proglang{R} which is GPL-licensed
+as well as from \pkg{Rcpp} and whichever other GPL-licensed components you may
+be linking against.  
+
+
+\section{Compiling and Linking}
+
+\subsection{How do I use \pkg{Rcpp} in my package ?}
+\label{make-package}
+
+\pkg{Rcpp} has been specifically designed to be used by other packages.
+Making a package that uses \pkg{Rcpp} depends on the same mechanics that are
+involved in making any \proglang{R} package that use compiled code --- so
+reading the \textsl{Writing R Extensions} manual \citep{R:Extensions} is a required
+first step.
+
+Further steps, specific to \pkg{Rcpp}, are described in a separate vignette.
+
+<<eval=FALSE>>=
+vignette("Rcpp-package")
+@
+
+\subsection{How do I quickly prototype my code?}
+
+There are two toolchains which can help with this:
+\begin{itemize}
+\item The older one is provided by the \pkg{inline} package and described in
+  Section~\ref{using-inline}. 
+\item Starting with \pkg{Rcpp} 0.10.0, the Rcpp Attributes feature (described
+  in Section~\ref{using-attributes}) offered an even easier alternative via
+  the function \rdoc{Rcpp}{evalCpp}, \rdoc{Rcpp}{cppFunction} and
+  \rdoc{Rcpp}{sourceCpp}.
+\end{itemize}
+The next two subsections show an example each.
+
+\subsubsection{Using inline}
+\label{using-inline}
+
+The \pkg{inline} package \citep{CRAN:inline} provides the functions
+\rdoc{inline}{cfunction} and \rdoc{inline}{cxxfunction}. Below is a simple
+function that uses \texttt{accumulate} from the (\proglang{C++}) Standard
+Template Library to sum the elements of a numeric vector.
+
+<<>>=
+fx <- cxxfunction(signature(x = "numeric"),
+    'NumericVector xx(x);
+     return wrap(std::accumulate(xx.begin(), xx.end(), 0.0));',
+    plugin = "Rcpp")
+res <- fx(seq(1, 10, by=0.5))
+res
+<<echo=FALSE>>=
+stopifnot(identical(res, sum(seq(1, 10, by=0.5))))
+@
+
+%\pkg{Rcpp} uses \pkg{inline} to power its entire unit test suite. Consult the
+%\texttt{unitTests} directory of \pkg{Rcpp} for several hundred further examples.
+%
+%< < eval=FALSE>>=
+% \list.files( system.file( "unitTests", package = "Rcpp" ), pattern = "^runit[.]" )
+% @
+
+One might want to use code that lives in a \proglang{C++} file instead of writing
+the code in a character string in R. This is easily achieved by using
+\rdoc{base}{readLines}:
+
+<<eval=FALSE>>=
+fx <- cxxfunction(signature(), paste(readLines("myfile.cpp"), collapse="\n"),
+                  plugin = "Rcpp")
+@
+
+The \texttt{verbose} argument of \rdoc{inline}{cxxfunction} is very
+useful as it shows how \pkg{inline} runs the show.
+
+\subsubsection{Using Rcpp Attributes}
+\label{using-attributes}
+
+Rcpp Attributes \citep{CRAN:Rcpp:Attributes}, and also discussed in
+\faq{prototype-using-attributes} below, permits an even easier 
+route to integrating R and C++.  It provides three key functions. First, \rdoc{Rcpp}{evalCpp}
+provide a means to evaluate simple C++ expression which is often useful for
+small tests, or to simply check if the toolchain is set up
+correctly. Second, \rdoc{Rcpp}{cppFunction} can be used to create C++ functions
+for R use on the fly.  Third, \code{Rcpp}{sourceCpp} can integrate entire files in
+order to define multiple functions.
+
+The example above can now be rewritten as:
+
+<<>>=
+cppFunction('double accu(NumericVector x) {
+   return(std::accumulate(x.begin(), x.end(), 0.0));
+}')
+res <- accu(seq(1, 10, by=0.5))
+res
+@
+
+The \rdoc{Rcpp}{cppFunction} parses the supplied text, extracts the desired
+function names, creates the required scaffolding, compiles, links and loads
+the supplied code and makes it available under the selected identifier.
+
+Similarly, \rdoc{Rcpp}{sourceCpp} can read in a file and compile, link and load
+the code therein.
+
+\subsection{How do I convert my prototyped code to a package ?}
+\label{from-inline-to-package}
+
+Since release 0.3.5 of \pkg{inline}, one can combine \faq{using-inline} and
+\faq{make-package}. See \verb|help("package.skeleton-methods")| once
+\pkg{inline} is loaded and use the skeleton-generating functionality to
+transform a prototyped function into the minimal structure of a package.
+After that you can proceed with working on the package in the spirit of
+\faq{make-package}.
+
+Rcpp Attributes \citep{CRAN:Rcpp:Attributes} also offers a means to convert
+functions written using Rcpp Attributes into a function via the
+\rdoc{Rdoc}{compileAttributes} function; see the vignette for details.
+
+\subsection{How do I quickly prototype my code in a package?}
+\label{using-a-package}
+
+The simplest way may be to work directly with a package.  Changes to both the
+\proglang{R} and \proglang{C++} code can be compiled and tested from the
+command line via:
+
+<<lang=bash>>=
+$ R CMD INSTALL mypkg && Rscript --default-packages=mypkg -e 'someFunctionToTickle(3.14)'
+@
+
+This first installs the packages, and then uses the command-line tool
+\rdoc{utils}{Rscript} (which ships with \code{R}) to load the package, and execute
+the \proglang{R} expression following the \code{-e} switch. Such an
+expression can contain multiple statements separated by semicolons.
+\rdoc{utils}{Rscript} is available on all three core operating systems.
+
+On Linux, one can also use \code{r} from the \code{littler} package by Horner
+and Eddelbuettel which is an alternative front end to \proglang{R} designed
+for both \verb|#!| (hashbang) scripting and command-line use. It has slightly
+faster start-up times than \rdoc{utils}{Rscript}; and both give a guaranteed clean
+slate as a new session is created.
+
+The example then becomes
+
+<<lang=bash>>=
+$ R CMD INSTALL mypkg && r -l mypkg -e 'someFunctionToTickle(3.14)'
+@
+
+The \code{-l} option calls 'suppressMessages(library(mypkg))' before executing the
+\proglang{R} expression. Several packages can be listed, separated by a comma.
+
+More choice are provide by the \pkg{devtools} package, and by using
+RStudio. See the respective documentation for details.
+
+\subsection{But I want to compile my code with R CMD SHLIB !}
+\label{using-r-cmd-shlib}
+
+The recommended way is to create a package and follow \faq{make-package}. The
+alternate recommendation is to use \pkg{inline} and follow \faq{using-inline}
+because it takes care of all the details.
+
+However, some people have shown that they prefer not to follow recommended
+guidelines and compile their code using the traditional \texttt{R CMD SHLIB}. To
+do so, we need to help \texttt{SHLIB} and let it know about the header files
+that \pkg{Rcpp} provides and the \proglang{C++} library the code must link
+against.
+
+On the Linux command-line, you can do the following:\newline
+<<lang=bash>>=
+$ export PKG_LIBS=`Rscript -e "Rcpp:::LdFlags()"`  # if Rcpp older than 0.11.0
+$ export PKG_CXXFLAGS=`Rscript -e "Rcpp:::CxxFlags()"`
+$ R CMD SHLIB myfile.cpp
+@
+which first defines and exports two relevant environment variables which
+\texttt{R CMD SHLIB} then relies on.  On other operating systems, appropriate
+settings may have to be used to define the environment variables.
+
+This approach corresponds to the very earliest ways of building programs and
+can still be found in some deprecated documents (as \textit{e.g.} some of
+Dirk's older 'Intro to HPC with R' tutorial slides).  It is still not
+recommended as there are tools and automation mechanisms that can do the work
+for you.
+
+\pkg{Rcpp} versions 0.11.0 or later can do with the definition of
+\code{PKG\_LIBS} as a user-facing library is no longer needed (and hence no
+longer shipped with the package).  One still needs to set \code{PKG\_CXXFLAGS}
+to tell R where the \pkg{Rcpp} headers files are located.  
+
+Once \code{R CMD SHLIB} has created the dyanmically-loadable file (with
+extension \code{.so} on Linux, \code{.dylib} on OS X or \code{.dll} on
+Windows), it can be loaded in an R session via \rdoc{base}{dyn.load}, and the
+function can be executed via \rdoc{base}{.Call}.  Needless to say, we
+\emph{strongly} recommend using a package, or at least Rcpp Attributes as
+either approach takes care of a lot of these tedious and error-prone manual
+steps.
+
+
+\subsection{But R CMD SHLIB still does not work !}
+
+We have had reports in the past where build failures occurred when users had
+non-standard code in their \verb|~/.Rprofile| or \texttt{Rprofile.site} (or
+equivalent) files.
+
+If such code emits text on \texttt{stdout}, the frequent and implicit
+invocation of \texttt{Rscript -e "..."} (as in \faq{using-r-cmd-shlib}
+above) to retrieve settings directly from \pkg{Rcpp} will fail.
+
+You may need to uncomment such non-standard code, or protect it by wrapping
+it inside \texttt{if (interactive())}, or possibly try to use \texttt{Rscript
+  --vanilla} instead of plain \texttt{Rscript}.
+
+
+\subsection{What about \texttt{LinkingTo} ?}
+
+\proglang{R} has only limited support for cross-package linkage.
+
+We now employ the \texttt{LinkingTo} field of the \texttt{DESCRIPTION} file
+of packages using \pkg{Rcpp}. But this only helps in having \proglang{R}
+compute the location of the header files for us.
+
+The actual library location and argument still needs to be provided by the
+user. How to do so has been shown above, and we recommned you use either
+\faq{make-package} or \faq{using-inline} both which use the \pkg{Rcpp}
+function \texttt{Rcpp:::LdFlags()}.
+
+If and when \texttt{LinkingTo} changes and lives up to its name, we will be
+sure to adapt \pkg{Rcpp} as well. 
+
+An important change arrive with \pkg{Rcpp} release 0.11.0 and concern the
+automatic registration of functions; see Section~\ref{function-registration} below.
+
+
+\subsection{Does \pkg{Rcpp} work on windows ?}
+
+Yes of course. See the Windows binaries provided by CRAN.
+
+\subsection{Can I use \pkg{Rcpp} with Visual Studio ?}
+
+Not a chance.
+
+And that is not because we are meanies but because \proglang{R} and Visual
+Studio simply do not get along. As \pkg{Rcpp} is all about extending
+\proglang{R} with \proglang{C++} interfaces, we are bound by the available
+toolchain.  And \proglang{R} simply does not compile with Visual Studio. Go
+complain to its vendor if you are still upset.
+
+\subsection{I am having problems building Rcpp on OS X, any help ?}
+\label{q:OSX}
+
+There are three known issues regarding Rcpp build problems on OS X.  If you are
+building packages with RcppArmadillo, there is yet another issue that is
+addressed separately in \faq{q:OSXArma} below.
+
+\subsubsection{Lack of a Compiler}
+By default, OS X does not ship with an active compiler. To enable a compiler one
+must either install
+\href{https://itunes.apple.com/us/app/xcode/id497799835?mt=12}{Xcode} (OS X
+$\le 10.8$) or
+\href{https://developer.apple.com/library/ios/technotes/tn2339/_index.html}{Xcode
+  Command Line Tools} (OS X $\ge 10.9$). We will focus on the later as the
+installation requires the use of \texttt{Terminal} and the install size is
+significantly less than the prior, which is setup using an installer.
+
+To install XCode Command Line Tools, one must do the following:
+
+\begin{enumerate}
+    \item Open \texttt{Terminal} found in \texttt{/Applications/Utilities/}
+    \item Type the following: 
+
+<<lang=bash>>=
+$ xcode-select --install
+@
+    \item Press "Install" on the window that pops up.
+    \item After the installation is complete, type the following in \texttt{Terminal} to ensure the installation was successful:
+ 
+<<lang=bash>>=
+$ gcc --version
+@
+\end{enumerate}
+
+After major system updates, e.g. going from version 10.11 to 10.12, you may need
+to accept the terms and licenses associated the the Xcode command line tools
+prior to being allowed to compile again.
+
+To do so, open the \texttt{Terminal} found in \texttt{/Applications/Utilities/} and type:
+
+<<lang=bash>>=
+$ git
+@
+
+Press spacebar to move down to the end of the file. There, you should see a
+prompt asking whether or not you accept the terms via either "Yes" or
+"No". Enter "Yes" if you agree to the terms to have the command line tools
+reactivated.
+
+\subsubsection{Differing Mac OS X R Versions Leading to Binary Failures}
+
+There are currently two distinct versions of R for OS X. The first version is a
+legacy version meant for Mac OS X 10.6 (Snow Leopard) - 10.8 (Mountain
+Lion). The second version is for more recent system Mac OS X 10.9 (Mavericks),
+10.10 (Yosemite), 10.11 (El Capitan). The distinction comes as a result of a
+change in the compilers shipped with the operating system. As a result, avoid
+sending package binaries if it is known that your collaborators are working on
+older systems as the R binaries for these two versions will not be able to mix.
+
+\subsubsection{No OpenMP Support}
+The OS X operating environment lacks the ability to parallelize sections of code
+using the \href{http://openmp.org/wp/}{OpenMP} standard. As a result, make sure
+to protect any reference to OpenMP. In this case, protect the inclusion of
+headers with:
+
+<<lang=cpp>>=
+#ifdef _OPENMP
+  #include <omp.h>
+#endif
+@
+
+And when one goes to parallelize portions of code use:
+
+<<lang=cpp>>=
+#ifdef _OPENMP
+    // multithreaded OpenMP version of code
+#else
+    // single-threaded version of code
+#endif
+@
+
+Doing so will enable the parallelization of the process on Linux and Windows. In
+the event that Apple enables OpenMP later on, this code will also allow for
+parallelization to occur.
+
+The reason for the lack of OpenMP support is because under OS X, you are not
+using the \texttt{gcc} compiler. Instead, all the requests are being redirected
+to \texttt{llvm}. As of LLVM 3.7, the
+\href{https://clang-omp.github.io/}{community initiative} to enable OpenMP has
+been merged into the \href{http://openmp.llvm.org/}{official branch}. Thus,
+there is hope in the next release of Xcode (around WWDC in June 2016) that
+OpenMP will work on OS X.
+
+
+\subsubsection{Additional Information / Help}
+
+Below are additional resources that provide information regarding compiling Rcpp code on OS X.
+
+\begin{enumerate}
+    \item A helpful post was provided by Brian Ripley regarding the use of
+      compiling R code with OS X in April 2014
+      \href{https://stat.ethz.ch/pipermail/r-sig-mac/2014-April/010835.html}{on
+        the \code{r-sig-mac} list}, which is generally recommended for OS
+      X-specific questions and further consultation. 
+    \item Another helpful write-up for installation / compilation on OS X Mavericks is provided
+      \href{http://www.bioconductor.org/developers/how-to/mavericks-howto/}{by the BioConductor project}. 
+    \item Lastly, another resource that exists for installation / compilation
+      help is provided at
+      \url{http://thecoatlessprofessor.com/programming/r-compiler-tools-for-rcpp-on-os-x/}. 
+\end{enumerate}
+
+\textbf{Note:} If you are running into trouble compiling code with RcppArmadillo, please also see \faq{q:OSXArma} listed below. 
+
+%At the time of writing this paragraph (in the spring of 2011), \pkg{Rcpp}
+%(just like CRAN) supports all OS X releases greater or equal to 10.5.
+%However, building \pkg{Rcpp} from source (or building packages using
+%\pkg{Rcpp}) also requires a recent-enough version of Xcode. For the
+%\textsl{Leopard} release of OS X, the current version is 3.1.4 which can be
+%downloaded free of charge from the Apple Developer site. Users may have to
+%manually select \code{g++-4.2} via the symbolic link \code{/usr/bin/g++}.
+%The \textsl{Snow Leopard} release already comes with Xcode 3.2.x and work as
+%is.
+
+\subsection{Does \pkg{Rcpp} work on solaris/suncc ?}
+
+Yes, it generally does.  But as we do not have access to such systems, some
+issues persist on the CRAN test systems.
+
+\subsection{Does \pkg{Rcpp} work with Revolution R ?}
+
+We have not tested it yet. \pkg{Rcpp} might need a few tweaks to work
+with the compilers used by Revolution R (if those differ from the defaults).
+
+\subsection{Is it related to CXXR ?}
+
+CXXR is an ambitious project that aims to totally refactor the \proglang{R}
+interpreter in \proglang{C++}. There are a few similaritites with \pkg{Rcpp}
+but the projects are unrelated.
+
+CXXR and \pkg{Rcpp} both want \proglang{R} to make more use of \proglang{C++}
+but they do it in very different ways.
+
+\subsection{How do I quickly prototype my code using Attributes?}
+\label{prototype-using-attributes}
+
+\pkg{Rcpp} version 0.10.0 and later offer a new feature 'Rcpp Attributes'
+which is described in detail in its own vignette
+\citep{CRAN:Rcpp:Attributes}.  In short, it offers functions \rdoc{Rcpp}{evalCpp},
+\rdoc{Rcpp}{cppFunction} and \rdoc{Rcpp}{sourceCpp} which extend the functionality of the
+\rdoc{Rcpp}{cxxfunction} function.
+
+
+\subsection{What about the new 'no-linking' feature??}
+\label{function-registration}
+
+Starting with \pkg{Rcpp} 0.11.0, functionality provided by \pkg{Rcpp} and
+used by packages built with \pkg{Rcpp} accessed via the registration facility
+offered by R (and which is used by \pkg{lme4} and \pkg{Matrix}, as well as by
+\pkg{xts} and \pkg{zoo}).  This requires no effort from the user /
+programmer, and even frees us from explicit linking instruction. In most
+cases, the files \code{src/Makevars} and \code{src/Makevars.win} can now be
+removed. Exceptions are the use of \pkg{RcppArmadillo} (which needs an entry
+\verb|PKG_LIBS=$(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)|) and packages linking 
+to external libraries they use.
+
+But for most packages using \pkg{Rcpp}, only two things are required:
+\begin{itemize}
+\item an entry in \code{DESCRIPTION} such as \code{Imports: Rcpp} (which may
+  be versioned as in \code{Imports: Rcpp (>= 0.11.0)}), and
+\item an entry in \code{NAMESPACE} to ensure \pkg{Rcpp} is correctly
+  instantiated, for example \code{importFrom(Rcpp, evalCpp)}.
+\end{itemize}
+
+The name of the symbol does not really matter; once one symbol is imported all
+symbols should be available.
+
+\subsection{I am having problems building RcppArmadillo on OS X, any help ?}
+\label{q:OSXArma}
+
+Odds are your build failures are due to the absence of \texttt{gfortran}
+and its associated libraries. The errors that you may receive are related to either: 
+\begin{center}
+\textbf{``-lgfortran''} or \textbf{``-lquadmath''}
+\end{center}
+
+To rectify the root of these errors, there are two options available. The first option is to download and use a fixed set of \texttt{gfortran} binaries that are used to compile R for OS X (e.g. given by the maintainers of the OS X build). The second option is to either use pre-existing \texttt{gfortran} binaries on your machine or download the latest.
+
+\subsubsection{Fixed set of \texttt{gfortran} binaries}
+
+Within this option, you will install a pre-compiled \code{gfortran} binary from
+\href{http://r.research.att.com/libs/}{\texttt{r.research.att.com/libs/}}. The binary listed here was compiled by Simon Urbanek the maintainer of the OS X R versions.
+
+To install the pre-compiled \code{gfortran} binary, do the following:
+\begin{enumerate}
+    \item Open \texttt{Terminal} found in \texttt{/Applications/Utilities/}
+    \item Type the following: 
+
+<<lang=bash>>=
+curl -O http://r.research.att.com/libs/gfortran-4.8.2-darwin13.tar.bz2
+sudo tar fvxz gfortran-4.8.2-darwin13.tar.bz2 -C /
+@
+
+\end{enumerate}
+
+For more information on this error, please see TheCoatlessProfessor's  \href{http://thecoatlessprofessor.com/programming/rcpp-rcpparmadillo-and-os-x-mavericks-lgfortran-and-lquadmath-error/}{Rcpp, RcppArmadillo and OS X Mavericks "-lgfortran" and "-lquadmath" error}.
+
+\subsubsection{Pre-existing or latest \texttt{gfortran} binaries}
+
+Most OS X users that have a pre-existing \texttt{gfortran} binaries or want the latest version, typically use a custom packaging solution to install \texttt{gfortran}; 
+\href{https://www.macports.org/}{\texttt{macports}},
+\href{http://brew.sh/}{\texttt{homebrew}}, and
+\href{http://www.finkproject.org/}{\texttt{fink}} are the usual suspects
+here. In general, we recommend using homebrew, and we provide a short
+set of instructions for installing \texttt{gfortran} below.
+
+After installing \texttt{homebrew} by
+\href{http://brew.sh/}{following the instructions here},
+you can install the latest version of \texttt{gfortran} with:
+
+    \code{brew install gcc}
+
+Note that \texttt{gfortran} is available as part of the \texttt{gcc}
+'formula' by default and cannot be downloaded separately, but one can
+freely use \texttt{gfortran} with Apple (or LLVM) \texttt{clang}
+compilers (as used by default on OS X since Mavericks).
+
+You may need to set the \code{FLIBS} variable in your
+\texttt{~/.R/Makevars} to point to the location of the \texttt{gfortran}
+library paths. A solution is outlined
+\href{http://stackoverflow.com/questions/29992066/rccp-warning-directory-not-found-for-option-l-usr-local-cellar-gfortran-4-8/29993906#29993906}{on
+  StackOverflow}, but the relevant details are copied in brief here.
+
+In short, you want to add this entry to your \texttt{~/.R/Makevars}:
+
+<<lang=bash>>=
+FLIBS=`gfortran -print-search-dirs | grep ^libraries: | sed 's|libraries: =||' | sed 's|:| -L|g' | sed 's|^|-L|'`
+@
+
+This invocation explicitly asks and constructs the library link paths
+from the \texttt{gfortran}'s reported search paths, and produces a set
+of paths suitable to be passed to \code{FLIBS}. \R will then search
+these paths when attempting to locate e.g \code{libgfortran} when
+compiling \pkg{RcppArmadillo} or other FORTRAN-dependent code.
+
+Also see \faq{q:OSX} above, and the links provided in that answer. In the event
+the above solution does not satisfy all the OS X build problems.  
+
+\section{Examples}
+
+The following questions were asked on the
+\href{https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel}{Rcpp-devel}
+mailing list, which is our preferred place to ask questions as it guarantees
+exposure to a number of advanced Rcpp users.  The
+\href{http://stackoverflow.com/questions/tagged/rcpp}{StackOverflow tag for
+  rcpp} is an alternative; that site is also easily searchable.
+
+Several dozen fully documented examples are provided at the
+\href{http://gallery.rcpp.org}{Rcpp Gallery} -- which is also open for new contributions.
+
+
+\subsection{Can I use templates with \pkg{Rcpp} ? }
+
+\begin{quote}
+  \emph{I'm curious whether one can provide a class definition inline in an R
+    script and then initialize an instance of the class and call a method on
+    the class, all inline in R.}
+\end{quote}
+
+This question was initially about using templates with \pkg{inline}, and we
+show that (older) answer first. It is also easy with Rcpp Attributes which is
+what we show below.
+
+\subsubsection{Using inline}
+
+\noindent Most certainly, consider this simple example of a templated class
+which squares its argument:
+
+<<lang=r>>=
+inc <- 'template <typename T>
+        class square : public std::unary_function<T,T> {
+        public:
+            T operator()( T t) const { return t*t ;}
+        };
+       '
+
+src <- '
+       double x = Rcpp::as<double>(xs);
+       int i = Rcpp::as<int>(is);
+       square<double> sqdbl;
+       square<int> sqint;
+       return Rcpp::DataFrame::create(Rcpp::Named("x", sqdbl(x)),
+                                      Rcpp::Named("i", sqint(i)));
+       '
+fun <- cxxfunction(signature(xs="numeric", is="integer"),
+                   body=src, include=inc, plugin="Rcpp")
+
+fun(2.2, 3L)
+@
+
+\subsubsection{Using Rcpp Attributes}
+
+We can also use 'Rcpp Attributes' \citep{CRAN:Rcpp:Attributes}---as described
+in \faq{using-attributes} and \faq{prototype-using-attributes} above. Simply
+place the following code into a file and use \rdoc{Rcpp}{sourceCpp} on it. It
+will even run the R part at the end.
+
+<<lang=cpp>>=
+#include <Rcpp.h>
+
+template <typename T> class square : public std::unary_function<T,T> {
+public:
+    T operator()( T t) const { return t*t ;}
+};
+
+// [[Rcpp::export]]
+Rcpp::DataFrame fun(double x, int i) {
+       square<double> sqdbl;
+       square<int> sqint;
+       return Rcpp::DataFrame::create(Rcpp::Named("x", sqdbl(x)),
+                                      Rcpp::Named("i", sqint(i)));
+}
+
+/*** R
+fun(2.2, 3L)
+*/
+@ 
+
+\subsection{Can I do matrix algebra with \pkg{Rcpp} ?}
+\label{matrix-algebra}
+
+\begin{quote}
+  \emph{\pkg{Rcpp} allows element-wise operations on vector and matrices through
+    operator overloading and STL interface, but what if I want to multiply a
+    matrix by a vector, etc ...}
+\end{quote}
+
+\noindent Currently, \pkg{Rcpp} does not provide binary operators to allow operations
+involving entire objects. Adding operators to \pkg{Rcpp} would be a major
+project (if done right) involving advanced techniques such as expression
+templates. We currently do not plan to go in this direction, but we would
+welcome external help. Please send us a design document.
+
+However, we have developed the \pkg{RcppArmadillo} package
+\citep{CRAN:RcppArmadillo,Eddelbuettel+Sanderson:2014:RcppArmadillo} that
+provides a bridge between \pkg{Rcpp} and \pkg{Armadillo}
+\citep{Sanderson:2010:Armadillo}. \pkg{Armadillo}
+supports binary operators on its types in a way that takes full advantage of
+expression templates to remove temporaries and allow chaining of
+operations. That is a mouthful of words meaning that it makes the code go
+faster by using fiendishly clever ways available via the so-called template
+meta programming, an advanced \proglang{C++} technique.
+Also, the \pkg{RcppEigen} package \citep{JSS:RcppEigen} provides an alternative using the
+\href{http://eigen.tuxfamily.org}{Eigen} template library.
+
+\subsubsection{Using inline}
+
+The following example is adapted from the examples available at the project
+page of Armadillo. It calculates $ x' \times Y^{-1} \times z$
+
+<<lang=cpp>>=
+    // copy the data to armadillo structures
+    arma::colvec x = Rcpp::as<arma::colvec> (x_);
+    arma::mat Y = Rcpp::as<arma::mat>(Y_) ;
+    arma::colvec z = Rcpp::as<arma::colvec>(z_) ;
+
+    // calculate the result
+    double result = arma::as_scalar(arma::trans(x) * arma::inv(Y) * z);
+
+    // return it to R
+    return Rcpp::wrap( result );
+@
+
+%% Running this now makes the package depend on RcppArmadillo being installed
+%% and would require at least a Suggests
+
+If stored in a file \code{myfile.cpp}, we can use it via \pkg{inline}:
+
+<<eval=FALSE>>=
+fx <- cxxfunction(signature(x_="numeric", Y_="matrix", z_="numeric" ),
+                  paste(readLines("myfile.cpp"), collapse="\n"),
+                  plugin="RcppArmadillo" )
+fx(1:4, diag(4), 1:4)
+@
+<<echo=FALSE>>=
+unlink("myfile.cpp")
+@
+
+The focus is on the code \verb|arma::trans(x) * arma::inv(Y) * z|, which
+performs the same operation as the R code \verb|t(x) %*% solve(Y) %*% z|,
+although Armadillo turns it into only one operation, which makes it quite fast.
+Armadillo benchmarks against other \proglang{C++} matrix algebra libraries
+are provided on \href{http://arma.sourceforge.net/speed.html}{the Armadillo website}.
+
+It should be noted that code below depends on the version \texttt{0.3.5} of
+\pkg{inline} and the version \texttt{0.2.2} of \pkg{RcppArmadillo}
+
+\subsubsection{Using Rcpp Attributes}
+
+We can also write the same example for use with Rcpp Attributes:
+
+<<lang=cpp>>=
+#include <RcppArmadillo.h>
+
+// [[Rcpp::depends(RcppArmadillo)]]
+
+// [[Rcpp::export]]
+double fx(arma::colvec x, arma::mat Y, arma::colvec z) {
+    // calculate the result
+    double result = arma::as_scalar(arma::trans(x) * arma::inv(Y) * z);
+    return result;
+}
+
+/*** R
+fx(1:4, diag(4), 1:4)
+*/
+@ 
+
+Here, the additional \code{Rcpp::depends(RcppArmadillo)} ensures that code
+can be compiled against the \pkg{RcppArmadillo} header, and that the correct
+libraries are linked to the function built from the supplied code example.
+
+Note how we do not have to concern ourselves with conversion; R object
+automatically become (Rcpp)Armadillo objects and we can focus on the single
+computing a (scalar) result.
+
+
+
+\subsection{Can I use code from the Rmath header and library with \pkg{Rcpp} ?}
+
+\begin{quote}
+  \emph{Can I call functions defined in the Rmath header file and the
+    standalone math library for R--as for example the random number generators?}
+\end{quote}
+
+\noindent Yes, of course. This math library exports a subset of R, but \pkg{Rcpp} has
+access to much more.  Here is another simple example. Note how we have to use
+and instance of the \texttt{RNGScope} class to set and re-set the
+random-number generator. This also illustrates Rcpp sugar as we are using a
+vectorised call to \texttt{rnorm}. Moreover, because the RNG is reset, the
+two calls result in the same random draws. If we wanted to control the draws,
+we could explicitly set the seed after the \texttt{RNGScope} object has been
+instantiated.
+
+<<>>=
+fx <- cxxfunction(signature(), 
+                  'RNGScope();
+                   return rnorm(5, 0, 100);',
+                  plugin="Rcpp")
+set.seed(42)
+fx()
+fx()
+@
+
+Newer versions of Rcpp also provide the actual Rmath function in the \code{R}
+namespace, \textsl{i.e.} as \code{R::rnorm(m,s)} to obtain a scalar
+random variable distributed as $N(m,s)$.
+
+Using Rcpp Attributes, this can be as simple as 
+
+<<>>=
+cppFunction('Rcpp::NumericVector ff(int n) { return rnorm(n, 0, 100); }')
+set.seed(42)
+ff(5)
+ff(5)
+set.seed(42)
+rnorm(5, 0, 100)
+rnorm(5, 0, 100)
+@ 
+
+This illustrates the Rcpp Attributes adds the required \code{RNGScope} object
+for us. It also shows how setting the seed from R affects draws done via C++
+as well as R, and that identical random number draws are obtained.
+
+\subsection{Can I use NA and Inf with \pkg{Rcpp} ?}
+
+\begin{quote}
+  \emph{R knows about NA and Inf. How do I use them from C++?}
+\end{quote}
+
+\noindent Yes, see the following example:
+
+<<>>=
+src <- 'Rcpp::NumericVector v(4);
+        v[0] = R_NegInf;  // -Inf
+        v[1] = NA_REAL;   // NA
+        v[2] = R_PosInf;  // Inf
+        v[3] = 42;        // see the Hitchhiker Guide
+        return Rcpp::wrap(v);'
+fun <- cxxfunction(signature(), src, plugin="Rcpp")
+fun()
+@
+
+Similarly, for Rcpp Attributes:
+
+<<lang=cpp>>=
+#include <Rcpp.h>
+
+// [[Rcpp::export]]
+Rcpp::NumericVector fun(void) {
+    Rcpp::NumericVector v(4);
+    v[0] = R_NegInf;  // -Inf
+    v[1] = NA_REAL;   // NA
+    v[2] = R_PosInf;  // Inf
+    v[3] = 42;        // see the Hitchhiker Guide
+    return v;
+}
+@ 
+
+\subsection{Can I easily multiply matrices ?}
+
+\begin{quote}
+  \emph{Can I multiply matrices easily?}
+\end{quote}
+
+\noindent Yes, via the \pkg{RcppArmadillo} package which builds upon \pkg{Rcpp} and the
+wonderful Armadillo library described above in \faq{matrix-algebra}:
+
+<<eval=FALSE>>=
+txt <- 'arma::mat Am = Rcpp::as< arma::mat >(A);
+        arma::mat Bm = Rcpp::as< arma::mat >(B);
+        return Rcpp::wrap( Am * Bm );'
+mmult <- cxxfunction(signature(A="numeric", B="numeric"),
+                     body=txt, plugin="RcppArmadillo")
+A <- matrix(1:9, 3, 3)
+B <- matrix(9:1, 3, 3)
+C <- mmult(A, B)
+@
+% < < echo=FALSE,print=FALSE > > =
+% A <- matrix(1:9, 3, 3)
+% B <- matrix(9:1, 3, 3)
+% A %*% B
+% @
+
+Armadillo supports a full range of common linear algebra operations.
+
+The \pkg{RcppEigen} package provides an alternative using the
+\href{http://eigen.tuxfamily.org}{Eigen} template library.
+
+Rcpp Attributes, once again, makes this even easier:
+
+<<lang=cpp>>=
+
+#include <RcppArmadillo.h>
+
+// [[Rcpp::depends(RcppArmadillo)]] 
+
+// [[Rcpp::export]]
+arma::mat mult(arma::mat A, arma::mat B) { 
+    return A*B; 
+}
+
+/*** R
+A <- matrix(1:9, 3, 3)
+B <- matrix(9:1, 3, 3)
+mult(A,B)
+*/
+@ 
+
+which can be built, and run, from R via a simple \rdoc{Rcpp}{sourceCpp}
+call---and will also run the small R example at the end.
+
+
+\subsection{How do I write a plugin for \pkg{inline} and/or Rcpp Attributes?}
+
+\begin{quote}
+  \emph{How can I create my own plugin for use by the \pkg{inline} package?}
+\end{quote}
+
+\noindent Here is an example which shows how to it using GSL libraries as an
+example.  This is merely for demonstration, it is also not perfectly general
+as we do not detect locations first---but it serves as an example:
+
+<<eval=FALSE>>=
+## simple example of seeding RNG and drawing one random number
+gslrng <- '
+int seed = Rcpp::as<int>(par) ;
+gsl_rng_env_setup();
+gsl_rng *r = gsl_rng_alloc (gsl_rng_default);
+gsl_rng_set (r, (unsigned long) seed);
+double v = gsl_rng_get (r);
+gsl_rng_free(r);
+return Rcpp::wrap(v);'
+
+plug <- Rcpp:::Rcpp.plugin.maker(
+    include.before = "#include <gsl/gsl_rng.h>",
+    libs = paste("-L/usr/local/lib/R/site-library/Rcpp/lib -lRcpp",
+                 "-Wl,-rpath,/usr/local/lib/R/site-library/Rcpp/lib",
+                 "-L/usr/lib -lgsl -lgslcblas -lm"))
+registerPlugin("gslDemo", plug )
+fun <- cxxfunction(signature(par="numeric"), gslrng, plugin="gslDemo")
+fun(0)
+@
+%
+
+Here the \pkg{Rcpp} function \code{Rcpp.plugin.maker} is used to create a
+plugin 'plug' which is then registered, and subsequently used by \pkg{inline}.
+
+The same plugins can be used by Rcpp Attributes as well.
+
+\subsection{How can I pass one additional flag to the compiler?}
+
+\begin{quote}
+  \emph{How can I pass another flag to the \code{g++} compiler without writing a new plugin?}
+\end{quote}
+
+The quickest way is to modify the return value from an existing plugin. Here
+we use the default one from \pkg{Rcpp} itself in order to pass the new flag
+\verb|-std=c++0x|. As it does not set the \verb|PKG_CXXFLAGS| variable, we
+simply assign this. For other plugins, one may need to append to the existing
+values instead.
+
+<<eval=FALSE>>=
+myplugin <- getPlugin("Rcpp")
+myplugin$env$PKG_CXXFLAGS <- "-std=c++11"
+f <- cxxfunction(signature(), settings=myplugin, body='
++    std::vector<double> x = { 1.0, 2.0, 3.0 };  // fails without -std=c++0x
++    return Rcpp::wrap(x);
++ ')
+f()
+@
+
+For Rcpp Attributes, the attributes \code{Rcpp::plugin()} can be
+used. Currently supported plugins are for C++11 as well as for OpenMP.
+
+\subsection{How can I set matrix row and column names ?}
+
+\begin{quote}
+  \emph{Ok, I can create a matrix, but how do I set its row and columns names?}
+\end{quote}
+
+Pretty much the same way as in \proglang{R} itself: We define a list with two
+character vectors, one each for row and column names, and assign this to the
+\code{dimnames} attribute:
+
+<<eval=FALSE>>=
+src <- '
+  Rcpp::NumericMatrix x(2,2);
+  x.fill(42);                           // or more interesting values
+  Rcpp::List dimnms =                   // two vec. with static names
+      Rcpp::List::create(Rcpp::CharacterVector::create("cc", "dd"),
+                         Rcpp::CharacterVector::create("ee", "ff"));
+  // and assign it
+  x.attr("dimnames") = dimnms;
+  return(x);
+'
+fun <- cxxfunction(signature(), body=src, plugin="Rcpp")
+fun()
+@
+%
+
+The same logic, but used with Rcpp Attributes:
+
+<<lang=cpp>>=
+#include <Rcpp.h>
+
+// [[Rcpp::export]]
+Rcpp::List fun(void) {
+    Rcpp::NumericMatrix x(2,2);
+    x.fill(42);                           // or more interesting values
+    Rcpp::List dimnms =                   // two vec. with static names
+        Rcpp::List::create(Rcpp::CharacterVector::create("cc", "dd"),
+                           Rcpp::CharacterVector::create("ee", "ff"));
+    // and assign it
+    x.attr("dimnames") = dimnms;
+    return(x);
+}
+@ 
+
+\subsection{Why can long long types not be cast correctly?}
+
+That is a good and open question. We rely on the basic \proglang{R} types,
+notably \code{integer} and \code{numeric}.  These can be cast to and from
+\proglang{C++} types without problems.  But there are corner cases.  The
+following example, contributed by a user, shows that we cannot reliably cast
+\code{long} types (on a 64-bit machines).
+
+<<eval=FALSE>>=
+BigInts <- cxxfunction(signature(),
+  'std::vector<long> bigints;
+   bigints.push_back(12345678901234567LL);
+   bigints.push_back(12345678901234568LL);
+   Rprintf("Difference of %ld\\n", 12345678901234568LL - 12345678901234567LL);
+   return wrap(bigints);', plugin="Rcpp", includes="#include <vector>")
+
+retval<-BigInts()
+
+# Unique 64-bit integers were cast to identical lower precision numerics
+# behind my back with no warnings or errors whatsoever.  Error.
+
+
+stopifnot(length(unique(retval)) == 2)
+@
+%
+
+While the difference of one is evident at the \proglang{C++} level, it is no
+longer present once cast to \proglang{R}. The 64-bit integer values get cast
+to a floating point types with a 53-bit mantissa. We do not have a good
+suggestion or fix for casting 64-bit integer values: 32-bit integer values
+fit into \code{integer} types, up to 53 bit precision fits into
+\code{numeric} and beyond that truly large integers may have to converted
+(rather crudely) to text and re-parsed. Using a different representation as
+for example from the \href{http://gmplib.org/}{GNU Multiple Precision Arithmetic
+  Library} may be an alternative.
+
+\subsection{What LaTeX packages do I need to typeset the vignettes ?}
+
+\begin{quote}
+  \emph{I would like to typeset the vignettes. What do I need?}
+\end{quote}
+
+The \href{https://www.tug.org/texlive/}{TeXLive} distribution seems to get
+bigger and bigger.  What you need to install may depend on your operating
+system.
+
+Specific per-platform notes:
+\begin{description}
+  \item[Windows] users probably want the \href{http://miktex.org/}{MiKTeX}.
+    Suggestions for a more detailed walk through would be appreciated.
+  \item[OS X] users seem to fall into camps which like or do not like brew /
+    homebrew. One suggestion was to install
+    \href{https://tug.org/mactex/mactex-download.html}{MacTeX} but at
+    approximately 2.5gb (as of January 2016) this is not lightweight.
+  \item[Linux] users probably want the full
+    \href{https://www.tug.org/texlive/}{TeXLive} set from their distribution. On
+    \href{http://www.debian.org}{Debian} these packages are installed to build
+    the R package itself: \texttt{texlive-base, texlive-latex-base,
+      texlive-generic-recommended, texlive-fonts-recommended,
+      texlive-fonts-extra, texlive-extra-utils, texlive-latex-recommended,
+      texlive-latex-extra}.  Using \texttt{texlive-full} may be a shortcut.
+    Fedora and other distributions should have similar packages.
+\end{description}
+
+\subsection{Why is there a limit of 20 on some constructors?}
+
+\begin{quote}
+  \emph{Ok, I would like to pass $N$ object but you only allow 20. How come?}
+\end{quote}
+
+In essence, and in order to be able to compile it with the largest number of
+compilers, \pkg{Rcpp} is constrained by the older C++ standards which do not
+support variadic function arguments.  So we actually use macros and code
+generator scripts to explicitly enumerate arguments, and that number has to stop
+at some limit. We chose 20.
+
+A good discussion is available at
+\href{http://stackoverflow.com/questions/27371543}{this StackOverflow question}
+concering data.frame creation with \pkg{Rcpp}. One solution offers a custom
+\code{ListBuilder} class to circumvent the limit; another suggests to simply
+nest lists.
+
+\subsection{Can I use default function parameters with \pkg{Rcpp}?}
+
+Yes, you can use default parameters with \textit{some} limitations. 
+The limitations are mainly related to string literals and empty vectors.
+This is what is currently supported:
+
+\begin{itemize}
+\item String literals delimited by quotes (e.g. \code{"foo"})
+\item Integer and Decimal numeric values (e.g. \code{10} or \code{4.5})
+\item Pre-defined constants including:
+\begin{itemize}
+\item Booleans: \code{true} and \code{false}
+\item Null Values: \code{R\_NilValue}, \code{NA\_STRING},
+\code{NA\_INTEGER}, \code{NA\_REAL}, and \code{NA\_LOGICAL}.
+\end{itemize}
+\item Selected vector types can be instantiated using the empty form of the
+\code{::create} static member function.
+\begin{itemize}
+\item \code{CharacterVector}, \code{IntegerVector}, and
+\code{NumericVector}
+\end{itemize}
+\item Matrix types instantiated using the rows, cols constructor \code{Rcpp::<Type>Matrix n(rows,cols)}
+\begin{itemize}
+\item \code{CharacterMatrix}, \code{IntegerMatrix}, and
+\code{NumericMatrix})
+\end{itemize}
+\end{itemize}
+
+To illustrate, please consider the following example that provides a short
+how to:
+
+<<lang=cpp>>=
+#include <Rcpp.h>
+
+// [[Rcpp::export]]
+void sample_defaults(NumericVector x = NumericVector::create(), // Size 0 vector
+                     bool bias = true,                          // Set to true
+                     std::string method = "rcpp rules!"){       // Default string
+    Rcpp::Rcout << "x size: " << x.size() << ", ";
+    Rcpp::Rcout << "bias value: " << bias << ", ";
+    Rcpp::Rcout << "method value: " << method << std::endl;
+}
+
+/*** R
+sample_defaults()                  # all defaults
+sample_defaults(1:5)               # supply x values
+sample_defaults(bias = FALSE,
+                method = "rstats") # supply bool and string
+*/
+@ 
+
+Note: In \code{cpp}, the default \code{bool} values are \code{true} and 
+\code{false} whereas in R the valid types are \code{TRUE} or \code{FALSE}.
+
+
+
+\section{Support}
+
+\subsection{Is the API documented ?}
+
+You bet. We use \proglang{doxygen} to generate html, latex and man page
+documentation from the source. The html documentation is available for
+\href{http://dirk.eddelbuettel.com/code/rcpp/html/index.html}{browsing}, as a
+\href{http://dirk.eddelbuettel.com/code/rcpp/Rcpp_refman.pdf}{very large pdf file},
+and all three formats are also available a zip-archives:
+\href{http://dirk.eddelbuettel.com/code/rcpp/rcpp-doc-html.zip}{html},
+\href{http://dirk.eddelbuettel.com/code/rcpp/rcpp-doc-latex.zip}{latex}, and
+\href{http://dirk.eddelbuettel.com/code/rcpp/rcpp-doc-man.zip}{man}.
+
+\subsection{Does it really work ?}
+
+We take quality seriously and have developped an extensive unit test suite to
+cover many possible uses of the \pkg{Rcpp} API.
+
+We are always on the look for more coverage in our testing. Please let us know
+if something has not been tested enough.
+
+
+\subsection{Where can I ask further questions ?}
+
+The
+\href{https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel}{Rcpp-devel}
+mailing list hosted at R-forge is by far the best place.  You may also want
+to look at the list archives to see if your question has been asked before.
+
+You can also use \href{http://stackoverflow.com/questions/tagged/rcpp}{Stack
+  Overflow via its 'rcpp' tag}.
+
+\subsection{Where can I read old questions and answers ?}
+
+The normal \href{https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel}{Rcpp-devel}
+mailing list hosting at R-forge contains an archive, which can be
+\href{http://lists.r-forge.r-project.org/mailman/swish.cgi?query=listname=rcpp-devel}{searched via swish}.
+
+Alternatively, one can also use
+\href{http://thread.gmane.org/gmane.comp.lang.r.rcpp/}{Gmane on Rcpp-devel} as well as
+\href{http://www.mail-archive.com/rcpp-devel@lists.r-forge.r-project.org/info.html}{Mail-Archive
+  on Rcpp-devel} both of which offer web-based interfaces, including
+searching.
+
+\subsection{I like it. How can I help ?}
+\label{helping}
+
+We maintain a list of
+\href{https://github.com/RcppCore/Rcpp/issues?state=open}{open issues in the
+  Github repository}. We welcome pull requests and suggest that code submissions
+come corresponding unit tests and, if applicable, documentation.
+
+If you are willing to donate time and have skills in C++, let us know. If you are
+willing to donate money to sponsor improvements, let us know too.
+
+You can also spread the word about \pkg{Rcpp}. There are many packages on CRAN
+that use \proglang{C++}, yet are not using \pkg{Rcpp}. You could blog about
+it, or get the word out otherwise.
+
+Last but not least the \href{http://gallery.rcpp.org}{Rcpp Gallery} is open
+for user contributions.
+
+
+\subsection{I don't like it. How can I help ?}
+
+It is very generous of you to still want to help. Perhaps you can tell us
+what it is that you dislike. We are very open to \emph{constructive} criticism.
+
+\subsection{Can I have commercial support for \pkg{Rcpp} ?}
+
+Sure you can. Just send us an email, and we will be happy to discuss the
+request.
+
+\subsection{I want to learn quickly. Do you provide training courses ?}
+
+Yes. Just send us an email.
+
+\subsection{Where is the code repository ?}
+
+From late 2008 to late 2013, we used the
+\href{https://r-forge.r-project.org/scm/?group_id=155}{Subversion repository at R-Forge}
+which contained \pkg{Rcpp} and a number of related packages. It still has the full
+history as well as number of support files.
+
+We have since switched to a \href{http://github.com/RcppCore/Rcpp}{Git
+  repository at Github} for \pkg{Rcpp} (as well as for \pkg{RcppArmadillo} and
+\pkg{RcppEigen}).
+
+\bibliographystyle{plainnat}
+\bibliography{\Sexpr{Rcpp:::bib()}}
+\end{document}
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-modules.Rnw
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-modules.Rnw	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-modules.Rnw	(revision 2477)
@@ -0,0 +1,1053 @@
+% !Rnw driver = highlight::HighlightWeaveLatex()
+\documentclass[10pt]{article}
+%\VignetteIndexEntry{Rcpp-modules}
+%\VignetteEngine{highlight::highlight}
+%\VignetteKeywords{Rcpp, module}
+%\VignetteDepends{Rcpp}
+
+\usepackage[USletter]{vmargin}
+\setmargrb{0.75in}{0.75in}{0.75in}{0.75in}
+
+\usepackage{color, alltt}
+\usepackage[authoryear,round,longnamesfirst]{natbib}
+\usepackage[colorlinks]{hyperref}
+\definecolor{link}{rgb}{0,0,0.3}	%% next few lines courtesy of RJournal.sty
+\hypersetup{
+    colorlinks,%
+    citecolor=link,%
+    filecolor=link,%
+    linkcolor=link,%
+    urlcolor=link
+}
+
+\usepackage{microtype}                     %% cf http://www.khirevich.com/latex/microtype/
+\usepackage[T1]{fontenc}		   %% cf http://www.khirevich.com/latex/font/
+\usepackage[bitstream-charter]{mathdesign} %% cf http://www.khirevich.com/latex/font/
+
+\newcommand{\code}[1]{\texttt{#1}}
+\newcommand{\proglang}[1]{\textsf{#1}}
+\newcommand{\pkg}[1]{{\fontseries{b}\selectfont #1}}
+
+%% This corresponds to setting boxes=TRUE for highlight
+\newsavebox{\hlbox}
+\definecolor{hlBg}{rgb}{0.949019607843137,0.949019607843137,0.949019607843137}
+\definecolor{hlBd}{rgb}{0.9,0.9,0.9} % border
+\renewenvironment{Hchunk}{\vspace{0.5em}\noindent\begin{lrbox}{\hlbox}\begin{minipage}[b]{.9\textwidth}}%
+    {\end{minipage}\end{lrbox}\fcolorbox{hlBd}{hlBg}{\usebox{\hlbox}}\vspace{0.5em}}
+
+<<echo=FALSE,print=FALSE>>=
+suppressMessages(require(Rcpp))
+prettyVersion <- packageDescription("Rcpp")$Version
+prettyDate <- format(Sys.Date(), "%B %e, %Y")
+@
+
+\author{Dirk Eddelbuettel \and Romain Fran\c{c}ois}
+\title{Exposing \proglang{C++} functions and classes with \pkg{Rcpp} modules}
+\date{\pkg{Rcpp} version \Sexpr{prettyVersion} as of \Sexpr{prettyDate}}
+
+\begin{document}
+\maketitle
+
+\abstract{
+  \noindent
+  This note discusses \textsl{Rcpp modules}. \textsl{Rcpp modules} allow programmers to
+  expose \proglang{C++} functions and classes to \proglang{R} with relative
+  ease.  \textsl{Rcpp modules} are inspired from the \pkg{Boost.Python}
+  \proglang{C++} library \citep{Abrahams+Grosse-Kunstleve:2003:Boost.Python}
+  which provides similar features for \proglang{Python}.
+}
+
+\section{Motivation}
+
+Exposing \proglang{C++} functionality to \proglang{R} is greatly facilitated
+by the \pkg{Rcpp} package and its underlying \proglang{C++} library
+\citep{CRAN:Rcpp,JSS:Rcpp}. \pkg{Rcpp} smoothes many of the rough edges in
+\proglang{R} and \proglang{C++} integration by replacing the traditional
+\proglang{R} Application Programming Interface (API) described in
+`\textsl{Writing R Extensions}' \citep{R:Extensions} with a consistent set of \proglang{C++}
+classes. The `\textsl{Rcpp-introduction}' vignette \citep{CRAN:Rcpp,JSS:Rcpp} describes the API and
+provides an introduction to using \pkg{Rcpp}.
+
+These \pkg{Rcpp} facilities offer a lot of assistance to the programmer
+wishing to interface \proglang{R} and \proglang{C++}. At the same time, these
+facilities are limited as they operate on a function-by-function basis. The
+programmer has to implement a \code{.Call} compatible function (to
+conform to the \proglang{R} API) using classes of the \pkg{Rcpp} API as
+described in the next section.
+
+\subsection{Exposing functions using \pkg{Rcpp}}
+
+Exposing existing \proglang{C++} functions to \proglang{R} through \pkg{Rcpp}
+usually involves several steps. One approach is to write an additional wrapper
+function that is responsible for converting input objects to the appropriate
+types, calling the actual worker function and converting the results back to
+a suitable type that can be returned to \proglang{R} (\texttt{SEXP}).
+Consider the \texttt{norm} function below:
+
+<<lang=cpp>>=
+double norm( double x, double y ) {
+    return sqrt( x*x + y*y );
+}
+@
+
+This simple function does not meet the requirements set by the \texttt{.Call}
+convention, so it cannot be called directly by \proglang{R}. Exposing the
+function involves writing a simple wrapper function
+that does match the \texttt{.Call} requirements. \pkg{Rcpp} makes this easy.
+
+<<lang=cpp>>=
+using namespace Rcpp;
+RcppExport SEXP norm_wrapper(SEXP x_, SEXP y_) {
+    // step 0: convert input to C++ types
+    double x = as<double>(x_), y = as<double>(y_);
+
+    // step 1: call the underlying C++ function
+    double res = norm( x, y );
+
+    // step 2: return the result as a SEXP
+    return wrap( res );
+}
+@
+
+Here we use the (templated) \pkg{Rcpp} converter \texttt{as()} which can
+transform from a \texttt{SEXP} to a number of different \proglang{C++} and
+\pkg{Rcpp} types. The \pkg{Rcpp} function \texttt{wrap()} offers the opposite
+functionality and converts many known types to a \texttt{SEXP}.
+
+This process is simple enough, and is used by a number of CRAN packages.
+However, it requires direct involvement from the programmer, which quickly
+becomes tiresome when many functions are involved. \textsl{Rcpp modules}
+provides a much more elegant and unintrusive way to expose \proglang{C++}
+functions such as the \texttt{norm} function shown above to \proglang{R}.
+
+We should note that \pkg{Rcpp} now has \textsl{Rcpp attributes} which extends
+certain aspect of \textsl{Rcpp modules} and makes binding to simple functions
+such as this one even easier.  With \textsl{Rcpp attribues} we can just write
+
+<<lang=cpp>>=
+# include <Rcpp.h>
+
+// [[Rcpp::export]]
+double norm(double x, double y) {
+    return sqrt(x*x + y*y);
+}
+@
+
+See the corresponding vignette \citep{CRAN:Rcpp:Attributes} for details, but
+read on for \textsl{Rcpp modules} which contains to provide features not
+covered by \textsl{Rcpp attributes}, particularly when it comes to binding
+entire C++ classes and more.
+
+\subsection{Exposing classes using Rcpp}
+
+Exposing \proglang{C++} classes or structs is even more of a challenge because it
+requires writing glue code for each member function that is to be exposed.
+
+Consider the simple \texttt{Uniform} class below:
+
+<<lang=cpp>>=
+class Uniform {
+public:
+    Uniform(double min_, double max_) : min(min_), max(max_) {}
+
+    NumericVector draw(int n) {
+        RNGScope scope;
+        return runif( n, min, max );
+    }
+
+private:
+    double min, max;
+};
+@
+
+To use this class from R, we at least need to expose the constructor and
+the \texttt{draw} method. External pointers
+\citep{R:Extensions} are the perfect vessel for this, and using the
+\texttt{Rcpp:::XPtr} template from \pkg{Rcpp} we can expose the class
+with these two functions:
+
+<<lang=cpp>>=
+using namespace Rcpp;
+
+/// create an external pointer to a Uniform object
+RcppExport SEXP Uniform__new(SEXP min_, SEXP max_) {
+    // convert inputs to appropriate C++ types
+    double min = as<double>(min_), max = as<double>(max_);
+
+    // create a pointer to an Uniform object and wrap it
+    // as an external pointer
+    Rcpp::XPtr<Uniform> ptr( new Uniform( min, max ), true );
+
+    // return the external pointer to the R side
+    return ptr;
+}
+
+/// invoke the draw method
+RcppExport SEXP Uniform__draw( SEXP xp, SEXP n_ ) {
+    // grab the object as a XPtr (smart pointer) to Uniform
+    Rcpp::XPtr<Uniform> ptr(xp);
+
+    // convert the parameter to int
+    int n = as<int>(n_);
+
+    // invoke the function
+    NumericVector res = ptr->draw( n );
+
+    // return the result to R
+    return res;
+}
+@
+
+As it is generally a bad idea to expose external pointers `as is',
+they usually get wrapped as a slot of an S4 class.
+
+Using \code{cxxfunction()} from the \pkg{inline} package, we can build this
+example on the fly. Suppose the previous example code assigned to a text variable
+\texttt{unifModcode}, we could then do
+
+%% DE 21 Sep 2013: there must a bug somewhere in the vignette processing
+%%                 as the following example produces only empty lines preceded
+%%                 by '+' -- same for 0.10.4 release and current 0.10.5 pre-release
+%%                 hence shortened example to not show code again
+<<eval=FALSE>>=
+f1 <- cxxfunction( , "", includes = unifModCode, plugin = "Rcpp" )
+getDynLib(f1)  ## will display information about 'f1' just created
+@
+
+The following listing shows some \textsl{manual} wrapping to access the code,
+we will see later how this can be automated:
+
+<<eval=FALSE>>=
+setClass( "Uniform", representation( pointer = "externalptr" ) )
+
+# helper
+Uniform_method <- function(name) {
+    paste( "Uniform", name, sep = "__" )
+}
+
+# syntactic sugar to allow object$method( ... )
+setMethod( "$", "Uniform", function(x, name ) {
+    function(...) .Call( Uniform_method(name) , x@pointer, ... )
+} )
+# syntactic sugar to allow new( "Uniform", ... )
+setMethod( "initialize", "Uniform", function(.Object, ...) {
+    .Object@pointer <- .Call( Uniform_method("new"), ... )
+    .Object
+} )
+
+u <- new( "Uniform", 0, 10 )
+u$draw( 10L )
+@
+
+\pkg{Rcpp} considerably simplifies the code that would
+be involved for using external pointers with the traditional \proglang{R} API.
+Yet this still involves a lot of mechanical code that quickly
+becomes hard to maintain and error prone.
+\textsl{Rcpp modules} offer an elegant way to expose the \texttt{Uniform}
+class in a way that makes both the internal
+\proglang{C++} code and the \proglang{R} code easier.
+
+
+
+\section{Rcpp modules}
+\label{sec:modules}
+
+The design of Rcpp modules has been influenced by \proglang{Python} modules which are generated by the
+\texttt{Boost.Python} library \citep{Abrahams+Grosse-Kunstleve:2003:Boost.Python}.
+Rcpp modules provide a convenient and easy-to-use way
+to expose \proglang{C++} functions and classes to \proglang{R}, grouped
+together in a single entity.
+
+A Rcpp module is created in a \texttt{cpp} file using the \texttt{RCPP\_MODULE}
+macro, which then provides declarative code of what the module
+exposes to \proglang{R}.
+
+\subsection{Exposing \proglang{C++} functions using Rcpp modules}
+
+Consider the \texttt{norm} function from the previous section.
+We can expose it to \proglang{R} :
+
+<<lang=cpp>>=
+using namespace Rcpp;
+
+double norm( double x, double y ) {
+    return sqrt( x*x + y*y );
+}
+
+RCPP_MODULE(mod) {
+    function( "norm", &norm );
+}
+@
+
+The code creates an Rcpp module called \texttt{mod}
+that exposes the \texttt{norm} function. \pkg{Rcpp} automatically
+deduces the conversions that are needed for input and output. This alleviates
+the need for a wrapper function using either \pkg{Rcpp} or the \proglang{R} API.
+
+On the \proglang{R} side, the module is retrieved by using the
+\code{Module} function from \pkg{Rcpp}
+
+<<eval=FALSE>>=
+inc <- '
+using namespace Rcpp;
+
+double norm( double x, double y ) {
+    return sqrt( x*x + y*y );
+}
+
+RCPP_MODULE(mod) {
+    function( "norm", &norm );
+}
+'
+
+fx <- cxxfunction(signature(), plugin="Rcpp", include=inc)
+mod <- Module("mod", getDynLib(fx))
+@
+
+Note that this example assumed that the previous code segment defining the
+module was returned by the \code{cxxfunction()} (from the \pkg{inline}
+package) as callable R function \code{fx} from which we can extract the
+relevant pointer using \code{getDynLib()}.  In the case of using Rcpp modules
+via a package (which is detailed in Section~\ref{sec:package} below), modules
+are actually loaded differently and we would have used
+
+<<eval=FALSE>>=
+require(nameOfMyModulePackage)
+mod <- new( mod )
+mod$norm( 3, 4 )
+@
+
+where the module is loaded upon startup and we use the constructor
+directly. More details on this aspect follow below.
+
+A module can contain any number of calls to \texttt{function} to register
+many internal functions to \proglang{R}. For example, these 6 functions :
+
+<<lang=cpp>>=
+std::string hello() {
+    return "hello";
+}
+
+int bar( int x) {
+    return x*2;
+}
+
+double foo( int x, double y) {
+    return x * y;
+}
+
+void bla( ) {
+    Rprintf( "hello\\n" );
+}
+
+void bla1( int x) {
+    Rprintf( "hello (x = %d)\\n", x );
+}
+
+void bla2( int x, double y) {
+    Rprintf( "hello (x = %d, y = %5.2f)\\n", x, y );
+}
+@
+
+can be exposed with the following minimal code:
+
+<<lang=cpp>>=
+RCPP_MODULE(yada) {
+    using namespace Rcpp;
+
+    function("hello" , &hello);
+    function("bar"   , &bar  );
+    function("foo"   , &foo  );
+    function("bla"   , &bla  );
+    function("bla1"  , &bla1 );
+    function("bla2"  , &bla2 );
+}
+@
+
+which can then be used from \proglang{R}:
+
+<<eval=FALSE>>=
+require( Rcpp )
+
+yd <- Module("yada", getDynLib(fx))
+yd$bar(2L)
+yd$foo(2L, 10.0)
+yd$hello()
+yd$bla()
+yd$bla1(2L)
+yd$bla2(2L, 5.0)
+@
+
+In the case of a package (as for example the one created by
+\code{Rcpp.package.skeleton()} with argument \code{module=TRUE}; more on that
+below), we can use
+
+<<eval=FALSE>>=
+require(myModulePackage)    ## or whichever name was chose
+
+bar(2L)
+foo(2L, 10.0)
+hello()
+bla()
+bla1(2L)
+bla2(2L, 5.0)
+@
+
+
+The requirements for a function to be exposed to \proglang{R} via Rcpp modules
+are:
+\begin{itemize}
+\item The function takes between 0 and 65 parameters.
+\item The type of each input parameter must be manageable by the \texttt{Rcpp::as}
+template.
+\item The return type of the function must be either \texttt{void} or any type that
+can be managed by the \texttt{Rcpp::wrap} template.
+\item The function name itself has to be unique in the module.
+  In other words, no two functions with
+  the same name but different signatures are allowed. C++ allows overloading
+  functions. This might be added in future versions of modules.
+\end{itemize}
+
+\subsubsection{Documentation for exposed functions using Rcpp modules}
+
+In addition to the name of the function and the function pointer, it is possible
+to pass a short description of the function as the third parameter of \texttt{function}.
+
+<<lang=cpp>>=
+using namespace Rcpp;
+
+double norm( double x, double y ) {
+    return sqrt( x*x + y*y );
+}
+
+RCPP_MODULE(mod) {
+    function( "norm", &norm, "Provides a simple vector norm" );
+}
+@
+
+The description is used when displaying the function to the R prompt:
+
+<<eval=FALSE>>=
+mod <- Module("mod", getDynLib(fx))
+show(mod$norm)
+@
+
+\subsubsection{Formal arguments specification}
+
+\texttt{function} also gives the possibility to specify the formal arguments
+of the R function that encapsulates the C++ function, by passing
+a \texttt{Rcpp::List} after the function pointer.
+
+<<lang=cpp>>=
+using namespace Rcpp;
+
+double norm( double x, double y ) {
+    return sqrt( x*x + y*y );
+}
+
+RCPP_MODULE(mod_formals) {
+    function("norm",
+             &norm,
+             List::create( _["x"] = 0.0, _["y"] = 0.0 ),
+             "Provides a simple vector norm");
+}
+@
+
+A simple usage example is provided below:
+
+<<eval=FALSE>>=
+norm <- mod$norm
+norm()
+norm( y = 2 )
+norm( x = 2, y = 3 )
+args( norm )
+@
+
+To set formal arguments without default values, simply omit the rhs.
+
+<<lang=cpp>>=
+using namespace Rcpp;
+
+double norm( double x, double y ) {
+    return sqrt( x*x + y*y );
+}
+
+RCPP_MODULE(mod_formals2) {
+    function("norm", &norm,
+             List::create( _["x"], _["y"] = 0.0 ),
+             "Provides a simple vector norm");
+}
+@
+
+This can be used as follows:
+
+<<eval=FALSE>>=
+norm <- mod$norm
+args(norm)
+@
+
+The ellipsis (\texttt{...}) can be used to denote that additional arguments
+are optional; it does not take a default value.
+
+<<lang=cpp>>=
+using namespace Rcpp;
+
+double norm( double x, double y ) {
+    return sqrt( x*x + y*y );
+}
+
+RCPP_MODULE(mod_formals3) {
+    function( "norm", &norm,
+             List::create( _["x"], _["..."] ),
+             "documentation for norm");
+}
+@
+<<eval=FALSE>>=
+norm <- mod$norm
+args( norm )
+@
+
+
+\subsection{Exposing \proglang{C++} classes using Rcpp modules}
+
+Rcpp modules also provide a mechanism for exposing \proglang{C++} classes, based
+on the reference classes introduced in R 2.12.0.
+
+\subsubsection{Initial example}
+
+A class is exposed using the \texttt{class\_} keyword. The \texttt{Uniform}
+class may be exposed to \proglang{R} as follows:
+
+<<lang=cpp>>=
+using namespace Rcpp;
+class Uniform {
+public:
+    Uniform(double min_, double max_) : min(min_), max(max_) {}
+
+    NumericVector draw(int n) const {
+        RNGScope scope;
+        return runif( n, min, max );
+    }
+
+    double min, max;
+};
+
+double uniformRange( Uniform* w) {
+    return w->max - w->min;
+}
+
+RCPP_MODULE(unif_module) {
+
+    class_<Uniform>( "Uniform" )
+
+    .constructor<double,double>()
+
+    .field( "min", &Uniform::min )
+    .field( "max", &Uniform::max )
+
+    .method( "draw", &Uniform::draw )
+    .method( "range", &uniformRange )
+    ;
+
+}
+@
+
+<<eval=FALSE>>=
+## assumes   fx_unif <- cxxfunction(...)   has ben run
+unif_module <- Module( "unif_module", getDynLib(fx_unif ) )
+Uniform <- unif_module$Uniform
+u <- new( Uniform, 0, 10 )
+u$draw( 10L )
+u$range()
+u$max <- 1
+u$range()
+u$draw( 10 )
+@
+
+\texttt{class\_} is templated by the \proglang{C++} class or struct
+that is to be exposed to \proglang{R}.
+The parameter of the \texttt{class\_<Uniform>} constructor is the name we will
+use on the \proglang{R} side. It usually makes sense to use the same name as the class
+name. While this is not enforced, it might be useful when exposing a class
+generated from a template.
+
+Then constructors, fields and methods are exposed.
+
+\subsubsection{Exposing constructors using Rcpp modules}
+
+Public constructors that take from 0 and 6 parameters can be exposed
+to the R level using the \texttt{.constuctor} template method of \texttt{.class\_}.
+
+Optionally, \texttt{.constructor} can take a description as the first argument.
+
+<<lang=cpp>>=
+    .constructor<double,double>("sets the min and max value of the distribution")
+@
+
+Also, the second argument can be a function pointer (called validator)
+matching the following type :
+
+<<lang=cpp>>=
+typedef bool (*ValidConstructor)(SEXP*,int);
+@
+
+The validator can be used to implement dispatch to the appropriate constructor,
+when multiple constructors taking the same number of arguments are exposed.
+The default validator always accepts the constructor as valid if it is passed
+the appropriate number of arguments. For example, with the call above, the default
+validator accepts any call from R with two \texttt{double} arguments (or
+arguments that can be cast to \texttt{double}).
+
+TODO: include validator example here
+
+\subsubsection{Exposing fields and properties}
+
+\texttt{class\_} has three ways to expose fields and properties, as
+illustrated in the example below :
+
+<<lang=cpp>>=
+using namespace Rcpp;
+class Foo {
+public:
+    Foo(double x_, double y_, double z_ ):
+        x(x_), y(y_), z(z_) {}
+
+    double x;
+    double y;
+
+    double get_z() { return z; }
+    void set_z( double z_ ) { z = z_; }
+
+private:
+    double z;
+};
+
+RCPP_MODULE(mod_foo) {
+    class_<Foo>( "Foo" )
+
+    .constructor<double,double,double>()
+
+    .field( "x", &Foo::x )
+    .field_readonly( "y", &Foo::y )
+
+    .property( "z", &Foo::get_z, &Foo::set_z )
+    ;
+}
+@
+
+The \texttt{.field} method exposes a public field with read/write access from R.
+\texttt{field} accepts an extra parameter to give a short description of the
+field:
+
+<<lang=cpp>>=
+    .field( "x", &Foo::x, "documentation for x" )
+@
+
+The \texttt{.field\_readonly} exposes a public field with read-only access from R.
+It also accepts the description of the field.
+
+<<lang=cpp>>=
+    .field_readonly( "y", &Foo::y, "documentation for y" )
+@
+
+The \texttt{.property} method allows indirect access to fields through
+a getter and a setter. The setter is optional, and the property is considered
+read-only if the setter is not supplied. A description of the property is also
+allowed:
+
+<<lang=cpp>>=
+    // with getter and setter
+    .property( "z", &Foo::get_z, &Foo::set_z, "Documentation for z" )
+
+    // with only getter
+    .property( "z", &Foo::get_z, "Documentation for z" )
+@
+
+The type of the field (\textbf{T}) is deduced from the return type of the getter, and if a
+setter is given its unique parameter should be of the same type.
+
+Getters can be member functions taking no parameter and returning a \textbf{T}
+(for example \texttt{get\_z} above), or
+a free function taking a pointer to the exposed
+class and returning a \textbf{T}, for example:
+
+<<lang=cpp>>=
+double z_get( Foo* foo ) { return foo->get_z(); }
+@
+
+Setters can be either a member function taking a \texttt{T} and returning void, such
+as \texttt{set\_z} above, or a free function taking a pointer to the target
+class and a \textbf{T} :
+
+<<lang=cpp>>=
+void z_set( Foo* foo, double z ) { foo->set_z(z); }
+@
+
+Using properties gives more flexibility in case field access has to be tracked
+or has impact on other fields. For example, this class keeps track of how many times
+the \texttt{x} field is read and written.
+
+<<lang=cpp>>=
+class Bar {
+public:
+
+    Bar(double x_) : x(x_), nread(0), nwrite(0) {}
+
+    double get_x( ) {
+        nread++;
+        return x;
+    }
+
+    void set_x( double x_) {
+        nwrite++;
+        x = x_;
+    }
+
+    IntegerVector stats() const {
+        return IntegerVector::create(_["read"] = nread,
+                                     _["write"] = nwrite);
+    }
+
+private:
+    double x;
+    int nread, nwrite;
+};
+
+RCPP_MODULE(mod_bar) {
+    class_<Bar>( "Bar" )
+
+    .constructor<double>()
+
+    .property( "x", &Bar::get_x, &Bar::set_x )
+    .method( "stats", &Bar::stats )
+    ;
+}
+@
+
+Here is a simple usage example:
+
+<<eval=FALSE>>=
+Bar <- mod_bar$Bar
+b <- new( Bar, 10 )
+b$x + b$x
+b$stats()
+b$x <- 10
+b$stats()
+@
+
+\subsubsection{Exposing methods using Rcpp modules}
+
+\texttt{class\_} has several overloaded and templated \texttt{.method}
+functions allowing the programmer to expose a method associated with the class.
+
+A legitimate method to be exposed by \texttt{.method} can be:
+\begin{itemize}
+\item A public member function of the class, either const or non const, that
+returns void or any type that can be handled by \texttt{Rcpp::wrap}, and that
+takes between 0 and 65 parameters whose types can be handled by \texttt{Rcpp::as}.
+\item A free function that takes a pointer to the target class as its first
+parameter, followed by 0 or more (up to 65) parameters that can be handled by
+\texttt{Rcpp::as} and returning a type that can be handled by \texttt{Rcpp::wrap}
+or void.
+\end{itemize}
+
+\paragraph{Documenting methods} \texttt{.method} can also include
+a short documentation of the method, after the
+method (or free function) pointer.
+
+<<lang=cpp>>=
+.method("stats", &Bar::stats,
+        "vector indicating the number of times x has been read and written" )
+@
+
+TODO: mention overloading, need good example.
+
+
+\paragraph{Const and non-const member functions}
+
+\texttt{method} is able to expose both \texttt{const} and \texttt{non const}
+member functions of a class. There are however situations where
+a class defines two versions of the same method, differing only in their
+signature by the \texttt{const}-ness. It is for example the case of the
+member functions \texttt{back} of the \texttt{std::vector} template from
+the STL.
+
+<<lang=cpp>>=
+reference back ( );
+const_reference back ( ) const;
+@
+
+To resolve the ambiguity, it is possible to use \texttt{const\_method}
+or \texttt{nonconst\_method} instead of \texttt{method} in order
+to restrict the candidate methods.
+
+\paragraph{Special methods}
+
+\pkg{Rcpp} considers the methods \texttt{[[} and \texttt{[[<-} special,
+and promotes them to indexing methods on the \proglang{R} side.
+
+\subsubsection{Object finalizers}
+
+The \texttt{.finalizer} member function of \texttt{class\_} can be used to
+register a finalizer. A finalizer is a free function that takes a pointer
+to the target class and return \texttt{void}. The finalizer is called
+before the destructor and so operates on a valid object of the target class.
+
+It can be used to perform operations, releasing resources, etc ...
+
+The finalizer is called automatically when the \proglang{R} object that encapsulates
+the \proglang{C++} object is garbage collected.
+
+\subsubsection{S4 dispatch}
+
+When a \proglang{C++} class is exposed by the \texttt{class\_} template,
+a new S4 class is registered as well. The name of the S4 class is
+obfuscated in order to avoid name clashes (i.e. two modules exposing the
+same class).
+
+This allows implementation of \proglang{R}-level
+(S4) dispatch. For example, one might implement the \texttt{show}
+method for \proglang{C++} \texttt{World} objects:
+
+<<eval=FALSE>>=
+setMethod( "show", yada$World , function(object) {
+    msg <- paste( "World object with message : ", object$greet() )
+    writeLines( msg )
+} )
+@
+
+TODO: mention R inheritance (John ?)
+
+\subsubsection{Full example}
+
+% TODO: maybe replace this by something from wls or RcppModels ?
+
+The following example illustrates how to use Rcpp modules to expose
+the class \texttt{std::vector<double>} from the STL.
+
+<<lang=cpp>>=
+typedef std::vector<double> vec; 		// convenience typedef
+void vec_assign( vec* obj, Rcpp::NumericVector data ) {  // helpers
+    obj->assign( data.begin(), data.end() );
+}
+void vec_insert( vec* obj, int position, Rcpp::NumericVector data) {
+    vec::iterator it = obj->begin() + position;
+    obj->insert( it, data.begin(), data.end() );
+}
+Rcpp::NumericVector vec_asR( vec* obj ) { return Rcpp::wrap( *obj ); }
+void vec_set( vec* obj, int i, double value ) { obj->at( i ) = value; }
+
+RCPP_MODULE(mod_vec) {
+    using namespace Rcpp;
+
+    // we expose the class std::vector<double> as "vec" on the R side
+    class_<vec>( "vec")
+
+    // exposing constructors
+    .constructor()
+    .constructor<int>()
+
+    // exposing member functions
+    .method( "size", &vec::size)
+    .method( "max_size", &vec::max_size)
+    .method( "resize", &vec::resize)
+    .method( "capacity", &vec::capacity)
+    .method( "empty", &vec::empty)
+    .method( "reserve", &vec::reserve)
+    .method( "push_back", &vec::push_back )
+    .method( "pop_back", &vec::pop_back )
+    .method( "clear", &vec::clear )
+
+    // specifically exposing const member functions
+    .const_method( "back", &vec::back )
+    .const_method( "front", &vec::front )
+    .const_method( "at", &vec::at )
+
+    // exposing free functions taking a std::vector<double>*
+    // as their first argument
+    .method( "assign", &vec_assign )
+    .method( "insert", &vec_insert )
+    .method( "as.vector", &vec_asR )
+
+    // special methods for indexing
+    .const_method( "[[", &vec::at )
+    .method( "[[<-", &vec_set )
+    ;
+}
+@
+
+<<eval=FALSE>>=
+## for code compiled on the fly using cxxfunction() into 'fx_vec', we use
+mod_vec <- Module( "mod_vec", getDynLib(fx_vec), mustStart = TRUE )
+vec <- mod_vec$vec
+## and that is not needed in a package setup as e.g. one created
+## via Rcpp.package.skeleton(..., module=TRUE)
+v <- new( vec )
+v$reserve( 50L )
+v$assign( 1:10 )
+v$push_back( 10 )
+v$size()
+v$capacity()
+v[[ 0L ]]
+v$as.vector()
+@
+
+\section{Using modules in other packages}
+\label{sec:package}
+
+\subsection{Namespace import/export}
+
+\subsubsection{Import all functions and classes}
+
+When using \pkg{Rcpp} modules in a packages, the client package needs to
+import \pkg{Rcpp}'s namespace. This is achieved by adding the
+following line to the \texttt{NAMESPACE} file.
+
+<<echo=FALSE,eval=TRUE>>=
+options( prompt = " ", continue = " " )
+@
+
+<<eval=FALSE>>=
+import(Rcpp)
+@
+
+In some case we have found that explicitly naming a symbol can be preferable:
+
+<<eval=FALSE>>=
+import(Rcpp, evalCpp)
+@
+
+\subsubsection{Load the module}
+
+\paragraph{Deprecated older method using loadRcppModules} 
+
+Note: This approach is deprecated as of Rcpp 0.12.5, and now triggers a warning
+message.  Eventually this function will be withdrawn.
+
+The simplest way to load all functions and classes from a module directly
+into a package namespace used to be to use the \code{loadRcppModules} function
+within the \code{.onLoad} body.
+
+<<eval=FALSE>>=
+.onLoad <- function(libname, pkgname) {
+    loadRcppModules()
+}
+@
+
+This will look in the package's DESCRIPTION file for the \texttt{RcppModules}
+field, load each declared module and populate their contents into the
+package's namespace. For example, both the \pkg{testRcppModule} package
+(which is part of large unit test suite for \pkg{Rcpp}) and the package
+created via \code{Rcpp.package.skeleton("somename", module=TRUE)} have this
+declaration:
+
+\begin{verbatim}
+RcppModules: yada, stdVector, NumEx
+\end{verbatim}
+
+The \code{loadRcppModules} function has a single argument \texttt{direct}
+with a default value of \texttt{TRUE}. With this default value, all content
+from the module is exposed directly in the package namespace. If set to
+\texttt{FALSE}, all content is exposed as components of the module.
+
+\paragraph{Preferred current method using loadModule}   
+
+Starting with release 0.9.11, an alternative is provided by the
+\code{loadModule()} function which takes the module name as an argument.
+It can be placed in any \code{.R} file in the package. This is useful as it allows to load
+the module from the same file as some auxiliary \proglang{R} functions using the
+module. For the example module, the equivalent code to the \code{.onLoad()}
+use shown above then becomes
+
+<<eval=FALSE>>=
+loadModule("yada")
+loadModule("stdVector")
+loadModule("NumEx")
+@
+
+This feature is also used in the new Rcpp Classes introduced with Rcpp 0.9.11.
+
+\subsubsection{Just expose the module}
+
+Alternatively, it is possible to just expose the module to the user of the package,
+and let them extract the functions and classes as needed. This uses lazy loading
+so that the module is only loaded the first time the user attempts to extract
+a function or a class with the dollar extractor.
+
+<<eval=FALSE>>=
+yada <- Module( "yada" )
+
+.onLoad <- function(libname, pkgname) {
+    # placeholder
+}
+@
+
+<<echo=FALSE,eval=TRUE>>=
+options( prompt = "> ", continue = "+ " )
+@
+
+
+\subsection{Support for modules in skeleton generator}
+
+The \code{Rcpp.package.skeleton} function has been improved to help
+\pkg{Rcpp} modules. When the \texttt{module} argument is set to \texttt{TRUE},
+the skeleton generator installs code that uses a simple module.
+
+<<eval=FALSE>>=
+Rcpp.package.skeleton( "testmod", module = TRUE )
+@
+
+Creating a new package using \textsl{Rcpp modules} is easiest via the call to
+\code{Rcpp.package.skeleton()} with argument \code{module=TRUE} as a working
+package with three example Modules results.
+
+\subsection{Module documentation}
+
+\pkg{Rcpp} defines a \code{prompt} method for the
+\code{Module} class, allowing generation of a skeleton of an Rd
+file containing some information about the module.
+
+<<eval=FALSE>>=
+yada <- Module( "yada" )
+prompt( yada, "yada-module.Rd" )
+@
+
+We strongly recommend using a package when working with Modules.  But in case a
+manually compiled shared library has to loaded, the return argument of the
+\texttt{getDynLib()} function can be supplied as the \texttt{PACKAGE} argument to
+the \texttt{Module()} function as well.
+
+
+\section{Future extensions}
+\label{sec:future}
+
+\texttt{Boost.Python} has many more features that we would like to port
+to Rcpp modules : class inheritance, default arguments, enum
+types, ...
+
+\section{Known shortcomings}
+\label{sec:misfeatures}
+
+There are some things \textsl{Rcpp modules} is not good at:
+\begin{itemize}
+\item serialization and deserialization of objects: modules are
+  implemented via an external pointer using a memory location, which is
+  non-constant and varies between session. Objects have to be re-created,
+  which is different from the (de-)serialization that R offers. So these
+  objects cannot be saved from session to session.
+\item mulitple inheritance: currently, only simple class structures are
+  representable via \textsl{Rcpp modules}.
+\end{itemize}
+
+\section{Summary}
+
+This note introduced \textsl{Rcpp modules} and illustrated how to expose
+\proglang{C++} function and classes more easily to \proglang{R}.
+We hope that \proglang{R} and \proglang{C++} programmers
+find \textsl{Rcpp modules} useful.
+
+\bibliographystyle{plainnat}
+\bibliography{\Sexpr{Rcpp:::bib()}}
+
+\end{document}
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-quickref.Rnw
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-quickref.Rnw	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-quickref.Rnw	(revision 2477)
@@ -0,0 +1,491 @@
+% !Rnw driver = highlight::HighlightWeaveLatex()
+\documentclass[8pt,twocolumn,a4paper]{article}
+%\VignetteIndexEntry{Rcpp-quickref}
+%\VignetteEngine{highlight::highlight}
+%\VignetteKeywords{Rcpp, reference}
+%\VignetteDepends{Rcpp}
+
+\setlength{\hoffset}{-0.8in}
+\setlength{\voffset}{-0.8in}
+
+\setlength{\marginparwidth}{0pt}
+\setlength{\marginparsep}{0pt}
+\setlength{\oddsidemargin}{0pt}
+\setlength{\headheight}{0pt}
+\setlength{\topmargin}{0pt}
+\setlength{\headsep}{0pt}
+\setlength{\footskip}{0pt}
+\setlength{\textheight}{27cm}
+\setlength{\textwidth}{20cm}
+
+\usepackage[colorlinks]{hyperref}
+
+\usepackage{microtype}                     %% cf http://www.khirevich.com/latex/microtype/
+\usepackage[T1]{fontenc}		   %% cf http://www.khirevich.com/latex/font/
+\usepackage[bitstream-charter]{mathdesign} %% cf http://www.khirevich.com/latex/font/
+
+\newcommand{\pkg}[1]{{\fontseries{b}\selectfont #1}}
+
+<<echo=FALSE,print=FALSE>>=
+options( width= 50)
+library( "Rcpp" )
+prettyVersion <- packageDescription("Rcpp")$Version
+prettyDate <- format(Sys.Date(), "%B %e, %Y")
+@
+
+\author{Romain Fran\c{c}ois \and Dirk Eddelbuettel}
+\title{\pkg{Rcpp} Quick Reference Guide}
+\date{\pkg{Rcpp} version \Sexpr{prettyVersion} as of \Sexpr{prettyDate}}
+
+\newsavebox{\quickrefbox}
+\definecolor{quickrefBg}{rgb}{0.949019607843137,0.949019607843137,0.949019607843137}
+\definecolor{quickrefBorder}{rgb}{0,0,0}
+\renewenvironment{Hchunk}%
+{%
+\vspace{0.5em}\noindent\begin{lrbox}{\quickrefbox}%
+\begin{minipage}[b]{.42\textwidth}%
+}%
+{%
+\end{minipage}%
+\end{lrbox}%
+\fcolorbox{quickrefBorder}{quickrefBg}{\usebox{\quickrefbox}}%
+\vspace{0.5em}}%
+
+\begin{document}
+\maketitle
+\thispagestyle{empty}
+
+% without the ~, latex does not want to newline
+% a newline between paragraph and code disconnects them and can orphan heading
+
+\paragraph{Important Notes}~
+  \newline
+<<lang=cpp>>=
+// If you experience compiler errors, please check that you have an appropriate version of g++. See `Rcpp-FAQ' for more information.
+
+// Many of the examples here imply the following:
+#include <Rcpp.h>
+using namespace Rcpp;
+// The cppFunction will automatically add this.
+
+// Or, prefix Rcpp objects with the Rcpp namespace e.g.:
+Rcpp::NumericVector xx(10);
+@
+
+\paragraph{Create simple vectors}~
+  \newline
+<<lang=cpp>>=
+SEXP x; std::vector<double> y(10);
+
+// from SEXP
+NumericVector xx(x);
+
+// of a given size (filled with 0)
+NumericVector xx(10);
+// ... with a default for all values
+NumericVector xx(10, 2.0);
+
+// range constructor
+NumericVector xx( y.begin(), y.end() );
+
+// using create
+NumericVector xx = NumericVector::create(
+    1.0, 2.0, 3.0, 4.0 );
+NumericVector yy = NumericVector::create(
+    Named["foo"] = 1.0,
+        _["bar"] = 2.0 );  // _ short for Named
+@
+
+\paragraph{Extract and set single elements}~
+  \newline
+<<lang=cpp>>=
+// extract single values
+double x0 = xx[0];
+double x1 = xx(1);
+
+double y0 = yy["foo"];
+double y1 = yy["bar"];
+
+// set single values
+xx[0] = 2.1;
+xx(1) = 4.2;
+
+yy["foo"] = 3.0;
+
+// grow the vector
+yy["foobar"] = 10.0;
+@
+
+\paragraph{Using matrices}~
+  \newline
+<<lang=cpp>>=
+// Initializing from SEXP,
+// dimensions handled automatically
+SEXP x;
+NumericMatrix xx(x);
+
+// Matrix of 4 rows & 5 columns (filled with 0)
+NumericMatrix xx(4, 5);
+
+// Fill with value
+int xsize = xx.nrow() * xx.ncol();
+for (int i = 0; i < xsize; i++) {
+    xx[i] = 7;
+}
+// Same as above, using STL fill
+std::fill(xx.begin(), xx.end(), 8);
+
+// Assign this value to single element
+// (1st row, 2nd col)
+xx(0,1) = 4;
+
+// Reference the second column
+// Changes propagate to xx (same applies for Row)
+NumericMatrix::Column zzcol = xx( _, 1);
+zzcol = zzcol * 2;
+
+// Copy the second column into new object
+NumericVector zz1 = xx( _, 1);
+// Copy the submatrix (top left 3x3) into new object
+NumericMatrix zz2 = xx( Range(0,2), Range(0,2));
+@
+
+\paragraph{Inline C++ Compile in R}~
+  \newline
+<<lang=cpp>>=
+## Note - this is R code. 
+## cppFunction in Rcpp allows rapid testing.
+require(Rcpp)
+
+cppFunction("
+NumericVector exfun(NumericVector x, int i){
+    x = x*i;
+    return x;
+}")
+
+exfun(1:5, 3)
+
+## Use evalCpp to evaluate C++ expressions
+evalCpp("std::numeric_limits<double>::max()")
+@
+
+\paragraph{Interface with R}~
+  \newline
+<<lang=cpp>>=
+## In R, create a package shell. For details, see the "Writing R Extensions" manual.
+
+Rcpp.package.skeleton("myPackage")
+
+## Add R code to pkg R/ directory. Call C++ function. Do type-checking in R.
+
+myfunR = function(Rx, Ry) {
+    ret = .Call("myCfun", Rx, Ry,
+            package="myPackage")
+    return(ret)
+}
+
+// Add C++ code to pkg src/ directory.
+using namespace Rcpp;
+// Define function as extern with RcppExport
+RcppExport SEXP myCfun( SEXP x, SEXP y) {
+    // If R/C++ types match, use pointer to x.  Pointer is faster, but changes to xx propagate to R ( xx -> x == Rx).
+    NumericVector xx(x);
+    // clone is slower and uses extra memory. Safe, R-like.
+    NumericVector yy(clone(y));
+    xx[0] = yy[0] = -1.5;
+    int zz = xx[0];
+    // use wrap() to return non-SEXP objects, e.g:
+    // return(wrap(zz));
+    // Build and return a list
+    List ret; ret["x"] = xx; ret["y"] = yy;
+    return(ret);
+}
+
+## From shell, above package directory
+R CMD check myPackage  ## Optional
+R CMD INSTALL myPackage
+
+## In R:
+require(myPackage)
+aa = 1.5; bb = 1.5; cc =  myfunR(aa, bb)
+aa == bb ## FALSE, C++ modifies aa
+aa = 1:2; bb = 1:2; cc =  myfunR(aa, bb)
+identical(aa, bb)
+## TRUE, R/C++ types don't match
+@
+
+\paragraph{STL interface}~
+  \newline
+<<lang=cpp>>=
+// sum a vector from beginning to end
+double s = std::accumulate(x.begin(),
+   x.end(), 0.0);
+// prod of elements from beginning to end
+int p = std::accumulate(vec.begin(),
+    vec.end(), 1, std::multiplies<int>());
+// inner_product to compute sum of squares
+double s2 = std::inner_product(res.begin(),
+    res.end(), res.begin(), 0.0);
+@
+
+\paragraph{Rcpp Attributes}~
+  \newline
+<<lang=cpp>>=
+// Add code below into C++ file Rcpp_example.cpp
+
+#include <Rcpp.h>
+using namespace Rcpp;
+
+// Place the export tag right above function declaration.
+
+// [[Rcpp::export]]
+double muRcpp(NumericVector x){
+    int n = x.size(); // Size of vector
+    double sum = 0;   // Sum value         
+    
+    // For loop, note cpp index shift to 0
+    for(int i = 0; i < n; i++){ 
+        // Shorthand for sum = sum + x[i]
+        sum += x[i];            
+    }
+    
+    return sum/n;  // Obtain and return the Mean
+}
+
+// Place dependent functions above call or 
+// declare the function definition with:
+double muRcpp(NumericVector x);
+
+// [[Rcpp::export]]
+double varRcpp(NumericVector x, bool bias = true){
+    // Calculate the mean using C++ function
+    double mean = muRcpp(x);  
+    double sum = 0;
+    int n = x.size();
+    
+    for(int i = 0; i < n; i++){   
+        sum += pow(x[i] - mean, 2.0); // Square
+    }
+    
+    return sum/(n-bias); // Return variance 
+}
+
+## In R:
+require(Rcpp)
+sourceCpp("path/to/file/Rcpp_example.cpp")
+x = 1:5;
+all.equal(muRcpp(x), mean(x)); all.equal(var(x),varRcpp(x))
+## TRUE
+@
+
+
+
+\paragraph{Rcpp Extensions}~
+  \newline
+<<lang=cpp>>=
+// Enable C++11
+// [[Rcpp::plugins(cpp11)]]
+
+// Enable OpenMP (excludes macOS)
+// [[Rcpp::plugins(openmp)]]
+
+// Use the RcppArmadillo package
+// Requires different header file from Rcpp.h
+#include <RcppArmadillo.h>
+// [[Rcpp::depends(RcppArmadillo)]]
+@
+
+
+
+\paragraph{Rcpp sugar}~
+  \newline
+<<lang=cpp>>=
+NumericVector x = NumericVector::create(
+  -2.0, -1.0, 0.0, 1.0, 2.0 );
+IntegerVector y = IntegerVector::create(
+  -2, -1, 0, 1, 2 );
+
+NumericVector xx = abs( x );
+IntegerVector yy = abs( y );
+
+bool b = all( x < 3.0 ).is_true() ;
+bool b = any( y > 2 ).is_true();
+
+NumericVector xx = ceil( x );
+NumericVector xx = ceiling( x );
+NumericVector yy = floor( y );
+NumericVector yy = floor( y );
+
+NumericVector xx = exp( x );
+NumericVector yy = exp( y );
+
+NumericVector xx = head( x, 2 );
+IntegerVector yy = head( y, 2 );
+
+IntegerVector xx = seq_len( 10 );
+IntegerVector yy = seq_along( y );
+
+NumericVector xx = rep( x, 3 );
+NumericVector xx = rep_len( x, 10 );
+NumericVector xx = rep_each( x, 3 );
+
+IntegerVector yy = rev( y );
+@
+
+
+
+\paragraph{Random functions}~
+  \newline
+<<lang=cpp>>=
+// Set seed
+RNGScope scope;
+
+// For details see Section 6.7.1--Distribution functions of the `Writing R Extensions' manual. In some cases (e.g. rnorm), distribution-specific arguments can be omitted; when in doubt, specify all dist-specific arguments. The use of doubles rather than integers for dist-specific arguments is recommended. Unless explicitly specified, log=FALSE.
+
+// Equivalent to R calls
+NumericVector xx = runif(20);
+NumericVector xx1 = rnorm(20);
+NumericVector xx1 = rnorm(20, 0);
+NumericVector xx1 = rnorm(20, 0, 1);
+
+// Example vector of quantiles
+NumericVector quants(5);
+for (int i = 0; i < 5; i++) {
+    quants[i] = (i-2);
+}
+
+// in R, dnorm(-2:2)
+NumericVector yy = dnorm(quants) ;
+NumericVector yy = dnorm(quants, 0.0, 1.0) ;
+
+// in R, dnorm(-2:2, mean=2, log=TRUE)
+NumericVector yy = dnorm(quants, 2.0, true) ;
+
+// Note - cannot specify sd without mean
+// in R, dnorm(-2:2, mean=0, sd=2, log=TRUE)
+NumericVector yy = dnorm(quants, 0.0, 2.0, true) ;
+
+// To get original R api, use Rf_*
+double zz = Rf_rnorm(0, 2);
+@
+
+
+
+\newpage
+
+\paragraph{Environment}~
+    \newline
+<<lang=cpp>>=
+// Obtain an R environment
+Environment stats("package:stats");
+Environment env( 2 ); // by position
+
+// Special environments
+Environment::Rcpp_namespace();
+Environment::base_env();
+Environment::base_namespace();
+Environment::global_env();
+Environment::empty_env();
+
+// Extract function from specific
+// environment
+Function rnorm = stats["rnorm"];
+
+// Assign into the environment
+glob["x"] = "foo";
+glob["y"] = 3;
+
+// Retrieve information from environment
+std::string x = glob["x"];
+glob.assign( "foo" , 3 );
+int foo = glob.get( "foo" );
+int foo = glob.find( "foo" );
+CharacterVector names = glob.ls()
+bool b = glob.exists( "foo" );
+glob.remove( "foo" );
+
+// Administration
+glob.lockBinding("foo");
+glob.unlockBinding("foo");
+bool b = glob.bindingIsLocked("foo");
+bool b = glob.bindingIsActive("foo");
+
+// Retrieve related environments
+Environment e = stats.parent();
+Environment e = glob.new_child();
+@
+
+\paragraph{Calling Functions in R}~
+  \newline
+<<lang=cpp>>=
+// Do NOT expect to have a performance gain
+// when calling R functions from R! 
+
+// Retrieve functions from default loaded environment
+Function rnorm("rnorm");
+rnorm(100, _["mean"] = 10.2, _["sd"] = 3.2 );
+
+// Passing in an R function and obtaining results
+// Make sure the function conforms with return type!
+NumericVector callFunction(NumericVector x, 
+                           Function f) {
+    NumericVector res = f(x);
+    return res;
+}
+
+## In R:
+x = 1:5
+callFunction(x, sum)
+@
+
+\newpage
+
+\paragraph{Modules}~
+  \newline
+<<lang=cpp>>=
+// Warning -- At present, module-based objects do not persist across quit(save="yes")/reload cycles.  To be safe, save results to R objects and remove module objects before exiting R.
+
+// To create a module-containing package from R, use:
+Rcpp.package.skeleton("mypackage",module=TRUE)
+// You will need to edit the RcppModules: line of the DESCRIPTION file to match your module name (in this example, from yada to mod_bar).
+
+class Bar {
+  public:
+    Bar(double x_) :
+      x(x_), nread(0), nwrite(0) {}
+
+    double get_x( ) {
+      nread++;    return x;
+    }
+
+    void set_x( double x_) {
+      nwrite++;   x = x_;
+    }
+
+    IntegerVector stats() const {
+      return IntegerVector::create(
+        _["read"] = nread,
+        _["write"] = nwrite);
+    }
+  private:
+    double x; int nread, nwrite;
+};
+
+RCPP_MODULE(mod_bar) {
+  class_<Bar>( "Bar" )
+  .constructor<double>()
+  .property( "x", &Bar::get_x, &Bar::set_x,
+    "Docstring for x" )
+  .method( "stats", &Bar::stats,
+    "Docstring for stats")
+;}
+
+## The following is R code.
+require(mypackage); show(Bar)
+b <- new(Bar, 10);  b$x <- 10
+b_persist <- list(stats=b$stats(), x=b$x)
+rm(b)
+@
+
+
+\end{document}
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-FAQ.pdf
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-FAQ.pdf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-modules.pdf
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-modules.pdf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-sugar.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-sugar.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-sugar.R	(revision 2477)
@@ -0,0 +1,17 @@
+### R code from vignette source 'Rcpp-sugar.Rnw'
+
+###################################################
+### code chunk number 1: Rcpp-sugar.Rnw:42-44
+###################################################
+prettyVersion <- packageDescription("Rcpp")$Version
+prettyDate <- format(Sys.Date(), "%B %e, %Y")
+
+
+###################################################
+### code chunk number 3: Rcpp-sugar.Rnw:105-108 (eval = FALSE)
+###################################################
+## foo <- function(x, y){
+##     ifelse( x < y, x*x, -(y*y) )
+## }
+
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-quickref.pdf
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-quickref.pdf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-introduction.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-introduction.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-introduction.R	(revision 2477)
@@ -0,0 +1,11 @@
+### R code from vignette source 'Rcpp-introduction.Rnw'
+
+###################################################
+### code chunk number 1: prelim
+###################################################
+library(Rcpp)
+rcpp.version <- packageDescription("Rcpp")$Version
+rcpp.date <- packageDescription("Rcpp")$Date
+now.date <- strftime(Sys.Date(), "%B %d, %Y")
+
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-extending.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-extending.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-extending.R	(revision 2477)
@@ -0,0 +1,57 @@
+### R code from vignette source 'Rcpp-extending.Rnw'
+
+###################################################
+### code chunk number 1: Rcpp-extending.Rnw:45-50
+###################################################
+prettyVersion <- packageDescription("Rcpp")$Version
+prettyDate <- format(Sys.Date(), "%B %e, %Y")
+require(inline)
+require(highlight)
+require(Rcpp)
+
+
+###################################################
+### code chunk number 3: Rcpp-extending.Rnw:92-112
+###################################################
+code <- '
+#include <Rcpp.h>
+using namespace Rcpp;
+
+// [[Rcpp::export]]
+List fx(List input){ // we get a list from R
+
+// pull std::vector<double> from R list
+// this is achieved through an implicit call to Rcpp::as
+std::vector<double> x = input["x"] ;
+
+// return an R list
+// this is achieved through implicit call to Rcpp::wrap
+return List::create(
+    _["front"] = x.front(),
+    _["back"]  = x.back()
+    );
+}
+'
+writeLines( code, "code.cpp" )
+
+
+###################################################
+### code chunk number 4: Rcpp-extending.Rnw:114-115
+###################################################
+external_highlight( "code.cpp", type = "LATEX", doc = FALSE )
+
+
+###################################################
+### code chunk number 5: Rcpp-extending.Rnw:118-121
+###################################################
+Rcpp::sourceCpp(file= "code.cpp")
+input <- list( x = seq(1, 10, by = 0.5) )
+fx( input )
+
+
+###################################################
+### code chunk number 15: Rcpp-extending.Rnw:357-358
+###################################################
+unlink( "code.cpp" )
+
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-sugar.Rnw
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-sugar.Rnw	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-sugar.Rnw	(revision 2477)
@@ -0,0 +1,779 @@
+% !Rnw driver = highlight::HighlightWeaveLatex()
+\documentclass[10pt]{article}
+%\VignetteIndexEntry{Rcpp-sugar}
+%\VignetteEngine{highlight::highlight}
+%\VignetteKeywords{Rcpp, syntactic sugar}
+%\VignetteDepends{Rcpp}
+
+\usepackage[USletter]{vmargin}
+\setmargrb{0.75in}{0.75in}{0.75in}{0.75in}
+
+\usepackage{color, alltt}
+\usepackage[authoryear,round,longnamesfirst]{natbib}
+\usepackage[colorlinks]{hyperref}
+\definecolor{link}{rgb}{0,0,0.3}	%% next few lines courtesy of RJournal.sty
+\hypersetup{
+    colorlinks,%
+    citecolor=link,%
+    filecolor=link,%
+    linkcolor=link,%
+    urlcolor=link
+}
+
+\usepackage{microtype}                     %% cf http://www.khirevich.com/latex/microtype/
+\usepackage[T1]{fontenc}		   %% cf http://www.khirevich.com/latex/font/
+\usepackage[bitstream-charter]{mathdesign} %% cf http://www.khirevich.com/latex/font/
+
+\newcommand{\proglang}[1]{\textsf{#1}}
+\newcommand{\pkg}[1]{{\fontseries{b}\selectfont #1}}
+\newcommand{\sugar}{\textsl{Rcpp sugar}}
+\newcommand{\ith}{\textsl{i}-\textsuperscript{th}}
+\newcommand{\code}[1]{\texttt{#1}}
+
+
+%% This corresponds to setting boxes=TRUE for highlight
+\newsavebox{\hlbox}
+\definecolor{hlBg}{rgb}{0.949019607843137,0.949019607843137,0.949019607843137}
+\definecolor{hlBd}{rgb}{0.9,0.9,0.9} % border
+\renewenvironment{Hchunk}{\vspace{0.5em}\noindent\begin{lrbox}{\hlbox}\begin{minipage}[b]{.9\textwidth}}%
+    {\end{minipage}\end{lrbox}\fcolorbox{hlBd}{hlBg}{\usebox{\hlbox}}\vspace{0.5em}}
+
+
+<<echo=FALSE,print=FALSE>>=
+prettyVersion <- packageDescription("Rcpp")$Version
+prettyDate <- format(Sys.Date(), "%B %e, %Y")
+@
+
+\author{Dirk Eddelbuettel \and Romain Fran\c{c}ois}
+\title{\pkg{Rcpp} syntactic sugar}
+\date{\pkg{Rcpp} version \Sexpr{prettyVersion} as of \Sexpr{prettyDate}}
+
+\begin{document}
+\maketitle
+
+\abstract{
+  \noindent
+  This note describes \sugar~which has been introduced in
+  version 0.8.3 of \pkg{Rcpp} \citep{CRAN:Rcpp,JSS:Rcpp}. \sugar~
+  brings a higher-level of abstraction to \proglang{C++} code
+  written using the \pkg{Rcpp} API.
+
+  \sugar~is based on expression templates
+  \citep{Abrahams+Gurtovoy:2004:TemplateMetaprogramming,Vandevoorde+Josuttis:2003:Templates} and provides
+  some 'syntactic sugar' facilities directly in \pkg{Rcpp}. This is similar
+  to how \pkg{RcppArmadillo} \citep{CRAN:RcppArmadillo} offers
+  linear algebra \proglang{C++} classes based on \pkg{Armadillo}
+  \citep{Sanderson:2010:Armadillo}.
+  % TODO: reference to armadillo, blitz, etc ...
+}
+
+\section{Motivation}
+
+\pkg{Rcpp} facilitates development of internal compiled code in an \proglang{R}
+package by abstracting low-level details of the \proglang{R} API \citep{R:Extensions}
+into a consistent set of \proglang{C++} classes.
+
+Code written using \pkg{Rcpp} classes is easier to read, write and maintain,
+without loosing performance. Consider the following code example which
+provides a function \texttt{foo} as a \proglang{C++} extension to
+\proglang{R} by using the \pkg{Rcpp} API:
+
+<<lang=cpp>>=
+RcppExport SEXP foo( SEXP x, SEXP y){
+    Rcpp::NumericVector xx(x), yy(y) ;
+    int n = xx.size() ;
+    Rcpp::NumericVector res( n ) ;
+    double x_ = 0.0, y_ = 0.0 ;
+    for( int i=0; i<n; i++){
+        x_ = xx[i] ;
+        y_ = yy[i] ;
+        if( x_ < y_ ){
+            res[i] = x_ * x_ ;
+        } else {
+            res[i] = -( y_ * y_)  ;
+        }
+    }
+    return res ;
+}
+@
+
+The goal of the function \texttt{foo} code is simple. Given two
+\texttt{numeric} vectors, we create a third one. This is typical low-level
+\proglang{C++} code that that could be written much more consicely in
+\proglang{R} thanks to vectorisation as shown in the next example.
+
+<<eval=FALSE>>=
+foo <- function(x, y){
+    ifelse( x < y, x*x, -(y*y) )
+}
+@
+
+Put succinctly, the motivation of \sugar~is to bring a subset of the
+high-level \proglang{R} syntax in \proglang{C++}. Hence, with \sugar, the
+\proglang{C++} version of \texttt{foo} now becomes:
+
+<<lang=cpp>>=
+RcppExport SEXP foo( SEXP xs, SEXP ys){
+    Rcpp::NumericVector x(xs) ;
+    Rcpp::NumericVector y(ys) ;
+    return Rcpp::wrap( ifelse( x < y, x*x, -(y*y) )) ;
+}
+@
+
+Apart from the fact that we need to assign the two objects we obtain from
+\proglang{R}---which is a simple statement each thanks to the template magic
+in \pkg{Rcpp}---and the need for explicit \texttt{return} and
+\texttt{Rcpp::wrap} statements, the code is now identical between
+highly-vectorised \proglang{R} and \proglang{C++}.
+
+\sugar~is written using expression templates and lazy evaluation techniques
+\citep{Abrahams+Gurtovoy:2004:TemplateMetaprogramming,Vandevoorde+Josuttis:2003:Templates}.
+This not only allows a much nicer high-level syntax, but also makes it
+rather efficient (as we detail in section~\ref{sec:performance} below).
+
+\section{Operators}
+
+\sugar~takes advantage of \proglang{C++} operator overloading. The next few
+sections discuss several examples.
+
+\subsection{Binary arithmetic operators}
+
+\sugar~defines the usual binary arithmetic operators : \texttt{+}, \texttt{-},
+\texttt{*}, \texttt{/}.
+
+<<lang=cpp>>=
+// two numeric vectors of the same size
+NumericVector x ;
+NumericVector y ;
+
+// expressions involving two vectors
+NumericVector res = x + y ;
+NumericVector res = x - y ;
+NumericVector res = x * y ;
+NumericVector res = x / y ;
+
+// one vector, one single value
+NumericVector res = x + 2.0 ;
+NumericVector res = 2.0 - x;
+NumericVector res = y * 2.0 ;
+NumericVector res = 2.0 / y;
+
+// two expressions
+NumericVector res = x * y + y / 2.0 ;
+NumericVector res = x * ( y - 2.0 ) ;
+NumericVector res = x / ( y * y ) ;
+@
+
+The left hand side (lhs) and the right hand side (rhs) of each binary
+arithmetic expression must be of the same type (for example they should be both
+\texttt{numeric} expressions).
+
+The lhs and the rhs can either have the same size or one of them could
+be a primitive value of the appropriate type, for example adding a
+\texttt{NumericVector} and a \texttt{double}.
+
+\subsection{Binary logical operators}
+
+Binary logical operators create a \texttt{logical} sugar expression
+from either two sugar expressions of the same type or one sugar expression
+and a primitive value of the associated type.
+
+<<lang=cpp>>=
+// two integer vectors of the same size
+NumericVector x ;
+NumericVector y ;
+
+// expressions involving two vectors
+LogicalVector res = x < y ;
+LogicalVector res = x > y ;
+LogicalVector res = x <= y ;
+LogicalVector res = x >= y ;
+LogicalVector res = x == y ;
+LogicalVector res = x != y ;
+
+// one vector, one single value
+LogicalVector res = x < 2 ;
+LogicalVector res = 2 > x;
+LogicalVector res = y <= 2 ;
+LogicalVector res = 2 != y;
+
+// two expressions
+LogicalVector res = ( x + y ) <  ( x*x ) ;
+LogicalVector res = ( x + y ) >= ( x*x ) ;
+LogicalVector res = ( x + y ) == ( x*x ) ;
+@
+
+\subsection{Unary operators}
+
+The unary \texttt{operator-} can be used to negate a (numeric) sugar expression.
+whereas the unary \texttt{operator!} negates a logical sugar expression:
+
+<<lang=cpp>>=
+// a numeric vector
+NumericVector x ;
+
+// negate x
+NumericVector res = -x ;
+
+// use it as part of a numerical expression
+NumericVector res = -x * ( x + 2.0 ) ;
+
+// two integer vectors of the same size
+NumericVector y ;
+NumericVector z ;
+
+// negate the logical expression "y < z"
+LogicalVector res = ! ( y < z );
+@
+
+\section{Functions}
+
+\sugar~defines functions that closely match the behavior of \proglang{R}
+functions of the same name.
+
+\subsection{Functions producing a single logical result}
+
+Given a logical sugar expression, the \texttt{all} function identifies if all
+the elements are \texttt{TRUE}. Similarly, the \texttt{any} function
+identifies if any the element is \texttt{TRUE} when
+given a logical sugar expression.
+
+
+<<lang=cpp>>=
+IntegerVector x = seq_len( 1000 ) ;
+all( x*x < 3 ) ;
+any( x*x < 3 ) ;
+@
+
+Either call to \texttt{all} and \texttt{any} creates an object of a class
+that has member functions \texttt{is\_true}, \texttt{is\_false},
+\texttt{is\_na} and a conversion to \texttt{SEXP} operator.
+
+One important thing to highlight is that \texttt{all} is lazy. Unlike
+\proglang{R}, there is no need to fully evaluate the expression. In the
+example above, the result of \texttt{all} is fully resolved after evaluating
+only the two first indices of the expression \verb|x * x < 3|. \texttt{any}
+is lazy too, so it will only need to resolve the first element of the example
+above.
+
+%\subsubsection{Conversion to bool}
+
+One important thing to note concernc the conversion to the \texttt{bool}
+type. In order to respect the concept of missing values (\texttt{NA}) in
+\proglang{R}, expressions generated by \texttt{any} or \texttt{all} can not
+be converted to \texttt{bool}. Instead one must use \texttt{is\_true},
+\texttt{is\_false} or \texttt{is\_na}:
+
+<<lang=cpp>>=
+// wrong: will generate a compile error
+bool res = any( x < y) ) ;
+
+// ok
+bool res = is_true( any( x < y ) )
+bool res = is_false( any( x < y ) )
+bool res = is_na( any( x < y ) )
+@
+
+% FIXME this may need some expanding the trivariate bool and how to use it
+
+
+\subsection{Functions producing sugar expressions}
+
+\subsubsection{is\_na}
+
+Given a sugar expression of any type, \verb|is_na| (just like the other
+functions in this section) produces a logical sugar expression of the same
+length. Each element of the result expression evaluates to \texttt{TRUE} if
+the corresponding input is a missing value, or \texttt{FALSE} otherwise.
+
+<<lang=cpp>>=
+IntegerVector x = IntegerVector::create( 0, 1, NA_INTEGER, 3 ) ;
+
+is_na( x )
+all( is_na( x ) )
+any( ! is_na( x ) )
+@
+
+\subsubsection{seq\_along}
+
+Given a sugar expression of any type, \texttt{seq\_along} creates an
+integer sugar expression whose values go from 1 to the size of the input.
+
+<<lang=cpp>>=
+IntegerVector x = IntegerVector::create( 0, 1, NA_INTEGER, 3 ) ;
+
+seq_along( x )
+seq_along( x * x * x * x * x * x * x )
+@
+
+This is the most lazy function, as it only needs to call the \texttt{size}
+member function of the input expression. The input expression need not to be
+resolved. The two examples above gives the same result with the same efficiency
+at runtime. The compile time will be affected by the complexity of the
+second expression, since the abstract syntax tree is built at compile time.
+
+\subsubsection{seq\_len}
+
+\texttt{seq\_len} creates an integer sugar expression whose \ith\
+element expands to \texttt{i}. \texttt{seq\_len} is particularly useful in
+conjunction with \texttt{sapply} and \texttt{lapply}.
+
+<<lang=cpp>>=
+// 1, 2, ..., 10
+IntegerVector x = seq_len( 10 ) ;
+
+lapply( seq_len(10), seq_len )
+@
+
+\subsubsection{pmin and pmax}
+
+Given two sugar expressions of the same type and size, or one expression and
+one primitive value of the appropriate type, \texttt{pmin} (\texttt{pmax})
+generates a sugar expression of the same type whose \ith\ element expands to
+the lowest (highest) value between the \ith\ element of the first expression
+and the \ith element of the second expression.
+
+<<lang=cpp>>=
+IntegerVector x = seq_len( 10 ) ;
+
+pmin( x, x*x )
+pmin( x*x, 2 )
+
+pmin( x, x*x )
+pmin( x*x, 2 )
+@
+
+\subsubsection{ifelse}
+
+Given a logical sugar expression and either :
+\begin{itemize}
+\item two compatible sugar expression (same type, same size)
+\item one sugar expression and one compatible primitive
+\end{itemize}
+\texttt{ifelse} expands to a sugar expression whose \ith\
+element is the \ith\ element of the first expression
+if the \ith\ element of the condition expands to \texttt{TRUE}
+or the \ith\ of the second expression if
+the \ith\ element of the condition expands to \texttt{FALSE},
+or the appropriate missing value otherwise.
+
+<<lang=cpp>>=
+IntegerVector x ;
+IntegerVector y ;
+
+ifelse( x < y, x, (x+y)*y )
+ifelse( x > y, x, 2 )
+@
+
+\subsubsection{sapply}
+
+\texttt{sapply} applies a \proglang{C++} function to each element
+of the given expression to create a new expression. The type of the
+resulting expression is deduced by the compiler from the result type of
+the function.
+
+The function can be a free \proglang{C++} function such as the overload
+generated by the template function below:
+
+<<lang=cpp>>=
+template <typename T>
+T square( const T& x){
+    return x * x ;
+}
+sapply( seq_len(10), square<int> ) ;
+@
+
+Alternatively, the function can be a functor whose type has a nested type
+called \texttt{result\_type}
+
+<<lang=cpp>>=
+template <typename T>
+struct square : std::unary_function<T,T> {
+    T operator()(const T& x){
+        return x * x ;
+    }
+}
+sapply( seq_len(10), square<int>() ) ;
+@
+
+\subsubsection{lapply}
+
+\texttt{lapply} is similar to \texttt{sapply} except that the result is
+allways an list expression (an expression of type \texttt{VECSXP}).
+
+\subsubsection{sign}
+
+Given a numeric or integer expression, \texttt{sign} expands to an expression
+whose values are one of 1, 0, -1 or \texttt{NA}, depending on the sign
+of the input expression.
+
+<<lang=cpp>>=
+IntegerVector xx;
+
+sign( xx )
+sign( xx * xx )
+@
+
+\subsubsection{diff}
+
+The \ith\ element of the result of \texttt{diff} is
+the difference between the $(i+1)$\textsuperscript{th} and the
+\ith\ element of the input expression. Supported types are
+integer and numeric.
+
+<<lang=cpp>>=
+IntegerVector xx;
+
+diff( xx )
+@
+
+\subsection{Mathematical functions}
+
+For the following set of functions, generally speaking, the \ith\ element of
+the result of the given function (say, \texttt{abs}) is the result of
+applying that function to this \ith\ element of the input expression.
+Supported types are integer and numeric.
+
+<<lang=cpp>>=
+IntegerVector x;
+
+abs( x )
+exp( x )
+floor( x )
+ceil( x )
+pow(x, z)     # x to the power of z
+@
+
+% log() and log10() maybe?  Or ln() ?
+
+\subsection{The d/q/p/r statistical functions}
+
+The framework provided by \sugar also permits easy and efficient access the
+density, distribution function, quantile and random number generation
+functions function by \proglang{R} in the \code{Rmath} library.
+
+Currently, most of these functions are vectorised for the first element which
+denote size. Consequently, these calls works in \proglang{C++} just as they
+would in \proglang{R}:
+
+<<lang=cpp>>=
+x1 = dnorm(y1, 0, 1);  // density of y1 at m=0, sd=1
+x2 = qnorm(y2, 0, 1);  // quantiles of y2
+x3 = pnorm(y3, 0, 1);  // distribution function of y3
+x4 = rnorm(n, 0, 1);   // 'n' RNG draws of N(0, 1)
+@
+
+Similar d/q/p/r functions are provided for the most common distributions:
+beta, binom, cauchy, chisq, exp, f, gamma, geom, hyper, lnorm, logis, nbeta,
+nbinom, nbinom\_mu, nchisq, nf, norm, nt, pois, t, unif, and weibull.
+
+Note that the parameterization used in these sugar functions may differ between
+the top-level functions exposed in an \proglang{R} session. For example, 
+the internal \code{rexp} is parameterized by \code{scale},
+whereas the R-level \code{stats::rexp} is parameterized by \code{rate}. 
+Consult \href{http://cran.r-project.org/doc/manuals/r-release/R-exts.html#Distribution-functions}{Distribution Functions}
+for more details on the parameterization used for these sugar functions.
+
+One point to note is that the programmer using these functions needs to
+initialize the state of the random number generator as detailed in Section
+6.3 of the `Writing R Extensions' manual \citep{R:Extensions}.  A nice
+\proglang{C++} solution for this is to use a \textsl{scoped} class that sets
+the random number generatator on entry to a block and resets it on exit. We
+offer the \code{RNGScope} class which allows code such as
+
+<<lang=cpp>>=
+RcppExport SEXP getRGamma() {
+    RNGScope scope;
+    NumericVector x = rgamma( 10, 1, 1 );
+    return x;
+}
+@
+
+As there is some computational overhead involved in using \code{RNGScope}, we
+are not wrapping it around each inner function.  Rather, the user of these
+functions (\textsl{i.e.} you) should place an \code{RNGScope} at the
+appropriate level of your code.
+
+
+\section{Performance}
+\label{sec:performance}
+
+TBD
+
+\section{Implementation}
+
+This section details some of the techniques used in the implementation of
+\sugar. Note that the user need not to be familiar with the implementation
+details in order to use \sugar, so this section can be skipped upon a first
+read of the paper.
+
+Writing \sugar~functions is fairly repetitive and follows a well-structured
+pattern. So once the basic concepts are mastered (which may take time given
+the inherent complexities in template programming), it should be possible to
+extend the set of function further following the established pattern..
+
+\subsection{The curiously recurring template pattern}
+
+Expression templates such as those used by \sugar~use a technique
+called the \emph{Curiously Recurring Template Pattern} (CRTP). The general
+form of CRTP is:
+
+<<lang=cpp>>=
+// The Curiously Recurring Template Pattern (CRTP)
+template <typename T>
+struct base {
+    // ...
+};
+struct derived : base<derived> {
+    // ...
+};
+@
+
+The \texttt{base} class is templated by the class that derives from it :
+\texttt{derived}. This shifts the relationship between a base class and a
+derived class as it allows the base class to access methods of the derived
+class.
+
+\subsection{The VectorBase class}
+
+The CRTP is used as the basis for \sugar~with the \texttt{VectorBase}
+class template. All sugar expression derive from one class generated by the
+\texttt{VectorBase} template. The current definition of \texttt{VectorBase}
+is given here:
+
+<<lang=cpp>>=
+template <int RTYPE, bool na, typename VECTOR>
+class VectorBase {
+public:
+    struct r_type : traits::integral_constant<int,RTYPE>{} ;
+    struct can_have_na : traits::integral_constant<bool,na>{} ;
+    typedef typename traits::storage_type<RTYPE>::type stored_type ;
+
+    VECTOR& get_ref(){
+        return static_cast<VECTOR&>(*this) ;
+    }
+
+    inline stored_type operator[]( int i) const {
+        return static_cast<const VECTOR*>(this)->operator[](i) ;
+    }
+
+    inline int size() const { return static_cast<const VECTOR*>(this)->size() ; }
+
+    /* definition ommited here */
+    class iterator ;
+
+    inline iterator begin() const { return iterator(*this, 0) ; }
+    inline iterator end() const { return iterator(*this, size() ) ; }
+}
+@
+
+The \texttt{VectorBase} template has three parameters:
+
+\begin{itemize}
+\item \texttt{RTYPE}: This controls the type of expression (INTSXP, REALSXP,
+  ...)
+\item \texttt{na}: This embeds in the derived type information about whether
+  instances may contain missing values. \pkg{Rcpp} vector types
+  (\texttt{IntegerVector}, ...)  derive from \texttt{VectorBase} with this
+  parameter set to \texttt{true} because there is no way to know at
+  compile-time if the vector will contain missing values at run-time.
+  However, this parameter is set to \texttt{false} for types that are
+  generated by sugar expressions as these are guaranteed to produce
+  expressions that are without missing values. An example is the
+  \texttt{is\_na} function. This parameter is used in several places as part
+  of the compile time dispatch to limit the occurence of redundant
+  operations.
+\item \texttt{VECTOR}: This parameter is the key of \sugar. This is the
+  manifestation of CRTP. The indexing operator and the \texttt{size} method
+  of \texttt{VectorBase} use a static cast of \texttt{this} to the
+  \texttt{VECTOR} type to forward calls to the actual method of the derived
+  class.
+\end{itemize}
+
+\subsection{Example : sapply}
+
+As an example, the current implementation of \texttt{sapply}, supported by
+the template class \texttt{Rcpp::sugar::Sapply} is given below:
+
+<<lang=cpp>>=
+template <int RTYPE, bool NA, typename T, typename Function>
+class Sapply : public VectorBase<
+    Rcpp::traits::r_sexptype_traits<
+        typename ::Rcpp::traits::result_of<Function>::type
+    >::rtype ,
+    true ,
+    Sapply<RTYPE,NA,T,Function>
+> {
+public:
+    typedef typename ::Rcpp::traits::result_of<Function>::type  ;
+    const static int RESULT_R_TYPE =
+        Rcpp::traits::r_sexptype_traits<result_type>::rtype ;
+    typedef Rcpp::VectorBase<RTYPE,NA,T> VEC ;
+    typedef typename Rcpp::traits::r_vector_element_converter<RESULT_R_TYPE>::type
+        converter_type ;
+    typedef typename Rcpp::traits::storage_type<RESULT_R_TYPE>::type STORAGE ;
+
+    Sapply( const VEC& vec_, Function fun_ ) : vec(vec_), fun(fun_){}
+
+    inline STORAGE operator[]( int i ) const {
+        return converter_type::get( fun( vec[i] ) );
+    }
+    inline int size() const { return vec.size() ; }
+
+private:
+    const VEC& vec ;
+    Function fun ;
+} ;
+
+// sugar
+
+template <int RTYPE, bool _NA_, typename T, typename Function >
+inline sugar::Sapply<RTYPE,_NA_,T,Function>
+sapply( const Rcpp::VectorBase<RTYPE,_NA_,T>& t, Function fun ){
+    return sugar::Sapply<RTYPE,_NA_,T,Function>( t, fun ) ;
+}
+@
+
+\subsubsection{The sapply function}
+
+\texttt{sapply} is a template function that takes two arguments.
+\begin{itemize}
+\item The first argument
+is a sugar expression, which we recognize because of the relationship with
+the \texttt{VectorBase} class template.
+\item The second argument is the function to apply.
+\end{itemize}
+
+The \texttt{sapply} function itself does not do anything, it is just used
+to trigger compiler detection of the template parameters that will be used
+in the \texttt{sugar::Sapply} template.
+
+\subsubsection{Detection of return type of the function}
+
+In order to decide which kind of expression is built, the \texttt{Sapply}
+template class queries the template argument via the \texttt{Rcpp::traits::result\_of}
+template.
+
+<<lang=cpp>>=
+typedef typename ::Rcpp::traits::result_of<Function>::type result_type ;
+@
+
+The \texttt{result\_of} type trait is implemented as such:
+
+<<lang=cpp>>=
+template <typename T>
+struct result_of{
+    typedef typename T::result_type type ;
+} ;
+
+template <typename RESULT_TYPE, typename INPUT_TYPE>
+struct result_of< RESULT_TYPE (*)(INPUT_TYPE) >{
+    typedef RESULT_TYPE type ;
+} ;
+@
+
+The generic definition of \texttt{result\_of} targets functors
+with a nested \texttt{result\_type} type.
+
+The second definition is a partial specialization targetting
+function pointers.
+
+\subsubsection{Indentification of expression type}
+
+Based on the result type of the function, the \texttt{r\_sexptype\_traits}
+trait is used to identify the expression type.
+
+<<lang=cpp>>=
+const static int RESULT_R_TYPE =
+    Rcpp::traits::r_sexptype_traits<result_type>::rtype ;
+@
+
+\subsubsection{Converter}
+
+The \texttt{r\_vector\_element\_converter} class is used to convert an
+object of the function's result type to the actual storage type suitable
+for the sugar expression.
+
+<<lang=cpp>>=
+typedef typename Rcpp::traits::r_vector_element_converter<RESULT_R_TYPE>::type
+    converter_type ;
+
+@
+
+\subsubsection{Storage type}
+
+The \texttt{storage\_type} trait is used to get access to the storage type
+associated with a sugar expression type. For example, the storage type
+of a \texttt{REALSXP} expression is \texttt{double}.
+
+<<lang=cpp>>=
+typedef typename Rcpp::traits::storage_type<RESULT_R_TYPE>::type STORAGE ;
+@
+
+\subsubsection{Input expression base type}
+
+The input expression --- the expression over which \texttt{sapply} runs --- is
+also typedef'ed for convenience:
+
+<<lang=cpp>>=
+typedef Rcpp::VectorBase<RTYPE,NA,T> VEC ;
+@
+
+\subsubsection{Output expression base type}
+
+In order to be part of the \sugar~system, the type generated by the
+\texttt{Sapply} class template must inherit from \texttt{VectorBase}.
+
+<<lang=cpp>>=
+template <int RTYPE, bool NA, typename T, typename Function>
+class Sapply : public VectorBase<
+    Rcpp::traits::r_sexptype_traits<
+        typename ::Rcpp::traits::result_of<Function>::type
+    >::rtype ,
+    true ,
+    Sapply<RTYPE,NA,T,Function>
+>
+@
+
+The expression built by \texttt{Sapply} depends on the result type
+of the function, may contain missing values, and the third argument
+is the manifestation of the \emph{CRTP}.
+
+\subsubsection{Constructor}
+
+The constructor of the \texttt{Sapply} class template is straightforward, it
+simply consists of holding the reference to the input expression and the
+function.
+
+<<lang=cpp>>=
+Sapply( const VEC& vec_, Function fun_ ) : vec(vec_), fun(fun_){}
+
+private:
+    const VEC& vec ;
+    Function fun ;
+@
+
+\subsubsection{Implementation}
+
+The indexing operator and the \texttt{size} member function is what
+the \texttt{VectorBase} expects. The size of the result expression is
+the same as the size of the input expression and the i\textsuperscript{th}
+element of the result is simply retrieved by applying the function
+and the converter. Both these methods are inline to maximize performance:
+
+<<lang=cpp>>=
+inline STORAGE operator[]( int i ) const {
+	return converter_type::get( fun( vec[i] ) );
+}
+inline int size() const { return vec.size() ; }
+@
+
+\section{Summary}
+
+TBD
+
+\bibliographystyle{plainnat}
+\bibliography{\Sexpr{Rcpp:::bib()}}
+
+\end{document}
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-attributes.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-attributes.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-attributes.R	(revision 2477)
@@ -0,0 +1,72 @@
+### R code from vignette source 'Rcpp-attributes.Rnw'
+
+###################################################
+### code chunk number 1: Rcpp-attributes.Rnw:41-43
+###################################################
+prettyVersion <- packageDescription("Rcpp")$Version
+prettyDate <- format(Sys.Date(), "%B %e, %Y")
+
+
+###################################################
+### code chunk number 3: Rcpp-attributes.Rnw:149-151 (eval = FALSE)
+###################################################
+## sourceCpp("convolve.cpp")
+## convolveCpp(x, y)
+
+
+###################################################
+### code chunk number 5: Rcpp-attributes.Rnw:179-180 (eval = FALSE)
+###################################################
+## function(file, colNames=character(), comment="#", header=TRUE)
+
+
+###################################################
+### code chunk number 19: Rcpp-attributes.Rnw:518-528 (eval = FALSE)
+###################################################
+## cppFunction('
+##     int fibonacci(const int x) {
+##         if (x < 2)
+##             return x;
+##         else
+##             return (fibonacci(x - 1)) + fibonacci(x - 2);
+##     }
+## ')
+## 
+## evalCpp('std::numeric_limits<double>::max()')
+
+
+###################################################
+### code chunk number 20: Rcpp-attributes.Rnw:533-534 (eval = FALSE)
+###################################################
+## cppFunction(depends = 'RcppArmadillo', code = '...')
+
+
+###################################################
+### code chunk number 21: Rcpp-attributes.Rnw:565-566 (eval = FALSE)
+###################################################
+## Rcpp.package.skeleton("NewPackage", attributes = TRUE)
+
+
+###################################################
+### code chunk number 22: Rcpp-attributes.Rnw:572-574 (eval = FALSE)
+###################################################
+## Rcpp.package.skeleton("NewPackage", example_code = FALSE,
+##                       cpp_files = c("convolve.cpp"))
+
+
+###################################################
+### code chunk number 26: Rcpp-attributes.Rnw:626-627 (eval = FALSE)
+###################################################
+## compileAttributes()
+
+
+###################################################
+### code chunk number 30: Rcpp-attributes.Rnw:715-720 (eval = FALSE)
+###################################################
+## #' The length of a string (in characters).
+## #'
+## #' @param str input character vector
+## #' @return characters in each element of the vector
+## strLength <- function(str)
+
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-introduction.Rnw
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-introduction.Rnw	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-introduction.Rnw	(revision 2477)
@@ -0,0 +1,1077 @@
+%% use JSS class -- use 'nojss' to turn off header
+\documentclass[shortnames,nojss,article]{jss}
+\usepackage{booktabs,flafter,thumbpdf}
+%\VignetteIndexEntry{Rcpp-introduction}
+%\VignetteKeywords{Rcpp, foreign function interface, .Call, C++, R}
+%\VignetteDepends{Rcpp}
+\SweaveOpts{concordance=FALSE}
+
+\author{Dirk Eddelbuettel\\Debian Project \And Romain Fran\c{c}ois\\\proglang{R} Enthusiasts}
+\Plainauthor{Dirk Eddelbuettel, Romain Fran\c{c}ois}
+
+\title{\pkg{Rcpp}: Seamless \proglang{R} and \proglang{C++} Integration}
+\Plaintitle{Rcpp: Seamless R and C++ Integration}
+
+\Abstract{
+  The \pkg{Rcpp} package simplifies integrating \proglang{C++} code with \proglang{R}. It
+  provides a consistent \proglang{C++} class hierarchy that maps various types of \proglang{R}
+  objects (vectors, matrices, functions, environments, \dots) to dedicated \proglang{C++}
+  classes. Object interchange between \proglang{R} and \proglang{C++} is managed by
+  simple, flexible and extensible concepts which include broad support for
+  \proglang{C++} Standard Template Library idioms. \proglang{C++} code can both be
+  compiled, linked and loaded on the fly, or added via packages.
+  Flexible error and exception code handling is provided.
+  \pkg{Rcpp} substantially lowers the barrier for programmers wanting to
+  combine \proglang{C++} code with \proglang{R}.
+}
+
+\Keywords{\proglang{R}, \proglang{C++}, foreign function interface, \code{.Call}}
+\Plainkeywords{R, C++, foreign function interface, .Call}
+
+\Volume{40}
+\Issue{8}
+\Month{April}
+\Year{2011}
+\Submitdate{2010-11-15}
+\Acceptdate{2011-03-21}
+
+\Address{
+  Dirk Eddelbuettel \\
+  Debian Project \\
+  River Forest, IL, United States of America\\
+  E-mail: \email{edd@debian.org}\\
+  URL: \url{http://dirk.eddelbuettel.com/}\\
+
+  Romain Fran\c{c}ois\\
+  Professional \proglang{R} Enthusiast\\
+  1 rue du Puits du Temple\\
+  34 000 Montpellier, France \\
+  E-mail: \email{romain@r-enthusiasts.com}\\
+  URL: \url{http://romainfrancois.blog.free.fr/}
+}
+
+%% need no \usepackage{Sweave.sty}
+
+<<prelim,echo=FALSE,print=FALSE>>=
+library(Rcpp)
+rcpp.version <- packageDescription("Rcpp")$Version
+rcpp.date <- packageDescription("Rcpp")$Date
+now.date <- strftime(Sys.Date(), "%B %d, %Y")
+@
+%
+
+
+\begin{document}
+
+\vspace*{-0.25cm}
+
+\section{Introduction}
+
+\proglang{R} \citep{R:Main} is an extensible system.
+The `Writing \proglang{R} Extensions' manual \citep{R:Extensions}
+describes in detail how to augment \proglang{R} with compiled code,
+focusing mostly on the \proglang{C} language, but also mentioning
+\proglang{C++} and \proglang{Fortran}. The \proglang{R} application programming
+interface (API) described in `Writing \proglang{R} Extensions' is
+based on a set of functions and macros operating on \code{SEXP} (pointers to
+\code{SEXPREC} or `\proglang{S} expression' structures, see the `\proglang{R} Language'
+manual \citealp{R:Language} for details) which are the internal
+representation of \proglang{R} objects.
+In this article, we discuss the functionality of the \pkg{Rcpp}
+package \citep{CRAN:Rcpp}, which simplifies the usage of \proglang{C++} code
+in \proglang{R}. Combining \proglang{R} and \proglang{C++} is not a new idea, so we start with
+a short review of other approaches and give some historical
+background on the development of \pkg{Rcpp}.
+
+The \pkg{Rcpp} package provides a consistent API for seamlessly accessing,
+extending or modifying \proglang{R} objects at the \proglang{C++} level. The API is a rewritten
+and extended version of an earlier API which we refer to as the `classic
+\pkg{Rcpp} API'. It is still provided in the \pkg{RcppClassic} package \citep{CRAN:RcppClassic}
+to ensure compatibility, but its use is otherwise deprecated.
+All new development should use the richer second API which
+is enclosed in the \pkg{Rcpp} \proglang{C++}
+namespace, and corresponds to the redesigned code base.
+This article highlights some of the key design and implementation choices of
+the new API: Lightweight encapsulation of \proglang{R} objects in \proglang{C++} classes, automatic
+garbage collection strategy, code inlining, data interchange between \proglang{R} and
+\proglang{C++}, and error handling.
+
+Several examples are included to illustrate the benefits of using \pkg{Rcpp}
+as opposed to the traditional \proglang{R} API. Many more examples are available within
+the package, both as explicit examples and as part of the numerous unit tests.
+%
+The \pkg{Rcpp} package is available from the Comprehensive \proglang{R} Archive Network (CRAN)
+at \url{http://CRAN.R-project.org/package=Rcpp}.
+
+\makeatletter
+\if@nojss
+  This vignette corresponds to the paper published in the \textsl{Journal of
+    Statistical Software}. It is currently still identical to
+  the published paper.  Over time, this vignette version may receive minor
+  updates. For citations, please use the \cite{JSS:Rcpp} or
+  \cite{Eddelbuettel:2013:Rcpp}; details are also provided in \proglang{R} via
+  \texttt{citation("Rcpp")}.
+
+  This version corresponds to \pkg{Rcpp} version \Sexpr{rcpp.version} and was
+  typeset on \Sexpr{now.date}.
+\fi
+\makeatother
+
+
+\subsection{Historical context}
+
+\pkg{Rcpp} first appeared in 2005 as a contribution (by Dominick Samperi) to the
+\pkg{RQuantLib} package \citep{CRAN:RQuantLib} and became a CRAN package
+in early 2006. Several releases (all by Samperi) followed in quick succession
+under the name \pkg{Rcpp}. The package was then renamed to
+\pkg{RcppTemplate}; several more releases followed during 2006 under the new
+name.  However, no further releases were made during 2007, 2008 or most of
+2009. Following a few updates in late 2009, it was withdrawn from CRAN.
+
+Given the continued use of the package, Eddelbuettel decided to revitalize it. New
+releases, using the initial name \pkg{Rcpp}, started in November 2008. These
+included an improved build and distribution process, additional
+documentation, and new functionality---while retaining the existing
+`classic \pkg{Rcpp}' interface.  While not described here, this API will
+be provided for the foreseeable future via the \pkg{RcppClassic} package.
+
+Reflecting evolving \proglang{C++} coding standards \citep[see][]{Meyers:2005:EffectiveC++},
+Eddelbuettel and Fran\c{c}ois started a significant redesign of the
+code base in 2009. This added numerous new features several of which are described
+in this article as well as in multiple
+vignettes included with the package. This new API is our current focus,
+and we intend to both extend and support the API in future development of the
+\pkg{Rcpp} package.
+
+\subsection{Related work}
+
+Integration of \proglang{C++} and \proglang{R} has been addressed by several authors; the earliest
+published reference is probably \cite{Bates+DebRoy:2001:C++Classes}.
+An unpublished paper by \cite{Java+Gaile+Manly:2007:RCpp} expresses several ideas
+that are close to some of our approaches, though not yet fully fleshed out.
+The \pkg{Rserve} package \citep{Urbanek:2003:Rserve,CRAN:Rserve} acts as a
+socket server for \proglang{R}. On the server side, \pkg{Rserve} translates \proglang{R} data
+structures into a binary serialization format and uses TCP/IP for
+transfer. On the client side, objects are reconstructed as instances of \proglang{Java}
+or \proglang{C++} classes that emulate the structure of \proglang{R} objects.
+
+The packages \pkg{rcppbind} \citep{Liang:2008:rcppbind}, \pkg{RAbstraction}
+\citep{Armstrong:2009:RAbstraction} and \pkg{RObjects}
+\citep{Armstrong:2009:RObjects} are all implemented using \proglang{C++} templates.
+None of them have matured to the point of a CRAN release.
+\pkg{CXXR} \citep{Runnalls:2009:CXXR} approaches this topic from the other direction:
+Its aim is to completely refactor \proglang{R} on a stronger \proglang{C++} foundation.
+\pkg{CXXR} is therefore concerned with all aspects of the \proglang{R} interpreter,
+read-eval-print loop (REPL), and threading; object interchange between \proglang{R} and \proglang{C++} is but one
+part. A similar approach is discussed by \cite{TempleLang:2009:ModestProposal}
+who suggests making low-level internals extensible by package developers in
+order to facilitate extending \proglang{R}.
+\cite{TempleLang:2009:RGCCTranslationUnit}, using compiler output for
+references on the code in order to add bindings and wrappers, offers
+a slightly different angle.
+
+\subsection[Rcpp use cases]{\pkg{Rcpp} use cases}
+\label{sec:classic_rcpp}
+
+The core focus of \pkg{Rcpp} has always been on helping the
+programmer to more easily add \proglang{C++}-based functions.
+Here, we use `function' in the standard mathematical sense of providing
+results (output) given a set of parameters or data (input).
+This was
+facilitated from the earliest releases using \proglang{C++} classes for receiving
+various types of \proglang{R} objects, converting them to \proglang{C++} objects and allowing the
+programmer to return the results to \proglang{R} with relative ease.
+
+This API therefore supports two typical use cases. First, existing \proglang{R} code
+may be replaced by equivalent \proglang{C++} code in order to reap
+performance gains.  This case is conceptually easy when there are
+(built- or run-time) dependencies on other \proglang{C} or \proglang{C++} libraries.  It typically
+involves setting up data and parameters---the right-hand side components of a
+function call---before making the call in order to provide the result that is
+to be assigned to the left-hand side. Second, \pkg{Rcpp} facilitates calling
+functions provided by other libraries. The use resembles the first case but
+with an additional level of abstraction: data
+and parameters are passed via \pkg{Rcpp} to a function set-up to call code
+from an external library.
+
+Apart from this `vertical mode' of calling \proglang{C++} from \proglang{R}, additional
+features in the new API also support a more `horizontal mode' of directly
+calling \pkg{Rcpp} objects.  This was motivated by the needs of other
+projects such as \pkg{RInside} \citep{CRAN:RInside} for easy embedding of \proglang{R}
+in \proglang{C++} applications and \pkg{RProtoBuf} \citep{CRAN:RProtoBuf} to
+interface with the Protocol Buffers library. This use will be touched upon
+in the next section, but a more detailed discussion is outside the scope of
+this paper.  Lastly, the more recent additions `\pkg{Rcpp} modules' and `\pkg{Rcpp} sugar'
+also expand the use cases; see Section~\ref{sec:ongoing} below.
+
+\section[The Rcpp API]{The \pkg{Rcpp} API}
+\label{sec:new_rcpp}
+
+\subsection{A first example}
+
+We can illustrate the \pkg{Rcpp} API by revisiting the convolution example
+from the `Writing \proglang{R} Extensions' manual \citep[Chapter 5]{R:Extensions}. Using
+\pkg{Rcpp}, this function can be written as follows:
+%
+\begin{Code}
+#include <Rcpp.h>
+
+RcppExport SEXP convolve3cpp(SEXP a, SEXP b) {
+    Rcpp::NumericVector xa(a);
+    Rcpp::NumericVector xb(b);
+    int n_xa = xa.size(), n_xb = xb.size();
+    int nab = n_xa + n_xb - 1;
+    Rcpp::NumericVector xab(nab);
+
+    for (int i = 0; i < n_xa; i++)
+        for (int j = 0; j < n_xb; j++)
+            xab[i + j] += xa[i] * xb[j];
+
+    return xab;
+}
+\end{Code}
+%
+We can highlight several aspects.
+\begin{enumerate}
+\item Only a single header file
+  \code{Rcpp.h} is needed to use the \pkg{Rcpp} API.
+\item \code{RcppExport} is a convenience macro helping with calling a
+  \proglang{C} function from \proglang{C++}.
+\item Given two
+  arguments of type \code{SEXP}, a third is returned (as using only
+  \code{SEXP} types for input and output is prescribed by the \code{.Call()}
+  interface of the \proglang{R} API).
+\item Both inputs are
+  converted to \proglang{C++} vector types provided by \pkg{Rcpp} (and we have more to say about these
+  conversions below).
+\item The
+  usefulness of these classes can be seen when we query the vectors directly
+  for their size---using the \code{size()} member function---in order to
+  reserve a new result type of appropriate length,
+  and with the use of the
+  \verb|operator[]| to extract and set individual elements of the vector.
+\item The computation itself is
+  straightforward embedded looping just as in the original examples in the
+  `Writing \proglang{R} Extensions' manual \citep{R:Extensions}.
+\item The return conversion
+  from the \code{NumericVector} to the \code{SEXP} type is also automatic.
+\end{enumerate}
+
+We argue that this \pkg{Rcpp}-based usage is much easier to read, write and debug than the
+\proglang{C} macro-based approach supported by \proglang{R} itself.
+
+
+
+\subsection[Rcpp class hierarchy]{\pkg{Rcpp} class hierarchy}
+
+The \code{Rcpp::RObject} class is the basic class of the new \pkg{Rcpp} API.
+An instance of the \code{RObject} class encapsulates an \proglang{R} object
+(itself represented by the \proglang{R} type \code{SEXP}), exposes methods that are appropriate for all types
+of objects and transparently manages garbage collection.
+
+The most important aspect of the \code{RObject} class is that it is
+a very thin wrapper around the \code{SEXP} it encapsulates. The
+\code{SEXP} is indeed the only data member of an \code{RObject}. The
+\code{RObject} class does not interfere with the way \proglang{R} manages its
+memory and does not perform copies of the object into a suboptimal
+\proglang{C++} representation. Instead, it merely acts as a proxy to the
+object it encapsulates so that methods applied to the \code{RObject}
+instance are relayed back to the \code{SEXP} in terms of the standard
+\proglang{R} API.
+
+The \code{RObject} class takes advantage of the explicit life cycle of
+\proglang{C++} objects to manage exposure of the underlying \proglang{R} object to the
+garbage collector. The \code{RObject} effectively treats
+its underlying \code{SEXP} as a resource.
+The constructor of the \code{RObject} class takes
+the necessary measures to guarantee that the underlying \code{SEXP}
+is protected from the garbage collector, and the destructor
+assumes the responsibility to withdraw that protection.
+
+By assuming the entire responsibility of garbage collection, \pkg{Rcpp}
+relieves the programmer from writing boiler plate code to manage
+the protection stack with \code{PROTECT} and \code{UNPROTECT} macros.
+
+The \code{RObject} class defines a set of member functions applicable
+to any \proglang{R} object, regardless of its type. This ranges from
+querying properties of the object (\texttt{isNULL}, \texttt{isObject},
+\texttt{isS4}), management of the attributes
+(\texttt{attributeNames}, \texttt{hasAttribute}, \texttt{attr}) to
+handling of slots\footnote{Member functions dealing with slots
+are only applicable to \proglang{S}4 objects; otherwise an exception is thrown.}
+(\texttt{hasSlot}, \texttt{slot}).
+
+\subsection{Derived classes}
+
+Internally, an \proglang{R} object must have one type amongst the set of
+predefined types, commonly referred to as SEXP types. The `\proglang{R} Internals'
+manual \citep{R:Internals} documents these various types.
+\pkg{Rcpp} associates a dedicated \proglang{C++} class for most SEXP types, and
+therefore only exposes functionality that is relevant to the \proglang{R} object
+that it encapsulates.
+
+For example \code{Rcpp::Environment} contains
+member functions to manage objects in the associated environment.
+Similarly, classes related to vectors---\code{IntegerVector}, \code{NumericVector},
+\code{RawVector}, \code{LogicalVector}, \code{CharacterVector},
+\code{GenericVector} (also known as \code{List}) and
+\code{ExpressionVector}---expose functionality to extract and set values from the vectors.
+
+The following sections present typical uses of \pkg{Rcpp} classes in
+comparison with the same code expressed using functions and macros of the \proglang{R} API.
+
+\subsection{Numeric vectors}
+
+The next code snippet is taken from `Writing \proglang{R} Extensions'
+\citep[Section 5.9.1]{R:Extensions}. It allocates a \code{numeric} vector of two elements
+and assigns some values to it using the \proglang{R} API.
+%
+\begin{Code}
+SEXP ab;
+PROTECT(ab = allocVector(REALSXP, 2));
+REAL(ab)[0] = 123.45;
+REAL(ab)[1] = 67.89;
+UNPROTECT(1);
+\end{Code}
+%
+Although this is one of the simplest examples in `Writing \proglang{R} Extensions',
+it seems verbose and yet it is not obvious at first sight what is happening.
+Memory is allocated by \code{allocVector}; we must also supply it with
+the type of data (\code{REALSXP}) and the number of elements.  Once
+allocated, the \code{ab} object must be protected from garbage
+collection.
+Lastly, the \code{REAL} macro returns a pointer to the
+beginning of the actual array; its indexing does not resemble either \proglang{R} or
+\proglang{C++}.
+
+The code can be simplified using the \code{Rcpp::NumericVector} class:
+%
+\begin{Code}
+Rcpp::NumericVector ab(2);
+ab[0] = 123.45;
+ab[1] = 67.89;
+\end{Code}
+%
+The code contains fewer idiomatic decorations. The \code{NumericVector}
+constructor is given the number of elements the vector contains (2), which
+hides the call to the \code{allocVector} in the original code example. Also hidden is
+protection of the object from garbage collection, which is a behavior that
+\code{NumericVector} inherits from \code{RObject}.  Values are assigned to
+the first and second elements of the vector as \code{NumericVector} overloads
+the \code{operator[]}.
+
+The snippet can also be written more concisely as a single statement using the \code{create}
+static member function of the \code{NumericVector} class:
+%
+\begin{Code}
+Rcpp::NumericVector ab = Rcpp::NumericVector::create(123.45, 67.89);
+\end{Code}
+
+
+\subsection{Character vectors}
+
+A second example deals with character vectors and emulates this \proglang{R} code:
+%
+\begin{CodeInput}
+R> c("foo", "bar")
+\end{CodeInput}
+%
+Using the traditional \proglang{R} API, the vector can be allocated and filled as such:
+%
+\begin{Code}
+SEXP ab;
+PROTECT(ab = allocVector(STRSXP, 2));
+SET_STRING_ELT( ab, 0, mkChar("foo") );
+SET_STRING_ELT( ab, 1, mkChar("bar") );
+UNPROTECT(1);
+\end{Code}
+%
+This imposes on the programmer knowledge of \code{PROTECT}, \code{UNPROTECT},
+\code{SEXP}, \code{allocVector}, \code{SET\_STRING\_ELT}, and \code{mkChar}.
+%
+Using the \code{Rcpp::CharacterVector} class, we can express the same
+code more concisely:
+%
+\begin{Code}
+Rcpp::CharacterVector ab(2);
+ab[0] = "foo";
+ab[1] = "bar";
+\end{Code}
+
+\section[R and C++ data interchange]{\proglang{R} and \proglang{C++} data interchange}
+
+In addition to classes, the \pkg{Rcpp} package contains two
+functions to perform conversion of \proglang{C++} objects to \proglang{R} objects and back.
+
+\subsection[C++ to R: wrap]{\proglang{C++} to \proglang{R}: \code{wrap}}
+
+The \proglang{C++} to \proglang{R} conversion is performed by the \code{Rcpp::wrap} templated
+function. It uses advanced template metaprogramming techniques\footnote{A
+  discussion of template metaprogramming
+  \citep{Vandevoorde+Josuttis:2003:Templates,Abrahams+Gurtovoy:2004:TemplateMetaprogramming} is beyond the
+  scope of this article.}  to convert a wide and extensible set of types and
+classes to the most appropriate type of \proglang{R} object. The signature of the
+\code{wrap} template is as follows:
+%
+\begin{Code}
+template <typename T> SEXP wrap(const T& object);
+\end{Code}
+%
+The templated function takes a reference to a `wrappable'
+object and converts this object into a \code{SEXP}, which is what \proglang{R} expects.
+Currently wrappable types are:
+\begin{itemize}
+\item primitive types: \code{int}, \code{double}, \code{bool}, \dots which are converted
+into the corresponding atomic \proglang{R} vectors;
+\item \code{std::string} objects which are converted to \proglang{R} atomic character vectors;
+\item Standard Template Library (STL) containers such as \code{std::vector<T>} or \code{std::map<T>},
+as long as the template parameter type \code{T} is itself wrappable;
+\item STL maps which use \code{std::string} for keys
+({e.g.}, \code{std::map<std::string, T>}); as long as
+the type \code{T} is wrappable;
+\item any type that implements implicit conversion to \code{SEXP} through the
+\code{operator SEXP()};
+\item any type for which the \code{wrap} template is
+fully specialized.
+\end{itemize}
+
+Wrappability of an object type is resolved at compile time using
+modern techniques of template meta programming and class traits. The
+\code{Rcpp-extending} vignette in the \pkg{Rcpp} package discusses in depth how to extend \code{wrap}
+to third-party types. The \pkg{RcppArmadillo}
+\citep*{CRAN:RcppArmadillo} and \pkg{RcppGSL} \citep{CRAN:RcppGSL} packages
+feature several examples.
+The following segment of code illustrates that the design allows
+composition:
+
+\begin{Code}
+RcppExport SEXP someFunction() {
+  std::vector<std::map<std::string,int> > v;
+  std::map<std::string, int> m1;
+  std::map<std::string, int> m2;
+
+  m1["foo"]=1;
+  m1["bar"]=2;
+  m2["foo"]=1;
+  m2["bar"]=2;
+  m2["baz"]=3;
+
+  v.push_back( m1 );
+  v.push_back( m2 );
+  return Rcpp::wrap( v );
+}
+\end{Code}
+%
+In this example, the STL types \verb+vector+ and \verb+map+ are used to
+create a list of two named vectors. The member function \verb+push_back+
+insert a given element into a vector.  This example is equivalent to the
+result of this \proglang{R} statement:
+%
+\begin{Code}
+list(c(bar = 2L, foo = 1L), c(bar = 2L, baz = 3L, foo = 1L))
+\end{Code}
+
+
+\subsection[R to C++: as]{\proglang{R} to \proglang{C++}: \code{as}}
+
+The reverse conversion from an \proglang{R} object to a \proglang{C++} object is implemented by variations of the
+\code{Rcpp::as} template whose signature is:
+%
+\begin{Code}
+template <typename T> T as(SEXP x);
+\end{Code}
+%
+It offers less flexibility and currently
+handles conversion of \proglang{R} objects into primitive types ({e.g.}, \code{bool}, \code{int}, \code{std::string}, \dots),
+STL vectors of primitive types  ({e.g.}, \code{std::vector<bool>},
+\code{std::vector<double>}, \dots) and arbitrary types that offer
+a constructor that takes a \code{SEXP}. In addition \code{as} can
+be fully or partially specialized to manage conversion of \proglang{R} data
+structures to third-party types as can be seen for example in the
+\pkg{RcppArmadillo} package which eases transfer of \proglang{R} matrices and vectors to
+the optimised data structures in the \pkg{Armadillo} linear algebra library \citep{Sanderson:2010:Armadillo}.
+
+
+\subsection{Implicit use of converters}
+
+The converters offered by \code{wrap} and \code{as} provide a very
+useful framework to implement code logic in terms of \proglang{C++}
+data structures and then explicitly convert data back to \proglang{R}.
+
+In addition, the converters are also used implicitly
+in various places in the \code{Rcpp} API.
+Consider the following code that uses the \code{Rcpp::Environment} class to
+interchange data between \proglang{C++} and \proglang{R}. It accesses a vector
+\texttt{x} from the global environment, creates an STL \texttt{map} of string
+types and pushes this back to \proglang{R}:
+%
+\begin{Code}
+Rcpp::Environment global = Rcpp::Environment::global_env();
+std::vector<double> vx = global["x"];
+
+std::map<std::string, std::string> map;
+map["foo"] = "oof";
+map["bar"] = "rab";
+
+global["y"] = map;
+\end{Code}
+%
+In the first part of the example, the code extracts a
+\code{std::vector<double>} from the global environment. In order to achieve this,
+the \code{operator[]}  of \code{Environment} uses the proxy pattern
+\citep{Meyers:1995:MoreEffectiveC++}
+to distinguish between left hand side (LHS) and right hand side (RHS) use.
+
+The output of the \code{operator[]} is an instance of the nested class
+\code{Environment::Binding}. This class defines a templated implicit conversion
+operator. It is this conversion operator which allows a \code{Binding}
+object to be assigned to any type that \code{Rcpp::as} is able to handle.
+
+In the last part of the example, the LHS use of the \code{Binding} instance is
+implemented through its assignment operator. This is also templated and uses
+\code{Rcpp::wrap} to perform the conversion to a \code{SEXP} that can be
+assigned to the requested symbol in the global environment.
+
+The same mechanism is used throughout the API. Examples include access/modification
+of object attributes, slots, elements of generic vectors (lists),
+function arguments, nodes of dotted pair lists, language calls and more.
+
+\section{Function calls}
+\label{sec:functions}
+
+\begin{table}[t!]
+  \begin{minipage}[t]{0.465\linewidth}
+    \centering{\underline{Environment: Using the \pkg{Rcpp} API}}
+    \begin{Code}
+Environment stats("package:stats");
+Function rnorm = stats["rnorm"];
+return rnorm(10,
+             Named("sd", 100.0));
+    \end{Code}
+\end{minipage}
+  \begin{minipage}{0.06\linewidth}
+    \phantom{XXX}
+  \end{minipage}
+  \begin{minipage}[t]{0.465\linewidth}
+    \centering{\underline{Environment: Using the \proglang{R} API}}
+    \begin{Code}
+SEXP stats = PROTECT(
+  R_FindNamespace(
+    mkString("stats")));
+SEXP rnorm = PROTECT(
+  findVarInFrame(stats,
+               install("rnorm")));
+SEXP call  = PROTECT(
+  LCONS( rnorm,
+    CONS(ScalarInteger(10),
+      CONS(ScalarReal(100.0),
+           R_NilValue))));
+SET_TAG(CDDR(call),install("sd"));
+SEXP res = PROTECT(eval(call,
+                   R_GlobalEnv));
+UNPROTECT(4);
+return res;
+    \end{Code}
+  \end{minipage}
+
+\bigskip
+
+  \begin{minipage}[t]{0.465\linewidth}
+    \centering{\underline{Language: Using the \pkg{Rcpp} API}}
+    \begin{Code}
+Language call("rnorm", 10,
+              Named("sd",100.0));
+return call.eval();
+    \end{Code}
+  \end{minipage}
+  \begin{minipage}{0.06\linewidth}
+    \phantom{XXX}
+  \end{minipage}
+  \begin{minipage}[t]{0.465\linewidth}
+    \centering{\underline{Language: Using the \proglang{R} API}}
+    \begin{Code}
+SEXP call  = PROTECT(
+    LCONS(install("rnorm"),
+    CONS(ScalarInteger(10),
+      CONS(ScalarReal(100.0),
+           R_NilValue))));
+SET_TAG(CDDR(call),install("sd"));
+SEXP res = PROTECT(eval(call,
+                   R_GlobalEnv));
+UNPROTECT(2);
+return res;
+    \end{Code}
+  \end{minipage}
+
+\bigskip
+
+  \begin{minipage}[t]{0.465\linewidth}
+    \centering{\underline{Sugar: Using the \pkg{Rcpp} API}}
+    \begin{Code}
+RNGScope scope;
+return rnorm(10, 0, 100);
+    \end{Code}
+\end{minipage}
+  \begin{minipage}{0.06\linewidth}
+    \phantom{XXX}
+  \end{minipage}
+  \begin{minipage}[t]{0.465\linewidth}
+    \centering{\underline{Sugar: Using the \proglang{R} API}}
+
+    \medskip
+    (not applicable)
+  \end{minipage}
+
+\bigskip
+
+  \caption{\pkg{Rcpp} versus the \proglang{R} API: Five ways of calling
+    \code{rnorm(10L, sd = 100)} in \proglang{C}/\proglang{C++}.}
+  \label{fig:rnormCode}
+  \medskip \small
+  Note that we have removed the \code{Rcpp::} prefix for readability; this corresponds to adding a directive
+  \texttt{using namespace Rcpp;} in the code. The versions that use callbacks to \proglang{R} do not require handling
+  of the state of the random number generator. The version that uses \pkg{Rcpp} sugar requires it, which
+  is done via the instantiation of the \code{RNGScope} variable.
+\end{table}
+
+The next example shows how to use \pkg{Rcpp} to emulate the \proglang{R} code
+\code{rnorm(10L, sd = 100.0)}.
+As shown in Table~\ref{fig:rnormCode}, the code can be expressed in several
+ways in either \pkg{Rcpp} or the standard \proglang{R} API. The first version shows the
+use of the \code{Environment} and \code{Function} classes by
+\pkg{Rcpp}.
+The second version shows the use of the \code{Language} class, which
+manages calls (LANGSXP).
+For comparison, we also show both versions using the standard \proglang{R} API.
+Finally, we also show a variant using `\pkg{Rcpp} sugar', a topic which is
+discussed in Sections~\ref{sec:perfcomp} and \ref{sec:ongoing} below.
+
+This example illustrates that the \pkg{Rcpp} API permits us to work with code
+that is easier to read, write and maintain. More examples are available as
+part of the documentation included in the \pkg{Rcpp} package, as well as
+among its over seven hundred and fifty unit tests.
+
+\section{Using code `inline'}
+\label{sec:inline}
+
+Extending \proglang{R} with compiled code requires a mechanism for reliably compiling,
+linking, and loading the code. While using a package is preferable in the long run,
+it may be too involved for quick explorations. An alternative is
+provided by the \pkg{inline} package \citep{CRAN:inline} which compiles,
+links and loads a \proglang{C}, \proglang{C++} or \proglang{Fortran} function---directly from the \proglang{R} prompt
+using simple functions \code{cfunction} and \code{cxxfunction}.  The latter provides an extension which
+works particularly well with \pkg{Rcpp} via so-called `plugins' which provide
+information about additional header file and
+library locations.
+
+The use of \pkg{inline} is possible as \pkg{Rcpp} can be installed and
+updated just like any other \proglang{R} package using, for examples, the
+\code{install.packages()} function for initial installation as well as
+\code{update.packages()} for upgrades.  So even though \proglang{R}/\proglang{C++} interfacing
+would otherwise require source code, the \pkg{Rcpp} library is always provided
+ready for use as a pre-built library through the CRAN package
+mechanism.\footnote{This presumes a platform for which pre-built binaries are
+  provided. \pkg{Rcpp} is available in binary form for Windows and OS~X users from
+  CRAN, and as a \code{.deb} package for Debian and Ubuntu users. For other systems, the
+  \pkg{Rcpp} library is automatically built from source during installation
+  or upgrades.}
+
+The library and header files provided by \pkg{Rcpp} for use by other packages
+are installed along with the \pkg{Rcpp} package. The \code{LinkingTo:}~\code{Rcpp}
+directive in the \code{DESCRIPTION} file lets \proglang{R} properly reference the header files.
+The \pkg{Rcpp} package provides appropriate information for the \code{-L}
+switch needed for linking via the function \code{Rcpp:::LdFlags()}.
+It can be used by \code{Makevars} files of other
+packages, and \pkg{inline} makes use of it internally so that all of this is
+done behind the scenes without the need for explicitly setting compiler or
+linker options.
+
+The convolution example provided above can be rewritten for use by
+\pkg{inline} as shown below.  The function body is provided by the \proglang{R} character
+variable \code{src}, the function header is defined by the argument
+\code{signature}, and we only need to enable \code{plugin = "Rcpp"} to obtain a
+new \proglang{R} function \code{fun} based on the \proglang{C++} code in \code{src}:
+%
+\begin{CodeChunk}
+\begin{CodeInput}
+R> src <- '
++   Rcpp::NumericVector xa(a);
++   Rcpp::NumericVector xb(b);
++   int n_xa = xa.size(), n_xb = xb.size();
++
++   Rcpp::NumericVector xab(n_xa + n_xb - 1);
++   for (int i = 0; i < n_xa; i++)
++     for (int j = 0; j < n_xb; j++)
++        xab[i + j] += xa[i] * xb[j];
++   return xab;
++ '
+R> fun <- cxxfunction(signature(a = "numeric", b = "numeric"),
++    src, plugin = "Rcpp")
+R> fun(1:3, 1:4)
+\end{CodeInput}
+\begin{CodeOutput}
+[1]  1  4 10 16 17 12
+\end{CodeOutput}
+\end{CodeChunk}
+%
+With one assignment to the \proglang{R} variable \code{src}, and one call of the \proglang{R} function
+\code{cxxfunction} (provided by the \pkg{inline} package), we have created a new \proglang{R}
+function \code{fun} that uses the \proglang{C++} code we assigned to
+\code{src}---and all this functionality can be used directly from the \proglang{R}
+prompt making prototyping with \proglang{C++} functions straightforward.
+
+\textsl{Update}: \pkg{Rcpp} version 0.10.0 and later contain new and powerful feature
+called 'Rcpp Attributes' which provides an even more powerful mechanism; see
+\cite{CRAN:Rcpp:Attributes} for more details.
+
+\section{Using Standard Template Library algorithms}
+
+The STL offers a variety of generic
+algorithms designed to be used on ranges of elements
+\citep{Plauger+Et+Al:2000:STL}. A range is any sequence of objects that can be
+accessed through iterators or pointers.  All \pkg{Rcpp} classes from the new
+API representing vectors (including lists) can produce ranges through their
+member functions \code{begin()} and \code{end()}, effectively supporting
+iterating over elements of an \proglang{R} vector.
+
+The following code illustrates how \pkg{Rcpp} might be used
+to emulate a
+simpler\footnote{The version of \code{lapply} does not allow use of the
+ellipsis (\code{...}).} version of \code{lapply}
+using the \code{transform} algorithm from the STL.
+%
+\begin{CodeChunk}
+\begin{CodeInput}
+R> src <- '
++   Rcpp::List input(data);
++   Rcpp::Function f(fun);
++   Rcpp::List output(input.size());
++   std::transform(input.begin(), input.end(), output.begin(), f);
++   output.names() = input.names();
++   return output;
++   '
+R> cpp_lapply <- cxxfunction(signature(data = "list", fun = "function"),
++    src, plugin = "Rcpp")
+\end{CodeInput}
+\end{CodeChunk}
+%
+We can now use this \code{cpp_lapply} function to calculate a summary of each
+column of the \code{faithful} data set included with \proglang{R}.
+%
+\begin{CodeInput}
+R> cpp_lapply(faithful, summary)
+\end{CodeInput}
+\begin{CodeOutput}
+$eruptions
+ Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
+1.600   2.163   4.000   3.488   4.454   5.100
+
+$waiting
+ Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
+ 43.0    58.0    76.0    70.9    82.0    96.0
+\end{CodeOutput}
+
+
+\section{Error handling}
+
+Code that uses both \proglang{R} and \proglang{C++} has to deal with two distinct
+error handling models. \pkg{Rcpp} simplifies this and allows both
+systems to work together.
+
+\subsection[C++ exceptions in R]{\proglang{C++} exceptions in \proglang{R}}
+
+The internals of the \proglang{R} condition mechanism and the implementation of
+\proglang{C++} exceptions are both based on a layer above POSIX jumps. These layers
+both assume total control over the call stack and should not be used together
+without extra precaution. \pkg{Rcpp} contains facilities to combine both systems
+so that \proglang{C++} exceptions are caught and recycled into the \proglang{R} condition
+mechanism.
+
+\pkg{Rcpp} defines the \code{BEGIN\_RCPP} and \code{END\_RCPP} macros that should
+be used to bracket code that might throw \proglang{C++} exceptions.
+%
+\begin{Code}
+RcppExport SEXP fun( SEXP x ) {
+BEGIN_RCPP
+    int dx = Rcpp::as<int>(x);
+    if( dx > 10 )
+        throw std::range_error("too big");
+    return Rcpp::wrap( dx * dx);
+END_RCPP
+}
+\end{Code}
+%
+The macros are simply defined to avoid code repetition. They expand to
+simple \code{try}/\code{catch} blocks so that the above example becomes:
+%
+\begin{Code}
+RcppExport SEXP fun( SEXP x ) {
+    try {
+        int dx = Rcpp::as<int>(x);
+        if( dx > 10 )
+            throw std::range_error("too big");
+        return Rcpp::wrap( dx * dx);
+    } catch( std::exception& __ex__ ) {
+        forward_exception_to_r( __ex__ );
+    } catch(...) {
+        ::Rf_error( "c++ exception (unknown reason)" );
+    }
+}
+\end{Code}
+%
+Using \code{BEGIN\_RCPP} and \code{END\_RCPP}---or the expanded
+versions---guarantees that the stack is first unwound in terms of \proglang{C++}
+exceptions, before the problem is converted to the standard \proglang{R} error
+management system using the function \code{Rf\_error} of the \proglang{R} API.
+
+The \code{forward\_exception\_to\_r} function uses run-time type information to
+extract information about the class of the \proglang{C++} exception and its message so that
+dedicated handlers can be installed on the \proglang{R} side.
+%
+\begin{CodeChunk}
+\begin{CodeInput}
+R> f <- function(x) .Call("fun", x)
+R> tryCatch(f(12), "std::range_error" = function(e) { conditionMessage(e) })
+\end{CodeInput}
+\begin{CodeOutput}
+[1] "too big"
+\end{CodeOutput}
+\begin{CodeInput}
+R> tryCatch(f(12), "std::range_error" = function(e) { class(e) })
+\end{CodeInput}
+\begin{CodeOutput}
+[1] "std::range_error" "C++Error"         "error"            "condition"
+\end{CodeOutput}
+\end{CodeChunk}
+%
+A serious limitation of this approach is the lack of support for calling
+handlers. \proglang{R} calling handlers are also based on POSIX jumps, and using both
+calling handlers from the \proglang{R} engine as well \proglang{C++} exception forwarding might
+lead to undetermined results. Future versions of \pkg{Rcpp} might attempt to
+to improve this issue.
+
+\subsection[R errors in C++]{\proglang{R} errors in \proglang{C++}}
+
+\proglang{R} itself currently does not offer \proglang{C}-level mechanisms to deal with errors. To
+overcome this problem, \pkg{Rcpp} uses the \code{Rcpp\_eval}
+function to evaluate an \proglang{R} expression in an R-level \code{tryCatch}
+block. The error, if any, that occurs while evaluating the
+function is then translated into an \proglang{C++} exception that can be dealt with using
+regular \proglang{C++} \code{try}/\code{catch} syntax.
+
+An open (and rather hard) problem, however, is posed by the fact that calls
+into the \proglang{C} API offered by \proglang{R} cannot be reliably protected.  Such
+calls can always encounter an error condition of their own triggering a call
+to \code{Rf_error} which will lead to a sudden death of the program. In
+particular, neither \proglang{C++} class destructors nor \code{catch} parts of outer
+\code{try}/\code{catch} blocks will be called. This leaves the potential for
+memory or resource leakage.  So while newly written code can improve on this
+situation via use of \proglang{C++} exception handling, existing code calling
+into the \proglang{C} API of \proglang{R} cannot be amended just by having an outer layer
+of exception handling around it.
+
+
+\section{Performance comparison}
+\label{sec:perfcomp}
+
+In this section, we present several different ways to leverage \pkg{Rcpp} to
+rewrite the convolution example from `Writing \proglang{R} Extensions' \citep[Chapter 5]{R:Extensions}
+first discussed in Section~\ref{sec:new_rcpp}.
+As part of the redesign of \pkg{Rcpp}, data copy is kept to the
+absolute minimum: The \code{RObject} class and all its derived
+classes are just a container for a \code{SEXP} object. We let \proglang{R} perform
+all memory management and access data though the macros or functions
+offered by the standard \proglang{R} API.
+
+The implementation of the \code{operator[]} is designed to be as
+efficient as possible, using both inlining and caching,
+but even this implementation is still less efficient than the
+reference \proglang{C} implementation described in \cite{R:Extensions}.
+
+\pkg{Rcpp} follows design principles from the STL, and classes such
+as \code{NumericVector} expose iterators that can be used for
+sequential scans of the data. Algorithms using iterators are
+usually more efficient than those that operate on objects using the
+\code{operator[]}. The following version of the convolution function
+illustrates the use of the \code{NumericVector::iterator}.
+%
+\begin{Code}
+#include <Rcpp.h>
+
+RcppExport SEXP convolve4cpp(SEXP a, SEXP b) {
+    Rcpp::NumericVector xa(a), xb(b);
+    int n_xa = xa.size(), n_xb = xb.size();
+    Rcpp::NumericVector xab(n_xa + n_xb - 1);
+
+    typedef Rcpp::NumericVector::iterator vec_iterator;
+    vec_iterator ia = xa.begin(), ib = xb.begin();
+    vec_iterator iab = xab.begin();
+    for (int i = 0; i < n_xa; i++)
+        for (int j = 0; j < n_xb; j++)
+            iab[i + j] += ia[i] * ib[j];
+
+    return xab;
+}
+\end{Code}
+%
+One of the focuses of recent developments of \pkg{Rcpp} is called `\pkg{Rcpp} sugar',
+and aims to provide R-like syntax in \proglang{C++}. While a fuller discussion of \pkg{Rcpp} sugar is
+beyond the scope of this article, we have included
+another version of the convolution algorithm based on \pkg{Rcpp} sugar for illustrative purposes here:
+%
+\begin{Code}
+#include <Rcpp.h>
+
+RcppExport SEXP convolve11cpp(SEXP a, SEXP b) {
+    Rcpp::NumericVector xa(a), xb(b);
+    int n_xa = xa.size(), n_xb = xb.size();
+    Rcpp::NumericVector xab(n_xa + n_xb-1, 0.0);
+
+    Rcpp::Range r( 0, n_xb-1 );
+    for (int i=0; i<n_xa; i++, r++)
+        xab[ r ] += Rcpp::noNA(xa[i]) * Rcpp::noNA(xb);
+    return xab ;
+}
+\end{Code}
+%
+\pkg{Rcpp} sugar allows manipulation of entire subsets of vectors at once, thanks to
+the \code{Range} class. \pkg{Rcpp} sugar uses techniques such as expression templates,
+lazy evaluation and loop unrolling to generate very efficient code.
+The \code{noNA} template function marks its argument to indicates that it does
+not contain any missing values---an assumption made implicitly by other
+versions---allowing sugar to compute the individual operations without having
+to test for missing values.
+
+We have benchmarked the various implementations by averaging over 5000 calls
+of each function with \code{a} and \code{b} containing 200 elements
+each.\footnote{The code is contained in the directory
+  \code{inst/examples/ConvolveBenchmarks} in the \pkg{Rcpp} package.} The timings
+are summarized in Table~\ref{tab:benchmark} below.
+
+\begin{table}[t]
+  \begin{center}
+    \begin{small}
+      \begin{tabular}{lrr}
+        \toprule
+        Implementation                    & Time in millisec. & Relative to \proglang{R} API \\
+        \cmidrule(r){2-3}
+        \proglang{R} API (as benchmark)             &  218       & \\
+        \pkg{Rcpp} sugar                        &  145       & 0.67 \\
+        \code{NumericVector::iterator}    &  217       & 1.00 \\
+        \code{NumericVector::operator[]}  &  282       & 1.29 \\
+        %\code{RcppVector<double>}         &  683       & 3.13 \\
+        \bottomrule
+      \end{tabular}
+    \end{small}
+    \caption{Run-time performance of the different convolution examples.}
+    \label{tab:benchmark}
+  \end{center}
+\end{table}
+
+The first implementation, written in \proglang{C} and using the traditional \proglang{R} API,
+provides our base case. It takes advantage of pointer arithmetics and therefore
+does not to pay the price of \proglang{C++} object encapsulation or operator overloading.
+
+The slowest solution illustrates the price of object encapsulation. Calling an overloaded
+\code{operator[]} as opposed to using direct pointer arithmetics as in the
+reference case costs about 29\% in performance.
+
+The next implementation uses iterators rather than indexing. Its performance
+is indistinguishable from the base case.
+This also shows that the use of \proglang{C++} may not necessarily imply any performance
+penalty. Further, \proglang{C++} \code{iterators} can be used to achieve the performance
+of \proglang{C} pointers, but without the potential dangers of direct memory
+access via pointers.
+
+Finally, the fastest implementation uses \pkg{Rcpp} sugar. It performs
+significantly better than the base case.  Explicit loop unrolling provides us with
+vectorization at the \proglang{C++} level which is responsible for this particular speedup.
+
+\section{On-going development}
+\label{sec:ongoing}
+
+\pkg{Rcpp} is in very active development: Current work in the
+package (and in packages such as \pkg{RcppArmadillo})
+focuses on further improving interoperability between \proglang{R} and \proglang{C++}.
+Two core themes for on-going development are `\pkg{Rcpp} sugar' as well as `\pkg{Rcpp} modules', both of which are
+also discussed in more detail in specific vignettes in the \pkg{Rcpp} package.
+
+`\pkg{Rcpp} sugar' offers syntactic
+sugar at the \proglang{C++} level, including optimized binary operators and many
+\proglang{R} functions such as \code{ifelse}, \code{sapply}, \code{any}, \code{head},
+\code{tail}, and more.
+The main technique used in \pkg{Rcpp} sugar is
+expression templates pioneered by the \pkg{Blitz++} library \citep{Veldhuizen:1998:Blitz}
+and since adopted
+by projects such as \pkg{Armadillo} \citep{Sanderson:2010:Armadillo}.
+Access to most of the d/p/q/r-variants of the statistical distribution
+functions has also been added, enabling the use of expressions such as
+\code{dnorm(X, m, s)} for a numeric vector \code{X} and scalars \code{m} and
+\code{s}. This was shown in Table~\ref{fig:rnormCode} in
+Section~\ref{sec:functions} above where
+the \proglang{R} expression \code{rnorm(10L, sd = 100)}
+was rewritten in \proglang{C++} as \code{rnorm(10, 0, 100)}. Note that
+\proglang{C++} semantics require the second parameter to be used here, which is
+different from the \proglang{R} case.
+
+`\pkg{Rcpp} modules' allows programmers to expose \proglang{C++} functions and classes at the
+\proglang{R} level. This offers access to \proglang{C++} code from \proglang{R} using even less interface
+code than by writing accessor functions. Modules are inspired by the
+\pkg{Boost.Python} library
+\citep{Abrahams+Grosse-Kunstleve:2003:Boost.Python} which provides similar
+functionality for \proglang{Python}. \proglang{C++} classes exposed by \pkg{Rcpp} modules are
+shadowed by reference classes which have been introduced in \proglang{R} 2.12.0.
+
+\textsl{Update}: Besides the vignettes for '\pkg{Rcpp} Sugar'
+\citep{CRAN:Rcpp:Sugar} and '\pkg{Rcpp} Modules' \citep{CRAN:Rcpp:Modules},
+the aforementioned vignette for '\pkg{Rcpp} Attributes'
+\citep{CRAN:Rcpp:Attributes} describes a new possibility for even more direct
+integration between \proglang{Rcpp} and \proglang{C++}.
+
+\section{Summary}
+
+The \pkg{Rcpp} package presented in this paper greatly simplifies integration of
+compiled \proglang{C++} code with \proglang{R}.
+\pkg{Rcpp} provides a \proglang{C++} class hierarchy which allows manipulation of \proglang{R} data structures in \proglang{C++}
+using member functions and operators directly related to the type
+of object being used, thereby reducing the level of expertise
+required to master the various functions and macros offered by the
+internal \proglang{R} API. The classes assume the entire
+responsibility of garbage collection of objects, relieving the
+programmer from book-keeping operations with the protection stack
+and enabling him/her to focus on the underlying problem.
+
+Data interchange between \proglang{R} and \proglang{C++} code is performed by the \code{wrap()} and
+\code{as()} template functions. They allow the programmer to write logic in terms
+of \proglang{C++} data structures, and facilitate use of modern libraries such as the
+Standard Template Library (STL) and its containers and algorithms. The
+\code{wrap()} and \code{as()} template functions are extensible by
+design. They are also used either explicitly or implicitly throughout the API.
+By using only thin wrappers around \code{SEXP} objects and adopting \proglang{C++}
+idioms such as iterators, the footprint of the \pkg{Rcpp} API
+is very lightweight, and does not incur a significant performance penalty.
+
+The \pkg{Rcpp} API offers opportunities to dramatically reduce the complexity
+of code, which should lower the initial cost of writing code and improve code readability, maintainability, and
+reuse---without incurring noticeable penalties in run-time performance.
+
+\section*{Acknowledgments}
+
+Detailed comments and suggestions by editors as well as anonymous referees
+are gratefully acknowledged.  We are also thankful for code contributions by
+Douglas Bates and John Chambers, as well as for very helpful suggestions by Uwe
+Ligges, Brian Ripley and Simon Urbanek concerning the build systems for different
+platforms.   Last but not least, several users provided very fruitful
+ideas for new or extended features via the \code{rcpp-devel} mailing list.
+
+\bibliography{\Sexpr{Rcpp:::bib()}}
+
+\vspace*{-0.35cm}
+
+\end{document}
+
+%%% Local Variables:
+%%% mode: latex
+%%% TeX-master: t
+%%% End:
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-sugar.pdf
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-sugar.pdf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-introduction.pdf
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-introduction.pdf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-extending.Rnw
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-extending.Rnw	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-extending.Rnw	(revision 2477)
@@ -0,0 +1,373 @@
+% !Rnw driver = highlight::HighlightWeaveLatex()
+\documentclass[10pt]{article}
+%\VignetteIndexEntry{Rcpp-extending}
+%\VignetteEngine{highlight::highlight}
+%\VignetteKeywords{Rcpp, package}
+%\VignetteDepends{Rcpp}
+
+\usepackage[USletter]{vmargin}
+\setmargrb{0.75in}{0.75in}{0.75in}{0.75in}
+
+\usepackage{color, alltt}
+\usepackage[authoryear,round,longnamesfirst]{natbib}
+\usepackage[colorlinks]{hyperref}
+\definecolor{link}{rgb}{0,0,0.3}	%% next few lines courtesy of RJournal.sty
+\hypersetup{
+    colorlinks,%
+    citecolor=link,%
+    filecolor=link,%
+    linkcolor=link,%
+    urlcolor=link
+}
+
+\usepackage{microtype}                     %% cf http://www.khirevich.com/latex/microtype/
+\usepackage[T1]{fontenc}		   %% cf http://www.khirevich.com/latex/font/
+\usepackage[bitstream-charter]{mathdesign} %% cf http://www.khirevich.com/latex/font/
+
+\newcommand{\proglang}[1]{\textsf{#1}}
+\newcommand{\pkg}[1]{{\fontseries{b}\selectfont #1}}
+
+%% defined as a stop-gap measure til interaction with highlight is sorted out
+\newcommand{\hlboxlessthan}{   \hlnormalsizeboxlessthan}
+\newcommand{\hlboxgreaterthan}{\hlnormalsizeboxgreaterthan}
+\newcommand{\hlboxopenbrace}{  \hlnormalsizeboxopenbrace}
+\newcommand{\hlboxclosebrace}{ \hlnormalsizeboxclosebrace}
+\newcommand{\hlboxbacktick}{   \hlnormalsizeboxbacktick}
+\newcommand{\hlboxunderscore}{ \hlnormalsizeboxunderscore}
+
+%% This corresponds to setting boxes=TRUE for highlight
+\newsavebox{\hlbox}
+\definecolor{hlBg}{rgb}{0.949019607843137,0.949019607843137,0.949019607843137}
+\definecolor{hlBd}{rgb}{0.9,0.9,0.9} % border
+\renewenvironment{Hchunk}{\vspace{0.5em}\noindent\begin{lrbox}{\hlbox}\begin{minipage}[b]{.9\textwidth}}%
+    {\end{minipage}\end{lrbox}\fcolorbox{hlBd}{hlBg}{\usebox{\hlbox}}\vspace{0.5em}}
+
+<<echo=FALSE,print=FALSE>>=
+prettyVersion <- packageDescription("Rcpp")$Version
+prettyDate <- format(Sys.Date(), "%B %e, %Y")
+require(inline)
+require(highlight)
+require(Rcpp)
+@
+
+\author{Dirk Eddelbuettel \and Romain Fran\c{c}ois}
+\title{Extending \pkg{Rcpp}}
+\date{\pkg{Rcpp} version \Sexpr{prettyVersion} as of \Sexpr{prettyDate}}
+
+\begin{document}
+\maketitle
+
+\abstract{
+  \noindent
+  This note provides an overview of the steps programmers should follow to
+  extend \pkg{Rcpp} \citep{CRAN:Rcpp,JSS:Rcpp} for use with their own classes. This document
+  is based on our experience in extending \pkg{Rcpp} to work with the
+  \pkg{Armadillo} \citep{Sanderson:2010:Armadillo} classes, available in the separate package
+  \pkg{RcppArmadillo} \citep{CRAN:RcppArmadillo}. This document assumes
+  knowledge of \pkg{Rcpp} as well as some knowledge of \proglang{C++}
+  templates \citep{Abrahams+Gurtovoy:2004:TemplateMetaprogramming}.
+}
+
+
+\section{Introduction}
+
+\pkg{Rcpp} facilitates data interchange between \proglang{R} and
+\proglang{C++} through the templated functions \texttt{Rcpp::as} (for
+conversion of objects from \proglang{R} to \proglang{C++}) and
+\texttt{Rcpp::wrap} (for conversion from \proglang{C++} to \proglang{R}).  In
+other words, we convert between the so-called \proglang{S}-expression
+pointers (in type \texttt{SEXP}) to a templated \proglang{C++} type, and vice
+versa.  The corresponding function declarations are as follows:
+
+<<lang=cpp>>=
+// conversion from R to C++
+template <typename T> T as( SEXP x) ;
+
+// conversion from C++ to R
+template <typename T> SEXP wrap(const T& object) ;
+@
+
+These converters are often used implicitly, as in the following code chunk:
+
+<<echo=FALSE>>=
+code <- '
+#include <Rcpp.h>
+using namespace Rcpp;
+
+// [[Rcpp::export]]
+List fx(List input){ // we get a list from R
+
+// pull std::vector<double> from R list
+// this is achieved through an implicit call to Rcpp::as
+std::vector<double> x = input["x"] ;
+
+// return an R list
+// this is achieved through implicit call to Rcpp::wrap
+return List::create(
+    _["front"] = x.front(),
+    _["back"]  = x.back()
+    );
+}
+'
+writeLines( code, "code.cpp" )
+@
+<<echo=FALSE,results=tex>>=
+external_highlight( "code.cpp", type = "LATEX", doc = FALSE )
+@
+
+<<>>=
+Rcpp::sourceCpp(file= "code.cpp")
+input <- list( x = seq(1, 10, by = 0.5) )
+fx( input )
+@
+
+The \pkg{Rcpp} converter function \texttt{Rcpp::as} and \texttt{Rcpp::wrap} have been
+designed to be extensible to user-defined types and third-party types.
+
+\section[Extending Rcpp::wrap]{Extending \texttt{Rcpp::wrap} }
+
+The \pkg{Rcpp::wrap} converter is extensible in essentially two ways : intrusive
+and non-intrusive.
+
+\subsection{Intrusive extension}
+
+When extending \pkg{Rcpp} with your own data type, the recommended way is to
+implement a conversion to \texttt{SEXP}. This lets \texttt{Rcpp::wrap} know
+about the new data type.  The template meta programming (or TMP) dispatch is able to
+recognize that a type is convertible to a \texttt{SEXP} and
+\texttt{Rcpp::wrap} will use that conversion.
+
+The caveat is that the type must be declared before the main header
+file \texttt{Rcpp.h} is included.
+
+<<lang=cpp>>=
+#include <RcppCommon.h>
+
+class Foo {
+    public:
+        Foo() ;
+
+        // this operator enables implicit Rcpp::wrap
+        operator SEXP() ;
+}
+
+#include <Rcpp.h>
+@
+
+This is called \emph{intrusive} because the conversion to \texttt{SEXP}
+operator has to be declared within the class.
+
+\subsection{Non-intrusive extension}
+
+It is often desirable to offer automatic conversion to third-party types, over
+which the developer has no control and can therefore not include a conversion
+to \texttt{SEXP} operator in the class definition.
+
+To provide automatic conversion from \proglang{C++} to \proglang{R}, one must
+declare a specialization of the \texttt{Rcpp::wrap} template between the
+includes of \texttt{RcppCommon.h} and \texttt{Rcpp.h}.
+
+<<lang=cpp>>=
+#include <RcppCommon.h>
+
+// third party library that declares class Bar
+#include <foobar.h>
+
+// declaring the specialization
+namespace Rcpp {
+    template <> SEXP wrap( const Bar& ) ;
+}
+
+// this must appear after the specialization,
+// otherwise the specialization will not be seen by Rcpp types
+#include <Rcpp.h>
+@
+
+It should be noted that only the declaration is required. The implementation
+can appear after the \texttt{Rcpp.h} file is included, and therefore take
+full advantage of the \pkg{Rcpp} type system.
+
+Another non-intrusive option is to expose an external pointer. The macro 
+\texttt{RCPP\_EXPORT\_WRAP} provides an easy way to expose a \proglang{C++} class 
+to \proglang{R} as an external pointer. It can be used instead of specializing
+\texttt{Rcpp::wrap}, and should not be used simultaneously. 
+
+<<lang=cpp>>=
+#include RcppCommon.h
+#include foobar.h
+
+RCPP_EXPORT_WRAP(Bar);
+@
+
+\subsection{Templates and partial specialization}
+
+It is perfectly valid to declare a partial specialization for the
+\texttt{Rcpp::wrap} template. The compiler will identify the appropriate
+overload:
+
+<<lang=cpp>>=
+#include <RcppCommon.h>
+
+// third party library that declares template class Bling<T>
+#include <foobar.h>
+
+// declaring the partial specialization
+namespace Rcpp {
+    namespace traits {
+
+        template <typename T> SEXP wrap( const Bling<T>& ) ;
+
+    }
+}
+
+// this must appear after the specialization,
+// otherwise the specialization will not be seen by Rcpp types
+#include <Rcpp.h>
+
+@
+
+
+\section[Extending Rcpp::as]{Extending \texttt{Rcpp::as}}
+
+Conversion from \proglang{R} to \proglang{C++} is also possible
+in both intrusive and non-intrusive ways.
+
+\subsection{Intrusive extension}
+
+As part of its template meta programming dispatch logic, \pkg{Rcpp::as}
+will attempt to use the constructor of the target class taking a \texttt{SEXP}.
+
+<<lang=cpp>>=
+#include <RcppCommon.h>
+
+class Foo{
+    public:
+        Foo() ;
+
+        // this constructor enables implicit Rcpp::as
+        Foo(SEXP) ;
+}
+
+
+// this must appear after the specialization,
+// otherwise the specialization will not be seen by Rcpp types
+#include <Rcpp.h>
+@
+
+\subsection{Non-intrusive extension}
+
+It is also possible to fully specialize \texttt{Rcpp::as} to enable
+non-intrusive implicit conversion capabilities.
+
+<<lang=cpp>>=
+#include <RcppCommon.h>
+
+// third party library that declares class Bar
+#include <foobar.h>
+
+// declaring the specialization
+namespace Rcpp {
+    template <> Bar as( SEXP ) ;
+}
+
+// this must appear after the specialization,
+// otherwise the specialization will not be seen by Rcpp types
+#include <Rcpp.h>
+@
+
+Furthermore, another non-intrusive option is to opt for sharing an R 
+external pointer. The macro \texttt{RCPP\_EXPORT\_AS} provides an easy way to
+extend \texttt{Rcpp::as} to expose \proglang{R} external pointers to 
+\proglang{C++}. It can be used instead of specializing \texttt{Rcpp::as}, and 
+should not be used simultaneously.
+
+<<lang=cpp>>=
+#include RcppCommon.h
+#include foobar.h
+
+RCPP_EXPORT_AS(Bar);
+@
+
+With this being said, there is one additional macro that can be used to 
+simultaneously define both \texttt{Rcpp::wrap} and \texttt{Rcpp::as}
+specialization for an external pointer. The macro \texttt{RCPP\_EXPOSED\_CLASS} 
+can be use to transparently exchange a class between \proglang{R} and 
+\proglang{C++} as an external pointer. Do not simultaneously use it alongside
+\texttt{RCPP\_EXPOSED\_AS}, \texttt{RCPP\_EXPOSED\_WRAP}, \texttt{Rcpp::wrap}, or
+\texttt{Rcpp::as}.
+
+
+\subsection{Templates and partial specialization}
+
+The signature of \texttt{Rcpp::as} does not allow partial specialization.
+When exposing a templated class to \texttt{Rcpp::as}, the programmer must
+specialize the \pkg{Rcpp::traits::Exporter} template class. The TMP dispatch
+will recognize that a specialization of \texttt{Exporter} is available
+and delegate the conversion to this class. \pkg{Rcpp} defines
+the \texttt{Rcpp::traits::Exporter} template class as follows :
+
+<<lang=cpp>>=
+namespace Rcpp {
+    namespace traits {
+
+        template <typename T> class Exporter{
+        public:
+            Exporter( SEXP x ) : t(x){}
+            inline T get(){ return t ; }
+
+        private:
+            T t ;
+        } ;
+    }
+}
+@
+
+This is the reason why the default behavior of \texttt{Rcpp::as} is to
+invoke the constructor of the type \texttt{T} taking a \texttt{SEXP}.
+
+Since partial specialization of class templates is allowed, we can expose
+a set of classes as follows:
+
+<<lang=cpp>>=
+#include <RcppCommon.h>
+
+// third party library that declares template class Bling<T>
+#include <foobar.h>
+
+// declaring the partial specialization
+namespace Rcpp {
+    namespace traits {
+        template <typename T> class Exporter< Bling<T> >;
+    }
+}
+
+// this must appear after the specialization,
+// otherwise the specialization will not be seen by Rcpp types
+#include <Rcpp.h>
+@
+
+Using this approach, the requirements for the \texttt{Exporter< Bling<T> >}
+class are:
+\begin{itemize}
+\item it should have a constructor taking a \texttt{SEXP}
+\item it should have a methods called \texttt{get} that returns an instance
+of the \texttt{Bling<T>} type.
+\end{itemize}
+
+<<echo=FALSE>>=
+unlink( "code.cpp" )
+@
+
+\section{Summary}
+
+The \pkg{Rcpp} package greatly facilitates the transfer of objects between
+\proglang{R} and \proglang{C++}. This note has shown how to extend \pkg{Rcpp}
+to either user-defined or third-party classes via the \texttt{Rcpp::as} and
+\texttt{Rcpp::wrap} template functions. Both intrusive and non-intrusive
+approaches were discussed.
+
+\bibliographystyle{plainnat}
+\bibliography{\Sexpr{Rcpp:::bib()}}
+
+\end{document}
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-package.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-package.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-package.R	(revision 2477)
@@ -0,0 +1,17 @@
+### R code from vignette source 'Rcpp-package.Rnw'
+
+###################################################
+### code chunk number 1: version
+###################################################
+prettyVersion <- packageDescription("Rcpp")$Version
+prettyDate <- format(Sys.Date(), "%B %e, %Y")
+require(Rcpp)
+require(highlight)
+
+
+###################################################
+### code chunk number 2: tree (eval = FALSE)
+###################################################
+## Rcpp.package.skeleton("mypackage")
+
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-attributes.Rnw
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-attributes.Rnw	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-attributes.Rnw	(revision 2477)
@@ -0,0 +1,829 @@
+% !Rnw driver = highlight::HighlightWeaveLatex()
+\documentclass[11pt]{article}
+%\VignetteIndexEntry{Rcpp-attributes}
+%\VignetteEngine{highlight::highlight}
+%\VignetteKeywords{Rcpp, attributes}
+%\VignetteDepends{Rcpp}
+
+\usepackage[USletter]{vmargin}
+\setmargrb{1.25in}{1.25in}{1.25in}{1.25in}
+
+
+\usepackage{textcomp}
+\usepackage{color, alltt}
+\usepackage[authoryear,round,longnamesfirst]{natbib}
+\usepackage[colorlinks]{hyperref}
+\definecolor{link}{rgb}{0,0,0.3}	%% next few lines courtesy of RJournal.sty
+\hypersetup{
+    colorlinks,%
+    citecolor=link,%
+    filecolor=link,%
+    linkcolor=link,%
+    urlcolor=link
+}
+
+\usepackage{microtype}                     %% cf http://www.khirevich.com/latex/microtype/
+\usepackage[T1]{fontenc}		   %% cf http://www.khirevich.com/latex/font/
+\usepackage[bitstream-charter]{mathdesign} %% cf http://www.khirevich.com/latex/font/
+
+\newcommand{\proglang}[1]{\textsf{#1}}
+\newcommand{\pkg}[1]{{\fontseries{b}\selectfont #1}}
+\newcommand{\code}[1]{\texttt{#1}}
+
+%% This corresponds to setting boxes=TRUE for highlight
+\newsavebox{\hlbox}
+\definecolor{hlBg}{rgb}{0.949019607843137,0.949019607843137,0.949019607843137}
+\definecolor{hlBd}{rgb}{0.9,0.9,0.9} % border
+\renewenvironment{Hchunk}{\vspace{0.5em}\noindent\begin{lrbox}{\hlbox}\begin{minipage}[b]{.98\linewidth}}%
+    {\end{minipage}\end{lrbox}\fcolorbox{hlBd}{hlBg}{\usebox{\hlbox}}\vspace{0.5em}}
+
+
+<<echo=FALSE,print=FALSE>>=
+prettyVersion <- packageDescription("Rcpp")$Version
+prettyDate <- format(Sys.Date(), "%B %e, %Y")
+@
+
+\author{J.J. Allaire \and Dirk Eddelbuettel \and Romain Fran\c{c}ois}
+\title{\pkg{Rcpp} Attributes}
+\date{\pkg{Rcpp} version \Sexpr{prettyVersion} as of \Sexpr{prettyDate}}
+
+\begin{document}
+\maketitle
+
+\abstract{
+  \noindent
+  \textsl{Rcpp attributes} provide a high-level syntax for declaring \proglang{C++}
+  functions as callable from \proglang{R} and automatically generating the code
+  required to invoke them. Attributes are intended to facilitate both interactive use
+  of \proglang{C++} within \proglang{R} sessions as well as to support \proglang{R}
+  package development. The implementation of attributes  is based on previous
+  work in the \pkg{inline} package \citep{CRAN:inline}.
+}
+
+
+\section{Introduction}
+
+Attributes are a new feature of \pkg{Rcpp} version 0.10.0 \citep{CRAN:Rcpp,JSS:Rcpp}
+that provide infrastructure for seamless language bindings between \proglang{R} and
+\proglang{C++}. The motivation for attributes is several-fold:
+
+\begin{enumerate}
+\item
+  Reduce the learning curve associated with using C++ and R together
+\item
+  Eliminate boilerplate conversion and marshaling code wherever
+  possible
+\item
+  Seamless use of C++ within interactive R sessions
+\item
+  Unified syntax for interactive work and package development
+\end{enumerate}
+
+The core concept is to add annotations to \proglang{C++} source
+files that provide the context required to automatically generate \proglang{R}
+bindings to \proglang{C++} functions. Attributes and their supporting
+functions include:
+
+\begin{itemize}
+\item
+  \texttt{Rcpp::export} attribute to export a \proglang{C++} function
+  to \proglang{R}
+\item
+  \texttt{sourceCpp} function to source exported functions from a file
+\item
+  \texttt{cppFunction} and \texttt{evalCpp} functions for inline
+  declarations and execution
+\item
+  \texttt{Rcpp::depends} attribute for specifying additional build
+  dependencies for \texttt{sourceCpp}
+\end{itemize}
+
+Attributes can also be used for package development via the
+\texttt{compileAttributes} function, which automatically generates
+\texttt{extern "C"} and \texttt{.Call} wrappers for \proglang{C++}
+functions within packages.
+
+\section{Using Attributes}
+
+Attributes are annotations that are added to C++ source files to provide
+additional information to the compiler. \pkg{Rcpp} supports attributes
+to indicate that C++ functions should be made available as R functions,
+as well as to optionally specify additional build dependencies for source files.
+
+\proglang{C++11} specifies a standard syntax for attributes
+\citep{Maurer+Wong:2008:AttributesInC++}. Since this standard isn't yet
+fully supported across all compilers, \pkg{Rcpp} attributes are included in
+source files using specially formatted comments.
+
+\subsection{Exporting C++ Functions}
+
+The \texttt{sourceCpp} function parses a \proglang{C++} file and looks for
+functions marked with the \texttt{Rcpp::export} attribute. A shared
+library is then built and its exported functions are made available as R
+functions in the specified environment. For example, this source file
+contains an implementation of convolve (note the \texttt{Rcpp::export}
+attribute in the comment above the function):
+
+<<lang=cpp>>=
+#include <Rcpp.h>
+using namespace Rcpp;
+
+// [[Rcpp::export]]
+NumericVector convolveCpp(NumericVector a, NumericVector b) {
+
+    int na = a.size(), nb = b.size();
+    int nab = na + nb - 1;
+    NumericVector xab(nab);
+
+    for (int i = 0; i < na; i++)
+        for (int j = 0; j < nb; j++)
+            xab[i + j] += a[i] * b[j];
+
+    return xab;
+}
+@ 
+
+The addition of the export attribute allows us to do this from the \proglang{R}
+prompt:
+
+<<eval=FALSE,lang=r>>=
+sourceCpp("convolve.cpp")
+convolveCpp(x, y)
+@ 
+
+We can now write \proglang{C++} functions using built-in \proglang{C++} types
+and \pkg{Rcpp} wrapper types and then source them just as we would an
+\proglang{R} script.
+
+The \texttt{sourceCpp} function performs caching based on the last
+modified date of the source file and it's local dependencies so as 
+long as the source does not change the compilation will occur only 
+once per R session.
+
+\subsection{Specifying Argument Defaults}
+
+If default argument values are provided in the C++ function definition
+then these defaults are also used for the exported R function. For example,
+the following C++ function:
+
+<<lang=cpp>>=
+DataFrame readData(
+    CharacterVector file,
+    CharacterVector colNames = CharacterVector::create(),
+    std::string comment = "#",
+    bool header = true)
+@ 
+
+Will be exported to R as:
+
+<<eval=FALSE,lang=r>>=
+function(file, colNames=character(), comment="#", header=TRUE)
+@ 
+
+Note that C++ rules for default arguments still apply: they must occur
+consecutively at the end of the function signature and (unlike R) can't rely
+on the values of other arguments.
+
+Not all \proglang{C++} default argument values can be parsed into their
+\proglang{R} equivalents, however the most common cases are supported, including:
+
+\begin{itemize}
+\item
+   String literals delimited by quotes (e.g. \texttt{"foo"})
+\item
+   Decimal numeric values (e.g. \texttt{10} or \texttt{4.5})
+\item
+   Pre-defined constants including \texttt{true}, \texttt{false},
+   \texttt{R\_NilValue}, \texttt{NA\_STRING}, \texttt{NA\_INTEGER},
+   \texttt{NA\_REAL}, and \texttt{NA\_LOGICAL}.
+\item
+   Selected vector types (\texttt{CharacterVector}, \texttt{IntegerVector},
+   and \texttt{NumericVector}) instantiated using the \texttt{::create}
+   static member function.
+\item
+  \texttt{Matrix} types instantiated using the \texttt{rows},
+  \texttt{cols} constructor.
+\end{itemize}
+
+\subsection{Signaling Errors}
+
+Within \proglang{R} code the \texttt{stop} function is typically used to signal
+errors. Within \proglang{R} extensions written in \proglang{C} the \texttt{Rf\_error} function is typically used. However, within \proglang{C++} code you cannot
+safely use \texttt{Rf\_error} because it results in a \texttt{longjmp} over
+any \proglang{C++} destructors on the stack.
+
+The correct way to signal errors within \proglang{C++} functions is to throw an \\\texttt{Rcpp::exception}. For example:
+
+<<lang=cpp>>=
+if (unexpectedCondition)
+    throw Rcpp::exception("Unexpected condition occurred");
+@ 
+
+There is also an \texttt{Rcpp::stop} function that is shorthand for throwing
+an \\\texttt{Rcpp::exception}. For example:
+
+<<lang=cpp>>=
+if (unexpectedCondition)
+    Rcpp::stop("Unexpected condition occurred");
+@ 
+
+In both cases the \proglang{C++} exception will be caught by \pkg{Rcpp}
+prior to returning control to \proglang{R} and converted into the correct
+signal to \proglang{R} that execution should stop with the specified message.
+
+You can similarly also signal warnings with the \texttt{Rcpp::warning}
+function:
+
+<<lang=cpp>>=
+if (unexpectedCondition)
+    Rcpp::warning("Unexpected condition occurred");
+@ 
+
+\subsection{Supporting User Interruption}
+
+If your function may run for an extended period of time, users will appreciate
+the ability to interrupt it's processing and return to the REPL. This is
+handled automatically for R code (as R checks for user interrupts periodically
+during processing) however requires explicit accounting for in C and C++ 
+extensions to R. To make computations interrupt-able, you should periodically
+call the \texttt{Rcpp::checkUserInterrupt} function, for example:
+
+<<lang=cpp>>=
+for (int i=0; i<1000000; i++) {
+    
+    // check for interrupt every 1000 iterations
+    if (i % 1000 == 0)
+        Rcpp::checkUserInterrupt();
+    
+    // ...do some expensive work...
+    
+}
+@ 
+
+A good guideline is to call \texttt{Rcpp::checkUserInterrupt} every 1 or 2
+seconds that your computation is running. In the above code, if the user
+requests an interrupt then an exception is thrown and the attributes wrapper
+code arranges for the user to be returned to the REPL.
+
+Note that R provides a \proglang{C} API for the same purpose 
+(\texttt{R\_CheckUserInterrupt}) however this API is not safe to use in 
+\proglang{C++} code as it uses \texttt{longjmp} to exit the current scope,
+bypassing any C++ destructors on the stack. The \texttt{Rcpp::checkUserInterrupt}
+function is provided as a safe alternative for \proglang{C++} code.
+
+\subsection{Embedding R Code}
+
+Typically \proglang{C++} and \proglang{R} code are kept in their own source
+files. However, it's often convenient to bundle code from both languages into
+a common source file that can be executed using single call to \texttt{sourceCpp}.
+
+To embed chunks of \proglang{R} code within a \proglang{C++}
+source file you include the \proglang{R} code within a block comment that
+has the prefix of \texttt{/*** R}. For example:
+
+<<lang=cpp>>=
+/*** R
+
+# Call the fibonacci function defined in C++
+fibonacci(10)
+
+*/
+@ 
+
+Multiple \proglang{R} code chunks can be included in a \proglang{C++} file. The
+\texttt{sourceCpp} function will first compile the \proglang{C++} code into a
+shared library and then source the embedded \proglang{R} code.
+
+\subsection{Modifying Function Names}
+
+You can change the name of an exported function as it appears to \proglang{R} by
+adding a name parameter to \texttt{Rcpp::export}. For example:
+
+<<lang=cpp>>=
+// [[Rcpp::export(name = ".convolveCpp")]]
+NumericVector convolveCpp(NumericVector a, NumericVector b)
+@ 
+
+Note that in this case since the specified name is prefaced by a \code{.} the
+exported R function will be hidden. You can also use this method to provide
+implementations of S3 methods (which wouldn't otherwise be possible because
+C++ functions can't contain a '.' in their name).
+
+\subsection{Function Requirements}
+
+Functions marked with the \texttt{Rcpp::export} attribute must meet several
+requirements to be correctly handled:
+
+\begin{itemize}
+\item
+   Be defined in the global namespace (i.e. not within a C++ namespace declaration)
+\item
+   Have a return type that is either void or compatible with \texttt{Rcpp::wrap}
+   and parameter types that are compatible with \texttt{Rcpp::as} (see sections
+   3.1 and 3.2 of the `\textsl{Rcpp-introduction}' vignette for more details).
+ \item
+   Use fully qualified type names for the return value and all parameters.
+   Rcpp types may however appear without a namespace qualifier (i.e.
+   \texttt{DataFrame} is okay as a type name but \texttt{std::string} must be
+   specified fully).
+\end{itemize}
+
+\subsection{Random Number Generation}
+
+\proglang{R} functions implemented in \proglang{C} or \proglang{C++} need
+to be careful to surround use of internal random number generation routines
+(e.g. \texttt{unif\_rand}) with calls to \texttt{GetRNGstate} and
+\texttt{PutRNGstate}.
+
+Within \pkg{Rcpp}, this is typically done using the \texttt{RNGScope} class.
+However, this is not necessary for \proglang{C++} functions exported using
+attributes because an \texttt{RNGScope} is established for them automatically.
+Note that \pkg{Rcpp} implements \texttt{RNGScope} using a counter, so it's
+still safe to execute code that may establish it's own \texttt{RNGScope} (such
+as the \pkg{Rcpp} sugar functions that deal with random number generation).
+
+The overhead associated with using \texttt{RNGScope} is negligible (only a 
+couple of milliseconds) and it provides a guarantee that all C++ code
+will inter-operate correctly with R's random number generation. If you are 
+certain that no C++ code will make use of random number generation and the 
+2ms of execution time is meaningful in your context, you can disable the
+automatic injection of \texttt{RNGScope} using the \texttt{rng} parameter
+of the \texttt{Rcpp::export} attribute. For example:
+
+<<lang=cpp>>=
+// [[Rcpp::export(rng = false)]]
+double myFunction(double input) {
+    // ...code that never uses R random number generation... 
+}
+@ 
+
+\subsection{Importing Dependencies}
+
+It's also possible to use the \texttt{Rcpp::depends} attribute to declare
+dependencies on other packages. For example:
+
+<<lang=cpp>>=
+// [[Rcpp::depends(RcppArmadillo)]]
+
+#include <RcppArmadillo.h>
+using namespace Rcpp;
+
+// [[Rcpp::export]]
+List fastLm(NumericVector yr, NumericMatrix Xr) {
+
+    int n = Xr.nrow(), k = Xr.ncol();
+
+    arma::mat X(Xr.begin(), n, k, false);
+    arma::colvec y(yr.begin(), yr.size(), false);
+
+    arma::colvec coef = arma::solve(X, y);
+    arma::colvec resid = y - X*coef;
+
+    double sig2 = arma::as_scalar(arma::trans(resid)*resid/(n-k));
+    arma::colvec stderrest = arma::sqrt(
+          sig2 * arma::diagvec( arma::inv(arma::trans(X)*X)) );
+
+    return List::create(Named("coefficients") = coef,
+                        Named("stderr")       = stderrest);
+}
+@ 
+
+The inclusion of the \texttt{Rcpp::depends} attribute causes \texttt{sourceCpp}
+to configure the build environment to correctly compile and link against the
+\pkg{RcppArmadillo} package. Source files can declare more than one dependency
+either by using multiple \texttt{Rcpp::depends} attributes or with syntax like this:
+
+<<lang=cpp>>=
+// [[Rcpp::depends(Matrix, RcppArmadillo)]]
+@ 
+
+Dependencies are discovered both by scanning for package include directories
+and by invoking \pkg{inline} plugins if they are available for a package.
+
+Note that while the \texttt{Rcpp::depends} attribute establishes dependencies
+for \texttt{sourceCpp}, it's important to note that if you include the same
+source file in an \proglang{R} package these dependencies must still be
+listed in the \texttt{Imports} and/or \texttt{LinkingTo} fields of the package
+\texttt{DESCRIPTION} file.
+
+\subsection{Sharing Code}
+
+The core use case for \texttt{sourceCpp} is the compilation of a single
+self-contained source file. Code within this file can import other C++ code
+by using the \texttt{Rcpp::depends} attribute as described above.
+
+The recommended practice for sharing C++ code across many uses of 
+\texttt{sourceCpp} is therefore to create an R package to wrap the C++
+code. This has many benefits not the least of which is easy distribution of
+shared code. More information on creating packages that contain C++ code
+is included in the Package Development section below.
+
+\subsubsection{Shared Code in Header Files}
+
+If you need to share a small amount of C++ code between source files 
+compiled with \texttt{sourceCpp} and the option of creating a package
+isn't practical, then you can also share code using local includes of C++
+header files. To do this, create a header file with the definition of 
+shared functions, classes, enums, etc. For example:
+
+<<lang=cpp>>=
+#ifndef __UTILITIES__
+#define __UTILITIES__
+
+inline double timesTwo(double x) {
+    return x * 2;
+}
+
+#endif // __UTILITIES__
+@ 
+
+Note the use of the \texttt{\#ifndef} include guard, this is import to ensure
+that code is not included more than once in a source file. You should 
+use an include guard and be sure to pick a unique name for the corresponding
+\texttt{\#define}. 
+
+Also note the use of the \code{inline} keyword preceding the function. This
+is important to ensure that there are not multiple definitions of
+functions included from header files. Classes fully defined in header files
+automatically have inline semantics so don't require this treatment.
+
+To use this code in a source file you'd just include
+it based on it's relative path (being sure to use \texttt{"} as the 
+delimiter to indicate a local file reference). For example:
+
+<<lang=cpp>>=
+#include "shared/utilities.hpp"
+
+// [[Rcpp::export]]
+double transformValue(double x) {
+    return timesTwo(x) * 10;
+}
+@ 
+
+\subsubsection{Shared Code in C++ Files}
+
+When scanning for locally included header files \code{sourceCpp} also checks
+for a corresponding implementation file and automatically includes it in the
+compilation if it exists.
+
+This enables you to break the shared code entirely into it's own source file.
+In terms of the above example, this would mean having only a function 
+declaration in the header:
+
+<<lang=cpp>>=
+#ifndef __UTILITIES__
+#define __UTILITIES__
+
+double timesTwo(double x);
+
+#endif // __UTILITIES__
+@ 
+
+Then actually defining the function in a separate source file with the 
+same base name as the header file but with a .cpp extension (in the above
+example this would be \code{utilities.cpp}):
+
+<<lang=cpp>>=
+#include "utilities.hpp"
+
+double timesTwo(double x) {
+    return x * 2;
+}
+@ 
+
+It's also possible to use attributes to declare dependencies and exported 
+functions within shared header and source files. This enables you to take
+a source file that is typically used standalone and include it when compiling
+another source file. 
+
+Note that since additional source files are processed as separate translation
+units the total compilation time will increase proportional to the number of
+files processed. From this standpoint it's often preferable to use shared 
+header files with definitions fully inlined as demonstrated above.
+
+Note also that embedded R code is only executed for the main source file not
+those referenced by local includes.
+
+\subsection{Including C++ Inline}
+
+Maintaining C++ code in it's own source file provides several benefits including
+the ability to use \proglang{C++} aware text-editing tools and straightforward
+mapping of compilation errors to lines in the source file. However, it's also
+possible to do inline declaration and execution of C++ code.
+
+There are several ways to accomplish this, including passing a code
+string to \texttt{sourceCpp} or using the shorter-form \texttt{cppFunction}
+or \texttt{evalCpp} functions. For example:
+
+<<eval=FALSE,lang=r>>=
+cppFunction('
+    int fibonacci(const int x) {
+        if (x < 2)
+            return x;
+        else
+            return (fibonacci(x - 1)) + fibonacci(x - 2);
+    }
+')
+
+evalCpp('std::numeric_limits<double>::max()')
+@ 
+
+You can also specify a depends parameter to \texttt{cppFunction} or \texttt{evalCpp}:
+
+<<eval=FALSE,lang=r>>=
+cppFunction(depends = 'RcppArmadillo', code = '...')
+@ 
+
+\section{Package Development}
+
+One of the goals of \pkg{Rcpp} attributes is to simultaneously facilitate
+ad-hoc and interactive work with \proglang{C++} while also making it very easy to
+migrate that work into an \proglang{R} package. There are several benefits of
+moving code from a standalone \proglang{C++} source file to a package:
+
+\begin{enumerate}
+\item
+  Your code can be made available to users without \proglang{C++} development
+  tools (at least on Windows or Mac OS X where binary packages are common)
+\item
+  Multiple source files and their dependencies are handled automatically
+  by the \proglang{R} package build system
+\item
+  Packages provide additional infrastructure for testing, documentation
+  and consistency
+\end{enumerate}
+
+\subsection{Package Creation}
+
+To create a package that is based on \pkg{Rcpp} you should follow the
+guidelines in the `\textsl{Rcpp-package}' vignette. For a new package this
+is most conveniently done using  the \texttt{Rcpp.package.skeleton} function.
+
+To generate a new package with a simple hello, world function that uses
+attributes you can do the following:
+
+<<eval=FALSE,lang=r>>=
+Rcpp.package.skeleton("NewPackage", attributes = TRUE)
+@ 
+
+To generate a package based on \proglang{C++} files that you've been using
+with \texttt{sourceCpp} you can use the \texttt{cpp\_files} parameter:
+
+<<eval=FALSE,lang=r>>=
+Rcpp.package.skeleton("NewPackage", example_code = FALSE,
+                      cpp_files = c("convolve.cpp"))
+@ 
+
+\subsection{Specifying Dependencies}
+
+Once you've migrated \proglang{C++} code into a package, the dependencies for
+source files are derived from the \texttt{Imports} and \texttt{LinkingTo} fields
+in the package \texttt{DESCRIPTION} file rather than the \texttt{Rcpp::depends}
+attribute. Some packages also require the addition of an entry to the package
+\texttt{NAMESPACE} file to ensure that the package's shared library is loaded
+prior to callers using the package. For every package you import C++ code from
+(including \pkg{Rcpp}) you need to add these entries.
+
+Packages that provide only C++ header files (and no shared library) need only
+be referred to using \texttt{LinkingTo}. You should consult the documentation
+for the package you are using for the requirements particular to that package.
+
+For example, if your package depends on \pkg{Rcpp} you'd have the following
+entries in the \texttt{DESCRIPTION} file:
+
+<<lang=bash>>=
+Imports: Rcpp (>= 0.11.4)
+LinkingTo: Rcpp
+@ 
+
+And the following entry in your \texttt{NAMESPACE} file:
+
+<<lang=bash>>=
+importFrom(Rcpp, evalCpp)
+@ 
+
+If your package additionally depended on the \pkg{BH} (Boost headers) package
+you'd just add an entry for \pkg{BH} to the \texttt{LinkingTo} field since
+\pkg{BH} is a header-only package:
+
+<<lang=bash>>=
+Imports: Rcpp (>= 0.11.4)
+LinkingTo: Rcpp, BH
+@ 
+
+
+\subsection{Exporting R Functions}
+
+Within interactive sessions you call the \texttt{sourceCpp} function
+on individual files to export \proglang{C++} functions into the global
+environment. However, for packages you call a single utility function to
+export all \proglang{C++} functions within the package.
+
+The \texttt{compileAttributes} function scans the source files within a package
+for export attributes and generates code as required. For example, executing
+this from within the package working directory:
+
+<<eval=FALSE,lang=r>>=
+compileAttributes()
+@ 
+
+Results in the generation of the following two source files:
+
+\begin{itemize}
+\item
+  \texttt{src/RcppExports.cpp} -- The \texttt{extern "C"} wrappers required
+  to call exported \proglang{C++} functions within the package.
+\item
+  \texttt{R/RcppExports.R} -- The \texttt{.Call} wrappers required to call
+  the \texttt{extern "C"} functions defined in \texttt{RcppExports.cpp}.
+\end{itemize}
+
+You should re-run \texttt{compileAttributes} whenever functions are added,
+removed, or have their signatures changed. Note that if you are using either
+RStudio or \pkg{devtools} to build your package then the 
+\texttt{compileAttributes} function is called automatically whenever your
+package is built.
+
+The \texttt{compileAttributes} function deals only with exporting
+\proglang{C++} functions to \proglang{R}. If you want the functions to
+additionally be publicly available from your package's namespace another
+step may be required. Specifically, if your package \texttt{NAMESPACE} file
+does not use a pattern to export functions then you should add an explicit
+entry to \texttt{NAMESPACE} for each R function you want publicly available.
+
+\subsection{Types in Generated Code}
+
+In some cases the signatures of the C++ functions that are generated within
+\texttt{RcppExports.cpp} may have additional type requirements beyond the core 
+standard library and \pkg{Rcpp} types (e.g. \texttt{CharacterVector},
+\texttt{NumericVector}, etc.). Examples might include convenience typedefs,
+as/wrap handlers for marshaling between custom types and SEXP, or types 
+wrapped by the Rcpp \texttt{XPtr} template.
+
+In this case, you can create a header file that contains these type definitions
+(either defined inline or by including other headers) and have this header
+file automatically included in \texttt{RcppExports.cpp}. Headers named with
+the convention \texttt{pkgname\_types} are automatically included along with
+the generated C++ code. For example, if your package is named \pkg{fastcode}
+then any of the following header files would be automatically included in
+\texttt{RcppExports.cpp}:
+
+<<lang=cpp>>=
+src/fastcode_types.h
+src/fastcode_types.hpp
+inst/include/fastcode_types.h
+inst/include/fastcode_types.hpp
+@
+
+There is one other mechanism for type visibility in \texttt{RcppExports.cpp}.
+If your package provides a master include file for consumption by C++ clients
+then this file will also be automatically included. For example, if the 
+\pkg{fastcode} package had a C++ API and the following header file:
+
+<<lang=cpp>>=
+inst/include/fastcode.h
+@
+
+This header file will also automatically be included in 
+\texttt{RcppExports.cpp}. Note that the convention of using \texttt{.h} for
+header files containing C++ code may seem unnatural, but this comes from the
+recommended practices described in `\textsl{Writing R Extensions}' 
+\citep{R:Extensions}.
+
+\subsection{Roxygen Comments}
+
+The \pkg{roxygen2} package \citep{CRAN:roxygen2} provides a facility for
+automatically generating \proglang{R} documentation files based on specially
+formatted comments in \proglang{R} source code.
+
+If you include roxygen comments in your \proglang{C++} source file with a
+\texttt{//\textquotesingle} prefix then \texttt{compileAttributes} will transpose them
+into R roxygen comments within \texttt{R/RcppExports.R}. For example the
+following code in a \proglang{C++} source file:
+
+<<lang=cpp>>=
+//' The length of a string (in characters).
+//'
+//' @param str input character vector
+//' @return characters in each element of the vector
+// [[Rcpp::export]]
+NumericVector strLength(CharacterVector str)
+@ 
+
+Results in the following code in the generated \proglang{R} source file:
+
+<<eval=FALSE,lang=r>>=
+#' The length of a string (in characters).
+#'
+#' @param str input character vector
+#' @return characters in each element of the vector
+strLength <- function(str)
+@ 
+
+\subsection{Providing a C++ Interface}
+
+The interface exposed from \proglang{R} packages is most typically a set of
+\proglang{R} functions. However, the \proglang{R} package system also provides
+a mechanism to allow the exporting of \proglang{C} and \proglang{C++}
+interfaces using package header files.  This is based on the
+\texttt{R\_RegisterCCallable} and \texttt{R\_GetCCallable} functions described in
+`\textsl{Writing R Extensions}' \citep{R:Extensions}.
+
+\proglang{C++} interfaces to a package are published within the
+top level \texttt{include} directory of the package (which within the package
+source directory is located at \texttt{inst/include}). The \proglang{R} build
+system automatically adds the required \texttt{include} directories for all
+packages specified in the \texttt{LinkingTo} field of the package
+\texttt{DESCRIPTION} file.
+
+\subsubsection{Interfaces Attribute}
+
+The \texttt{Rcpp::interfaces} attribute can be used to automatically
+generate a header-only interface to your \proglang{C++} functions
+within the \texttt{include} directory of your package.
+
+The \texttt{Rcpp::interfaces} attribute is specified on a per-source
+file basis, and indicates which interfaces (\proglang{R}, \proglang{C++},
+or both) should be provided for exported functions within the file.
+
+For example, the following specifies that both R and \proglang{C++} interfaces
+should be generated for a source file:
+
+<<lang=cpp>>=
+// [[Rcpp::interfaces(r, cpp)]]
+@ 
+
+Note that the default behavior if an \texttt{Rcpp::interfaces} attribute
+is not included in a source file is to generate an R interface only.
+
+\subsubsection{Generated Code}
+
+If you request a \texttt{cpp} interface for a source file then
+\texttt{compileAttributes} generates the following header files
+(substituting \emph{Package} with the name of the package code is being
+generated for):
+
+<<lang=bash>>=
+inst/include/Package.h
+inst/include/Package_RcppExports.h
+@ 
+
+The \texttt{Package\_RcppExports.h} file has inline definitions for all
+exported \proglang{C++} functions that enable calling them using the
+\texttt{R\_GetCCallable} mechanism.
+
+The \texttt{Package.h} file does nothing other than include the
+\texttt{Package\_RcppExports.h} header. This is done so
+that package authors can replace the \texttt{Package.h} header with
+a custom one and still be able to include the automatically generated exports
+(details on doing this are provided in the next section).
+
+The exported functions are defined within a \proglang{C++} namespace that matches
+the name of the package. For example, an exported \proglang{C++} function
+\texttt{bar} could be called from package \texttt{MyPackage} as follows:
+
+<<lang=cpp>>=
+// [[Rcpp::depends(MyPackage)]]
+
+#include <MyPackage.h>
+
+void foo() {
+    MyPackage::bar();
+}
+@ 
+
+\subsubsection{Including Additional Code}
+
+You might wish to use the \texttt{Rcpp::interfaces} attribute to generate
+a part of your package's \proglang{C++} interface but also provide
+additional custom \proglang{C++} code. In this case you
+should replace the generated \texttt{Package.h} file with one of your own.
+
+Note that the way \pkg{Rcpp} distinguishes user verses generated files is by checking
+for the presence a special token in the file (if it's present then it's known
+to be generated and thus safe to overwrite). You'll see this token at the top
+of the generated \texttt{Package.h} file, be sure to remove it if you want
+to provide a custom header.
+
+Once you've established a custom package header file, you need only include the
+\texttt{Package\_RcppExports.h} file within your header to make available
+the automatically generated code alongside your own.
+
+If you need to include code from your custom header files within the
+compilation of your package source files, you will also need to add the
+following entry to \texttt{Makevars} and \texttt{Makevars.win} (both are
+in the \texttt{src} directory of your package):
+
+<<lang=bash>>=
+PKG_CPPFLAGS += -I../inst/include/
+@ 
+
+Note that the R package build system does not automatically force a rebuild
+when headers in \texttt{inst/include} change, so you should be sure to perform a
+full rebuild of the package after making changes to these headers.
+
+\bibliographystyle{plainnat}
+\bibliography{\Sexpr{Rcpp:::bib()}}
+
+\end{document}
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-extending.pdf
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-extending.pdf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-attributes.pdf
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-attributes.pdf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-package.Rnw
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-package.Rnw	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-package.Rnw	(revision 2477)
@@ -0,0 +1,476 @@
+% !Rnw driver = highlight::HighlightWeaveLatex()
+\documentclass[10pt]{article}
+%\VignetteIndexEntry{Rcpp-package}
+%\VignetteEngine{highlight::highlight}
+%\VignetteKeywords{Rcpp, package}
+%\VignetteDepends{Rcpp}
+
+\usepackage[USletter]{vmargin}
+\setmargrb{0.75in}{0.75in}{0.75in}{0.75in}
+\usepackage{color,alltt}
+\usepackage[authoryear,round,longnamesfirst]{natbib}
+
+\usepackage[colorlinks]{hyperref}
+\definecolor{link}{rgb}{0,0,0.3}	%% next few lines courtesy of RJournal.sty
+\hypersetup{
+    colorlinks,%
+    citecolor=link,%
+    filecolor=link,%
+    linkcolor=link,%
+    urlcolor=link
+}
+
+\usepackage{microtype}                     %% cf http://www.khirevich.com/latex/microtype/
+\usepackage[T1]{fontenc}		   %% cf http://www.khirevich.com/latex/font/
+\usepackage[bitstream-charter]{mathdesign} %% cf http://www.khirevich.com/latex/font/
+
+\newcommand{\proglang}[1]{\textsf{#1}}
+\newcommand{\pkg}[1]{{\fontseries{b}\selectfont #1}}
+\newcommand{\code}[1]{\texttt{#1}}
+\newcommand{\rdoc}[2]{\href{http://www.rdocumentation.org/packages/#1/functions/#2}{\code{#2}}}
+
+%% This corresponds to setting boxes=TRUE for highlight
+\newsavebox{\hlbox}
+\definecolor{hlBg}{rgb}{0.949019607843137,0.949019607843137,0.949019607843137}
+\definecolor{hlBd}{rgb}{0.9,0.9,0.9} % border
+\renewenvironment{Hchunk}{\vspace{0.5em}\noindent\begin{lrbox}{\hlbox}\begin{minipage}[b]{.9\textwidth}}%
+    {\end{minipage}\end{lrbox}\fcolorbox{hlBd}{hlBg}{\usebox{\hlbox}}\vspace{0.5em}}
+
+<<version,echo=FALSE,print=FALSE>>=
+prettyVersion <- packageDescription("Rcpp")$Version
+prettyDate <- format(Sys.Date(), "%B %e, %Y")
+require(Rcpp)
+require(highlight)
+@
+
+\author{Dirk Eddelbuettel \and Romain Fran\c{c}ois}
+\title{Writing a package that uses \pkg{Rcpp} }
+\date{\pkg{Rcpp} version \Sexpr{prettyVersion} as of \Sexpr{prettyDate}}
+
+
+\begin{document}
+\maketitle
+
+\abstract{
+  \noindent This document provides a short overview of how to use
+  \pkg{Rcpp}~\citep{CRAN:Rcpp,JSS:Rcpp,Eddelbuettel:2013:Rcpp} when writing
+  an \proglang{R} package.  It shows how usage of the function
+  \rdoc{Rcpp}{Rcpp.package.skeleton} which creates a complete and
+  self-sufficient example package using \pkg{Rcpp}. All components of the
+  directory tree created by \rdoc{Rcpp}{Rcpp.package.skeleton} are discussed
+  in detail.  This document thereby complements the \textsl{Writing R
+    Extensions} manual~\citep{R:Extensions} which is the authoritative source
+  on how to extend \proglang{R} in general.  }
+
+\section{Introduction}
+
+\pkg{Rcpp}~\citep{CRAN:Rcpp,JSS:Rcpp,Eddelbuettel:2013:Rcpp} is an extension
+package for \proglang{R} which offers an easy-to-use yet featureful interface
+between \proglang{C++} and \proglang{R}.  However, it is somewhat different
+from a traditional \proglang{R} package because its key component is a
+\proglang{C++} library. A client package that wants to make use of the
+\pkg{Rcpp} features must link against the library provided by \pkg{Rcpp}.
+
+It should be noted that \proglang{R} has only limited support for
+\proglang{C(++)}-level dependencies between packages~\citep{R:Extensions}. The
+\texttt{LinkingTo} declaration in the package \texttt{DESCRIPTION} file
+allows the client package to retrieve the headers of the target package (here
+\pkg{Rcpp}), but support for linking against a library is not provided by
+\proglang{R} and has to be added manually.
+
+This document follows the steps of the \rdoc{Rcpp}{Rcpp.package.skeleton}
+function to illustrate a recommended way of using \pkg{Rcpp} from a client
+package. We illustrate this using a simple \proglang{C++} function
+which will be called by an \proglang{R} function.
+
+We strongly encourage the reader to become familiar with the material in the
+\textsl{Writing R Extensions} manual~\citep{R:Extensions}, as well as with other
+documents on \proglang{R} package creation such as \cite{Leisch:2008:Tutorial}. Given
+a basic understanding of how to create \proglang{R} package, the present
+document aims to provide the additional information on how to use \pkg{Rcpp}
+in such add-on packages.
+
+\section{Using \texttt{Rcpp.package.skeleton}}
+
+\subsection{Overview}
+
+\pkg{Rcpp} provides a function \rdoc{Rcpp}{Rcpp.package.skeleton}, modeled
+after the base \proglang{R} function \rdoc{utils}{package.skeleton}, which
+facilitates creation of a skeleton package using \pkg{Rcpp}.
+
+\rdoc{Rcpp}{Rcpp.package.skeleton} has a number of arguments documented on
+its help page (and similar to those of \rdoc{utils}{package.skeleton}). The
+main argument is the first one which provides the name of the package one
+aims to create by invoking the function.  An illustration of a call using an
+argument \texttt{mypackage} is provided below.
+
+<<tree,eval=FALSE>>=
+Rcpp.package.skeleton("mypackage")
+@
+\begin{Hchunk}
+\begin{verbatim}
+$ ls -1R mypackage/
+DESCRIPTION
+NAMESPACE
+R
+Read-and-delete-me
+man
+src
+
+mypackage/R:
+RcppExports.R
+
+mypackage/man:
+mypackage-package.Rd
+rcpp_hello_world.Rd
+
+mypackage/src:
+Makevars            ## up until Rcpp 0.10.6, see below
+Makevars.win        ## up until Rcpp 0.10.6, see below
+RcppExports.cpp
+rcpp_hello_world.cpp
+$
+\end{verbatim}
+\end{Hchunk}
+
+Using \rdoc{Rcpp}{Rcpp.package.skeleton} is by far the simplest approach
+as it fulfills two roles. It creates the complete set of files needed for a
+package, and it also includes the different components needed for using
+\pkg{Rcpp} that we discuss in the following sections.
+
+\subsection{\proglang{C++} code}
+
+If the \texttt{attributes} argument is set to
+\texttt{TRUE}\footnote{Setting \texttt{attributes} to \texttt{TRUE} is the default. This document
+does not cover the behavior of \texttt{Rcpp.package.skeleton} when \texttt{attributes} is set
+to \texttt{FALSE} as we try to encourage package developpers to use
+attributes. },
+the following \proglang{C++} file is included in the \texttt{src/} directory:
+
+<<lang=cpp>>=
+#include <Rcpp.h>
+using namespace Rcpp;
+
+// [[Rcpp::export]]
+List rcpp_hello_world() {
+
+    CharacterVector x = CharacterVector::create( "foo", "bar" )  ;
+    NumericVector y   = NumericVector::create( 0.0, 1.0 ) ;
+    List z            = List::create( x, y ) ;
+
+    return z ;
+}
+@
+
+The file defines the simple \texttt{rcpp\_hello\_world} function that
+uses a few \pkg{Rcpp} classes and returns a \texttt{List}.
+
+This function is preceded by the \texttt{Rcpp::export} attribute to automatically
+handle argument conversion because \proglang{R} has to be taught how to
+e.g. handle the \texttt{List} class.
+
+\rdoc{Rcpp}{Rcpp.package.skeleton} then invokes \rdoc{Rcpp}{compileAttributes}
+on the package, which generates the \texttt{RcppExports.cpp} file:
+
+<<lang=cpp>>=
+// Generated by using Rcpp::compileAttributes() -> do not edit by hand
+// Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
+
+#include <Rcpp.h>
+
+using namespace Rcpp;
+
+// rcpp_hello_world
+List rcpp_hello_world();
+RcppExport SEXP mypackage_rcpp_hello_world() {
+BEGIN_RCPP
+    Rcpp::RObject rcpp_result_gen;
+    Rcpp::RNGScope rcpp_rngScope_gen;
+    rcpp_result_gen = Rcpp::wrap(rcpp_hello_world());
+    return rcpp_result_gen;
+END_RCPP
+}
+@
+
+This file defines a function with the appropriate calling convention, suitable for
+\rdoc{base}{.Call}. It needs to be regenerated each time functions
+exposed by attributes are modified. This is the task of the
+\rdoc{Rcpp}{compileAttributes} function. A discussion on attributes is
+beyond the scope of this document and more information is available
+in the attributes vignette \citep{CRAN:Rcpp:Attributes}.
+
+\subsection{\proglang{R} code}
+
+The \rdoc{Rcpp}{compileAttributes} also generates \proglang{R} code
+that uses the \proglang{C++} function.
+
+<<lang=cpp>>=
+# Generated by using Rcpp::compileAttributes() -> do not edit by hand
+# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
+
+rcpp_hello_world <- function() {
+    .Call('mypackage_rcpp_hello_world', PACKAGE = 'mypackage')
+}
+@
+
+This is also a generated file so it should not be modified manually, rather
+regenerated as needed by \rdoc{Rcpp}{compileAttributes}.
+
+\subsection{\texttt{DESCRIPTION}}
+
+The skeleton generates an appropriate \texttt{DESCRIPTION} file, using
+both \texttt{Imports:} and \texttt{LinkingTo} for \pkg{Rcpp}:
+
+\begin{Hchunk}
+\begin{verbatim}
+Package: mypackage
+Type: Package
+Title: What the package does (short line)
+Version: 1.0
+Date: 2013-09-17
+Author: Who wrote it
+Maintainer: Who to complain to <yourfault@somewhere.net>
+Description: More about what it does (maybe more than one line)
+License: What Licence is it under ?
+Imports: Rcpp (>= 0.11.0)
+LinkingTo: Rcpp
+\end{verbatim}
+\end{Hchunk}
+
+\rdoc{Rcpp}{Rcpp.package.skeleton} adds the three last lines to the
+\texttt{DESCRIPTION} file generated by \rdoc{utils}{package.skeleton}.
+
+The \texttt{Imports} declaration indicates \proglang{R}-level dependency
+between the client package and \pkg{Rcpp}; code from the latter is being
+imported into the package described here. The \texttt{LinkingTo} declaration
+indicates that the client package needs to use header files exposed by
+\pkg{Rcpp}.
+
+\subsection{Now optional: \texttt{Makevars} and \texttt{Makevars.win}}
+
+This behaviour changed with \pkg{Rcpp} release 0.11.0. These files used to be
+mandatory, now they are merely optional. 
+
+We will describe the old setting first as it was in use for a few years. The
+new standard, however, is much easier and is described below.
+
+\subsubsection{Releases up until 0.10.6}
+
+Unfortunately, the \texttt{LinkingTo} declaration in itself was not
+enough to link to the user \proglang{C++} library of \pkg{Rcpp}. Until more
+explicit support for libraries is added to \proglang{R}, ones needes to manually
+add the \pkg{Rcpp} library to the \texttt{PKG\_LIBS} variable in the
+\texttt{Makevars} and \texttt{Makevars.win} files. (This has now changed with
+release 0.11.0; see below).
+\pkg{Rcpp} provides the unexported function \texttt{Rcpp:::LdFlags()} to ease the process:
+
+\begin{Hchunk}
+\begin{verbatim}
+## Use the R_HOME indirection to support installations of multiple R version
+PKG_LIBS = `$(R_HOME)/bin/Rscript -e "Rcpp:::LdFlags()"`
+
+## As an alternative, one can also add this code in a file 'configure'
+##
+##    PKG_LIBS=`${R_HOME}/bin/Rscript -e "Rcpp:::LdFlags()"`
+##
+##    sed -e "s|@PKG_LIBS@|${PKG_LIBS}|" \
+##        src/Makevars.in > src/Makevars
+##
+## which together with the following file 'src/Makevars.in'
+##
+##    PKG_LIBS = @PKG_LIBS@
+##
+## can be used to create src/Makevars dynamically. This scheme is more
+## powerful and can be expanded to also check for and link with other
+## libraries.  It should be complemented by a file 'cleanup'
+##
+##    rm src/Makevars
+##
+## which removes the autogenerated file src/Makevars.
+##
+## Of course, autoconf can also be used to write configure files. This is
+## done by a number of packages, but recommended only for more advanced users
+## comfortable with autoconf and its related tools.
+\end{verbatim}
+\end{Hchunk}
+
+
+The \texttt{Makevars.win} is the equivalent, targeting windows.
+
+\begin{Hchunk}
+\begin{verbatim}
+## Use the R_HOME indirection to support installations of multiple R version
+PKG_LIBS = $(shell "${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" -e "Rcpp:::LdFlags()")
+\end{verbatim}
+\end{Hchunk}
+
+\subsubsection{Releases since 0.11.0}
+
+As of release 0.11.0, this is no longer needed as client packages obtain the
+required code from \pkg{Rcpp} via explicit function registration. The user
+does not have to do anything.  
+
+This means that \code{PKG\_LIBS} can now be empty---unless some client
+libraries are needed.  For example, \pkg{RcppCNPy} needs compression support
+and hence uses \code{PKG\_LIBS= -lz}. Similarly, when a third-party library is
+required, it can and should be set here.
+
+\subsection{\texttt{NAMESPACE}}
+
+The \rdoc{Rcpp}{Rcpp.package.skeleton} function also creates a file
+\texttt{NAMESPACE}.
+
+\begin{Hchunk}
+\begin{verbatim}
+useDynLib(mypackage)
+exportPattern("^[[:alpha:]]+")
+importFrom(Rcpp, evalCpp)
+\end{verbatim}
+\end{Hchunk}
+
+This file serves three purposes. First, it ensure that the dynamic library
+contained in the package we are creating via
+\rdoc{Rcpp}{Rcpp.package.skeleton} will be loaded and thereby made
+available to the newly created \proglang{R} package. 
+
+Second, it declares which functions should be globally visible from the
+namespace of this package. As a reasonable default, we export all functions.
+
+Third, it instructs R to import a symbol from \pkg{Rcpp}. This sets up the
+import of all registered function and, together with the \code{Imports:}
+statement in \code{DESCRIPTION}, provides what is needed for client packages
+to access \pkg{Rcpp} functionality.
+
+\subsection{Help files}
+
+Also created is a directory \texttt{man} containing two help files. One is
+for the package itself, the other for the (single) \proglang{R} function
+being provided and exported.
+
+The \textsl{Writing R Extensions} manual~\citep{R:Extensions} provides the complete
+documentation on how to create suitable content for help files.
+
+\subsubsection{\texttt{mypackage-package.Rd}}
+
+The help file \texttt{mypackage-package.Rd} can be used to describe
+the new package.
+
+\begin{Hchunk}
+\begin{verbatim}
+\name{mypackage-package}
+\alias{mypackage-package}
+\alias{mypackage}
+\docType{package}
+\title{
+What the package does (short line)
+}
+\description{
+More about what it does (maybe more than one line)
+~~ A concise (1-5 lines) description of the package ~~
+}
+\details{
+\tabular{ll}{
+Package: \tab mypackage\cr
+Type: \tab Package\cr
+Version: \tab 1.0\cr
+Date: \tab 2013-09-17\cr
+License: \tab What license is it under?\cr
+}
+~~ An overview of how to use the package, including the most important functions ~~
+}
+\author{
+Who wrote it
+
+Maintainer: Who to complain to <yourfault@somewhere.net>
+}
+\references{
+~~ Literature or other references for background information ~~
+}
+~~ Optionally other standard keywords, one per line, from file KEYWORDS in the R documentation directory ~~
+\keyword{ package }
+\seealso{
+~~ Optional links to other man pages, e.g. ~~
+~~ \code{\link[<pkg>:<pkg>-package]{<pkg>}} ~~
+}
+\examples{
+%% ~~ simple examples of the most important functions ~~
+}
+\end{verbatim}
+\end{Hchunk}
+
+\subsubsection{\texttt{rcpp\_hello\_world.Rd}}
+
+The help file \texttt{rcpp\_hello\_world.Rd} serves as documentation for the
+example \proglang{R} function.
+
+\begin{Hchunk}
+\begin{verbatim}
+\name{rcpp_hello_world}
+\alias{rcpp_hello_world}
+\docType{package}
+\title{
+Simple function using Rcpp
+}
+\description{
+Simple function using Rcpp
+}
+\usage{
+rcpp_hello_world()
+}
+\examples{
+\dontrun{
+rcpp_hello_world()
+}
+}
+\end{verbatim}
+\end{Hchunk}
+
+\section{Using modules}
+
+This document does not cover the use of the \texttt{module} argument
+of \rdoc{Rcpp}{Rcpp.package.skeleton}. It is covered
+in the modules vignette \citep{CRAN:Rcpp:Modules}.
+
+\section{Further examples}
+
+The canonical example of a package that uses \pkg{Rcpp} is the
+\pkg{RcppExamples} \citep{CRAN:RcppExamples} package. \pkg{RcppExamples}
+contains various examples of using \pkg{Rcpp}. Hence, the \pkg{RcppExamples}
+package is provided as a template for employing \pkg{Rcpp} in packages.
+
+Other CRAN packages using the \pkg{Rcpp} package are \pkg{RcppArmadillo}
+\citep{CRAN:RcppArmadillo},
+and \pkg{minqa} \citep{CRAN:minqa}. Several other packages follow older (but still supported
+and appropriate) instructions. They can serve examples on how to get data to
+and from \proglang{C++} routines, but should not be considered templates for
+how to connect to \pkg{Rcpp}. The full list of packages using \pkg{Rcpp} can
+be found at the \href{http://CRAN.R-project.org/package=Rcpp}{CRAN page} of
+\pkg{Rcpp}.
+
+\section{Other compilers}
+
+Less experienced \proglang{R} users on the Windows platform frequently ask
+about using \pkg{Rcpp} with the Visual Studio toolchain.  That is simply not
+possible as \proglang{R} is built with the \pkg{gcc} compiler. Different
+compilers have different linking conventions. These conventions are
+particularly hairy when it comes to using \proglang{C++}.  In short, it is
+not possible to simply drop sources (or header files) from \pkg{Rcpp} into a
+\proglang{C++} project built with Visual Studio, and this note makes no
+attempt at claiming otherwise.
+
+\pkg{Rcpp} is fully usable on Windows provided the standard Windows
+toolchain for \proglang{R} is used. See the \textsl{Writing R Extensions}
+manual~\citep{R:Extensions} for details.
+
+\section{Summary}
+
+This document described how to use the \pkg{Rcpp} package for \proglang{R}
+and \proglang{C++} integration when writing an \proglang{R} extension
+package. The use of the \rdoc{Rcpp}{Rcpp.package.skeleton} was shown in
+detail, and references to further examples were provided.
+
+\bibliographystyle{plainnat}
+\bibliography{\Sexpr{Rcpp:::bib()}}
+
+\end{document}
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-unitTests.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-unitTests.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-unitTests.R	(revision 2477)
@@ -0,0 +1,56 @@
+### R code from vignette source 'Rcpp-unitTests.Rnw'
+
+###################################################
+### code chunk number 1: Rcpp-unitTests.Rnw:14-18
+###################################################
+require(Rcpp)
+prettyVersion <- packageDescription("Rcpp")$Version
+prettyDate <- format(Sys.Date(), "%B %e, %Y")
+library(RUnit)
+
+
+###################################################
+### code chunk number 2: unitTesting
+###################################################
+pkg <- "Rcpp"
+
+if( Sys.getenv( "TRAVIS" ) == "true" ){
+  writeLines( "not running any tests as part of checking the vignette when doing continuous integration with travis" )
+} else {  
+  
+  ## Check the environemnt variable to see if all tests should be run
+  if (Sys.getenv("RunAllRcppTests") != "yes") {
+      writeLines("The environment variable 'RunAllRcppTests' was not set to 'yes', so skipping some tests.")
+  }
+  
+  if (file.exists("unitTests-results")) unlink("unitTests-results", recursive = TRUE)
+  dir.create("unitTests-results")
+  path <- system.file("unitTests", package=pkg)
+  testSuite <- defineTestSuite(name=paste(pkg, "unit testing"), dirs=path)
+  tests <- runTestSuite(testSuite)
+  err <- getErrors(tests)
+  if (err$nFail > 0) stop(sprintf("unit test problems: %d failures", err$nFail))
+  if (err$nErr > 0) stop( sprintf("unit test problems: %d errors", err$nErr))
+  printHTMLProtocol(tests, fileName=sprintf("unitTests-results/%s-unitTests.html", pkg))
+  printTextProtocol(tests, fileName=sprintf("unitTests-results/%s-unitTests.txt" , pkg))
+  
+  #if (file.exists("/tmp")) {
+  #    invisible(sapply(c("txt", "html"), function(ext) {
+  #        fname <- sprintf("unitTests-results/%s-unitTests.%s", pkg, ext)
+  #        file.copy(fname, "/tmp", overwrite=TRUE)
+  #    }))
+  #}
+}
+
+
+###################################################
+### code chunk number 3: importResults
+###################################################
+results <- "unitTests-results/Rcpp-unitTests.txt"
+if (file.exists(results)) {
+    writeLines(readLines(results))
+} else{
+    writeLines("Unit test results not available")
+}
+
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-package.pdf
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/doc/Rcpp-package.pdf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/convolve3_cpp.cpp
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/convolve3_cpp.cpp	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/convolve3_cpp.cpp	(revision 2477)
@@ -0,0 +1,24 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+
+// This is a rewrite of the 'Writing R Extensions' section 5.10.1 example
+
+#include <Rcpp.h>
+
+RcppExport SEXP convolve3cpp(SEXP a, SEXP b){
+    Rcpp::NumericVector xa(a);
+    Rcpp::NumericVector xb(b);
+    int n_xa = xa.size() ;
+    int n_xb = xb.size() ;
+    int nab = n_xa + n_xb - 1;
+    Rcpp::NumericVector xab(nab);
+
+    for (int i = 0; i < n_xa; i++)
+        for (int j = 0; j < n_xb; j++)
+            xab[i + j] += xa[i] * xb[j];
+
+    return xab ;
+}
+
+#include "loopmacro.h"
+LOOPMACRO_CPP(convolve3cpp)
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/convolve4_cpp.cpp
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/convolve4_cpp.cpp	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/convolve4_cpp.cpp	(revision 2477)
@@ -0,0 +1,29 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+
+// This is a rewrite of the 'Writing R Extensions' section 5.10.1 example
+
+#include <Rcpp.h>
+
+RcppExport SEXP convolve4cpp(SEXP a, SEXP b) {
+    Rcpp::NumericVector xa(a);
+    Rcpp::NumericVector xb(b);
+    int n_xa = xa.size() ;
+    int n_xb = xb.size() ;
+    int nab = n_xa + n_xb - 1;
+    Rcpp::NumericVector xab(nab,0.0);
+
+    double* pa = xa.begin() ;
+    double* pb = xb.begin() ;
+    double* pab = xab.begin() ;
+    int i,j=0;
+    for (i = 0; i < n_xa; i++)
+	for (j = 0; j < n_xb; j++)
+	    pab[i + j] += pa[i] * pb[j];
+
+    return xab ;
+}
+
+#include "loopmacro.h"
+LOOPMACRO_CPP(convolve4cpp)
+
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/convolve5_cpp.cpp
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/convolve5_cpp.cpp	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/convolve5_cpp.cpp	(revision 2477)
@@ -0,0 +1,23 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+
+// This is a rewrite of the 'Writing R Extensions' section 5.10.1 example
+
+#include <Rcpp.h>
+using namespace Rcpp ;
+
+
+RcppExport SEXP convolve5cpp(SEXP a, SEXP b) {
+    NumericVector xa(a); int n_xa = xa.size() ;
+    NumericVector xb(b); int n_xb = xb.size() ;
+    NumericVector xab(n_xa + n_xb - 1,0.0);
+
+    Range r( 0, n_xb-1 );
+    for(int i=0; i<n_xa; i++, r++){
+    	xab[ r ] += xa[i] * xb ;
+    }
+    return xab ;
+}
+
+#include "loopmacro.h"
+LOOPMACRO_CPP(convolve5cpp)
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/convolve7_c.c
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/convolve7_c.c	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/convolve7_c.c	(revision 2477)
@@ -0,0 +1,28 @@
+
+// This is from 'Writing R Extensions' section 5.10.1 
+// BUT slowed down by using REAL() on each access which proves to be rather costly
+
+#include <R.h>
+#include <Rdefines.h>
+
+SEXP convolve7(SEXP a, SEXP b)
+{
+    int i, j, na, nb, nab;
+    SEXP ab;
+
+    PROTECT(a = AS_NUMERIC(a));
+    PROTECT(b = AS_NUMERIC(b));
+    na = LENGTH(a); nb = LENGTH(b); nab = na + nb - 1;
+    PROTECT(ab = NEW_NUMERIC(nab));
+    for(i = 0; i < nab; i++) REAL(ab)[i] = 0.0;
+    for(i = 0; i < na; i++)
+    	for(j = 0; j < nb; j++) REAL(ab)[i + j] += REAL(a)[i] * REAL(b)[j];
+    UNPROTECT(3);
+    return(ab);
+
+}
+
+
+#include "loopmacro.h"
+LOOPMACRO_C(convolve7)
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/overhead.sh
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/overhead.sh	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/overhead.sh	(revision 2477)
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+rm -f *.o *.so
+
+# build the shared library for the C variant
+R CMD SHLIB overhead_2.c
+
+# build the shared library for the C++ variant
+# we have to let R know where the Rcpp header and library are
+export PKG_CPPFLAGS=`Rscript -e "Rcpp:::CxxFlags()"`
+export PKG_LIBS=`Rscript -e "Rcpp:::LdFlags()"`
+R CMD SHLIB overhead_1.cpp
+
+# call R so that we get an interactive session
+Rscript overhead.r
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/convolve8_cpp.cpp
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/convolve8_cpp.cpp	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/convolve8_cpp.cpp	(revision 2477)
@@ -0,0 +1,43 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+
+// this version is between the Rcpp_New_ptr and the Rcpp_New_std version
+//                          test elapsed  relative user.self sys.self
+// 5    Rcpp_New_ptr(REPS, a, b)   0.214  1.000000     0.213    0.001
+// 7  Rcpp_New_std_2(REPS, a, b)   0.223  1.042056     0.216    0.006
+// 4    Rcpp_New_std(REPS, a, b)   0.524  2.448598     0.523    0.001
+//
+// so there is some overhead due to creating Vec objects and indexing them
+// but much less than when we index the NumericVector
+
+#include <Rcpp.h>
+
+class Vec {
+public:
+    Vec( double* data_ ) : data(data_){}
+    inline double& operator[]( int i){ return data[i] ; }
+
+private:
+    double* data ;
+} ;
+
+
+RcppExport SEXP convolve8cpp(SEXP a, SEXP b){
+    Rcpp::NumericVector xa(a);
+    Rcpp::NumericVector xb(b);
+    int n_xa = xa.size() ;
+    int n_xb = xb.size() ;
+    int nab = n_xa + n_xb - 1;
+    Rcpp::NumericVector xab(nab);
+
+    Vec vab(xab.begin()), va(xa.begin()), vb(xb.begin()) ;
+
+    for (int i = 0; i < n_xa; i++)
+        for (int j = 0; j < n_xb; j++)
+            vab[i + j] += va[i] * vb[j];
+
+    return xab ;
+}
+
+#include "loopmacro.h"
+LOOPMACRO_CPP(convolve8cpp)
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/convolve9_cpp.cpp
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/convolve9_cpp.cpp	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/convolve9_cpp.cpp	(revision 2477)
@@ -0,0 +1,61 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+
+// this version expands convolve8_cpp by making Vec mimic the structure of
+// NumericVector. It peforms well, so this is is not the structure of
+// NumericVector that is the problem. So what is it then ?
+//
+// could it be because NumericVector is in a different library than
+// this code, so that operator[] is not inlined ?
+//
+// clues:
+// - http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/ka3538.html
+
+#include <Rcpp.h>
+
+class Cache{
+public:
+    typedef double& proxy ;
+    typedef double* iterator ;
+
+    Cache( iterator data_) : data(data_){}
+
+    inline proxy ref(int i){ return data[i] ; }
+    inline proxy ref(int i) const { return data[i] ; }
+
+private:
+    iterator data ;
+} ;
+
+class Vec {
+public:
+    typedef double& proxy ;
+
+    Vec( double* data_ ) : cache(data_){}
+    inline proxy operator[]( int i){ return cache.ref(i) ; }
+    inline proxy operator[]( int i) const { return cache.ref(i) ; }
+
+private:
+    Cache cache ;
+} ;
+
+
+RcppExport SEXP convolve9cpp(SEXP a, SEXP b){
+    Rcpp::NumericVector xa(a);
+    Rcpp::NumericVector xb(b);
+    int n_xa = xa.size() ;
+    int n_xb = xb.size() ;
+    int nab = n_xa + n_xb - 1;
+    Rcpp::NumericVector xab(nab);
+
+    Vec vab(xab.begin()), va(xa.begin()), vb(xb.begin()) ;
+
+    for (int i = 0; i < n_xa; i++)
+        for (int j = 0; j < n_xb; j++)
+            vab[i + j] += va[i] * vb[j];
+
+    return xab ;
+}
+
+#include "loopmacro.h"
+LOOPMACRO_CPP(convolve9cpp)
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/exampleRCode.r
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/exampleRCode.r	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/exampleRCode.r	(revision 2477)
@@ -0,0 +1,107 @@
+#!/usr/bin/env r
+
+suppressMessages(require(Rcpp))
+set.seed(42)
+n <- 200
+a <- rnorm(n)
+b <- rnorm(n)
+
+## load shared libraries with wrapper code
+dyn.load("convolve2_c.so")
+dyn.load("convolve3_cpp.so")
+dyn.load("convolve4_cpp.so")
+dyn.load("convolve5_cpp.so")
+dyn.load("convolve7_c.so")
+
+dyn.load("convolve8_cpp.so")
+dyn.load("convolve9_cpp.so")
+dyn.load("convolve10_cpp.so")
+dyn.load("convolve11_cpp.so")
+dyn.load("convolve12_cpp.so" )
+dyn.load("convolve14_cpp.so" )
+
+## now run each one once for comparison of results,
+## and define test functions
+
+R_API_optimised <- function(n,a,b) .Call("convolve2__loop", n, a, b)
+Rcpp_New_std <- function(n,a,b) .Call("convolve3cpp__loop", n, a, b)
+#Rcpp_New_std_inside <- function(n,a,b) .Call("convolve3cpp__loop", n, a, b, PACKAGE = "Rcpp" )
+Rcpp_New_ptr <- function(n,a,b) .Call("convolve4cpp__loop", n, a, b)
+Rcpp_New_sugar <- function(n,a,b) .Call("convolve5cpp__loop", n, a, b)
+Rcpp_New_sugar_noNA <- function(n,a,b) .Call("convolve11cpp__loop", n, a, b)
+R_API_naive <- function(n,a,b) .Call("convolve7__loop", n, a, b)
+Rcpp_New_std_2 <- function(n,a,b) .Call("convolve8cpp__loop", n, a, b)
+#Rcpp_New_std_3 <- function(n,a,b) .Call("convolve9cpp__loop", n, a, b)
+#Rcpp_New_std_4 <- function(n,a,b) .Call("convolve10cpp__loop", n, a, b)
+Rcpp_New_std_it <- function(n,a,b) .Call("convolve12cpp__loop", n, a, b )
+Rcpp_New_std_Fast <- function(n,a,b) .Call("convolve14cpp__loop", n, a, b )
+
+
+v1 <- R_API_optimised(1L, a, b )
+v3 <- Rcpp_New_std(1L, a, b)
+v4 <- Rcpp_New_ptr(1L, a, b)
+v5 <- Rcpp_New_sugar(1L, a, b )
+v7 <- R_API_naive(1L, a, b)
+v11 <- Rcpp_New_sugar_noNA(1L, a, b)
+
+stopifnot(all.equal(v1, v3))
+stopifnot(all.equal(v1, v4))
+stopifnot(all.equal(v1, v5))
+stopifnot(all.equal(v1, v7))
+stopifnot(all.equal(v1, v11))
+
+## load benchmarkin helper function
+suppressMessages(library(rbenchmark))
+REPS <- 5000L
+bm <- benchmark(R_API_optimised(REPS,a,b),
+                R_API_naive(REPS,a,b),
+                Rcpp_New_std(REPS,a,b),
+#                Rcpp_New_std_inside(REPS,a,b),
+                Rcpp_New_ptr(REPS,a,b),
+                Rcpp_New_sugar(REPS,a,b),
+                Rcpp_New_sugar_noNA(REPS,a,b),
+                Rcpp_New_std_2(REPS,a,b),
+#                Rcpp_New_std_3(REPS,a,b),
+#                Rcpp_New_std_4(REPS,a,b),
+		Rcpp_New_std_it(REPS,a,b),
+		Rcpp_New_std_Fast(REPS,a,b),
+                columns=c("test", "elapsed", "relative", "user.self", "sys.self"),
+                order="relative",
+                replications=1)
+print(bm)
+
+cat("All results are equal\n") # as we didn't get stopped
+q("no")
+
+
+sizes <- 1:10*100
+REPS <- 5000L
+timings <- lapply( sizes, function(size){
+    cat( "size = ", size, "..." )
+    a <- rnorm(size); b <- rnorm(size)
+    bm <- benchmark(R_API_optimised(REPS,a,b),
+                R_API_naive(REPS,a,b),
+                Rcpp_New_std(REPS,a,b),
+                Rcpp_New_ptr(REPS,a,b),
+                Rcpp_New_sugar(REPS,a,b),
+                Rcpp_New_sugar_noNA(REPS,a,b),
+                columns=c("test", "elapsed", "relative", "user.self", "sys.self"),
+                order="relative",
+                replications=1)
+
+     cat( "  done\n" )
+     bm
+} )
+for( i in seq_along(sizes)){
+    timings[[i]]$size <- sizes[i]
+}
+timings <- do.call( rbind, timings )
+
+require( lattice )
+png( "elapsed.png", width = 800, height = 600 )
+xyplot( elapsed ~ size, groups = test, data = timings, auto.key = TRUE, type = "l", lwd = 2 )
+dev.off()
+png( "relative.png", width = 800, height = 600 )
+xyplot( relative ~ size, groups = test, data = timings, auto.key = TRUE, type = "l", lwd = 2 )
+dev.off()
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/convolve10_cpp.cpp
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/convolve10_cpp.cpp	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/convolve10_cpp.cpp	(revision 2477)
@@ -0,0 +1,36 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+
+// this version expands convolve8_cpp by making Vec mimic the structure of
+// NumericVector. It peforms well, so this is is not the structure of
+// NumericVector that is the problem. So what is it then ?
+//
+// could it be because NumericVector is in a different library than
+// this code, so that operator[] is not inlined ?
+//
+// clues:
+// - http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/ka3538.html
+
+#include <Rcpp.h>
+
+#include "convolve10_cpp.h"
+
+RcppExport SEXP convolve10cpp(SEXP a, SEXP b){
+    Rcpp::NumericVector xa(a);
+    Rcpp::NumericVector xb(b);
+    int n_xa = xa.size() ;
+    int n_xb = xb.size() ;
+    int nab = n_xa + n_xb - 1;
+    Rcpp::NumericVector xab(nab);
+
+    Vec vab(xab.begin()), va(xa.begin()), vb(xb.begin()) ;
+
+    for (int i = 0; i < n_xa; i++)
+        for (int j = 0; j < n_xb; j++)
+            vab[i + j] += va[i] * vb[j];
+
+    return xab ;
+}
+
+#include "loopmacro.h"
+LOOPMACRO_CPP(convolve10cpp)
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/buildAndRun.sh
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/buildAndRun.sh	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/buildAndRun.sh	(revision 2477)
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+rm -f *.o *.so
+
+# build the shared library for the C variant
+R CMD SHLIB convolve2_c.c
+R CMD SHLIB convolve7_c.c
+
+# build the shared library for the C++ variant
+# we have to let R know where the Rcpp header and library are
+export PKG_CPPFLAGS=`Rscript -e "Rcpp:::CxxFlags()"`
+export PKG_LIBS=`Rscript -e "Rcpp:::LdFlags()"`
+R CMD SHLIB convolve3_cpp.cpp
+R CMD SHLIB convolve4_cpp.cpp
+R CMD SHLIB convolve5_cpp.cpp
+R CMD SHLIB convolve8_cpp.cpp
+R CMD SHLIB convolve9_cpp.cpp
+R CMD SHLIB convolve10_cpp.cpp
+R CMD SHLIB convolve11_cpp.cpp
+R CMD SHLIB convolve12_cpp.cpp
+R CMD SHLIB convolve14_cpp.cpp
+
+# call R so that we get an interactive session
+Rscript exampleRCode.r
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/convolve11_cpp.cpp
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/convolve11_cpp.cpp	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/convolve11_cpp.cpp	(revision 2477)
@@ -0,0 +1,24 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+
+// This version uses nona to indicate that xb does not contain any missing
+// value. This is the assumption that all other versions do.
+
+#include <Rcpp.h>
+using namespace Rcpp ;
+
+
+RcppExport SEXP convolve11cpp(SEXP a, SEXP b) {
+    NumericVector xa(a); int n_xa = xa.size() ;
+    NumericVector xb(b); int n_xb = xb.size() ;
+    NumericVector xab(n_xa + n_xb - 1,0.0);
+
+    Range r( 0, n_xb-1 );
+    for(int i=0; i<n_xa; i++, r++){
+    	xab[ r ] += noNA(xa[i]) * noNA(xb) ;
+    }
+    return xab ;
+}
+
+#include "loopmacro.h"
+LOOPMACRO_CPP(convolve11cpp)
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/loopmacro.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/loopmacro.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/loopmacro.h	(revision 2477)
@@ -0,0 +1,13 @@
+
+#define LOOPMACRO_C(name)                   \
+SEXP name##__loop(SEXP n_, SEXP a, SEXP b){ \
+    int n = INTEGER(n_)[0] ;                \
+    SEXP res  = R_NilValue ;                \
+    for( int i=0; i<n; i++){                \
+       res = name( a, b ) ;                 \
+    }                                       \
+    return res ;                            \
+}
+
+#define LOOPMACRO_CPP(name) RcppExport LOOPMACRO_C(name)
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/convolve12_cpp.cpp
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/convolve12_cpp.cpp	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/convolve12_cpp.cpp	(revision 2477)
@@ -0,0 +1,24 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+
+// This is a rewrite of the 'Writing R Extensions' section 5.10.1 example
+
+#include <Rcpp.h>
+
+RcppExport SEXP convolve12cpp(SEXP a, SEXP b){
+    Rcpp::NumericVector xa(a), xb(b);
+    int n_xa = xa.size(), n_xb = xb.size();
+    Rcpp::NumericVector xab(n_xa + n_xb - 1);
+
+    typedef Rcpp::NumericVector::iterator vec_iterator ;
+    vec_iterator ia = xa.begin(), ib = xb.begin();
+    vec_iterator iab = xab.begin();
+    for (int i = 0; i < n_xa; i++)
+        for (int j = 0; j < n_xb; j++)
+            iab[i + j] += ia[i] * ib[j];
+
+    return xab;
+}
+
+#include "loopmacro.h"
+LOOPMACRO_CPP(convolve12cpp)
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/convolve13_cpp.cpp
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/convolve13_cpp.cpp	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/convolve13_cpp.cpp	(revision 2477)
@@ -0,0 +1,27 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+
+// This is a rewrite of the 'Writing R Extensions' section 5.10.1 example
+
+#include <Rcpp.h>
+
+template <typename T>
+T convolve( const T& a, const T& b ){
+    int na = a.size() ; int nb = b.size() ;
+    T out(na + nb - 1);
+    typename T::iterator iter_a(a.begin()), iter_b(b.begin()), iter_ab( out.begin() ) ;
+
+    for (int i = 0; i < na; i++)
+        for (int j = 0; j < nb; j++)
+            iter_ab[i + j] += iter_a[i] * iter_b[j];
+
+    return out ;
+}
+
+
+RcppExport SEXP convolve13cpp(SEXP a, SEXP b){
+    return convolve( Rcpp::NumericVector(a), Rcpp::NumericVector(b) ) ;
+}
+
+#include "loopmacro.h"
+LOOPMACRO_CPP(convolve13cpp)
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/convolve14_cpp.cpp
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/convolve14_cpp.cpp	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/convolve14_cpp.cpp	(revision 2477)
@@ -0,0 +1,25 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+
+// This is a rewrite of the 'Writing R Extensions' section 5.10.1 example
+
+#include <Rcpp.h>
+
+using namespace Rcpp ;
+RcppExport SEXP convolve14cpp(SEXP a, SEXP b){
+    NumericVector xa(a), xb(b);
+    int n_xa = xa.size() ;
+    int n_xb = xb.size() ;
+    int nab = n_xa + n_xb - 1;
+    NumericVector xab(nab);
+    Fast<NumericVector> fa(xa), fb(xb), fab(xab) ;
+
+    for (int i = 0; i < n_xa; i++)
+        for (int j = 0; j < n_xb; j++)
+            fab[i + j] += fa[i] * fb[j];
+
+    return xab ;
+}
+
+#include "loopmacro.h"
+LOOPMACRO_CPP(convolve14cpp)
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/convolve10_cpp.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/convolve10_cpp.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/convolve10_cpp.h	(revision 2477)
@@ -0,0 +1,27 @@
+
+class Cache{
+public:
+    typedef double& proxy ;
+    typedef double* iterator ;
+
+    Cache( iterator data_) : data(data_){}
+
+    inline proxy ref(int i){ return data[i] ; }
+    inline proxy ref(int i) const { return data[i] ; }
+
+private:
+    iterator data ;
+} ;
+
+class Vec {
+public:
+    typedef double& proxy ;
+
+    Vec( double* data_ ) : cache(data_){}
+    inline proxy operator[]( int i){ return cache.ref(i) ; }
+    inline proxy operator[]( int i) const { return cache.ref(i) ; }
+
+private:
+    Cache cache ;
+} ;
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/GNUmakefile
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/GNUmakefile	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/GNUmakefile	(revision 2477)
@@ -0,0 +1,29 @@
+
+## comment this out if you need a different version of R, 
+## and set set R_HOME accordingly as an environment variable
+R_HOME := 		$(shell R RHOME)
+
+## include headers and libraries for R 
+RCPPFLAGS := 		$(shell $(R_HOME)/bin/R CMD config --cppflags)
+RLDFLAGS := 		$(shell $(R_HOME)/bin/R CMD config --ldflags)
+
+## include headers and libraries for Rcpp interface classes
+RCPPINCL := 		$(shell echo 'Rcpp:::CxxFlags()' | $(R_HOME)/bin/R --vanilla --slave)
+RCPPLIBS := 		$(shell echo 'Rcpp:::LdFlags()'  | $(R_HOME)/bin/R --vanilla --slave)
+
+c_sources := 		$(wildcard *.c)
+c_sharedlibs := 	$(patsubst %.c,%.o,$(c_sources))
+
+cpp_sources := 		$(wildcard *.cpp)
+cpp_sharedlibs := 	$(patsubst %.cpp,%.o,$(cpp_sources))
+
+all :			$(c_sharedlibs) $(cpp_sharedlibs)
+
+%.o : 			%.c
+			R CMD SHLIB $<
+
+%.o : 			%.cpp
+			PKG_CPPFLAGS="$(RCPPFLAGS) $(RCPPINCL)" PKG_LIBS="$(RLDFLAGS) $(RCPPLIBS)" R CMD SHLIB $<
+
+run :			$(c_sharedlibs) $(cpp_sharedlibs)
+			Rscript exampleRCode.r
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/overhead.r
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/overhead.r	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/overhead.r	(revision 2477)
@@ -0,0 +1,24 @@
+#!/usr/bin/env r
+
+set.seed(42)
+a <- rnorm(100)
+b <- rnorm(100)
+
+## load shared libraries with wrapper code
+dyn.load("overhead_1.so")
+dyn.load("overhead_2.so")
+
+overhead_c_symbol <- getNativeSymbolInfo( "overhead_c" )
+overhead_cpp_symbol <- getNativeSymbolInfo( "overhead_cpp" )
+
+overhead_c <- function(a,b) .Call( overhead_c_symbol, a, b )
+overhead_cpp <- function(a,b) .Call( overhead_cpp_symbol, a, b )
+
+## load benchmarkin helper function
+suppressMessages(library(rbenchmark))
+
+res <- benchmark(overhead_cpp(a,b), overhead_c(a,b),
+                 columns=c("test", "replications", "elapsed", "relative", "user.self", "sys.self"),
+                 order="relative",
+                 replications=10000)
+print(res)
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/overhead_1.cpp
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/overhead_1.cpp	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/overhead_1.cpp	(revision 2477)
@@ -0,0 +1,21 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+
+// This is a rewrite of the 'Writing R Extensions' section 5.10.1 example
+
+#include <Rcpp.h>
+// using namespace Rcpp ;
+
+SEXP overhead_cpp(SEXP a, SEXP b) {
+    return R_NilValue ;
+}
+
+extern "C" void R_init_overhead_1(DllInfo *info){
+
+     R_CallMethodDef callMethods[]  = {
+       {"overhead_cpp", (DL_FUNC) &overhead_cpp, 2},
+       {NULL, NULL, 0}
+     };
+
+     R_registerRoutines(info, NULL, callMethods, NULL, NULL);
+}
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/overhead_2.c
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/overhead_2.c	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/overhead_2.c	(revision 2477)
@@ -0,0 +1,21 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+
+// This is a rewrite of the 'Writing R Extensions' section 5.10.1 example
+#include <R.h>
+#include <Rdefines.h>
+#include <R_ext/Rdynload.h>
+
+SEXP overhead_c(SEXP a, SEXP b) {
+    return R_NilValue ;
+}
+
+void R_init_overhead_2(DllInfo *info){
+
+     R_CallMethodDef callMethods[]  = {
+       {"overhead_c", (DL_FUNC) &overhead_c, 2},
+       {NULL, NULL, 0}
+     };
+
+     R_registerRoutines(info, NULL, callMethods, NULL, NULL);
+}
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/convolve2_c.c
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/convolve2_c.c	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/ConvolveBenchmarks/convolve2_c.c	(revision 2477)
@@ -0,0 +1,28 @@
+
+/* This is from 'Writing R Extensions' section 5.10.1 */
+
+#include <R.h>
+#include <Rdefines.h>
+
+SEXP convolve2(SEXP a, SEXP b)
+{
+    int i, j, na, nb, nab;
+    double *xa, *xb, *xab;
+    SEXP ab;
+
+    PROTECT(a = AS_NUMERIC(a));
+    PROTECT(b = AS_NUMERIC(b));
+    na = LENGTH(a); nb = LENGTH(b); nab = na + nb - 1;
+    PROTECT(ab = NEW_NUMERIC(nab));
+    xa = NUMERIC_POINTER(a); xb = NUMERIC_POINTER(b);
+    xab = NUMERIC_POINTER(ab);
+    for(i = 0; i < nab; i++) xab[i] = 0.0;
+    for(i = 0; i < na; i++)
+	for(j = 0; j < nb; j++) xab[i + j] += xa[i] * xb[j];
+    UNPROTECT(3);
+    return(ab);
+}
+
+#include "loopmacro.h"
+LOOPMACRO_C(convolve2)
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/Misc/piBySimulation.r
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/Misc/piBySimulation.r	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/Misc/piBySimulation.r	(revision 2477)
@@ -0,0 +1,28 @@
+#!/usr/bin/env r
+
+library(Rcpp)
+library(rbenchmark)
+
+piR <- function(N) {
+    x <- runif(N)
+    y <- runif(N)
+    d <- sqrt(x^2 + y^2)
+    return(4 * sum(d < 1.0) / N)
+}
+
+sourceCpp("piSugar.cpp")
+
+N <- 1e6
+
+set.seed(42)
+resR <- piR(N)
+
+set.seed(42)
+resCpp <- piSugar(N)
+
+## important: check results are identical with RNG seeded
+stopifnot(identical(resR, resCpp))
+
+res <- benchmark(piR(N), piSugar(N), order="relative")
+
+print(res[,1:4])
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/Misc/ifelseLooped.r
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/Misc/ifelseLooped.r	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/Misc/ifelseLooped.r	(revision 2477)
@@ -0,0 +1,101 @@
+#!/usr/bin/env r
+##
+## This example goes back to the following StackOverflow questions:
+##   http://stackoverflow.com/questions/7153586/can-i-vectorize-a-calculation-which-depends-on-previous-elements
+## and provides a nice example of how to accelerate path-dependent
+## loops which are harder to vectorise.  It lead to the following blog
+## post:
+##   http://dirk.eddelbuettel.com/blog/2011/08/23#rcpp_for_path_dependent_loops
+##
+## Thanks to Josh Ulrich for provided a first nice (R-based) answer on
+## StackOverflow and for also catching a small oversight in my posted answer.
+##
+## Dirk Eddelbuettel, 23 Aug 2011
+##
+## Copyrighted but of course GPL'ed
+
+
+library(inline)
+library(rbenchmark)
+library(compiler)
+
+fun1 <- function(z) {
+  for(i in 2:NROW(z)) {
+    z[i] <- ifelse(z[i-1]==1, 1, 0)
+  }
+  z
+}
+fun1c <- cmpfun(fun1)
+
+
+fun2 <- function(z) {
+  for(i in 2:NROW(z)) {
+    z[i] <- if(z[i-1]==1) 1 else 0
+  }
+  z
+}
+fun2c <- cmpfun(fun2)
+
+
+funRcpp <- cxxfunction(signature(zs="numeric"), plugin="Rcpp", body="
+  Rcpp::NumericVector z = Rcpp::NumericVector(zs);
+  int n = z.size();
+  for (int i=1; i<n; i++) {
+    z[i] = (z[i-1]==1.0 ? 1.0 : 0.0);
+  }
+  return(z);
+")
+
+
+z <- rep(c(1,1,0,0,0,0), 100)
+## test all others against fun1 and make sure all are identical
+all(sapply(list(fun2(z),fun1c(z),fun2c(z),funRcpp(z)), identical, fun1(z)))
+
+res <- benchmark(fun1(z), fun2(z),
+                 fun1c(z), fun2c(z),
+                 funRcpp(z),
+                 columns=c("test", "replications", "elapsed", "relative", "user.self", "sys.self"),
+                 order="relative",
+                 replications=1000)
+print(res)
+
+z <- c(1,1,0,0,0,0)
+res2 <- benchmark(fun1(z), fun2(z),
+                 fun1c(z), fun2c(z),
+                 funRcpp(z),
+                 columns=c("test", "replications", "elapsed", "relative", "user.self", "sys.self"),
+                 order="relative",
+                 replications=10000)
+print(res2)
+
+
+if (FALSE) {                            # quick test to see if Int vectors are faster: appears not
+    funRcppI <- cxxfunction(signature(zs="integer"), plugin="Rcpp", body="
+        Rcpp::IntegerVector z = Rcpp::IntegerVector(zs);
+        int n = z.size();
+        for (int i=1; i<n; i++) {
+            z[i] = (z[i-1]==1.0 ? 1.0 : 0.0);
+        }
+        return(z);
+    ")
+
+    z <- rep(c(1L,1L,0L,0L,0L,0L), 100)
+    identical(fun1(z),fun2(z),fun1c(z),fun2c(z),funRcppI(z))
+
+    res3 <- benchmark(fun1(z), fun2(z),
+                      fun1c(z), fun2c(z),
+                      funRcppI(z),
+                      columns=c("test", "replications", "elapsed", "relative", "user.self", "sys.self"),
+                      order="relative",
+                      replications=1000)
+    print(res3)
+
+    z <- c(1L,1L,0L,0L,0L,0L)
+    res4 <- benchmark(fun1(z), fun2(z),
+                      fun1c(z), fun2c(z),
+                      funRcppI(z),
+                      columns=c("test", "replications", "elapsed", "relative", "user.self", "sys.self"),
+                      order="relative",
+                      replications=10000)
+    print(res4)
+}
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/Misc/newFib.r
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/Misc/newFib.r	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/Misc/newFib.r	(revision 2477)
@@ -0,0 +1,32 @@
+#!/usr/bin/env r
+
+## New and shorter version of Fibonacci example using Rcpp 0.9.16 or later features
+## The the sibbling file 'fibonacci.r' for context
+
+require(Rcpp)                           # no longer need inline
+
+## R version
+fibR <- function(seq) {
+    if (seq < 2) return(seq)
+    return (fibR(seq - 1) + fibR(seq - 2))
+}
+
+## C++ code
+cpptxt <- '
+int fibonacci(const int x) {
+   if (x < 2) return(x);
+   return (fibonacci(x - 1)) + fibonacci(x - 2);
+}'
+
+## C++ version
+fibCpp <- cppFunction(cpptxt)           # compiles, load, links, ...
+
+## load rbenchmark to compare
+library(rbenchmark)
+
+N <- 35     ## same parameter as original post
+res <- benchmark(fibR(N), fibCpp(N),
+                 columns=c("test", "replications", "elapsed", "relative"),
+                 order="relative", replications=1)
+print(res)  ## show result
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/Misc/piSugar.cpp
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/Misc/piSugar.cpp	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/Misc/piSugar.cpp	(revision 2477)
@@ -0,0 +1,13 @@
+
+#include <Rcpp.h>
+
+using namespace Rcpp;
+
+// [[Rcpp::export]]
+double piSugar(const int N) {
+  RNGScope scope;		// ensure RNG gets set/reset
+  NumericVector x = runif(N);
+  NumericVector y = runif(N);
+  NumericVector d = sqrt(x*x + y*y);
+  return 4.0 * sum(d < 1.0) / N;
+}
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/Misc/fibonacci.r
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/Misc/fibonacci.r	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/Misc/fibonacci.r	(revision 2477)
@@ -0,0 +1,46 @@
+#!/usr/bin/env r
+
+## this short example was provided in response to this StackOverflow questions:
+## http://stackoverflow.com/questions/6807068/why-is-my-recursive-function-so-slow-in-r
+## and illustrates that recursive function calls are a) really expensive in R and b) not
+## all expensive in C++ (my machine sees a 700-fold speed increase) and c) the byte
+## compiler in R does not help here.
+
+suppressMessages(library(Rcpp))
+
+## byte compiler
+require(compiler)
+
+## A C++ version compile with cppFunction
+fibRcpp <- cppFunction( '
+int fibonacci(const int x) {
+   if (x == 0) return(0);
+   if (x == 1) return(1);
+   return (fibonacci(x - 1)) + fibonacci(x - 2);
+}
+' )
+
+
+## for comparison, the original (but repaired with 0/1 offsets)
+fibR <- function(seq) {
+    if (seq == 0) return(0);
+    if (seq == 1) return(1);
+    return (fibR(seq - 1) + fibR(seq - 2));
+}
+
+## also use byte-compiled R function
+fibRC <- cmpfun(fibR)
+
+## load rbenchmark to compare
+library(rbenchmark)
+
+N <- 35     ## same parameter as original post
+res <- benchmark(fibR(N),
+                 fibRC(N),
+                 fibRcpp(N),
+                 columns=c("test", "replications", "elapsed",
+                           "relative", "user.self", "sys.self"),
+                 order="relative",
+                 replications=1)
+print(res)  ## show result
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/RcppGibbs/timeRNGs.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/RcppGibbs/timeRNGs.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/RcppGibbs/timeRNGs.R	(revision 2477)
@@ -0,0 +1,169 @@
+
+suppressMessages(library(Rcpp))
+suppressMessages(library(inline))
+suppressMessages(library(rbenchmark))
+
+## NOTE: This is the old way to compile Rcpp code inline.
+## The code here has left as a historical artifact and tribute to the old way.
+## Please use the code under the "new" inline compilation section.
+
+rcppGamma_old <- cxxfunction(signature(xs="numeric"), plugin="Rcpp", body='
+  NumericVector x(xs);
+  int n   = x.size();
+
+  // Initialize Random number generator
+  RNGScope scope;
+
+  const double y = 1.234;
+  for (int i=0; i<n; i++) {
+    x[i] = ::Rf_rgamma(3.0, 1.0/(y*y+4));
+  }
+
+  // Return to R
+  return x;
+')
+
+
+gslGamma_old <- cxxfunction(signature(xs="numeric"), plugin="RcppGSL",
+                        include='#include <gsl/gsl_rng.h>
+                                 #include <gsl/gsl_randist.h>',
+                        body='
+  NumericVector x(xs);
+  int n   = x.size();
+
+  gsl_rng *r = gsl_rng_alloc(gsl_rng_mt19937);
+  const double y = 1.234;
+  for (int i=0; i<n; i++) {
+    x[i] = gsl_ran_gamma(r,3.0,1.0/(y*y+4));
+  }
+  gsl_rng_free(r);
+
+  // Return to R
+  return x;
+')
+
+
+rcppNormal_old <- cxxfunction(signature(xs="numeric"), plugin="Rcpp", body='
+  NumericVector x(xs);
+  int n   = x.size();
+
+  // Initialize Random number generator
+  RNGScope scope;
+
+  const double y = 1.234;
+  for (int i=0; i<n; i++) {
+    x[i] = ::Rf_rnorm(1.0/(y+1),1.0/sqrt(2*y+2));
+  }
+
+  // Return to R
+  return x;
+')
+
+
+gslNormal_old <- cxxfunction(signature(xs="numeric"), plugin="RcppGSL",
+                        include='#include <gsl/gsl_rng.h>
+                                 #include <gsl/gsl_randist.h>',
+                        body='
+  NumericVector x(xs);
+  int n   = x.size();
+
+  gsl_rng *r = gsl_rng_alloc(gsl_rng_mt19937);
+  const double y = 1.234;
+  for (int i=0; i<n; i++) {
+    x[i] = 1.0/(y+1)+gsl_ran_gaussian(r,1.0/sqrt(2*y+2));
+  }
+  gsl_rng_free(r);
+
+  // Return to R
+  return x;
+')
+
+
+## NOTE: Within this section, the new way to compile Rcpp code inline has been
+## written. Please use the code next as a template for your own project.
+
+cppFunction('
+NumericVector rcppGamma(NumericVector x){
+    int n   = x.size();
+    
+    const double y = 1.234;
+    for (int i=0; i<n; i++) {
+        x[i] = R::rgamma(3.0, 1.0/(y*y+4));
+    }
+    
+    // Return to R
+    return x;
+}')
+
+## This approach is a bit sloppy. Generally, you will want to use 
+## sourceCpp() if there are additional includes that are required.
+cppFunction('
+NumericVector gslGamma(NumericVector x){
+    int n   = x.size();
+    
+    gsl_rng *r = gsl_rng_alloc(gsl_rng_mt19937);
+    const double y = 1.234;
+    for (int i=0; i<n; i++) {
+        x[i] = gsl_ran_gamma(r,3.0,1.0/(y*y+4));
+    }
+    gsl_rng_free(r);
+    
+    // Return to R
+    return x;
+}', includes = '#include <gsl/gsl_rng.h>
+                #include <gsl/gsl_randist.h>',
+    depends = "RcppGSL")
+
+
+cppFunction('
+NumericVector rcppNormal(NumericVector x){
+    int n   = x.size();
+    
+    const double y = 1.234;
+    for (int i=0; i<n; i++) {
+        x[i] = R::rnorm(1.0/(y+1),1.0/sqrt(2*y+2));
+    }
+    
+    // Return to R
+    return x;
+}')
+
+
+## Here we demonstrate the use of sourceCpp() to show the continuity 
+## of the code artifact.
+
+sourceCpp(code = '
+#include <RcppGSL.h>
+#include <gsl/gsl_rng.h>
+#include <gsl/gsl_randist.h>
+
+using namespace Rcpp;
+
+// [[Rcpp::depends("RcppGSL")]]
+
+// [[Rcpp::export]]
+NumericVector gslNormal(NumericVector x){
+    int n   = x.size();
+    
+    gsl_rng *r = gsl_rng_alloc(gsl_rng_mt19937);
+    const double y = 1.234;
+    for (int i=0; i<n; i++) {
+        x[i] = 1.0/(y+1)+gsl_ran_gaussian(r,1.0/sqrt(2*y+2));
+    }
+    gsl_rng_free(r);
+    
+    // Return to R
+    return x;
+}')
+
+x <- rep(NA, 1e6)
+res <- benchmark(rcppGamma(x),
+                 gslGamma(x),
+                 rcppNormal(x),
+                 gslNormal(x),
+                 columns=c("test", "replications", "elapsed", "relative", "user.self", "sys.self"),
+                 order="relative",
+                 replications=20)
+print(res)
+
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/RcppGibbs/RcppGibbs.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/RcppGibbs/RcppGibbs.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/RcppGibbs/RcppGibbs.R	(revision 2477)
@@ -0,0 +1,293 @@
+## Simple Gibbs Sampler Example
+## Adapted from Darren Wilkinson's post at
+## http://darrenjw.wordpress.com/2010/04/28/mcmc-programming-in-r-python-java-and-c/
+##
+## Sanjog Misra and Dirk Eddelbuettel, June-July 2011
+
+suppressMessages(library(Rcpp))
+suppressMessages(library(inline))
+suppressMessages(library(compiler))
+suppressMessages(library(rbenchmark))
+
+
+## Actual joint density -- the code which follow implements
+## a Gibbs sampler to draw from the following joint density f(x,y)
+fun <- function(x,y) {
+    x*x * exp(-x*y*y - y*y + 2*y - 4*x)
+}
+
+## Note that the full conditionals are propotional to
+## f(x|y) = (x^2)*exp(-x*(4+y*y))              : a Gamma density kernel
+## f(y|x) = exp(-0.5*2*(x+1)*(y^2 - 2*y/(x+1)) : Normal Kernel
+
+## There is a small typo in Darrens code.
+## The full conditional for the normal has the wrong variance
+## It should be 1/sqrt(2*(x+1)) not 1/sqrt(1+x)
+## This we can verify ...
+## The actual conditional (say for x=3) can be computed as follows
+## First - Construct the Unnormalized Conditional
+fy.unnorm <- function(y) fun(3,y)
+
+## Then - Find the appropriate Normalizing Constant
+K <- integrate(fy.unnorm,-Inf,Inf)
+
+## Finally - Construct Actual Conditional
+fy <- function(y) fy.unnorm(y)/K$val
+
+## Now - The corresponding Normal should be
+fy.dnorm <- function(y) {
+    x <- 3
+    dnorm(y,1/(1+x),sqrt(1/(2*(1+x))))
+}
+
+## and not ...
+fy.dnorm.wrong <- function(y) {
+    x <- 3
+    dnorm(y,1/(1+x),sqrt(1/((1+x))))
+}
+
+if (interactive()) {
+    ## Graphical check
+    ## Actual (gray thick line)
+    curve(fy,-2,2,col='grey',lwd=5)
+
+    ## Correct Normal conditional (blue dotted line)
+    curve(fy.dnorm,-2,2,col='blue',add=T,lty=3)
+
+    ## Wrong Normal (Red line)
+    curve(fy.dnorm.wrong,-2,2,col='red',add=T)
+}
+
+## Here is the actual Gibbs Sampler
+## This is Darren Wilkinsons R code (with the corrected variance)
+## But we are returning only his columns 2 and 3 as the 1:N sequence
+## is never used below
+Rgibbs <- function(N,thin) {
+    mat <- matrix(0,ncol=2,nrow=N)
+    x <- 0
+    y <- 0
+    for (i in 1:N) {
+        for (j in 1:thin) {
+            x <- rgamma(1,3,y*y+4)
+            y <- rnorm(1,1/(x+1),1/sqrt(2*(x+1)))
+        }
+        mat[i,] <- c(x,y)
+    }
+    mat
+}
+
+## We can also try the R compiler on this R function
+RCgibbs <- cmpfun(Rgibbs)
+
+## For example
+## mat <- Rgibbs(10000,10); dim(mat)
+## would give: [1] 10000     2
+
+## Now for the Rcpp version -- Notice how easy it is to code up!
+
+## NOTE: This is the old way to compile Rcpp code inline.
+## The code here has left as a historical artifact and tribute to the old way.
+## Please use the code under the "new" inline compilation section.
+
+gibbscode <- '
+
+  using namespace Rcpp;   // inline does that for us already
+
+  // n and thin are SEXPs which the Rcpp::as function maps to C++ vars
+  int N   = as<int>(n);
+  int thn = as<int>(thin);
+
+  int i,j;
+  NumericMatrix mat(N, 2);
+
+  RNGScope scope;         // Initialize Random number generator
+
+  // The rest of the code follows the R version
+  double x=0, y=0;
+
+  for (i=0; i<N; i++) {
+    for (j=0; j<thn; j++) {
+      x = ::Rf_rgamma(3.0,1.0/(y*y+4));
+      y = ::Rf_rnorm(1.0/(x+1),1.0/sqrt(2*x+2));
+    }
+    mat(i,0) = x;
+    mat(i,1) = y;
+  }
+
+  return mat;             // Return to R
+'
+
+# Compile and Load
+RcppGibbs_old <- cxxfunction(signature(n="int", thin = "int"),
+                         gibbscode, plugin="Rcpp")
+
+
+gslgibbsincl <- '
+  #include <gsl/gsl_rng.h>
+  #include <gsl/gsl_randist.h>
+
+  using namespace Rcpp;  // just to be explicit
+'
+
+gslgibbscode <- '
+  int N = as<int>(ns);
+  int thin = as<int>(thns);
+  int i, j;
+  gsl_rng *r = gsl_rng_alloc(gsl_rng_mt19937);
+  double x=0, y=0;
+  NumericMatrix mat(N, 2);
+  for (i=0; i<N; i++) {
+    for (j=0; j<thin; j++) {
+      x = gsl_ran_gamma(r,3.0,1.0/(y*y+4));
+      y = 1.0/(x+1)+gsl_ran_gaussian(r,1.0/sqrt(2*x+2));
+    }
+    mat(i,0) = x;
+    mat(i,1) = y;
+  }
+  gsl_rng_free(r);
+
+  return mat;           // Return to R
+'
+
+## Compile and Load
+GSLGibbs_old <- cxxfunction(signature(ns="int", thns = "int"),
+                        body=gslgibbscode, includes=gslgibbsincl,
+                        plugin="RcppGSL")
+
+## without RcppGSL, using cfunction()
+#GSLGibbs <- cfunction(signature(ns="int", thns = "int"),
+#                      body=gslgibbscode, includes=gslgibbsincl,
+#                      Rcpp=TRUE,
+#                      cppargs="-I/usr/include",
+#                      libargs="-lgsl -lgslcblas")
+
+
+## NOTE: Within this section, the new way to compile Rcpp code inline has been
+## written. Please use the code next as a template for your own project.
+
+## Use of the cppFunction() gives the ability to immediately compile embed C++
+## without having to worry about header specification or Rcpp attributes.
+
+cppFunction('
+NumericMatrix RcppGibbs(int N, int thn){
+    // Note: n and thin are SEXPs which the Rcpp automatically converts to ints
+
+    // Setup storage matrix
+    NumericMatrix mat(N, 2);
+    
+    // The rest of the code follows the R version
+    double x = 0, y = 0;
+    
+    for (int i = 0; i < N; i++) {
+        for (int j = 0; j < thn; j++) {
+            x = R::rgamma(3.0,1.0/(y*y+4));
+            y = R::rnorm(1.0/(x+1),1.0/sqrt(2*x+2));
+        }
+        mat(i,0) = x;
+        mat(i,1) = y;
+    }
+    
+    return mat;             // Return to R
+}')
+
+
+## Use of the sourceCpp() is preferred for users who wish to source external
+## files or specify their headers and Rcpp attributes within their code.
+## Code here is able to easily be extracted and placed into its own C++ file. 
+
+## Compile and Load
+sourceCpp(code="
+#include <RcppGSL.h>
+#include <gsl/gsl_rng.h>
+#include <gsl/gsl_randist.h>
+
+using namespace Rcpp;  // just to be explicit
+
+// [[Rcpp::depends(RcppGSL)]]
+
+// [[Rcpp::export]]
+NumericMatrix GSLGibbs(int N, int thin){
+    gsl_rng *r = gsl_rng_alloc(gsl_rng_mt19937);
+    double x = 0, y = 0;
+    NumericMatrix mat(N, 2);
+    for (int i = 0; i < N; i++) {
+        for (int j = 0; j < thin; j++) {
+            x = gsl_ran_gamma(r,3.0,1.0/(y*y+4));
+            y = 1.0/(x+1)+gsl_ran_gaussian(r,1.0/sqrt(2*x+2));
+        }
+        mat(i,0) = x;
+        mat(i,1) = y;
+    }
+    gsl_rng_free(r);
+    
+    return mat;           // Return to R
+}")
+
+
+
+## Now for some tests
+## You can try other values if you like
+## Note that the total number of interations are N*thin!
+Ns <- c(1000,5000,10000,20000)
+thins <- c(10,50,100,200)
+tim_R <- rep(0,4)
+tim_RC <- rep(0,4)
+tim_Rgsl <- rep(0,4)
+tim_Rcpp <- rep(0,4)
+
+for (i in seq_along(Ns)) {
+    tim_R[i] <- system.time(mat <- Rgibbs(Ns[i],thins[i]))[3]
+    tim_RC[i] <- system.time(cmat <- RCgibbs(Ns[i],thins[i]))[3]
+    tim_Rgsl[i] <- system.time(gslmat <- GSLGibbs(Ns[i],thins[i]))[3]
+    tim_Rcpp[i] <- system.time(rcppmat <- RcppGibbs(Ns[i],thins[i]))[3]
+    cat("Replication #", i, "complete \n")
+}
+
+## Comparison
+speedup <- round(tim_R/tim_Rcpp,2);
+speedup2 <- round(tim_R/tim_Rgsl,2);
+speedup3 <- round(tim_R/tim_RC,2);
+summtab <- round(rbind(tim_R,tim_RC, tim_Rcpp,tim_Rgsl,speedup3,speedup,speedup2),3)
+colnames(summtab) <- c("N=1000","N=5000","N=10000","N=20000")
+rownames(summtab) <- c("Elasped Time (R)","Elasped Time (RC)","Elapsed Time (Rcpp)", "Elapsed Time (Rgsl)",
+                       "SpeedUp Rcomp.","SpeedUp Rcpp", "SpeedUp GSL")
+
+print(summtab)
+
+## Contour Plots -- based on Darren's example
+if (interactive() && require(KernSmooth)) {
+    op <- par(mfrow=c(4,1),mar=c(3,3,3,1))
+    x <- seq(0,4,0.01)
+    y <- seq(-2,4,0.01)
+    z <- outer(x,y,fun)
+    contour(x,y,z,main="Contours of actual distribution",xlim=c(0,2), ylim=c(-2,4))
+    fit <- bkde2D(as.matrix(mat),c(0.1,0.1))
+    contour(drawlabels=T, fit$x1, fit$x2, fit$fhat, xlim=c(0,2), ylim=c(-2,4),
+            main=paste("Contours of empirical distribution:",round(tim_R[4],2)," seconds"))
+    fitc <- bkde2D(as.matrix(rcppmat),c(0.1,0.1))
+    contour(fitc$x1,fitc$x2,fitc$fhat,xlim=c(0,2), ylim=c(-2,4),
+            main=paste("Contours of Rcpp based empirical distribution:",round(tim_Rcpp[4],2)," seconds"))
+    fitg <- bkde2D(as.matrix(gslmat),c(0.1,0.1))
+    contour(fitg$x1,fitg$x2,fitg$fhat,xlim=c(0,2), ylim=c(-2,4),
+            main=paste("Contours of GSL based empirical distribution:",round(tim_Rgsl[4],2)," seconds"))
+    par(op)
+}
+
+
+## also use rbenchmark package
+N <- 20000
+thn <- 200
+res <- benchmark(Rgibbs(N, thn),
+                 RCgibbs(N, thn),
+                 RcppGibbs(N, thn),
+                 GSLGibbs(N, thn),
+                 columns=c("test", "replications", "elapsed",
+                           "relative", "user.self", "sys.self"),
+                 order="relative",
+                 replications=10)
+print(res)
+
+
+## And we are done
+
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/OpenMP/check.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/OpenMP/check.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/OpenMP/check.R	(revision 2477)
@@ -0,0 +1,5 @@
+
+dyn.load("piWithInterrupts.so")
+#res <- .Call("PiLeibniz", n=1e9, frequency=1e6)
+res <- .Call("PiLeibniz", n=1e9, frequency=1e6)
+print(res, digits=10)
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/OpenMP/OpenMPandInline.r
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/OpenMP/OpenMPandInline.r	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/OpenMP/OpenMPandInline.r	(revision 2477)
@@ -0,0 +1,88 @@
+#!/usr/bin/env r
+
+library(inline)
+library(rbenchmark)
+
+serialCode <- '
+   // assign to C++ vector
+   std::vector<double> x = Rcpp::as<std::vector< double > >(xs);
+   size_t n = x.size();
+   for (size_t i=0; i<n; i++) {
+       x[i] = ::log(x[i]);
+   }
+   return Rcpp::wrap(x);
+'
+funSerial <- cxxfunction(signature(xs="numeric"), body=serialCode, plugin="Rcpp")
+
+serialStdAlgCode <- '
+   std::vector<double> x = Rcpp::as<std::vector< double > >(xs);
+   std::transform(x.begin(), x.end(), x.begin(), ::log);
+   return Rcpp::wrap(x);
+'
+funSerialStdAlg <- cxxfunction(signature(xs="numeric"), body=serialStdAlgCode, plugin="Rcpp")
+
+## same, but with Rcpp vector just to see if there is measurable difference
+serialRcppCode <- '
+   // assign to C++ vector
+   Rcpp::NumericVector x = Rcpp::NumericVector(xs);
+   size_t n = x.size();
+   for (size_t i=0; i<n; i++) {
+       x[i] = ::log(x[i]);
+   }
+   return x;
+'
+funSerialRcpp <- cxxfunction(signature(xs="numeric"), body=serialRcppCode, plugin="Rcpp")
+
+serialStdAlgRcppCode <- '
+   Rcpp::NumericVector x = Rcpp::NumericVector(xs);
+   std::transform(x.begin(), x.end(), x.begin(), ::log);
+   return x;
+'
+funSerialStdAlgRcpp <- cxxfunction(signature(xs="numeric"), body=serialStdAlgRcppCode, plugin="Rcpp")
+
+serialImportTransRcppCode <- '
+   Rcpp::NumericVector x(xs);
+   return Rcpp::NumericVector::import_transform(x.begin(), x.end(), ::log);
+'
+funSerialImportTransRcpp <- cxxfunction(signature(xs="numeric"), body=serialImportTransRcppCode, plugin="Rcpp")
+
+## now with a sugar expression with internalizes the loop
+sugarRcppCode <- '
+   // assign to C++ vector
+   Rcpp::NumericVector x = log ( Rcpp::NumericVector(xs) );
+   return x;
+'
+funSugarRcpp <- cxxfunction(signature(xs="numeric"), body=sugarRcppCode, plugin="Rcpp")
+
+## lastly via OpenMP for parallel use
+openMPCode <- '
+   // assign to C++ vector
+   std::vector<double> x = Rcpp::as<std::vector< double > >(xs);
+   size_t n = x.size();
+#pragma omp parallel for shared(x, n)
+   for (size_t i=0; i<n; i++) {
+       x[i] = ::log(x[i]);
+   }
+   return Rcpp::wrap(x);
+'
+
+## modify the plugin for Rcpp to support OpenMP
+settings <- getPlugin("Rcpp")
+settings$env$PKG_CXXFLAGS <- paste('-fopenmp', settings$env$PKG_CXXFLAGS)
+settings$env$PKG_LIBS <- paste('-fopenmp -lgomp', settings$env$PKG_LIBS)
+
+funOpenMP <- cxxfunction(signature(xs="numeric"), body=openMPCode, plugin="Rcpp", settings=settings)
+
+
+z <- seq(1, 2e6)
+res <- benchmark(funSerial(z), funSerialStdAlg(z),
+                 funSerialRcpp(z), funSerialStdAlgRcpp(z),
+                 funSerialImportTransRcpp(z),
+                 funOpenMP(z), funSugarRcpp(z),
+                 columns=c("test", "replications", "elapsed",
+                           "relative", "user.self", "sys.self"),
+                 order="relative",
+                 replications=100)
+print(res)
+
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/OpenMP/piWithInterrupts.cpp
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/OpenMP/piWithInterrupts.cpp	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/OpenMP/piWithInterrupts.cpp	(revision 2477)
@@ -0,0 +1,134 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+
+#include <Rcpp.h>
+
+#ifdef _OPENMP
+#include <omp.h>
+#endif
+
+#include <R_ext/Utils.h>
+
+/**
+ * Base class for interrupt exceptions thrown when user
+ * interrupts are detected.
+ */
+class interrupt_exception : public std::exception {
+public:
+    /**
+     * Constructor.
+     * @param[in] message A description of event that
+     *  caused this exception.
+     */
+    interrupt_exception(std::string message)
+	: detailed_message(message)
+    {};
+
+    /**
+     * Virtual destructor. Needed to avoid "looser throw specification" errors.
+     */
+    virtual ~interrupt_exception() throw() {};
+
+    /**
+     * Obtain a description of the exception.
+     * @return Description.
+     */
+    virtual const char* what() const throw() {
+	return detailed_message.c_str();
+    }
+
+    /**
+     * String with details on the error.
+     */
+    std::string detailed_message;
+};
+
+/**
+ * Do the actual check for an interrupt.
+ * @attention This method should never be called directly.
+ * @param[in] dummy Dummy argument.
+ */
+static inline void check_interrupt_impl(void* /*dummy*/) {
+    R_CheckUserInterrupt();
+}
+
+/**
+ * Call this method to check for user interrupts.
+ * This is based on the results of a discussion on the
+ * R-devel mailing list, suggested by Simon Urbanek.
+ * @attention This method must not be called by any other
+ *  thread than the master thread. If called from within
+ *  an OpenMP parallel for loop, make sure to check
+ *  for omp_get_thread_num()==0 before calling this method!
+ * @return True, if a user interrupt has been detected.
+ */
+inline bool check_interrupt() {
+    return (R_ToplevelExec(check_interrupt_impl, NULL) == FALSE);
+}
+
+/**
+ * Compute pi using the Leibniz formula
+ * (a very inefficient approach).
+ * @param[in] n Number of summands
+ * @param[in] frequency Check for interrupts after
+ *  every @p frequency loop cycles.
+ */
+RcppExport SEXP PiLeibniz(SEXP n, SEXP frequency)
+{
+    BEGIN_RCPP
+
+    // cast parameters
+    int n_cycles = Rcpp::as<int>(n);
+    int interrupt_check_frequency = Rcpp::as<int>(frequency);
+
+    // user interrupt flag
+    bool interrupt = false;
+
+    double pi = 0;
+#ifdef _OPENMP
+#pragma omp parallel for \
+    shared(interrupt_check_frequency, n_cycles, interrupt)	\
+    reduction(+:pi)
+#endif
+    for (int i=0; i<n_cycles; i+=interrupt_check_frequency) {
+	// check for user interrupt
+	if (interrupt) {
+	    continue;
+	}
+
+#ifdef _OPENMP
+	if (omp_get_thread_num() == 0) // only in master thread!
+#endif
+	    if (check_interrupt()) {
+		interrupt = true;
+	    }
+
+	// do actual computations
+	int j_end = std::min(i+interrupt_check_frequency, n_cycles);
+	for (int j=i; j<j_end; ++j) {
+	    double summand = 1.0 / (double)(2*j + 1);
+	    if (j % 2 == 0) {
+		pi += summand;
+	    }
+	    else {
+		pi -= summand;
+	    }
+	}
+    }
+
+    // additional check, in case frequency was too large
+    if (check_interrupt()) {
+	interrupt = true;
+    }
+
+    // throw exception if interrupt occurred
+    if (interrupt) {
+	throw interrupt_exception("The computation of pi was interrupted.");
+    }
+
+    pi *= 4.0;
+
+    // result list
+    return Rcpp::wrap(pi);
+
+    END_RCPP
+}
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/OpenMP/GNUmakefile
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/OpenMP/GNUmakefile	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/OpenMP/GNUmakefile	(revision 2477)
@@ -0,0 +1,30 @@
+
+## comment this out if you need a different version of R, 
+## and set set R_HOME accordingly as an environment variable
+R_HOME := 		$(shell R RHOME)
+
+## include headers and libraries for R 
+RCPPFLAGS := 		$(shell $(R_HOME)/bin/R CMD config --cppflags)
+RLDFLAGS := 		$(shell $(R_HOME)/bin/R CMD config --ldflags)
+
+## include headers and libraries for Rcpp interface classes
+RCPPINCL := 		$(shell echo 'Rcpp:::CxxFlags()' | $(R_HOME)/bin/R --vanilla --slave)
+RCPPLIBS := 		$(shell echo 'Rcpp:::LdFlags()'  | $(R_HOME)/bin/R --vanilla --slave)
+
+## OpenMP
+OPENMPFLAGS :=		-fopenmp
+
+c_sources := 		$(wildcard *.c)
+c_sharedlibs := 	$(patsubst %.c,%.o,$(c_sources))
+
+cpp_sources := 		$(wildcard *.cpp)
+cpp_sharedlibs := 	$(patsubst %.cpp,%.o,$(cpp_sources))
+
+all :			$(c_sharedlibs) $(cpp_sharedlibs)
+
+%.o : 			%.c
+			R CMD SHLIB $<
+
+%.o : 			%.cpp
+			PKG_CPPFLAGS="$(RCPPFLAGS) $(RCPPINCL) $(OPENMPFLAGS)" PKG_LIBS="$(RLDFLAGS) $(RCPPLIBS) $(OPENMPFLAGS)" R CMD SHLIB $<
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/performance/extractors.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/performance/extractors.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/performance/extractors.R	(revision 2477)
@@ -0,0 +1,118 @@
+
+require( inline )
+require( Rcpp )
+
+inc <- '
+    SEXP direct__( SEXP x_, SEXP y_ ){
+        NumericVector x( x_ ), y( y_ ), z( x.size() ) ;
+        int n = x.size() ;
+        for( int i=0; i<n; i++) 
+            z[i] = x[i] * y[i] ;
+        return z ; 
+    }
+    
+    SEXP extractors__( SEXP x_, SEXP y_){
+        NumericVector x( x_ ), y( y_ ), z( x.size() ) ;
+        Fast<NumericVector> fx(x), fy(y), fz(z)  ;
+        int n = x.size() ;
+        for( int i=0; i<n; i++) 
+            fz[i] = fx[i] * fy[i] ;
+        return z ;
+    }
+    
+    SEXP sugar_nona__( SEXP x_, SEXP y_){
+        NumericVector x( x_ ), y( y_ ) ;
+        sugar::Nona< REALSXP, true, NumericVector > nx(x), ny(y) ;
+        NumericVector z = nx * ny ;
+        return z ;
+    }
+'
+
+
+fx <- cxxfunction( 
+    list( 
+        direct = signature( x_ = "numeric", y_ = "numeric" ), 
+        extractor = signature( x_ = "numeric", y_ = "numeric" ), 
+        sugar_nona = signature( x_ = "numeric", y_ = "numeric" ), 
+        
+        assign_direct = signature( x_ = "numeric", y_ = "numeric" ), 
+        assign_extractor = signature( x_ = "numeric", y_ = "numeric" ), 
+        assign_sugar_nona = signature( x_ = "numeric", y_ = "numeric" ) 
+        
+    ) , 
+    list( 
+        direct = '
+        SEXP res = R_NilValue ;
+        for( int j=0; j<1000; j++) 
+            res = direct__( x_, y_ ) ;
+        return res ;
+        ', 
+        extractor = '
+        SEXP res = R_NilValue ;
+        for( int j=0; j<1000; j++) 
+            res = extractors__( x_, y_ ) ;
+        return res ;
+        ', 
+        sugar_nona = '
+        SEXP res = R_NilValue ;
+        for( int j=0; j<1000; j++) 
+            res = sugar_nona__( x_, y_ ) ;
+        return res ;
+        ', 
+        
+        assign_direct = '
+        NumericVector x( x_ ), y( y_ ), z( x.size() ) ;
+        int n = x.size() ;
+        for( int j=0; j<1000; j++)
+            for( int i=0; i<n; i++) 
+                z[i] = x[i] * y[i] ;
+        return z ; 
+        ', 
+        
+        assign_extractor = '
+        NumericVector x( x_ ), y( y_ ), z( x.size() ) ;
+        Fast<NumericVector> fx(x), fy(y), fz(z)  ;
+        int n = x.size() ;
+        for( int j=0; j<1000; j++)
+            for( int i=0; i<n; i++) 
+                fz[i] = fx[i] * fy[i] ;
+        return z ; 
+        ', 
+        
+        assign_sugar_nona = '
+        NumericVector x( x_ ), y( y_ ), z( x.size() ) ;
+        sugar::Nona< REALSXP, true, NumericVector > nx(x), ny(y) ;
+        for( int j=0; j<1000; j++)
+            z = nx * ny ;
+        return z ;
+        '
+    ) , plugin = "Rcpp", includes = inc )
+
+x <- rnorm( 100000 )
+y <- rnorm( 100000 )
+
+# resolving
+invisible( getDynLib( fx ) )
+
+require( rbenchmark )
+
+benchmark( 
+    fx$direct( x, y ), 
+    fx$extractor( x, y ), 
+    fx$sugar_nona( x, y ), 
+    
+    replications = 1, 
+    columns=c("test", "elapsed", "relative", "user.self", "sys.self"),
+    order="relative"
+)
+    
+benchmark( 
+    fx$assign_direct( x, y ), 
+    fx$assign_extractor( x, y ), 
+    fx$assign_sugar_nona( x, y ), 
+    
+    replications = 1, 
+    columns=c("test", "elapsed", "relative", "user.self", "sys.self"),
+    order="relative"
+)     
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/performance/performance.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/performance/performance.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/performance/performance.R	(revision 2477)
@@ -0,0 +1,38 @@
+
+require( inline )
+require( Rcpp )
+
+expressions <- list( 
+    times = "x * y" , 
+    plus = "x + y"
+#    , 
+#    minus = "x - y", 
+#    divides = "x / y", 
+#    exp_ = "exp( x )"
+)
+
+signatures <- lapply( expressions, function(.) signature( x_ = "numeric", y_ = "numeric", n_ = "integer" ) )
+bodies <- lapply( expressions, function(.){
+   sprintf( '
+    int n = as<int>( n_ ) ;
+    NumericVector x(x_), y(y_), z(x.size()) ;
+    for( int i=0; i<n; i++){
+        z = %s ;
+    }
+    return z ;
+', . ) 
+} )
+
+fx <- cxxfunction( signatures, bodies, plugin = "Rcpp" )
+
+set.seed( 43231 )
+x <- runif( 100000, min = 1, max = 100)
+y <- runif( 100000, min = 1, max = 100)
+# resolving the dyn lib once
+invisible( lapply( fx, function(f){ f( x, y, 1L) } ) )
+
+# t( sapply( fx, function(f){
+#     system.time( f( x, y, 10000 ) )
+# } ) )[, 1:3]
+# 
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/functionCallback/newApiExample.r
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/functionCallback/newApiExample.r	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/functionCallback/newApiExample.r	(revision 2477)
@@ -0,0 +1,57 @@
+#!/usr/bin/env r
+
+suppressMessages(library(Rcpp))
+
+# R function that will be called from C++
+vecfunc <- function(x) {
+    y <- x^1.05                         # do a transformation
+    print(y)                            # but also print
+    plot(y, ylim=c(1,8), type='b')      # and even plot
+    Sys.sleep(0.225)                    # sleep before next call
+    return(y)
+}
+
+## NOTE: This is the old way to compile Rcpp code inline.
+## The code here has left as a historical artifact and tribute to the old way.
+## Please use the code under the "new" inline compilation section.
+
+suppressMessages(library(inline))
+
+# C++ source code to operate on function and vector
+cpp <- '
+	int n = as<int>(N);
+	NumericVector numvec(xvec) ;
+	Function f(fun) ;
+	for( int i=0; i<n; i++){
+		numvec = f( numvec ) ;
+	}
+	return numvec ;
+'
+
+# create a C++ function
+funx <- cxxfunction(signature(N = "integer" , xvec = "numeric", fun = "function" ),
+                    body=cpp, include = "using namespace Rcpp; ", plugin = "Rcpp")
+
+
+## NOTE: Within this section, the new way to compile Rcpp code inline has been
+## written. Please use the code next as a template for your own project.
+
+# C++ source code to operate on function and vector
+cppFunction('
+NumericVector funx(int n, NumericVector numvec, Function f){
+    for( int i = 0; i < n; i++ ){
+       numvec = f( numvec ) ;
+    }
+    return numvec ;
+}')
+
+
+# create the vector
+xvec <- sqrt(c(1:12, 11:1))
+
+# set up x11
+x11(width=3,height=3)
+par(mar=c(3,3,1,1),cex=0.8, pch=19)
+
+# run example
+funx( 10L, xvec, vecfunc )
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/functionCallback/README
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/functionCallback/README	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/functionCallback/README	(revision 2477)
@@ -0,0 +1,22 @@
+
+A much simpler version of the example is provided in the file newApiExample.r.
+With littler installed, it can be run 'as is' as a shell script; else it can
+be sourced into R.
+
+ -- Dirk Eddelbuettel and Romain Francois,  06 Feb 2010
+
+
+This directory provides a simple example of how an R function 
+can be passed back and forth between R and C++.  
+
+We define the function at the R level, pass it to C++ using the Rcpp
+interface and have C++ call it.  This works by subclassing the C++ class
+RcppFunction (from Rcpp) and adding a new member function transformVector()
+which is vector-valued.  We then instantiate this new class in the C++
+function called from R -- and by calling the transformVector() function from
+C++ we get R to operate on the supplied vector.
+
+In this demo, we simply exponeniate the data vector but also plot it as a
+side effect -- effectively giving us R plotting from a C++ function.
+
+ -- Dirk Eddelbuettel,  29 Sep 2009
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/SugarPerformance/sugarBenchmarks.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/SugarPerformance/sugarBenchmarks.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/SugarPerformance/sugarBenchmarks.R	(revision 2477)
@@ -0,0 +1,226 @@
+#!/usr/bin/env r
+
+suppressMessages(library(inline))
+suppressMessages(library(Rcpp))
+
+benchmark <- function(start = settings$start, 
+                      hand.written = settings$hand.written, 
+                      sugar = settings$sugar, 
+                      expr = settings$expr, 
+                      runs = settings$runs,
+                      data = settings$data,
+                      end = settings$end, 
+                      inc = settings$inc, 
+                      
+                      settings = list( 
+                      		start = "", hand.written = "", 
+                      		sugar = "", expr = NULL, 
+                      		runs = 500, 
+                      		data = NULL , 
+                      		end = "", 
+                      		inc = ""
+                      		)
+                      ) {
+
+expr <- force(expr)
+inc  <- force( inc )
+
+src <- sprintf( '
+    unsigned int runs = as<int>(runss);
+   	Environment e(env) ;
+
+   	%s
+
+    Timer timer;
+
+    // approach one
+    timer.Start();
+    for (unsigned int i=0; i<runs; i++) {
+	   %s
+    }
+    timer.Stop();
+    double t1 = timer.ElapsedTime();
+
+    // approach two
+    timer.Reset(); timer.Start();
+    for (unsigned int i=0; i<runs; i++) {
+        %s
+    }
+    timer.Stop();
+    double t2 = timer.ElapsedTime();
+
+    Language call(expr) ;
+
+    timer.Reset(); timer.Start();
+    for (unsigned int i=0; i<runs; i++) {
+        NumericVector res2 = Rcpp_eval( call, e ) ;
+    }
+    timer.Stop();
+    double t3 = timer.ElapsedTime();
+
+    %s
+
+    return NumericVector::create(
+    	_["hand written"] = t1,
+    	_["sugar"] = t2,
+    	_["R"]     = t3
+    	) ;
+',
+               paste( start, collapse = "\n" ) ,
+               paste( hand.written, collapse = "\n" ),
+               paste( sugar, collapse = "\n" ),
+               paste( end, collapse = "\n" )
+	)
+
+	e <- environment()
+	for( i in names(data) ){
+		assign( i, data[[i]], envir = e )
+	}
+
+	settings <- getPlugin("Rcpp")
+	settings$env$PKG_CXXFLAGS <- paste("-I", getwd(), sep="")
+
+	fun <- cxxfunction(signature(runss="integer", expr = "language", env = "environment" ),
+	                   src,
+	                   includes= sprintf( '#include "Timer.h"\n%s', paste( inc, collapse = "\n" ) ),
+	                   plugin="Rcpp",
+	                   settings=settings)
+	results <- fun(runs, expr, environment() )
+	cat( "-" )
+	list( results = results, runs = runs, expr = deparse(expr) )
+}
+
+settings.ifelse <- list( start = '
+	NumericVector x = e["x"] ;
+	NumericVector y = e["y"] ;
+', hand.written = '
+	int n = x.size() ;
+	NumericVector res1( n ) ;
+	double x_ = 0.0 ;
+	double y_ = 0.0 ;
+	for( int i=0; i<n; i++){
+        x_ = x[i] ;
+        y_ = y[i] ;
+        if( R_IsNA(x_) || R_IsNA(y_) ){
+            res1[i] = NA_REAL;
+        } else if( x_ < y_ ){
+            res1[i] = x_ * x_ ;
+        } else {
+            res1[i] = -( y_ * y_)  ;
+        }
+    }
+
+', sugar = '
+    NumericVector res2 = ifelse( x < y, x*x, -(y*y) ) ;
+', expr = quote(ifelse(x<y, x*x, -(y*y) )), 
+   data = list( x = runif(1e5),  y = runif(1e5) )
+)
+
+settings.ifelse.nona <- list( start = '
+	NumericVector x = e["x"] ;
+	NumericVector y = e["y"] ;
+', hand.written = '
+	int n = x.size() ;
+	NumericVector res1( n ) ;
+	double x_ = 0.0 ;
+	double y_ = 0.0 ;
+	for( int i=0; i<n; i++){
+        x_ = x[i] ;
+        y_ = y[i] ;
+        if( x_ < y_ ){
+            res1[i] = x_ * x_ ;
+        } else {
+            res1[i] = -( y_ * y_)  ;
+        }
+    }
+
+', sugar = '
+    NumericVector res2 = ifelse( x < y, noNA(x)*noNA(x), -(noNA(y)*noNA(y)) ) ;
+', expr = quote(ifelse(x<y, x*x, -(y*y) )), 
+   data = list( x = runif(1e5),  y = runif(1e5) )
+)
+
+settings.sapply <- list( start =  '
+	NumericVector x = e["x"] ;
+	int n = x.size() ;
+
+', hand.written = '
+	NumericVector res1( n ) ;
+	std::transform( x.begin(), x.end(), res1.begin(), square ) ;
+
+', sugar = '
+	NumericVector res2 = sapply( x, square ) ; 
+',
+	expr = quote(sapply(x,square)),
+	runs = 500,
+	data = list(
+		x = rnorm(1e5) ,
+		square = function(x) x*x
+	), 
+	inc = '
+	inline double square(double x){ return x*x ; }
+	'
+)
+
+settings.any <- list( start = '
+	NumericVector x = e["x"] ;
+	NumericVector y = e["y"] ;
+	int res ;
+	SEXP res2 ;
+
+', hand.written = '
+	int n = x.size() ;
+	bool seen_na = false ;
+	bool result = false ;
+	double x_ = 0.0 ;
+	double y_ = 0.0 ;
+	for( int i=0; i<n; i++){
+    		x_ = x[i] ;
+		if( R_IsNA( x_ )  ){
+			seen_na = true ;
+		} else {
+    			y_ = y[i] ;
+    			if( R_IsNA( y_ ) ){
+    				seen_na = true ;
+	    		} else {
+    				/* both non NA */
+    				if( x_*y_ < 0.0 ){
+    					result = true ;
+    					break ;
+    				}
+    			}
+    		}
+    	}
+	res = result ? TRUE : ( seen_na ? NA_LOGICAL : FALSE ) ;
+', sugar = '
+	res2 = any( x*y < 0 ) ;
+',
+	expr = quote(any(x*y<0)),
+	runs = 5000,
+	data = list(
+		x = seq( -1, 1, length = 1e05),
+		y = rep( 1, 1e05)
+	)
+)
+raw.results <- list( 
+ 	benchmark( settings = settings.any   , runs = 5000 ), 
+ 	benchmark( settings = settings.ifelse, runs = 500 ), 
+ 	benchmark( settings = settings.ifelse.nona, runs = 500 ), 
+ 	benchmark( settings = settings.sapply, runs = 500 )
+)
+cat("\n")
+
+results <- do.call( rbind, lapply( raw.results, "[[", "results" ) )
+results <- data.frame( 
+	runs = sapply( raw.results, "[[", "runs" ),
+	expr = sapply( raw.results, "[[", "expr" ),
+	as.data.frame( results, stringsAsFactors = FALSE )
+	)
+
+results[[ "hand/sugar" ]] <- results[["hand.written" ]] / results[["sugar"]] 
+results[[ "R/sugar" ]]    <- results[["R" ]]            / results[["sugar"]] 
+# results <- results[ order( results[["expr"]], results[["runs"]] ), ]
+
+options( width = 300 )
+print( results )
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/SugarPerformance/Timertest.cpp
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/SugarPerformance/Timertest.cpp	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/SugarPerformance/Timertest.cpp	(revision 2477)
@@ -0,0 +1,31 @@
+// -*- mode: c++; compile-command: "g++ -Wall -O3 -o Timertest Timertest.cpp"; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+
+// from http://www.cs.uiowa.edu/~sriram/30/fall03/
+
+#include <iostream>
+#include <unistd.h>
+#include "Timer.h"
+
+int main() {
+    Timer test;
+
+    std::cout << "Sleeping 2 seconds" << std::endl;
+    test.Start();
+    sleep(2);
+    test.Stop();
+    std::cout << "Sleep lasted for " << test.ElapsedTime() << " seconds." << std::endl;
+    std::cout << "Sleeping 1 second" << std::endl;
+    test.Start();
+    sleep(1);
+    test.Stop();
+    std::cout << "Sleep lasted for " << test.ElapsedTime() << " seconds." << std::endl;
+    std::cout << "Cumulative time is " << test.CumulativeTime() << " seconds." << std::endl;
+    std::cout << "Reseting" << std::endl;
+    test.Reset();
+    std::cout << "Sleeping 2 seconds" << std::endl;
+    test.Start();
+    sleep(2);
+    test.Stop();
+    std::cout << "Sleep lasted for " << test.ElapsedTime() << " seconds." << std::endl;
+    std::cout << "Cumulative time is " << test.CumulativeTime() << " seconds." << std::endl;
+}
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/SugarPerformance/Timer.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/SugarPerformance/Timer.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/SugarPerformance/Timer.h	(revision 2477)
@@ -0,0 +1,55 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// Timer.h: Rcpp R/C++ interface class library -- simple timer class
+//
+// Copyright (C) 2010	Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+
+// Simple timer class based on on ideas in atimer.h / atimer.cxx found a few years ago at
+//     http://www.cs.uiowa.edu/~sriram/30/fall03/
+//     and attributed to Amir Elaguizy while under GPL
+// but converted to using gettimeofday/GetSystemTime instead
+
+#ifndef TIMER_H
+#define TIMER_H
+
+class Timer {
+public:
+    Timer() : sys_time("Sys.time") { Reset(); }
+    void Start()  { start_t = getFractionalSeconds() ; }
+    void Stop() {
+	end_t = getFractionalSeconds();
+	elapsed = end_t - start_t;		// Calculate elapsed time in seconds
+	cumul += elapsed;
+    }
+    void Reset() { end_t = start_t = elapsed = cumul = 0.0; }
+    double ElapsedTime() { return elapsed; }
+    double CumulativeTime() { return cumul; }
+
+
+private:
+    Function sys_time ;
+    double start_t, end_t, elapsed, cumul;
+
+    double getFractionalSeconds(void) {
+        return as<double>( sys_time() ) ;
+    }
+};
+
+#endif
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/Attributes/cppFunction.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/Attributes/cppFunction.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/Attributes/cppFunction.R	(revision 2477)
@@ -0,0 +1,43 @@
+
+library(Rcpp)
+
+cppFunction('
+    NumericVector convolveCpp(NumericVector a, NumericVector b) {
+        
+        int na = a.size(), nb = b.size();
+        int nab = na + nb - 1;
+        NumericVector xab(nab);
+        
+        for (int i = 0; i < na; i++)
+            for (int j = 0; j < nb; j++)
+                xab[i + j] += a[i] * b[j];
+        
+        return xab;
+    }            
+')
+
+convolveCpp(c(1,2,3), matrix(3,3))
+
+
+cppFunction(depends='RcppArmadillo', code='
+    List fastLm(NumericVector yr, NumericMatrix Xr) {
+
+        int n = Xr.nrow(), k = Xr.ncol();
+    
+        arma::mat X(Xr.begin(), n, k, false); // reuses memory and avoids copy
+        arma::colvec y(yr.begin(), yr.size(), false);
+    
+        arma::colvec coef = arma::solve(X, y);      // fit model y ~ X
+        arma::colvec resid = y - X*coef;            // residuals
+    
+        double sig2 = arma::as_scalar( arma::trans(resid)*resid/(n-k) );
+                                                    // std.error of estimate
+        arma::colvec stderrest = arma::sqrt(
+                        sig2 * arma::diagvec( arma::inv(arma::trans(X)*X)) );
+    
+        return List::create(Named("coefficients") = coef,
+                            Named("stderr")       = stderrest
+    );
+}                  
+')
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/Attributes/Export.cpp
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/Attributes/Export.cpp	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/Attributes/Export.cpp	(revision 2477)
@@ -0,0 +1,40 @@
+
+#include <Rcpp.h>
+
+using namespace Rcpp;
+
+// [[Rcpp::export]]
+int fibonacci(const int x) {
+
+     if (x == 0) return(0);
+     if (x == 1) return(1);
+
+     return (fibonacci(x - 1)) + fibonacci(x - 2);
+}
+
+
+// [[Rcpp::export("convolveCpp")]]
+NumericVector convolve(NumericVector a, NumericVector b) {
+
+    int na = a.size(), nb = b.size();
+    int nab = na + nb - 1;
+    NumericVector xab(nab);
+
+    for (int i = 0; i < na; i++)
+        for (int j = 0; j < nb; j++)
+            xab[i + j] += a[i] * b[j];
+
+    return xab;
+}
+
+
+// [[Rcpp::export]]
+List lapplyCpp(List input, Function f) {
+
+    List output(input.size());
+
+    std::transform(input.begin(), input.end(), output.begin(), f);
+    output.names() = input.names();
+
+    return output;
+}
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/Attributes/Depends.cpp
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/Attributes/Depends.cpp	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/Attributes/Depends.cpp	(revision 2477)
@@ -0,0 +1,28 @@
+
+// [[Rcpp::depends(RcppArmadillo)]]
+
+#include <RcppArmadillo.h>
+
+using namespace Rcpp;
+
+// [[Rcpp::export]]
+List fastLm(NumericVector yr, NumericMatrix Xr) {
+
+    int n = Xr.nrow(), k = Xr.ncol();
+
+    arma::mat X(Xr.begin(), n, k, false); // reuses memory and avoids extra copy
+    arma::colvec y(yr.begin(), yr.size(), false);
+
+    arma::colvec coef = arma::solve(X, y);      // fit model y ~ X
+    arma::colvec resid = y - X*coef;            // residuals
+
+    double sig2 = arma::as_scalar( arma::trans(resid)*resid/(n-k) );
+                                                // std.error of estimate
+    arma::colvec stderrest = arma::sqrt(
+                    sig2 * arma::diagvec( arma::inv(arma::trans(X)*X)) );
+
+    return List::create(Named("coefficients") = coef,
+                        Named("stderr")       = stderrest
+    );
+}
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/Attributes/sourceCpp.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/Attributes/sourceCpp.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/Attributes/sourceCpp.R	(revision 2477)
@@ -0,0 +1,10 @@
+
+library(Rcpp)
+
+sourceCpp("Export.cpp")
+fibonacci(5)
+
+
+sourceCpp("Depends.cpp")
+fastLm(c(1,2,3), matrix(3,3))
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/FastLM/benchmarkLongley.r
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/FastLM/benchmarkLongley.r	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/FastLM/benchmarkLongley.r	(revision 2477)
@@ -0,0 +1,55 @@
+#!/usr/bin/env r
+#
+# Comparison benchmark -- using old and small Longley data set
+#
+# This shows how Armadillo improves on the previous version using GNU GSL,
+# and how both are doing better than lm.fit()
+#
+# Copyright (C) 2010 Dirk Eddelbuettel and Romain Francois
+#
+# This file is part of Rcpp.
+#
+# Rcpp is free software: you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# Rcpp is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+suppressMessages(library(utils))
+suppressMessages(library(Rcpp))
+suppressMessages(library(inline))
+suppressMessages(library(datasets))
+
+source("lmArmadillo.R")
+source("lmGSL.R")
+
+data(longley)
+
+longleydm <- data.matrix(data.frame(intcp=1, longley))
+X <- longleydm[,-8]
+y <- as.numeric(longleydm[,8])
+
+N <- 1000
+
+lmgsl <- lmGSL()
+lmarma <- lmArmadillo()
+
+tlm <- mean(replicate(N, system.time( lmfit <- lm(y ~ X - 1) )["elapsed"]), trim=0.05)
+tlmfit <- mean(replicate(N, system.time(lmfitfit <- lm.fit(X, y))["elapsed"]), trim=0.05)
+tlmgsl <- mean(replicate(N, system.time(lmgsl(y, X))["elapsed"]), trim=0.05)
+tlmarma <- mean(replicate(N, system.time(lmarma(y, X))["elapsed"]), trim=0.05)
+
+res <- c(tlm, tlmfit, tlmgsl, tlmarma)
+data <- data.frame(results=res, ratios=tlm/res)
+rownames(data) <- c("lm", "lm.fit", "lmGSL", "lmArma")
+cat("For Longley\n")
+print(t(data))
+print(t(1/data[,1,drop=FALSE])) # regressions per second
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/FastLM/benchmark.r
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/FastLM/benchmark.r	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/FastLM/benchmark.r	(revision 2477)
@@ -0,0 +1,54 @@
+#!/usr/bin/env r
+#
+# Comparison benchmark
+#
+# This shows how Armadillo improves on the previous version using GNU GSL,
+# and how both are doing better than lm.fit()
+#
+# Copyright (C) 2010 Dirk Eddelbuettel and Romain Francois
+#
+# This file is part of Rcpp.
+#
+# Rcpp is free software: you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# Rcpp is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+suppressMessages(library(RcppGSL))
+suppressMessages(library(RcppArmadillo))
+
+source("lmArmadillo.R")
+source("lmGSL.R")
+
+set.seed(42)
+n <- 5000
+k <- 9
+X <- cbind( rep(1,n), matrix(rnorm(n*k), ncol=k) )
+truecoef <- 1:(k+1)
+y <- as.numeric(X %*% truecoef + rnorm(n))
+
+N <- 100
+
+lmgsl <- lmGSL()
+lmarma <- lmArmadillo()
+
+tlm <- mean(replicate(N, system.time( lmfit <- lm(y ~ X - 1) )["elapsed"]), trim=0.05)
+tlmfit <- mean(replicate(N, system.time(lmfitfit <- lm.fit(X, y))["elapsed"]), trim=0.05)
+tlmgsl <- mean(replicate(N, system.time(lmgsl(y, X))["elapsed"]), trim=0.05)
+tlmarma <- mean(replicate(N, system.time(lmarma(y, X))["elapsed"]), trim=0.05)
+
+res <- c(tlm, tlmfit, tlmgsl, tlmarma)
+data <- data.frame(results=res, ratios=tlm/res)
+rownames(data) <- c("lm", "lm.fit", "lmGSL", "lmArma")
+cat("For n=", n, " and k=", k, "\n", sep="")
+print(t(data))
+print(t(1/data[,1,drop=FALSE])) # regressions per second
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/FastLM/fastLMviaArmadillo.r
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/FastLM/fastLMviaArmadillo.r	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/FastLM/fastLMviaArmadillo.r	(revision 2477)
@@ -0,0 +1,51 @@
+#!/usr/bin/env r
+#
+# A faster lm() replacement based on Armadillo
+#
+# This improves on the previous version using GNU GSL
+#
+# Copyright (C) 2010 Dirk Eddelbuettel and Romain Francois
+#
+# This file is part of Rcpp.
+#
+# Rcpp is free software: you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# Rcpp is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+source("lmArmadillo.R")
+
+checkLmArmadillo <- function(y, X) {
+    fun <- lmArmadillo()
+    res <- fun(y, X)
+    fit <- lm(y ~ X - 1)
+    rc <- all.equal( as.numeric(res[[1]]), as.numeric(coef(fit))) &
+          all.equal( as.numeric(res[[2]]), as.numeric(coef(summary(fit))[,2]))
+    invisible(rc)
+}
+
+timeLmArmadillo <- function(y, X, N) {
+    fun <- lmArmadillo();
+    meantime <- mean(replicate(N, system.time(fun(y, X))["elapsed"]), trim=0.05)
+}
+
+set.seed(42)
+n <- 5000
+k <- 9
+X <- cbind( rep(1,n), matrix(rnorm(n*k), ncol=k) )
+truecoef <- 1:(k+1)
+y <- as.numeric(X %*% truecoef + rnorm(n))
+
+N <- 100
+
+stopifnot(checkLmArmadillo(y, X))
+mt <- timeLmArmadillo(y, X, N)
+cat("Armadillo: Running", N, "simulations yields (trimmed) mean time", mt, "\n")
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/FastLM/fastLMviaGSL.r
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/FastLM/fastLMviaGSL.r	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/FastLM/fastLMviaGSL.r	(revision 2477)
@@ -0,0 +1,52 @@
+#!/usr/bin/env r
+#
+# A faster lm() replacement based on GNU GSL
+#
+# This first appeared in the 'Intro to HPC tutorials'
+# but has been wrapped in inline::cfunction() here
+#
+# Copyright (C) 2010 Dirk Eddelbuettel and Romain Francois
+#
+# This file is part of Rcpp.
+#
+# Rcpp is free software: you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# Rcpp is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+source("lmGSL.R")
+
+checkLmGSL <- function(y, X) {
+    fun <- lmGSL()
+    res <- fun(y, X)
+    fit <- lm(y ~ X - 1)
+    rc <- all.equal( res[[1]], as.numeric(coef(fit))) &
+          all.equal( res[[2]], as.numeric(coef(summary(fit))[,2]))
+    invisible(rc)
+}
+
+timeLmGSL <- function(y, X, N) {
+    fun <- lmGSL();
+    meantime <- mean(replicate(N, system.time(fun(y, X))["elapsed"]), trim=0.05)
+}
+
+set.seed(42)
+n <- 5000
+k <- 9
+X <- cbind( rep(1,n), matrix(rnorm(n*k), ncol=k) )
+truecoef <- 1:(k+1)
+y <- as.numeric(X %*% truecoef + rnorm(n))
+
+N <- 100
+
+stopifnot(checkLmGSL(y, X))
+mt <- timeLmGSL(y, X, N)
+cat("GSL: Running", N, "simulations yields (trimmed) mean time", mt, "\n")
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/FastLM/lmArmadillo.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/FastLM/lmArmadillo.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/FastLM/lmArmadillo.R	(revision 2477)
@@ -0,0 +1,89 @@
+#
+# lm() via Armadillo -- improving on the previous GSL solution
+#
+# Copyright (C) 2010 Dirk Eddelbuettel and Romain Francois
+#
+# This file is part of Rcpp.
+#
+# Rcpp is free software: you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# Rcpp is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+suppressMessages(require(Rcpp))
+
+## NOTE: This is the old way to compile Rcpp code inline.
+## The code here has left as a historical artifact and tribute to the old way.
+## Please use the code under the "new" inline compilation section.
+
+suppressMessages(require(inline))
+
+lmArmadillo_old <- function() {
+    src <- '
+
+    Rcpp::NumericVector yr(Ysexp);
+    Rcpp::NumericVector Xr(Xsexp);
+    std::vector<int> dims = Xr.attr("dim") ;
+    int n = dims[0], k = dims[1];
+
+    arma::mat X(Xr.begin(), n, k, false);       // use advanced armadillo constructors
+    arma::colvec y(yr.begin(), yr.size());
+
+    arma::colvec coef = solve(X, y);		// fit model y ~ X
+
+    arma::colvec resid = y - X*coef;    	// to compute std. error of the coefficients
+    double sig2 = arma::as_scalar(trans(resid)*resid)/(n-k);	// requires Armadillo 0.8.2 or later
+    arma::mat covmat = sig2 * arma::inv(arma::trans(X)*X);
+
+    Rcpp::NumericVector coefr(k), stderrestr(k);
+    for (int i=0; i<k; i++) {           	// this is easier in RcppArmadillo with proper wrappers
+        coefr[i]      = coef[i];
+        stderrestr[i] = sqrt(covmat(i,i));
+    }
+
+    return Rcpp::List::create( Rcpp::Named( "coefficients", coefr),
+                               Rcpp::Named( "stderr", stderrestr));
+    '
+
+    ## turn into a function that R can call
+    fun_old <- cxxfunction(signature(Ysexp="numeric", Xsexp="numeric"),
+                       src,
+                       includes="#include <armadillo>",
+                       plugin="RcppArmadillo")
+}
+
+
+## NOTE: Within this section, the new way to compile Rcpp code inline has been
+## written. Please use the code next as a template for your own project.
+
+lmArmadillo <- function() {
+
+    sourceCpp(code='
+    #include <RcppArmadillo.h>
+    // [[Rcpp::depends(RcppArmadillo)]]
+          
+    // [[Rcpp::export]]
+    Rcpp::List fun(const arma::vec & y, const arma::mat & X){
+
+        int n = X.n_rows, k = X.n_cols;
+    
+        arma::vec coef = solve(X, y);		// fit model y ~ X
+    
+        arma::vec resid = y - X*coef;    	// to compute std. error of the coefficients
+        double sig2 = arma::as_scalar(trans(resid)*resid)/(n-k);	// requires Armadillo 0.8.2 or later
+        arma::mat covmat = sig2 * arma::inv(arma::trans(X)*X);
+    
+        return Rcpp::List::create( Rcpp::Named( "coefficients") = coef,
+                                   Rcpp::Named( "stderr") = sqrt(arma::diagvec(covmat)));
+    }')
+    
+    fun
+}
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/FastLM/lmGSL.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/FastLM/lmGSL.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/examples/FastLM/lmGSL.R	(revision 2477)
@@ -0,0 +1,118 @@
+#
+# lm() via GNU GSL -- building on something from the Intro to HPC tutorials
+#
+# Copyright (C) 2010 Dirk Eddelbuettel and Romain Francois
+#
+# This file is part of Rcpp.
+#
+# Rcpp is free software: you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# Rcpp is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+suppressMessages(require(Rcpp))
+
+## NOTE: This is the old way to compile Rcpp code inline.
+## The code here has left as a historical artifact and tribute to the old way.
+## Please use the code under the "new" inline compilation section.
+
+suppressMessages(require(inline))
+
+lmGSL_old <- function() {
+
+    src <- '
+
+    Rcpp::NumericVector Yr(Ysexp);
+    Rcpp::NumericMatrix Xr(Xsexp);
+
+    int i,j,n = Xr.nrow(), k = Xr.ncol();
+    double chisq;
+
+    gsl_matrix *X = gsl_matrix_alloc (n, k);
+    gsl_vector *y = gsl_vector_alloc (n);
+    gsl_vector *c = gsl_vector_alloc (k);
+    gsl_matrix *cov = gsl_matrix_alloc (k, k);
+    for (i = 0; i < n; i++) {
+        for (j = 0; j < k; j++)
+            gsl_matrix_set (X, i, j, Xr(i,j));
+        gsl_vector_set (y, i, Yr(i));
+    }
+
+    gsl_multifit_linear_workspace *work = gsl_multifit_linear_alloc (n, k);
+    gsl_multifit_linear (X, y, c, cov, &chisq, work);
+    gsl_multifit_linear_free (work);
+
+    Rcpp::NumericVector coefr(k), stderrestr(k);
+    for (i = 0; i < k; i++) {
+        coefr(i) = gsl_vector_get(c,i);
+        stderrestr(i) = sqrt(gsl_matrix_get(cov,i,i));
+    }
+    gsl_matrix_free (X);
+    gsl_vector_free (y);
+    gsl_vector_free (c);
+    gsl_matrix_free (cov);
+
+
+    return Rcpp::List::create( Rcpp::Named( "coef", coefr),
+                               Rcpp::Named( "stderr", stderrestr));
+    '
+
+    ## turn into a function that R can call
+    ## compileargs redundant on Debian/Ubuntu as gsl headers are found anyway
+    fun_old <- cxxfunction(signature(Ysexp="numeric", Xsexp="numeric"),
+                       src,
+                       includes="#include <gsl/gsl_multifit.h>",
+                       plugin="RcppGSL")
+}
+
+## NOTE: Within this section, the new way to compile Rcpp code inline has been
+## written. Please use the code next as a template for your own project.
+
+lmGSL <- function() {
+    
+sourceCpp(code='
+#include <RcppGSL.h>
+#include <gsl/gsl_multifit.h>
+// [[Rcpp::depends(RcppGSL)]]
+
+// [[Rcpp::export]]
+Rcpp::List fun(Rcpp::NumericVector Yr, Rcpp::NumericMatrix Xr){
+    
+    int i, j, n = Xr.nrow(), k = Xr.ncol();
+    double chisq;
+    
+    RcppGSL::Matrix X(n, k);   // allocate a gsl_matrix<double> of dim n, k
+    RcppGSL::Vector y(n);      // allocate a gsl_vector<double> of length n
+    RcppGSL::Vector c(k);      // allocate a gsl_vector<double> of length k
+    RcppGSL::Matrix cov(k, k); // allocate a gsl_matrix<double> of dim k, k
+
+    for (i = 0; i < n; i++) {
+        for (j = 0; j < k; j++)
+             X(i, j) =  Xr(i, j);
+        y[i] = Yr(i);          // Note vector requires [] not ()
+    }
+    
+    gsl_multifit_linear_workspace *work = gsl_multifit_linear_alloc (n, k);
+    gsl_multifit_linear (X, y, c, cov, &chisq, work);
+    gsl_multifit_linear_free (work);
+    
+    Rcpp::NumericVector coefr(k), stderrestr(k);
+    for (i = 0; i < k; i++) {
+        coefr(i) = c[i];
+        stderrestr(i) = sqrt(cov(i,i));
+    }
+    
+    
+    return Rcpp::List::create( Rcpp::Named("coef") = coefr,
+                               Rcpp::Named("stderr") = stderrestr);
+}')
+fun
+}
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/prompt/module.Rd
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/prompt/module.Rd	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/prompt/module.Rd	(revision 2477)
@@ -0,0 +1,27 @@
+\name{NAME}
+\alias{NAME}
+\title{
+	Rcpp module: %% ~~ Name of the module ~~
+}
+\description{
+	Rcpp module %%  ~~ A concise description of the module ~~
+}
+\details{
+	The module contains the following items: 
+	
+	FUNCTIONS 
+	
+	CLASSES
+}
+\source{
+%% ~~ reference to a publication or URL ~~
+%% ~~ perhaps a reference to the project page of the c++ code being exposed ~~
+}
+\references{
+%% ~~ possibly secondary sources and usages ~~
+%% ~~ perhaps references to the C++ code that the module exposes ~~
+}
+\examples{
+show( NAME )
+}
+\keyword{datasets}
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/proxy/SlotProxy.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/proxy/SlotProxy.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/proxy/SlotProxy.h	(revision 2477)
@@ -0,0 +1,103 @@
+// Copyright (C) 2013 Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp_proxy_SlotProxy_h
+#define Rcpp_proxy_SlotProxy_h
+
+namespace Rcpp{
+
+template <typename CLASS>
+class SlotProxyPolicy {
+public:
+
+    class SlotProxy : public GenericProxy<SlotProxy>{
+    public:
+        SlotProxy( CLASS& v, const std::string& name) : parent(v), slot_name(Rf_install(name.c_str())) {
+            if( !R_has_slot( v, slot_name) ){
+                throw no_such_slot() ;
+            }
+        }
+
+        SlotProxy& operator=(const SlotProxy& rhs){
+            set( rhs.get() ) ;
+            return *this ;
+        }
+
+        template <typename T> SlotProxy& operator=(const T& rhs);
+
+        template <typename T> operator T() const;
+        inline operator SEXP() const {
+            return get() ;
+        }
+
+    private:
+        CLASS& parent;
+        SEXP slot_name ;
+
+        SEXP get() const {
+            return R_do_slot( parent, slot_name ) ;
+        }
+        void set(SEXP x ) {
+            parent = R_do_slot_assign(parent, slot_name, x);
+        }
+    } ;
+
+    class const_SlotProxy : public GenericProxy<const_SlotProxy> {
+    public:
+        const_SlotProxy( const CLASS& v, const std::string& name) : parent(v), slot_name(Rf_install(name.c_str())) {
+            if( !R_has_slot( v, slot_name) ){
+                throw no_such_slot() ;
+            }
+        }
+
+        template <typename T> operator T() const {
+          return as<T>( get() );
+        }
+        inline operator SEXP() const {
+            return get() ;
+        }
+
+    private:
+        const CLASS& parent;
+        SEXP slot_name ;
+
+        SEXP get() const {
+            return R_do_slot( parent, slot_name ) ;
+        }
+    } ;
+
+    SlotProxy slot(const std::string& name){
+        SEXP x = static_cast<CLASS&>(*this) ;
+        if( !Rf_isS4(x) ) throw not_s4() ;
+        return SlotProxy( static_cast<CLASS&>(*this) , name ) ;
+    }
+    const_SlotProxy slot(const std::string& name) const {
+        SEXP x = static_cast<const CLASS&>(*this) ;
+        if( !Rf_isS4(x) ) throw not_s4() ;
+        return const_SlotProxy( static_cast<const CLASS&>(*this) , name ) ;
+    }
+
+    bool hasSlot(const std::string& name) const{
+        SEXP x = static_cast<const CLASS&>(*this).get__() ;
+        if( !Rf_isS4(x) ) throw not_s4() ;
+        return R_has_slot( x, Rf_mkString(name.c_str()) ) ;
+    }
+
+} ;
+
+}
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/proxy/AttributeProxy.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/proxy/AttributeProxy.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/proxy/AttributeProxy.h	(revision 2477)
@@ -0,0 +1,105 @@
+// Copyright (C) 2013 Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp_proxy_AttributeProxy_h
+#define Rcpp_proxy_AttributeProxy_h
+
+namespace Rcpp{
+
+template <typename CLASS>
+class AttributeProxyPolicy {
+public:
+
+    class AttributeProxy : public GenericProxy<AttributeProxy> {
+    public:
+        AttributeProxy( CLASS& v, const std::string& name)
+            : parent(v), attr_name(Rf_install(name.c_str()))
+        {}
+
+        AttributeProxy& operator=(const AttributeProxy& rhs){
+            if( this != &rhs ) set( rhs.get() ) ;
+            return *this ;
+        }
+
+        template <typename T> AttributeProxy& operator=(const T& rhs);
+
+        template <typename T> operator T() const;
+
+        inline operator SEXP() const;
+
+    private:
+        CLASS& parent;
+        SEXP attr_name ;
+
+        SEXP get() const {
+            return Rf_getAttrib( parent, attr_name ) ;
+        }
+        void set(SEXP x ){
+            Rf_setAttrib( parent, attr_name, x ) ;
+        }
+    } ;
+
+    class const_AttributeProxy : public GenericProxy<const_AttributeProxy> {
+    public:
+        const_AttributeProxy( const CLASS& v, const std::string& name)
+            : parent(v), attr_name(Rf_install(name.c_str())){}
+
+        template <typename T> operator T() const;
+        inline operator SEXP() const;
+
+    private:
+        const CLASS& parent;
+        SEXP attr_name ;
+
+        SEXP get() const {
+            return Rf_getAttrib( parent, attr_name ) ;
+        }
+    } ;
+
+    AttributeProxy attr( const std::string& name){
+        return AttributeProxy( static_cast<CLASS&>( *this ), name ) ;
+    }
+    const_AttributeProxy attr( const std::string& name) const {
+        return const_AttributeProxy( static_cast<const CLASS&>( *this ), name ) ;
+    }
+
+    std::vector<std::string> attributeNames() const {
+        std::vector<std::string> v ;
+        SEXP attrs = ATTRIB( static_cast<const CLASS&>(*this).get__());
+        while( attrs != R_NilValue ){
+            v.push_back( std::string(CHAR(PRINTNAME(TAG(attrs)))) ) ;
+            attrs = CDR( attrs ) ;
+        }
+        return v ;
+    }
+
+    bool hasAttribute( const std::string& attr) const {
+        SEXP attrs = ATTRIB(static_cast<const CLASS&>(*this).get__());
+        while( attrs != R_NilValue ){
+            if( attr == CHAR(PRINTNAME(TAG(attrs))) ){
+                return true ;
+            }
+            attrs = CDR( attrs ) ;
+        }
+        return false; /* give up */
+    }
+
+
+} ;
+
+}
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/proxy/FieldProxy.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/proxy/FieldProxy.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/proxy/FieldProxy.h	(revision 2477)
@@ -0,0 +1,84 @@
+// Copyright (C) 2013 Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp_FieldProxy_h
+#define Rcpp_FieldProxy_h
+
+namespace Rcpp{
+
+template <typename CLASS>
+class FieldProxyPolicy {
+public:
+
+    class FieldProxy : public GenericProxy<FieldProxy> {
+    public:
+        FieldProxy( CLASS& v, const std::string& name) :
+            parent(v), field_name(name) {}
+
+        FieldProxy& operator=(const FieldProxy& rhs);
+
+        template <typename T> FieldProxy& operator=(const T& rhs);
+
+        template <typename T> operator T() const;
+        inline operator SEXP() const { return get(); }
+
+    private:
+        CLASS& parent;
+        const std::string& field_name ;
+
+        SEXP get() const {
+            Shield<SEXP> call( Rf_lang3( R_DollarSymbol, parent, Rf_mkString(field_name.c_str()) ) ) ;
+            return Rcpp_eval( call, R_GlobalEnv ) ;
+        }
+        void set(SEXP x ) {
+            SEXP dollarGetsSym = Rf_install( "$<-");
+            Shield<SEXP> call( Rf_lang4( dollarGetsSym, parent, Rf_mkString(field_name.c_str()) , x ) ) ;
+            parent.set__( Rcpp_eval( call, R_GlobalEnv ) );
+        }
+    } ;
+
+    class const_FieldProxy : public GenericProxy<const_FieldProxy> {
+    public:
+        const_FieldProxy( const CLASS& v, const std::string& name) :
+            parent(v), field_name(name) {}
+
+        template <typename T> operator T() const;
+        inline operator SEXP() const {
+            return get() ;
+        }
+
+    private:
+        const CLASS& parent;
+        const std::string& field_name ;
+
+        SEXP get() const {
+            Shield<SEXP> call( Rf_lang3( R_DollarSymbol, parent, Rf_mkString(field_name.c_str()) ) ) ;
+            return Rcpp_eval( call, R_GlobalEnv ) ;
+        }
+    } ;
+
+    FieldProxy field(const std::string& name){
+        return FieldProxy( static_cast<CLASS&>(*this), name ) ;
+    }
+    const_FieldProxy field(const std::string& name) const {
+        return const_FieldProxy( static_cast<const CLASS&>(*this), name ) ;
+    }
+
+} ;
+
+}
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/proxy/NamesProxy.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/proxy/NamesProxy.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/proxy/NamesProxy.h	(revision 2477)
@@ -0,0 +1,93 @@
+// Copyright (C) 2013 Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp_proxy_NamesProxy_h
+#define Rcpp_proxy_NamesProxy_h
+
+namespace Rcpp{
+
+template <typename CLASS>
+class NamesProxyPolicy{
+public:
+
+    class NamesProxy : public GenericProxy<NamesProxy> {
+    public:
+        NamesProxy( CLASS& v) : parent(v){} ;
+
+        /* lvalue uses */
+        NamesProxy& operator=(const NamesProxy& rhs) {
+            if( this != &rhs) set( rhs.get() ) ;
+            return *this ;
+        }
+
+        template <typename T>
+        NamesProxy& operator=(const T& rhs);
+
+        template <typename T> operator T() const;
+
+    private:
+        CLASS& parent;
+
+        SEXP get() const {
+            return RCPP_GET_NAMES(parent.get__()) ;
+        }
+
+        void set(SEXP x) {
+            /* check if we can use a fast version */
+            if( TYPEOF(x) == STRSXP && parent.size() == Rf_length(x) ){
+                SEXP y = parent.get__() ;
+                Rf_setAttrib( y, R_NamesSymbol, x ) ;
+            } else {
+                /* use the slower and more flexible version (callback to R) */
+                SEXP namesSym = Rf_install( "names<-" );
+                Shield<SEXP> new_vec( Rcpp_eval(Rf_lang3( namesSym, parent, x ))) ;
+                parent.set__(new_vec);
+            }
+
+        }
+
+    } ;
+
+    class const_NamesProxy : public GenericProxy<const_NamesProxy>{
+    public:
+        const_NamesProxy( const CLASS& v) : parent(v){} ;
+
+        template <typename T> operator T() const;
+
+    private:
+        const CLASS& parent;
+
+        SEXP get() const {
+            return RCPP_GET_NAMES(parent.get__()) ;
+        }
+
+    } ;
+
+    NamesProxy names() {
+        return NamesProxy( static_cast<CLASS&>(*this) ) ;
+    }
+
+    const_NamesProxy names() const {
+        return const_NamesProxy(static_cast<const CLASS&>(*this) ) ;
+    }
+
+
+} ;
+
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/proxy/Binding.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/proxy/Binding.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/proxy/Binding.h	(revision 2477)
@@ -0,0 +1,109 @@
+// Copyright (C) 2013 Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp_proxy_EnvironmentBinding_h
+#define Rcpp_proxy_EnvironmentBinding_h
+
+namespace Rcpp{
+
+template <typename EnvironmentClass>
+class BindingPolicy {
+public:
+
+    class Binding : public GenericProxy<Binding> {
+    public:
+        Binding( EnvironmentClass& env_, const std::string& name_) :
+            env(env_), name(name_){}
+
+        inline bool active() const {
+            return env.bindingIsActive(name) ;
+        }
+        inline bool locked() const {
+            return env.bindingIsLocked(name) ;
+        }
+        inline bool exists() const {
+            return env.exists(name) ;
+        }
+        void lock() {
+            env.lockBinding(name) ;
+        }
+        void unlock(){
+            env.unlockBinding(name) ;
+        }
+        Binding& operator=(const Binding& rhs){
+            if( *this != rhs )
+                set( rhs.get() ) ;
+            return *this ;
+        }
+
+        template <typename WRAPPABLE>
+        Binding& operator=(const WRAPPABLE& rhs);
+
+        template <typename T> operator T() const;
+
+    private:
+
+        SEXP get() const {
+            return env.get( name ) ;
+        }
+
+        void set( SEXP x){
+            env.assign(name, x ) ;
+        }
+
+        EnvironmentClass& env ;
+        std::string name ;
+    } ;
+
+    class const_Binding : public GenericProxy<const_Binding> {
+    public:
+        const_Binding( const EnvironmentClass& env_, const std::string& name_) :
+            env(env_), name(name_){}
+
+        inline bool active() const {
+            return env.bindingIsActive(name) ;
+        }
+        inline bool locked() const {
+            return env.bindingIsLocked(name) ;
+        }
+        inline bool exists() const {
+            return env.exists(name) ;
+        }
+        template <typename T> operator T() const;
+
+    private:
+
+        SEXP get() const {
+            return env.get( name ) ;
+        }
+
+        const EnvironmentClass& env ;
+        std::string name ;
+    } ;
+
+    const_Binding operator[]( const std::string& name) const {
+        return const_Binding( static_cast<const EnvironmentClass&>(*this), name ) ;
+    }
+    Binding operator[](const std::string& name){
+        return Binding( static_cast<EnvironmentClass&>(*this), name ) ;
+    }
+
+} ;
+
+
+}
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/proxy/ProtectedProxy.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/proxy/ProtectedProxy.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/proxy/ProtectedProxy.h	(revision 2477)
@@ -0,0 +1,96 @@
+// Copyright (C) 2013 Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp_ProtectedProxy_h
+#define Rcpp_ProtectedProxy_h
+
+namespace Rcpp{
+
+    template <typename T> T as(SEXP x);
+
+    template <class XPtrClass>
+    class ProtectedProxyPolicy{
+    public:
+
+        class ProtectedProxy : public GenericProxy<ProtectedProxy> {
+        public:
+            ProtectedProxy( XPtrClass& xp_ ): xp(xp_){}
+
+            template <typename U>
+            ProtectedProxy& operator=( const U& u) {
+              set( wrap( u ) );
+              return *this;
+            }
+
+            template <typename U>
+            operator U() const {
+              return as<U>( get() );
+            }
+
+            operator SEXP() const{
+                return get() ;
+            }
+
+        private:
+            XPtrClass& xp ;
+
+            inline SEXP get() const {
+                return R_ExternalPtrProtected(xp) ;
+            }
+
+            inline void set( SEXP x){
+                R_SetExternalPtrProtected( xp, x ) ;
+            }
+
+        } ;
+
+        class const_ProtectedProxy : public GenericProxy<const_ProtectedProxy>{
+        public:
+            const_ProtectedProxy( const XPtrClass& xp_ ): xp(xp_){}
+
+            template <typename U>
+            operator U() const {
+              return as<U>( get() );
+            }
+
+            operator SEXP() const{
+                return get() ;
+            }
+
+        private:
+            const XPtrClass& xp ;
+
+            inline SEXP get() const {
+                return R_ExternalPtrProtected(xp) ;
+            }
+
+        } ;
+
+	    ProtectedProxy prot(){
+	        return ProtectedProxy( static_cast<XPtrClass&>(*this) ) ;
+	    }
+
+	    const_ProtectedProxy prot() const{
+	        return const_ProtectedProxy( static_cast<const XPtrClass&>(*this) ) ;
+	    }
+
+
+    } ;
+
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/proxy/RObjectMethods.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/proxy/RObjectMethods.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/proxy/RObjectMethods.h	(revision 2477)
@@ -0,0 +1,47 @@
+// Copyright (C) 2013 Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp_proxy_RObjectMethods_h
+#define Rcpp_proxy_RObjectMethods_h
+
+namespace Rcpp{
+
+    template <typename Class>
+    class RObjectMethods{
+    public:
+
+        inline bool isNULL() const{
+            return Rf_isNull( static_cast<const Class&>(*this) ) ;
+        }
+
+        inline int sexp_type() const {
+            return TYPEOF( static_cast<const Class&>(*this) ) ;
+        }
+
+        inline bool isObject() const {
+            return Rf_isObject( static_cast<const Class&>(*this) ) ;
+        }
+
+        inline bool isS4() const {
+            return Rf_isS4( static_cast<const Class&>(*this) ) ;
+        }
+
+    } ;
+
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/proxy/TagProxy.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/proxy/TagProxy.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/proxy/TagProxy.h	(revision 2477)
@@ -0,0 +1,85 @@
+// Copyright (C) 2013 Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp_TagProxy_h
+#define Rcpp_TagProxy_h
+
+namespace Rcpp{
+
+    template <typename XPtrClass>
+    class TagProxyPolicy {
+    public:
+
+        class TagProxy : public GenericProxy<TagProxy>{
+        public:
+            TagProxy( XPtrClass& xp_ ): xp(xp_){}
+
+            template <typename U>
+            TagProxy& operator=( const U& u);
+
+            template <typename U>
+            operator U() const;
+
+            operator SEXP() const;
+
+
+        private:
+            XPtrClass& xp ;
+
+            inline SEXP get() const {
+                return R_ExternalPtrTag(xp) ;
+            }
+
+            inline void set( SEXP x){
+                R_SetExternalPtrTag( xp, x ) ;
+            }
+
+        } ;
+
+        class const_TagProxy : public GenericProxy<const_TagProxy>{
+        public:
+            const_TagProxy( XPtrClass& xp_ ): xp(xp_){}
+
+            template <typename U>
+            operator U() const;
+
+            operator SEXP() const;
+
+
+        private:
+            XPtrClass& xp ;
+
+            inline SEXP get() const {
+                return R_ExternalPtrTag(xp) ;
+            }
+
+        } ;
+
+
+        TagProxy tag(){
+            return TagProxy( static_cast<XPtrClass&>(*this) ) ;
+        }
+
+        const_TagProxy tag() const {
+            return TagProxy( static_cast<const XPtrClass&>(*this) ) ;
+        }
+
+
+    } ;
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/proxy/GenericProxy.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/proxy/GenericProxy.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/proxy/GenericProxy.h	(revision 2477)
@@ -0,0 +1,32 @@
+// Copyright (C) 2013 Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp_proxy_GenericProxy_h
+#define Rcpp_proxy_GenericProxy_h
+
+namespace Rcpp{
+
+template <typename Proxy>
+struct GenericProxy {
+    inline SEXP get() const {
+        return static_cast<const Proxy&>(*this) ;
+    }
+} ;
+
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/proxy/DottedPairProxy.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/proxy/DottedPairProxy.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/proxy/DottedPairProxy.h	(revision 2477)
@@ -0,0 +1,105 @@
+// Copyright (C) 2013 Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp_DottedPairProxy_h
+#define Rcpp_DottedPairProxy_h
+
+namespace Rcpp{
+
+template <typename CLASS>
+class DottedPairProxyPolicy {
+public:
+
+    	class DottedPairProxy : public GenericProxy<DottedPairProxy> {
+	public:
+		DottedPairProxy( CLASS& v, int index_ ): node(R_NilValue){
+            if( index_ >= v.length() ) throw index_out_of_bounds() ;
+            SEXP x = v ; /* implicit conversion */
+            for( int i = 0; i<index_; i++, x = CDR(x) ) ;
+            node = x ;
+        }
+
+		DottedPairProxy& operator=(const DottedPairProxy& rhs) {
+		    return set(rhs.get());
+		}
+		DottedPairProxy& operator=(SEXP rhs) {
+		    return set(rhs) ;
+		}
+
+		template <typename T>
+		DottedPairProxy& operator=(const T& rhs);
+
+		template <typename T>
+		DottedPairProxy& operator=(const traits::named_object<T>& rhs);
+
+		template <typename T> operator T() const;
+
+		inline SEXP get() const {
+		    return CAR(node);
+		}
+		inline operator SEXP() const {
+		    return get() ;
+		}
+		inline DottedPairProxy& set(SEXP x){
+		    SETCAR( node, x ) ;
+		    return *this ;
+		}
+		inline DottedPairProxy& set(SEXP x, const char* name){
+            SETCAR( node, x ) ;
+            SEXP rhsNameSym = ::Rf_install( name );
+            SET_TAG( node, rhsNameSym ) ;
+            return *this ;
+		}
+
+	private:
+		SEXP node ;
+	} ;
+
+	class const_DottedPairProxy : public GenericProxy<const_DottedPairProxy>{
+	public:
+		const_DottedPairProxy( const CLASS& v, int index_ ): node(R_NilValue){
+            if( index_ >= v.length() ) throw index_out_of_bounds() ;
+            SEXP x = v ; /* implicit conversion */
+            for( int i = 0; i<index_; i++, x = CDR(x) ) ;
+            node = x ;
+        }
+
+		template <typename T> operator T() const;
+
+		inline SEXP get() const {
+		    return CAR(node);
+		}
+		inline operator SEXP() const {
+		    return get() ;
+		}
+
+	private:
+		SEXP node ;
+	} ;
+
+
+    DottedPairProxy operator[]( int i){
+        return DottedPairProxy( static_cast<CLASS&>(*this), i ) ;
+    }
+    const_DottedPairProxy operator[](int i) const{
+        return const_DottedPairProxy( static_cast<const CLASS&>(*this), i ) ;
+    }
+
+} ;
+
+}
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/proxy/proxy.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/proxy/proxy.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/proxy/proxy.h	(revision 2477)
@@ -0,0 +1,32 @@
+// Copyright (C) 2013 Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp_proxy_proxy_h
+
+#include <Rcpp/proxy/GenericProxy.h>
+
+#include <Rcpp/proxy/NamesProxy.h>
+#include <Rcpp/proxy/RObjectMethods.h>
+#include <Rcpp/proxy/AttributeProxy.h>
+#include <Rcpp/proxy/TagProxy.h>
+#include <Rcpp/proxy/ProtectedProxy.h>
+#include <Rcpp/proxy/SlotProxy.h>
+#include <Rcpp/proxy/Binding.h>
+#include <Rcpp/proxy/FieldProxy.h>
+#include <Rcpp/proxy/DottedPairProxy.h>
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/macros/unroll.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/macros/unroll.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/macros/unroll.h	(revision 2477)
@@ -0,0 +1,89 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// unroll.h: Rcpp R/C++ interface class library -- loop unrolling macro
+//
+// Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__macros_unroll_h
+#define Rcpp__macros_unroll_h
+
+#define RCPP_LOOP_UNROLL_PTR(TARGET,SOURCE)    \
+int __trip_count = n >> 2 ;                    \
+int i = 0 ;                                    \
+for ( ; __trip_count > 0 ; --__trip_count) {   \
+	*TARGET++ = SOURCE[i++] ;                  \
+	*TARGET++ = SOURCE[i++] ;                  \
+	*TARGET++ = SOURCE[i++] ;                  \
+	*TARGET++ = SOURCE[i++] ;                  \
+}                                              \
+switch (n - i){                                \
+  case 3:                                      \
+    *TARGET++ = SOURCE[i++] ;                  \
+  case 2:                                      \
+    *TARGET++ = SOURCE[i++] ;                  \
+  case 1:                                      \
+    *TARGET++ = SOURCE[i++] ;                  \
+  case 0:                                      \
+  default:                                     \
+      {}                                       \
+}
+
+
+#define RCPP_LOOP_UNROLL(TARGET,SOURCE)           \
+int __trip_count = n >> 2 ;                       \
+int i = 0 ;                                       \
+for ( ; __trip_count > 0 ; --__trip_count) {      \
+	TARGET[i] = SOURCE[i] ; i++ ;                 \
+	TARGET[i] = SOURCE[i] ; i++ ;                 \
+	TARGET[i] = SOURCE[i] ; i++ ;                 \
+	TARGET[i] = SOURCE[i] ; i++ ;                 \
+}                                                 \
+switch (n - i){                                   \
+  case 3:                                         \
+      TARGET[i] = SOURCE[i] ; i++ ;               \
+  case 2:                                         \
+      TARGET[i] = SOURCE[i] ; i++ ;               \
+  case 1:                                         \
+      TARGET[i] = SOURCE[i] ; i++ ;               \
+  case 0:                                         \
+  default:                                        \
+      {}                                          \
+}
+
+#define RCPP_LOOP_UNROLL_LHSFUN(TARGET,FUN,SOURCE)           \
+int __trip_count = n >> 2 ;                       \
+int i = 0 ;                                       \
+for ( ; __trip_count > 0 ; --__trip_count) {      \
+	TARGET[FUN(i)] = SOURCE[i] ; i++ ;                 \
+	TARGET[FUN(i)] = SOURCE[i] ; i++ ;                 \
+	TARGET[FUN(i)] = SOURCE[i] ; i++ ;                 \
+	TARGET[FUN(i)] = SOURCE[i] ; i++ ;                 \
+}                                                 \
+switch (n - i){                                   \
+  case 3:                                         \
+      TARGET[FUN(i)] = SOURCE[i] ; i++ ;               \
+  case 2:                                         \
+      TARGET[FUN(i)] = SOURCE[i] ; i++ ;               \
+  case 1:                                         \
+      TARGET[FUN(i)] = SOURCE[i] ; i++ ;               \
+  case 0:                                         \
+  default:                                        \
+      {}                                          \
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/macros/dispatch.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/macros/dispatch.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/macros/dispatch.h	(revision 2477)
@@ -0,0 +1,108 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// dispatch.h: Rcpp R/C++ interface class library -- macros for dispatch
+//
+// Copyright (C) 2012 - 2016  Dirk Eddelbuettel and Romain Francois
+// Copyright (C) 2016         Dirk Eddelbuettel, Romain Francois, Artem Klevtsov and Nathan Russell
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__macros__dispatch_h
+#define Rcpp__macros__dispatch_h
+
+//  The variadic macros below incorporate techniques presented by 
+//  Stack Overflow user Richard Hansen in this answer
+//
+//      http://stackoverflow.com/a/11172679/1869097 
+//
+//  and are necessary to avoid the use of GNU compiler extensions.
+
+#ifdef RCPP_USING_CXX11
+
+#define ___RCPP_HANDLE_CASE___(___RTYPE___, ___FUN___, ___RCPPTYPE___, ...)                         \
+  case ___RTYPE___:                                                                                 \
+    return ___FUN___(::Rcpp::___RCPPTYPE___<___RTYPE___>(RCPP_MACRO_FIRST(__VA_ARGS__))             \
+            RCPP_MACRO_REST(__VA_ARGS__));
+
+
+#define ___RCPP_RETURN___(__FUN__, __RCPPTYPE__, ...)                                               \
+  SEXP __TMP__ = RCPP_MACRO_FIRST(__VA_ARGS__);                                                     \
+  switch (TYPEOF(__TMP__)) {                                                                        \
+    ___RCPP_HANDLE_CASE___(INTSXP, __FUN__, __RCPPTYPE__, __VA_ARGS__)                              \
+    ___RCPP_HANDLE_CASE___(REALSXP, __FUN__, __RCPPTYPE__, __VA_ARGS__)                             \
+    ___RCPP_HANDLE_CASE___(RAWSXP, __FUN__, __RCPPTYPE__, __VA_ARGS__)                              \
+    ___RCPP_HANDLE_CASE___(LGLSXP, __FUN__, __RCPPTYPE__, __VA_ARGS__)                              \
+    ___RCPP_HANDLE_CASE___(CPLXSXP, __FUN__, __RCPPTYPE__, __VA_ARGS__)                             \
+    ___RCPP_HANDLE_CASE___(STRSXP, __FUN__, __RCPPTYPE__, __VA_ARGS__)                              \
+    ___RCPP_HANDLE_CASE___(VECSXP, __FUN__, __RCPPTYPE__, __VA_ARGS__)                              \
+    ___RCPP_HANDLE_CASE___(EXPRSXP, __FUN__, __RCPPTYPE__, __VA_ARGS__)                             \
+  default:                                                                                          \
+    throw std::range_error("Not a vector");                                                         \
+  }
+
+
+#define RCPP_RETURN_VECTOR(_FUN_, ...)                                                              \
+  ___RCPP_RETURN___(_FUN_, Vector, __VA_ARGS__)
+#define RCPP_RETURN_MATRIX(_FUN_, ...)                                                              \
+  ___RCPP_RETURN___(_FUN_, Matrix, __VA_ARGS__)
+
+
+#define RCPP_MACRO_FIRST(...)                      RCPP_MACRO_FIRST_HELPER(__VA_ARGS__, throwaway)
+#define RCPP_MACRO_FIRST_HELPER(first, ...)        first
+
+#define RCPP_MACRO_REST(...)                       RCPP_MACRO_REST_HELPER(RCPP_MACRO_NUM(__VA_ARGS__), __VA_ARGS__)
+#define RCPP_MACRO_REST_HELPER(qty, ...)           RCPP_MACRO_REST_HELPER2(qty, __VA_ARGS__)
+#define RCPP_MACRO_REST_HELPER2(qty, ...)          RCPP_MACRO_REST_HELPER_##qty(__VA_ARGS__)
+#define RCPP_MACRO_REST_HELPER_ONE(first)
+#define RCPP_MACRO_REST_HELPER_TWOORMORE(first, ...) , __VA_ARGS__
+#define RCPP_MACRO_NUM(...)                                                                         \
+    RCPP_MACRO_SELECT_25TH(__VA_ARGS__, TWOORMORE, TWOORMORE, TWOORMORE, TWOORMORE,                 \
+                TWOORMORE, TWOORMORE, TWOORMORE, TWOORMORE, TWOORMORE,                              \
+                TWOORMORE, TWOORMORE, TWOORMORE, TWOORMORE, TWOORMORE,                              \
+                TWOORMORE, TWOORMORE, TWOORMORE, TWOORMORE, TWOORMORE,                              \
+                TWOORMORE, TWOORMORE, TWOORMORE, TWOORMORE, ONE, throwaway)
+#define RCPP_MACRO_SELECT_25TH(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12,                   \
+    a13, a14, a15, a16, a17, a18, a19, a20, a21, a22, a23, a24, a25, ...)           a25
+
+#else
+
+#define ___RCPP_HANDLE_CASE___(___RTYPE___, ___FUN___, ___OBJECT___,           \
+                               ___RCPPTYPE___)                                 \
+  case ___RTYPE___:                                                            \
+    return ___FUN___(::Rcpp::___RCPPTYPE___<___RTYPE___>(___OBJECT___));
+
+#define ___RCPP_RETURN___(__FUN__, __SEXP__, __RCPPTYPE__)                     \
+  SEXP __TMP__ = __SEXP__;                                                     \
+  switch (TYPEOF(__TMP__)) {                                                   \
+    ___RCPP_HANDLE_CASE___(INTSXP, __FUN__, __TMP__, __RCPPTYPE__)             \
+    ___RCPP_HANDLE_CASE___(REALSXP, __FUN__, __TMP__, __RCPPTYPE__)            \
+    ___RCPP_HANDLE_CASE___(RAWSXP, __FUN__, __TMP__, __RCPPTYPE__)             \
+    ___RCPP_HANDLE_CASE___(LGLSXP, __FUN__, __TMP__, __RCPPTYPE__)             \
+    ___RCPP_HANDLE_CASE___(CPLXSXP, __FUN__, __TMP__, __RCPPTYPE__)            \
+    ___RCPP_HANDLE_CASE___(STRSXP, __FUN__, __TMP__, __RCPPTYPE__)             \
+    ___RCPP_HANDLE_CASE___(VECSXP, __FUN__, __TMP__, __RCPPTYPE__)             \
+    ___RCPP_HANDLE_CASE___(EXPRSXP, __FUN__, __TMP__, __RCPPTYPE__)            \
+  default:                                                                     \
+    throw std::range_error("Not a vector");                                    \
+  }
+
+#define RCPP_RETURN_VECTOR(_FUN_, _SEXP_)                                      \
+  ___RCPP_RETURN___(_FUN_, _SEXP_, Vector)
+#define RCPP_RETURN_MATRIX(_FUN_, _SEXP_)                                      \
+  ___RCPP_RETURN___(_FUN_, _SEXP_, Matrix)
+#endif
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/macros/interface.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/macros/interface.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/macros/interface.h	(revision 2477)
@@ -0,0 +1,56 @@
+// Copyright (C) 2013 Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp_macros_interface_h
+#define Rcpp_macros_interface_h
+
+#define RCPP_GENERATE_CTOR_ASSIGN(__CLASS__)                                   \
+typedef StoragePolicy<__CLASS__> Storage ;                                     \
+typedef AttributeProxyPolicy<__CLASS__> AttributePolicy ;                      \
+RCPP_CTOR_ASSIGN(__CLASS__)
+
+#define RCPP_CTOR_ASSIGN(__CLASS__)                                            \
+__CLASS__( const __CLASS__& other ){                                           \
+    Storage::copy__(other) ;                                                   \
+}                                                                              \
+__CLASS__& operator=(const __CLASS__& rhs) {                                   \
+    return Storage::copy__(rhs) ;                                              \
+}                                                                              \
+template <typename Proxy>                                                      \
+__CLASS__( const GenericProxy<Proxy>& proxy ){                                 \
+    Storage::set__( proxy.get() ) ;                                            \
+}
+
+#define RCPP_CTOR_ASSIGN_WITH_BASE(__CLASS__)                                  \
+  __CLASS__( const __CLASS__& other ) : Base(other) {			       \
+}                                                                              \
+__CLASS__& operator=(const __CLASS__& rhs) {                                   \
+    return Storage::copy__(rhs) ;                                              \
+}                                                                              \
+template <typename Proxy>                                                      \
+__CLASS__( const GenericProxy<Proxy>& proxy ){                                 \
+    Storage::set__( proxy.get() ) ;                                            \
+}
+
+#define RCPP_API_CLASS(__CLASS__)                                              \
+template < template <class> class StoragePolicy > class __CLASS__ :            \
+    public StoragePolicy<__CLASS__<StoragePolicy> >,                           \
+    public SlotProxyPolicy<__CLASS__<StoragePolicy> >,                         \
+    public AttributeProxyPolicy<__CLASS__<StoragePolicy> >,                    \
+    public RObjectMethods< __CLASS__<StoragePolicy> >
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/macros/macros.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/macros/macros.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/macros/macros.h	(revision 2477)
@@ -0,0 +1,90 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+//
+// macros.h: Rcpp R/C++ interface class library -- Rcpp macros
+//
+// Copyright (C) 2012 - 2015 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp_macros_macros_h
+#define Rcpp_macros_macros_h
+
+#define RCPP_DECORATE(__FUN__) __FUN__##__rcpp__wrapper__
+#define RCPP_GET_NAMES(x) Rf_getAttrib(x, R_NamesSymbol)
+#define RCPP_GET_CLASS(x) Rf_getAttrib(x, R_ClassSymbol)
+
+#ifndef BEGIN_RCPP
+#define BEGIN_RCPP                                                                               \
+    int rcpp_output_type = 0 ;                                                                   \
+    SEXP rcpp_output_condition = R_NilValue ;                                                    \
+    try {
+#endif
+
+#ifndef VOID_END_RCPP
+#define VOID_END_RCPP                                                                            \
+    }                                                                                            \
+    catch( Rcpp::internal::InterruptedException &__ex__) {                                       \
+        rcpp_output_type = 1 ;                                                                   \
+    }                                                                                            \
+    catch( std::exception& __ex__ ){                                                             \
+       rcpp_output_type = 2 ;                                                                    \
+       rcpp_output_condition = PROTECT(exception_to_r_condition(__ex__)) ;                       \
+    } catch( ... ){                                                                              \
+       rcpp_output_type = 2 ;                                                                    \
+       rcpp_output_condition = PROTECT(string_to_try_error("c++ exception (unknown reason)")) ;  \
+    }                                                                                            \
+    if( rcpp_output_type == 1 ){                                                                 \
+       Rf_onintr() ;                                                                             \
+    }                                                                                            \
+    if( rcpp_output_type == 2 ){                                                                 \
+       SEXP stop_sym  = Rf_install( "stop" ) ;                                                   \
+       SEXP expr = PROTECT( Rf_lang2( stop_sym , rcpp_output_condition ) ) ;                     \
+       Rf_eval( expr, R_GlobalEnv ) ;                                                            \
+    }
+#endif
+
+#ifndef END_RCPP
+#define END_RCPP VOID_END_RCPP return R_NilValue;
+#endif
+
+#ifndef END_RCPP_RETURN_ERROR
+#define END_RCPP_RETURN_ERROR                                                  \
+  }                                                                            \
+  catch (Rcpp::internal::InterruptedException &__ex__) {                       \
+    return Rcpp::internal::interruptedError();                                 \
+  }                                                                            \
+  catch (std::exception &__ex__) {                                             \
+    return exception_to_try_error(__ex__);                                     \
+  }                                                                            \
+  catch (...) {                                                                \
+    return string_to_try_error("c++ exception (unknown reason)");              \
+  }                                                                            \
+  return R_NilValue;
+#endif
+
+#define Rcpp_error(MESSAGE) throw Rcpp::exception(MESSAGE, __FILE__, __LINE__)
+
+#include <Rcpp/macros/debug.h>
+#include <Rcpp/macros/unroll.h>
+#include <Rcpp/macros/dispatch.h>
+#include <Rcpp/macros/xp.h>
+#include <Rcpp/macros/traits.h>
+#include <Rcpp/macros/config.hpp>
+#include <Rcpp/macros/cat.hpp>
+#include <Rcpp/macros/module.h>
+#include <Rcpp/macros/interface.h>
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/macros/config.hpp
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/macros/config.hpp	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/macros/config.hpp	(revision 2477)
@@ -0,0 +1,70 @@
+# /* **************************************************************************
+#  *                                                                          *
+#  *     (C) Copyright Paul Mensonides 2002.
+#  *     Distributed under the Boost Software License, Version 1.0. (See
+#  *     accompanying file LICENSE_1_0.txt or copy at
+#  *     http://www.boost.org/LICENSE_1_0.txt)
+#  *                                                                          *
+#  ************************************************************************** */
+#
+# /* See http://www.boost.org for most recent version. */
+#
+# ifndef RCPP_PREPROCESSOR_CONFIG_CONFIG_HPP
+# define RCPP_PREPROCESSOR_CONFIG_CONFIG_HPP
+#
+# /* RCPP_PP_CONFIG_FLAGS */
+#
+# define RCPP_PP_CONFIG_STRICT() 0x0001
+# define RCPP_PP_CONFIG_IDEAL() 0x0002
+#
+# define RCPP_PP_CONFIG_MSVC() 0x0004
+# define RCPP_PP_CONFIG_MWCC() 0x0008
+# define RCPP_PP_CONFIG_BCC() 0x0010
+# define RCPP_PP_CONFIG_EDG() 0x0020
+# define RCPP_PP_CONFIG_DMC() 0x0040
+#
+# ifndef RCPP_PP_CONFIG_FLAGS
+#    if defined(__GCCXML__)
+#        define RCPP_PP_CONFIG_FLAGS() (RCPP_PP_CONFIG_STRICT())
+#    elif defined(__WAVE__)
+#        define RCPP_PP_CONFIG_FLAGS() (RCPP_PP_CONFIG_STRICT())
+#    elif defined(__MWERKS__) && __MWERKS__ >= 0x3200
+#        define RCPP_PP_CONFIG_FLAGS() (RCPP_PP_CONFIG_STRICT())
+#    elif defined(__EDG__) || defined(__EDG_VERSION__)
+#        if defined(_MSC_VER) && __EDG_VERSION__ >= 308
+#            define RCPP_PP_CONFIG_FLAGS() (RCPP_PP_CONFIG_MSVC())
+#        else
+#            define RCPP_PP_CONFIG_FLAGS() (RCPP_PP_CONFIG_EDG() | RCPP_PP_CONFIG_STRICT())
+#        endif
+#    elif defined(__MWERKS__)
+#        define RCPP_PP_CONFIG_FLAGS() (RCPP_PP_CONFIG_MWCC())
+#    elif defined(__DMC__)
+#        define RCPP_PP_CONFIG_FLAGS() (RCPP_PP_CONFIG_DMC())
+#    elif defined(__BORLANDC__) && __BORLANDC__ >= 0x581
+#        define RCPP_PP_CONFIG_FLAGS() (RCPP_PP_CONFIG_STRICT())
+#    elif defined(__BORLANDC__) || defined(__IBMC__) || defined(__IBMCPP__) || defined(__SUNPRO_CC)
+#        define RCPP_PP_CONFIG_FLAGS() (RCPP_PP_CONFIG_BCC())
+#    elif defined(_MSC_VER)
+#        define RCPP_PP_CONFIG_FLAGS() (RCPP_PP_CONFIG_MSVC())
+#    else
+#        define RCPP_PP_CONFIG_FLAGS() (RCPP_PP_CONFIG_STRICT())
+#    endif
+# endif
+#
+# /* RCPP_PP_CONFIG_EXTENDED_LINE_INFO */
+#
+# ifndef RCPP_PP_CONFIG_EXTENDED_LINE_INFO
+#    define RCPP_PP_CONFIG_EXTENDED_LINE_INFO 0
+# endif
+#
+# /* RCPP_PP_CONFIG_ERRORS */
+#
+# ifndef RCPP_PP_CONFIG_ERRORS
+#    ifdef NDEBUG
+#        define RCPP_PP_CONFIG_ERRORS 0
+#    else
+#        define RCPP_PP_CONFIG_ERRORS 1
+#    endif
+# endif
+#
+# endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/macros/module.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/macros/module.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/macros/module.h	(revision 2477)
@@ -0,0 +1,88 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// macros.h: Rcpp R/C++ interface class library -- helper macros for Rcpp modules
+//
+// Copyright (C) 2012-2013  Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef RCPP_MODULE_MACROS_H
+#define RCPP_MODULE_MACROS_H
+
+/** This macros should be used by packages using modules when a type is used
+ *  as a parameter of a function or method exposed by modules. This defines
+ *  the necessary trait that makes the class as<>'able
+ */
+#define RCPP_EXPOSED_AS(CLASS)                                                \
+    namespace Rcpp{ namespace traits{                                         \
+    template<> struct r_type_traits< CLASS* >{                                \
+        typedef r_type_module_object_pointer_tag r_category ;                 \
+    } ;                                                                       \
+    template<> struct r_type_traits< const CLASS* >{                          \
+        typedef r_type_module_object_const_pointer_tag r_category ;           \
+    } ;                                                                       \
+    template<> struct r_type_traits< CLASS >{                                 \
+        typedef r_type_module_object_tag r_category ;                         \
+    } ;                                                                       \
+    template<> struct r_type_traits< CLASS& >{                                \
+        typedef r_type_module_object_reference_tag r_category ;               \
+    } ;                                                                       \
+    template<> struct r_type_traits< const CLASS& >{                          \
+        typedef r_type_module_object_const_reference_tag r_category ;         \
+    } ;                                                                       \
+    template<> struct input_parameter< CLASS* >{                              \
+        typedef Rcpp::InputParameter<CLASS*> type ;                           \
+    } ;                                                                       \
+    template<> struct input_parameter< const CLASS* >{                        \
+        typedef Rcpp::InputParameter<const CLASS*> type ;                     \
+    } ;                                                                       \
+    template<> struct input_parameter< CLASS >{                               \
+        typedef Rcpp::InputParameter<CLASS> type ;                            \
+    } ;                                                                       \
+    template<> struct input_parameter< CLASS& >{                              \
+        typedef Rcpp::InputParameter<CLASS&> type ;                           \
+    } ;                                                                       \
+    template<> struct input_parameter< const CLASS& >{                        \
+        typedef Rcpp::InputParameter<const CLASS&> type ;                     \
+    } ;                                                                       \
+    }}
+
+#define RCPP_EXPOSED_WRAP(CLASS) namespace Rcpp{ namespace traits{ template<> struct wrap_type_traits< CLASS >{typedef wrap_type_module_object_tag wrap_category ; } ; }}
+
+#define RCPP_EXPOSED_CLASS_NODECL(CLASS) \
+  RCPP_EXPOSED_AS(CLASS)          \
+  RCPP_EXPOSED_WRAP(CLASS)
+
+#define RCPP_EXPOSED_CLASS(CLASS) \
+  class CLASS;                    \
+  RCPP_EXPOSED_CLASS_NODECL(CLASS)
+
+/**
+ * handling enums: TODO use is_enum from C++11 or boost to have those automatic
+ */
+#define RCPP_EXPOSED_ENUM_AS(CLASS)   namespace Rcpp{ namespace traits{ template<> struct r_type_traits< CLASS >{ typedef r_type_enum_tag r_category ; } ; }}
+#define RCPP_EXPOSED_ENUM_WRAP(CLASS) namespace Rcpp{ namespace traits{ template<> struct wrap_type_traits< CLASS >{typedef wrap_type_enum_tag wrap_category ; } ; }}
+
+#define RCPP_EXPOSED_ENUM_NODECL(CLASS) \
+  RCPP_EXPOSED_ENUM_AS(CLASS)          \
+  RCPP_EXPOSED_ENUM_WRAP(CLASS)
+
+#define RCPP_EXPOSED_ENUM(CLASS) \
+  class CLASS;                    \
+  RCPP_EXPOSED_ENUM_NODECL(CLASS)
+
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/macros/debug.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/macros/debug.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/macros/debug.h	(revision 2477)
@@ -0,0 +1,109 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+//
+// debug.h: Rcpp R/C++ interface class library -- debug macros
+//
+// Copyright (C) 2012 - 2013 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp_macros_debug_h
+#define Rcpp_macros_debug_h
+
+// simple logging help
+#ifndef RCPP_DEBUG_LEVEL
+    #define RCPP_DEBUG_LEVEL 0
+#endif
+
+#ifndef RCPP_DEBUG_MODULE_LEVEL
+    #define RCPP_DEBUG_MODULE_LEVEL RCPP_DEBUG_LEVEL
+#endif
+
+
+#if RCPP_DEBUG_LEVEL > 0
+    #define RCPP_DEBUG( MSG ) Rprintf( "%40s:%4d %s\n" , short_file_name(__FILE__), __LINE__, MSG ) ;
+    #define RCPP_DEBUG_1( fmt, MSG ) Rprintf( "%40s:%4d " fmt "\n" , short_file_name(__FILE__), __LINE__, MSG ) ;
+    #define RCPP_DEBUG_2( fmt, M1, M2 ) Rprintf( "%40s:%4d " fmt "\n" , short_file_name(__FILE__), __LINE__, M1, M2 ) ;
+    #define RCPP_DEBUG_3( fmt, M1, M2, M3 ) Rprintf( "%40s:%4d " fmt "\n" , short_file_name(__FILE__), __LINE__, M1, M2, M3) ;
+    #define RCPP_DEBUG_4( fmt, M1, M2, M3, M4 ) Rprintf( "%40s:%4d " fmt "\n" , short_file_name(__FILE__), __LINE__, M1, M2, M3, M4) ;
+    #define RCPP_DEBUG_5( fmt, M1, M2, M3, M4, M5 ) Rprintf( "%40s:%4d " fmt "\n" , short_file_name(__FILE__), __LINE__, M1, M2, M3, M4, M5) ;
+#else
+    #define RCPP_DEBUG( MSG )
+    #define RCPP_DEBUG_1( fmt, MSG )
+    #define RCPP_DEBUG_2( fmt, M1, M2 )
+    #define RCPP_DEBUG_3( fmt, M1, M2, M3 )
+    #define RCPP_DEBUG_4( fmt, M1, M2, M3, M4 )
+    #define RCPP_DEBUG_5( fmt, M1, M2, M3, M4, M5 )
+#endif
+
+#if RCPP_DEBUG_MODULE_LEVEL > 0
+    #define RCPP_DEBUG_MODULE( MSG ) {                                                                                             \
+        Rcpp::Module * mod__ = getCurrentScope() ;                                                                                 \
+        if( mod__ ){                                                                                                                 \
+            Rprintf( "[module (%s) <%p> ] %40s:%4d %s\n" , mod__->name.c_str(), mod__, short_file_name(__FILE__), __LINE__, MSG ) ;\
+        } else {                                                                                                                   \
+            Rprintf( "[module () ] %40s:%4d %s\n" , short_file_name(__FILE__), __LINE__, MSG ) ;                                \
+        }                                                                                                                          \
+    }
+    #define RCPP_DEBUG_MODULE_1( fmt, MSG ) {                                                                                      \
+        Rcpp::Module * mod__ = getCurrentScope() ;                                                                                 \
+        if( mod__ ){                                                                                                                 \
+            Rprintf( "[module (%s) <%p> ] %40s:%4d " fmt "\n" , mod__->name.c_str(), mod__, short_file_name(__FILE__), __LINE__, MSG ) ;\
+        } else {                                                                                                                   \
+            Rprintf( "[module () ] %40s:%4d " fmt "\n" , short_file_name(__FILE__), __LINE__, MSG ) ;                                \
+        }                                                                                                                          \
+    }
+    #define RCPP_DEBUG_MODULE_2( fmt, M1, M2 ) {                                                                                      \
+        Rcpp::Module * mod__ = getCurrentScope() ;                                                                                 \
+        if( mod__ ){                                                                                                                 \
+            Rprintf( "[module (%s) <%p> ] %40s:%4d " fmt "\n" , mod__->name.c_str(), mod__, short_file_name(__FILE__), __LINE__, M1, M2 ) ;\
+        } else {                                                                                                                   \
+            Rprintf( "[module () ] %40s:%4d " fmt "\n" , short_file_name(__FILE__), __LINE__, M1, M2 ) ;                                \
+        }                                                                                                                          \
+    }
+    #define RCPP_DEBUG_MODULE_3( fmt, M1, M2, M3 ) {                                                                                      \
+        Rcpp::Module * mod__ = getCurrentScope() ;                                                                                 \
+        if( mod__ ){                                                                                                                 \
+            Rprintf( "[module (%s) <%p> ] %40s:%4d " fmt "\n" , mod__->name.c_str(), mod__, short_file_name(__FILE__), __LINE__, M1, M2, M3 ) ;\
+        } else {                                                                                                                   \
+            Rprintf( "[module () ] %40s:%4d " fmt "\n" , short_file_name(__FILE__), __LINE__, M1, M2, M3 ) ;                                \
+        }                                                                                                                          \
+    }
+    #define RCPP_DEBUG_MODULE_4( fmt, M1, M2, M3, M4 ) {                                                                                      \
+        Rcpp::Module * mod__ = getCurrentScope() ;                                                                                 \
+        if( mod__ ) {                                                                                                                \
+            Rprintf( "[module (%s) <%p> ] %40s:%4d " fmt "\n" , mod__->name.c_str(), mod__, short_file_name(__FILE__), __LINE__, M1, M2, M3, M4 ) ;\
+        } else {                                                                                                                   \
+            Rprintf( "[module () ] %40s:%4d " fmt "\n" , short_file_name(__FILE__), __LINE__, M1, M2, M3, M4 ) ;                                \
+        }                                                                                                                          \
+    }
+    #define RCPP_DEBUG_MODULE_5( fmt, M1, M2, M3, M4, M5 ) {                                                                                      \
+        Rcpp::Module * mod__ = getCurrentScope() ;                                                                                 \
+        if( mod__ ){                                                                                                                 \
+            Rprintf( "[module (%s) <%p> ] %40s:%4d " fmt "\n" , mod__->name.c_str(), mod__, short_file_name(__FILE__), __LINE__, M1, M2, M3, M4, M5 ) ;\
+        } else {                                                                                                                   \
+            Rprintf( "[module () ] %40s:%4d " fmt "\n" , short_file_name(__FILE__), __LINE__, M1, M2, M3, M4, M5 ) ;                                \
+        }                                                                                                                          \
+    }
+#else
+    #define RCPP_DEBUG_MODULE( MSG )
+    #define RCPP_DEBUG_MODULE_1( fmt, MSG )
+    #define RCPP_DEBUG_MODULE_2( fmt, M1, M2 )
+    #define RCPP_DEBUG_MODULE_3( fmt, M1, M2, M3 )
+    #define RCPP_DEBUG_MODULE_4( fmt, M1, M2, M3, M4 )
+    #define RCPP_DEBUG_MODULE_5( fmt, M1, M2, M3, M4, M5 )
+#endif
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/macros/traits.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/macros/traits.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/macros/traits.h	(revision 2477)
@@ -0,0 +1,42 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// traits.h: Rcpp R/C++ interface class library -- pre processor help
+//
+// Copyright (C) 2012 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__macros__traits_h
+#define Rcpp__macros__traits_h
+
+#define RCPP_TRAITS(__CLASS__,__SEXPTYPE__)                     \
+namespace Rcpp{ namespace traits {                                \
+template<> struct r_type_traits< __CLASS__ >{                       \
+	typedef r_type_primitive_tag r_category ;                     \
+} ;                                                               \
+template<> struct r_type_traits< std::pair< std::string , __CLASS__ > >{   \
+	typedef r_type_pairstring_primitive_tag r_category ;          \
+} ;                                                               \
+template<> struct wrap_type_traits< __CLASS__ >{                    \
+	typedef wrap_type_primitive_tag wrap_category ;               \
+} ;                                                               \
+template<> struct r_sexptype_traits< __CLASS__ >{                   \
+	enum{ rtype = __SEXPTYPE__ } ;                                \
+} ;                                                               \
+} }
+#define RCPP_ENUM_TRAITS(__ENUM__) RCPP_TRAITS(__ENUM__,INTSXP)
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/macros/cat.hpp
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/macros/cat.hpp	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/macros/cat.hpp	(revision 2477)
@@ -0,0 +1,33 @@
+# /* Copyright (C) 2001
+#  * Housemarque Oy
+#  * http://www.housemarque.com
+#  *
+#  * Distributed under the Boost Software License, Version 1.0. (See
+#  * accompanying file LICENSE_1_0.txt or copy at
+#  * http://www.boost.org/LICENSE_1_0.txt)
+#  */
+#
+# /* Revised by Paul Mensonides (2002) */
+#
+# /* See http://www.boost.org for most recent version. */
+#
+# ifndef RCPP_PREPROCESSOR_CAT_HPP
+# define RCPP_PREPROCESSOR_CAT_HPP
+#
+# /* RCPP_PP_CAT */
+#
+# if ~RCPP_PP_CONFIG_FLAGS() & RCPP_PP_CONFIG_MWCC()
+#    define RCPP_PP_CAT(a, b) RCPP_PP_CAT_I(a, b)
+# else
+#    define RCPP_PP_CAT(a, b) RCPP_PP_CAT_OO((a, b))
+#    define RCPP_PP_CAT_OO(par) RCPP_PP_CAT_I ## par
+# endif
+#
+# if ~RCPP_PP_CONFIG_FLAGS() & RCPP_PP_CONFIG_MSVC()
+#    define RCPP_PP_CAT_I(a, b) a ## b
+# else
+#    define RCPP_PP_CAT_I(a, b) RCPP_PP_CAT_II(a ## b)
+#    define RCPP_PP_CAT_II(res) res
+# endif
+#
+# endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/macros/xp.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/macros/xp.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/macros/xp.h	(revision 2477)
@@ -0,0 +1,65 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// xp.h: Rcpp R/C++ interface class library -- pre processor help
+//
+// Copyright (C) 2012 - 2015 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__macros_xp_h
+#define Rcpp__macros_xp_h
+
+#define RCPP_XP_FIELD_GET(__NAME__,__CLASS__,__FIELD__)        \
+extern "C" SEXP RCPP_PP_CAT(__NAME__,__rcpp_info__)(){         \
+	using Rcpp::_ ;                                            \
+	Rcpp::List info = Rcpp::List::create(                      \
+        _["class"]  = #__CLASS__  ,                            \
+        _["field"]  = #__FIELD__                              \
+        )   ;                                                  \
+    info.attr( "class" ) = "rcppxpfieldgetinfo" ;              \
+    return info   ;                                            \
+}                                                              \
+extern "C" SEXP __NAME__( SEXP xp ){                           \
+	BEGIN_RCPP                                                 \
+	    SEXP res = R_NilValue ;                                \
+		::Rcpp::XPtr< __CLASS__ > ptr(xp) ;                    \
+		res = ::Rcpp::wrap( ptr->__FIELD__ ) ;                 \
+		return res ;                                           \
+	END_RCPP                                                   \
+}
+
+#define RCPP_XP_FIELD_SET(__NAME__,__CLASS__,__FIELD__)        \
+extern "C" SEXP RCPP_PP_CAT(__NAME__,__rcpp_info__)(){         \
+	using Rcpp::_ ;                                            \
+	Rcpp::List info = Rcpp::List::create(                      \
+        _["class"]  = #__CLASS__  ,                            \
+        _["field"]  = #__FIELD__                              \
+        )   ;                                                  \
+    info.attr( "class" ) = "rcppxpfieldsetinfo" ;              \
+    return info   ;                                            \
+}                                                              \
+extern "C" SEXP __NAME__( SEXP xp, SEXP value ){               \
+	BEGIN_RCPP                                                 \
+		::Rcpp::XPtr< __CLASS__ > ptr(xp) ;                    \
+		ptr->__FIELD__ = ::Rcpp::internal::converter(value) ;  \
+	END_RCPP                                                   \
+}
+
+#define RCPP_XP_FIELD(__PREFIX__,__CLASS__,__FIELD__)          \
+RCPP_XP_FIELD_GET( RCPP_PP_CAT(__PREFIX__,_get), __CLASS__, __FIELD__ )    \
+RCPP_XP_FIELD_SET( RCPP_PP_CAT(__PREFIX__,_set), __CLASS__, __FIELD__ )
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/protection/Shelter.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/protection/Shelter.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/protection/Shelter.h	(revision 2477)
@@ -0,0 +1,47 @@
+// Copyright (C) 2013    Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp_protection_Shelter_H
+#define Rcpp_protection_Shelter_H
+
+namespace Rcpp {
+
+    template <class T>
+    class Shelter {
+    public:
+        Shelter() : nprotected(0){}
+
+        inline SEXP operator()(SEXP x){
+            nprotected++;
+            return PROTECT(x) ;
+        }
+
+        ~Shelter(){
+            UNPROTECT(nprotected) ;
+            nprotected = 0 ;
+        }
+
+    private:
+        int nprotected ;
+
+        // not defined on purpose
+        Shelter(const Shelter&) ;
+        Shelter& operator=(const Shelter&) ;
+    } ;
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/protection/protection.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/protection/protection.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/protection/protection.h	(revision 2477)
@@ -0,0 +1,25 @@
+// Copyright (C) 2013    Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp_protection_protection_H
+#define Rcpp_protection_protection_H
+
+#include <Rcpp/protection/Shield.h>
+#include <Rcpp/protection/Shelter.h>
+#include <Rcpp/protection/Armor.h>
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/protection/Shield.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/protection/Shield.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/protection/Shield.h	(revision 2477)
@@ -0,0 +1,48 @@
+// Copyright (C) 2013 Romain Francois and Kevin Ushey
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__protection_Shield_h
+#define Rcpp__protection_Shield_h
+
+namespace Rcpp{
+
+    inline SEXP Rcpp_protect(SEXP x){
+        if( x != R_NilValue ) PROTECT(x) ;
+        return x ;
+    }
+
+    template <typename T>
+    class Shield{
+    public:
+        Shield( SEXP t_) : t(Rcpp_protect(t_)){}
+        ~Shield(){
+            if( t != R_NilValue ) UNPROTECT(1) ;
+        }
+
+        operator SEXP() const { return t; }
+        SEXP t ;
+
+    private:
+        Shield( const Shield& ) ;
+        Shield& operator=( const Shield& ) ;
+    } ;
+
+
+
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/protection/Armor.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/protection/Armor.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/protection/Armor.h	(revision 2477)
@@ -0,0 +1,58 @@
+// Copyright (C) 2013    Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp_protection_Armor_H
+#define Rcpp_protection_Armor_H
+
+namespace Rcpp {
+
+    template <typename T>
+    class Armor {
+    public:
+
+        Armor() : data(){
+            init(R_NilValue) ;
+        }
+
+        template <typename U> Armor( U x );
+
+        inline operator SEXP() const {
+            return data ;
+        }
+
+        template <typename U>
+        inline Armor& operator=( const U& x ) ;
+
+        ~Armor(){
+            UNPROTECT(1) ;
+        }
+
+    private:
+        void init(SEXP x){
+           PROTECT_WITH_INDEX( data = x, &index ) ;
+        }
+
+        SEXP data ;
+        PROTECT_INDEX index ;
+
+        // not defined on purpose
+        Armor(const Armor&) ;
+        Armor& operator=(const Armor&) ;
+    } ;
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/sugar.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/sugar.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/sugar.h	(revision 2477)
@@ -0,0 +1,35 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// sugar.h: Rcpp R/C++ interface class library -- main file for Rcpp::sugar
+//
+// Copyright (C) 2010 - 2012 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef RCPP_SUGAR_H
+#define RCPP_SUGAR_H
+
+#include <Rcpp/sugar/tools/iterator.h>
+#include <Rcpp/sugar/block/block.h>
+
+#include <Rcpp/hash/hash.h>
+
+#include <Rcpp/sugar/operators/operators.h>
+#include <Rcpp/sugar/functions/functions.h>
+#include <Rcpp/sugar/matrix/matrix_functions.h>
+
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/undoRmath.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/undoRmath.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/undoRmath.h	(revision 2477)
@@ -0,0 +1,167 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// undoRmath.h: Rcpp R/C++ interface class library -- undo the macros set by Rmath.h
+//
+// Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef RCPP_SUGAR_UNDORMATH_H
+#define RCPP_SUGAR_UNDORMATH_H
+
+// undo some of the mess of Rmath
+#undef sign
+#undef trunc
+#undef rround
+#undef prec
+
+#undef bessel_i
+#undef bessel_j
+#undef bessel_k
+#undef bessel_y
+#undef bessel_i_ex
+#undef bessel_j_ex
+#undef bessel_k_ex
+#undef bessel_y_ex
+#undef beta
+#undef choose
+#undef dbeta
+#undef dbinom
+#undef dcauchy
+#undef dchisq
+#undef dexp
+#undef df
+#undef dgamma
+#undef dgeom
+#undef dhyper
+#undef digamma
+#undef dlnorm
+#undef dlogis
+#undef dnbeta
+#undef dnbinom
+#undef dnchisq
+#undef dnf
+#undef dnorm4
+#undef dnt
+#undef dpois
+#undef dpsifn
+#undef dsignrank
+#undef dt
+#undef dtukey
+#undef dunif
+#undef dweibull
+#undef dwilcox
+#undef fmax2
+#undef fmin2
+#undef fprec
+#undef fround
+#undef ftrunc
+#undef fsign
+#undef gammafn
+#undef imax2
+#undef imin2
+#undef lbeta
+#undef lchoose
+#undef lgammafn
+#undef lgammafn_sign
+#undef lgamma1p
+#undef log1pmx
+#undef logspace_add
+#undef logspace_sub
+#undef pbeta
+#undef pbeta_raw
+#undef pbinom
+#undef pcauchy
+#undef pchisq
+#undef pentagamma
+#undef pexp
+#undef pf
+#undef pgamma
+#undef pgeom
+#undef phyper
+#undef plnorm
+#undef plogis
+#undef pnbeta
+#undef pnbinom
+#undef pnchisq
+#undef pnf
+#undef pnorm5
+#undef pnorm_both
+#undef pnt
+#undef ppois
+#undef psignrank
+#undef psigamma
+#undef pt
+#undef ptukey
+#undef punif
+#undef pythag
+#undef pweibull
+#undef pwilcox
+#undef qbeta
+#undef qbinom
+#undef qcauchy
+#undef qchisq
+#undef qchisq_appr
+#undef qexp
+#undef qf
+#undef qgamma
+#undef qgeom
+#undef qhyper
+#undef qlnorm
+#undef qlogis
+#undef qnbeta
+#undef qnbinom
+#undef qnchisq
+#undef qnf
+#undef qnorm5
+#undef qnt
+#undef qpois
+#undef qsignrank
+#undef qt
+#undef qtukey
+#undef qunif
+#undef qweibull
+#undef qwilcox
+#undef rbeta
+#undef rbinom
+#undef rcauchy
+#undef rchisq
+#undef rexp
+#undef rf
+#undef rgamma
+#undef rgeom
+#undef rhyper
+#undef rlnorm
+#undef rlogis
+#undef rnbeta
+#undef rnbinom
+#undef rnchisq
+#undef rnf
+#undef rnorm
+#undef rnt
+#undef rpois
+#undef rsignrank
+#undef rt
+#undef rtukey
+#undef runif
+#undef rweibull
+#undef rwilcox
+#undef sign
+#undef tetragamma
+#undef trigamma
+
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/na_omit.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/na_omit.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/na_omit.h	(revision 2477)
@@ -0,0 +1,84 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// na_omit.h: Rcpp R/C++ interface class library -- na_omit
+//
+// Copyright (C) 2013 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__na_omit_h
+#define Rcpp__sugar__na_omit_h
+
+namespace Rcpp{
+namespace sugar{
+
+    template <int RTYPE, bool NA, typename T>
+    Vector<RTYPE> na_omit_impl(const T& x, Rcpp::traits::false_type ) {
+        R_xlen_t n = x.size() ;
+        R_xlen_t n_out = n - sum( is_na(x) ) ;
+
+        if( n_out == n ) return x ;
+
+        Vector<RTYPE> out = no_init(n_out) ;
+        for( R_xlen_t i=0, j=0; i<n; i++){
+            if( Vector<RTYPE>::is_na( x[i] ) ) continue ;
+            out[j++] = x[i];
+        }
+        return out ;
+    }
+
+    template <int RTYPE, bool NA, typename T>
+    Vector<RTYPE> na_omit_impl(const T& x, Rcpp::traits::true_type ) {
+        R_xlen_t n = x.size() ;
+        R_xlen_t n_out = n - sum( is_na(x) ) ;
+
+        if( n_out == n ) return x;
+
+        Vector<RTYPE> out = no_init(n_out) ;
+
+        bool has_name = x.attr("names") != R_NilValue ;
+        if( has_name ){
+            CharacterVector names = x.attr("names") ;
+            CharacterVector onames( n_out ) ;
+
+            for( R_xlen_t i=0, j=0; i<n; i++){
+                if( Vector<RTYPE>::is_na( x[i] ) ) continue ;
+                onames[j] = names[i] ;
+                out[j++] = x[i];
+            }
+            out.attr("names") = onames ;
+        } else {
+            for( R_xlen_t i=0, j=0; i<n; i++){
+                if( Vector<RTYPE>::is_na( x[i] ) ) continue ;
+                out[j++] = x[i];
+            }
+        }
+        return out ;
+    }
+
+} // sugar
+
+template <int RTYPE, bool NA, typename T>
+inline Vector<RTYPE> na_omit( const VectorBase<RTYPE,NA,T>& t){
+	return sugar::na_omit_impl<RTYPE,NA,T>(
+	    t.get_ref(),
+	    typename Rcpp::traits::same_type<T,Vector<RTYPE> >::type()
+	) ;
+}
+
+} // Rcpp
+#endif
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/any.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/any.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/any.h	(revision 2477)
@@ -0,0 +1,87 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// any.h: Rcpp R/C++ interface class library -- any
+//
+// Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__any_h
+#define Rcpp__sugar__any_h
+
+namespace Rcpp{
+namespace sugar{
+
+template <bool NA, typename T>
+class Any : public SingleLogicalResult< true, Any<NA,T> >{
+public:
+	typedef Rcpp::VectorBase<LGLSXP,NA,T> VEC_TYPE ;
+	typedef SingleLogicalResult< true , Any<NA,T> > PARENT ;
+	Any( const VEC_TYPE& t ) : PARENT() , object(t) {}
+
+	void apply(){
+		R_xlen_t n = object.size() ;
+		int current = 0 ;
+		PARENT::reset() ;
+		for( R_xlen_t i=0 ; i<n ; i++){
+			current = object[i] ;
+			if( current == TRUE ) {
+				PARENT::set_true() ;
+				return ;
+			}
+			if( Rcpp::traits::is_na<LGLSXP>(current)  ) {
+				PARENT::set_na();
+			}
+		}
+		if( PARENT::is_unresolved() ){
+			PARENT::set_false() ;
+		}
+	}
+private:
+	const VEC_TYPE& object ;
+} ;
+
+template <typename T>
+class Any<false,T> : public SingleLogicalResult< false, Any<false,T> >{
+public:
+	typedef Rcpp::VectorBase<LGLSXP,false,T> VEC_TYPE ;
+	typedef SingleLogicalResult< false , Any<false,T> > PARENT ;
+	Any( const VEC_TYPE& t ) : PARENT() , object(t) {}
+
+	void apply(){
+		R_xlen_t n = object.size() ;
+		PARENT::set_false() ;
+		for( R_xlen_t i=0 ; i<n ; i++){
+			if( object[i] == TRUE ) {
+				PARENT::set_true() ;
+				return ;
+			}
+		}
+	}
+private:
+	const VEC_TYPE& object ;
+} ;
+
+} // sugar
+
+template <bool NA, typename T>
+inline sugar::Any<NA,T> any( const Rcpp::VectorBase<LGLSXP,NA,T>& t){
+	return sugar::Any<NA,T>( t ) ;
+}
+
+} // Rcpp
+#endif
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/math.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/math.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/math.h	(revision 2477)
@@ -0,0 +1,72 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+//
+// SugarBlock.h: Rcpp R/C++ interface class library -- sugar functions
+//
+// Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef RCPP_SUGAR_MATH_H
+#define RCPP_SUGAR_MATH_H
+
+VECTORIZED_MATH_1(exp,::exp)
+VECTORIZED_MATH_1(acos,::acos)
+VECTORIZED_MATH_1(asin,::asin)
+VECTORIZED_MATH_1(atan,::atan)
+VECTORIZED_MATH_1(ceil,::ceil)
+VECTORIZED_MATH_1(ceiling,::ceil)
+VECTORIZED_MATH_1(cos,::cos)
+VECTORIZED_MATH_1(cosh,::cosh)
+VECTORIZED_MATH_1(floor,::floor)
+VECTORIZED_MATH_1(log,::log)
+VECTORIZED_MATH_1(log10,::log10)
+VECTORIZED_MATH_1(sqrt,::sqrt)
+VECTORIZED_MATH_1(sin,::sin)
+VECTORIZED_MATH_1(sinh,::sinh)
+VECTORIZED_MATH_1(tan,::tan)
+VECTORIZED_MATH_1(tanh,::tanh)
+
+VECTORIZED_MATH_1(abs,::fabs)
+
+VECTORIZED_MATH_1(gamma      , ::Rf_gammafn     )
+VECTORIZED_MATH_1(lgamma     , ::Rf_lgammafn    )
+VECTORIZED_MATH_1(digamma    , ::Rf_digamma     )
+VECTORIZED_MATH_1(trigamma   , ::Rf_trigamma    )
+VECTORIZED_MATH_1(tetragamma , ::Rf_tetragamma  )
+VECTORIZED_MATH_1(pentagamma , ::Rf_pentagamma  )
+VECTORIZED_MATH_1(expm1      , ::expm1          )
+VECTORIZED_MATH_1(log1p      , ::log1p          )
+
+namespace Rcpp{
+    namespace internal{
+        extern "C" inline double factorial( double x ){ return ::Rf_gammafn( x + 1.0 ) ; }
+        extern "C" inline double lfactorial( double x ){ return ::Rf_lgammafn( x + 1.0 ) ; }
+    }
+}
+VECTORIZED_MATH_1(factorial  , ::Rcpp::internal::factorial   )
+VECTORIZED_MATH_1(lfactorial , ::Rcpp::internal::lfactorial  )
+
+SUGAR_BLOCK_2(choose    , ::Rf_choose   )
+SUGAR_BLOCK_2(lchoose   , ::Rf_lchoose  )
+SUGAR_BLOCK_2(beta      , ::Rf_beta     )
+SUGAR_BLOCK_2(lbeta     , ::Rf_lbeta    )
+SUGAR_BLOCK_2(psigamma  , ::Rf_psigamma )
+
+VECTORIZED_MATH_1(trunc, ::Rf_ftrunc) 		// truncates to zero (cf Writing R Extension, 6.7.3 Numerical Utilities)
+SUGAR_BLOCK_2(round,     ::Rf_fround)           // rounds 'x' to 'digits' decimals digits (used by R's round())
+SUGAR_BLOCK_2(signif,    ::Rf_fprec)            // rounds 'x' to 'digits' significant digits (used by R's signif())
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/tail.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/tail.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/tail.h	(revision 2477)
@@ -0,0 +1,65 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// tail.h: Rcpp R/C++ interface class library -- tail
+//
+// Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__tail_h
+#define Rcpp__sugar__tail_h
+
+namespace Rcpp{
+namespace sugar{
+
+template <int RTYPE, bool NA, typename T>
+class Tail : public Rcpp::VectorBase< RTYPE ,NA, Tail<RTYPE,NA,T> > {
+public:
+	typedef typename Rcpp::VectorBase<RTYPE,NA,T> VEC_TYPE ;
+	typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
+
+        Tail( const VEC_TYPE& object_, R_xlen_t n_ ) : object(object_), start(0), n(n_) {
+		if( n > 0 ){
+			start = object.size() - n ;
+		} else {
+			start = -n ;
+			n = object.size() - start ;
+		}
+	}
+
+        inline STORAGE operator[]( R_xlen_t i ) const {
+		return object[ start + i ] ;
+	}
+        inline R_xlen_t size() const { return n; }
+
+private:
+	const VEC_TYPE& object ;
+        R_xlen_t start, n ;
+} ;
+
+} // sugar
+
+template <int RTYPE,bool NA, typename T>
+inline sugar::Tail<RTYPE,NA,T> tail(
+	const VectorBase<RTYPE,NA,T>& t,
+	R_xlen_t n
+	){
+	return sugar::Tail<RTYPE,NA,T>( t, n ) ;
+}
+
+} // Rcpp
+#endif
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/match.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/match.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/match.h	(revision 2477)
@@ -0,0 +1,35 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// match.h: Rcpp R/C++ interface class library -- match
+//
+// Copyright (C) 2012   Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__match_h
+#define Rcpp__sugar__match_h
+
+namespace Rcpp{
+
+template <int RTYPE, bool NA, typename T, bool RHS_NA, typename RHS_T>
+inline IntegerVector match( const VectorBase<RTYPE,NA,T>& x, const VectorBase<RTYPE,RHS_NA,RHS_T>& table_ ){
+    Vector<RTYPE> table = table_ ;
+    return sugar::IndexHash<RTYPE>( table ).fill().lookup( x.get_ref() ) ;
+}
+
+} // Rcpp
+#endif
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/range.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/range.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/range.h	(revision 2477)
@@ -0,0 +1,92 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// range.h: Rcpp R/C++ interface class library -- range
+//
+// Copyright (C) 2012 - 2013 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__range_h
+#define Rcpp__sugar__range_h
+
+namespace Rcpp{
+namespace sugar{
+
+    template <int RTYPE, bool NA, typename T>
+    class Range {
+    public:
+        typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
+
+        Range( const T& obj_) : obj(obj_) {}
+
+        operator Vector<RTYPE>(){
+            min_ = max_ = obj[0] ;
+            if( Rcpp::traits::is_na<RTYPE>( min_ ) ) return Vector<RTYPE>::create( min_, max_ ) ;
+
+            R_xlen_t n = obj.size() ;
+            for( R_xlen_t i=1; i<n; i++){
+                current = obj[i] ;
+                if( Rcpp::traits::is_na<RTYPE>( current ) ) return Vector<RTYPE>::create( min_, max_ ) ;
+                if( current < min_ ) min_ = current ;
+                if( current > max_ ) max_ = current ;
+
+            }
+            return Vector<RTYPE>::create( min_, max_ ) ;
+        }
+
+
+    private:
+        const T& obj ;
+        STORAGE min_, max_, current ;
+    } ;
+
+    // version for NA = false
+    template <int RTYPE, typename T>
+    class Range<RTYPE,false,T> {
+    public:
+        typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
+
+        Range( const T& obj_) : obj(obj_) {}
+
+        operator Vector<RTYPE>(){
+            min_ = max_ = obj[0] ;
+
+            R_xlen_t n = obj.size() ;
+            for( R_xlen_t i=1; i<n; i++){
+                current = obj[i] ;
+                if( current < min_ ) min_ = current ;
+                if( current > max_ ) max_ = current ;
+            }
+            return Vector<RTYPE>::create( min_, max_ ) ;
+        }
+
+
+    private:
+        const T& obj ;
+        STORAGE min_, max_, current ;
+    } ;
+
+
+} // sugar
+
+template <int RTYPE, bool NA, typename T>
+sugar::Range<RTYPE,NA,T> range( const VectorBase<RTYPE,NA,T>& x){
+    return sugar::Range<RTYPE,NA,T>(x.get_ref()) ;
+}
+
+} // Rcpp
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/is_infinite.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/is_infinite.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/is_infinite.h	(revision 2477)
@@ -0,0 +1,55 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// is_infinite.h: Rcpp R/C++ interface class library -- is_infinite
+//
+// Copyright (C) 2013 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__is_infinite_h
+#define Rcpp__sugar__is_infinite_h
+
+namespace Rcpp{
+namespace sugar{
+
+template <int RTYPE, bool NA, typename VEC_TYPE>
+class IsInfinite : public ::Rcpp::VectorBase< LGLSXP, false, IsInfinite<RTYPE,NA,VEC_TYPE> > {
+public:
+
+	IsInfinite( const VEC_TYPE& obj_) : obj(obj_){}
+
+	inline int operator[]( R_xlen_t i ) const {
+		return ::Rcpp::traits::is_infinite<RTYPE>( obj[i] ) ;
+	}
+
+	inline R_xlen_t size() const { return obj.size() ; }
+
+private:
+	const VEC_TYPE& obj ;
+
+} ;
+
+
+} // sugar
+
+template <int RTYPE, bool NA, typename T>
+inline sugar::IsInfinite<RTYPE,NA,T> is_infinite( const Rcpp::VectorBase<RTYPE,NA,T>& t){
+	return sugar::IsInfinite<RTYPE,NA,T>( t.get_ref() ) ;
+}
+
+} // Rcpp
+#endif
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/lapply.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/lapply.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/lapply.h	(revision 2477)
@@ -0,0 +1,61 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// lapply.h: Rcpp R/C++ interface class library -- lapply
+//
+// Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__lapply_h
+#define Rcpp__sugar__lapply_h
+
+namespace Rcpp{
+namespace sugar{
+
+template <int RTYPE, bool NA, typename T, typename Function>
+class Lapply : public VectorBase<
+	VECSXP ,
+	true ,
+	Lapply<RTYPE,NA,T,Function>
+> {
+public:
+	typedef Rcpp::VectorBase<RTYPE,NA,T> VEC ;
+	typedef typename ::Rcpp::traits::result_of<Function>::type result_type ;
+
+	Lapply( const VEC& vec_, Function fun_ ) :
+		vec(vec_), fun(fun_){}
+
+        inline SEXP operator[]( R_xlen_t i ) const {
+		return Rcpp::wrap( fun( vec[i] ) );
+	}
+        inline R_xlen_t size() const { return vec.size() ; }
+
+private:
+	const VEC& vec ;
+	Function fun ;
+} ;
+
+} // sugar
+
+template <int RTYPE, bool NA, typename T, typename Function >
+inline sugar::Lapply<RTYPE,NA,T,Function>
+lapply( const Rcpp::VectorBase<RTYPE,NA,T>& t, Function fun ){
+	return sugar::Lapply<RTYPE,NA,T,Function>( t, fun ) ;
+}
+
+} // Rcpp
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/pmin.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/pmin.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/pmin.h	(revision 2477)
@@ -0,0 +1,191 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// pmin.h: Rcpp R/C++ interface class library -- pmin
+//
+// Copyright (C) 2010 - 2012 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__pmin_h
+#define Rcpp__sugar__pmin_h
+
+namespace Rcpp{
+namespace sugar{
+
+template <int RTYPE, bool LHS_NA, bool RHS_NA> struct pmin_op ;
+
+// specializations for double.
+// we use the fact that NA < x is false
+template <>
+struct pmin_op<REALSXP,true,true>{
+	inline double operator()( double left, double right ) const {
+		return ( Rcpp::traits::is_na<REALSXP>( left ) || (left < right) ) ? left : right ;
+	}
+} ;
+template <> struct pmin_op<REALSXP,true,false> {
+	inline double operator()( double left, double right ) const {
+		return right < left ? right : left ;
+	}
+} ;
+template <> struct pmin_op<REALSXP,false,true> {
+	inline double operator()( double left, double right ) const {
+		return right < left ? right : left ;
+	}
+} ;
+template <> struct pmin_op<REALSXP,false,false> {
+	inline double operator()( double left, double right ) const {
+		return left < right ? left : right ;
+	}
+} ;
+
+// specializations for INTSXP. Since NA is represented as the smallest
+// int, NA is always the smallest, so it is safe to return NA
+template <bool LHS_NA, bool RHS_NA>
+struct pmin_op<INTSXP,LHS_NA,RHS_NA> {
+    inline int operator()(int left, int right) const {
+        return left < right ? left : right ;
+    }
+} ;
+
+
+// general case
+template <int RTYPE, bool NA> class pmin_op_Vector_Primitive {
+public:
+	typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
+
+	pmin_op_Vector_Primitive( STORAGE right_ ) :  right(right_) {}
+
+	inline STORAGE operator()( STORAGE left ) const {
+		return left < right ? left : right ;
+	}
+
+private:
+	STORAGE right ;
+} ;
+// only special case we need to take care of
+template <> class pmin_op_Vector_Primitive<REALSXP,true> {
+public:
+	pmin_op_Vector_Primitive( double right_ ) :  right(right_) {}
+
+	inline double operator()( double left ) const {
+		return ( Rcpp::traits::is_na<REALSXP>( left ) || (left < right) ) ? left : right ;
+	}
+
+private:
+	double right ;
+} ;
+
+
+
+
+template <
+	int RTYPE,
+	bool LHS_NA, typename LHS_T,
+	bool RHS_NA, typename RHS_T
+	>
+class Pmin_Vector_Vector : public VectorBase<
+	RTYPE ,
+	( LHS_NA || RHS_NA ) ,
+	Pmin_Vector_Vector<RTYPE,LHS_NA,LHS_T,RHS_NA,RHS_T>
+> {
+public:
+	typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
+	typedef pmin_op<RTYPE,LHS_NA,RHS_NA> OPERATOR ;
+
+	Pmin_Vector_Vector( const LHS_T& lhs_, const RHS_T& rhs_ ) : lhs(lhs_), rhs(rhs_), op() {}
+
+        inline STORAGE operator[]( R_xlen_t i ) const {
+		return op( lhs[i], rhs[i] ) ;
+	}
+        inline R_xlen_t size() const { return lhs.size() ; }
+
+private:
+	const LHS_T& lhs ;
+	const RHS_T& rhs ;
+	OPERATOR op ;
+} ;
+
+
+
+template <
+	int RTYPE,
+	bool LHS_NA, typename LHS_T
+	>
+class Pmin_Vector_Primitive : public VectorBase<
+	RTYPE ,
+	true ,
+	Pmin_Vector_Primitive<RTYPE,LHS_NA,LHS_T>
+> {
+public:
+	typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
+	typedef pmin_op_Vector_Primitive<RTYPE,LHS_NA> OPERATOR ;
+
+	Pmin_Vector_Primitive( const LHS_T& lhs_, STORAGE rhs_ ) : lhs(lhs_), op(rhs_) {}
+
+        inline STORAGE operator[]( R_xlen_t i ) const { return op( lhs[i] ) ; }
+        inline R_xlen_t size() const { return lhs.size() ; }
+
+private:
+	const LHS_T& lhs ;
+	OPERATOR op ;
+} ;
+
+
+
+} // sugar
+
+template <
+	int RTYPE,
+	bool LHS_NA, typename LHS_T,
+	bool RHS_NA, typename RHS_T
+>
+inline sugar::Pmin_Vector_Vector<RTYPE,LHS_NA,LHS_T,RHS_NA,RHS_T>
+pmin(
+	const Rcpp::VectorBase<RTYPE,LHS_NA,LHS_T>& lhs,
+	const Rcpp::VectorBase<RTYPE,RHS_NA,RHS_T>& rhs
+	){
+	return sugar::Pmin_Vector_Vector<RTYPE,LHS_NA,LHS_T,RHS_NA,RHS_T>( lhs.get_ref(), rhs.get_ref() ) ;
+}
+
+template <
+	int RTYPE,
+	bool LHS_NA, typename LHS_T
+>
+inline sugar::Pmin_Vector_Primitive<RTYPE,LHS_NA,LHS_T>
+pmin(
+	const Rcpp::VectorBase<RTYPE,LHS_NA,LHS_T>& lhs,
+	typename Rcpp::traits::storage_type<RTYPE>::type rhs
+	){
+	return sugar::Pmin_Vector_Primitive<RTYPE,LHS_NA,LHS_T>( lhs.get_ref(), rhs ) ;
+}
+
+
+template <
+	int RTYPE,
+	bool RHS_NA, typename RHS_T
+>
+inline sugar::Pmin_Vector_Primitive<RTYPE,RHS_NA,RHS_T>
+pmin(
+	typename Rcpp::traits::storage_type<RTYPE>::type lhs,
+	const Rcpp::VectorBase<RTYPE,RHS_NA,RHS_T>& rhs
+	){
+	return sugar::Pmin_Vector_Primitive<RTYPE,RHS_NA,RHS_T>( rhs.get_ref(), lhs ) ;
+}
+
+
+} // Rcpp
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/pmax.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/pmax.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/pmax.h	(revision 2477)
@@ -0,0 +1,193 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// pmax.h: Rcpp R/C++ interface class library -- pmax
+//
+// Copyright (C) 2010 - 2012 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__pmax_h
+#define Rcpp__sugar__pmax_h
+
+namespace Rcpp{
+namespace sugar{
+
+template <int RTYPE, bool LHS_NA, bool RHS_NA> struct pmax_op ;
+
+// specializations for double.
+// we use the fact that NA < x is false
+template <>
+struct pmax_op<REALSXP,true,true>{
+	inline double operator()( double left, double right ) const {
+		return ( Rcpp::traits::is_na<REALSXP>( left ) || (left > right) ) ? left : right ;
+	}
+} ;
+template <> struct pmax_op<REALSXP,true,false> {
+	inline double operator()( double left, double right ) const {
+		return right > left ? right : left ;
+	}
+} ;
+template <> struct pmax_op<REALSXP,false,true> {
+	inline double operator()( double left, double right ) const {
+		return right > left ? right : left ;
+	}
+} ;
+template <> struct pmax_op<REALSXP,false,false> {
+	inline double operator()( double left, double right ) const {
+		return left > right ? left : right ;
+	}
+} ;
+
+// specializations for INTSXP. Since NA is represented as the smallest
+// int, NA is always the smallest, so it is safe to return NA
+template <bool LHS_NA, bool RHS_NA>
+struct pmax_op<INTSXP,LHS_NA,RHS_NA> {
+    inline int operator()(int left, int right) const {
+        return left > right ? left : right ;
+    }
+} ;
+
+
+// general case
+template <int RTYPE, bool NA> class pmax_op_Vector_Primitive {
+public:
+	typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
+
+	pmax_op_Vector_Primitive( STORAGE right_ ) :  right(right_) {}
+
+	inline STORAGE operator()( STORAGE left ) const {
+		return left > right ? left : right ;
+	}
+
+private:
+	STORAGE right ;
+} ;
+// only special case we need to take care of
+template <> class pmax_op_Vector_Primitive<REALSXP,true> {
+public:
+	pmax_op_Vector_Primitive( double right_ ) :  right(right_) {}
+
+	inline double operator()( double left ) const {
+		return ( Rcpp::traits::is_na<REALSXP>( left ) || (left > right) ) ? left : right ;
+	}
+
+private:
+	double right ;
+} ;
+
+
+
+
+template <
+	int RTYPE,
+	bool LHS_NA, typename LHS_T,
+	bool RHS_NA, typename RHS_T
+	>
+class Pmax_Vector_Vector : public VectorBase<
+	RTYPE ,
+	( LHS_NA || RHS_NA ) ,
+	Pmax_Vector_Vector<RTYPE,LHS_NA,LHS_T,RHS_NA,RHS_T>
+> {
+public:
+	typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
+	typedef pmax_op<RTYPE,LHS_NA,RHS_NA> OPERATOR ;
+
+	Pmax_Vector_Vector( const LHS_T& lhs_, const RHS_T& rhs_ ) : lhs(lhs_), rhs(rhs_), op() {}
+
+        inline STORAGE operator[]( R_xlen_t i ) const {
+		return op( lhs[i], rhs[i] ) ;
+	}
+        inline R_xlen_t size() const { return lhs.size() ; }
+
+private:
+	const LHS_T& lhs ;
+	const RHS_T& rhs ;
+	OPERATOR op ;
+} ;
+
+
+
+template <
+	int RTYPE,
+	bool LHS_NA, typename LHS_T
+	>
+class Pmax_Vector_Primitive : public VectorBase<
+	RTYPE ,
+	true ,
+	Pmax_Vector_Primitive<RTYPE,LHS_NA,LHS_T>
+> {
+public:
+	typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
+	typedef pmax_op_Vector_Primitive<RTYPE,LHS_NA> OPERATOR ;
+
+	Pmax_Vector_Primitive( const LHS_T& lhs_, STORAGE rhs_ ) : lhs(lhs_), op(rhs_) {}
+
+        inline STORAGE operator[]( R_xlen_t i ) const {
+		return op( lhs[i] ) ;
+	}
+        inline R_xlen_t size() const { return lhs.size() ; }
+
+private:
+	const LHS_T& lhs ;
+	OPERATOR op ;
+} ;
+
+
+
+} // sugar
+
+template <
+	int RTYPE,
+	bool LHS_NA, typename LHS_T,
+	bool RHS_NA, typename RHS_T
+>
+inline sugar::Pmax_Vector_Vector<RTYPE,LHS_NA,LHS_T,RHS_NA,RHS_T>
+pmax(
+	const Rcpp::VectorBase<RTYPE,LHS_NA,LHS_T>& lhs,
+	const Rcpp::VectorBase<RTYPE,RHS_NA,RHS_T>& rhs
+	){
+	return sugar::Pmax_Vector_Vector<RTYPE,LHS_NA,LHS_T,RHS_NA,RHS_T>( lhs.get_ref(), rhs.get_ref() ) ;
+}
+
+template <
+	int RTYPE,
+	bool LHS_NA, typename LHS_T
+>
+inline sugar::Pmax_Vector_Primitive<RTYPE,LHS_NA,LHS_T>
+pmax(
+	const Rcpp::VectorBase<RTYPE,LHS_NA,LHS_T>& lhs,
+	typename Rcpp::traits::storage_type<RTYPE>::type rhs
+	){
+	return sugar::Pmax_Vector_Primitive<RTYPE,LHS_NA,LHS_T>( lhs.get_ref(), rhs ) ;
+}
+
+
+template <
+	int RTYPE,
+	bool RHS_NA, typename RHS_T
+>
+inline sugar::Pmax_Vector_Primitive<RTYPE,RHS_NA,RHS_T>
+pmax(
+	typename Rcpp::traits::storage_type<RTYPE>::type lhs,
+	const Rcpp::VectorBase<RTYPE,RHS_NA,RHS_T>& rhs
+	){
+	return sugar::Pmax_Vector_Primitive<RTYPE,RHS_NA,RHS_T>( rhs.get_ref(), lhs ) ;
+}
+
+
+} // Rcpp
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/self_match.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/self_match.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/self_match.h	(revision 2477)
@@ -0,0 +1,77 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// self_match.h: Rcpp R/C++ interface class library -- self match
+//
+// Copyright (C) 2012   Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__self_match_h
+#define Rcpp__sugar__self_match_h
+
+namespace Rcpp{
+namespace sugar{
+
+template <typename HASH, typename STORAGE>
+class SelfInserter {
+public:
+    SelfInserter( HASH& hash_ ) : hash(hash_), index(0) {}
+
+    inline R_xlen_t operator()( STORAGE value ){
+        typename HASH::iterator it = hash.find( value ) ;
+        if( it == hash.end() ){
+            hash.insert( std::make_pair(value, ++index) ) ;
+            return index ;
+        } else {
+            return it->second ;
+        }
+    }
+
+private:
+    HASH& hash ;
+    R_xlen_t index;
+} ;
+
+template <int RTYPE, typename TABLE_T>
+class SelfMatch {
+public:
+    typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
+
+    SelfMatch( const TABLE_T& table ): hash(), result(table.size()) {
+        std::transform( table.begin(), table.end(), result.begin(), Inserter(hash) ) ;
+    }
+
+    inline operator IntegerVector() const { return result ; }
+
+private:
+    typedef RCPP_UNORDERED_MAP<STORAGE, int> HASH ;
+    typedef SelfInserter<HASH,STORAGE> Inserter ;
+    HASH hash ;
+    IntegerVector result ;
+};
+
+} // sugar
+
+template <int RTYPE, bool NA, typename T>
+inline IntegerVector self_match( const VectorBase<RTYPE,NA,T>& x ){
+    Vector<RTYPE> vec(x) ;
+    return sugar::SelfHash<RTYPE>(vec).fill_and_self_match() ;
+}
+
+
+} // Rcpp
+#endif
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/which_min.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/which_min.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/which_min.h	(revision 2477)
@@ -0,0 +1,96 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// which_min.h: Rcpp R/C++ interface class library -- which.min
+//
+// Copyright (C) 2012   Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__which_min_h
+#define Rcpp__sugar__which_min_h
+
+namespace Rcpp{
+namespace sugar{
+
+template <int RTYPE, bool NA, typename T>
+class WhichMin {
+public:
+    typedef typename Rcpp::VectorBase<RTYPE,NA,T> VEC_TYPE ;
+    typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
+	WhichMin(const VEC_TYPE& obj_ ) : obj(obj_){}
+
+        R_xlen_t get() const {
+	    STORAGE current = obj[0] ;
+	    STORAGE min = current ;
+	    R_xlen_t index = 0 ;
+	    if( Rcpp::traits::is_na<RTYPE>(current) ) return NA_INTEGER ;
+	    R_xlen_t n = obj.size() ;
+	    for( R_xlen_t i=1; i<n; i++){
+		    current = obj[i] ;
+		    if( Rcpp::traits::is_na<RTYPE>(current) ) return NA_INTEGER ;
+		    if( current < min ){
+		        min = current ;
+		        index = i ;
+		    }
+		}
+		return index ;
+	}
+
+private:
+    const VEC_TYPE& obj ;
+
+} ;
+
+template <int RTYPE, typename T>
+class WhichMin<RTYPE,false,T> {
+public:
+    typedef typename Rcpp::VectorBase<RTYPE,false,T> VEC_TYPE ;
+    typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
+	WhichMin(const VEC_TYPE& obj_ ) : obj(obj_){}
+
+        R_xlen_t get() const {
+	    STORAGE current = obj[0] ;
+	    STORAGE min = current ;
+	    R_xlen_t index = 0 ;
+	    R_xlen_t n = obj.size() ;
+	    for( R_xlen_t i=1; i<n; i++){
+		    current = obj[i] ;
+		    if( current < min ){
+		        min = current ;
+		        index = i ;
+		    }
+		}
+		return index ;
+	}
+
+private:
+    const VEC_TYPE& obj ;
+
+} ;
+
+
+} // sugar
+
+
+
+template <int RTYPE, bool NA, typename T>
+R_xlen_t which_min( const VectorBase<RTYPE,NA,T>& t ){
+	return sugar::WhichMin<RTYPE,NA,T>(t).get() ;
+}
+
+} // Rcpp
+#endif
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/is_nan.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/is_nan.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/is_nan.h	(revision 2477)
@@ -0,0 +1,55 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// is_nan.h: Rcpp R/C++ interface class library -- is_nan
+//
+// Copyright (C) 2013 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__is_nan_h
+#define Rcpp__sugar__is_nan_h
+
+namespace Rcpp{
+namespace sugar{
+
+template <int RTYPE, bool NA, typename VEC_TYPE>
+class IsNaN : public ::Rcpp::VectorBase< LGLSXP, false, IsNaN<RTYPE,NA,VEC_TYPE> > {
+public:
+
+	IsNaN( const VEC_TYPE& obj_) : obj(obj_){}
+
+        inline int operator[]( R_xlen_t i ) const {
+		return ::Rcpp::traits::is_nan<RTYPE>( obj[i] ) ;
+	}
+
+        inline R_xlen_t size() const { return obj.size() ; }
+
+private:
+	const VEC_TYPE& obj ;
+
+} ;
+
+
+} // sugar
+
+template <int RTYPE, bool NA, typename T>
+inline sugar::IsNaN<RTYPE,NA,T> is_nan( const Rcpp::VectorBase<RTYPE,NA,T>& t){
+	return sugar::IsNaN<RTYPE,NA,T>( t.get_ref() ) ;
+}
+
+} // Rcpp
+#endif
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/ifelse.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/ifelse.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/ifelse.h	(revision 2477)
@@ -0,0 +1,430 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// ifelse.h: Rcpp R/C++ interface class library -- ifelse
+//
+// Copyright (C) 2010 - 2014 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__ifelse_h
+#define Rcpp__sugar__ifelse_h
+
+namespace Rcpp{
+namespace sugar{
+
+template <
+	int RTYPE,
+	bool COND_NA, typename COND_T,
+	bool LHS_NA , typename LHS_T,
+	bool RHS_NA , typename RHS_T
+	>
+class IfElse : public VectorBase<
+	RTYPE,
+	( COND_NA || LHS_NA || RHS_NA ) ,
+	IfElse<RTYPE,COND_NA,COND_T,LHS_NA,LHS_T,RHS_NA,RHS_T>
+> {
+public:
+	typedef Rcpp::VectorBase<LGLSXP,COND_NA,COND_T> COND_TYPE ;
+	typedef Rcpp::VectorBase<RTYPE ,LHS_NA ,LHS_T>  LHS_TYPE ;
+	typedef Rcpp::VectorBase<RTYPE ,RHS_NA ,RHS_T>  RHS_TYPE ;
+	typedef typename traits::storage_type<RTYPE>::type STORAGE ;
+
+	// typedef typename Rcpp::traits::Extractor<RTYPE ,LHS_NA ,LHS_T>::type  LHS_EXT ;
+	// typedef typename Rcpp::traits::Extractor<RTYPE ,RHS_NA ,RHS_T>::type  RHS_EXT ;
+
+	IfElse( const COND_TYPE& cond_, const LHS_TYPE& lhs_, const RHS_TYPE& rhs_ ) :
+		cond(cond_), lhs(lhs_.get_ref()), rhs(rhs_.get_ref()) {
+			/* FIXME : cond, lhs and rhs must all have the same size */
+
+		RCPP_DEBUG( DEMANGLE(IfElse) ) ;
+	}
+
+	inline STORAGE operator[]( R_xlen_t i ) const {
+		int x = cond[i] ;
+		if( Rcpp::traits::is_na<LGLSXP>(x) ) return Rcpp::traits::get_na<RTYPE>() ;
+		if( x ) return lhs[i] ;
+		return rhs[i] ;
+	}
+
+	inline R_xlen_t size() const { return cond.size() ; }
+
+private:
+	const COND_TYPE& cond ;
+	const LHS_T& lhs ;
+	const RHS_T& rhs ;
+
+} ;
+
+template <
+	int RTYPE,
+	typename COND_T,
+	bool LHS_NA , typename LHS_T,
+	bool RHS_NA , typename RHS_T
+	>
+class IfElse<RTYPE,false,COND_T,LHS_NA,LHS_T,RHS_NA,RHS_T> : public VectorBase<
+	RTYPE,
+	( LHS_NA || RHS_NA ) ,
+	IfElse<RTYPE,false,COND_T,LHS_NA,LHS_T,RHS_NA,RHS_T>
+> {
+public:
+	typedef Rcpp::VectorBase<LGLSXP,false,COND_T> COND_TYPE ;
+	typedef Rcpp::VectorBase<RTYPE ,LHS_NA ,LHS_T>  LHS_TYPE ;
+	typedef Rcpp::VectorBase<RTYPE ,RHS_NA ,RHS_T>  RHS_TYPE ;
+	typedef typename traits::storage_type<RTYPE>::type STORAGE ;
+
+	typedef typename Rcpp::traits::Extractor<RTYPE ,LHS_NA ,LHS_T>::type  LHS_EXT ;
+	typedef typename Rcpp::traits::Extractor<RTYPE ,RHS_NA ,RHS_T>::type  RHS_EXT ;
+
+	IfElse( const COND_TYPE& cond_, const LHS_TYPE& lhs_, const RHS_TYPE& rhs_ ) :
+		cond(cond_), lhs(lhs_.get_ref()), rhs(rhs_.get_ref()) {
+			/* FIXME : cond, lhs and rhs must all have the same size */
+	}
+
+	inline STORAGE operator[]( R_xlen_t i ) const {
+		if( cond[i] ) return lhs[i] ;
+		return rhs[i] ;
+	}
+
+	inline R_xlen_t size() const { return cond.size() ; }
+
+private:
+
+	const COND_TYPE& cond ;
+	const LHS_EXT& lhs ;
+	const RHS_EXT& rhs ;
+
+} ;
+
+
+/* ifelse( cond, primitive, Vector ) */
+
+template <
+	int RTYPE,
+	bool COND_NA, typename COND_T,
+	bool RHS_NA , typename RHS_T
+	>
+class IfElse_Primitive_Vector : public VectorBase<
+	RTYPE,
+	true ,
+	IfElse_Primitive_Vector<RTYPE,COND_NA,COND_T,RHS_NA,RHS_T>
+> {
+public:
+	typedef Rcpp::VectorBase<LGLSXP,COND_NA,COND_T> COND_TYPE ;
+	typedef Rcpp::VectorBase<RTYPE ,RHS_NA ,RHS_T>  RHS_TYPE ;
+	typedef typename traits::storage_type<RTYPE>::type STORAGE ;
+
+	typedef typename Rcpp::traits::Extractor<RTYPE ,RHS_NA ,RHS_T>::type  RHS_EXT ;
+
+	IfElse_Primitive_Vector( const COND_TYPE& cond_, STORAGE lhs_, const RHS_TYPE& rhs_ ) :
+		cond(cond_), lhs(lhs_), rhs(rhs_.get_ref()) {
+			/* FIXME : cond, lhs and rhs must all have the sale size */
+	}
+
+	inline STORAGE operator[]( R_xlen_t i ) const {
+		int x = cond[i] ;
+		if( Rcpp::traits::is_na<LGLSXP>(x) ) return x ;
+		if( x ) return lhs ;
+		return rhs[i] ;
+	}
+
+	inline R_xlen_t size() const { return cond.size() ; }
+
+private:
+	const COND_TYPE& cond ;
+	STORAGE lhs ;
+	const RHS_EXT& rhs ;
+
+} ;
+
+template <
+	int RTYPE,
+	typename COND_T,
+	bool RHS_NA , typename RHS_T
+	>
+class IfElse_Primitive_Vector<RTYPE,false,COND_T,RHS_NA,RHS_T> : public VectorBase<
+	RTYPE,
+	true,
+	IfElse_Primitive_Vector<RTYPE,false,COND_T,RHS_NA,RHS_T>
+> {
+public:
+	typedef Rcpp::VectorBase<LGLSXP,false,COND_T> COND_TYPE ;
+	typedef Rcpp::VectorBase<RTYPE ,RHS_NA ,RHS_T>  RHS_TYPE ;
+	typedef typename traits::storage_type<RTYPE>::type STORAGE ;
+	typedef typename Rcpp::traits::Extractor<RTYPE ,RHS_NA ,RHS_T>::type  RHS_EXT ;
+
+	IfElse_Primitive_Vector( const COND_TYPE& cond_, STORAGE lhs_, const RHS_TYPE& rhs_ ) :
+		cond(cond_), lhs(lhs_), rhs(rhs_.get_ref()) {
+			/* FIXME : cond, lhs and rhs must all have the same size */
+	}
+
+	inline STORAGE operator[]( R_xlen_t i ) const {
+		if( cond[i] ) return lhs ;
+		return rhs[i] ;
+	}
+
+	inline R_xlen_t size() const { return cond.size() ; }
+
+private:
+	const COND_TYPE& cond ;
+	STORAGE lhs ;
+	const RHS_EXT& rhs ;
+
+} ;
+
+
+
+/* ifelse( cond, Vector, primitive ) */
+
+template <
+	int RTYPE,
+	bool COND_NA, typename COND_T,
+	bool LHS_NA , typename LHS_T
+	>
+class IfElse_Vector_Primitive : public VectorBase<
+	RTYPE,
+	true ,
+	IfElse_Vector_Primitive<RTYPE,COND_NA,COND_T,LHS_NA,LHS_T>
+> {
+public:
+	typedef Rcpp::VectorBase<LGLSXP,COND_NA,COND_T> COND_TYPE ;
+	typedef Rcpp::VectorBase<RTYPE ,LHS_NA ,LHS_T>  LHS_TYPE ;
+	typedef typename traits::storage_type<RTYPE>::type STORAGE ;
+	typedef typename Rcpp::traits::Extractor<RTYPE ,LHS_NA ,LHS_T>::type  LHS_EXT ;
+
+	IfElse_Vector_Primitive( const COND_TYPE& cond_, const LHS_TYPE& lhs_, STORAGE rhs_ ) :
+		cond(cond_), lhs(lhs_.get_ref()), rhs(rhs_) {
+			/* FIXME : cond, lhs and rhs must all have the same size */
+	}
+
+	inline STORAGE operator[]( R_xlen_t i ) const {
+		int x = cond[i] ;
+		if( Rcpp::traits::is_na<LGLSXP>(x) ) return Rcpp::traits::get_na<RTYPE>() ;
+		if( x ) return lhs[i] ;
+		return rhs ;
+	}
+
+	inline R_xlen_t size() const { return cond.size() ; }
+
+private:
+	const COND_TYPE& cond ;
+	const LHS_EXT& lhs ;
+	const STORAGE rhs ;
+
+} ;
+
+template <
+	int RTYPE,
+	typename COND_T,
+	bool LHS_NA , typename LHS_T
+	>
+class IfElse_Vector_Primitive<RTYPE,false,COND_T,LHS_NA,LHS_T> : public VectorBase<
+	RTYPE,
+	true ,
+	IfElse_Vector_Primitive<RTYPE,false,COND_T,LHS_NA,LHS_T>
+> {
+public:
+	typedef Rcpp::VectorBase<LGLSXP,false,COND_T> COND_TYPE ;
+	typedef Rcpp::VectorBase<RTYPE ,LHS_NA ,LHS_T>  LHS_TYPE ;
+	typedef typename traits::storage_type<RTYPE>::type STORAGE ;
+	typedef typename Rcpp::traits::Extractor<RTYPE ,LHS_NA ,LHS_T>::type  LHS_EXT ;
+
+	IfElse_Vector_Primitive( const COND_TYPE& cond_, const LHS_TYPE& lhs_, STORAGE rhs_ ) :
+		cond(cond_), lhs(lhs_.get_ref()), rhs(rhs_) {
+			/* FIXME : cond, lhs and rhs must all have the sale size */
+	}
+
+	inline STORAGE operator[]( R_xlen_t i ) const {
+		if( cond[i] ) return lhs[i] ;
+		return rhs ;
+	}
+
+	inline R_xlen_t size() const { return cond.size() ; }
+
+private:
+	const COND_TYPE& cond ;
+	const LHS_EXT& lhs ;
+	const STORAGE rhs ;
+
+} ;
+
+
+
+
+
+/* ifelse( cond, primitive, primitive ) */
+
+template <
+	int RTYPE,
+	bool COND_NA, typename COND_T
+	>
+class IfElse_Primitive_Primitive : public VectorBase<
+	RTYPE,
+	true ,
+	IfElse_Primitive_Primitive<RTYPE,COND_NA,COND_T>
+> {
+public:
+	typedef Rcpp::VectorBase<LGLSXP,COND_NA,COND_T> COND_TYPE ;
+	typedef typename traits::storage_type<RTYPE>::type STORAGE ;
+
+	IfElse_Primitive_Primitive( const COND_TYPE& cond_, STORAGE lhs_, STORAGE rhs_ ) :
+		cond(cond_), lhs(lhs_), rhs(rhs_)  {
+			/* FIXME : cond, lhs and rhs must all have the same size */
+	}
+
+	inline STORAGE operator[]( R_xlen_t i ) const {
+		int x = cond[i] ;
+		if( Rcpp::traits::is_na<LGLSXP>(x) ) return Rcpp::traits::get_na<RTYPE>() ;
+		return x ? lhs : rhs ;
+	}
+
+	inline R_xlen_t size() const { return cond.size() ; }
+
+private:
+	const COND_TYPE& cond ;
+	STORAGE lhs ;
+	STORAGE rhs ;
+	STORAGE na ;
+
+} ;
+
+template <
+	int RTYPE, typename COND_T
+	>
+class IfElse_Primitive_Primitive<RTYPE,false,COND_T> : public VectorBase<
+	RTYPE,
+	true ,
+	IfElse_Primitive_Primitive<RTYPE,false,COND_T>
+> {
+public:
+	typedef Rcpp::VectorBase<LGLSXP,false,COND_T> COND_TYPE ;
+	typedef typename traits::storage_type<RTYPE>::type STORAGE ;
+
+	IfElse_Primitive_Primitive( const COND_TYPE& cond_, STORAGE lhs_, STORAGE rhs_ ) :
+		cond(cond_), lhs(lhs_), rhs(rhs_) {
+			/* FIXME : cond, lhs and rhs must all have the same size */
+	}
+
+	inline STORAGE operator[]( R_xlen_t i ) const {
+		return cond[i] ? lhs : rhs ;
+	}
+
+	inline R_xlen_t size() const { return cond.size() ; }
+
+private:
+	const COND_TYPE& cond ;
+	STORAGE lhs ;
+	STORAGE rhs ;
+
+} ;
+
+} // sugar
+
+template <
+	int RTYPE,
+	bool COND_NA, typename COND_T,
+	bool LHS_NA , typename LHS_T,
+	bool RHS_NA , typename RHS_T
+	>
+inline sugar::IfElse< RTYPE,COND_NA,COND_T,LHS_NA,LHS_T,RHS_NA,RHS_T >
+ifelse(
+	const Rcpp::VectorBase<LGLSXP,COND_NA,COND_T>& cond,
+	const Rcpp::VectorBase<RTYPE ,LHS_NA ,LHS_T>& lhs,
+	const Rcpp::VectorBase<RTYPE ,RHS_NA ,RHS_T>& rhs
+	){
+	return sugar::IfElse<RTYPE,COND_NA,COND_T,LHS_NA,LHS_T,RHS_NA,RHS_T>( cond, lhs, rhs ) ;
+}
+
+
+template <
+	int RTYPE,
+	bool COND_NA, typename COND_T,
+	bool RHS_NA , typename RHS_T
+	>
+inline sugar::IfElse_Primitive_Vector< RTYPE,COND_NA,COND_T,RHS_NA,RHS_T >
+ifelse(
+	const Rcpp::VectorBase<LGLSXP,COND_NA,COND_T>& cond,
+	typename traits::storage_type<RTYPE>::type lhs,
+	const Rcpp::VectorBase<RTYPE ,RHS_NA ,RHS_T>& rhs
+	){
+	return sugar::IfElse_Primitive_Vector<RTYPE,COND_NA,COND_T,RHS_NA,RHS_T>( cond, lhs, rhs ) ;
+}
+
+template <
+	int RTYPE,
+	bool COND_NA, typename COND_T,
+	bool RHS_NA , typename RHS_T
+	>
+inline sugar::IfElse_Vector_Primitive< RTYPE,COND_NA,COND_T,RHS_NA,RHS_T >
+ifelse(
+	const Rcpp::VectorBase<LGLSXP,COND_NA,COND_T>& cond,
+	const Rcpp::VectorBase<RTYPE ,RHS_NA ,RHS_T>& lhs,
+	typename traits::storage_type<RTYPE>::type rhs
+	){
+	return sugar::IfElse_Vector_Primitive<RTYPE,COND_NA,COND_T,RHS_NA,RHS_T>( cond, lhs, rhs ) ;
+}
+
+template<
+	bool COND_NA, typename COND_T
+>
+inline sugar::IfElse_Primitive_Primitive< REALSXP,COND_NA,COND_T >
+ifelse(
+	const Rcpp::VectorBase<LGLSXP,COND_NA,COND_T>& cond,
+	double lhs,
+	double rhs
+	){
+	return sugar::IfElse_Primitive_Primitive<REALSXP,COND_NA,COND_T>( cond, lhs, rhs ) ;
+}
+
+template<
+	bool COND_NA, typename COND_T
+>
+inline sugar::IfElse_Primitive_Primitive< INTSXP,COND_NA,COND_T >
+ifelse(
+	const Rcpp::VectorBase<LGLSXP,COND_NA,COND_T>& cond,
+	int lhs,
+	int rhs
+	){
+	return sugar::IfElse_Primitive_Primitive<INTSXP,COND_NA,COND_T>( cond, lhs, rhs ) ;
+}
+
+template<
+	bool COND_NA, typename COND_T
+>
+inline sugar::IfElse_Primitive_Primitive< CPLXSXP,COND_NA,COND_T >
+ifelse(
+	const Rcpp::VectorBase<LGLSXP,COND_NA,COND_T>& cond,
+	Rcomplex lhs,
+	Rcomplex rhs
+	){
+	return sugar::IfElse_Primitive_Primitive<CPLXSXP,COND_NA,COND_T>( cond, lhs, rhs ) ;
+}
+
+template<
+	bool COND_NA, typename COND_T
+>
+inline sugar::IfElse_Primitive_Primitive< LGLSXP,COND_NA,COND_T >
+ifelse(
+	const Rcpp::VectorBase<LGLSXP,COND_NA,COND_T>& cond,
+	bool lhs,
+	bool rhs
+	){
+	return sugar::IfElse_Primitive_Primitive<LGLSXP,COND_NA,COND_T>( cond, lhs, rhs ) ;
+}
+
+
+} // Rcpp
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/which_max.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/which_max.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/which_max.h	(revision 2477)
@@ -0,0 +1,96 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// which_max.h: Rcpp R/C++ interface class library -- which.max
+//
+// Copyright (C) 2012   Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__which_max_h
+#define Rcpp__sugar__which_max_h
+
+namespace Rcpp{
+namespace sugar{
+
+template <int RTYPE, bool NA, typename T>
+class WhichMax {
+public:
+    typedef typename Rcpp::VectorBase<RTYPE,NA,T> VEC_TYPE ;
+    typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
+	WhichMax(const VEC_TYPE& obj_ ) : obj(obj_){}
+
+        R_xlen_t get() const {
+	    STORAGE current = obj[0] ;
+	    STORAGE min = current ;
+	    R_xlen_t index = 0 ;
+	    if( Rcpp::traits::is_na<RTYPE>(current) ) return NA_INTEGER ;
+	    R_xlen_t n = obj.size() ;
+	    for( R_xlen_t i=1; i<n; i++){
+		    current = obj[i] ;
+		    if( Rcpp::traits::is_na<RTYPE>(current) ) return NA_INTEGER ;
+		    if( current > min ){
+		        min = current ;
+		        index = i ;
+		    }
+		}
+		return index ;
+	}
+
+private:
+    const VEC_TYPE& obj ;
+
+} ;
+
+template <int RTYPE, typename T>
+class WhichMax<RTYPE,false,T> {
+public:
+    typedef typename Rcpp::VectorBase<RTYPE,false,T> VEC_TYPE ;
+    typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
+	WhichMax(const VEC_TYPE& obj_ ) : obj(obj_){}
+
+        R_xlen_t get() const {
+	    STORAGE current = obj[0] ;
+	    STORAGE min = current ;
+	    R_xlen_t index = 0 ;
+	    R_xlen_t n = obj.size() ;
+	    for( R_xlen_t i=1; i<n; i++){
+		    current = obj[i] ;
+		    if( current > min ){
+		        min = current ;
+		        index = i ;
+		    }
+		}
+		return index ;
+	}
+
+private:
+    const VEC_TYPE& obj ;
+
+} ;
+
+
+} // sugar
+
+
+
+template <int RTYPE, bool NA, typename T>
+R_xlen_t which_max( const VectorBase<RTYPE,NA,T>& t ){
+	return sugar::WhichMax<RTYPE,NA,T>(t).get() ;
+}
+
+} // Rcpp
+#endif
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/diff.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/diff.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/diff.h	(revision 2477)
@@ -0,0 +1,139 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 4 -*-
+//
+// diff.h: Rcpp R/C++ interface class library -- diff
+//
+// Copyright (C) 2010 - 2013 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__diff_h
+#define Rcpp__sugar__diff_h
+
+namespace Rcpp{
+namespace sugar{
+
+// NOTE: caching the previous value so that we only have to fetch the
+//       value once only works because we process the object from left to
+//       right
+template <int RTYPE, bool LHS_NA, typename LHS_T>
+class Diff : public Rcpp::VectorBase< RTYPE, LHS_NA , Diff<RTYPE,LHS_NA,LHS_T> > {
+public:
+	typedef typename Rcpp::VectorBase<RTYPE,LHS_NA,LHS_T> LHS_TYPE ;
+	typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
+
+	Diff( const LHS_TYPE& lhs_ ) :
+	    lhs(lhs_),
+	    previous(lhs_[0]),
+	    previous_index(0),
+	    was_na(traits::is_na<RTYPE>(previous))
+	{}
+
+	inline STORAGE operator[]( R_xlen_t i ) const {
+        STORAGE y = lhs[i+1] ;
+        if( previous_index != i ){
+            // we don't know the previous value, we need to get it.
+            set_previous(i, lhs[i] ) ; // record the current value
+        }
+        if( was_na || traits::is_na<RTYPE>(y) ) {
+            set_previous(i+1, y ) ;
+            return traits::get_na<RTYPE>() ; // NA
+        }
+        STORAGE res = y - previous ;
+        set_previous( i+1, y) ;
+        return res ;
+	}
+
+	inline void set_previous(R_xlen_t i, STORAGE value) const {
+	    previous = value ;
+	    was_na = traits::is_na<RTYPE>(previous) ;
+	    previous_index = i ;
+	}
+
+	inline R_xlen_t size() const { return lhs.size() - 1 ; }
+
+private:
+	const LHS_TYPE& lhs ;
+	mutable STORAGE previous ;
+	mutable R_xlen_t previous_index ;
+	mutable bool was_na ;
+} ;
+
+template <typename LHS_T, bool LHS_NA>
+class Diff<REALSXP, LHS_NA, LHS_T> : public Rcpp::VectorBase< REALSXP, LHS_NA, Diff<REALSXP,LHS_NA,LHS_T> >{
+public:
+	typedef typename Rcpp::VectorBase<REALSXP,LHS_NA,LHS_T> LHS_TYPE ;
+
+	Diff( const LHS_TYPE& lhs_ ) : lhs(lhs_), previous(lhs_[0]), previous_index(0) {}
+
+	inline double operator[]( R_xlen_t i ) const {
+		double y = lhs[i+1] ;
+		if( previous_index != i ) previous = lhs[i] ;
+		double res = y - previous ;
+		previous = y ;
+		previous_index = i+1 ;
+		return res ;
+	}
+	inline R_xlen_t size() const { return lhs.size() - 1 ; }
+
+private:
+	const LHS_TYPE& lhs ;
+	mutable double previous ;
+	mutable R_xlen_t previous_index ;
+} ;
+
+template <int RTYPE, typename LHS_T>
+class Diff<RTYPE,false,LHS_T> : public Rcpp::VectorBase< RTYPE, false , Diff<RTYPE,false,LHS_T> > {
+public:
+	typedef typename Rcpp::VectorBase<RTYPE,false,LHS_T> LHS_TYPE ;
+	typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
+
+	Diff( const LHS_TYPE& lhs_ ) : lhs(lhs_), previous(lhs[0]), previous_index(0) {}
+
+	inline STORAGE operator[]( R_xlen_t i ) const {
+		STORAGE y = lhs[i+1] ;
+		if( previous_index != i ) previous = lhs[i] ;
+		STORAGE diff = y - previous ;
+		previous = y ;
+		previous_index = i+1 ;
+		return y - previous ;
+	}
+	inline R_xlen_t size() const { return lhs.size() - 1 ; }
+
+private:
+	const LHS_TYPE& lhs ;
+	mutable STORAGE previous ;
+	mutable R_xlen_t previous_index ;
+} ;
+
+} // sugar
+
+template <bool LHS_NA, typename LHS_T>
+inline sugar::Diff<INTSXP,LHS_NA,LHS_T> diff(
+	const VectorBase<INTSXP,LHS_NA,LHS_T>& lhs
+	){
+	return sugar::Diff<INTSXP,LHS_NA,LHS_T>( lhs ) ;
+}
+
+template <bool LHS_NA, typename LHS_T>
+inline sugar::Diff<REALSXP,LHS_NA,LHS_T> diff(
+	const VectorBase<REALSXP,LHS_NA,LHS_T>& lhs
+	){
+	return sugar::Diff<REALSXP,LHS_NA,LHS_T>( lhs ) ;
+}
+
+} // Rcpp
+#endif
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/is_finite.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/is_finite.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/is_finite.h	(revision 2477)
@@ -0,0 +1,55 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// is_finite.h: Rcpp R/C++ interface class library -- is_finite
+//
+// Copyright (C) 2013 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__is_finite_h
+#define Rcpp__sugar__is_finite_h
+
+namespace Rcpp{
+namespace sugar{
+
+template <int RTYPE, bool NA, typename VEC_TYPE>
+class IsFinite : public ::Rcpp::VectorBase< LGLSXP, false, IsFinite<RTYPE,NA,VEC_TYPE> > {
+public:
+
+	IsFinite( const VEC_TYPE& obj_) : obj(obj_){}
+
+	inline int operator[]( R_xlen_t i ) const {
+		return ::Rcpp::traits::is_finite<RTYPE>( obj[i] ) ;
+	}
+
+	inline R_xlen_t size() const { return obj.size() ; }
+
+private:
+	const VEC_TYPE& obj ;
+
+} ;
+
+
+} // sugar
+
+template <int RTYPE, bool NA, typename T>
+inline sugar::IsFinite<RTYPE,NA,T> is_finite( const Rcpp::VectorBase<RTYPE,NA,T>& t){
+	return sugar::IsFinite<RTYPE,NA,T>( t.get_ref() ) ;
+}
+
+} // Rcpp
+#endif
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/mapply/mapply_3.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/mapply/mapply_3.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/mapply/mapply_3.h	(revision 2477)
@@ -0,0 +1,87 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// mapply_3.h: Rcpp R/C++ interface class library -- mapply_3
+//
+// Copyright (C) 2012 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__mapply_3_h
+#define Rcpp__sugar__mapply_3_h
+
+namespace Rcpp{
+namespace sugar{
+
+template <
+    int RTYPE_1, bool NA_1, typename T_1,
+    int RTYPE_2, bool NA_2, typename T_2,
+    int RTYPE_3, bool NA_3, typename T_3,
+    typename Function
+>
+class Mapply_3 : public VectorBase<
+	Rcpp::traits::r_sexptype_traits<
+		typename ::Rcpp::traits::result_of<Function>::type
+	>::rtype ,
+	true ,
+	Mapply_3<RTYPE_1,NA_1,T_1,RTYPE_2,NA_2,T_2,RTYPE_3,NA_3,T_3,Function>
+> {
+public:
+	typedef typename ::Rcpp::traits::result_of<Function>::type result_type ;
+
+    typedef Rcpp::VectorBase<RTYPE_1,NA_1,T_1> VEC_1 ;
+	typedef Rcpp::VectorBase<RTYPE_2,NA_2,T_2> VEC_2 ;
+	typedef Rcpp::VectorBase<RTYPE_3,NA_3,T_3> VEC_3 ;
+
+	typedef typename Rcpp::traits::Extractor<RTYPE_1,NA_1,T_1>::type EXT_1 ;
+	typedef typename Rcpp::traits::Extractor<RTYPE_2,NA_2,T_2>::type EXT_2 ;
+	typedef typename Rcpp::traits::Extractor<RTYPE_3,NA_3,T_3>::type EXT_3 ;
+
+	Mapply_3( const VEC_1& vec_1_, const VEC_2& vec_2_, const VEC_3& vec_3_, Function fun_ ) :
+		vec_1(vec_1_.get_ref()), vec_2(vec_2_.get_ref()), vec_3(vec_3_.get_ref()), fun(fun_){}
+
+        inline result_type operator[]( R_xlen_t i ) const {
+		return fun( vec_1[i], vec_2[i], vec_3[i] );
+	}
+        inline R_xlen_t size() const { return vec_1.size() ; }
+
+private:
+	const EXT_1& vec_1 ;
+	const EXT_2& vec_2 ;
+	const EXT_3& vec_3 ;
+	Function fun ;
+} ;
+
+} // sugar
+
+template <
+    int RTYPE_1, bool NA_1, typename T_1,
+    int RTYPE_2, bool NA_2, typename T_2,
+    int RTYPE_3, bool NA_3, typename T_3,
+    typename Function
+    >
+inline sugar::Mapply_3<RTYPE_1,NA_1,T_1,RTYPE_2,NA_2,T_2,RTYPE_3, NA_3,T_3,Function>
+mapply(
+    const Rcpp::VectorBase<RTYPE_1,NA_1,T_1>& t1,
+    const Rcpp::VectorBase<RTYPE_2,NA_2,T_2>& t2,
+    const Rcpp::VectorBase<RTYPE_3,NA_3,T_3>& t3,
+    Function fun
+){
+	return sugar::Mapply_3<RTYPE_1,NA_1,T_1,RTYPE_2,NA_2,T_2,RTYPE_3,NA_3,T_3,Function>( t1, t2, t3, fun ) ;
+}
+
+} // Rcpp
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/mapply/mapply_2.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/mapply/mapply_2.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/mapply/mapply_2.h	(revision 2477)
@@ -0,0 +1,146 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// mapply_2.h: Rcpp R/C++ interface class library -- mapply_2
+//
+// Copyright (C) 2012 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__mapply_2_h
+#define Rcpp__sugar__mapply_2_h
+
+namespace Rcpp{
+namespace sugar{
+
+template <int RTYPE,
+    bool NA_1, typename T_1,
+    bool NA_2, typename T_2,
+    typename Function
+>
+class Mapply_2 : public VectorBase<
+	Rcpp::traits::r_sexptype_traits<
+		typename ::Rcpp::traits::result_of<Function>::type
+	>::rtype ,
+	true ,
+	Mapply_2<RTYPE,NA_1,T_1,NA_2,T_2,Function>
+> {
+public:
+	typedef typename ::Rcpp::traits::result_of<Function>::type result_type ;
+
+	Mapply_2( const T_1& vec_1_, const T_2& vec_2_, Function fun_ ) :
+		vec_1(vec_1_), vec_2(vec_2_), fun(fun_){}
+
+        inline result_type operator[]( R_xlen_t i ) const {
+		return fun( vec_1[i], vec_2[i] );
+	}
+        inline R_xlen_t size() const { return vec_1.size() ; }
+
+private:
+	const T_1& vec_1 ;
+	const T_2& vec_2 ;
+	Function fun ;
+} ;
+
+template <int RTYPE,
+    bool NA_1, typename T_1,
+    typename PRIM_2 ,
+    typename Function
+>
+class Mapply_2_Vector_Primitive : public
+    VectorBase<
+	    Rcpp::traits::r_sexptype_traits<
+	    	typename ::Rcpp::traits::result_of<Function>::type
+	    >::rtype ,
+	    true ,
+	    Mapply_2_Vector_Primitive<RTYPE,NA_1,T_1,PRIM_2,Function>
+    >
+{
+public:
+	typedef typename ::Rcpp::traits::result_of<Function>::type result_type ;
+
+	Mapply_2_Vector_Primitive( const T_1& vec_1_, PRIM_2 prim_2_, Function fun_ ) :
+		vec_1(vec_1_), prim_2(prim_2_), fun(fun_){}
+
+        inline result_type operator[]( R_xlen_t i ) const {
+		return fun( vec_1[i], prim_2 );
+	}
+        inline R_xlen_t size() const { return vec_1.size() ; }
+
+private:
+	const T_1& vec_1 ;
+	PRIM_2 prim_2 ;
+	Function fun ;
+} ;
+
+template <int RTYPE,
+    typename PRIM_1,
+    bool NA_2, typename T_2,
+    typename Function
+>
+class Mapply_2_Primitive_Vector : public
+    VectorBase<
+	    Rcpp::traits::r_sexptype_traits<
+	    	typename ::Rcpp::traits::result_of<Function>::type
+	    >::rtype ,
+	    true ,
+	    Mapply_2_Primitive_Vector<RTYPE,PRIM_1,NA_2,T_2,Function>
+    >
+{
+public:
+	typedef typename ::Rcpp::traits::result_of<Function>::type result_type ;
+
+	Mapply_2_Primitive_Vector( PRIM_1 prim_1_, const T_2& vec_2_, Function fun_ ) :
+		prim_1(prim_1_), vec_2(vec_2_), fun(fun_){}
+
+        inline result_type operator[]( R_xlen_t i ) const {
+		return fun( prim_1, vec_2[i] );
+	}
+        inline R_xlen_t size() const { return vec_2.size() ; }
+
+private:
+	PRIM_1 prim_1 ;
+    const T_2& vec_2 ;
+	Function fun ;
+} ;
+
+
+
+} // sugar
+
+
+template <int RTYPE, bool NA_1, typename T_1, bool NA_2, typename T_2, typename Function >
+inline sugar::Mapply_2<RTYPE,NA_1,T_1,NA_2,T_2,Function>
+mapply( const Rcpp::VectorBase<RTYPE,NA_1,T_1>& t1, const Rcpp::VectorBase<RTYPE,NA_2,T_2>& t2, Function fun ){
+	return sugar::Mapply_2<RTYPE,NA_1,T_1,NA_2,T_2,Function>( t1.get_ref(), t2.get_ref(), fun ) ;
+}
+
+template <int RTYPE, bool NA_1, typename T_1, typename Function >
+inline sugar::Mapply_2_Vector_Primitive<RTYPE,NA_1,T_1,double,Function>
+mapply( const Rcpp::VectorBase<RTYPE,NA_1,T_1>& t1, double t2, Function fun ){
+	return sugar::Mapply_2_Vector_Primitive<RTYPE,NA_1,T_1,double,Function>( t1.get_ref(), t2, fun ) ;
+}
+
+template <int RTYPE, bool NA_2, typename T_2, typename Function >
+inline sugar::Mapply_2_Primitive_Vector<RTYPE,double, NA_2,T_2,Function>
+mapply( double t1, const Rcpp::VectorBase<RTYPE,NA_2,T_2>& t2, Function fun ){
+	return sugar::Mapply_2_Primitive_Vector<RTYPE,double, NA_2,T_2,Function>( t1, t2.get_ref(), fun ) ;
+}
+
+
+
+} // Rcpp
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/Lazy.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/Lazy.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/Lazy.h	(revision 2477)
@@ -0,0 +1,37 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// Lazy.h: Rcpp R/C++ interface class library -- Lazy
+//
+// Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__Lazy_h
+#define Rcpp__sugar__Lazy_h
+
+namespace Rcpp{
+namespace sugar{
+
+template <typename T, typename EXPR>
+class Lazy {
+public:
+	inline operator T() const { return static_cast<const EXPR&>(*this).get() ; }
+} ;
+
+}
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/rowSums.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/rowSums.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/rowSums.h	(revision 2477)
@@ -0,0 +1,961 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+//
+// rowSums.h: Rcpp R/C++ interface class library -- rowSums, colSums, rowMeans, colMeans 
+//
+// Copyright (C) 2016 Nathan Russell
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__rowSums_h
+#define Rcpp__sugar__rowSums_h
+
+namespace Rcpp {
+namespace sugar {
+namespace detail {
+
+
+inline bool check_na(double x) {
+    return ISNAN(x);
+}
+
+inline bool check_na(int x) {
+    return x == NA_INTEGER;
+}
+
+inline bool check_na(Rboolean x) {
+    return x == NA_LOGICAL;
+}
+
+inline bool check_na(SEXP x) {
+    return x == NA_STRING;
+}
+
+inline bool check_na(Rcomplex x) {
+    return ISNAN(x.r) || ISNAN(x.i);
+}
+
+
+inline void incr(double* lhs, double rhs) {
+    *lhs += rhs;
+}
+
+inline void incr(int* lhs, int rhs) {
+    *lhs += rhs;
+}
+
+inline void incr(Rcomplex* lhs, const Rcomplex& rhs) {
+    lhs->r += rhs.r;
+    lhs->i += rhs.i;
+}
+
+
+inline void div(double* lhs, R_xlen_t rhs) {
+    *lhs /= rhs;
+}
+
+inline void div(Rcomplex* lhs, R_xlen_t rhs) {
+    lhs->r /= rhs;
+    lhs->i /= rhs;
+}
+
+
+inline void set_nan(double* x) {
+    *x = R_NaN;
+}
+
+inline void set_nan(Rcomplex* x) {
+    x->r = R_NaN;
+    x->i = R_NaN;
+}
+
+
+template <int RTYPE>
+struct RowSumsReturn {
+    typedef Vector<RTYPE> type;
+    enum { rtype = RTYPE };
+};
+
+template <>
+struct RowSumsReturn<LGLSXP> {
+    typedef Vector<INTSXP> type;
+    enum { rtype = INTSXP };
+};
+
+template <int RTYPE>
+struct ColSumsReturn
+    : public RowSumsReturn<RTYPE> {};
+
+
+template <int RTYPE>
+struct RowMeansReturn {
+    typedef Vector<REALSXP> type;
+    enum { rtype = REALSXP };
+};
+
+template <>
+struct RowMeansReturn<CPLXSXP> {
+    typedef Vector<CPLXSXP> type;
+    enum { rtype = CPLXSXP };
+};
+
+template <int RTYPE>
+struct ColMeansReturn
+    : public RowMeansReturn<RTYPE> {};
+
+
+} // detail
+
+
+//  RowSums
+//      na.rm = FALSE
+//      default input
+//      default output
+//
+template <int RTYPE, bool NA, typename T, bool NA_RM = false>
+class RowSumsImpl :
+    public Lazy<typename detail::RowSumsReturn<RTYPE>::type, RowSumsImpl<RTYPE, NA, T, NA_RM> > {
+private:
+    const MatrixBase<RTYPE, NA, T>& ref;
+
+    typedef detail::RowSumsReturn<RTYPE> return_traits;
+    typedef typename return_traits::type return_vector;
+    typedef typename traits::storage_type<return_traits::rtype>::type stored_type;
+
+public:
+    RowSumsImpl(const MatrixBase<RTYPE, NA, T>& ref_)
+        : ref(ref_)
+    {}
+
+    return_vector get() const {
+        R_xlen_t i, j, nr = ref.nrow(), nc = ref.ncol();
+        return_vector res(nr);
+
+        for (j = 0; j < nc; j++) {
+            for (i = 0; i < nr; i++) {
+                detail::incr(&res[i], ref(i, j));
+            }
+        }
+
+        return res;
+    }
+};
+
+//  RowSums
+//      na.rm = FALSE
+//      LGLSXP / INTSXP input
+//      INTSXP output
+//
+//      int + NA_LOGICAL (NA_INTEGER) != NA_INTEGER, as is the
+//      case with NA_REAL, so we specialize for these two SEXPTYPES 
+//      and do explicit accounting of NAs.  
+//      
+//      The two specializations, while necessary, are redundant, hence
+//      the macro. The same applies to the 'na.rm = TRUE' variant, and 
+//      likewise for colSums, rowMeans, and colMeans. 
+//
+#define ROW_SUMS_IMPL_KEEPNA(__RTYPE__)                                                                     \
+                                                                                                            \
+template <bool NA, typename T, bool NA_RM>                                                                  \
+class RowSumsImpl<__RTYPE__, NA, T, NA_RM>  :                                                               \
+    public Lazy<typename detail::RowSumsReturn<__RTYPE__>::type, RowSumsImpl<__RTYPE__, NA, T, NA_RM> > {   \
+private:                                                                                                    \
+    const MatrixBase<__RTYPE__, NA, T>& ref;                                                                \
+                                                                                                            \
+    typedef detail::RowSumsReturn<__RTYPE__> return_traits;                                                 \
+    typedef typename return_traits::type return_vector;                                                     \
+    typedef typename traits::storage_type<return_traits::rtype>::type stored_type;                          \
+                                                                                                            \
+    struct bit {                                                                                            \
+        unsigned char x : 1;                                                                                \
+    };                                                                                                      \
+                                                                                                            \
+public:                                                                                                     \
+    RowSumsImpl(const MatrixBase<__RTYPE__, NA, T>& ref_)                                                   \
+        : ref(ref_)                                                                                         \
+    {}                                                                                                      \
+                                                                                                            \
+    return_vector get() const {                                                                             \
+        R_xlen_t i, j, nr = ref.nrow(), nc = ref.ncol();                                                    \
+        return_vector res(nr);                                                                              \
+                                                                                                            \
+        std::vector<bit> na_flags(nr);                                                                      \
+                                                                                                            \
+        for (j = 0; j < nc; j++) {                                                                          \
+            for (i = 0; i < nr; i++) {                                                                      \
+                if (detail::check_na(ref(i, j))) {                                                          \
+                    na_flags[i].x |= 0x1;                                                                   \
+                }                                                                                           \
+                detail::incr(&res[i], ref(i, j));                                                           \
+            }                                                                                               \
+        }                                                                                                   \
+                                                                                                            \
+        for (i = 0; i < nr; i++) {                                                                          \
+            if (na_flags[i].x) {                                                                            \
+                res[i] = NA_INTEGER;                                                                        \
+            }                                                                                               \
+        }                                                                                                   \
+                                                                                                            \
+        return res;                                                                                         \
+    }                                                                                                       \
+}; 
+
+ROW_SUMS_IMPL_KEEPNA(LGLSXP) 
+ROW_SUMS_IMPL_KEEPNA(INTSXP) 
+
+#undef ROW_SUMS_IMPL_KEEPNA
+
+//  RowSums
+//      na.rm = TRUE
+//      default input
+//      default output
+//
+template <int RTYPE, bool NA, typename T>
+class RowSumsImpl<RTYPE, NA, T, true> :
+    public Lazy<typename detail::RowSumsReturn<RTYPE>::type, RowSumsImpl<RTYPE, NA, T, true> > {
+private:
+    const MatrixBase<RTYPE, NA, T>& ref;
+
+    typedef detail::RowSumsReturn<RTYPE> return_traits;
+    typedef typename return_traits::type return_vector;
+    typedef typename traits::storage_type<return_traits::rtype>::type stored_type;
+
+public:
+    RowSumsImpl(const MatrixBase<RTYPE, NA, T>& ref_)
+        : ref(ref_)
+    {}
+
+    return_vector get() const {
+        R_xlen_t i, j, nr = ref.nrow(), nc = ref.ncol();
+        return_vector res(nr);
+
+        stored_type current = stored_type();
+
+        for (j = 0; j < nc; j++) {
+            for (i = 0; i < nr; i++) {
+                current = ref(i, j);
+                if (!detail::check_na(current)) {
+                    detail::incr(&res[i], current);
+                }
+            }
+        }
+
+        return res;
+    }
+};
+
+//  RowSums
+//      na.rm = TRUE
+//      LGLSXP / INTSXP input
+//      INTSXP output
+//
+#define ROW_SUMS_IMPL_RMNA(__RTYPE__)                                                                       \
+                                                                                                            \
+template <bool NA, typename T>                                                                              \
+class RowSumsImpl<__RTYPE__, NA, T, true> :                                                                 \
+    public Lazy<typename detail::RowSumsReturn<__RTYPE__>::type, RowSumsImpl<__RTYPE__, NA, T, true> > {    \
+private:                                                                                                    \
+    const MatrixBase<__RTYPE__, NA, T>& ref;                                                                \
+                                                                                                            \
+    typedef detail::RowSumsReturn<__RTYPE__> return_traits;                                                 \
+    typedef typename return_traits::type return_vector;                                                     \
+    typedef typename traits::storage_type<return_traits::rtype>::type stored_type;                          \
+                                                                                                            \
+public:                                                                                                     \
+    RowSumsImpl(const MatrixBase<__RTYPE__, NA, T>& ref_)                                                   \
+        : ref(ref_)                                                                                         \
+    {}                                                                                                      \
+                                                                                                            \
+    return_vector get() const {                                                                             \
+        R_xlen_t i, j, nr = ref.nrow(), nc = ref.ncol();                                                    \
+        return_vector res(nr);                                                                              \
+                                                                                                            \
+        stored_type current = stored_type();                                                                \
+                                                                                                            \
+        for (j = 0; j < nc; j++) {                                                                          \
+            for (i = 0; i < nr; i++) {                                                                      \
+                current = ref(i, j);                                                                        \
+                if (!detail::check_na(current)) {                                                           \
+                    detail::incr(&res[i], current);                                                         \
+                }                                                                                           \
+            }                                                                                               \
+        }                                                                                                   \
+                                                                                                            \
+        return res;                                                                                         \
+    }                                                                                                       \
+}; 
+
+ROW_SUMS_IMPL_RMNA(LGLSXP) 
+ROW_SUMS_IMPL_RMNA(INTSXP) 
+
+#undef ROW_SUMS_IMPL_RMNA
+
+//  RowSums
+//      Input with template parameter NA = false
+//      RowSumsImpl<..., NA_RM = false>
+//
+template <int RTYPE, typename T, bool NA_RM>
+class RowSumsImpl<RTYPE, false, T, NA_RM>
+    : public RowSumsImpl<RTYPE, false, T, false> {};
+
+
+//  ColSums
+//      na.rm = FALSE
+//      default input
+//      default output
+//
+template <int RTYPE, bool NA, typename T, bool NA_RM = false>
+class ColSumsImpl :
+    public Lazy<typename detail::ColSumsReturn<RTYPE>::type, ColSumsImpl<RTYPE, NA, T, NA_RM> > {
+private:
+    const MatrixBase<RTYPE, NA, T>& ref;
+
+    typedef detail::ColSumsReturn<RTYPE> return_traits;
+    typedef typename return_traits::type return_vector;
+    typedef typename traits::storage_type<return_traits::rtype>::type stored_type;
+
+public:
+    ColSumsImpl(const MatrixBase<RTYPE, NA, T>& ref_)
+        : ref(ref_)
+    {}
+
+    return_vector get() const {
+        R_xlen_t i, j, nr = ref.nrow(), nc = ref.ncol();
+        return_vector res(nc);
+
+        for (j = 0; j < nc; j++) {
+            for (i = 0; i < nr; i++) {
+                detail::incr(&res[j], ref(i, j));
+            }
+        }
+
+        return res;
+    }
+};
+
+//  ColSums
+//      na.rm = FALSE
+//      LGLSXP / INTSXP input
+//      INTSXP output
+//
+#define COL_SUMS_IMPL_KEEPNA(__RTYPE__)                                                                     \
+                                                                                                            \
+template <bool NA, typename T, bool NA_RM>                                                                  \
+class ColSumsImpl<__RTYPE__, NA, T, NA_RM>  :                                                               \
+    public Lazy<typename detail::ColSumsReturn<__RTYPE__>::type, ColSumsImpl<__RTYPE__, NA, T, NA_RM> > {   \
+private:                                                                                                    \
+    const MatrixBase<__RTYPE__, NA, T>& ref;                                                                \
+                                                                                                            \
+    typedef detail::ColSumsReturn<__RTYPE__> return_traits;                                                 \
+    typedef typename return_traits::type return_vector;                                                     \
+    typedef typename traits::storage_type<return_traits::rtype>::type stored_type;                          \
+                                                                                                            \
+    struct bit {                                                                                            \
+        unsigned char x : 1;                                                                                \
+    };                                                                                                      \
+                                                                                                            \
+public:                                                                                                     \
+    ColSumsImpl(const MatrixBase<__RTYPE__, NA, T>& ref_)                                                   \
+        : ref(ref_)                                                                                         \
+    {}                                                                                                      \
+                                                                                                            \
+    return_vector get() const {                                                                             \
+        R_xlen_t i, j, nr = ref.nrow(), nc = ref.ncol();                                                    \
+        return_vector res(nc);                                                                              \
+                                                                                                            \
+        std::vector<bit> na_flags(nc);                                                                      \
+                                                                                                            \
+        for (j = 0; j < nc; j++) {                                                                          \
+            for (i = 0; i < nr; i++) {                                                                      \
+                if (detail::check_na(ref(i, j))) {                                                          \
+                    na_flags[j].x |= 0x1;                                                                   \
+                }                                                                                           \
+                detail::incr(&res[j], ref(i, j));                                                           \
+            }                                                                                               \
+        }                                                                                                   \
+                                                                                                            \
+        for (j = 0; j < nc; j++) {                                                                          \
+            if (na_flags[j].x) {                                                                            \
+                res[j] = NA_INTEGER;                                                                        \
+            }                                                                                               \
+        }                                                                                                   \
+                                                                                                            \
+        return res;                                                                                         \
+    }                                                                                                       \
+};
+
+COL_SUMS_IMPL_KEEPNA(LGLSXP) 
+COL_SUMS_IMPL_KEEPNA(INTSXP) 
+
+#undef COL_SUMS_IMPL_KEEPNA
+    
+//  ColSums
+//      na.rm = TRUE
+//      default input
+//      default output
+//
+template <int RTYPE, bool NA, typename T>
+class ColSumsImpl<RTYPE, NA, T, true> :
+    public Lazy<typename detail::ColSumsReturn<RTYPE>::type, ColSumsImpl<RTYPE, NA, T, true> > {
+private:
+    const MatrixBase<RTYPE, NA, T>& ref;
+
+    typedef detail::ColSumsReturn<RTYPE> return_traits;
+    typedef typename return_traits::type return_vector;
+    typedef typename traits::storage_type<return_traits::rtype>::type stored_type;
+
+public:
+    ColSumsImpl(const MatrixBase<RTYPE, NA, T>& ref_)
+        : ref(ref_)
+    {}
+
+    return_vector get() const {
+        R_xlen_t i, j, nr = ref.nrow(), nc = ref.ncol();
+        return_vector res(nc);
+
+        stored_type current = stored_type();
+
+        for (j = 0; j < nc; j++) {
+            for (i = 0; i < nr; i++) {
+                current = ref(i, j);
+                if (!detail::check_na(current)) {
+                    detail::incr(&res[j], current);
+                }
+            }
+        }
+
+        return res;
+    }
+};
+
+//  ColSums
+//      na.rm = TRUE
+//      LGLSXP / INTSXP input
+//      INTSXP output
+//
+#define COL_SUMS_IMPL_RMNA(__RTYPE__)                                                                       \
+                                                                                                            \
+template <bool NA, typename T>                                                                              \
+class ColSumsImpl<__RTYPE__, NA, T, true> :                                                                 \
+    public Lazy<typename detail::ColSumsReturn<__RTYPE__>::type, ColSumsImpl<__RTYPE__, NA, T, true> > {    \
+private:                                                                                                    \
+    const MatrixBase<__RTYPE__, NA, T>& ref;                                                                \
+                                                                                                            \
+    typedef detail::ColSumsReturn<__RTYPE__> return_traits;                                                 \
+    typedef typename return_traits::type return_vector;                                                     \
+    typedef typename traits::storage_type<return_traits::rtype>::type stored_type;                          \
+                                                                                                            \
+public:                                                                                                     \
+    ColSumsImpl(const MatrixBase<__RTYPE__, NA, T>& ref_)                                                   \
+        : ref(ref_)                                                                                         \
+    {}                                                                                                      \
+                                                                                                            \
+    return_vector get() const {                                                                             \
+        R_xlen_t i, j, nr = ref.nrow(), nc = ref.ncol();                                                    \
+        return_vector res(nc);                                                                              \
+                                                                                                            \
+        stored_type current = stored_type();                                                                \
+                                                                                                            \
+        for (j = 0; j < nc; j++) {                                                                          \
+            for (i = 0; i < nr; i++) {                                                                      \
+                current = ref(i, j);                                                                        \
+                if (!detail::check_na(current)) {                                                           \
+                    detail::incr(&res[j], current);                                                         \
+                }                                                                                           \
+            }                                                                                               \
+        }                                                                                                   \
+                                                                                                            \
+        return res;                                                                                         \
+    }                                                                                                       \
+};
+
+COL_SUMS_IMPL_RMNA(LGLSXP) 
+COL_SUMS_IMPL_RMNA(INTSXP) 
+
+#undef COL_SUMS_IMPL_RMNA
+
+//  ColSums
+//      Input with template parameter NA = false
+//      ColSumsImpl<..., NA_RM = false>
+//
+template <int RTYPE, typename T, bool NA_RM>
+class ColSumsImpl<RTYPE, false, T, NA_RM>
+    : public ColSumsImpl<RTYPE, false, T, false> {};
+
+
+// RowMeans
+//      na.rm = FALSE
+//      default input
+//      default output
+//
+//      All RowMeans and ColMeans variants use a single-pass
+//      mean calculation as in array.c
+//
+template <int RTYPE, bool NA, typename T, bool NA_RM = false>
+class RowMeansImpl :
+    public Lazy<typename detail::RowMeansReturn<RTYPE>::type, RowMeansImpl<RTYPE, NA, T, NA_RM> > {
+private:
+    const MatrixBase<RTYPE, NA, T>& ref;
+
+    typedef detail::RowMeansReturn<RTYPE> return_traits;
+    typedef typename return_traits::type return_vector;
+    typedef typename traits::storage_type<return_traits::rtype>::type stored_type;
+
+public:
+    RowMeansImpl(const MatrixBase<RTYPE, NA, T>& ref_)
+        : ref(ref_)
+    {}
+
+    return_vector get() const {
+        R_xlen_t i, j, nr = ref.nrow(), nc = ref.ncol();
+        return_vector res(nr);
+
+        for (j = 0; j < nc; j++) {
+            for (i = 0; i < nr; i++) {
+                detail::incr(&res[i], ref(i, j));
+            }
+        }
+
+        for (i = 0; i < nr; i++) {
+            detail::div(&res[i], nc);
+        }
+
+        return res;
+    }
+};
+
+// RowMeans
+//      na.rm = FALSE
+//      LGLSXP / INTSXP input
+//      REALSXP output
+//
+#define ROW_MEANS_IMPL_KEEPNA(__RTYPE__)                                                                        \
+                                                                                                                \
+template <bool NA, typename T, bool NA_RM>                                                                      \
+class RowMeansImpl<__RTYPE__, NA, T, NA_RM> :                                                                   \
+    public Lazy<typename detail::RowMeansReturn<__RTYPE__>::type, RowMeansImpl<__RTYPE__, NA, T, NA_RM> > {     \
+private:                                                                                                        \
+    const MatrixBase<__RTYPE__, NA, T>& ref;                                                                    \
+                                                                                                                \
+    typedef detail::RowMeansReturn<__RTYPE__> return_traits;                                                    \
+    typedef typename return_traits::type return_vector;                                                         \
+    typedef typename traits::storage_type<return_traits::rtype>::type stored_type;                              \
+                                                                                                                \
+    struct bit {                                                                                                \
+        unsigned char x : 1;                                                                                    \
+    };                                                                                                          \
+                                                                                                                \
+public:                                                                                                         \
+    RowMeansImpl(const MatrixBase<__RTYPE__, NA, T>& ref_)                                                      \
+        : ref(ref_)                                                                                             \
+    {}                                                                                                          \
+                                                                                                                \
+    return_vector get() const {                                                                                 \
+        R_xlen_t i, j, nr = ref.nrow(), nc = ref.ncol();                                                        \
+        return_vector res(nr);                                                                                  \
+                                                                                                                \
+        std::vector<bit> na_flags(nc);                                                                          \
+                                                                                                                \
+        for (j = 0; j < nc; j++) {                                                                              \
+            for (i = 0; i < nr; i++) {                                                                          \
+                if (detail::check_na(ref(i, j))) {                                                              \
+                    na_flags[i].x |= 0x1;                                                                       \
+                }                                                                                               \
+                detail::incr(&res[i], ref(i, j));                                                               \
+            }                                                                                                   \
+        }                                                                                                       \
+                                                                                                                \
+        for (i = 0; i < nr; i++) {                                                                              \
+            if (!na_flags[i].x) {                                                                               \
+                detail::div(&res[i], nc);                                                                       \
+            } else {                                                                                            \
+                res[i] = NA_REAL;                                                                               \
+            }                                                                                                   \
+        }                                                                                                       \
+                                                                                                                \
+        return res;                                                                                             \
+    }                                                                                                           \
+};
+
+ROW_MEANS_IMPL_KEEPNA(LGLSXP) 
+ROW_MEANS_IMPL_KEEPNA(INTSXP) 
+
+#undef ROW_MEANS_IMPL_KEEPNA
+    
+// RowMeans
+//      na.rm = TRUE
+//      default input
+//      default output
+//
+template <int RTYPE, bool NA, typename T>
+class RowMeansImpl<RTYPE, NA, T, true> :
+    public Lazy<typename detail::RowMeansReturn<RTYPE>::type, RowMeansImpl<RTYPE, NA, T, true> > {
+private:
+    const MatrixBase<RTYPE, NA, T>& ref;
+
+    typedef detail::RowMeansReturn<RTYPE> return_traits;
+    typedef typename return_traits::type return_vector;
+    typedef typename traits::storage_type<return_traits::rtype>::type stored_type;
+
+public:
+    RowMeansImpl(const MatrixBase<RTYPE, NA, T>& ref_)
+        : ref(ref_)
+    {}
+
+    return_vector get() const {
+        R_xlen_t i, j, nr = ref.nrow(), nc = ref.ncol();
+        return_vector res(nr);
+
+        std::vector<R_xlen_t> n_ok(nr, 0);
+        stored_type current = stored_type();
+
+
+        for (j = 0; j < nc; j++) {
+            for (i = 0; i < nr; i++) {
+                current = ref(i, j);
+                if (!detail::check_na(current)) {
+                    detail::incr(&res[i], ref(i, j));
+                    ++n_ok[i];
+                }
+            }
+        }
+
+        for (i = 0; i < nr; i++) {
+            if (n_ok[i]) {
+                detail::div(&res[i], n_ok[i]);
+            } else {
+                detail::set_nan(&res[i]);
+            }
+        }
+
+        return res;
+    }
+};
+
+// RowMeans
+//      na.rm = TRUE
+//      LGLSXP / INTSXP input
+//      REALSXP output
+//
+#define ROW_MEANS_IMPL_RMNA(__RTYPE__)                                                                          \
+                                                                                                                \
+template <bool NA, typename T>                                                                                  \
+class RowMeansImpl<__RTYPE__, NA, T, true> :                                                                    \
+    public Lazy<typename detail::RowMeansReturn<__RTYPE__>::type, RowMeansImpl<__RTYPE__, NA, T, true> > {      \
+private:                                                                                                        \
+    const MatrixBase<__RTYPE__, NA, T>& ref;                                                                    \
+                                                                                                                \
+    typedef detail::RowMeansReturn<__RTYPE__> return_traits;                                                    \
+    typedef typename return_traits::type return_vector;                                                         \
+    typedef typename traits::storage_type<return_traits::rtype>::type stored_type;                              \
+                                                                                                                \
+public:                                                                                                         \
+    RowMeansImpl(const MatrixBase<__RTYPE__, NA, T>& ref_)                                                      \
+        : ref(ref_)                                                                                             \
+    {}                                                                                                          \
+                                                                                                                \
+    return_vector get() const {                                                                                 \
+        R_xlen_t i, j, nr = ref.nrow(), nc = ref.ncol();                                                        \
+        return_vector res(nr);                                                                                  \
+                                                                                                                \
+        std::vector<R_xlen_t> n_ok(nr, 0);                                                                      \
+                                                                                                                \
+        for (j = 0; j < nc; j++) {                                                                              \
+            for (i = 0; i < nr; i++) {                                                                          \
+                if (!detail::check_na(ref(i, j))) {                                                             \
+                    detail::incr(&res[i], ref(i, j));                                                           \
+                    ++n_ok[i];                                                                                  \
+                }                                                                                               \
+            }                                                                                                   \
+        }                                                                                                       \
+                                                                                                                \
+        for (i = 0; i < nr; i++) {                                                                              \
+            if (n_ok[i]) {                                                                                      \
+                detail::div(&res[i], n_ok[i]);                                                                  \
+            } else {                                                                                            \
+                detail::set_nan(&res[i]);                                                                       \
+            }                                                                                                   \
+        }                                                                                                       \
+                                                                                                                \
+        return res;                                                                                             \
+    }                                                                                                           \
+};
+
+ROW_MEANS_IMPL_RMNA(LGLSXP) 
+ROW_MEANS_IMPL_RMNA(INTSXP) 
+
+#undef ROW_MEANS_IMPL_RMNA
+
+//  RowMeans
+//      Input with template parameter NA = false
+//      RowMeansImpl<..., NA_RM = false>
+//
+template <int RTYPE, typename T, bool NA_RM>
+class RowMeansImpl<RTYPE, false, T, NA_RM>
+    : public RowMeansImpl<RTYPE, false, T, false> {};
+
+
+// ColMeans
+//      na.rm = FALSE
+//      default input
+//      default output
+//
+template <int RTYPE, bool NA, typename T, bool NA_RM = false>
+class ColMeansImpl :
+    public Lazy<typename detail::ColMeansReturn<RTYPE>::type, ColMeansImpl<RTYPE, NA, T, NA_RM> > {
+private:
+    const MatrixBase<RTYPE, NA, T>& ref;
+
+    typedef detail::ColMeansReturn<RTYPE> return_traits;
+    typedef typename return_traits::type return_vector;
+    typedef typename traits::storage_type<return_traits::rtype>::type stored_type;
+
+public:
+    ColMeansImpl(const MatrixBase<RTYPE, NA, T>& ref_)
+        : ref(ref_)
+    {}
+
+    return_vector get() const {
+        R_xlen_t i, j, nr = ref.nrow(), nc = ref.ncol();
+        return_vector res(nc);
+
+        for (j = 0; j < nc; j++) {
+            for (i = 0; i < nr; i++) {
+                detail::incr(&res[j], ref(i, j));
+            }
+        }
+
+        for (j = 0; j < nc; j++) {
+            detail::div(&res[j], nr);
+        }
+
+        return res;
+    }
+};
+
+// ColMeans
+//      na.rm = FALSE
+//      LGLSXP / INTSXP input
+//      REALSXP output
+//
+#define COL_MEANS_IMPL_KEEPNA(__RTYPE__)                                                                        \
+                                                                                                                \
+template <bool NA, typename T, bool NA_RM>                                                                      \
+class ColMeansImpl<__RTYPE__, NA, T, NA_RM> :                                                                   \
+    public Lazy<typename detail::ColMeansReturn<__RTYPE__>::type, ColMeansImpl<__RTYPE__, NA, T, NA_RM> > {     \
+private:                                                                                                        \
+    const MatrixBase<__RTYPE__, NA, T>& ref;                                                                    \
+                                                                                                                \
+    typedef detail::ColMeansReturn<__RTYPE__> return_traits;                                                    \
+    typedef typename return_traits::type return_vector;                                                         \
+    typedef typename traits::storage_type<return_traits::rtype>::type stored_type;                              \
+                                                                                                                \
+    struct bit {                                                                                                \
+        unsigned char x : 1;                                                                                    \
+    };                                                                                                          \
+                                                                                                                \
+public:                                                                                                         \
+    ColMeansImpl(const MatrixBase<__RTYPE__, NA, T>& ref_)                                                      \
+        : ref(ref_)                                                                                             \
+    {}                                                                                                          \
+                                                                                                                \
+    return_vector get() const {                                                                                 \
+        R_xlen_t i, j, nr = ref.nrow(), nc = ref.ncol();                                                        \
+        return_vector res(nc);                                                                                  \
+                                                                                                                \
+        std::vector<bit> na_flags(nc);                                                                          \
+                                                                                                                \
+        for (j = 0; j < nc; j++) {                                                                              \
+            for (i = 0; i < nr; i++) {                                                                          \
+                if (detail::check_na(ref(i, j))) {                                                              \
+                    na_flags[j].x |= 0x1;                                                                       \
+                }                                                                                               \
+                detail::incr(&res[j], ref(i, j));                                                               \
+            }                                                                                                   \
+        }                                                                                                       \
+                                                                                                                \
+        for (j = 0; j < nc; j++) {                                                                              \
+            if (!na_flags[j].x) {                                                                               \
+                detail::div(&res[j], nr);                                                                       \
+            } else {                                                                                            \
+                res[j] = NA_REAL;                                                                               \
+            }                                                                                                   \
+        }                                                                                                       \
+                                                                                                                \
+        return res;                                                                                             \
+    }                                                                                                           \
+};
+
+COL_MEANS_IMPL_KEEPNA(LGLSXP) 
+COL_MEANS_IMPL_KEEPNA(INTSXP) 
+
+#undef COL_MEANS_IMPL_KEEPNA
+
+// ColMeans
+//      na.rm = TRUE
+//      default input
+//      default output
+//
+template <int RTYPE, bool NA, typename T>
+class ColMeansImpl<RTYPE, NA, T, true> :
+    public Lazy<typename detail::ColMeansReturn<RTYPE>::type, ColMeansImpl<RTYPE, NA, T, true> > {
+private:
+    const MatrixBase<RTYPE, NA, T>& ref;
+
+    typedef detail::ColMeansReturn<RTYPE> return_traits;
+    typedef typename return_traits::type return_vector;
+    typedef typename traits::storage_type<return_traits::rtype>::type stored_type;
+
+public:
+    ColMeansImpl(const MatrixBase<RTYPE, NA, T>& ref_)
+        : ref(ref_)
+    {}
+
+    return_vector get() const {
+        R_xlen_t i, j, nr = ref.nrow(), nc = ref.ncol();
+        return_vector res(nc);
+
+        std::vector<R_xlen_t> n_ok(nc, 0);
+        stored_type current = stored_type();
+
+
+        for (j = 0; j < nc; j++) {
+            for (i = 0; i < nr; i++) {
+                current = ref(i, j);
+                if (!detail::check_na(current)) {
+                    detail::incr(&res[j], ref(i, j));
+                    ++n_ok[j];
+                }
+            }
+        }
+
+        for (j = 0; j < nc; j++) {
+            if (n_ok[j]) {
+                detail::div(&res[j], n_ok[j]);
+            } else {
+                detail::set_nan(&res[j]);
+            }
+        }
+
+        return res;
+    }
+};
+
+// ColMeans
+//      na.rm = TRUE
+//      LGLSXP / INTSXP input
+//      REALSXP output
+//
+#define COL_MEANS_IMPL_RMNA(__RTYPE__)                                                                          \
+                                                                                                                \
+template <bool NA, typename T>                                                                                  \
+class ColMeansImpl<__RTYPE__, NA, T, true> :                                                                    \
+    public Lazy<typename detail::ColMeansReturn<__RTYPE__>::type, ColMeansImpl<__RTYPE__, NA, T, true> > {      \
+private:                                                                                                        \
+    const MatrixBase<__RTYPE__, NA, T>& ref;                                                                    \
+                                                                                                                \
+    typedef detail::ColMeansReturn<__RTYPE__> return_traits;                                                    \
+    typedef typename return_traits::type return_vector;                                                         \
+    typedef typename traits::storage_type<return_traits::rtype>::type stored_type;                              \
+                                                                                                                \
+public:                                                                                                         \
+    ColMeansImpl(const MatrixBase<__RTYPE__, NA, T>& ref_)                                                      \
+        : ref(ref_)                                                                                             \
+    {}                                                                                                          \
+                                                                                                                \
+    return_vector get() const {                                                                                 \
+        R_xlen_t i, j, nr = ref.nrow(), nc = ref.ncol();                                                        \
+        return_vector res(nc);                                                                                  \
+                                                                                                                \
+        std::vector<R_xlen_t> n_ok(nc, 0);                                                                      \
+                                                                                                                \
+        for (j = 0; j < nc; j++) {                                                                              \
+            for (i = 0; i < nr; i++) {                                                                          \
+                if (!detail::check_na(ref(i, j))) {                                                             \
+                    detail::incr(&res[j], ref(i, j));                                                           \
+                    ++n_ok[j];                                                                                  \
+                }                                                                                               \
+            }                                                                                                   \
+        }                                                                                                       \
+                                                                                                                \
+        for (j = 0; j < nc; j++) {                                                                              \
+            if (n_ok[j]) {                                                                                      \
+                detail::div(&res[j], n_ok[j]);                                                                  \
+            } else {                                                                                            \
+                detail::set_nan(&res[j]);                                                                       \
+            }                                                                                                   \
+        }                                                                                                       \
+                                                                                                                \
+        return res;                                                                                             \
+    }                                                                                                           \
+};
+
+COL_MEANS_IMPL_RMNA(LGLSXP) 
+COL_MEANS_IMPL_RMNA(INTSXP) 
+
+#undef COL_MEANS_IMPL_RMNA
+    
+//  ColMeans
+//      Input with template parameter NA = false
+//      ColMeansImpl<..., NA_RM = false>
+//
+template <int RTYPE, typename T, bool NA_RM>
+class ColMeansImpl<RTYPE, false, T, NA_RM>
+    : public ColMeansImpl<RTYPE, false, T, false> {};
+
+
+} // sugar
+
+
+template <int RTYPE, bool NA, typename T>
+inline typename sugar::detail::RowSumsReturn<RTYPE>::type
+rowSums(const MatrixBase<RTYPE, NA, T>& x, bool na_rm = false) {
+    if (!na_rm) {
+        return sugar::RowSumsImpl<RTYPE, NA, T, false>(x);
+    }
+    return sugar::RowSumsImpl<RTYPE, NA, T, true>(x);
+}
+
+template <int RTYPE, bool NA, typename T>
+inline typename sugar::detail::ColSumsReturn<RTYPE>::type
+colSums(const MatrixBase<RTYPE, NA, T>& x, bool na_rm = false) {
+    if (!na_rm) {
+        return sugar::ColSumsImpl<RTYPE, NA, T, false>(x);
+    }
+    return sugar::ColSumsImpl<RTYPE, NA, T, true>(x);
+}
+
+template <int RTYPE, bool NA, typename T>
+inline typename sugar::detail::RowMeansReturn<RTYPE>::type
+rowMeans(const MatrixBase<RTYPE, NA, T>& x, bool na_rm = false) {
+    if (!na_rm) {
+        return sugar::RowMeansImpl<RTYPE, NA, T, false>(x);
+    }
+    return sugar::RowMeansImpl<RTYPE, NA, T, true>(x);
+}
+
+template <int RTYPE, bool NA, typename T>
+inline typename sugar::detail::ColMeansReturn<RTYPE>::type
+colMeans(const MatrixBase<RTYPE, NA, T>& x, bool na_rm = false) {
+    if (!na_rm) {
+        return sugar::ColMeansImpl<RTYPE, NA, T, false>(x);
+    }
+    return sugar::ColMeansImpl<RTYPE, NA, T, true>(x);
+}
+
+
+} // Rcpp
+
+#endif // Rcpp__sugar__rowSums_h
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/mean.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/mean.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/mean.h	(revision 2477)
@@ -0,0 +1,162 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// mean.h: Rcpp R/C++ interface class library -- mean
+//
+// Copyright (C) 2011 - 2015  Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__mean_h
+#define Rcpp__sugar__mean_h
+
+namespace Rcpp{
+namespace sugar{
+
+template <int RTYPE, bool NA, typename T>
+class Mean : public Lazy<double, Mean<RTYPE,NA,T> > {
+public:
+    typedef typename Rcpp::VectorBase<RTYPE,NA,T> VEC_TYPE;
+    typedef Rcpp::Vector<RTYPE> VECTOR;
+
+    Mean(const VEC_TYPE& object_) : object(object_) {}
+
+    double get() const {
+        VECTOR input = object;
+        R_xlen_t n = input.size();           // double pass (as in summary.c)
+        long double s = std::accumulate(input.begin(), input.end(), 0.0L);
+        s /= n;
+        if (R_FINITE((double)s)) {
+            long double t = 0.0;
+            for (R_xlen_t i = 0; i < n; i++) {
+                t += input[i] - s;
+            }
+            s += t/n;
+        }
+        return (double)s ;
+    }
+private:
+    const VEC_TYPE& object ;
+};
+
+template <bool NA, typename T>
+class Mean<CPLXSXP,NA,T> : public Lazy<Rcomplex, Mean<CPLXSXP,NA,T> > {
+public:
+    typedef typename Rcpp::VectorBase<CPLXSXP,NA,T> VEC_TYPE;
+
+    Mean(const VEC_TYPE& object_) : object(object_) {}
+
+    Rcomplex get() const {
+        ComplexVector input = object;
+        R_xlen_t n = input.size();           // double pass (as in summary.c)
+        long double s = 0.0, si = 0.0;
+        for (R_xlen_t i=0; i<n; i++) {
+            Rcomplex z = input[i];
+            s += z.r;
+            si += z.i;
+        }
+        s /= n;
+        si /= n;
+        if (R_FINITE((double)s) && R_FINITE((double)si)) {
+            long double t = 0.0, ti = 0.0;
+            for (R_xlen_t i = 0; i < n; i++) {
+                Rcomplex z = input[i];
+                t += z.r - s;
+                ti += z.i - si;
+            }
+            s += t/n;
+            si += ti/n;
+        }
+        Rcomplex z;
+        z.r = s;
+        z.i = si;
+        return z;
+    }
+private:
+    const VEC_TYPE& object ;
+};
+
+template <bool NA, typename T>
+class Mean<LGLSXP,NA,T> : public Lazy<double, Mean<LGLSXP,NA,T> > {
+public:
+    typedef typename Rcpp::VectorBase<LGLSXP,NA,T> VEC_TYPE;
+
+    Mean(const VEC_TYPE& object_) : object(object_) {}
+
+    double get() const {
+        LogicalVector input = object;
+        R_xlen_t n = input.size();
+        long double s = 0.0;
+        for (R_xlen_t i=0; i<n; i++) {
+            if (input[i] == NA_INTEGER) return NA_REAL;
+            s += input[i];
+        }
+        s /= n;                 // no overflow correction needed for logical vectors
+        return (double)s;
+    }
+private:
+    const VEC_TYPE& object ;
+};
+
+template <bool NA, typename T>
+class Mean<INTSXP,NA,T> : public Lazy<double, Mean<INTSXP,NA,T> > {
+public:
+    typedef typename Rcpp::VectorBase<INTSXP,NA,T> VEC_TYPE;
+
+    Mean(const VEC_TYPE& object_) : object(object_) {}
+
+    double get() const {
+        IntegerVector input = object;
+        R_xlen_t n = input.size();           // double pass (as in summary.c)
+        long double s = std::accumulate(input.begin(), input.end(), 0.0L);
+        s /= n;
+        long double t = 0.0;
+        for (R_xlen_t i = 0; i < n; i++) {
+            if (input[i] == NA_INTEGER) return NA_REAL;
+            t += input[i] - s;
+        }
+        s += t/n;
+        return (double)s ;
+    }
+private:
+    const VEC_TYPE& object ;
+};
+
+} // sugar
+
+template <bool NA, typename T>
+inline sugar::Mean<REALSXP,NA,T> mean(const VectorBase<REALSXP,NA,T>& t) {
+    return sugar::Mean<REALSXP,NA,T>(t);
+}
+
+template <bool NA, typename T>
+inline sugar::Mean<INTSXP,NA,T> mean(const VectorBase<INTSXP,NA,T>& t) {
+    return sugar::Mean<INTSXP,NA,T>(t);
+}
+
+template <bool NA, typename T>
+inline sugar::Mean<CPLXSXP,NA,T> mean(const VectorBase<CPLXSXP,NA,T>& t) {
+    return sugar::Mean<CPLXSXP,NA,T>(t);
+}
+
+template <bool NA, typename T>
+inline sugar::Mean<LGLSXP,NA,T> mean(const VectorBase<LGLSXP,NA,T>& t) {
+    return sugar::Mean<LGLSXP,NA,T>(t);
+}
+
+} // Rcpp
+#endif
+
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/min.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/min.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/min.h	(revision 2477)
@@ -0,0 +1,86 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// Min.h: Rcpp R/C++ interface class library -- min
+//
+// Copyright (C) 2012 - 2013 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__min_h
+#define Rcpp__sugar__min_h
+
+namespace Rcpp{
+namespace sugar{
+
+    template <int RTYPE, bool NA, typename T>
+    class Min {
+    public:
+        typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
+
+        Min( const T& obj_) : obj(obj_) {}
+
+        operator STORAGE() const {
+            STORAGE min, current ;
+            min = obj[0] ;
+            if( Rcpp::traits::is_na<RTYPE>( min ) ) return min ;
+
+            R_xlen_t n = obj.size() ;
+            for( R_xlen_t i=1; i<n; i++){
+                current = obj[i] ;
+                if( Rcpp::traits::is_na<RTYPE>( current ) ) return current;
+                if( current < min ) min = current ;
+            }
+            return min ;
+        }
+
+        const T& obj ;
+    } ;
+
+    // version for NA = false
+    template <int RTYPE, typename T>
+    class Min<RTYPE,false,T> {
+    public:
+        typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
+
+        Min( const T& obj_) : obj(obj_) {}
+
+        operator STORAGE() const {
+            STORAGE min, current ;
+            min = obj[0] ;
+
+            R_xlen_t n = obj.size() ;
+            for( R_xlen_t i=1; i<n; i++){
+                current = obj[i] ;
+                if( current < min ) min = current ;
+            }
+            return min ;
+        }
+
+        const T& obj ;
+    } ;
+
+
+} // sugar
+
+
+template <int RTYPE, bool NA, typename T>
+sugar::Min<RTYPE,NA,T> min( const VectorBase<RTYPE,NA,T>& x){
+    return sugar::Min<RTYPE,NA,T>(x.get_ref()) ;
+}
+
+} // Rcpp
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/max.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/max.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/max.h	(revision 2477)
@@ -0,0 +1,87 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// max.h: Rcpp R/C++ interface class library -- max
+//
+// Copyright (C) 2012 - 2013 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__max_h
+#define Rcpp__sugar__max_h
+
+namespace Rcpp{
+namespace sugar{
+
+    template <int RTYPE, bool NA, typename T>
+    class Max {
+    public:
+        typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
+
+        Max( const T& obj_) : obj(obj_) {}
+
+        operator STORAGE() const {
+            STORAGE max, current ;
+            max = obj[0] ;
+            if( Rcpp::traits::is_na<RTYPE>( max ) ) return max ;
+
+            R_xlen_t n = obj.size() ;
+            for( R_xlen_t i=1; i<n; i++){
+                current = obj[i] ;
+                if( Rcpp::traits::is_na<RTYPE>( current ) ) return current;
+                if( current > max ) max = current ;
+            }
+            return max ;
+        }
+
+    private:
+        const T& obj ;
+    } ;
+
+    // version for NA = false
+    template <int RTYPE, typename T>
+    class Max<RTYPE,false,T> {
+    public:
+        typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
+
+        Max( const T& obj_) : obj(obj_) {}
+
+        operator STORAGE() const {
+            STORAGE max, current ;
+            max = obj[0] ;
+
+            R_xlen_t n = obj.size() ;
+            for( R_xlen_t i=1; i<n; i++){
+                current = obj[i] ;
+                if( current > max ) max = current ;
+            }
+            return max ;
+        }
+
+    private:
+        const T& obj ;
+    } ;
+
+
+} // sugar
+
+template <int RTYPE, bool NA, typename T>
+sugar::Max<RTYPE,NA,T> max( const VectorBase<RTYPE,NA,T>& x){
+    return sugar::Max<RTYPE,NA,T>(x.get_ref()) ;
+}
+
+} // Rcpp
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/rep.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/rep.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/rep.h	(revision 2477)
@@ -0,0 +1,91 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// rep.h: Rcpp R/C++ interface class library -- rep
+//
+// Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__rep_h
+#define Rcpp__sugar__rep_h
+
+namespace Rcpp{
+namespace sugar{
+
+template <int RTYPE, bool NA, typename T>
+class Rep : public Rcpp::VectorBase< RTYPE ,NA, Rep<RTYPE,NA,T> > {
+public:
+	typedef typename Rcpp::VectorBase<RTYPE,NA,T> VEC_TYPE ;
+	typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
+
+        Rep( const VEC_TYPE& object_, R_xlen_t times_ ) :
+		object(object_), times(times_), n(object_.size()){}
+
+        inline STORAGE operator[]( R_xlen_t i ) const {
+		return object[ i % n ] ;
+	}
+        inline R_xlen_t size() const { return times * n ; }
+
+private:
+	const VEC_TYPE& object ;
+        R_xlen_t times, n ;
+} ;
+
+template <typename T>
+class Rep_Single : public Rcpp::VectorBase<
+	Rcpp::traits::r_sexptype_traits<T>::rtype,
+	true,
+	Rep_Single<T>
+> {
+public:
+        Rep_Single( const T& x_, R_xlen_t n_) : x(x_), n(n_){}
+
+        inline T operator[]( R_xlen_t i ) const {
+		return x;
+	}
+        inline R_xlen_t size() const { return n ; }
+
+private:
+	const T& x ;
+        R_xlen_t n;
+} ;
+
+} // sugar
+
+template <int RTYPE, bool NA, typename T>
+inline sugar::Rep<RTYPE,NA,T> rep( const VectorBase<RTYPE,NA,T>& t, R_xlen_t n ){
+	return sugar::Rep<RTYPE,NA,T>( t, n ) ;
+}
+
+inline sugar::Rep_Single<double> rep( const double& x, R_xlen_t n ){
+	return sugar::Rep_Single<double>( x, n ) ;
+}
+inline sugar::Rep_Single<int> rep( const int& x, R_xlen_t n ){
+	return sugar::Rep_Single<int>( x, n ) ;
+}
+inline sugar::Rep_Single<Rbyte> rep( const Rbyte& x, R_xlen_t n ){
+	return sugar::Rep_Single<Rbyte>( x, n ) ;
+}
+inline sugar::Rep_Single<Rcomplex> rep( const Rcomplex& x, R_xlen_t n ){
+	return sugar::Rep_Single<Rcomplex>( x, n ) ;
+}
+inline sugar::Rep_Single<bool> rep( const bool& x, R_xlen_t n ){
+	return sugar::Rep_Single<bool>( x, n ) ;
+}
+
+} // Rcpp
+#endif
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/table.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/table.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/table.h	(revision 2477)
@@ -0,0 +1,133 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// table.h: Rcpp R/C++ interface class library -- table match
+//
+// Copyright (C) 2012 - 2013   Dirk Eddelbuettel, Romain Francois, and Kevin Ushey
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__table_h
+#define Rcpp__sugar__table_h
+
+namespace Rcpp{
+namespace sugar{
+
+template <typename HASH, typename STORAGE>
+class CountInserter {
+public:
+    CountInserter( HASH& hash_ ) : hash(hash_) {}
+
+    inline void operator()( STORAGE value ){
+        hash[value]++ ;
+    }
+
+private:
+    HASH& hash ;
+} ;
+
+template <typename HASH, int RTYPE>
+class Grabber{
+public:
+    Grabber( IntegerVector& res_, CharacterVector& names_ ) : res(res_), names(names_), index(0){}
+
+    template <typename T>
+    inline void operator()( T pair){
+        res[index] = pair.second ;
+        names[index++] = internal::r_coerce<RTYPE,STRSXP>(pair.first) ;
+    }
+
+private:
+    IntegerVector& res ;
+    CharacterVector& names ;
+    R_xlen_t index ;
+} ;
+
+// we define a different Table class depending on whether we are using
+// std::map or not
+#ifdef RCPP_USING_MAP
+
+template <int RTYPE, typename TABLE_T>
+class Table {
+public:
+    typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
+
+    Table( const TABLE_T& table ): hash() {
+        std::for_each( table.begin(), table.end(), Inserter(hash) ) ;
+    }
+
+    inline operator IntegerVector() const {
+        R_xlen_t n = hash.size() ;
+        IntegerVector result = no_init(n) ;
+        CharacterVector names = no_init(n) ;
+        std::for_each( hash.begin(), hash.end(), Grabber<HASH, RTYPE>(result, names) ) ;
+        result.names() = names ;
+        return result ;
+    }
+
+private:
+    typedef RCPP_UNORDERED_MAP<STORAGE, int, internal::NAComparator<STORAGE> >HASH ;
+    typedef CountInserter<HASH,STORAGE> Inserter ;
+    HASH hash ;
+};
+
+#else
+
+template <int RTYPE, typename TABLE_T>
+class Table {
+public:
+    typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
+
+    Table( const TABLE_T& table ): hash(), map() {
+        // populate the initial hash
+        std::for_each( table.begin(), table.end(), Inserter(hash) ) ;
+
+        // populate the map, sorted by keys
+        map.insert( hash.begin(), hash.end() ) ;
+    }
+
+    inline operator IntegerVector() const {
+        // fill the result
+        R_xlen_t n = map.size() ;
+        IntegerVector result = no_init(n) ;
+        CharacterVector names = no_init(n) ;
+        std::for_each( map.begin(), map.end(), Grabber<SORTED_MAP,RTYPE>(result, names) ) ;
+        result.names() = names ;
+        return result ;
+    }
+
+private:
+    typedef RCPP_UNORDERED_MAP<STORAGE, int> HASH ;
+    typedef CountInserter<HASH,STORAGE> Inserter ;
+    HASH hash ;
+
+    typedef std::map<STORAGE, int, internal::NAComparator<STORAGE> > SORTED_MAP ;
+    SORTED_MAP map ;
+
+};
+
+#endif // USING_RCPP_MAP
+
+} // sugar
+
+template <int RTYPE, bool NA, typename T>
+inline IntegerVector table( const VectorBase<RTYPE,NA,T>& x ){
+    return sugar::Table<RTYPE,T>(x.get_ref()) ;
+}
+
+
+} // Rcpp
+#endif
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/cummin.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/cummin.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/cummin.h	(revision 2477)
@@ -0,0 +1,71 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// cumsum.h: Rcpp R/C++ interface class library -- cumsum
+//
+// Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__cummin_h
+#define Rcpp__sugar__cummin_h
+
+namespace Rcpp{
+namespace sugar{
+
+template <int RTYPE, bool NA, typename T>
+class Cummin : public Lazy< Rcpp::Vector<RTYPE>, Cummin<RTYPE, NA, T> > {
+public:
+    typedef typename Rcpp::VectorBase<RTYPE, NA, T> VEC_TYPE;
+    typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE;
+    typedef Rcpp::Vector<RTYPE> VECTOR;
+    
+    Cummin(const VEC_TYPE& object_) : object(object_) {}
+    
+    VECTOR get() const {
+        R_xlen_t n = object.size();
+        VECTOR result(n, Rcpp::traits::get_na<RTYPE>());
+        STORAGE current = object[0];
+        
+        if (Rcpp::traits::is_na<RTYPE>(current)) return result;
+        result[0] = current;
+        for (R_xlen_t i = 1; i < n; i++) {
+            current = object[i];
+            if (Rcpp::traits::is_na<RTYPE>(current)) return result;
+            result[i] = result[i-1] < current ? result[i-1] : current;
+        }
+        return result ;
+    }
+private:
+    const VEC_TYPE& object;    
+};
+
+} // sugar
+
+
+template <bool NA, typename T>
+inline sugar::Cummin<INTSXP, NA, T> cummin(const VectorBase<INTSXP, NA, T>& t) {
+    return sugar::Cummin<INTSXP, NA, T>(t);
+}
+
+template <bool NA, typename T>
+inline sugar::Cummin<REALSXP, NA, T> cummin(const VectorBase<REALSXP, NA, T>& t) {
+    return sugar::Cummin<REALSXP, NA, T>(t);
+}
+
+
+} // Rcpp
+#endif // Rcpp__sugar__cummin_h 
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/var.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/var.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/var.h	(revision 2477)
@@ -0,0 +1,95 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// var.h: Rcpp R/C++ interface class library -- var
+//
+// Copyright (C) 2011 Dirk Eddelbuettel and Romain Francois
+// Copyright (C) 2015 Wush Wu
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__var_h
+#define Rcpp__sugar__var_h
+
+namespace Rcpp{
+namespace sugar{
+
+template <int RTYPE, bool NA, typename T>
+class Var : public Lazy< double , Var<RTYPE,NA,T> > {
+public:
+    typedef typename Rcpp::VectorBase<RTYPE,NA,T> VEC_TYPE ;
+
+    Var( const VEC_TYPE& object_ ) : object(object_){}
+
+    double get() const{
+        const double average = mean(object).get();
+        const R_xlen_t sample_size = object.size();
+        double sum_squared_deviations = 0.0;
+        for (R_xlen_t i = 0; i != sample_size; ++i)
+            sum_squared_deviations += std::pow(object[i] - average, 2.0);
+        return sum_squared_deviations / (sample_size - 1);
+    }
+
+private:
+    const VEC_TYPE& object ;
+} ;
+
+template <bool NA, typename T>
+class Var<CPLXSXP,NA,T> : public Lazy< double , Var<CPLXSXP,NA,T> > {
+public:
+    typedef typename Rcpp::VectorBase<CPLXSXP,NA,T> VEC_TYPE ;
+
+    Var( const VEC_TYPE& object_ ) : object(object_){}
+
+    double get() const{
+        const Rcomplex average = mean(object).get();
+        const R_xlen_t sample_size = object.size();
+        double sum_squared_deviations_magnitudes = 0.0;
+        for (R_xlen_t i = 0; i != sample_size; ++i) {
+            const Rcomplex deviation = object[i] - average;
+            sum_squared_deviations_magnitudes += deviation.r * deviation.r + deviation.i * deviation.i;
+        }
+        return sum_squared_deviations_magnitudes / (sample_size - 1);
+    }
+
+private:
+    const VEC_TYPE& object ;
+} ;
+
+} // sugar
+
+template <bool NA, typename T>
+inline sugar::Var<REALSXP,NA,T> var( const VectorBase<REALSXP,NA,T>& t){
+    return sugar::Var<REALSXP,NA,T>( t ) ;
+}
+
+template <bool NA, typename T>
+inline sugar::Var<INTSXP,NA,T> var( const VectorBase<INTSXP,NA,T>& t){
+    return sugar::Var<INTSXP,NA,T>( t ) ;
+}
+
+template <bool NA, typename T>
+inline sugar::Var<LGLSXP,NA,T> var( const VectorBase<LGLSXP,NA,T>& t){
+    return sugar::Var<LGLSXP,NA,T>( t ) ;
+}
+
+template <bool NA, typename T>
+inline sugar::Var<CPLXSXP,NA,T> var( const VectorBase<CPLXSXP,NA,T>& t){
+    return sugar::Var<CPLXSXP,NA,T>( t ) ;
+}
+
+} // Rcpp
+#endif
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/is_na.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/is_na.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/is_na.h	(revision 2477)
@@ -0,0 +1,100 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// is_na.h: Rcpp R/C++ interface class library -- is_na
+//
+// Copyright (C) 2010 - 2013 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__is_na_h
+#define Rcpp__sugar__is_na_h
+
+namespace Rcpp{
+namespace sugar{
+
+template <int RTYPE, bool NA, typename VEC_TYPE>
+class IsNa : public ::Rcpp::VectorBase< LGLSXP, false, IsNa<RTYPE,NA,VEC_TYPE> > {
+public:
+	typedef typename traits::storage_type<RTYPE>::type STORAGE ;
+	typedef Rcpp::VectorBase<RTYPE,NA,VEC_TYPE> BASE ;
+
+	IsNa( const BASE& obj_) : obj(obj_){}
+
+        inline int operator[]( R_xlen_t i ) const {
+		return ::Rcpp::traits::is_na<RTYPE>( obj[i] ) ;
+	}
+
+        inline R_xlen_t size() const { return obj.size() ; }
+
+private:
+	const BASE& obj ;
+
+} ;
+
+// specialization for the case where we already know
+// the result (FALSE) because it is embedded in the type
+// (the second template parameter of VectorBase)
+template <int RTYPE, typename VEC_TYPE>
+class IsNa<RTYPE,false,VEC_TYPE> : public ::Rcpp::VectorBase< LGLSXP, false, IsNa<RTYPE,false,VEC_TYPE> > {
+public:
+	typedef typename traits::storage_type<RTYPE>::type STORAGE ;
+	typedef Rcpp::VectorBase<RTYPE,false,VEC_TYPE> BASE ;
+
+	IsNa( const BASE& obj_) : obj(obj_){}
+
+        inline int operator[]( R_xlen_t i ) const {
+		return FALSE ;
+	}
+
+        inline R_xlen_t size() const { return obj.size() ; }
+
+private:
+	const BASE& obj ;
+
+} ;
+
+template <typename T>
+class IsNa_Vector_is_na : public Rcpp::VectorBase<LGLSXP, false, IsNa_Vector_is_na<T> >{
+   public:
+       IsNa_Vector_is_na( const T& x) : ref(x){}
+
+       inline int operator[]( R_xlen_t i) const {
+           return ref[i].is_na() ;
+       }
+
+       inline R_xlen_t size() const { return ref.size() ; }
+
+   private:
+        const T& ref ;
+} ;
+
+} // sugar
+
+template <int RTYPE, bool NA, typename T>
+inline sugar::IsNa<RTYPE,NA,T> is_na( const Rcpp::VectorBase<RTYPE,NA,T>& t){
+	return sugar::IsNa<RTYPE,NA,T>( t ) ;
+}
+
+inline sugar::IsNa_Vector_is_na<DatetimeVector> is_na( const DatetimeVector& x){
+    return sugar::IsNa_Vector_is_na<DatetimeVector>( x ) ;
+}
+inline sugar::IsNa_Vector_is_na<DateVector> is_na( const DateVector& x){
+    return sugar::IsNa_Vector_is_na<DateVector>( x ) ;
+}
+
+} // Rcpp
+#endif
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/cummax.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/cummax.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/cummax.h	(revision 2477)
@@ -0,0 +1,71 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// cumsum.h: Rcpp R/C++ interface class library -- cumsum
+//
+// Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__cummax_h
+#define Rcpp__sugar__cummax_h
+
+namespace Rcpp{
+namespace sugar{
+
+template <int RTYPE, bool NA, typename T>
+class Cummax : public Lazy< Rcpp::Vector<RTYPE>, Cummax<RTYPE, NA, T> > {
+public:
+    typedef typename Rcpp::VectorBase<RTYPE, NA, T> VEC_TYPE;
+    typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE;
+    typedef Rcpp::Vector<RTYPE> VECTOR;
+    
+    Cummax(const VEC_TYPE& object_) : object(object_) {}
+    
+    VECTOR get() const {
+        R_xlen_t n = object.size();
+        VECTOR result(n, Rcpp::traits::get_na<RTYPE>());
+        STORAGE current = object[0];
+        
+        if (Rcpp::traits::is_na<RTYPE>(current)) return result;
+        result[0] = current;
+        for (R_xlen_t i = 1; i < n; i++) {
+            current = object[i];
+            if (Rcpp::traits::is_na<RTYPE>(current)) return result;
+            result[i] = result[i-1] > current ? result[i-1] : current;
+        }
+        return result ;
+    }
+private:
+    const VEC_TYPE& object;    
+};
+
+} // sugar
+
+
+template <bool NA, typename T>
+inline sugar::Cummax<INTSXP, NA, T> cummax(const VectorBase<INTSXP, NA, T>& t) {
+    return sugar::Cummax<INTSXP, NA, T>(t);
+}
+
+template <bool NA, typename T>
+inline sugar::Cummax<REALSXP, NA, T> cummax(const VectorBase<REALSXP, NA, T>& t) {
+    return sugar::Cummax<REALSXP, NA, T>(t);
+}
+
+
+} // Rcpp
+#endif // Rcpp__sugar__cummax_h 
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/rev.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/rev.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/rev.h	(revision 2477)
@@ -0,0 +1,56 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// rev.h: Rcpp R/C++ interface class library -- rev
+//
+// Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__rev_h
+#define Rcpp__sugar__rev_h
+
+namespace Rcpp{
+namespace sugar{
+
+template <int RTYPE, bool NA, typename T>
+class Rev : public Rcpp::VectorBase< RTYPE ,NA, Rev<RTYPE,NA,T> > {
+public:
+	typedef typename Rcpp::VectorBase<RTYPE,NA,T> VEC_TYPE ;
+	typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
+
+	Rev( const VEC_TYPE& object_ ) :
+		object(object_), n(object_.size() - 1) {}
+
+        inline STORAGE operator[]( R_xlen_t i ) const {
+		return object[n - i] ;
+	}
+        inline R_xlen_t size() const { return n + 1; }
+
+private:
+	const VEC_TYPE& object ;
+        R_xlen_t n ;
+} ;
+
+} // sugar
+
+template <int RTYPE,bool NA, typename T>
+inline sugar::Rev<RTYPE,NA,T> rev( const VectorBase<RTYPE,NA,T>& t){
+	return sugar::Rev<RTYPE,NA,T>( t ) ;
+}
+
+} // Rcpp
+#endif
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/clamp.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/clamp.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/clamp.h	(revision 2477)
@@ -0,0 +1,95 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// clamp.h: Rcpp R/C++ interface class library -- clamp
+//
+// Copyright (C) 2012 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__clamp_h
+#define Rcpp__sugar__clamp_h
+
+namespace Rcpp{
+namespace sugar{
+
+template <int RTYPE, bool NA>
+struct clamp_operator{
+    typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
+
+    clamp_operator(STORAGE lhs_, STORAGE rhs_ ) : lhs(lhs_), rhs(rhs_){}
+
+    inline STORAGE operator()(STORAGE x) const {
+        return x < lhs ? lhs : (x > rhs ? rhs : x ) ;
+    }
+    STORAGE lhs, rhs ;
+} ;
+// need to write this special version
+template <>
+struct clamp_operator<REALSXP,true> {
+    clamp_operator(double lhs_, double rhs_ ) : lhs(lhs_), rhs(rhs_){}
+
+    inline double operator()(double x) const {
+        if( Rcpp::traits::is_na<REALSXP>(x) )  return x ;
+        return x < lhs ? lhs : (x > rhs ? rhs : x ) ;
+    }
+    double lhs, rhs ;
+} ;
+
+
+
+template <
+	int RTYPE,
+	bool NA, typename T
+	>
+class Clamp_Primitive_Vector_Primitive : public VectorBase<
+	RTYPE ,
+	NA ,
+	Clamp_Primitive_Vector_Primitive<RTYPE,NA,T>
+> {
+public:
+	typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
+	typedef clamp_operator<RTYPE,NA> OPERATOR ;
+
+	Clamp_Primitive_Vector_Primitive( STORAGE lhs_, const T& vec_, STORAGE rhs_) : vec(vec_), op(lhs_,rhs_) {}
+
+        inline STORAGE operator[]( R_xlen_t i ) const {
+		return op( vec[i] ) ;
+	}
+        inline R_xlen_t size() const { return vec.size() ; }
+
+private:
+	const T& vec ;
+	OPERATOR op ;
+} ;
+
+
+
+} // sugar
+
+template <int RTYPE, bool NA, typename T>
+inline sugar::Clamp_Primitive_Vector_Primitive<RTYPE,NA,T>
+clamp(
+	typename Rcpp::traits::storage_type<RTYPE>::type lhs,
+	const Rcpp::VectorBase<RTYPE,NA,T>& vec,
+	typename Rcpp::traits::storage_type<RTYPE>::type rhs
+	){
+	return sugar::Clamp_Primitive_Vector_Primitive<RTYPE,NA,T>( lhs, vec.get_ref(), rhs ) ;
+}
+
+
+} // Rcpp
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/median.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/median.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/median.h	(revision 2477)
@@ -0,0 +1,290 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+//
+// median.h: Rcpp R/C++ interface class library -- median
+//
+// Copyright (C) 2016 Dirk Eddelbuettel, Romain Francois, and Nathan Russell
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__median_h
+#define Rcpp__sugar__median_h
+
+namespace Rcpp {
+namespace sugar {
+namespace median_detail {
+
+// need to return double for integer vectors 
+// (in case of even-length input vector)
+// and Rcpp::String for STRSXP
+// also need to return NA_REAL for 
+// integer vector yielding NA result
+template <int RTYPE>
+struct result {
+    typedef typename Rcpp::traits::storage_type<RTYPE>::type type;
+    enum { rtype = RTYPE };
+};
+
+template <>
+struct result<INTSXP> {
+    typedef double type;
+    enum { rtype = REALSXP };
+};
+
+template <>
+struct result<STRSXP> {
+    typedef Rcpp::String type;
+    enum { rtype = STRSXP };
+};
+
+// std::nth_element and std::max_element don't 
+// know how to compare Rcomplex values
+template <typename T>
+inline bool less(T lhs, T rhs) {
+    return lhs < rhs;
+}
+
+template<>
+inline bool less<Rcomplex>(Rcomplex lhs, Rcomplex rhs) {
+    if (lhs.r < rhs.r) return true;
+    if (lhs.i < rhs.i) return true;
+    return false; 
+}
+
+// compiler does not know how to handle 
+// Rcomplex numerator / double denominator
+// and need explicit cast for INTSXP case
+inline double half(double lhs) {
+    return lhs / 2.0;
+}
+
+inline double half(int lhs) {
+    return static_cast<double>(lhs) / 2.0;
+}
+
+inline Rcomplex half(Rcomplex lhs) {
+    lhs.r /= 2.0;
+    lhs.i /= 2.0;
+    return lhs;
+}
+
+} // median_detail
+
+// base case
+template <int RTYPE, bool NA, typename T, bool NA_RM = false>
+class Median {
+public:
+    typedef typename median_detail::result<RTYPE>::type result_type;
+    typedef typename Rcpp::traits::storage_type<RTYPE>::type stored_type;
+    enum { RESULT_RTYPE = median_detail::result<RTYPE>::rtype };
+    typedef T VECTOR;
+    
+private:
+    VECTOR x;
+    
+public:
+    Median(const VECTOR& xx)
+        : x(Rcpp::clone(xx)) {}
+    
+    operator result_type() {
+        if (x.size() < 1) {
+            return Rcpp::traits::get_na<RESULT_RTYPE>();
+        }
+        
+        if (Rcpp::any(Rcpp::is_na(x))) {
+            return Rcpp::traits::get_na<RESULT_RTYPE>();
+        }
+        
+        R_xlen_t n = x.size() / 2;
+        std::nth_element(
+            x.begin(), x.begin() + n, x.end(), 
+            median_detail::less<stored_type>);
+        
+        if (x.size() % 2) return x[n];
+        return median_detail::half(
+            x[n] + *std::max_element(
+                    x.begin(), x.begin() + n, 
+                    median_detail::less<stored_type>));
+    }
+};
+
+// na.rm = TRUE
+template <int RTYPE, bool NA, typename T>
+class Median<RTYPE, NA, T, true> {
+public:
+    typedef typename median_detail::result<RTYPE>::type result_type;
+    typedef typename Rcpp::traits::storage_type<RTYPE>::type stored_type;
+    enum { RESULT_RTYPE = median_detail::result<RTYPE>::rtype };
+    typedef T VECTOR;
+    
+private:
+    VECTOR x;
+    
+public:
+    Median(const VECTOR& xx)
+        : x(Rcpp::na_omit(Rcpp::clone(xx))) {}
+    
+    operator result_type() {
+        if (!x.size()) {
+            return Rcpp::traits::get_na<RESULT_RTYPE>();
+        }
+        
+        R_xlen_t n = x.size() / 2;
+        std::nth_element(
+            x.begin(), x.begin() + n, x.end(), 
+            median_detail::less<stored_type>);
+        
+        if (x.size() % 2) return x[n];
+        return median_detail::half(
+            x[n] + *std::max_element(
+                    x.begin(), x.begin() + n, 
+                    median_detail::less<stored_type>));
+    }
+};
+
+// NA = false
+template <int RTYPE, typename T, bool NA_RM>
+class Median<RTYPE, false, T, NA_RM> {
+public:
+    typedef typename median_detail::result<RTYPE>::type result_type;
+    typedef typename Rcpp::traits::storage_type<RTYPE>::type stored_type;
+    enum { RESULT_RTYPE = median_detail::result<RTYPE>::rtype };
+    typedef T VECTOR;
+    
+private:
+    VECTOR x;
+    
+public:
+    Median(const VECTOR& xx)
+        : x(Rcpp::clone(xx)) {}
+    
+    operator result_type() {
+        if (x.size() < 1) {
+            return Rcpp::traits::get_na<RESULT_RTYPE>();
+        }
+        
+        R_xlen_t n = x.size() / 2;
+        std::nth_element(
+            x.begin(), x.begin() + n, x.end(), 
+            median_detail::less<stored_type>);
+        
+        if (x.size() % 2) return x[n];
+        return median_detail::half(
+            x[n] + *std::max_element(
+                    x.begin(), x.begin() + n, 
+                    median_detail::less<stored_type>));
+    }
+};
+
+// specialize for character vector
+// due to string_proxy's incompatibility
+// with certain std:: algorithms;
+// need to return NA for even-length vectors
+template <bool NA, typename T, bool NA_RM>
+class Median<STRSXP, NA, T, NA_RM> {
+public:
+    typedef typename median_detail::result<STRSXP>::type result_type;
+    typedef typename Rcpp::traits::storage_type<STRSXP>::type stored_type;
+    typedef T VECTOR;
+    
+private:
+    VECTOR x;
+    
+public:
+    Median(const VECTOR& xx)
+        : x(Rcpp::clone(xx)) {}
+    
+    operator result_type() {
+        if (!(x.size() % 2)) {
+            return Rcpp::traits::get_na<STRSXP>();
+        }
+        
+        if (Rcpp::any(Rcpp::is_na(x))) {
+            return Rcpp::traits::get_na<STRSXP>();
+        }
+        
+        R_xlen_t n = x.size() / 2;
+        x.sort();
+        
+        return x[n];
+    }
+};
+
+// na.rm = TRUE
+template <bool NA, typename T>
+class Median<STRSXP, NA, T, true> {
+public:
+    typedef typename median_detail::result<STRSXP>::type result_type;
+    typedef typename Rcpp::traits::storage_type<STRSXP>::type stored_type;
+    typedef T VECTOR;
+    
+private:
+    VECTOR x;
+    
+public:
+    Median(const VECTOR& xx)
+        : x(Rcpp::na_omit(Rcpp::clone(xx))) {}
+    
+    operator result_type() {
+        if (!(x.size() % 2)) {
+            return Rcpp::traits::get_na<STRSXP>();
+        }
+        
+        R_xlen_t n = x.size() / 2;
+        x.sort();
+        
+        return x[n];
+    }
+};
+
+// NA = false
+template <typename T>
+class Median<STRSXP, false, T, true> {
+public:
+    typedef typename median_detail::result<STRSXP>::type result_type;
+    typedef typename Rcpp::traits::storage_type<STRSXP>::type stored_type;
+    typedef T VECTOR;
+    
+private:
+    VECTOR x;
+    
+public:
+    Median(const VECTOR& xx)
+        : x(Rcpp::clone(xx)) {}
+    
+    operator result_type() {
+        if (!(x.size() % 2)) {
+            return Rcpp::traits::get_na<STRSXP>();
+        }
+        
+        R_xlen_t n = x.size() / 2;
+        x.sort();
+        
+        return x[n];
+    }
+};
+
+} // sugar
+
+template <int RTYPE, bool NA, typename T>
+inline typename sugar::median_detail::result<RTYPE>::type
+median(const Rcpp::VectorBase<RTYPE, NA, T>& x, bool na_rm = false) {
+    if (!na_rm) return sugar::Median<RTYPE, NA, T, false>(x);
+    return sugar::Median<RTYPE, NA, T, true>(x);
+}
+
+} // Rcpp
+
+#endif // Rcpp__sugar__median_h
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/sign.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/sign.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/sign.h	(revision 2477)
@@ -0,0 +1,82 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// sign.h: Rcpp R/C++ interface class library -- sign
+//
+// Copyright (C) 2010 - 2012 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__sign_h
+#define Rcpp__sugar__sign_h
+
+namespace Rcpp{
+namespace sugar{
+
+template <bool NA, int RTYPE>
+class sign__impl{
+public:
+	typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
+	static inline int get( STORAGE x){
+		return Rcpp::traits::is_na<RTYPE>(x) ? NA_INTEGER : ( x > 0 ? 1 : (x==0 ? 0 : -1) ) ;
+	}
+} ;
+
+template <int RTYPE>
+class sign__impl<false,RTYPE>{
+public:
+	typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
+	static inline int get( STORAGE x){
+		return ( x > 0 ? 1 : (x==0 ? 0 : -1) ) ;
+	}
+} ;
+
+
+template <int RTYPE, bool NA, typename T>
+class Sign : public Rcpp::VectorBase< INTSXP,NA, Sign<RTYPE,NA,T> > {
+public:
+	typedef typename Rcpp::VectorBase<RTYPE,NA,T> VEC_TYPE ;
+	typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
+	typedef int r_import_type ;
+
+	Sign( const VEC_TYPE& object_ ) : object(object_){}
+
+        inline int operator[]( R_xlen_t i ) const {
+		return get(i) ;
+	}
+        inline R_xlen_t size() const { return object.size() ; }
+
+	operator SEXP() const { return wrap( *this ); }
+        inline int get(R_xlen_t i) const { return sign__impl<NA,RTYPE>::get( object[i] ); }
+private:
+	const VEC_TYPE& object ;
+} ;
+
+} // sugar
+
+template <bool NA, typename T>
+inline sugar::Sign<INTSXP,NA,T> sign( const VectorBase<INTSXP,NA,T>& t){
+	return sugar::Sign<INTSXP,NA,T>( t ) ;
+}
+
+template <bool NA, typename T>
+inline sugar::Sign<REALSXP,NA,T> sign( const VectorBase<REALSXP,NA,T>& t){
+	return sugar::Sign<REALSXP,NA,T>( t ) ;
+}
+
+
+} // Rcpp
+#endif
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/head.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/head.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/head.h	(revision 2477)
@@ -0,0 +1,62 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// head.h: Rcpp R/C++ interface class library -- head
+//
+// Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__head_h
+#define Rcpp__sugar__head_h
+
+namespace Rcpp{
+namespace sugar{
+
+template <int RTYPE, bool NA, typename T>
+class Head : public Rcpp::VectorBase< RTYPE ,NA, Head<RTYPE,NA,T> > {
+public:
+	typedef typename Rcpp::VectorBase<RTYPE,NA,T> VEC_TYPE ;
+	typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
+
+	Head( const VEC_TYPE& object_, R_xlen_t n_ ) : object(object_), n(n_) {
+		if( n < 0 ){
+			n = object.size() + n ;
+		}
+	}
+
+	inline STORAGE operator[]( R_xlen_t i ) const {
+		return object[ i ] ;
+	}
+	inline R_xlen_t size() const { return n; }
+
+private:
+	const VEC_TYPE& object ;
+	int n ;
+} ;
+
+} // sugar
+
+template <int RTYPE,bool NA, typename T>
+inline sugar::Head<RTYPE,NA,T> head(
+	const VectorBase<RTYPE,NA,T>& t,
+	R_xlen_t n
+	){
+	return sugar::Head<RTYPE,NA,T>( t, n ) ;
+}
+
+} // Rcpp
+#endif
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/mapply.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/mapply.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/mapply.h	(revision 2477)
@@ -0,0 +1,28 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// mapply.h: Rcpp R/C++ interface class library -- mapply
+//
+// Copyright (C) 2012 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__mapply_h
+#define Rcpp__sugar__mapply_h
+
+#include <Rcpp/sugar/functions/mapply/mapply_3.h>
+#include <Rcpp/sugar/functions/mapply/mapply_2.h>
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/strings/collapse.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/strings/collapse.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/strings/collapse.h	(revision 2477)
@@ -0,0 +1,46 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// collapse.h: Rcpp R/C++ interface class library -- string sugar functions
+//
+// Copyright (C) 2012 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef RCPP_SUGAR_FUNCTIONS_COLLAPSE_H
+#define RCPP_SUGAR_FUNCTIONS_COLLAPSE_H
+
+namespace Rcpp{
+    namespace sugar {
+        template <typename Iterator>
+        inline String collapse__impl( Iterator it, R_xlen_t n ){
+            static String buffer ;
+            buffer = "" ;
+            for( R_xlen_t i=0; i<n; i++ ){
+                buffer += it[i] ;
+            }
+            return buffer ;
+        }
+
+    } // sugar
+
+
+    template <bool NA, typename T>
+    inline String collapse( const VectorBase<STRSXP,NA,T>& vec ){
+        return sugar::collapse__impl( vec.get_ref().begin(), vec.size() ) ;
+    }
+
+}
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/strings/strings.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/strings/strings.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/strings/strings.h	(revision 2477)
@@ -0,0 +1,27 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// strings.h: Rcpp R/C++ interface class library -- string sugar functions
+//
+// Copyright (C) 2012 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef RCPP_SUGAR_FUNCTIONS_STRINGS_H
+#define RCPP_SUGAR_FUNCTIONS_STRINGS_H
+
+#include <Rcpp/sugar/functions/strings/collapse.h>
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/sum.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/sum.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/sum.h	(revision 2477)
@@ -0,0 +1,114 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// sum.h: Rcpp R/C++ interface class library -- sum
+//
+// Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__sum_h
+#define Rcpp__sugar__sum_h
+
+namespace Rcpp{
+namespace sugar{
+
+template <int RTYPE, bool NA, typename T>
+class Sum : public Lazy< typename Rcpp::traits::storage_type<RTYPE>::type , Sum<RTYPE,NA,T> > {
+public:
+	typedef typename Rcpp::VectorBase<RTYPE,NA,T> VEC_TYPE ;
+	typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
+	typedef typename Rcpp::traits::Extractor< RTYPE, NA, T>::type VEC_EXT ;
+
+	Sum( const VEC_TYPE& object_ ) : object(object_.get_ref()){}
+
+	STORAGE get() const {
+		STORAGE result = 0 ;
+		R_xlen_t n = object.size() ;
+		STORAGE current ;
+		for( R_xlen_t i=0; i<n; i++){
+		    current = object[i] ;
+		    if( Rcpp::traits::is_na<RTYPE>(current) )
+		        return Rcpp::traits::get_na<RTYPE>() ;
+		    result += current ;
+		}
+		return result ;
+	}
+private:
+	const VEC_EXT& object ;
+} ;
+// RTYPE = REALSXP
+template <bool NA, typename T>
+class Sum<REALSXP,NA,T> : public Lazy< double , Sum<REALSXP,NA,T> > {
+public:
+	typedef typename Rcpp::VectorBase<REALSXP,NA,T> VEC_TYPE ;
+	typedef typename Rcpp::traits::Extractor< REALSXP, NA, T>::type VEC_EXT ;
+
+	Sum( const VEC_TYPE& object_ ) : object(object_.get_ref()){}
+
+	double get() const {
+		double result = 0 ;
+		R_xlen_t n = object.size() ;
+		for( R_xlen_t i=0; i<n; i++){
+		   result += object[i] ;
+		}
+		return result ;
+	}
+private:
+	const VEC_EXT& object ;
+} ;
+
+
+template <int RTYPE, typename T>
+class Sum<RTYPE,false,T> : public Lazy< typename Rcpp::traits::storage_type<RTYPE>::type , Sum<RTYPE,false,T> > {
+public:
+	typedef typename Rcpp::VectorBase<RTYPE,false,T> VEC_TYPE ;
+	typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
+	typedef typename Rcpp::traits::Extractor< RTYPE, false, T>::type VEC_EXT ;
+
+	Sum( const VEC_TYPE& object_ ) : object(object_.get_ref()){}
+
+	STORAGE get() const {
+		STORAGE result = 0 ;
+		R_xlen_t n = object.size() ;
+		for( R_xlen_t i=0; i<n; i++){
+		    result += object[i] ;
+		}
+		return result ;
+	}
+private:
+	const VEC_EXT& object ;
+} ;
+
+} // sugar
+
+template <bool NA, typename T>
+inline sugar::Sum<INTSXP,NA,T> sum( const VectorBase<INTSXP,NA,T>& t){
+	return sugar::Sum<INTSXP,NA,T>( t ) ;
+}
+
+template <bool NA, typename T>
+inline sugar::Sum<REALSXP,NA,T> sum( const VectorBase<REALSXP,NA,T>& t){
+	return sugar::Sum<REALSXP,NA,T>( t ) ;
+}
+
+template <bool NA, typename T>
+inline sugar::Sum<LGLSXP,NA,T> sum( const VectorBase<LGLSXP,NA,T>& t){
+	return sugar::Sum<LGLSXP,NA,T>( t ) ;
+}
+
+} // Rcpp
+#endif
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/pow.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/pow.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/pow.h	(revision 2477)
@@ -0,0 +1,89 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// pow.h: Rcpp R/C++ interface class library -- pow
+//
+// Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__pow_h
+#define Rcpp__sugar__pow_h
+
+namespace Rcpp{
+namespace sugar{
+
+template <int RTYPE, bool NA, typename T, typename EXPONENT_TYPE>
+class Pow : public Rcpp::VectorBase< REALSXP ,NA, Pow<RTYPE,NA,T,EXPONENT_TYPE> > {
+public:
+	typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
+
+	Pow( const T& object_, EXPONENT_TYPE exponent ) : object(object_), op(exponent) {}
+
+        inline double operator[]( R_xlen_t i ) const {
+	    return ::pow( object[i], op );
+	}
+        inline R_xlen_t size() const { return object.size() ; }
+
+private:
+	const T& object ;
+	EXPONENT_TYPE op ;
+} ;
+
+template <bool NA, typename T, typename EXPONENT_TYPE>
+class Pow<INTSXP,NA,T,EXPONENT_TYPE> : public Rcpp::VectorBase< REALSXP ,NA, Pow<INTSXP,NA,T,EXPONENT_TYPE> > {
+public:
+	Pow( const T& object_, EXPONENT_TYPE exponent ) : object(object_), op(exponent) {}
+
+        inline double operator[]( R_xlen_t i ) const {
+		int x = object[i] ;
+	    return x == NA_INTEGER ? NA_INTEGER : ::pow( x, op );
+	}
+        inline R_xlen_t size() const { return object.size() ; }
+
+private:
+	const T& object ;
+	EXPONENT_TYPE op ;
+} ;
+template <typename T, typename EXPONENT_TYPE>
+class Pow<INTSXP,false,T,EXPONENT_TYPE> : public Rcpp::VectorBase< REALSXP ,false, Pow<INTSXP,false,T,EXPONENT_TYPE> > {
+public:
+	Pow( const T& object_, EXPONENT_TYPE exponent ) : object(object_), op(exponent) {}
+
+        inline double operator[]( R_xlen_t i ) const {
+	    return ::pow( object[i], op );
+	}
+        inline R_xlen_t size() const { return object.size() ; }
+
+private:
+	const T& object ;
+	EXPONENT_TYPE op ;
+} ;
+
+
+} // sugar
+
+template <int RTYPE, bool NA, typename T, typename EXPONENT_TYPE>
+inline sugar::Pow<RTYPE,NA,T,EXPONENT_TYPE> pow(
+	const VectorBase<RTYPE,NA,T>& t,
+	EXPONENT_TYPE exponent
+){
+	return sugar::Pow<RTYPE,NA,T,EXPONENT_TYPE>( t.get_ref() , exponent ) ;
+}
+
+
+} // Rcpp
+#endif
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/unique.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/unique.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/unique.h	(revision 2477)
@@ -0,0 +1,85 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// unique.h: Rcpp R/C++ interface class library -- unique
+//
+// Copyright (C) 2012   Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__unique_h
+#define Rcpp__sugar__unique_h
+
+namespace Rcpp{
+namespace sugar{
+
+template <typename HASH>
+class InSet {
+    typedef typename HASH::STORAGE STORAGE ;
+
+public:
+    InSet( const HASH& hash_ ) : hash(hash_){}
+
+    inline int operator()(STORAGE value){
+        return hash.contains(value) ;
+    }
+
+private:
+    const HASH& hash ;
+} ;
+
+template <int RTYPE, typename TABLE_T>
+class In {
+    Vector<RTYPE> vec ;
+    typedef sugar::IndexHash<RTYPE> HASH ;
+    HASH hash ;
+
+public:
+    In( const TABLE_T& table) : vec(table), hash(vec){
+        hash.fill() ;
+    }
+
+    template <typename T>
+    LogicalVector get( const T& x) const {
+        return LogicalVector( x.begin(), x.end(), InSet<HASH>(hash) ) ;
+    }
+
+} ;
+
+
+} // sugar
+
+template <int RTYPE, bool NA, typename T>
+inline Vector<RTYPE> unique( const VectorBase<RTYPE,NA,T>& t ){
+	Vector<RTYPE> vec(t) ;
+	sugar::IndexHash<RTYPE> hash(vec) ;
+	hash.fill() ;
+	return hash.keys() ;
+}
+template <int RTYPE, bool NA, typename T>
+inline Vector<RTYPE> sort_unique( const VectorBase<RTYPE,NA,T>& t ){
+	return unique<RTYPE,NA,T>( t ).sort() ;
+}
+
+template <int RTYPE, bool NA, typename T, bool RHS_NA, typename RHS_T>
+inline LogicalVector in( const VectorBase<RTYPE,NA,T>& x, const VectorBase<RTYPE,RHS_NA,RHS_T>& table ){
+    typedef VectorBase<RTYPE,RHS_NA,RHS_T> TABLE_T ;
+    return sugar::In<RTYPE, TABLE_T>(table).get( x.get_ref() ) ;
+}
+
+
+} // Rcpp
+#endif
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/sd.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/sd.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/sd.h	(revision 2477)
@@ -0,0 +1,53 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// mean.h: Rcpp R/C++ interface class library -- mean
+//
+// Copyright (C) 2011 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__sd_h
+#define Rcpp__sugar__sd_h
+
+namespace Rcpp{
+namespace sugar{
+
+template <int RTYPE, bool NA, typename T>
+class Sd : public Lazy< typename Rcpp::traits::storage_type<RTYPE>::type , Sd<RTYPE,NA,T> > {
+public:
+	typedef typename Rcpp::VectorBase<RTYPE,NA,T> VEC_TYPE ;
+	typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
+
+	Sd( const VEC_TYPE& object_ ) : object(object_){}
+
+	STORAGE get() const {
+	    return ::sqrt( var(object).get() ) ;
+	}
+private:
+	const VEC_TYPE& object ;
+} ;
+
+} // sugar
+
+template <bool NA, typename T>
+inline sugar::Sd<REALSXP,NA,T> sd( const VectorBase<REALSXP,NA,T>& t){
+	return sugar::Sd<REALSXP,NA,T>( t ) ;
+}
+
+
+} // Rcpp
+#endif
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/rep_each.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/rep_each.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/rep_each.h	(revision 2477)
@@ -0,0 +1,57 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// rep_each.h: Rcpp R/C++ interface class library -- rep_each
+//
+// Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__rep_each_h
+#define Rcpp__sugar__rep_each_h
+
+namespace Rcpp{
+namespace sugar{
+
+template <int RTYPE, bool NA, typename T>
+class Rep_each : public Rcpp::VectorBase< RTYPE ,NA, Rep_each<RTYPE,NA,T> > {
+public:
+	typedef typename Rcpp::VectorBase<RTYPE,NA,T> VEC_TYPE ;
+	typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
+
+        Rep_each( const VEC_TYPE& object_, R_xlen_t times_ ) :
+		object(object_), times(times_), n(object.size()) {}
+
+        inline STORAGE operator[]( R_xlen_t i ) const {
+		return object[ i / times ] ;
+	}
+        inline R_xlen_t size() const { return n * times ; }
+
+private:
+	const VEC_TYPE& object ;
+        R_xlen_t times, n ;
+} ;
+
+} // sugar
+
+template <int RTYPE, bool NA, typename T>
+inline sugar::Rep_each<RTYPE,NA,T> rep_each( const VectorBase<RTYPE,NA,T>& t, R_xlen_t times ){
+	return sugar::Rep_each<RTYPE,NA,T>( t, times ) ;
+}
+
+
+} // Rcpp
+#endif
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/complex.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/complex.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/complex.h	(revision 2477)
@@ -0,0 +1,275 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// complex.h: Rcpp R/C++ interface class library -- complex
+//
+// Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__complex_h
+#define Rcpp__sugar__complex_h
+
+#ifdef HAVE_HYPOT
+# define RCPP_HYPOT ::hypot
+#else
+# define RCPP_HYPOT ::Rf_pythag
+#endif
+
+namespace Rcpp{
+namespace sugar{
+
+
+template <bool NA, typename RESULT_TYPE, typename T, typename FunPtr>
+class SugarComplex : public Rcpp::VectorBase<
+	Rcpp::traits::r_sexptype_traits<RESULT_TYPE>::rtype ,
+	NA,
+	SugarComplex<NA,RESULT_TYPE,T,FunPtr>
+	> {
+public:
+
+	typedef Rcpp::VectorBase<CPLXSXP,NA,T> VEC_TYPE ;
+
+	SugarComplex( FunPtr ptr_, const VEC_TYPE & vec_) : ptr(ptr_), vec(vec_){}
+
+        inline RESULT_TYPE operator[]( R_xlen_t i) const {
+		Rcomplex x = vec[i] ;
+		if( Rcpp::traits::is_na<CPLXSXP>( x ) )
+			return Rcpp::traits::get_na< Rcpp::traits::r_sexptype_traits<RESULT_TYPE>::rtype >() ;
+		return ptr( x );
+	}
+        inline R_xlen_t size() const { return vec.size() ; }
+
+private:
+	FunPtr ptr ;
+	const VEC_TYPE& vec ;
+};
+} // sugar
+
+namespace internal{
+inline double complex__Re( Rcomplex x){ return x.r ; }
+	inline double complex__Im( Rcomplex x){ return x.i ; }
+	inline double complex__Mod( Rcomplex x){ return ::sqrt( x.i * x.i + x.r * x.r) ; }
+	inline Rcomplex complex__Conj( Rcomplex x){
+		Rcomplex y ;
+		y.r = x.r;
+		y.i = -x.i ;
+		return y ;
+	}
+	inline double complex__Arg( Rcomplex x ){ return ::atan2(x.i, x.r); }
+	// TODO: this does not use HAVE_C99_COMPLEX as in R, perhaps it should
+	inline Rcomplex complex__exp( Rcomplex x){
+		Rcomplex y ;
+		double expx = ::exp(x.r);
+    	y.r = expx * ::cos(x.i);
+    	y.i = expx * ::sin(x.i);
+		return y ;
+	}
+	inline Rcomplex complex__log( Rcomplex x){
+		Rcomplex y ;
+		y.i = ::atan2(x.i, x.r);
+		y.r = ::log( RCPP_HYPOT( x.r, x.i ) );
+	    return y ;
+	}
+	inline Rcomplex complex__sqrt(Rcomplex z){
+	    Rcomplex r ;
+		double mag;
+
+	    if( (mag = RCPP_HYPOT(z.r, z.i)) == 0.0)
+		r.r = r.i = 0.0;
+	    else if(z.r > 0) {
+	    	r.r = ::sqrt(0.5 * (mag + z.r) );
+		r.i = z.i / r.r / 2;
+	    }
+	    else {
+	    	r.i = ::sqrt(0.5 * (mag - z.r) );
+		if(z.i < 0)
+		    r.i = - r.i;
+		r.r = z.i / r.i / 2;
+	    }
+	    return r ;
+	}
+	inline Rcomplex complex__cos(Rcomplex z){
+	    Rcomplex r ;
+	    r.r = ::cos(z.r) * ::cosh(z.i);
+	    r.i = - ::sin(z.r) * ::sinh(z.i);
+	    return r ;
+	}
+	inline Rcomplex complex__cosh(Rcomplex z){
+	    Rcomplex r;
+	    r.r = ::cos(-z.i) * ::cosh( z.r);
+	    r.i = - ::sin(-z.i) * ::sinh(z.r);
+	    return r ;
+	}
+	inline Rcomplex complex__sin(Rcomplex z){
+		Rcomplex r ;
+	    r.r = ::sin(z.r) * ::cosh(z.i);
+	    r.i = ::cos(z.r) * ::sinh(z.i);
+	    return r;
+	}
+	inline Rcomplex complex__tan(Rcomplex z){
+	    Rcomplex r ;
+		double x2, y2, den;
+	    x2 = 2.0 * z.r;
+	    y2 = 2.0 * z.i;
+	    den = ::cos(x2) + ::cosh(y2);
+	    r.r = ::sin(x2)/den;
+	    /* any threshold between -log(DBL_EPSILON)
+	       and log(DBL_XMAX) will do*/
+	       if (ISNAN(y2) || ::fabs(y2) < 50.0)
+	       	   r.i = ::sinh(y2)/den;
+	       else
+	       	   r.i = (y2 <0 ? -1.0 : 1.0);
+	   return r ;
+	}
+
+inline Rcomplex complex__asin(Rcomplex z)
+{
+	Rcomplex r ;
+    double alpha, bet, t1, t2, x, y;
+    x = z.r;
+    y = z.i;
+    t1 = 0.5 * RCPP_HYPOT(x + 1, y);
+    t2 = 0.5 * RCPP_HYPOT(x - 1, y);
+    alpha = t1 + t2;
+    bet = t1 - t2;
+    r.r = ::asin(bet);
+    r.i = ::log(alpha + ::sqrt(alpha*alpha - 1));
+    if(y < 0 || (y == 0 && x > 1)) r.i *= -1;
+    return r ;
+}
+
+inline Rcomplex complex__acos(Rcomplex z)
+{
+    Rcomplex r, Asin = complex__asin(z);
+    r.r = M_PI_2 - Asin.r;
+    r.i = - Asin.i;
+    return r ;
+}
+
+	/* Complex Arctangent Function */
+	/* Equation (4.4.39) Abramowitz and Stegun */
+	/* with additional terms to force the branch cuts */
+	/* to agree with figure 4.4, p79.  Continuity */
+	/* on the branch cuts (pure imaginary axis; x==0, |y|>1) */
+	/* is standard: z_asin() is continuous from the right */
+	/*  if y >= 1, and continuous from the left if y <= -1.	*/
+
+inline Rcomplex complex__atan(Rcomplex z)
+{
+    Rcomplex r;
+    double x, y;
+    x = z.r;
+    y = z.i;
+    r.r = 0.5 * ::atan(2 * x / ( 1 - x * x - y * y));
+    r.i = 0.25 * ::log((x * x + (y + 1) * (y + 1)) /
+		      (x * x + (y - 1) * (y - 1)));
+    if(x*x + y*y > 1) {
+	r.r += M_PI_2;
+	if(x < 0 || (x == 0 && y < 0)) r.r -= M_PI;
+    }
+    return r ;
+}
+
+
+	inline Rcomplex complex__acosh(Rcomplex z){
+	    Rcomplex r, a = complex__acos(z);
+	    r.r = -a.i;
+	    r.i = a.r;
+	    return r ;
+	}
+
+	inline Rcomplex complex__asinh(Rcomplex z){
+	    Rcomplex r, b;
+	    b.r = -z.i;
+	    b.i =  z.r;
+	    Rcomplex a = complex__asin(b);
+	    r.r =  a.i;
+	    r.i = -a.r;
+	    return r ;
+	}
+
+	inline Rcomplex complex__atanh(Rcomplex z){
+	    Rcomplex r, b;
+	    b.r = -z.i;
+	    b.i =  z.r;
+	    Rcomplex a = complex__atan(b);
+	    r.r =  a.i;
+	    r.i = -a.r;
+	    return r ;
+	}
+inline Rcomplex complex__sinh(Rcomplex z)
+{
+    Rcomplex r, b;
+    b.r = -z.i;
+    b.i =  z.r;
+    Rcomplex a = complex__sin(b);
+    r.r =  a.i;
+    r.i = -a.r;
+    return r ;
+}
+
+inline Rcomplex complex__tanh(Rcomplex z)
+{
+    Rcomplex r, b;
+    b.r = -z.i;
+    b.i =  z.r;
+    Rcomplex a = complex__tan(b);
+    r.r =  a.i;
+    r.i = -a.r;
+    return r ;
+}
+
+
+
+} // internal
+
+#define RCPP_SUGAR_COMPLEX(__NAME__,__OUT__)                                \
+	template <bool NA, typename T>                                          \
+	inline sugar::SugarComplex<NA,__OUT__,T, __OUT__ (*)(Rcomplex) >        \
+	__NAME__(                                                               \
+		const VectorBase<CPLXSXP,NA,T>& t                                   \
+		){                                                                  \
+		return sugar::SugarComplex<NA,__OUT__,T, __OUT__ (*)(Rcomplex) >(   \
+			internal::complex__##__NAME__, t                                \
+		) ;                                                                 \
+	}
+
+RCPP_SUGAR_COMPLEX( Re, double )
+RCPP_SUGAR_COMPLEX( Im, double )
+RCPP_SUGAR_COMPLEX( Mod, double )
+RCPP_SUGAR_COMPLEX( Arg, double )
+RCPP_SUGAR_COMPLEX( Conj, Rcomplex )
+RCPP_SUGAR_COMPLEX( exp, Rcomplex )
+RCPP_SUGAR_COMPLEX( log, Rcomplex )
+RCPP_SUGAR_COMPLEX( sqrt, Rcomplex )
+RCPP_SUGAR_COMPLEX( cos, Rcomplex )
+RCPP_SUGAR_COMPLEX( sin, Rcomplex )
+RCPP_SUGAR_COMPLEX( tan, Rcomplex )
+RCPP_SUGAR_COMPLEX( acos, Rcomplex )
+RCPP_SUGAR_COMPLEX( asin, Rcomplex )
+RCPP_SUGAR_COMPLEX( atan, Rcomplex )
+RCPP_SUGAR_COMPLEX( acosh, Rcomplex )
+RCPP_SUGAR_COMPLEX( asinh, Rcomplex )
+RCPP_SUGAR_COMPLEX( atanh, Rcomplex )
+RCPP_SUGAR_COMPLEX( cosh, Rcomplex )
+RCPP_SUGAR_COMPLEX( sinh, Rcomplex )
+RCPP_SUGAR_COMPLEX( tanh, Rcomplex )
+
+#undef RCPP_SUGAR_COMPLEX
+
+} // Rcpp
+#endif
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/functions.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/functions.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/functions.h	(revision 2477)
@@ -0,0 +1,92 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// functions.h: Rcpp R/C++ interface class library -- sugar functions
+//
+// Copyright (C) 2010 - 2013 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef RCPP_SUGAR_FUNCTIONS_H
+#define RCPP_SUGAR_FUNCTIONS_H
+
+/* for exp( double ) */
+#include <cmath>
+
+#include <Rcpp/sugar/functions/Lazy.h>
+
+#include <Rcpp/sugar/functions/math.h>
+
+#include <Rcpp/sugar/functions/complex.h>
+
+#include <Rcpp/sugar/functions/any.h>
+#include <Rcpp/sugar/functions/all.h>
+#include <Rcpp/sugar/functions/is_na.h>
+#include <Rcpp/sugar/functions/is_finite.h>
+#include <Rcpp/sugar/functions/is_infinite.h>
+#include <Rcpp/sugar/functions/is_nan.h>
+#include <Rcpp/sugar/functions/na_omit.h>
+#include <Rcpp/sugar/functions/seq_along.h>
+#include <Rcpp/sugar/functions/sapply.h>
+#include <Rcpp/sugar/functions/mapply.h>
+#include <Rcpp/sugar/functions/lapply.h>
+#include <Rcpp/sugar/functions/ifelse.h>
+#include <Rcpp/sugar/functions/pmin.h>
+#include <Rcpp/sugar/functions/pmax.h>
+#include <Rcpp/sugar/functions/clamp.h>
+#include <Rcpp/sugar/functions/min.h>
+#include <Rcpp/sugar/functions/max.h>
+#include <Rcpp/sugar/functions/range.h>
+#include <Rcpp/sugar/functions/sign.h>
+#include <Rcpp/sugar/functions/diff.h>
+#include <Rcpp/sugar/functions/pow.h>
+#include <Rcpp/sugar/functions/rep.h>
+#include <Rcpp/sugar/functions/rep_len.h>
+#include <Rcpp/sugar/functions/rep_each.h>
+#include <Rcpp/sugar/functions/rev.h>
+#include <Rcpp/sugar/functions/head.h>
+#include <Rcpp/sugar/functions/tail.h>
+
+#include <Rcpp/sugar/functions/sum.h>
+#include <Rcpp/sugar/functions/mean.h>
+#include <Rcpp/sugar/functions/var.h>
+#include <Rcpp/sugar/functions/sd.h>
+#include <Rcpp/sugar/functions/cumsum.h>
+#include <Rcpp/sugar/functions/which_min.h>
+#include <Rcpp/sugar/functions/which_max.h>
+
+#include <Rcpp/sugar/functions/unique.h>
+#include <Rcpp/sugar/functions/match.h>
+#include <Rcpp/sugar/functions/table.h>
+#include <Rcpp/sugar/functions/duplicated.h>
+#include <Rcpp/sugar/functions/self_match.h>
+#include <Rcpp/sugar/functions/setdiff.h>
+
+#include <Rcpp/sugar/functions/strings/strings.h>
+
+#include <Rcpp/sugar/functions/cumprod.h>
+#include <Rcpp/sugar/functions/cummin.h>
+#include <Rcpp/sugar/functions/cummax.h>
+
+#include <Rcpp/sugar/functions/median.h>
+
+#include <Rcpp/sugar/functions/cbind.h>
+
+#include <Rcpp/sugar/functions/rowSums.h>
+
+#include <Rcpp/sugar/functions/sample.h>
+
+#endif
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/all.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/all.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/all.h	(revision 2477)
@@ -0,0 +1,90 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// all.h: Rcpp R/C++ interface class library -- all
+//
+// Copyright (C) 2010 - 2013 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__all_h
+#define Rcpp__sugar__all_h
+
+namespace Rcpp{
+namespace sugar{
+
+template <bool NA, typename T>
+class All : public SingleLogicalResult< true, All<NA,T> >{
+public:
+	typedef typename Rcpp::VectorBase<LGLSXP,NA,T> VEC_TYPE ;
+	typedef SingleLogicalResult< true, All<NA,T> > PARENT ;
+	All( const VEC_TYPE& t ) : PARENT() , object(t) {}
+
+	void apply(){
+		R_xlen_t n = object.size() ;
+		int current = 0 ;
+		PARENT::reset() ;
+		for( R_xlen_t i=0 ; i<n ; i++){
+			current = object[i] ;
+			if( current == FALSE ) {
+				PARENT::set_false() ;
+				return ;
+			}
+			if( Rcpp::traits::is_na<LGLSXP>(current)  ) {
+				PARENT::set_na();
+			}
+		}
+		if( PARENT::is_unresolved() ){
+			PARENT::set_true() ;
+		}
+	}
+private:
+	const VEC_TYPE& object ;
+
+} ;
+
+
+template <typename T>
+class All<false,T> : public SingleLogicalResult< false, All<false,T> >{
+public:
+	typedef typename Rcpp::VectorBase<LGLSXP,false,T> VEC_TYPE ;
+	typedef SingleLogicalResult< false, All<false,T> > PARENT ;
+	All( const VEC_TYPE& t ) : PARENT() , object(t) {}
+
+	void apply(){
+		R_xlen_t n = object.size() ;
+		PARENT::set_true() ;
+		for( R_xlen_t i=0 ; i<n ; i++){
+			if( object[i] == FALSE ) {
+				PARENT::set_false() ;
+				return ;
+			}
+		}
+	}
+private:
+	const VEC_TYPE& object ;
+} ;
+
+
+} // sugar
+
+template <bool NA, typename T>
+inline sugar::All<NA,T> all( const Rcpp::VectorBase<LGLSXP,NA,T>& t){
+	return sugar::All<NA,T>( t ) ;
+}
+
+} // Rcpp
+#endif
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/sapply.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/sapply.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/sapply.h	(revision 2477)
@@ -0,0 +1,136 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// sapply.h: Rcpp R/C++ interface class library -- sapply
+//
+// Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__sapply_h
+#define Rcpp__sugar__sapply_h
+
+#if defined(RCPP_USING_CXX0X_OR_LATER)
+	#include <type_traits> // ::std::result_of
+#endif
+
+namespace Rcpp{
+namespace sugar{
+
+template <typename Function, typename SugarExpression>
+struct sapply_application_result_of
+{
+#if defined(RCPP_USING_CXX0X_OR_LATER)
+	typedef typename ::std::result_of<Function(typename SugarExpression::stored_type)>::type type;
+#else
+	typedef typename ::Rcpp::traits::result_of<Function>::type type;
+#endif
+} ;
+
+// template <typename Function, typename SugarExpression>
+// using sapply_application_result_of_t = typename sapply_application_result_of<Function, SugarExpression>::type;
+
+template <int RTYPE, bool NA, typename T, typename Function, bool NO_CONVERSION>
+class Sapply : public VectorBase<
+	Rcpp::traits::r_sexptype_traits<
+		typename ::Rcpp::sugar::sapply_application_result_of<Function, T>::type
+	>::rtype ,
+	true ,
+	Sapply<RTYPE,NA,T,Function,NO_CONVERSION>
+> {
+public:
+	typedef typename ::Rcpp::sugar::sapply_application_result_of<Function, T>::type result_type ;
+	const static int RESULT_R_TYPE =
+		Rcpp::traits::r_sexptype_traits<result_type>::rtype ;
+
+	typedef Rcpp::VectorBase<RTYPE,NA,T> VEC ;
+	typedef typename Rcpp::traits::r_vector_element_converter<RESULT_R_TYPE>::type converter_type ;
+	typedef typename Rcpp::traits::storage_type<RESULT_R_TYPE>::type STORAGE ;
+
+	typedef typename Rcpp::traits::Extractor< RTYPE, NA, T>::type EXT ;
+
+	Sapply( const VEC& vec_, Function fun_ ) : vec(vec_.get_ref()), fun(fun_){
+	    RCPP_DEBUG_1( "Sapply With Converter = %s", DEMANGLE(Sapply) )
+	    RCPP_DEBUG_1( "Sapply Converter = %s", DEMANGLE(converter_type) )
+	}
+
+	inline STORAGE operator[]( R_xlen_t i ) const {
+		STORAGE res = converter_type::get( fun( vec[i] ) );
+		return res ;
+	}
+	inline R_xlen_t size() const { return vec.size() ; }
+
+private:
+	const EXT& vec ;
+	Function fun ;
+
+} ;
+
+
+template <int RTYPE, bool NA, typename T, typename Function>
+class Sapply<RTYPE,NA,T,Function,true> : public VectorBase<
+	Rcpp::traits::r_sexptype_traits<
+		typename ::Rcpp::sugar::sapply_application_result_of<Function, T>::type
+	>::rtype ,
+	true ,
+	Sapply<RTYPE,NA,T,Function,true>
+> {
+public:
+	typedef typename ::Rcpp::sugar::sapply_application_result_of<Function, T>::type result_type ;
+	const static int RESULT_R_TYPE =
+		Rcpp::traits::r_sexptype_traits<result_type>::rtype ;
+
+	typedef Rcpp::VectorBase<RTYPE,NA,T> VEC ;
+	typedef typename Rcpp::traits::storage_type<RESULT_R_TYPE>::type STORAGE ;
+
+	typedef typename Rcpp::traits::Extractor< RTYPE, NA, T>::type EXT ;
+
+	Sapply( const VEC& vec_, Function fun_ ) : vec(vec_.get_ref()), fun(fun_){
+	    RCPP_DEBUG_1( "Sapply  = %s", DEMANGLE(Sapply) )
+	}
+
+	inline STORAGE operator[]( R_xlen_t i ) const {
+		return fun( vec[i] ) ;
+	}
+	inline R_xlen_t size() const { return vec.size() ; }
+
+private:
+	const EXT& vec ;
+	Function fun ;
+
+} ;
+
+
+} // sugar
+
+template <int RTYPE, bool NA, typename T, typename Function >
+inline sugar::Sapply<
+    RTYPE,NA,T,Function,
+    traits::same_type<
+        typename ::Rcpp::sugar::sapply_application_result_of<Function, T>::type ,
+        typename Rcpp::traits::storage_type< traits::r_sexptype_traits< typename ::Rcpp::sugar::sapply_application_result_of<Function, T>::type >::rtype >::type
+    >::value
+>
+sapply( const Rcpp::VectorBase<RTYPE,NA,T>& t, Function fun ){
+	return sugar::Sapply<RTYPE,NA,T,Function,
+	traits::same_type<
+        typename ::Rcpp::sugar::sapply_application_result_of<Function, T>::type ,
+        typename Rcpp::traits::storage_type< traits::r_sexptype_traits< typename ::Rcpp::sugar::sapply_application_result_of<Function, T>::type >::rtype >::type
+    >::value >( t, fun ) ;
+}
+
+} // Rcpp
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/seq_along.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/seq_along.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/seq_along.h	(revision 2477)
@@ -0,0 +1,59 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// seq_along.h: Rcpp R/C++ interface class library -- any
+//
+// Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__seq_along_h
+#define Rcpp__sugar__seq_along_h
+
+namespace Rcpp{
+namespace sugar{
+
+class SeqLen : public VectorBase< INTSXP,false,SeqLen > {
+public:
+        SeqLen( R_xlen_t len_ ) : len(len_){}
+
+        inline R_xlen_t operator[]( R_xlen_t i ) const {
+		return 1 + i ;
+	}
+        inline R_xlen_t size() const { return len ; }
+
+private:
+        R_xlen_t len ;
+} ;
+
+} // sugar
+
+template <int RTYPE, bool NA, typename T>
+inline sugar::SeqLen seq_along( const Rcpp::VectorBase<RTYPE,NA,T>& t){
+	return sugar::SeqLen( t.size() ) ;
+}
+
+inline sugar::SeqLen seq_len( const size_t& n){
+	return sugar::SeqLen( n ) ;
+}
+
+inline Range seq(R_xlen_t start, R_xlen_t end){
+	return Range( start, end ) ;
+}
+
+
+} // Rcpp
+#endif
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/cumprod.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/cumprod.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/cumprod.h	(revision 2477)
@@ -0,0 +1,76 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// cumsum.h: Rcpp R/C++ interface class library -- cumsum
+//
+// Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__cumprod_h
+#define Rcpp__sugar__cumprod_h
+
+namespace Rcpp{
+namespace sugar{
+
+template <int RTYPE, bool NA, typename T>
+class Cumprod : public Lazy< Rcpp::Vector<RTYPE>, Cumprod<RTYPE, NA, T> > {
+public:
+    typedef typename Rcpp::VectorBase<RTYPE, NA, T> VEC_TYPE;
+    typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE;
+    typedef Rcpp::Vector<RTYPE> VECTOR;
+
+    Cumprod(const VEC_TYPE& object_) : object(object_) {}
+    
+    VECTOR get() const {
+        R_xlen_t n = object.size();
+        VECTOR result(n, Rcpp::traits::get_na<RTYPE>());
+        STORAGE current = object[0];
+        
+        if (Rcpp::traits::is_na<RTYPE>(current)) return result;
+        result[0] = current;
+        for (R_xlen_t i = 1; i < n; i++) {
+            current = object[i];
+            if (Rcpp::traits::is_na<RTYPE>(current)) return result;
+            result[i] = result[i-1] * current;
+        }
+        return result ;
+    }
+private:
+    const VEC_TYPE& object;    
+};
+
+} // sugar
+
+
+template <bool NA, typename T>
+inline sugar::Cumprod<INTSXP, NA, T> cumprod(const VectorBase<INTSXP, NA, T>& t) {
+    return sugar::Cumprod<INTSXP, NA, T>(t);
+}
+
+template <bool NA, typename T>
+inline sugar::Cumprod<REALSXP, NA, T> cumprod(const VectorBase<REALSXP, NA, T>& t) {
+    return sugar::Cumprod<REALSXP, NA, T>(t);
+}
+
+template <bool NA, typename T>
+inline sugar::Cumprod<CPLXSXP, NA, T> cumprod(const VectorBase<CPLXSXP, NA, T>& t) {
+    return sugar::Cumprod<CPLXSXP, NA, T>(t);
+}
+
+
+} // Rcpp
+#endif // Rcpp__sugar__cumprod_h 
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/cumsum.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/cumsum.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/cumsum.h	(revision 2477)
@@ -0,0 +1,71 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// cumsum.h: Rcpp R/C++ interface class library -- cumsum
+//
+// Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__cumsum_h
+#define Rcpp__sugar__cumsum_h
+
+namespace Rcpp{
+namespace sugar{
+
+template <int RTYPE, bool NA, typename T>
+class Cumsum : public Lazy< Rcpp::Vector<RTYPE> , Cumsum<RTYPE,NA,T> > {
+public:
+	typedef typename Rcpp::VectorBase<RTYPE,NA,T> VEC_TYPE ;
+	typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
+	typedef Rcpp::Vector<RTYPE> VECTOR ;
+
+	Cumsum( const VEC_TYPE& object_ ) : object(object_){}
+
+	VECTOR get() const {
+	    R_xlen_t n = object.size() ;
+		VECTOR result( n, Rcpp::traits::get_na<RTYPE>() ) ;
+		STORAGE current = object[0] ;
+		if( Rcpp::traits::is_na<RTYPE>(current) )
+		    return result ;
+		result[0] = current ;
+		for( R_xlen_t i=1; i<n; i++){
+		    current = object[i] ;
+		    if( Rcpp::traits::is_na<RTYPE>(current) )
+		        return result ;
+		    result[i] = result[i-1] + current ;
+		}
+		return result ;
+	}
+private:
+	const VEC_TYPE& object ;
+} ;
+
+} // sugar
+
+template <bool NA, typename T>
+inline sugar::Cumsum<INTSXP,NA,T> cumsum( const VectorBase<INTSXP,NA,T>& t){
+	return sugar::Cumsum<INTSXP,NA,T>( t ) ;
+}
+
+template <bool NA, typename T>
+inline sugar::Cumsum<REALSXP,NA,T> cumsum( const VectorBase<REALSXP,NA,T>& t){
+	return sugar::Cumsum<REALSXP,NA,T>( t ) ;
+}
+
+
+} // Rcpp
+#endif
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/duplicated.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/duplicated.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/duplicated.h	(revision 2477)
@@ -0,0 +1,37 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// duplicated.h: Rcpp R/C++ interface class library -- duplicated
+//
+// Copyright (C) 2012   Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__duplicated_h
+#define Rcpp__sugar__duplicated_h
+
+namespace Rcpp{
+
+template <int RTYPE, bool NA, typename T>
+inline LogicalVector duplicated( const VectorBase<RTYPE,NA,T>& x ){
+    Vector<RTYPE> vec(x) ;
+    sugar::IndexHash<RTYPE> hash(vec) ;
+    return hash.fill_and_get_duplicated() ;
+}
+
+
+} // Rcpp
+#endif
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/cbind.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/cbind.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/cbind.h	(revision 2477)
@@ -0,0 +1,830 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+//
+// cbind.h: Rcpp R/C++ interface class library -- cbind
+//
+// Copyright (C) 2016 Nathan Russell
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__cbind_h
+#define Rcpp__sugar__cbind_h
+
+namespace Rcpp {
+namespace sugar {
+namespace cbind_impl {
+
+// override r_sexptype_traits<SEXP> for STRSXP
+template <typename T> 
+struct cbind_sexptype_traits
+    : public Rcpp::traits::r_sexptype_traits<T> {};
+
+template <>
+struct cbind_sexptype_traits<SEXP> {
+    enum { rtype = STRSXP };
+};
+
+// override storage_type<LGLSXP> (int)
+template <int RTYPE>
+struct cbind_storage_type 
+    : public Rcpp::traits::storage_type<RTYPE> {};
+
+template <>
+struct cbind_storage_type<LGLSXP> {
+    typedef bool type;
+};
+
+
+// CRTP base
+template <int RTYPE, typename E>
+class BindableExpression {
+public:
+    typedef typename cbind_storage_type<RTYPE>::type stored_type;
+    
+    inline stored_type operator[](R_xlen_t i) const {
+        return static_cast<const E&>(*this)[i];
+    }
+    
+    inline stored_type operator()(R_xlen_t i, R_xlen_t j) const {
+        return static_cast<const E&>(*this)(i, j);
+    }
+    
+    inline R_xlen_t size() const {
+        return static_cast<const E&>(*this).size();
+    }
+    
+    inline R_xlen_t nrow() const {
+        return static_cast<const E&>(*this).nrow();
+    }
+    
+    inline R_xlen_t ncol() const {
+        return static_cast<const E&>(*this).ncol();
+    }
+    
+    operator E&() { return static_cast<E&>(*this); }
+    operator const E&() const { return static_cast<const E&>(*this); }
+};
+
+// Matrix, Vector interface to BindableExpression
+template <int RTYPE, typename T>
+class ContainerBindable
+    : public BindableExpression<RTYPE, ContainerBindable<RTYPE, T> > {
+public:
+    typedef typename cbind_storage_type<RTYPE>::type stored_type;
+    
+private:
+    T vec;
+    R_xlen_t len, nr, nc;
+    
+public:
+    ContainerBindable(const Rcpp::Matrix<RTYPE>& vec_)
+        : vec(vec_), len(vec.ncol() * vec.nrow()),
+          nr(vec.nrow()), nc(vec.ncol())
+    {}
+    
+    ContainerBindable(const Rcpp::Vector<RTYPE>& vec_)
+        : vec(vec_), len(vec.size()),
+          nr(vec.size()), nc(1)
+    {}
+    
+    template <typename S>
+    ContainerBindable(const BindableExpression<RTYPE, S>& e)
+        : vec(e.size()), len(e.size()),
+          nr(e.nrow()), nc(e.ncol())
+    {
+        for (R_xlen_t i = 0; i < len; i++) {
+            vec[i] = e[i];
+        }
+    }
+    
+    inline R_xlen_t size() const { return len; }
+    
+    inline R_xlen_t nrow() const { return nr; }
+    
+    inline R_xlen_t ncol() const { return nc; }
+    
+    inline stored_type operator[](R_xlen_t i) const {
+        return vec[i];
+    }
+    
+    inline stored_type operator()(R_xlen_t i, R_xlen_t j) const {
+        return vec[i + nr * j];
+    }
+};
+
+
+template <int RTYPE>
+struct scalar {
+    typedef typename cbind_storage_type<RTYPE>::type type;
+};
+
+// scalar interface to BindableExpression
+template <typename T>
+class ScalarBindable
+    : public BindableExpression<
+        cbind_sexptype_traits<T>::rtype, ScalarBindable<T> > {
+public:
+    typedef T stored_type;
+    enum { RTYPE = cbind_sexptype_traits<T>::rtype };
+    
+private:
+    T t;
+    
+public:
+    ScalarBindable(const T& t_) : t(t_) {}
+    
+    inline R_xlen_t size() const { return 1; }
+    
+    inline R_xlen_t nrow() const { return 1; }
+    
+    inline R_xlen_t ncol() const { return 1; }
+    
+    inline stored_type operator[](R_xlen_t i) const {
+        return t;
+    }
+    
+    inline stored_type operator()(R_xlen_t i, R_xlen_t j) const {
+        return t;
+    }
+};
+
+
+// binding logic; non-scalar operands
+template <int RTYPE, typename E1, typename E2>
+class JoinOp
+    : public BindableExpression<RTYPE, JoinOp<RTYPE, E1, E2> >,
+      public Rcpp::MatrixBase<RTYPE, true, JoinOp<RTYPE, E1, E2> > {
+public:
+    typedef typename cbind_storage_type<RTYPE>::type stored_type;
+    
+private:
+    const E1& e1;
+    const E2& e2;
+    
+public:
+    JoinOp(const BindableExpression<RTYPE, E1>& e1_,
+           const BindableExpression<RTYPE, E2>& e2_)
+        : e1(e1_), e2(e2_)
+    {
+        if (e1.nrow() != e2.nrow()) {
+            std::string msg = 
+                "Error in cbind: "
+                "Matrix and Vector operands "
+                "must have equal "
+                "number of rows (length).";
+            Rcpp::stop(msg);
+        }
+    }
+    
+    inline R_xlen_t size() const { return e1.size() + e2.size(); }
+    
+    inline R_xlen_t nrow() const { return e1.nrow(); }
+    
+    inline R_xlen_t ncol() const { return e1.ncol() + e2.ncol(); }
+    
+    inline stored_type operator[](R_xlen_t i) const {
+        return (i < e1.size()) ? e1[i] : e2[i - e1.size()];
+    }
+    
+    inline stored_type operator()(R_xlen_t i, R_xlen_t j) const {
+        R_xlen_t index = i + nrow() * j;
+        return (*this)[index];
+    }
+};
+
+// binding logic; rhs scalar
+template <int RTYPE, typename E1>
+class JoinOp<RTYPE, E1, ScalarBindable<typename scalar<RTYPE>::type> >
+    : public BindableExpression<RTYPE,
+        JoinOp<RTYPE, E1,
+            ScalarBindable<typename scalar<RTYPE>::type> > >,
+      public Rcpp::MatrixBase<RTYPE, true,
+        JoinOp<RTYPE, E1,
+            ScalarBindable<typename scalar<RTYPE>::type> > > {
+public:
+    typedef typename cbind_storage_type<RTYPE>::type stored_type;
+    typedef ScalarBindable<typename scalar<RTYPE>::type> E2;
+    
+private:
+    const E1& e1;
+    const E2& e2;
+    
+public:
+    JoinOp(const BindableExpression<RTYPE, E1>& e1_,
+           const BindableExpression<RTYPE, E2>& e2_)
+        : e1(e1_), e2(e2_)
+    {}
+    
+    inline R_xlen_t size() const { return e1.size() + e1.nrow(); }
+    
+    inline R_xlen_t nrow() const { return e1.nrow(); }
+    
+    inline R_xlen_t ncol() const { return e1.ncol() + 1; }
+    
+    inline stored_type operator[](R_xlen_t i) const {
+        return (i < e1.size()) ? e1[i] : e2[i];
+    }
+    
+    inline stored_type operator()(R_xlen_t i, R_xlen_t j) const {
+        R_xlen_t index = i + nrow() * j;
+        return (*this)[index];
+    }
+};
+
+// binding logic; lhs scalar
+template <int RTYPE, typename E2>
+class JoinOp<RTYPE, ScalarBindable<typename scalar<RTYPE>::type>, E2>
+    : public BindableExpression<RTYPE,
+        JoinOp<RTYPE,
+            ScalarBindable<typename scalar<RTYPE>::type>, E2> >,
+      public Rcpp::MatrixBase<RTYPE, true,
+        JoinOp<RTYPE,
+            ScalarBindable<typename scalar<RTYPE>::type>, E2> > {
+public:
+    typedef typename cbind_storage_type<RTYPE>::type stored_type;
+    typedef ScalarBindable<typename scalar<RTYPE>::type> E1;
+    
+private:
+    const E1& e1;
+    const E2& e2;
+    
+public:
+    JoinOp(const BindableExpression<RTYPE, E1>& e1_,
+           const BindableExpression<RTYPE, E2>& e2_)
+        : e1(e1_), e2(e2_)
+    {}
+    
+    inline R_xlen_t size() const { return e2.size() + e2.nrow(); }
+    
+    inline R_xlen_t nrow() const { return e2.nrow(); }
+    
+    inline R_xlen_t ncol() const { return e2.ncol() + 1; }
+    
+    inline stored_type operator[](R_xlen_t i) const {
+        return (i < e2.nrow()) ?  e1[i] : e2[i - e2.nrow()];
+    }
+    
+    inline stored_type operator()(R_xlen_t i, R_xlen_t j) const {
+        R_xlen_t index = i + nrow() * j;
+        return (*this)[index];
+    }
+};
+
+// binding logic; both scalar
+template <int RTYPE>
+class JoinOp<RTYPE, ScalarBindable<typename scalar<RTYPE>::type>, 
+                    ScalarBindable<typename scalar<RTYPE>::type> >
+    : public BindableExpression<RTYPE,
+        JoinOp<RTYPE,
+            ScalarBindable<typename scalar<RTYPE>::type>, 
+            ScalarBindable<typename scalar<RTYPE>::type> > >,
+      public Rcpp::MatrixBase<RTYPE, true,
+        JoinOp<RTYPE,
+            ScalarBindable<typename scalar<RTYPE>::type>, 
+            ScalarBindable<typename scalar<RTYPE>::type> > > {
+public:
+    typedef typename cbind_storage_type<RTYPE>::type stored_type;
+    typedef ScalarBindable<typename scalar<RTYPE>::type> E1;
+    typedef ScalarBindable<typename scalar<RTYPE>::type> E2;
+    
+private:
+    const E1& e1;
+    const E2& e2;
+    
+public:
+    JoinOp(const BindableExpression<RTYPE, E1>& e1_,
+           const BindableExpression<RTYPE, E2>& e2_)
+        : e1(e1_), e2(e2_)
+    {}
+    
+    inline R_xlen_t size() const { return e2.size() + e2.nrow(); }
+    
+    inline R_xlen_t nrow() const { return e2.nrow(); }
+    
+    inline R_xlen_t ncol() const { return e2.ncol() + 1; }
+    
+    inline stored_type operator[](R_xlen_t i) const {
+        return (i < e2.nrow()) ?  e1[i] : e2[i];
+    }
+    
+    inline stored_type operator()(R_xlen_t i, R_xlen_t j) const {
+        R_xlen_t index = i + nrow() * j;
+        return (*this)[index];
+    }
+};
+
+// for template argument deduction
+template <int RTYPE>
+inline ContainerBindable<RTYPE, Rcpp::Matrix<RTYPE> >
+MakeContainerBindable(const Rcpp::Matrix<RTYPE>& x) {
+    return ContainerBindable<RTYPE, Rcpp::Matrix<RTYPE> >(x);
+}
+
+template <int RTYPE>
+inline ContainerBindable<RTYPE, Rcpp::Vector<RTYPE> >
+MakeContainerBindable(const Rcpp::Vector<RTYPE>& x) {
+    return ContainerBindable<RTYPE, Rcpp::Vector<RTYPE> >(x);
+}
+
+template <>
+inline ContainerBindable<LGLSXP, Rcpp::Matrix<LGLSXP> >
+MakeContainerBindable(const Rcpp::Matrix<LGLSXP>& x) {
+    return ContainerBindable<LGLSXP, Rcpp::Matrix<LGLSXP> >(x);
+}
+
+template <>
+inline ContainerBindable<LGLSXP, Rcpp::Vector<LGLSXP> >
+MakeContainerBindable(const Rcpp::Vector<LGLSXP>& x) {
+    return ContainerBindable<LGLSXP, Rcpp::Vector<LGLSXP> >(x);
+}
+
+template <typename T>
+inline ScalarBindable<T> 
+MakeScalarBindable(const T& t) {
+    return ScalarBindable<T>(t);
+}
+
+// for expressions of arbitrary length
+template <int RTYPE, typename E1, typename E2>
+inline JoinOp<RTYPE, E1, E2> operator,(
+    const BindableExpression<RTYPE, E1>& e1,
+    const BindableExpression<RTYPE, E2>& e2)
+{
+    return JoinOp<RTYPE, E1, E2>(e1, e2);
+}
+
+// helpers
+namespace detail {
+
+// distinguish Matrix/Vector from scalar 
+template <typename T>
+class has_stored_type {
+private:
+    typedef char yes;
+    typedef struct {
+        char array[2];
+    } no;
+    
+    template <typename C>
+    static yes test(typename C::stored_type*);
+    
+    template <typename C>
+    static no test(...);
+    
+public:
+    static const bool value = sizeof(test<T>(0)) == sizeof(yes);
+};
+
+// functor to dispatch appropriate Make*Bindable() call 
+template <typename T, bool is_container = has_stored_type<T>::value>
+struct MakeBindableCall {};
+
+template <typename T>
+struct MakeBindableCall<T, true> {
+    typedef typename cbind_storage_type<
+        cbind_sexptype_traits<typename T::stored_type>::rtype
+    >::type stored_type;
+    
+    enum { RTYPE = cbind_sexptype_traits<stored_type>::rtype };
+    
+    ContainerBindable<RTYPE, T> operator()(const T& t) const {
+        return MakeContainerBindable(t);
+    }
+};
+
+// specialize for LGLSXP
+template <>
+struct MakeBindableCall<Rcpp::Matrix<LGLSXP>, true> {
+    typedef Rcpp::Matrix<LGLSXP> T;
+    typedef bool stored_type;
+    
+    enum { RTYPE = cbind_sexptype_traits<stored_type>::rtype };
+    
+    ContainerBindable<LGLSXP, T> operator()(const T& t) const {
+        return MakeContainerBindable(t);
+    }
+};
+
+template <>
+struct MakeBindableCall<Rcpp::Vector<LGLSXP>, true> {
+    typedef Rcpp::Vector<LGLSXP> T;
+    typedef bool stored_type;
+    
+    enum { RTYPE = cbind_sexptype_traits<stored_type>::rtype };
+    
+    ContainerBindable<LGLSXP, T> operator()(const T& t) const {
+        return MakeContainerBindable(t);
+    }
+};
+
+template <typename T>
+struct MakeBindableCall<T, false> {
+    enum { RTYPE = cbind_sexptype_traits<T>::rtype };
+    
+    ScalarBindable<T> operator()(const T& t) const {
+        return MakeScalarBindable(t);
+    }
+};
+
+template <typename T>
+inline typename Rcpp::traits::enable_if<
+    has_stored_type<T>::value, 
+    MakeBindableCall<T, true> 
+>::type 
+MakeBindable(const T& t) {
+    return MakeBindableCall<T, true>();
+}
+
+template <typename T>
+inline typename Rcpp::traits::enable_if<
+    !has_stored_type<T>::value, 
+    MakeBindableCall<T, false> 
+>::type
+MakeBindable(const T& t) {
+    return MakeBindableCall<T, false>();
+}
+
+
+// determine cbind return type from first template 
+// parameter, agnostic of Matrix/Vector/scalar
+template <typename T, bool is_container = has_stored_type<T>::value>
+struct matrix_return {};
+
+template <typename T>
+struct matrix_return<T, true> {
+    typedef typename cbind_storage_type<
+        cbind_sexptype_traits<typename T::stored_type>::rtype
+    >::type stored_type;
+    
+    enum { RTYPE = cbind_sexptype_traits<stored_type>::rtype };
+    typedef Rcpp::Matrix<RTYPE> type;
+};
+
+// specialize for LGLSXP
+// normally would default to IntegerMatrix
+template <>
+struct matrix_return<Rcpp::Matrix<LGLSXP>, true> {
+    typedef Rcpp::Matrix<LGLSXP> type;
+};
+
+template <>
+struct matrix_return<Rcpp::Vector<LGLSXP>, true> {
+    typedef Rcpp::Matrix<LGLSXP> type;
+};
+
+template <>
+struct matrix_return<bool, false> {
+    typedef Rcpp::Matrix<LGLSXP> type;
+};
+
+template <typename T>
+struct matrix_return<T, false> {
+    enum { RTYPE = cbind_sexptype_traits<T>::rtype };
+    typedef Rcpp::Matrix<RTYPE> type;
+};
+
+} // detail
+
+template <typename T, bool B = detail::has_stored_type<T>::value>
+struct matrix_return
+    : public detail::matrix_return<T, B> {};
+
+template <typename T>
+struct matrix_return<T, false>
+    : public detail::matrix_return<T, false> {};
+
+} // cbind_impl
+
+#define MakeBindable(x) (cbind_impl::detail::MakeBindable(x)(x))
+
+// begin cbind overloads
+
+template<typename T1, typename T2>
+inline typename cbind_impl::matrix_return<T1>::type
+cbind(const T1& t1, const T2& t2) {
+	return (MakeBindable(t1), MakeBindable(t2));
+}
+
+template<typename T1, typename T2, typename T3>
+inline typename cbind_impl::matrix_return<T1>::type
+cbind(const T1& t1, const T2& t2, const T3& t3) {
+	return (MakeBindable(t1), MakeBindable(t2), MakeBindable(t3));
+}
+
+template<typename T1, typename T2, typename T3, typename T4>
+inline typename cbind_impl::matrix_return<T1>::type
+cbind(const T1& t1, const T2& t2, const T3& t3, const T4& t4) {
+	return (MakeBindable(t1), MakeBindable(t2), MakeBindable(t3), MakeBindable(t4));
+}
+
+// 5
+template<typename T1, typename T2, typename T3, typename T4, typename T5>
+inline typename cbind_impl::matrix_return<T1>::type
+cbind(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5) {
+	return (MakeBindable(t1), MakeBindable(t2), MakeBindable(t3), MakeBindable(t4), MakeBindable(t5));
+}
+
+template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>
+inline typename cbind_impl::matrix_return<T1>::type
+cbind(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6) {
+	return (MakeBindable(t1), MakeBindable(t2), MakeBindable(t3), MakeBindable(t4), MakeBindable(t5), MakeBindable(t6));
+}
+
+template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7>
+inline typename cbind_impl::matrix_return<T1>::type
+cbind(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7) {
+	return (MakeBindable(t1), MakeBindable(t2), MakeBindable(t3), MakeBindable(t4), MakeBindable(t5), MakeBindable(t6), MakeBindable(t7));
+}
+
+template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8>
+inline typename cbind_impl::matrix_return<T1>::type
+cbind(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8) {
+	return (MakeBindable(t1), MakeBindable(t2), MakeBindable(t3), MakeBindable(t4), MakeBindable(t5), MakeBindable(t6), MakeBindable(t7), MakeBindable(t8));
+}
+
+template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9>
+inline typename cbind_impl::matrix_return<T1>::type
+cbind(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9) {
+	return (MakeBindable(t1), MakeBindable(t2), MakeBindable(t3), MakeBindable(t4), MakeBindable(t5), MakeBindable(t6), MakeBindable(t7), MakeBindable(t8), MakeBindable(t9));
+}
+
+// 10
+template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10>
+inline typename cbind_impl::matrix_return<T1>::type
+cbind(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10) {
+	return (MakeBindable(t1), MakeBindable(t2), MakeBindable(t3), MakeBindable(t4), MakeBindable(t5), MakeBindable(t6), MakeBindable(t7), MakeBindable(t8), MakeBindable(t9), MakeBindable(t10));
+}
+
+template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11> 
+inline typename cbind_impl::matrix_return<T1>::type
+cbind(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11) {
+	return (MakeBindable(t1), MakeBindable(t2), MakeBindable(t3), MakeBindable(t4), MakeBindable(t5), MakeBindable(t6), MakeBindable(t7), MakeBindable(t8), MakeBindable(t9), MakeBindable(t10), MakeBindable(t11));
+}
+
+template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12>
+inline typename cbind_impl::matrix_return<T1>::type
+cbind(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12) {
+	return (MakeBindable(t1), MakeBindable(t2), MakeBindable(t3), MakeBindable(t4), MakeBindable(t5), MakeBindable(t6), MakeBindable(t7), MakeBindable(t8), MakeBindable(t9), MakeBindable(t10), MakeBindable(t11), MakeBindable(t12));
+}
+
+template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13>
+inline typename cbind_impl::matrix_return<T1>::type
+cbind(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13) {
+	return (MakeBindable(t1), MakeBindable(t2), MakeBindable(t3), MakeBindable(t4), MakeBindable(t5), MakeBindable(t6), MakeBindable(t7), MakeBindable(t8), MakeBindable(t9), MakeBindable(t10), MakeBindable(t11), MakeBindable(t12), MakeBindable(t13));
+}
+
+template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14>
+inline typename cbind_impl::matrix_return<T1>::type
+cbind(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14) {
+	return (MakeBindable(t1), MakeBindable(t2), MakeBindable(t3), MakeBindable(t4), MakeBindable(t5), MakeBindable(t6), MakeBindable(t7), MakeBindable(t8), MakeBindable(t9), MakeBindable(t10), MakeBindable(t11), MakeBindable(t12), MakeBindable(t13), MakeBindable(t14));
+}
+
+// 15
+template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15>
+inline typename cbind_impl::matrix_return<T1>::type
+cbind(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15) {
+	return (MakeBindable(t1), MakeBindable(t2), MakeBindable(t3), MakeBindable(t4), MakeBindable(t5), MakeBindable(t6), MakeBindable(t7), MakeBindable(t8), MakeBindable(t9), MakeBindable(t10), MakeBindable(t11), MakeBindable(t12), MakeBindable(t13), MakeBindable(t14), MakeBindable(t15));
+}
+
+template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16>
+inline typename cbind_impl::matrix_return<T1>::type
+cbind(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16) {
+	return (MakeBindable(t1), MakeBindable(t2), MakeBindable(t3), MakeBindable(t4), MakeBindable(t5), MakeBindable(t6), MakeBindable(t7), MakeBindable(t8), MakeBindable(t9), MakeBindable(t10), MakeBindable(t11), MakeBindable(t12), MakeBindable(t13), MakeBindable(t14), MakeBindable(t15), MakeBindable(t16));
+}
+
+template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17>
+inline typename cbind_impl::matrix_return<T1>::type
+cbind(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17) {
+	return (MakeBindable(t1), MakeBindable(t2), MakeBindable(t3), MakeBindable(t4), MakeBindable(t5), MakeBindable(t6), MakeBindable(t7), MakeBindable(t8), MakeBindable(t9), MakeBindable(t10), MakeBindable(t11), MakeBindable(t12), MakeBindable(t13), MakeBindable(t14), MakeBindable(t15), MakeBindable(t16), MakeBindable(t17));
+}
+
+template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18>
+inline typename cbind_impl::matrix_return<T1>::type
+cbind(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18) {
+	return (MakeBindable(t1), MakeBindable(t2), MakeBindable(t3), MakeBindable(t4), MakeBindable(t5), MakeBindable(t6), MakeBindable(t7), MakeBindable(t8), MakeBindable(t9), MakeBindable(t10), MakeBindable(t11), MakeBindable(t12), MakeBindable(t13), MakeBindable(t14), MakeBindable(t15), MakeBindable(t16), MakeBindable(t17), MakeBindable(t18));
+}
+
+template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19>
+inline typename cbind_impl::matrix_return<T1>::type
+cbind(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19) {
+	return (MakeBindable(t1), MakeBindable(t2), MakeBindable(t3), MakeBindable(t4), MakeBindable(t5), MakeBindable(t6), MakeBindable(t7), MakeBindable(t8), MakeBindable(t9), MakeBindable(t10), MakeBindable(t11), MakeBindable(t12), MakeBindable(t13), MakeBindable(t14), MakeBindable(t15), MakeBindable(t16), MakeBindable(t17), MakeBindable(t18), MakeBindable(t19));
+}
+
+// 20
+template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19, typename T20>
+inline typename cbind_impl::matrix_return<T1>::type
+cbind(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19, const T20& t20) {
+	return (MakeBindable(t1), MakeBindable(t2), MakeBindable(t3), MakeBindable(t4), MakeBindable(t5), MakeBindable(t6), MakeBindable(t7), MakeBindable(t8), MakeBindable(t9), MakeBindable(t10), MakeBindable(t11), MakeBindable(t12), MakeBindable(t13), MakeBindable(t14), MakeBindable(t15), MakeBindable(t16), MakeBindable(t17), MakeBindable(t18), MakeBindable(t19), MakeBindable(t20));
+}
+
+template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19, typename T20, typename T21>
+inline typename cbind_impl::matrix_return<T1>::type
+cbind(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19, const T20& t20, const T21& t21) {
+	return (MakeBindable(t1), MakeBindable(t2), MakeBindable(t3), MakeBindable(t4), MakeBindable(t5), MakeBindable(t6), MakeBindable(t7), MakeBindable(t8), MakeBindable(t9), MakeBindable(t10), MakeBindable(t11), MakeBindable(t12), MakeBindable(t13), MakeBindable(t14), MakeBindable(t15), MakeBindable(t16), MakeBindable(t17), MakeBindable(t18), MakeBindable(t19), MakeBindable(t20), MakeBindable(t21));
+}
+
+template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19, typename T20, typename T21, typename T22>
+inline typename cbind_impl::matrix_return<T1>::type
+cbind(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19, const T20& t20, const T21& t21, const T22& t22) {
+	return (MakeBindable(t1), MakeBindable(t2), MakeBindable(t3), MakeBindable(t4), MakeBindable(t5), MakeBindable(t6), MakeBindable(t7), MakeBindable(t8), MakeBindable(t9), MakeBindable(t10), MakeBindable(t11), MakeBindable(t12), MakeBindable(t13), MakeBindable(t14), MakeBindable(t15), MakeBindable(t16), MakeBindable(t17), MakeBindable(t18), MakeBindable(t19), MakeBindable(t20), MakeBindable(t21), MakeBindable(t22));
+}
+
+template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19, typename T20, typename T21, typename T22, typename T23>
+inline typename cbind_impl::matrix_return<T1>::type
+cbind(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19, const T20& t20, const T21& t21, const T22& t22, const T23& t23) {
+	return (MakeBindable(t1), MakeBindable(t2), MakeBindable(t3), MakeBindable(t4), MakeBindable(t5), MakeBindable(t6), MakeBindable(t7), MakeBindable(t8), MakeBindable(t9), MakeBindable(t10), MakeBindable(t11), MakeBindable(t12), MakeBindable(t13), MakeBindable(t14), MakeBindable(t15), MakeBindable(t16), MakeBindable(t17), MakeBindable(t18), MakeBindable(t19), MakeBindable(t20), MakeBindable(t21), MakeBindable(t22), MakeBindable(t23));
+}
+
+template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19, typename T20, typename T21, typename T22, typename T23, typename T24>
+inline typename cbind_impl::matrix_return<T1>::type
+cbind(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19, const T20& t20, const T21& t21, const T22& t22, const T23& t23, const T24& t24) {
+	return (MakeBindable(t1), MakeBindable(t2), MakeBindable(t3), MakeBindable(t4), MakeBindable(t5), MakeBindable(t6), MakeBindable(t7), MakeBindable(t8), MakeBindable(t9), MakeBindable(t10), MakeBindable(t11), MakeBindable(t12), MakeBindable(t13), MakeBindable(t14), MakeBindable(t15), MakeBindable(t16), MakeBindable(t17), MakeBindable(t18), MakeBindable(t19), MakeBindable(t20), MakeBindable(t21), MakeBindable(t22), MakeBindable(t23), MakeBindable(t24));
+}
+
+// 25
+template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19, typename T20, typename T21, typename T22, typename T23, typename T24, typename T25>
+inline typename cbind_impl::matrix_return<T1>::type
+cbind(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19, const T20& t20, const T21& t21, const T22& t22, const T23& t23, const T24& t24, const T25& t25) {
+	return (MakeBindable(t1), MakeBindable(t2), MakeBindable(t3), MakeBindable(t4), MakeBindable(t5), MakeBindable(t6), MakeBindable(t7), MakeBindable(t8), MakeBindable(t9), MakeBindable(t10), MakeBindable(t11), MakeBindable(t12), MakeBindable(t13), MakeBindable(t14), MakeBindable(t15), MakeBindable(t16), MakeBindable(t17), MakeBindable(t18), MakeBindable(t19), MakeBindable(t20), MakeBindable(t21), MakeBindable(t22), MakeBindable(t23), MakeBindable(t24), MakeBindable(t25));
+}
+
+template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19, typename T20, typename T21, typename T22, typename T23, typename T24, typename T25, typename T26>
+inline typename cbind_impl::matrix_return<T1>::type
+cbind(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19, const T20& t20, const T21& t21, const T22& t22, const T23& t23, const T24& t24, const T25& t25, const T26& t26) {
+	return (MakeBindable(t1), MakeBindable(t2), MakeBindable(t3), MakeBindable(t4), MakeBindable(t5), MakeBindable(t6), MakeBindable(t7), MakeBindable(t8), MakeBindable(t9), MakeBindable(t10), MakeBindable(t11), MakeBindable(t12), MakeBindable(t13), MakeBindable(t14), MakeBindable(t15), MakeBindable(t16), MakeBindable(t17), MakeBindable(t18), MakeBindable(t19), MakeBindable(t20), MakeBindable(t21), MakeBindable(t22), MakeBindable(t23), MakeBindable(t24), MakeBindable(t25), MakeBindable(t26));
+}
+
+template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19, typename T20, typename T21, typename T22, typename T23, typename T24, typename T25, typename T26, typename T27>
+inline typename cbind_impl::matrix_return<T1>::type
+cbind(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19, const T20& t20, const T21& t21, const T22& t22, const T23& t23, const T24& t24, const T25& t25, const T26& t26, const T27& t27) {
+	return (MakeBindable(t1), MakeBindable(t2), MakeBindable(t3), MakeBindable(t4), MakeBindable(t5), MakeBindable(t6), MakeBindable(t7), MakeBindable(t8), MakeBindable(t9), MakeBindable(t10), MakeBindable(t11), MakeBindable(t12), MakeBindable(t13), MakeBindable(t14), MakeBindable(t15), MakeBindable(t16), MakeBindable(t17), MakeBindable(t18), MakeBindable(t19), MakeBindable(t20), MakeBindable(t21), MakeBindable(t22), MakeBindable(t23), MakeBindable(t24), MakeBindable(t25), MakeBindable(t26), MakeBindable(t27));
+}
+
+template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19, typename T20, typename T21, typename T22, typename T23, typename T24, typename T25, typename T26, typename T27, typename T28>
+inline typename cbind_impl::matrix_return<T1>::type
+cbind(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19, const T20& t20, const T21& t21, const T22& t22, const T23& t23, const T24& t24, const T25& t25, const T26& t26, const T27& t27, const T28& t28) {
+	return (MakeBindable(t1), MakeBindable(t2), MakeBindable(t3), MakeBindable(t4), MakeBindable(t5), MakeBindable(t6), MakeBindable(t7), MakeBindable(t8), MakeBindable(t9), MakeBindable(t10), MakeBindable(t11), MakeBindable(t12), MakeBindable(t13), MakeBindable(t14), MakeBindable(t15), MakeBindable(t16), MakeBindable(t17), MakeBindable(t18), MakeBindable(t19), MakeBindable(t20), MakeBindable(t21), MakeBindable(t22), MakeBindable(t23), MakeBindable(t24), MakeBindable(t25), MakeBindable(t26), MakeBindable(t27), MakeBindable(t28));
+}
+
+template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19, typename T20, typename T21, typename T22, typename T23, typename T24, typename T25, typename T26, typename T27, typename T28, typename T29>
+inline typename cbind_impl::matrix_return<T1>::type
+cbind(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19, const T20& t20, const T21& t21, const T22& t22, const T23& t23, const T24& t24, const T25& t25, const T26& t26, const T27& t27, const T28& t28, const T29& t29) {
+	return (MakeBindable(t1), MakeBindable(t2), MakeBindable(t3), MakeBindable(t4), MakeBindable(t5), MakeBindable(t6), MakeBindable(t7), MakeBindable(t8), MakeBindable(t9), MakeBindable(t10), MakeBindable(t11), MakeBindable(t12), MakeBindable(t13), MakeBindable(t14), MakeBindable(t15), MakeBindable(t16), MakeBindable(t17), MakeBindable(t18), MakeBindable(t19), MakeBindable(t20), MakeBindable(t21), MakeBindable(t22), MakeBindable(t23), MakeBindable(t24), MakeBindable(t25), MakeBindable(t26), MakeBindable(t27), MakeBindable(t28), MakeBindable(t29));
+}
+
+// 30
+template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19, typename T20, typename T21, typename T22, typename T23, typename T24, typename T25, typename T26, typename T27, typename T28, typename T29, typename T30>
+inline typename cbind_impl::matrix_return<T1>::type
+cbind(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19, const T20& t20, const T21& t21, const T22& t22, const T23& t23, const T24& t24, const T25& t25, const T26& t26, const T27& t27, const T28& t28, const T29& t29, const T30& t30) {
+	return (MakeBindable(t1), MakeBindable(t2), MakeBindable(t3), MakeBindable(t4), MakeBindable(t5), MakeBindable(t6), MakeBindable(t7), MakeBindable(t8), MakeBindable(t9), MakeBindable(t10), MakeBindable(t11), MakeBindable(t12), MakeBindable(t13), MakeBindable(t14), MakeBindable(t15), MakeBindable(t16), MakeBindable(t17), MakeBindable(t18), MakeBindable(t19), MakeBindable(t20), MakeBindable(t21), MakeBindable(t22), MakeBindable(t23), MakeBindable(t24), MakeBindable(t25), MakeBindable(t26), MakeBindable(t27), MakeBindable(t28), MakeBindable(t29), MakeBindable(t30));
+}
+
+template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19, typename T20, typename T21, typename T22, typename T23, typename T24, typename T25, typename T26, typename T27, typename T28, typename T29, typename T30, typename T31>
+inline typename cbind_impl::matrix_return<T1>::type
+cbind(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19, const T20& t20, const T21& t21, const T22& t22, const T23& t23, const T24& t24, const T25& t25, const T26& t26, const T27& t27, const T28& t28, const T29& t29, const T30& t30, const T31& t31) {
+	return (MakeBindable(t1), MakeBindable(t2), MakeBindable(t3), MakeBindable(t4), MakeBindable(t5), MakeBindable(t6), MakeBindable(t7), MakeBindable(t8), MakeBindable(t9), MakeBindable(t10), MakeBindable(t11), MakeBindable(t12), MakeBindable(t13), MakeBindable(t14), MakeBindable(t15), MakeBindable(t16), MakeBindable(t17), MakeBindable(t18), MakeBindable(t19), MakeBindable(t20), MakeBindable(t21), MakeBindable(t22), MakeBindable(t23), MakeBindable(t24), MakeBindable(t25), MakeBindable(t26), MakeBindable(t27), MakeBindable(t28), MakeBindable(t29), MakeBindable(t30), MakeBindable(t31));
+}
+
+template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19, typename T20, typename T21, typename T22, typename T23, typename T24, typename T25, typename T26, typename T27, typename T28, typename T29, typename T30, typename T31, typename T32>
+inline typename cbind_impl::matrix_return<T1>::type
+cbind(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19, const T20& t20, const T21& t21, const T22& t22, const T23& t23, const T24& t24, const T25& t25, const T26& t26, const T27& t27, const T28& t28, const T29& t29, const T30& t30, const T31& t31, const T32& t32) {
+	return (MakeBindable(t1), MakeBindable(t2), MakeBindable(t3), MakeBindable(t4), MakeBindable(t5), MakeBindable(t6), MakeBindable(t7), MakeBindable(t8), MakeBindable(t9), MakeBindable(t10), MakeBindable(t11), MakeBindable(t12), MakeBindable(t13), MakeBindable(t14), MakeBindable(t15), MakeBindable(t16), MakeBindable(t17), MakeBindable(t18), MakeBindable(t19), MakeBindable(t20), MakeBindable(t21), MakeBindable(t22), MakeBindable(t23), MakeBindable(t24), MakeBindable(t25), MakeBindable(t26), MakeBindable(t27), MakeBindable(t28), MakeBindable(t29), MakeBindable(t30), MakeBindable(t31), MakeBindable(t32));
+}
+
+template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19, typename T20, typename T21, typename T22, typename T23, typename T24, typename T25, typename T26, typename T27, typename T28, typename T29, typename T30, typename T31, typename T32, typename T33>
+inline typename cbind_impl::matrix_return<T1>::type
+cbind(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19, const T20& t20, const T21& t21, const T22& t22, const T23& t23, const T24& t24, const T25& t25, const T26& t26, const T27& t27, const T28& t28, const T29& t29, const T30& t30, const T31& t31, const T32& t32, const T33& t33) {
+	return (MakeBindable(t1), MakeBindable(t2), MakeBindable(t3), MakeBindable(t4), MakeBindable(t5), MakeBindable(t6), MakeBindable(t7), MakeBindable(t8), MakeBindable(t9), MakeBindable(t10), MakeBindable(t11), MakeBindable(t12), MakeBindable(t13), MakeBindable(t14), MakeBindable(t15), MakeBindable(t16), MakeBindable(t17), MakeBindable(t18), MakeBindable(t19), MakeBindable(t20), MakeBindable(t21), MakeBindable(t22), MakeBindable(t23), MakeBindable(t24), MakeBindable(t25), MakeBindable(t26), MakeBindable(t27), MakeBindable(t28), MakeBindable(t29), MakeBindable(t30), MakeBindable(t31), MakeBindable(t32), MakeBindable(t33));
+}
+
+template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19, typename T20, typename T21, typename T22, typename T23, typename T24, typename T25, typename T26, typename T27, typename T28, typename T29, typename T30, typename T31, typename T32, typename T33, typename T34>
+inline typename cbind_impl::matrix_return<T1>::type
+cbind(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19, const T20& t20, const T21& t21, const T22& t22, const T23& t23, const T24& t24, const T25& t25, const T26& t26, const T27& t27, const T28& t28, const T29& t29, const T30& t30, const T31& t31, const T32& t32, const T33& t33, const T34& t34) {
+	return (MakeBindable(t1), MakeBindable(t2), MakeBindable(t3), MakeBindable(t4), MakeBindable(t5), MakeBindable(t6), MakeBindable(t7), MakeBindable(t8), MakeBindable(t9), MakeBindable(t10), MakeBindable(t11), MakeBindable(t12), MakeBindable(t13), MakeBindable(t14), MakeBindable(t15), MakeBindable(t16), MakeBindable(t17), MakeBindable(t18), MakeBindable(t19), MakeBindable(t20), MakeBindable(t21), MakeBindable(t22), MakeBindable(t23), MakeBindable(t24), MakeBindable(t25), MakeBindable(t26), MakeBindable(t27), MakeBindable(t28), MakeBindable(t29), MakeBindable(t30), MakeBindable(t31), MakeBindable(t32), MakeBindable(t33), MakeBindable(t34));
+}
+
+// 35
+template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19, typename T20, typename T21, typename T22, typename T23, typename T24, typename T25, typename T26, typename T27, typename T28, typename T29, typename T30, typename T31, typename T32, typename T33, typename T34, typename T35>
+inline typename cbind_impl::matrix_return<T1>::type
+cbind(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19, const T20& t20, const T21& t21, const T22& t22, const T23& t23, const T24& t24, const T25& t25, const T26& t26, const T27& t27, const T28& t28, const T29& t29, const T30& t30, const T31& t31, const T32& t32, const T33& t33, const T34& t34, const T35& t35) {
+	return (MakeBindable(t1), MakeBindable(t2), MakeBindable(t3), MakeBindable(t4), MakeBindable(t5), MakeBindable(t6), MakeBindable(t7), MakeBindable(t8), MakeBindable(t9), MakeBindable(t10), MakeBindable(t11), MakeBindable(t12), MakeBindable(t13), MakeBindable(t14), MakeBindable(t15), MakeBindable(t16), MakeBindable(t17), MakeBindable(t18), MakeBindable(t19), MakeBindable(t20), MakeBindable(t21), MakeBindable(t22), MakeBindable(t23), MakeBindable(t24), MakeBindable(t25), MakeBindable(t26), MakeBindable(t27), MakeBindable(t28), MakeBindable(t29), MakeBindable(t30), MakeBindable(t31), MakeBindable(t32), MakeBindable(t33), MakeBindable(t34), MakeBindable(t35));
+}
+
+template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19, typename T20, typename T21, typename T22, typename T23, typename T24, typename T25, typename T26, typename T27, typename T28, typename T29, typename T30, typename T31, typename T32, typename T33, typename T34, typename T35, typename T36>
+inline typename cbind_impl::matrix_return<T1>::type
+cbind(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19, const T20& t20, const T21& t21, const T22& t22, const T23& t23, const T24& t24, const T25& t25, const T26& t26, const T27& t27, const T28& t28, const T29& t29, const T30& t30, const T31& t31, const T32& t32, const T33& t33, const T34& t34, const T35& t35, const T36& t36) {
+	return (MakeBindable(t1), MakeBindable(t2), MakeBindable(t3), MakeBindable(t4), MakeBindable(t5), MakeBindable(t6), MakeBindable(t7), MakeBindable(t8), MakeBindable(t9), MakeBindable(t10), MakeBindable(t11), MakeBindable(t12), MakeBindable(t13), MakeBindable(t14), MakeBindable(t15), MakeBindable(t16), MakeBindable(t17), MakeBindable(t18), MakeBindable(t19), MakeBindable(t20), MakeBindable(t21), MakeBindable(t22), MakeBindable(t23), MakeBindable(t24), MakeBindable(t25), MakeBindable(t26), MakeBindable(t27), MakeBindable(t28), MakeBindable(t29), MakeBindable(t30), MakeBindable(t31), MakeBindable(t32), MakeBindable(t33), MakeBindable(t34), MakeBindable(t35), MakeBindable(t36));
+}
+
+template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19, typename T20, typename T21, typename T22, typename T23, typename T24, typename T25, typename T26, typename T27, typename T28, typename T29, typename T30, typename T31, typename T32, typename T33, typename T34, typename T35, typename T36, typename T37>
+inline typename cbind_impl::matrix_return<T1>::type
+cbind(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19, const T20& t20, const T21& t21, const T22& t22, const T23& t23, const T24& t24, const T25& t25, const T26& t26, const T27& t27, const T28& t28, const T29& t29, const T30& t30, const T31& t31, const T32& t32, const T33& t33, const T34& t34, const T35& t35, const T36& t36, const T37& t37) {
+	return (MakeBindable(t1), MakeBindable(t2), MakeBindable(t3), MakeBindable(t4), MakeBindable(t5), MakeBindable(t6), MakeBindable(t7), MakeBindable(t8), MakeBindable(t9), MakeBindable(t10), MakeBindable(t11), MakeBindable(t12), MakeBindable(t13), MakeBindable(t14), MakeBindable(t15), MakeBindable(t16), MakeBindable(t17), MakeBindable(t18), MakeBindable(t19), MakeBindable(t20), MakeBindable(t21), MakeBindable(t22), MakeBindable(t23), MakeBindable(t24), MakeBindable(t25), MakeBindable(t26), MakeBindable(t27), MakeBindable(t28), MakeBindable(t29), MakeBindable(t30), MakeBindable(t31), MakeBindable(t32), MakeBindable(t33), MakeBindable(t34), MakeBindable(t35), MakeBindable(t36), MakeBindable(t37));
+}
+
+template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19, typename T20, typename T21, typename T22, typename T23, typename T24, typename T25, typename T26, typename T27, typename T28, typename T29, typename T30, typename T31, typename T32, typename T33, typename T34, typename T35, typename T36, typename T37, typename T38>
+inline typename cbind_impl::matrix_return<T1>::type
+cbind(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19, const T20& t20, const T21& t21, const T22& t22, const T23& t23, const T24& t24, const T25& t25, const T26& t26, const T27& t27, const T28& t28, const T29& t29, const T30& t30, const T31& t31, const T32& t32, const T33& t33, const T34& t34, const T35& t35, const T36& t36, const T37& t37, const T38& t38) {
+	return (MakeBindable(t1), MakeBindable(t2), MakeBindable(t3), MakeBindable(t4), MakeBindable(t5), MakeBindable(t6), MakeBindable(t7), MakeBindable(t8), MakeBindable(t9), MakeBindable(t10), MakeBindable(t11), MakeBindable(t12), MakeBindable(t13), MakeBindable(t14), MakeBindable(t15), MakeBindable(t16), MakeBindable(t17), MakeBindable(t18), MakeBindable(t19), MakeBindable(t20), MakeBindable(t21), MakeBindable(t22), MakeBindable(t23), MakeBindable(t24), MakeBindable(t25), MakeBindable(t26), MakeBindable(t27), MakeBindable(t28), MakeBindable(t29), MakeBindable(t30), MakeBindable(t31), MakeBindable(t32), MakeBindable(t33), MakeBindable(t34), MakeBindable(t35), MakeBindable(t36), MakeBindable(t37), MakeBindable(t38));
+}
+
+template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19, typename T20, typename T21, typename T22, typename T23, typename T24, typename T25, typename T26, typename T27, typename T28, typename T29, typename T30, typename T31, typename T32, typename T33, typename T34, typename T35, typename T36, typename T37, typename T38, typename T39>
+inline typename cbind_impl::matrix_return<T1>::type
+cbind(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19, const T20& t20, const T21& t21, const T22& t22, const T23& t23, const T24& t24, const T25& t25, const T26& t26, const T27& t27, const T28& t28, const T29& t29, const T30& t30, const T31& t31, const T32& t32, const T33& t33, const T34& t34, const T35& t35, const T36& t36, const T37& t37, const T38& t38, const T39& t39) {
+	return (MakeBindable(t1), MakeBindable(t2), MakeBindable(t3), MakeBindable(t4), MakeBindable(t5), MakeBindable(t6), MakeBindable(t7), MakeBindable(t8), MakeBindable(t9), MakeBindable(t10), MakeBindable(t11), MakeBindable(t12), MakeBindable(t13), MakeBindable(t14), MakeBindable(t15), MakeBindable(t16), MakeBindable(t17), MakeBindable(t18), MakeBindable(t19), MakeBindable(t20), MakeBindable(t21), MakeBindable(t22), MakeBindable(t23), MakeBindable(t24), MakeBindable(t25), MakeBindable(t26), MakeBindable(t27), MakeBindable(t28), MakeBindable(t29), MakeBindable(t30), MakeBindable(t31), MakeBindable(t32), MakeBindable(t33), MakeBindable(t34), MakeBindable(t35), MakeBindable(t36), MakeBindable(t37), MakeBindable(t38), MakeBindable(t39));
+}
+
+// 40
+template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19, typename T20, typename T21, typename T22, typename T23, typename T24, typename T25, typename T26, typename T27, typename T28, typename T29, typename T30, typename T31, typename T32, typename T33, typename T34, typename T35, typename T36, typename T37, typename T38, typename T39, typename T40>
+inline typename cbind_impl::matrix_return<T1>::type
+cbind(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19, const T20& t20, const T21& t21, const T22& t22, const T23& t23, const T24& t24, const T25& t25, const T26& t26, const T27& t27, const T28& t28, const T29& t29, const T30& t30, const T31& t31, const T32& t32, const T33& t33, const T34& t34, const T35& t35, const T36& t36, const T37& t37, const T38& t38, const T39& t39, const T40& t40) {
+	return (MakeBindable(t1), MakeBindable(t2), MakeBindable(t3), MakeBindable(t4), MakeBindable(t5), MakeBindable(t6), MakeBindable(t7), MakeBindable(t8), MakeBindable(t9), MakeBindable(t10), MakeBindable(t11), MakeBindable(t12), MakeBindable(t13), MakeBindable(t14), MakeBindable(t15), MakeBindable(t16), MakeBindable(t17), MakeBindable(t18), MakeBindable(t19), MakeBindable(t20), MakeBindable(t21), MakeBindable(t22), MakeBindable(t23), MakeBindable(t24), MakeBindable(t25), MakeBindable(t26), MakeBindable(t27), MakeBindable(t28), MakeBindable(t29), MakeBindable(t30), MakeBindable(t31), MakeBindable(t32), MakeBindable(t33), MakeBindable(t34), MakeBindable(t35), MakeBindable(t36), MakeBindable(t37), MakeBindable(t38), MakeBindable(t39), MakeBindable(t40));
+}
+
+template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19, typename T20, typename T21, typename T22, typename T23, typename T24, typename T25, typename T26, typename T27, typename T28, typename T29, typename T30, typename T31, typename T32, typename T33, typename T34, typename T35, typename T36, typename T37, typename T38, typename T39, typename T40, typename T41>
+inline typename cbind_impl::matrix_return<T1>::type
+cbind(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19, const T20& t20, const T21& t21, const T22& t22, const T23& t23, const T24& t24, const T25& t25, const T26& t26, const T27& t27, const T28& t28, const T29& t29, const T30& t30, const T31& t31, const T32& t32, const T33& t33, const T34& t34, const T35& t35, const T36& t36, const T37& t37, const T38& t38, const T39& t39, const T40& t40, const T41& t41) {
+	return (MakeBindable(t1), MakeBindable(t2), MakeBindable(t3), MakeBindable(t4), MakeBindable(t5), MakeBindable(t6), MakeBindable(t7), MakeBindable(t8), MakeBindable(t9), MakeBindable(t10), MakeBindable(t11), MakeBindable(t12), MakeBindable(t13), MakeBindable(t14), MakeBindable(t15), MakeBindable(t16), MakeBindable(t17), MakeBindable(t18), MakeBindable(t19), MakeBindable(t20), MakeBindable(t21), MakeBindable(t22), MakeBindable(t23), MakeBindable(t24), MakeBindable(t25), MakeBindable(t26), MakeBindable(t27), MakeBindable(t28), MakeBindable(t29), MakeBindable(t30), MakeBindable(t31), MakeBindable(t32), MakeBindable(t33), MakeBindable(t34), MakeBindable(t35), MakeBindable(t36), MakeBindable(t37), MakeBindable(t38), MakeBindable(t39), MakeBindable(t40), MakeBindable(t41));
+}
+
+template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19, typename T20, typename T21, typename T22, typename T23, typename T24, typename T25, typename T26, typename T27, typename T28, typename T29, typename T30, typename T31, typename T32, typename T33, typename T34, typename T35, typename T36, typename T37, typename T38, typename T39, typename T40, typename T41, typename T42>
+inline typename cbind_impl::matrix_return<T1>::type
+cbind(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19, const T20& t20, const T21& t21, const T22& t22, const T23& t23, const T24& t24, const T25& t25, const T26& t26, const T27& t27, const T28& t28, const T29& t29, const T30& t30, const T31& t31, const T32& t32, const T33& t33, const T34& t34, const T35& t35, const T36& t36, const T37& t37, const T38& t38, const T39& t39, const T40& t40, const T41& t41, const T42& t42) {
+	return (MakeBindable(t1), MakeBindable(t2), MakeBindable(t3), MakeBindable(t4), MakeBindable(t5), MakeBindable(t6), MakeBindable(t7), MakeBindable(t8), MakeBindable(t9), MakeBindable(t10), MakeBindable(t11), MakeBindable(t12), MakeBindable(t13), MakeBindable(t14), MakeBindable(t15), MakeBindable(t16), MakeBindable(t17), MakeBindable(t18), MakeBindable(t19), MakeBindable(t20), MakeBindable(t21), MakeBindable(t22), MakeBindable(t23), MakeBindable(t24), MakeBindable(t25), MakeBindable(t26), MakeBindable(t27), MakeBindable(t28), MakeBindable(t29), MakeBindable(t30), MakeBindable(t31), MakeBindable(t32), MakeBindable(t33), MakeBindable(t34), MakeBindable(t35), MakeBindable(t36), MakeBindable(t37), MakeBindable(t38), MakeBindable(t39), MakeBindable(t40), MakeBindable(t41), MakeBindable(t42));
+}
+
+template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19, typename T20, typename T21, typename T22, typename T23, typename T24, typename T25, typename T26, typename T27, typename T28, typename T29, typename T30, typename T31, typename T32, typename T33, typename T34, typename T35, typename T36, typename T37, typename T38, typename T39, typename T40, typename T41, typename T42, typename T43>
+inline typename cbind_impl::matrix_return<T1>::type
+cbind(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19, const T20& t20, const T21& t21, const T22& t22, const T23& t23, const T24& t24, const T25& t25, const T26& t26, const T27& t27, const T28& t28, const T29& t29, const T30& t30, const T31& t31, const T32& t32, const T33& t33, const T34& t34, const T35& t35, const T36& t36, const T37& t37, const T38& t38, const T39& t39, const T40& t40, const T41& t41, const T42& t42, const T43& t43) {
+	return (MakeBindable(t1), MakeBindable(t2), MakeBindable(t3), MakeBindable(t4), MakeBindable(t5), MakeBindable(t6), MakeBindable(t7), MakeBindable(t8), MakeBindable(t9), MakeBindable(t10), MakeBindable(t11), MakeBindable(t12), MakeBindable(t13), MakeBindable(t14), MakeBindable(t15), MakeBindable(t16), MakeBindable(t17), MakeBindable(t18), MakeBindable(t19), MakeBindable(t20), MakeBindable(t21), MakeBindable(t22), MakeBindable(t23), MakeBindable(t24), MakeBindable(t25), MakeBindable(t26), MakeBindable(t27), MakeBindable(t28), MakeBindable(t29), MakeBindable(t30), MakeBindable(t31), MakeBindable(t32), MakeBindable(t33), MakeBindable(t34), MakeBindable(t35), MakeBindable(t36), MakeBindable(t37), MakeBindable(t38), MakeBindable(t39), MakeBindable(t40), MakeBindable(t41), MakeBindable(t42), MakeBindable(t43));
+}
+
+template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19, typename T20, typename T21, typename T22, typename T23, typename T24, typename T25, typename T26, typename T27, typename T28, typename T29, typename T30, typename T31, typename T32, typename T33, typename T34, typename T35, typename T36, typename T37, typename T38, typename T39, typename T40, typename T41, typename T42, typename T43, typename T44>
+inline typename cbind_impl::matrix_return<T1>::type
+cbind(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19, const T20& t20, const T21& t21, const T22& t22, const T23& t23, const T24& t24, const T25& t25, const T26& t26, const T27& t27, const T28& t28, const T29& t29, const T30& t30, const T31& t31, const T32& t32, const T33& t33, const T34& t34, const T35& t35, const T36& t36, const T37& t37, const T38& t38, const T39& t39, const T40& t40, const T41& t41, const T42& t42, const T43& t43, const T44& t44) {
+	return (MakeBindable(t1), MakeBindable(t2), MakeBindable(t3), MakeBindable(t4), MakeBindable(t5), MakeBindable(t6), MakeBindable(t7), MakeBindable(t8), MakeBindable(t9), MakeBindable(t10), MakeBindable(t11), MakeBindable(t12), MakeBindable(t13), MakeBindable(t14), MakeBindable(t15), MakeBindable(t16), MakeBindable(t17), MakeBindable(t18), MakeBindable(t19), MakeBindable(t20), MakeBindable(t21), MakeBindable(t22), MakeBindable(t23), MakeBindable(t24), MakeBindable(t25), MakeBindable(t26), MakeBindable(t27), MakeBindable(t28), MakeBindable(t29), MakeBindable(t30), MakeBindable(t31), MakeBindable(t32), MakeBindable(t33), MakeBindable(t34), MakeBindable(t35), MakeBindable(t36), MakeBindable(t37), MakeBindable(t38), MakeBindable(t39), MakeBindable(t40), MakeBindable(t41), MakeBindable(t42), MakeBindable(t43), MakeBindable(t44));
+}
+
+// 45 
+template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19, typename T20, typename T21, typename T22, typename T23, typename T24, typename T25, typename T26, typename T27, typename T28, typename T29, typename T30, typename T31, typename T32, typename T33, typename T34, typename T35, typename T36, typename T37, typename T38, typename T39, typename T40, typename T41, typename T42, typename T43, typename T44, typename T45>
+inline typename cbind_impl::matrix_return<T1>::type
+cbind(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19, const T20& t20, const T21& t21, const T22& t22, const T23& t23, const T24& t24, const T25& t25, const T26& t26, const T27& t27, const T28& t28, const T29& t29, const T30& t30, const T31& t31, const T32& t32, const T33& t33, const T34& t34, const T35& t35, const T36& t36, const T37& t37, const T38& t38, const T39& t39, const T40& t40, const T41& t41, const T42& t42, const T43& t43, const T44& t44, const T45& t45) {
+	return (MakeBindable(t1), MakeBindable(t2), MakeBindable(t3), MakeBindable(t4), MakeBindable(t5), MakeBindable(t6), MakeBindable(t7), MakeBindable(t8), MakeBindable(t9), MakeBindable(t10), MakeBindable(t11), MakeBindable(t12), MakeBindable(t13), MakeBindable(t14), MakeBindable(t15), MakeBindable(t16), MakeBindable(t17), MakeBindable(t18), MakeBindable(t19), MakeBindable(t20), MakeBindable(t21), MakeBindable(t22), MakeBindable(t23), MakeBindable(t24), MakeBindable(t25), MakeBindable(t26), MakeBindable(t27), MakeBindable(t28), MakeBindable(t29), MakeBindable(t30), MakeBindable(t31), MakeBindable(t32), MakeBindable(t33), MakeBindable(t34), MakeBindable(t35), MakeBindable(t36), MakeBindable(t37), MakeBindable(t38), MakeBindable(t39), MakeBindable(t40), MakeBindable(t41), MakeBindable(t42), MakeBindable(t43), MakeBindable(t44), MakeBindable(t45));
+}
+
+template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19, typename T20, typename T21, typename T22, typename T23, typename T24, typename T25, typename T26, typename T27, typename T28, typename T29, typename T30, typename T31, typename T32, typename T33, typename T34, typename T35, typename T36, typename T37, typename T38, typename T39, typename T40, typename T41, typename T42, typename T43, typename T44, typename T45, typename T46>
+inline typename cbind_impl::matrix_return<T1>::type
+cbind(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19, const T20& t20, const T21& t21, const T22& t22, const T23& t23, const T24& t24, const T25& t25, const T26& t26, const T27& t27, const T28& t28, const T29& t29, const T30& t30, const T31& t31, const T32& t32, const T33& t33, const T34& t34, const T35& t35, const T36& t36, const T37& t37, const T38& t38, const T39& t39, const T40& t40, const T41& t41, const T42& t42, const T43& t43, const T44& t44, const T45& t45, const T46& t46) {
+	return (MakeBindable(t1), MakeBindable(t2), MakeBindable(t3), MakeBindable(t4), MakeBindable(t5), MakeBindable(t6), MakeBindable(t7), MakeBindable(t8), MakeBindable(t9), MakeBindable(t10), MakeBindable(t11), MakeBindable(t12), MakeBindable(t13), MakeBindable(t14), MakeBindable(t15), MakeBindable(t16), MakeBindable(t17), MakeBindable(t18), MakeBindable(t19), MakeBindable(t20), MakeBindable(t21), MakeBindable(t22), MakeBindable(t23), MakeBindable(t24), MakeBindable(t25), MakeBindable(t26), MakeBindable(t27), MakeBindable(t28), MakeBindable(t29), MakeBindable(t30), MakeBindable(t31), MakeBindable(t32), MakeBindable(t33), MakeBindable(t34), MakeBindable(t35), MakeBindable(t36), MakeBindable(t37), MakeBindable(t38), MakeBindable(t39), MakeBindable(t40), MakeBindable(t41), MakeBindable(t42), MakeBindable(t43), MakeBindable(t44), MakeBindable(t45), MakeBindable(t46));
+}
+
+template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19, typename T20, typename T21, typename T22, typename T23, typename T24, typename T25, typename T26, typename T27, typename T28, typename T29, typename T30, typename T31, typename T32, typename T33, typename T34, typename T35, typename T36, typename T37, typename T38, typename T39, typename T40, typename T41, typename T42, typename T43, typename T44, typename T45, typename T46, typename T47>
+inline typename cbind_impl::matrix_return<T1>::type
+cbind(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19, const T20& t20, const T21& t21, const T22& t22, const T23& t23, const T24& t24, const T25& t25, const T26& t26, const T27& t27, const T28& t28, const T29& t29, const T30& t30, const T31& t31, const T32& t32, const T33& t33, const T34& t34, const T35& t35, const T36& t36, const T37& t37, const T38& t38, const T39& t39, const T40& t40, const T41& t41, const T42& t42, const T43& t43, const T44& t44, const T45& t45, const T46& t46, const T47& t47) {
+	return (MakeBindable(t1), MakeBindable(t2), MakeBindable(t3), MakeBindable(t4), MakeBindable(t5), MakeBindable(t6), MakeBindable(t7), MakeBindable(t8), MakeBindable(t9), MakeBindable(t10), MakeBindable(t11), MakeBindable(t12), MakeBindable(t13), MakeBindable(t14), MakeBindable(t15), MakeBindable(t16), MakeBindable(t17), MakeBindable(t18), MakeBindable(t19), MakeBindable(t20), MakeBindable(t21), MakeBindable(t22), MakeBindable(t23), MakeBindable(t24), MakeBindable(t25), MakeBindable(t26), MakeBindable(t27), MakeBindable(t28), MakeBindable(t29), MakeBindable(t30), MakeBindable(t31), MakeBindable(t32), MakeBindable(t33), MakeBindable(t34), MakeBindable(t35), MakeBindable(t36), MakeBindable(t37), MakeBindable(t38), MakeBindable(t39), MakeBindable(t40), MakeBindable(t41), MakeBindable(t42), MakeBindable(t43), MakeBindable(t44), MakeBindable(t45), MakeBindable(t46), MakeBindable(t47));
+}
+
+template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19, typename T20, typename T21, typename T22, typename T23, typename T24, typename T25, typename T26, typename T27, typename T28, typename T29, typename T30, typename T31, typename T32, typename T33, typename T34, typename T35, typename T36, typename T37, typename T38, typename T39, typename T40, typename T41, typename T42, typename T43, typename T44, typename T45, typename T46, typename T47, typename T48>
+inline typename cbind_impl::matrix_return<T1>::type
+cbind(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19, const T20& t20, const T21& t21, const T22& t22, const T23& t23, const T24& t24, const T25& t25, const T26& t26, const T27& t27, const T28& t28, const T29& t29, const T30& t30, const T31& t31, const T32& t32, const T33& t33, const T34& t34, const T35& t35, const T36& t36, const T37& t37, const T38& t38, const T39& t39, const T40& t40, const T41& t41, const T42& t42, const T43& t43, const T44& t44, const T45& t45, const T46& t46, const T47& t47, const T48& t48) {
+	return (MakeBindable(t1), MakeBindable(t2), MakeBindable(t3), MakeBindable(t4), MakeBindable(t5), MakeBindable(t6), MakeBindable(t7), MakeBindable(t8), MakeBindable(t9), MakeBindable(t10), MakeBindable(t11), MakeBindable(t12), MakeBindable(t13), MakeBindable(t14), MakeBindable(t15), MakeBindable(t16), MakeBindable(t17), MakeBindable(t18), MakeBindable(t19), MakeBindable(t20), MakeBindable(t21), MakeBindable(t22), MakeBindable(t23), MakeBindable(t24), MakeBindable(t25), MakeBindable(t26), MakeBindable(t27), MakeBindable(t28), MakeBindable(t29), MakeBindable(t30), MakeBindable(t31), MakeBindable(t32), MakeBindable(t33), MakeBindable(t34), MakeBindable(t35), MakeBindable(t36), MakeBindable(t37), MakeBindable(t38), MakeBindable(t39), MakeBindable(t40), MakeBindable(t41), MakeBindable(t42), MakeBindable(t43), MakeBindable(t44), MakeBindable(t45), MakeBindable(t46), MakeBindable(t47), MakeBindable(t48));
+}
+
+template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19, typename T20, typename T21, typename T22, typename T23, typename T24, typename T25, typename T26, typename T27, typename T28, typename T29, typename T30, typename T31, typename T32, typename T33, typename T34, typename T35, typename T36, typename T37, typename T38, typename T39, typename T40, typename T41, typename T42, typename T43, typename T44, typename T45, typename T46, typename T47, typename T48, typename T49>
+inline typename cbind_impl::matrix_return<T1>::type
+cbind(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19, const T20& t20, const T21& t21, const T22& t22, const T23& t23, const T24& t24, const T25& t25, const T26& t26, const T27& t27, const T28& t28, const T29& t29, const T30& t30, const T31& t31, const T32& t32, const T33& t33, const T34& t34, const T35& t35, const T36& t36, const T37& t37, const T38& t38, const T39& t39, const T40& t40, const T41& t41, const T42& t42, const T43& t43, const T44& t44, const T45& t45, const T46& t46, const T47& t47, const T48& t48, const T49& t49) {
+	return (MakeBindable(t1), MakeBindable(t2), MakeBindable(t3), MakeBindable(t4), MakeBindable(t5), MakeBindable(t6), MakeBindable(t7), MakeBindable(t8), MakeBindable(t9), MakeBindable(t10), MakeBindable(t11), MakeBindable(t12), MakeBindable(t13), MakeBindable(t14), MakeBindable(t15), MakeBindable(t16), MakeBindable(t17), MakeBindable(t18), MakeBindable(t19), MakeBindable(t20), MakeBindable(t21), MakeBindable(t22), MakeBindable(t23), MakeBindable(t24), MakeBindable(t25), MakeBindable(t26), MakeBindable(t27), MakeBindable(t28), MakeBindable(t29), MakeBindable(t30), MakeBindable(t31), MakeBindable(t32), MakeBindable(t33), MakeBindable(t34), MakeBindable(t35), MakeBindable(t36), MakeBindable(t37), MakeBindable(t38), MakeBindable(t39), MakeBindable(t40), MakeBindable(t41), MakeBindable(t42), MakeBindable(t43), MakeBindable(t44), MakeBindable(t45), MakeBindable(t46), MakeBindable(t47), MakeBindable(t48), MakeBindable(t49));
+}
+
+// 50
+template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19, typename T20, typename T21, typename T22, typename T23, typename T24, typename T25, typename T26, typename T27, typename T28, typename T29, typename T30, typename T31, typename T32, typename T33, typename T34, typename T35, typename T36, typename T37, typename T38, typename T39, typename T40, typename T41, typename T42, typename T43, typename T44, typename T45, typename T46, typename T47, typename T48, typename T49, typename T50>
+inline typename cbind_impl::matrix_return<T1>::type
+cbind(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19, const T20& t20, const T21& t21, const T22& t22, const T23& t23, const T24& t24, const T25& t25, const T26& t26, const T27& t27, const T28& t28, const T29& t29, const T30& t30, const T31& t31, const T32& t32, const T33& t33, const T34& t34, const T35& t35, const T36& t36, const T37& t37, const T38& t38, const T39& t39, const T40& t40, const T41& t41, const T42& t42, const T43& t43, const T44& t44, const T45& t45, const T46& t46, const T47& t47, const T48& t48, const T49& t49, const T50& t50) {
+	return (MakeBindable(t1), MakeBindable(t2), MakeBindable(t3), MakeBindable(t4), MakeBindable(t5), MakeBindable(t6), MakeBindable(t7), MakeBindable(t8), MakeBindable(t9), MakeBindable(t10), MakeBindable(t11), MakeBindable(t12), MakeBindable(t13), MakeBindable(t14), MakeBindable(t15), MakeBindable(t16), MakeBindable(t17), MakeBindable(t18), MakeBindable(t19), MakeBindable(t20), MakeBindable(t21), MakeBindable(t22), MakeBindable(t23), MakeBindable(t24), MakeBindable(t25), MakeBindable(t26), MakeBindable(t27), MakeBindable(t28), MakeBindable(t29), MakeBindable(t30), MakeBindable(t31), MakeBindable(t32), MakeBindable(t33), MakeBindable(t34), MakeBindable(t35), MakeBindable(t36), MakeBindable(t37), MakeBindable(t38), MakeBindable(t39), MakeBindable(t40), MakeBindable(t41), MakeBindable(t42), MakeBindable(t43), MakeBindable(t44), MakeBindable(t45), MakeBindable(t46), MakeBindable(t47), MakeBindable(t48), MakeBindable(t49), MakeBindable(t50));
+}
+
+// end cbind overloads
+
+#undef MakeBindable
+
+} // sugar
+
+namespace {
+using sugar::cbind;
+}
+
+} // Rcpp
+
+#endif // Rcpp__sugar__cbind_h
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/sample.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/sample.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/sample.h	(revision 2477)
@@ -0,0 +1,476 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+//
+// sample.h: Rcpp R/C++ interface class library -- sample
+//
+// Copyright (C) 2016 Nathan Russell
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+// The sample() in RcppArmadillo came first, but is opt-in. In case someone did
+// in fact load it, we need to skip the declarations here to avoid a conflict
+#ifndef RCPPARMADILLO__EXTENSIONS__SAMPLE_H
+
+#ifndef Rcpp__sugar__sample_h
+#define Rcpp__sugar__sample_h
+
+#include <vector>
+
+//  In order to mirror the behavior of `base::sample`
+//  as closely as possible, this file contains adaptations
+//  of several functions in R/src/main/random.c:
+//
+//      * do_sample - general logic as well as the empirical sampling routine.
+//
+//      * FixupProb - an auxiliary function.
+//
+//      * walker_ProbSampleReplace, ProbSampleReplace, and ProbSampleNoReplace -
+//        algorithms for sampling according to a supplied probability vector.
+//
+//  For each of the sampling routines, two signatures are provided:
+//
+//      * A version that returns an integer vector, which can be used to
+//        generate 0-based indices (one_based = false) or 1-based indices
+//        (one_based = true) -- where the latter corresponds to the
+//        bahavior of `base::sample.int`.
+//
+//      * A version which takes an input Vector<> (rather than an integer 'n'),
+//        and samples its elements -- this corresponds to `base::sample`.
+
+namespace Rcpp {
+namespace sugar {
+
+// Adapted from `FixupProb`
+// Normalizes a probability vector 'p' S.T. sum(p) == 1
+inline void Normalize(Vector<REALSXP>& p, int require_k, bool replace)
+{
+    double sum = 0.0;
+    int npos = 0, i = 0, n = p.size();
+
+    for ( ; i < n; i++) {
+        if (!R_FINITE(p[i]) || (p[i] < 0)) {
+            stop("Probabilities must be finite and non-negative!");
+        }
+        npos += (p[i] > 0.0);
+        sum += p[i];
+    }
+
+    if ((!npos) || (!replace && (require_k > npos))) {
+        stop("Too few positive probabilities!");
+    }
+
+    for (i = 0; i < n; i++) {
+        p[i] /= sum;
+    }
+}
+
+// Adapted from `ProbSampleReplace`
+// Index version
+inline Vector<INTSXP> SampleReplace(Vector<REALSXP>& p, int n, int k, bool one_based)
+{
+    Vector<INTSXP> perm = no_init(n), ans = no_init(k);
+    double rU = 0.0;
+    int i = 0, j = 0, nm1 = n - 1;
+
+    int adj = one_based ? 0 : 1;
+
+    for ( ; i < n; i++) {
+        perm[i] = i + 1;
+    }
+
+    Rf_revsort(p.begin(), perm.begin(), n);
+
+    for (i = 1; i < n; i++) {
+        p[i] += p[i - 1];
+    }
+
+    for (i = 0; i < k; i++) {
+        rU = unif_rand();
+        for (j = 0; j < nm1; j++) {
+            if (rU <= p[j]) {
+                break;
+            }
+        }
+        ans[i] = perm[j] - adj;
+    }
+
+    return ans;
+}
+
+// Element version
+template <int RTYPE>
+inline Vector<RTYPE> SampleReplace(Vector<REALSXP>& p, int k, const Vector<RTYPE>& ref)
+{
+    int n = ref.size();
+
+    Vector<INTSXP> perm = no_init(n);
+    Vector<RTYPE> ans = no_init(k);
+
+    double rU = 0.0;
+    int i = 0, j = 0, nm1 = n - 1;
+
+    for ( ; i < n; i++) {
+        perm[i] = i + 1;
+    }
+
+    Rf_revsort(p.begin(), perm.begin(), n);
+
+    for (i = 1; i < n; i++) {
+        p[i] += p[i - 1];
+    }
+
+    for (i = 0; i < k; i++) {
+        rU = unif_rand();
+        for (j = 0; j < nm1; j++) {
+            if (rU <= p[j]) {
+                break;
+            }
+        }
+        ans[i] = ref[perm[j] - 1];
+    }
+
+    return ans;
+}
+
+// Adapted from `walker_ProbSampleReplace`
+// Index version
+inline Vector<INTSXP> WalkerSample(const Vector<REALSXP>& p, int n, int nans, bool one_based)
+{
+    Vector<INTSXP> a = no_init(n), ans = no_init(nans);
+    int i, j, k;
+    std::vector<double> q(n);
+    double rU;
+
+    std::vector<int> HL(n);
+    std::vector<int>::iterator H, L;
+
+    int adj = one_based ? 1 : 0;
+
+    H = HL.begin() - 1; L = HL.begin() + n;
+    for (i = 0; i < n; i++) {
+        q[i] = p[i] * n;
+        if (q[i] < 1.0) {
+            *++H = i;
+        } else {
+            *--L = i;
+        }
+    }
+
+    if (H >= HL.begin() && L < HL.begin() + n) {
+        for (k = 0; k < n - 1; k++) {
+            i = HL[k];
+            j = *L;
+            a[i] = j;
+            q[j] += q[i] - 1;
+
+            L += (q[j] < 1.0);
+
+            if (L >= HL.begin() + n) {
+                break;
+            }
+        }
+    }
+
+    for (i = 0; i < n; i++) {
+        q[i] += i;
+    }
+
+    for (i = 0; i < nans; i++) {
+        rU = unif_rand() * n;
+        k = static_cast<int>(rU);
+        ans[i] = (rU < q[k]) ? k + adj : a[k] + adj;
+    }
+
+    return ans;
+}
+
+// Element version
+template <int RTYPE>
+inline Vector<RTYPE> WalkerSample(const Vector<REALSXP>& p, int nans, const Vector<RTYPE>& ref)
+{
+    int n = ref.size();
+
+    Vector<INTSXP> a = no_init(n);
+    Vector<RTYPE> ans = no_init(nans);
+
+    int i, j, k;
+    std::vector<double> q(n);
+    double rU;
+
+    std::vector<int> HL(n);
+    std::vector<int>::iterator H, L;
+
+    H = HL.begin() - 1; L = HL.begin() + n;
+    for (i = 0; i < n; i++) {
+        q[i] = p[i] * n;
+        if (q[i] < 1.0) {
+            *++H = i;
+        } else {
+            *--L = i;
+        }
+    }
+
+    if (H >= HL.begin() && L < HL.begin() + n) {
+        for (k = 0; k < n - 1; k++) {
+            i = HL[k];
+            j = *L;
+            a[i] = j;
+            q[j] += q[i] - 1;
+
+            L += (q[j] < 1.0);
+
+            if (L >= HL.begin() + n) {
+                break;
+            }
+        }
+    }
+
+    for (i = 0; i < n; i++) {
+        q[i] += i;
+    }
+
+    for (i = 0; i < nans; i++) {
+        rU = unif_rand() * n;
+        k = static_cast<int>(rU);
+        ans[i] = (rU < q[k]) ? ref[k] : ref[a[k]];
+    }
+
+    return ans;
+}
+
+// Adapted from `ProbSampleNoReplace`
+// Index version
+inline Vector<INTSXP> SampleNoReplace(Vector<REALSXP>& p, int n, int nans, bool one_based)
+{
+    Vector<INTSXP> perm = no_init(n), ans = no_init(nans);
+    double rT, mass, totalmass;
+    int i, j, k, n1;
+
+    int adj = one_based ? 0 : 1;
+
+    for (i = 0; i < n; i++) {
+        perm[i] = i + 1;
+    }
+
+    Rf_revsort(p.begin(), perm.begin(), n);
+
+    totalmass = 1.0;
+    for (i = 0, n1 = n - 1; i < nans; i++, n1--) {
+        rT = totalmass * unif_rand();
+        mass = 0.0;
+
+        for (j = 0; j < n1; j++) {
+            mass += p[j];
+            if (rT <= mass) {
+                break;
+            }
+        }
+
+        ans[i] = perm[j] - adj;
+        totalmass -= p[j];
+
+        for (k = j; k < n1; k++) {
+            p[k] = p[k + 1];
+            perm[k] = perm[k + 1];
+        }
+    }
+
+    return ans;
+}
+
+// Element version
+template <int RTYPE>
+inline Vector<RTYPE> SampleNoReplace(Vector<REALSXP>& p, int nans, const Vector<RTYPE>& ref)
+{
+    int n = ref.size();
+
+    Vector<INTSXP> perm = no_init(n);
+    Vector<RTYPE> ans = no_init(nans);
+
+    double rT, mass, totalmass;
+    int i, j, k, n1;
+
+    for (i = 0; i < n; i++) {
+        perm[i] = i + 1;
+    }
+
+    Rf_revsort(p.begin(), perm.begin(), n);
+
+    totalmass = 1.0;
+    for (i = 0, n1 = n - 1; i < nans; i++, n1--) {
+        rT = totalmass * unif_rand();
+        mass = 0.0;
+
+        for (j = 0; j < n1; j++) {
+            mass += p[j];
+            if (rT <= mass) {
+                break;
+            }
+        }
+
+        ans[i] = ref[perm[j] - 1];
+        totalmass -= p[j];
+
+        for (k = j; k < n1; k++) {
+            p[k] = p[k + 1];
+            perm[k] = perm[k + 1];
+        }
+    }
+
+    return ans;
+}
+
+// Adapted from segment of `do_sample`
+// Index version
+inline Vector<INTSXP> EmpiricalSample(int n, int size, bool replace, bool one_based)
+{
+    Vector<INTSXP> ans = no_init(size);
+    Vector<INTSXP>::iterator ians = ans.begin(), eans = ans.end();
+
+    int adj = one_based ? 1 : 0;
+
+    if (replace || size < 2) {
+        for ( ; ians != eans; ++ians) {
+            *ians = static_cast<int>(n * unif_rand() + adj);
+        }
+        return ans;
+    }
+
+    int* x = reinterpret_cast<int*>(R_alloc(n, sizeof(int)));
+    for (int i = 0; i < n; i++) {
+        x[i] = i;
+    }
+
+    for ( ; ians != eans; ++ians) {
+        int j = static_cast<int>(n * unif_rand());
+        *ians = x[j] + adj;
+        x[j] = x[--n];
+    }
+
+    return ans;
+}
+
+// Element version
+template <int RTYPE>
+inline Vector<RTYPE> EmpiricalSample(int size, bool replace, const Vector<RTYPE>& ref)
+{
+    int n = ref.size();
+
+    Vector<RTYPE> ans = no_init(size);
+    typename Vector<RTYPE>::iterator ians = ans.begin(), eans = ans.end();
+
+    if (replace || size < 2) {
+        for ( ; ians != eans; ++ians) {
+            *ians = ref[static_cast<int>(n * unif_rand())];
+        }
+        return ans;
+    }
+
+    int* x = reinterpret_cast<int*>(R_alloc(n, sizeof(int)));
+    for (int i = 0; i < n; i++) {
+        x[i] = i;
+    }
+
+    for ( ; ians != eans; ++ians) {
+        int j = static_cast<int>(n * unif_rand());
+        *ians = ref[x[j]];
+        x[j] = x[--n];
+    }
+
+    return ans;
+}
+
+typedef Nullable< Vector<REALSXP> > probs_t;
+
+} // sugar
+
+// Adapted from `do_sample`
+inline Vector<INTSXP>
+sample(int n, int size, bool replace = false, sugar::probs_t probs = R_NilValue, bool one_based = true)
+{
+    if (probs.isNotNull()) {
+        Vector<REALSXP> p = clone(probs.get());
+        if (static_cast<int>(p.size()) != n) {
+            stop("probs.size() != n!");
+        }
+
+        sugar::Normalize(p, size, replace);
+
+        if (replace) {
+            int i = 0, nc = 0;
+            for ( ; i < n; i++) {
+                nc += (n * p[i] > 0.1);
+            }
+
+            return nc > 200 ? sugar::WalkerSample(p, n, size, one_based) :
+                              sugar::SampleReplace(p, n, size, one_based);
+        }
+
+        if (size > n) {
+            stop("Sample size must be <= n when not using replacement!");
+        }
+
+        return sugar::SampleNoReplace(p, n, size, one_based);
+    }
+
+    if (!replace && size > n) {
+        stop("Sample size must be <= n when not using replacement!");
+    }
+
+    return sugar::EmpiricalSample(n, size, replace, one_based);
+}
+
+template <int RTYPE>
+inline Vector<RTYPE>
+sample(const Vector<RTYPE>& x, int size, bool replace = false, sugar::probs_t probs = R_NilValue)
+{
+    int n = x.size();
+
+    if (probs.isNotNull()) {
+        Vector<REALSXP> p = clone(probs.get());
+        if (static_cast<int>(p.size()) != n) {
+            stop("probs.size() != n!");
+        }
+
+        sugar::Normalize(p, size, replace);
+
+        if (replace) {
+            int i = 0, nc = 0;
+            for ( ; i < n; i++) {
+                nc += (n * p[i] > 0.1);
+            }
+
+            return nc > 200 ? sugar::WalkerSample(p, size, x) :
+                              sugar::SampleReplace(p, size, x);
+        }
+
+        if (size > n) {
+            stop("Sample size must be <= n when not using replacement!");
+        }
+
+        return sugar::SampleNoReplace(p, size, x);
+    }
+
+    if (!replace && size > n) {
+        stop("Sample size must be <= n when not using replacement!");
+    }
+
+    return sugar::EmpiricalSample(size, replace, x);
+}
+
+} // Rcpp
+
+#endif // Rcpp__sugar__sample_h
+#endif // RCPPARMADILLO__EXTENSIONS__SAMPLE_H
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/rep_len.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/rep_len.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/rep_len.h	(revision 2477)
@@ -0,0 +1,57 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// rep_len.h: Rcpp R/C++ interface class library -- rep_len
+//
+// Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__rep_len_h
+#define Rcpp__sugar__rep_len_h
+
+namespace Rcpp{
+namespace sugar{
+
+template <int RTYPE, bool NA, typename T>
+class Rep_len : public Rcpp::VectorBase< RTYPE ,NA, Rep_len<RTYPE,NA,T> > {
+public:
+	typedef typename Rcpp::VectorBase<RTYPE,NA,T> VEC_TYPE ;
+	typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
+
+        Rep_len( const VEC_TYPE& object_, R_xlen_t len_ ) :
+		object(object_), len(len_), n(object_.size()){}
+
+        inline STORAGE operator[]( R_xlen_t i ) const {
+		return object[ i % n ] ;
+	}
+        inline R_xlen_t size() const { return len ; }
+
+private:
+	const VEC_TYPE& object ;
+        R_xlen_t len, n ;
+} ;
+
+} // sugar
+
+template <int RTYPE, bool NA, typename T>
+inline sugar::Rep_len<RTYPE,NA,T> rep_len( const VectorBase<RTYPE,NA,T>& t, R_xlen_t len ){
+	return sugar::Rep_len<RTYPE,NA,T>( t, len ) ;
+}
+
+
+} // Rcpp
+#endif
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/setdiff.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/setdiff.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/functions/setdiff.h	(revision 2477)
@@ -0,0 +1,185 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// setdiff.h: Rcpp R/C++ interface class library -- setdiff
+//
+// Copyright (C) 2012 - 2014  Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__setdiff_h
+#define Rcpp__sugar__setdiff_h
+
+namespace Rcpp{
+namespace sugar{
+
+    template <typename SET>
+    class RemoveFromSet {
+    public:
+        RemoveFromSet( SET& set_) : set(set_){}
+
+        template <typename T>
+        void operator()(T value){
+            set.erase( value );
+        }
+
+    private:
+        SET& set ;
+    } ;
+
+    template <int RTYPE, bool LHS_NA, typename LHS_T, bool RHS_NA, typename RHS_T>
+    class SetDiff {
+    public:
+        typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
+
+        SetDiff( const LHS_T& lhs, const RHS_T& rhs) :
+            lhs_set( get_const_begin(lhs), get_const_end(lhs) ),
+            rhs_set( get_const_begin(rhs), get_const_end(rhs) )
+        {
+
+            std::for_each( rhs_set.begin(), rhs_set.end(), RemoveFromSet<SET>(lhs_set) ) ;
+        }
+
+        Vector<RTYPE> get() const {
+            R_xlen_t n = lhs_set.size() ;
+            Vector<RTYPE> out = no_init(n) ;
+            std::copy( lhs_set.begin(), lhs_set.end(), out.begin() ) ;
+            return out ;
+        }
+
+    private:
+        typedef RCPP_UNORDERED_SET<STORAGE> SET ;
+        typedef typename SET::const_iterator ITERATOR ;
+        SET lhs_set ;
+        SET rhs_set ;
+
+    } ;
+
+    template <int RTYPE, bool LHS_NA, typename LHS_T, bool RHS_NA, typename RHS_T>
+    class SetEqual {
+    public:
+        typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
+
+        SetEqual( const LHS_T& lhs, const RHS_T& rhs) :
+            lhs_set( get_const_begin(lhs), get_const_end(lhs) ),
+            rhs_set( get_const_begin(rhs), get_const_end(rhs) )
+        {
+        }
+
+        bool get() const {
+            if( lhs_set.size() != rhs_set.size() ) return false ;
+
+            ITERATOR it = lhs_set.begin(), end = lhs_set.end(), rhs_end = rhs_set.end() ;
+            for( ; it != end; ){
+                if( rhs_set.find(*it++) == rhs_end ) return false ;
+            }
+            return true ;
+        }
+
+    private:
+        typedef RCPP_UNORDERED_SET<STORAGE> SET ;
+        typedef typename SET::const_iterator ITERATOR ;
+        SET lhs_set ;
+        SET rhs_set ;
+
+    } ;
+
+    template <int RTYPE, bool LHS_NA, typename LHS_T, bool RHS_NA, typename RHS_T>
+    class Intersect {
+    public:
+        typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
+
+        Intersect( const LHS_T& lhs, const RHS_T& rhs) :
+            intersect()
+        {
+
+            SET lhs_set( get_const_begin(lhs), get_const_end(lhs) ) ;
+            SET rhs_set( get_const_begin(rhs), get_const_end(rhs) ) ;
+
+            ITERATOR end = lhs_set.end() ;
+            ITERATOR rhs_end = rhs_set.end() ;
+            for( ITERATOR it=lhs_set.begin(); it != end; it++){
+                if( rhs_set.find(*it) != rhs_end ) intersect.insert(*it) ;
+            }
+        }
+
+        Vector<RTYPE> get() const {
+            R_xlen_t n = intersect.size() ;
+            Vector<RTYPE> out = no_init(n) ;
+            std::copy( intersect.begin(), intersect.end(), out.begin() ) ;
+            return out ;
+        }
+
+    private:
+        typedef RCPP_UNORDERED_SET<STORAGE> SET ;
+        typedef typename SET::const_iterator ITERATOR ;
+        SET intersect ;
+
+    } ;
+
+    template <int RTYPE, bool LHS_NA, typename LHS_T, bool RHS_NA, typename RHS_T>
+    class Union {
+    public:
+        typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
+
+        Union( const LHS_T& lhs, const RHS_T& rhs) :
+            result( get_const_begin(lhs), get_const_end(lhs) )
+        {
+            result.insert( get_const_begin(rhs), get_const_end(rhs) ) ;
+        }
+
+        Vector<RTYPE> get() const {
+            R_xlen_t n = result.size() ;
+            Vector<RTYPE> out = no_init(n) ;
+            std::copy( result.begin(), result.end(), out.begin() ) ;
+            return out ;
+        }
+
+    private:
+        typedef RCPP_UNORDERED_SET<STORAGE> SET ;
+        typedef typename SET::const_iterator ITERATOR ;
+        SET result ;
+
+    } ;
+
+
+} // sugar
+
+template <int RTYPE, bool LHS_NA, typename LHS_T, bool RHS_NA, typename RHS_T>
+inline Vector<RTYPE> setdiff( const VectorBase<RTYPE,LHS_NA,LHS_T>& lhs, const VectorBase<RTYPE,RHS_NA,RHS_T>& rhs ){
+    return sugar::SetDiff<RTYPE,LHS_NA,LHS_T,RHS_NA,RHS_T>( lhs.get_ref(), rhs.get_ref() ).get() ;
+}
+
+template <int RTYPE, bool LHS_NA, typename LHS_T, bool RHS_NA, typename RHS_T>
+inline bool setequal( const VectorBase<RTYPE,LHS_NA,LHS_T>& lhs, const VectorBase<RTYPE,RHS_NA,RHS_T>& rhs ){
+    return sugar::SetEqual<RTYPE,LHS_NA,LHS_T,RHS_NA,RHS_T>( lhs.get_ref(), rhs.get_ref() ).get() ;
+}
+
+template <int RTYPE, bool LHS_NA, typename LHS_T, bool RHS_NA, typename RHS_T>
+inline Vector<RTYPE> intersect( const VectorBase<RTYPE,LHS_NA,LHS_T>& lhs, const VectorBase<RTYPE,RHS_NA,RHS_T>& rhs ){
+    return sugar::Intersect<RTYPE,LHS_NA,LHS_T,RHS_NA,RHS_T>( lhs.get_ref(), rhs.get_ref() ).get() ;
+}
+
+// we cannot use "union" because it is a keyword
+template <int RTYPE, bool LHS_NA, typename LHS_T, bool RHS_NA, typename RHS_T>
+inline Vector<RTYPE> union_( const VectorBase<RTYPE,LHS_NA,LHS_T>& lhs, const VectorBase<RTYPE,RHS_NA,RHS_T>& rhs ){
+    return sugar::Union<RTYPE,LHS_NA,LHS_T,RHS_NA,RHS_T>( lhs.get_ref(), rhs.get_ref() ).get() ;
+}
+
+
+
+} // Rcpp
+#endif
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/block/SugarBlock_1.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/block/SugarBlock_1.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/block/SugarBlock_1.h	(revision 2477)
@@ -0,0 +1,62 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+//
+// SugarBlock.h: Rcpp R/C++ interface class library -- sugar functions
+//
+// Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef RCPP_SUGAR_BLOCK_1_H
+#define RCPP_SUGAR_BLOCK_1_H
+
+namespace Rcpp{
+namespace sugar{
+
+template <bool NA, typename RESULT_TYPE, typename U1, typename T1>
+class SugarBlock_1 : public Rcpp::VectorBase< Rcpp::traits::r_sexptype_traits<RESULT_TYPE>::rtype , NA, SugarBlock_1<NA,RESULT_TYPE,U1,T1> > {
+public:
+    typedef RESULT_TYPE (*FunPtr)(U1) ;
+    SugarBlock_1( FunPtr ptr_, const T1 & vec_) : ptr(ptr_), vec(vec_){}
+
+    inline RESULT_TYPE operator[]( R_xlen_t i) const {
+        return ptr( vec[i] ) ;
+    }
+    inline R_xlen_t size() const { return vec.size() ; }
+
+private:
+    FunPtr ptr ;
+    const T1& vec ;
+};
+
+} // sugar
+} // Rcpp
+
+#define SB1_T VectorBase<REALSXP,NA,T>
+
+#define SUGAR_BLOCK_1(__NAME__,__SYMBOL__)                                                \
+    namespace Rcpp{                                                                       \
+    template <bool NA, typename T>                                                        \
+    inline sugar::SugarBlock_1<NA,double,double,SB1_T >                                   \
+    __NAME__(                                                                             \
+        const SB1_T& t                                                                    \
+    ){                                                                                    \
+        return sugar::SugarBlock_1<NA,double,double,SB1_T >(                              \
+                __SYMBOL__ , t                                                            \
+        ) ;                                                                               \
+    }                                                                                     \
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/block/SugarBlock_2.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/block/SugarBlock_2.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/block/SugarBlock_2.h	(revision 2477)
@@ -0,0 +1,164 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+//
+// SugarBlock.h: Rcpp R/C++ interface class library -- sugar functions
+//
+// Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef RCPP_SUGAR_BLOCK_2_H
+#define RCPP_SUGAR_BLOCK_2_H
+
+namespace Rcpp{
+namespace sugar{
+
+template <bool NA, typename RESULT_TYPE, typename U1, typename T1, typename U2, typename T2>
+class SugarBlock_2 : public Rcpp::VectorBase< Rcpp::traits::r_sexptype_traits<RESULT_TYPE>::rtype , NA, SugarBlock_2<NA,RESULT_TYPE,U1,T1,U2,T2> > {
+public:
+    typedef RESULT_TYPE (*FunPtr)(U1,U2) ;
+    SugarBlock_2( FunPtr ptr_, const T1 & x_, const T2& y_ ) :
+        ptr(ptr_), x(x_), y(y_){
+        // TODO: check that x and y have same size
+    }
+
+    inline RESULT_TYPE operator[]( R_xlen_t i) const {
+        return ptr( x[i], y[i] ) ;
+    }
+    inline R_xlen_t size() const { return x.size() ; }
+
+private:
+    FunPtr ptr ;
+    const T1& x ;
+    const T2& y ;
+};
+
+
+template <bool NA, typename RESULT_TYPE, typename U1, typename T1, typename U2>
+class SugarBlock_2__VP : public Rcpp::VectorBase< Rcpp::traits::r_sexptype_traits<RESULT_TYPE>::rtype , NA, SugarBlock_2__VP<NA,RESULT_TYPE,U1,T1,U2> > {
+public:
+    typedef RESULT_TYPE (*FunPtr)(U1,U2) ;
+    SugarBlock_2__VP( FunPtr ptr_, const T1 & x_, U2 u2 ) :
+        ptr(ptr_), x(x_), y(u2){}
+
+    inline RESULT_TYPE operator[]( R_xlen_t i) const {
+        return ptr( x[i], y ) ;
+    }
+    inline R_xlen_t size() const { return x.size() ; }
+
+private:
+    FunPtr ptr ;
+    const T1& x ;
+    U2 y ;
+};
+
+template <bool NA, typename RESULT_TYPE, typename U1, typename U2, typename T2>
+class SugarBlock_2__PV : public Rcpp::VectorBase< Rcpp::traits::r_sexptype_traits<RESULT_TYPE>::rtype , NA, SugarBlock_2__PV<NA,RESULT_TYPE,U1,U2,T2> > {
+public:
+    typedef RESULT_TYPE (*FunPtr)(U1,U2) ;
+    SugarBlock_2__PV( FunPtr ptr_, U1 u1, const T2& y_ ) :
+        ptr(ptr_), x(u1), y(y_){}
+
+    inline RESULT_TYPE operator[]( R_xlen_t i) const {
+        return ptr( x, y[i] ) ;
+    }
+    inline R_xlen_t size() const { return y.size() ; }
+
+private:
+    FunPtr ptr ;
+    U1 x ;
+    const T2& y ;
+};
+
+
+} // sugar
+} // Rcpp
+
+#define SB2_LHT VectorBase<REALSXP,LHS_NA,LHS_T>
+#define SB2_RHT VectorBase<REALSXP,RHS_NA,RHS_T>
+
+#define SUGAR_BLOCK_2(__NAME__,__SYMBOL__)                                                      \
+    namespace Rcpp{                                                     			\
+        template <bool LHS_NA, typename LHS_T, bool RHS_NA, typename RHS_T >                    \
+        inline sugar::SugarBlock_2< (LHS_NA||RHS_NA) ,double,double,SB2_LHT,double,SB2_RHT>     \
+        __NAME__(                                                                               \
+                const SB2_LHT& lhs,                                                             \
+                const SB2_RHT& rhs                                                              \
+        ){                                                                                      \
+                return sugar::SugarBlock_2< (LHS_NA||RHS_NA) ,double,double,SB2_LHT,double,SB2_RHT >(\
+                        __SYMBOL__ , lhs, rhs                                                   \
+                ) ;                                                                             \
+        }                                                                                       \
+        template <bool LHS_NA, typename LHS_T>                                                  \
+        inline sugar::SugarBlock_2__VP<LHS_NA,double,double,SB2_LHT,double>                     \
+        __NAME__(                                                                               \
+                const SB2_LHT& lhs,                                                             \
+                double rhs                                                                      \
+        ){                                                                                      \
+                return sugar::SugarBlock_2__VP<LHS_NA,double,double,SB2_LHT,double>(            \
+                        __SYMBOL__ , lhs, rhs                                                   \
+                ) ;                                                                             \
+        }                                                                                       \
+        template <bool RHS_NA, typename RHS_T>                                                  \
+        inline sugar::SugarBlock_2__PV<RHS_NA,double,double,double,SB2_RHT>                     \
+        __NAME__(                                                                               \
+                double lhs,                                                                     \
+                const SB2_RHT& rhs                                                              \
+        ){                                                                                      \
+                return sugar::SugarBlock_2__PV<RHS_NA,double,double,double,SB2_RHT >(           \
+                        __SYMBOL__ , lhs, rhs                                                   \
+                ) ;                                                                             \
+        }                                                                                       \
+        }
+
+
+#define SUGAR_BLOCK_2_NA(__NAME__,__SYMBOL__,__NA__)                                            \
+        namespace Rcpp{                                                                         \
+        template <bool LHS_NA, typename LHS_T, bool RHS_NA, typename RHS_T >                    \
+        inline sugar::SugarBlock_2< __NA__ ,double,double,SB2_LHT,double,SB2_RHT>               \
+        __NAME__(                                                                               \
+                const SB2_LHT& lhs,                                                             \
+                const SB2_RHT& rhs                                                              \
+        ){                                                                                      \
+                return sugar::SugarBlock_2< __NA__ ,double,double,SB2_LHT,double,SB2_RHT        \
+                >(                                                                              \
+                        __SYMBOL__ , lhs, rhs                                                   \
+                ) ;                                                                             \
+        }                                                                                       \
+        template <bool LHS_NA, typename LHS_T>                                                  \
+        inline sugar::SugarBlock_2__VP<__NA__,double,double,SB2_LHT,double>                     \
+        __NAME__(                                                                               \
+                const SB2_LHT& lhs,                                                             \
+                double rhs                                                                      \
+        ){                                                                                      \
+                return sugar::SugarBlock_2__VP<__NA__,double,double,SB2_LHT,double>(            \
+                        __SYMBOL__ , lhs, rhs                                                   \
+                ) ;                                                                             \
+        }                                                                                       \
+        template <bool RHS_NA, typename RHS_T>                                                  \
+        inline sugar::SugarBlock_2__PV<__NA__,double,double,double,SB2_RHT>                     \
+        __NAME__(                                                                               \
+                double lhs,                                                                     \
+                const SB2_RHT& rhs                                                              \
+        ){                                                                                      \
+                return sugar::SugarBlock_2__PV<__NA__,double,double,double,SB2_RHT              \
+                >(                                                                              \
+                        __SYMBOL__ , lhs, rhs                                                   \
+                ) ;                                                                             \
+        }                                                                                       \
+        }
+
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/block/SugarBlock_3.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/block/SugarBlock_3.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/block/SugarBlock_3.h	(revision 2477)
@@ -0,0 +1,126 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+//
+// SugarBlock.h: Rcpp R/C++ interface class library -- sugar functions
+//
+// Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef RCPP_SUGAR_BLOCK_3_H
+#define RCPP_SUGAR_BLOCK_3_H
+
+namespace Rcpp{
+namespace sugar{
+
+template <
+    bool NA, typename RESULT_TYPE,
+    typename U1, typename T1,
+    typename U2, typename T2,
+    typename U3, typename T3
+>
+class SugarBlock_3_VVV : public Rcpp::VectorBase<
+    Rcpp::traits::r_sexptype_traits<RESULT_TYPE>::rtype ,
+    NA,
+    SugarBlock_3_VVV<NA,RESULT_TYPE,U1,T1,U2,T2,U3,T3> > {
+public:
+    typedef RESULT_TYPE (*FunPtr)(U1,U2,U3) ;
+    SugarBlock_3_VVV( FunPtr ptr_, const T1 & x_, const T2& y_, const T3& z_ ) :
+        ptr(ptr_), x(x_), y(y_), z(z_) {
+        // TODO: size checks, recycling, etc ...
+    }
+    inline RESULT_TYPE operator[]( R_xlen_t i) const {
+        return ptr( x[i], y[i], z[i] ) ;
+    }
+    inline R_xlen_t size() const { return x.size() ; }
+
+private:
+    FunPtr ptr ;
+    const T1& x ;
+    const T2& y ;
+    const T2& z ;
+};
+
+
+// template <bool NA, typename RESULT_TYPE, typename U1, typename T1, typename U2>
+// class SugarBlock_3__VP : public Rcpp::VectorBase< Rcpp::traits::r_sexptype_traits<RESULT_TYPE>::rtype , NA, SugarBlock_3__VP<NA,RESULT_TYPE,U1,T1,U2> > {
+// public:
+// 	typedef RESULT_TYPE (*FunPtr)(U1,U2) ;
+// 	SugarBlock_3__VP( FunPtr ptr_, const T1 & x_, U2 u2 ) :
+// 		ptr(ptr_), x(x_), y(u2){}
+//
+// 	inline RESULT_TYPE operator[]( int i) const {
+// 		return ptr( x[i], y ) ;
+// 	}
+// 	inline int size() const { return x.size() ; }
+//
+// private:
+// 	FunPtr ptr ;
+// 	const T1& x ;
+// 	U2 y ;
+// };
+//
+// template <bool NA, typename RESULT_TYPE, typename U1, typename U2, typename T2>
+// class SugarBlock_3__PV : public Rcpp::VectorBase< Rcpp::traits::r_sexptype_traits<RESULT_TYPE>::rtype , NA, SugarBlock_3__PV<NA,RESULT_TYPE,U1,U2,T2> > {
+// public:
+// 	typedef RESULT_TYPE (*FunPtr)(U1,U2) ;
+// 	SugarBlock_3__PV( FunPtr ptr_, U1 u1, const T2& y_ ) :
+// 		ptr(ptr_), x(u1), y(y_){}
+//
+// 	inline RESULT_TYPE operator[]( int i) const {
+// 		return ptr( x, y[i] ) ;
+// 	}
+// 	inline int size() const { return y.size() ; }
+//
+// private:
+// 	FunPtr ptr ;
+// 	U1 x ;
+// 	const T2& y ;
+// };
+
+
+} // sugar
+} // Rcpp
+
+#define SB3_T1 VectorBase<REALSXP,T1_NA,T1>
+#define SB3_T2 VectorBase<REALSXP,T2_NA,T2>
+#define SB3_T3 VectorBase<REALSXP,T3_NA,T3>
+
+#define SUGAR_BLOCK_3(__NAME__,__SYMBOL__)                                                \
+namespace Rcpp{                                                                           \
+	template <bool T1_NA, typename T1, bool T2_NA, typename T2, bool T3_NA, typename T3>  \
+	inline sugar::SugarBlock_3_VVV<                                                       \
+		(T1_NA||T2_NA||T3_NA) ,double,                                                \
+		double,SB3_T1,                                                                \
+		double,SB3_T2,                                                                \
+		double,SB3_T3                                                                 \
+	>                                                                                     \
+	__NAME__(                                                                             \
+		const SB3_T1& x1,                                                             \
+		const SB3_T2& x2,                                                             \
+		const SB3_T3& x3                                                              \
+	){                                                                                    \
+		return sugar::SugarBlock_3_VVV<                                               \
+			(T1_NA||T2_NA||T3_NA) , double,                                       \
+			double,SB3_T1,                                                        \
+			double,SB3_T2,                                                        \
+			double,SB3_T3                                                         \
+		>(                                                                            \
+			__SYMBOL__ , x1, x2, x3                                               \
+		) ;                                                                           \
+	}                                                                                     \
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/block/Vectorized_Math.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/block/Vectorized_Math.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/block/Vectorized_Math.h	(revision 2477)
@@ -0,0 +1,100 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+//
+// SugarBlock.h: Rcpp R/C++ interface class library -- sugar functions
+//
+// Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef RCPP_SUGAR_VECTORIZEDMATH_H
+#define RCPP_SUGAR_VECTORIZEDMATH_H
+
+namespace Rcpp{
+namespace sugar{
+
+extern "C" typedef double (*DDFun)(double);
+
+template <DDFun Func, bool NA, typename VEC>
+class Vectorized : public VectorBase<REALSXP, NA, Vectorized<Func,NA,VEC> >{
+public:
+    typedef typename Rcpp::VectorBase<REALSXP,NA,VEC> VEC_TYPE ;
+    typedef typename Rcpp::traits::Extractor<REALSXP,NA,VEC>::type VEC_EXT ;
+
+    Vectorized( const VEC_TYPE& object_) : object( object_.get_ref() ){}
+    inline double operator[]( R_xlen_t i) const {
+        return Func( object[i] ) ;
+    }
+    inline R_xlen_t size() const { return object.size(); }
+
+private:
+    const VEC_EXT& object ;
+} ;
+
+template <DDFun Func, bool NA, typename VEC>
+class Vectorized_INTSXP : public VectorBase<REALSXP, NA, Vectorized_INTSXP<Func,NA,VEC> >{
+public:
+    typedef typename Rcpp::VectorBase<INTSXP,NA,VEC> VEC_TYPE ;
+    typedef typename Rcpp::traits::Extractor<INTSXP,NA,VEC>::type VEC_EXT ;
+
+    Vectorized_INTSXP( const VEC_TYPE& object_) : object( object_.get_ref() ){}
+    inline double operator[]( R_xlen_t i) const {
+        int x = object[i] ;
+        if( x == NA_INTEGER ) return NA_REAL ;
+        return Func( x ) ;
+    }
+    inline R_xlen_t size() const { return object.size(); }
+
+private:
+    const VEC_EXT& object ;
+} ;
+template <DDFun Func, typename VEC>
+class Vectorized_INTSXP<Func,false,VEC> :
+    public VectorBase<REALSXP,false, Vectorized_INTSXP<Func,false,VEC> >{
+public:
+    typedef typename Rcpp::VectorBase<INTSXP,false,VEC> VEC_TYPE ;
+    typedef typename Rcpp::traits::Extractor<INTSXP,false,VEC>::type VEC_EXT ;
+
+    Vectorized_INTSXP( const VEC_TYPE& object_) : object( object_.get_ref() ){}
+    inline double operator[]( R_xlen_t i) const {
+        return Func( object[i] ) ;
+    }
+    inline R_xlen_t size() const { return object.size(); }
+
+private:
+    const VEC_EXT& object ;
+} ;
+
+} // sugar
+} // Rcpp
+
+#define VECTORIZED_MATH_1(__NAME__,__SYMBOL__)                               \
+namespace Rcpp{                                                              \
+        template <bool NA, typename T>                                           \
+        inline sugar::Vectorized<__SYMBOL__,NA,T>                                \
+        __NAME__( const VectorBase<REALSXP,NA,T>& t ){                           \
+                return sugar::Vectorized<__SYMBOL__,NA,T>( t ) ;                     \
+        }                                                                        \
+        inline sugar::Vectorized<__SYMBOL__,true,NumericVector>                  \
+        __NAME__( SEXP x){ return __NAME__( NumericVector( x ) ) ; }             \
+        template <bool NA, typename T>                                           \
+        inline sugar::Vectorized_INTSXP<__SYMBOL__,NA,T>                         \
+        __NAME__( const VectorBase<INTSXP,NA,T>& t      ){                           \
+                return sugar::Vectorized_INTSXP<__SYMBOL__,NA,T>( t ) ;              \
+        }                                                                        \
+}
+
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/block/block.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/block/block.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/block/block.h	(revision 2477)
@@ -0,0 +1,32 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// block.h: Rcpp R/C++ interface class library -- sugar blocks
+//
+// Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__block__block_h
+#define Rcpp__sugar__block__block_h
+
+#include <Rcpp/sugar/block/SugarBlock_1.h>
+#include <Rcpp/sugar/block/SugarBlock_2.h>
+#include <Rcpp/sugar/block/SugarBlock_3.h>
+
+#include <Rcpp/sugar/block/SugarMath.h>
+#include <Rcpp/sugar/block/Vectorized_Math.h>
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/block/SugarMath.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/block/SugarMath.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/block/SugarMath.h	(revision 2477)
@@ -0,0 +1,124 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// SugarBlock.h: Rcpp R/C++ interface class library -- sugar functions
+//
+// Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef RCPP_SUGAR_SUGARMATH_H
+#define RCPP_SUGAR_SUGARMATH_H
+
+namespace Rcpp{
+namespace sugar{
+
+template <bool NA, typename RESULT_TYPE, typename U1, typename T1, typename FunPtr>
+class SugarMath_1 : public Rcpp::VectorBase<
+	Rcpp::traits::r_sexptype_traits<RESULT_TYPE>::rtype ,
+	NA,
+	SugarMath_1<NA,RESULT_TYPE,U1,T1,FunPtr>
+	> {
+public:
+
+	typedef Rcpp::VectorBase< Rcpp::traits::r_sexptype_traits<RESULT_TYPE>::rtype ,NA,T1> VEC_TYPE ;
+
+	SugarMath_1( FunPtr ptr_, const VEC_TYPE & vec_) : ptr(ptr_), vec(vec_){}
+
+	inline RESULT_TYPE operator[]( R_xlen_t i) const {
+		U1 x = vec[i] ;
+		if( ISNAN(x) ) return x;
+		return ptr( x ) ;
+	}
+	inline R_xlen_t size() const { return vec.size() ; }
+
+private:
+	FunPtr ptr ;
+	const VEC_TYPE& vec ;
+};
+
+template <bool NA, typename RESULT_TYPE, typename T1, typename FunPtr>
+class SugarMath_1<NA,RESULT_TYPE,int,T1,FunPtr> : public Rcpp::VectorBase<
+	Rcpp::traits::r_sexptype_traits<RESULT_TYPE>::rtype ,
+	NA,
+	SugarMath_1<NA,RESULT_TYPE,int,T1,FunPtr>
+	> {
+public:
+	typedef Rcpp::VectorBase< INTSXP ,NA,T1> VEC_TYPE ;
+
+	SugarMath_1( FunPtr ptr_, const VEC_TYPE & vec_) : ptr(ptr_), vec(vec_){}
+
+	inline RESULT_TYPE operator[]( R_xlen_t i) const {
+		int x = vec[i] ;
+		if( Rcpp::traits::is_na<INTSXP>(x) ) return Rcpp::traits::get_na<REALSXP>( ) ;
+		return ptr( x ) ;
+	}
+	inline R_xlen_t size() const { return vec.size() ; }
+
+private:
+	FunPtr ptr ;
+	const VEC_TYPE& vec ;
+};
+
+template <typename RESULT_TYPE, typename T1, typename FunPtr>
+class SugarMath_1<false,RESULT_TYPE,int,T1,FunPtr> : public
+Rcpp::VectorBase<
+	Rcpp::traits::r_sexptype_traits<RESULT_TYPE>::rtype ,
+	false,
+	SugarMath_1<false,RESULT_TYPE,int,T1,FunPtr>
+> {
+public:
+	typedef Rcpp::VectorBase< INTSXP ,false,T1> VEC_TYPE ;
+	SugarMath_1( FunPtr ptr_, const VEC_TYPE & vec_) : ptr(ptr_), vec(vec_){}
+
+	inline RESULT_TYPE operator[]( R_xlen_t i) const {
+		return ptr( vec[i] ) ;
+	}
+	inline R_xlen_t size() const { return vec.size() ; }
+
+private:
+	FunPtr ptr ;
+	const VEC_TYPE& vec ;
+};
+
+
+} // sugar
+} // Rcpp
+
+#define SUGAR_MATH_1(__NAME__,__SYMBOL__)                                    \
+	namespace Rcpp{                                                          \
+	template <bool NA, typename T>                                           \
+	inline sugar::SugarMath_1<NA,double,double,T, double (*)(double) >       \
+	__NAME__(                                                                \
+		const VectorBase<REALSXP,NA,T>& t                                    \
+	){                                                                       \
+		return sugar::SugarMath_1<NA,double,double,T, double (*)(double)>(   \
+			&__SYMBOL__ , t                                                   \
+		) ;                                                                  \
+	}                                                                        \
+	inline sugar::SugarMath_1<true,double,double,NumericVector,double(*)(double)>   \
+	__NAME__( SEXP x){ return __NAME__( NumericVector( x ) ) ; }             \
+	template <bool NA, typename T>                                           \
+	inline sugar::SugarMath_1<NA,double,int,T, double (*)(double) >          \
+	__NAME__(                                                                \
+		const VectorBase<INTSXP,NA,T>& t                                     \
+	){                                                                       \
+		return sugar::SugarMath_1<NA,double,int,T, double (*)(double)>(      \
+			&__SYMBOL__ , t                                                   \
+		) ;                                                                  \
+	}                                                                        \
+	}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/logical/logical.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/logical/logical.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/logical/logical.h	(revision 2477)
@@ -0,0 +1,34 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// logical.h: Rcpp R/C++ interface class library --
+//
+// Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef RCPP_SUGAR_LOGICAL_H
+#define RCPP_SUGAR_LOGICAL_H
+
+#include <Rcpp/sugar/logical/can_have_na.h>
+
+#include <Rcpp/sugar/logical/SingleLogicalResult.h>
+#include <Rcpp/sugar/logical/not.h>
+#include <Rcpp/sugar/logical/and.h>
+#include <Rcpp/sugar/logical/or.h>
+
+#include <Rcpp/sugar/logical/is.h>
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/logical/SingleLogicalResult.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/logical/SingleLogicalResult.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/logical/SingleLogicalResult.h	(revision 2477)
@@ -0,0 +1,106 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// SingleLogicalResult.h: Rcpp R/C++ interface class library --
+//
+// Copyright (C) 2010 - 2012 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__SingleLogicalResult_h
+#define Rcpp__sugar__SingleLogicalResult_h
+
+namespace Rcpp{
+namespace sugar{
+
+template <bool>
+class forbidden_conversion ;
+
+template <>
+class forbidden_conversion<true>{} ;
+
+template <bool x>
+class conversion_to_bool_is_forbidden :
+	forbidden_conversion<x>{
+	public:
+		void touch(){}
+};
+
+template <bool NA,typename T>
+class SingleLogicalResult {
+public:
+	const static int UNRESOLVED = -5 ;
+
+	SingleLogicalResult() : result(UNRESOLVED) {} ;
+
+	void apply(){
+		if( result == UNRESOLVED ){
+			static_cast<T&>(*this).apply() ;
+		}
+	}
+
+	inline bool is_true(){
+		apply() ;
+		return result == TRUE ;
+	}
+
+	inline bool is_false(){
+		apply() ;
+		return result == FALSE ;
+	}
+
+	inline bool is_na(){
+		apply() ;
+		return Rcpp::traits::is_na<LGLSXP>( result ) ;
+	}
+
+	inline operator SEXP(){
+		return get_sexp() ;
+	}
+
+	inline operator bool(){
+		conversion_to_bool_is_forbidden<!NA> x ;
+		x.touch() ;
+		return is_true() ;
+	}
+
+	inline int size(){ return 1 ; }
+
+	inline int get(){
+		apply();
+		return result;
+	}
+
+	inline SEXP get_sexp(){
+	    apply() ;
+	    return Rf_ScalarLogical( result ) ;
+	}
+
+protected:
+	int result ;
+	inline void set(int x){ result = x ;}
+	inline void reset(){ set(UNRESOLVED) ; }
+	inline void set_true(){ set(TRUE); }
+	inline void set_false(){ set(FALSE); }
+	inline void set_na(){ set(NA_LOGICAL); }
+	inline bool is_unresolved(){ return result == UNRESOLVED ; }
+} ;
+
+}
+}
+
+
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/logical/is.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/logical/is.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/logical/is.h	(revision 2477)
@@ -0,0 +1,44 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// is.h: Rcpp R/C++ interface class library --
+//
+// Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef RCPP_SUGAR_LOGICAL_IS_H
+#define RCPP_SUGAR_LOGICAL_IS_H
+
+namespace Rcpp{
+
+	template <bool NA, typename T>
+	inline bool is_true( const Rcpp::sugar::SingleLogicalResult<NA,T>& x){
+		return const_cast< Rcpp::sugar::SingleLogicalResult<NA,T>& >(x).is_true() ;
+	}
+
+	template <bool NA, typename T>
+	inline bool is_false( const Rcpp::sugar::SingleLogicalResult<NA,T>& x){
+		return const_cast< Rcpp::sugar::SingleLogicalResult<NA,T>& >(x).is_false() ;
+	}
+
+	template <bool NA, typename T>
+	inline bool is_na( const Rcpp::sugar::SingleLogicalResult<NA,T>& x){
+		return const_cast< Rcpp::sugar::SingleLogicalResult<NA,T>& >(x).is_na() ;
+	}
+
+
+}
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/logical/not.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/logical/not.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/logical/not.h	(revision 2477)
@@ -0,0 +1,67 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// not.h: Rcpp R/C++ interface class library --
+//
+// Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__logical__not_h
+#define Rcpp__sugar__logical__not_h
+
+namespace Rcpp{
+namespace sugar{
+
+template <bool NA> struct negate{
+	static inline int apply( int x ){
+		return Rcpp::traits::is_na<LGLSXP>( x ) ? x :
+			( x ? FALSE : TRUE ) ;
+	}
+} ;
+template<> struct negate<false>{
+	static inline int apply( int x){
+		return x ? FALSE : TRUE ;
+	} ;
+} ;
+
+
+template <bool NA, typename T>
+class Negate_SingleLogicalResult : public SingleLogicalResult<NA, Negate_SingleLogicalResult<NA,T> >{
+public:
+	typedef SingleLogicalResult<NA,T> TYPE ;
+	typedef SingleLogicalResult<NA, Negate_SingleLogicalResult<NA,T> > BASE ;
+	Negate_SingleLogicalResult( const TYPE& orig_ ) : orig(orig_) {}
+
+	inline void apply(){
+		BASE::set( negate<NA>::apply( orig.get() ) );
+	}
+
+private:
+	const TYPE& orig ;
+
+} ;
+
+}
+}
+
+template <bool NA,typename T>
+inline Rcpp::sugar::Negate_SingleLogicalResult<NA,T>
+operator!( const Rcpp::sugar::SingleLogicalResult<NA,T>& x){
+	return Rcpp::sugar::Negate_SingleLogicalResult<NA,T>( x );
+}
+
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/logical/or.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/logical/or.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/logical/or.h	(revision 2477)
@@ -0,0 +1,323 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// or.h: Rcpp R/C++ interface class library --
+//
+// Copyright (C) 2010 - 2012 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__logical_or_h
+#define Rcpp__sugar__logical_or_h
+
+namespace Rcpp{
+namespace sugar{
+
+template <bool LHS_NA, typename LHS_T, bool RHS_NA, typename RHS_T>
+class Or_SingleLogicalResult_SingleLogicalResult :
+public SingleLogicalResult<
+	(LHS_NA || RHS_NA) ,
+	Or_SingleLogicalResult_SingleLogicalResult<LHS_NA,LHS_T,RHS_NA,RHS_T>
+	>
+{
+public:
+	typedef SingleLogicalResult<LHS_NA,LHS_T> LHS_TYPE ;
+	typedef SingleLogicalResult<RHS_NA,RHS_T> RHS_TYPE ;
+	typedef SingleLogicalResult<
+		(LHS_NA || RHS_NA) ,
+		Or_SingleLogicalResult_SingleLogicalResult<LHS_NA,LHS_T,RHS_NA,RHS_T>
+	> BASE ;
+
+	Or_SingleLogicalResult_SingleLogicalResult( const LHS_TYPE& lhs_, const RHS_TYPE& rhs_) :
+		lhs(lhs_), rhs(rhs_){} ;
+
+	inline void apply(){
+		int left = lhs.get() ;
+		if( Rcpp::traits::is_na<LGLSXP>( left ) ){
+			BASE::set( left ) ;
+		} else if( left == TRUE ){
+			BASE::set( TRUE ) ;
+		} else {
+			BASE::set( rhs.get() ) ;
+		}
+	}
+
+private:
+	const LHS_TYPE& lhs ;
+	const RHS_TYPE& rhs ;
+
+} ;
+
+// special version when we know the rhs is not NA
+template <bool LHS_NA, typename LHS_T, typename RHS_T>
+class Or_SingleLogicalResult_SingleLogicalResult<LHS_NA,LHS_T,false,RHS_T> :
+public SingleLogicalResult<
+	LHS_NA ,
+	Or_SingleLogicalResult_SingleLogicalResult<LHS_NA,LHS_T,false,RHS_T>
+	>
+{
+public:
+	typedef SingleLogicalResult<LHS_NA,LHS_T> LHS_TYPE ;
+	typedef SingleLogicalResult<false,RHS_T> RHS_TYPE ;
+	typedef SingleLogicalResult<
+		LHS_NA,
+		Or_SingleLogicalResult_SingleLogicalResult<LHS_NA,LHS_T,false,RHS_T>
+	> BASE ;
+
+	Or_SingleLogicalResult_SingleLogicalResult( const LHS_TYPE& lhs_, const RHS_TYPE& rhs_) :
+		lhs(lhs_), rhs(rhs_){} ;
+
+	inline void apply(){
+		// here we know rhs does not have NA, so we start with the rhs
+		int right = rhs.get() ;
+		if( right == TRUE ){
+			BASE::set( TRUE ) ;
+		} else {
+			BASE::set( lhs.get() ) ;
+		}
+	}
+
+private:
+	const LHS_TYPE& lhs ;
+	const RHS_TYPE& rhs ;
+
+} ;
+
+
+// special version when we know the lhs is not NA
+template <typename LHS_T, bool RHS_NA, typename RHS_T>
+class Or_SingleLogicalResult_SingleLogicalResult<false,LHS_T,RHS_NA,RHS_T> :
+public SingleLogicalResult<
+	RHS_NA ,
+	Or_SingleLogicalResult_SingleLogicalResult<false,LHS_T,RHS_NA,RHS_T>
+	>
+{
+public:
+	typedef SingleLogicalResult<false,LHS_T> LHS_TYPE ;
+	typedef SingleLogicalResult<RHS_NA,RHS_T> RHS_TYPE ;
+	typedef SingleLogicalResult<
+		RHS_NA,
+		Or_SingleLogicalResult_SingleLogicalResult<false,LHS_T,RHS_NA,RHS_T>
+	> BASE ;
+
+	Or_SingleLogicalResult_SingleLogicalResult( const LHS_TYPE& lhs_, const RHS_TYPE& rhs_) :
+		lhs(lhs_), rhs(rhs_){} ;
+
+	inline void apply(){
+		// here we know lhs does not have NA, so we start with the rhs
+		int left = lhs.get() ;
+		if( left == TRUE ){
+			BASE::set( TRUE ) ;
+		} else {
+			BASE::set( rhs.get() ) ;
+		}
+	}
+
+private:
+	const LHS_TYPE& lhs ;
+	const RHS_TYPE& rhs ;
+
+} ;
+
+// special version when we know both the lhs and the rhs are not NA
+template <typename LHS_T, typename RHS_T>
+class Or_SingleLogicalResult_SingleLogicalResult<false,LHS_T,false,RHS_T> :
+public SingleLogicalResult<
+	false ,
+	Or_SingleLogicalResult_SingleLogicalResult<false,LHS_T,false,RHS_T>
+	>
+{
+public:
+	typedef SingleLogicalResult<false,LHS_T> LHS_TYPE ;
+	typedef SingleLogicalResult<false,RHS_T> RHS_TYPE ;
+	typedef SingleLogicalResult<
+		false,
+		Or_SingleLogicalResult_SingleLogicalResult<false,LHS_T,false,RHS_T>
+	> BASE ;
+
+	Or_SingleLogicalResult_SingleLogicalResult( const LHS_TYPE& lhs_, const RHS_TYPE& rhs_) :
+		lhs(lhs_), rhs(rhs_){} ;
+
+	inline void apply(){
+		int left = lhs.get() ;
+		if( left == TRUE ){
+			BASE::set( TRUE ) ;
+		} else {
+			BASE::set( rhs.get() ) ;
+		}
+	}
+
+private:
+	const LHS_TYPE& lhs ;
+	const RHS_TYPE& rhs ;
+
+} ;
+
+
+template <bool LHS_NA, typename LHS_T>
+class Or_SingleLogicalResult_bool :
+public SingleLogicalResult<
+	LHS_NA ,
+	And_SingleLogicalResult_bool<LHS_NA,LHS_T>
+	>
+{
+public:
+	typedef SingleLogicalResult<LHS_NA,LHS_T> LHS_TYPE ;
+	typedef SingleLogicalResult<
+		LHS_NA ,
+		Or_SingleLogicalResult_bool<LHS_NA,LHS_T>
+	> BASE ;
+
+	Or_SingleLogicalResult_bool( const LHS_TYPE& lhs_, bool rhs_) :
+		lhs(lhs_), rhs(rhs_){} ;
+
+	inline void apply(){
+		if( rhs ){
+			BASE::set( TRUE ) ;
+		} else{
+			BASE::set( lhs.get() ) ;
+		}
+	}
+
+private:
+	const LHS_TYPE& lhs ;
+	bool rhs ;
+
+} ;
+
+// (LogicalExpression) | (LogicalExpression)
+template <bool LHS_NA, typename LHS_T, bool RHS_NA, typename RHS_T>
+class Or_LogicalExpression_LogicalExpression : public Rcpp::VectorBase< LGLSXP, true, Or_LogicalExpression_LogicalExpression<LHS_NA,LHS_T,RHS_NA,RHS_T> >{
+public:
+    typedef typename Rcpp::VectorBase<LGLSXP,LHS_NA,LHS_T> LHS_TYPE ;
+    typedef typename Rcpp::VectorBase<LGLSXP,RHS_NA,RHS_T> RHS_TYPE ;
+
+    Or_LogicalExpression_LogicalExpression( const LHS_TYPE& lhs_, const RHS_TYPE& rhs_ ) : lhs(lhs_), rhs(rhs_){}
+
+    inline int operator[]( R_xlen_t i ) const{
+        if( lhs[i] == TRUE || rhs[i] == TRUE ) return TRUE ;
+        if( lhs[i] == FALSE && rhs[i] == FALSE ) return FALSE ;
+        return NA_LOGICAL;
+    }
+    inline R_xlen_t size() const { return lhs.size(); }
+
+private:
+    const LHS_TYPE& lhs ;
+    const RHS_TYPE& rhs ;
+} ;
+template <typename LHS_T, bool RHS_NA, typename RHS_T>
+class Or_LogicalExpression_LogicalExpression<false,LHS_T,RHS_NA,RHS_T>
+    : public Rcpp::VectorBase< LGLSXP, true, Or_LogicalExpression_LogicalExpression<false,LHS_T,RHS_NA,RHS_T> >{
+public:
+    typedef typename Rcpp::VectorBase<LGLSXP,false,LHS_T> LHS_TYPE ;
+    typedef typename Rcpp::VectorBase<LGLSXP,RHS_NA,RHS_T> RHS_TYPE ;
+
+    Or_LogicalExpression_LogicalExpression( const LHS_TYPE& lhs_, const RHS_TYPE& rhs_ ) : lhs(lhs_), rhs(rhs_){}
+
+    inline int operator[]( R_xlen_t i ) const{
+        if( lhs[i] == TRUE || rhs[i] == TRUE ) return TRUE ;
+        if( rhs[i] == NA_LOGICAL ) return NA_LOGICAL ;
+        return FALSE ;
+    }
+    inline R_xlen_t size() const { return lhs.size(); }
+
+private:
+    const LHS_TYPE& lhs ;
+    const RHS_TYPE& rhs ;
+} ;
+template <bool LHS_NA, typename LHS_T, typename RHS_T>
+class Or_LogicalExpression_LogicalExpression<LHS_NA,LHS_T,false,RHS_T>
+    : public Rcpp::VectorBase< LGLSXP, true, Or_LogicalExpression_LogicalExpression<LHS_NA,LHS_T,false,RHS_T> >{
+public:
+    typedef typename Rcpp::VectorBase<LGLSXP,LHS_NA,LHS_T> LHS_TYPE ;
+    typedef typename Rcpp::VectorBase<LGLSXP,false,RHS_T> RHS_TYPE ;
+
+    Or_LogicalExpression_LogicalExpression( const LHS_TYPE& lhs_, const RHS_TYPE& rhs_ ) : lhs(lhs_), rhs(rhs_){}
+
+    inline int operator[]( R_xlen_t i ) const{
+        if( lhs[i] == TRUE || rhs[i] == TRUE ) return TRUE ;
+        if( lhs[i] == NA_LOGICAL ) return NA_LOGICAL ;
+        return FALSE;
+    }
+    inline R_xlen_t size() const { return lhs.size(); }
+
+private:
+    const LHS_TYPE& lhs ;
+    const RHS_TYPE& rhs ;
+} ;
+template <typename LHS_T, typename RHS_T>
+class Or_LogicalExpression_LogicalExpression<false,LHS_T,false,RHS_T>
+    : public Rcpp::VectorBase< LGLSXP, false, Or_LogicalExpression_LogicalExpression<false,LHS_T,false,RHS_T> >{
+public:
+    typedef typename Rcpp::VectorBase<LGLSXP,false,LHS_T> LHS_TYPE ;
+    typedef typename Rcpp::VectorBase<LGLSXP,false,RHS_T> RHS_TYPE ;
+
+    Or_LogicalExpression_LogicalExpression( const LHS_TYPE& lhs_, const RHS_TYPE& rhs_ ) : lhs(lhs_), rhs(rhs_){}
+
+    inline int operator[]( R_xlen_t i ) const{
+        if( lhs[i] == TRUE || rhs[i] == TRUE ) return TRUE ;
+        return FALSE;
+    }
+    inline R_xlen_t size() const { return lhs.size(); }
+
+private:
+    const LHS_TYPE& lhs ;
+    const RHS_TYPE& rhs ;
+} ;
+
+
+
+} // sugar
+} // Rcpp
+
+template <bool LHS_NA, typename LHS_T, bool RHS_NA, typename RHS_T>
+inline Rcpp::sugar::Or_SingleLogicalResult_SingleLogicalResult<LHS_NA,LHS_T,RHS_NA,RHS_T>
+operator||(
+	const Rcpp::sugar::SingleLogicalResult<LHS_NA,LHS_T>& lhs,
+	const Rcpp::sugar::SingleLogicalResult<LHS_NA,LHS_T>& rhs
+){
+	return Rcpp::sugar::Or_SingleLogicalResult_SingleLogicalResult<LHS_NA,LHS_T,RHS_NA,RHS_T>( lhs, rhs ) ;
+}
+
+template <bool LHS_NA, typename LHS_T>
+inline Rcpp::sugar::Or_SingleLogicalResult_bool<LHS_NA,LHS_T>
+operator||(
+	const Rcpp::sugar::SingleLogicalResult<LHS_NA,LHS_T>& lhs,
+	bool rhs
+){
+	return Rcpp::sugar::Or_SingleLogicalResult_bool<LHS_NA,LHS_T>( lhs, rhs ) ;
+}
+
+template <bool LHS_NA, typename LHS_T>
+inline Rcpp::sugar::Or_SingleLogicalResult_bool<LHS_NA,LHS_T>
+operator||(
+	bool rhs,
+	const Rcpp::sugar::SingleLogicalResult<LHS_NA,LHS_T>& lhs
+){
+	return Rcpp::sugar::Or_SingleLogicalResult_bool<LHS_NA,LHS_T>( lhs, rhs ) ;
+}
+
+// (logical expression) | (logical expression)
+template <bool LHS_NA, typename LHS_T, bool RHS_NA, typename RHS_T>
+inline Rcpp::sugar::Or_LogicalExpression_LogicalExpression<LHS_NA,LHS_T,RHS_NA,RHS_T>
+operator|(
+    const Rcpp::VectorBase<LGLSXP,LHS_NA,LHS_T>& lhs,
+    const Rcpp::VectorBase<LGLSXP,RHS_NA,RHS_T>& rhs
+){
+    return Rcpp::sugar::Or_LogicalExpression_LogicalExpression<LHS_NA,LHS_T,RHS_NA,RHS_T>( lhs, rhs ) ;
+}
+
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/logical/and.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/logical/and.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/logical/and.h	(revision 2477)
@@ -0,0 +1,324 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// and.h: Rcpp R/C++ interface class library --
+//
+// Copyright (C) 2010 - 2012 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__logical_and_h
+#define Rcpp__sugar__logical_and_h
+
+namespace Rcpp{
+namespace sugar{
+
+template <bool LHS_NA, typename LHS_T, bool RHS_NA, typename RHS_T>
+class And_SingleLogicalResult_SingleLogicalResult :
+public SingleLogicalResult<
+	(LHS_NA || RHS_NA) ,
+	And_SingleLogicalResult_SingleLogicalResult<LHS_NA,LHS_T,RHS_NA,RHS_T>
+	>
+{
+public:
+	typedef SingleLogicalResult<LHS_NA,LHS_T> LHS_TYPE ;
+	typedef SingleLogicalResult<RHS_NA,RHS_T> RHS_TYPE ;
+	typedef SingleLogicalResult<
+		(LHS_NA || RHS_NA) ,
+		And_SingleLogicalResult_SingleLogicalResult<LHS_NA,LHS_T,RHS_NA,RHS_T>
+	> BASE ;
+
+	And_SingleLogicalResult_SingleLogicalResult( const LHS_TYPE& lhs_, const RHS_TYPE& rhs_) :
+		lhs(lhs_), rhs(rhs_){} ;
+
+	inline void apply(){
+		int left = lhs.get() ;
+		if( Rcpp::traits::is_na<LGLSXP>( left ) ){
+			BASE::set( left ) ;
+		} else if( left == FALSE ){
+			BASE::set( FALSE ) ;
+		} else {
+			BASE::set( rhs.get() ) ;
+		}
+	}
+
+private:
+	const LHS_TYPE& lhs ;
+	const RHS_TYPE& rhs ;
+
+} ;
+
+// special version when we know the rhs is not NA
+template <bool LHS_NA, typename LHS_T, typename RHS_T>
+class And_SingleLogicalResult_SingleLogicalResult<LHS_NA,LHS_T,false,RHS_T> :
+public SingleLogicalResult<
+	LHS_NA ,
+	And_SingleLogicalResult_SingleLogicalResult<LHS_NA,LHS_T,false,RHS_T>
+	>
+{
+public:
+	typedef SingleLogicalResult<LHS_NA,LHS_T> LHS_TYPE ;
+	typedef SingleLogicalResult<false,RHS_T> RHS_TYPE ;
+	typedef SingleLogicalResult<
+		LHS_NA,
+		And_SingleLogicalResult_SingleLogicalResult<LHS_NA,LHS_T,false,RHS_T>
+	> BASE ;
+
+	And_SingleLogicalResult_SingleLogicalResult( const LHS_TYPE& lhs_, const RHS_TYPE& rhs_) :
+		lhs(lhs_), rhs(rhs_){} ;
+
+	inline void apply(){
+		// here we know rhs does not have NA, so we start with the rhs
+		int right = rhs.get() ;
+		if( right == FALSE ){
+			BASE::set( FALSE ) ;
+		} else {
+			BASE::set( lhs.get() ) ;
+		}
+	}
+
+private:
+	const LHS_TYPE& lhs ;
+	const RHS_TYPE& rhs ;
+
+} ;
+
+
+// special version when we know the lhs is not NA
+template <typename LHS_T, bool RHS_NA, typename RHS_T>
+class And_SingleLogicalResult_SingleLogicalResult<false,LHS_T,RHS_NA,RHS_T> :
+public SingleLogicalResult<
+	RHS_NA ,
+	And_SingleLogicalResult_SingleLogicalResult<false,LHS_T,RHS_NA,RHS_T>
+	>
+{
+public:
+	typedef SingleLogicalResult<false,LHS_T> LHS_TYPE ;
+	typedef SingleLogicalResult<RHS_NA,RHS_T> RHS_TYPE ;
+	typedef SingleLogicalResult<
+		RHS_NA,
+		And_SingleLogicalResult_SingleLogicalResult<false,LHS_T,RHS_NA,RHS_T>
+	> BASE ;
+
+	And_SingleLogicalResult_SingleLogicalResult( const LHS_TYPE& lhs_, const RHS_TYPE& rhs_) :
+		lhs(lhs_), rhs(rhs_){} ;
+
+	inline void apply(){
+		// here we know lhs does not have NA, so we start with the rhs
+		int left = lhs.get() ;
+		if( left == FALSE ){
+			BASE::set( FALSE ) ;
+		} else {
+			BASE::set( rhs.get() ) ;
+		}
+	}
+
+private:
+	const LHS_TYPE& lhs ;
+	const RHS_TYPE& rhs ;
+
+} ;
+
+// special version when we know both the lhs and the rhs are not NA
+template <typename LHS_T, typename RHS_T>
+class And_SingleLogicalResult_SingleLogicalResult<false,LHS_T,false,RHS_T> :
+public SingleLogicalResult<
+	false ,
+	And_SingleLogicalResult_SingleLogicalResult<false,LHS_T,false,RHS_T>
+	>
+{
+public:
+	typedef SingleLogicalResult<false,LHS_T> LHS_TYPE ;
+	typedef SingleLogicalResult<false,RHS_T> RHS_TYPE ;
+	typedef SingleLogicalResult<
+		false,
+		And_SingleLogicalResult_SingleLogicalResult<false,LHS_T,false,RHS_T>
+	> BASE ;
+
+	And_SingleLogicalResult_SingleLogicalResult( const LHS_TYPE& lhs_, const RHS_TYPE& rhs_) :
+		lhs(lhs_), rhs(rhs_){} ;
+
+	inline void apply(){
+		int left = lhs.get() ;
+		if( left == FALSE ){
+			BASE::set( FALSE ) ;
+		} else {
+			BASE::set( rhs.get() ) ;
+		}
+	}
+
+private:
+	const LHS_TYPE& lhs ;
+	const RHS_TYPE& rhs ;
+
+} ;
+
+
+
+template <bool LHS_NA, typename LHS_T>
+class And_SingleLogicalResult_bool :
+public SingleLogicalResult<
+	LHS_NA ,
+	And_SingleLogicalResult_bool<LHS_NA,LHS_T>
+	>
+{
+public:
+	typedef SingleLogicalResult<LHS_NA,LHS_T> LHS_TYPE ;
+	typedef SingleLogicalResult<
+		LHS_NA ,
+		And_SingleLogicalResult_bool<LHS_NA,LHS_T>
+	> BASE ;
+
+	And_SingleLogicalResult_bool( const LHS_TYPE& lhs_, bool rhs_) :
+		lhs(lhs_), rhs(rhs_){} ;
+
+	inline void apply(){
+		if( !rhs ){
+			BASE::set( FALSE ) ;
+		} else{
+			BASE::set( lhs.get() ) ;
+		}
+	}
+
+private:
+	const LHS_TYPE& lhs ;
+	bool rhs ;
+
+} ;
+
+
+
+// (LogicalExpression) & (LogicalExpression)
+template <bool LHS_NA, typename LHS_T, bool RHS_NA, typename RHS_T>
+class And_LogicalExpression_LogicalExpression : public Rcpp::VectorBase< LGLSXP, true, And_LogicalExpression_LogicalExpression<LHS_NA,LHS_T,RHS_NA,RHS_T> >{
+public:
+    typedef typename Rcpp::VectorBase<LGLSXP,LHS_NA,LHS_T> LHS_TYPE ;
+    typedef typename Rcpp::VectorBase<LGLSXP,RHS_NA,RHS_T> RHS_TYPE ;
+
+    And_LogicalExpression_LogicalExpression( const LHS_TYPE& lhs_, const RHS_TYPE& rhs_ ) : lhs(lhs_), rhs(rhs_){}
+
+    inline int operator[]( R_xlen_t i ) const{
+        if( lhs[i] == TRUE && rhs[i] == TRUE ) return TRUE ;
+        if( lhs[i] == NA_LOGICAL || rhs[i] == NA_LOGICAL ) return NA_LOGICAL ;
+        return FALSE ;
+    }
+    inline R_xlen_t size() const { return lhs.size(); }
+
+private:
+    const LHS_TYPE& lhs ;
+    const RHS_TYPE& rhs ;
+} ;
+template <typename LHS_T, bool RHS_NA, typename RHS_T>
+class And_LogicalExpression_LogicalExpression<false,LHS_T,RHS_NA,RHS_T>
+    : public Rcpp::VectorBase< LGLSXP, true, And_LogicalExpression_LogicalExpression<false,LHS_T,RHS_NA,RHS_T> >{
+public:
+    typedef typename Rcpp::VectorBase<LGLSXP,false,LHS_T> LHS_TYPE ;
+    typedef typename Rcpp::VectorBase<LGLSXP,RHS_NA,RHS_T> RHS_TYPE ;
+
+    And_LogicalExpression_LogicalExpression( const LHS_TYPE& lhs_, const RHS_TYPE& rhs_ ) : lhs(lhs_), rhs(rhs_){}
+
+    inline int operator[]( R_xlen_t i ) const{
+        if( lhs[i] == TRUE && rhs[i] == TRUE ) return TRUE ;
+        if( rhs[i] == NA_LOGICAL ) return NA_LOGICAL ;
+        return FALSE ;
+    }
+    inline R_xlen_t size() const { return lhs.size(); }
+
+private:
+    const LHS_TYPE& lhs ;
+    const RHS_TYPE& rhs ;
+} ;
+template <bool LHS_NA, typename LHS_T, typename RHS_T>
+class And_LogicalExpression_LogicalExpression<LHS_NA,LHS_T,false,RHS_T>
+    : public Rcpp::VectorBase< LGLSXP, true, And_LogicalExpression_LogicalExpression<LHS_NA,LHS_T,false,RHS_T> >{
+public:
+    typedef typename Rcpp::VectorBase<LGLSXP,LHS_NA,LHS_T> LHS_TYPE ;
+    typedef typename Rcpp::VectorBase<LGLSXP,false,RHS_T> RHS_TYPE ;
+
+    And_LogicalExpression_LogicalExpression( const LHS_TYPE& lhs_, const RHS_TYPE& rhs_ ) : lhs(lhs_), rhs(rhs_){}
+
+    inline int operator[]( R_xlen_t i ) const{
+        if( lhs[i] == TRUE && rhs[i] == TRUE ) return TRUE ;
+        if( lhs[i] == NA_LOGICAL ) return NA_LOGICAL ;
+        return FALSE;
+    }
+    inline R_xlen_t size() const { return lhs.size(); }
+
+private:
+    const LHS_TYPE& lhs ;
+    const RHS_TYPE& rhs ;
+} ;
+template <typename LHS_T, typename RHS_T>
+class And_LogicalExpression_LogicalExpression<false,LHS_T,false,RHS_T>
+    : public Rcpp::VectorBase< LGLSXP, false, And_LogicalExpression_LogicalExpression<false,LHS_T,false,RHS_T> >{
+public:
+    typedef typename Rcpp::VectorBase<LGLSXP,false,LHS_T> LHS_TYPE ;
+    typedef typename Rcpp::VectorBase<LGLSXP,false,RHS_T> RHS_TYPE ;
+
+    And_LogicalExpression_LogicalExpression( const LHS_TYPE& lhs_, const RHS_TYPE& rhs_ ) : lhs(lhs_), rhs(rhs_){}
+
+    inline int operator[]( R_xlen_t i ) const{
+        if( lhs[i] == TRUE && rhs[i] == TRUE ) return TRUE ;
+        return FALSE;
+    }
+    inline R_xlen_t size() const { return lhs.size(); }
+
+private:
+    const LHS_TYPE& lhs ;
+    const RHS_TYPE& rhs ;
+} ;
+
+}
+}
+
+template <bool LHS_NA, typename LHS_T, bool RHS_NA, typename RHS_T>
+inline Rcpp::sugar::And_SingleLogicalResult_SingleLogicalResult<LHS_NA,LHS_T,RHS_NA,RHS_T>
+operator&&(
+	const Rcpp::sugar::SingleLogicalResult<LHS_NA,LHS_T>& lhs,
+	const Rcpp::sugar::SingleLogicalResult<LHS_NA,LHS_T>& rhs
+){
+	return Rcpp::sugar::And_SingleLogicalResult_SingleLogicalResult<LHS_NA,LHS_T,RHS_NA,RHS_T>( lhs, rhs ) ;
+}
+
+template <bool LHS_NA, typename LHS_T>
+inline Rcpp::sugar::And_SingleLogicalResult_bool<LHS_NA,LHS_T>
+operator&&(
+	const Rcpp::sugar::SingleLogicalResult<LHS_NA,LHS_T>& lhs,
+	bool rhs
+){
+	return Rcpp::sugar::And_SingleLogicalResult_bool<LHS_NA,LHS_T>( lhs, rhs ) ;
+}
+
+template <bool LHS_NA, typename LHS_T>
+inline Rcpp::sugar::And_SingleLogicalResult_bool<LHS_NA,LHS_T>
+operator&&(
+	bool rhs,
+	const Rcpp::sugar::SingleLogicalResult<LHS_NA,LHS_T>& lhs
+){
+	return Rcpp::sugar::And_SingleLogicalResult_bool<LHS_NA,LHS_T>( lhs, rhs ) ;
+}
+
+// (logical expression) & (logical expression)
+template <bool LHS_NA, typename LHS_T, bool RHS_NA, typename RHS_T>
+inline Rcpp::sugar::And_LogicalExpression_LogicalExpression<LHS_NA,LHS_T,RHS_NA,RHS_T>
+operator&(
+    const Rcpp::VectorBase<LGLSXP,LHS_NA,LHS_T>& lhs,
+    const Rcpp::VectorBase<LGLSXP,RHS_NA,RHS_T>& rhs
+){
+    return Rcpp::sugar::And_LogicalExpression_LogicalExpression<LHS_NA,LHS_T,RHS_NA,RHS_T>( lhs, rhs ) ;
+}
+
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/logical/can_have_na.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/logical/can_have_na.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/logical/can_have_na.h	(revision 2477)
@@ -0,0 +1,32 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// can_have_na.h: Rcpp R/C++ interface class library --
+//
+// Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__can_have_na_h
+#define Rcpp__sugar__can_have_na_h
+
+namespace Rcpp{
+
+template <typename T>
+struct can_have_na :  T::can_have_na::type {} ;
+
+} // Rcpp
+#endif
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/nona/nona.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/nona/nona.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/nona/nona.h	(revision 2477)
@@ -0,0 +1,88 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 4 -*-
+//
+// nona.h: Rcpp R/C++ interface class library -- noNA handling
+//
+// Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef RCPP_SUGAR_NONA_NONA_H
+#define RCPP_SUGAR_NONA_NONA_H
+
+namespace Rcpp{
+namespace sugar {
+
+    template <int RTYPE, bool NA, typename VECTOR>
+    class Nona : public Rcpp::VectorBase<RTYPE,false, Nona<RTYPE,NA,VECTOR> > {
+    public:
+        typedef typename Rcpp::VectorBase<RTYPE,NA,VECTOR> SUGAR_TYPE ;
+        typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
+
+        Nona( const SUGAR_TYPE& expr) : data(expr.get_ref()){}
+
+        inline R_xlen_t size() const { return data.size() ; }
+        inline STORAGE operator[](R_xlen_t i) const { return data[i] ; }
+
+    private:
+        const VECTOR& data ;
+    } ;
+
+    // specialization when the expression is actually a vector expression
+    template <int RTYPE, bool NA>
+    class Nona< RTYPE,NA,Rcpp::Vector<RTYPE> > : public Rcpp::VectorBase<RTYPE,false, Nona<RTYPE,NA,Rcpp::Vector<RTYPE> > > {
+    public:
+        typedef typename Rcpp::VectorBase<RTYPE,NA, Rcpp::Vector<RTYPE> > SUGAR_TYPE ;
+        typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
+        typedef typename Rcpp::Vector<RTYPE>::const_iterator iterator ;
+
+        Nona( const SUGAR_TYPE& expr) : data(expr.get_ref().begin()), n(expr.size()){}
+
+        inline R_xlen_t size() const { return n ; }
+        inline STORAGE operator[](R_xlen_t i) const { return data[i] ; }
+
+    private:
+        iterator data ;
+        R_xlen_t n ;
+    } ;
+
+    template <typename T>
+    class NonaPrimitive {
+    public:
+        NonaPrimitive( T t) : x(t){}
+        inline operator T(){ return x ; }
+
+    private:
+        T x ;
+    } ;
+
+}
+
+template <int RTYPE, bool NA, typename VECTOR>
+inline sugar::Nona<RTYPE,NA,VECTOR> noNA( const Rcpp::VectorBase<RTYPE,NA,VECTOR>& vec ){
+    return sugar::Nona<RTYPE,NA,VECTOR>( vec ) ;
+}
+
+inline sugar::NonaPrimitive<double> noNA( double x ){
+    return sugar::NonaPrimitive<double>( x ) ;
+}
+inline sugar::NonaPrimitive<int> noNA( int x ){
+    return sugar::NonaPrimitive<int>( x ) ;
+}
+
+
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/sugar_forward.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/sugar_forward.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/sugar_forward.h	(revision 2477)
@@ -0,0 +1,33 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// sugar_forward.h: Rcpp R/C++ interface class library -- forward declaration for Rcpp::sugar
+//
+// Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef RCPP_SUGAR_FORWARD_H
+#define RCPP_SUGAR_FORWARD_H
+
+// traits
+#include <Rcpp/sugar/operators/r_binary_op.h>
+
+// abstractions
+#include <Rcpp/sugar/logical/logical.h>
+
+#include <Rcpp/sugar/Range.h>
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/operators/Comparator_With_One_Value.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/operators/Comparator_With_One_Value.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/operators/Comparator_With_One_Value.h	(revision 2477)
@@ -0,0 +1,110 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// LessThan.h: Rcpp R/C++ interface class library -- vector operators
+//
+// Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__Comparator_With_One_Value_h
+#define Rcpp__sugar__Comparator_With_One_Value_h
+
+namespace Rcpp{
+namespace sugar{
+
+template <int RTYPE, typename Operator, bool NA, typename T>
+class Comparator_With_One_Value : public ::Rcpp::VectorBase< LGLSXP, true, Comparator_With_One_Value<RTYPE,Operator,NA,T> > {
+public:
+	typedef typename Rcpp::VectorBase<RTYPE,NA,T> VEC_TYPE ;
+	typedef typename traits::storage_type<RTYPE>::type STORAGE ;
+	typedef int (Comparator_With_One_Value::*METHOD)(int) const ;
+
+	Comparator_With_One_Value( const VEC_TYPE& lhs_, STORAGE rhs_ ) :
+		lhs(lhs_), rhs(rhs_), m(), op() {
+
+			m = Rcpp::traits::is_na<RTYPE>(rhs) ?
+				&Comparator_With_One_Value::rhs_is_na :
+				&Comparator_With_One_Value::rhs_is_not_na ;
+
+	}
+
+	inline int operator[]( R_xlen_t i ) const {
+		return (this->*m)(i) ;
+	}
+
+	inline R_xlen_t size() const { return lhs.size() ; }
+
+private:
+	const VEC_TYPE& lhs ;
+	STORAGE rhs ;
+	METHOD m ;
+	Operator op ;
+
+	inline int rhs_is_na(int i) const { return rhs ; }
+	inline int rhs_is_not_na(int i) const {
+		STORAGE x = lhs[i] ;
+		return Rcpp::traits::is_na<RTYPE>(x) ? x : op( x, rhs ) ;
+	}
+
+} ;
+
+
+template <int RTYPE, typename Operator, typename T>
+class Comparator_With_One_Value<RTYPE,Operator,false,T> :
+	public ::Rcpp::VectorBase< RTYPE, true, Comparator_With_One_Value<LGLSXP,Operator,false,T> > {
+
+public:
+	typedef typename Rcpp::VectorBase<RTYPE,false,T> VEC_TYPE ;
+	typedef typename traits::storage_type<RTYPE>::type STORAGE ;
+	typedef int (Comparator_With_One_Value::*METHOD)(int) const ;
+
+	Comparator_With_One_Value( const VEC_TYPE& lhs_, STORAGE rhs_ ) :
+		lhs(lhs_), rhs(rhs_), m(), op() {
+
+			m = Rcpp::traits::is_na<RTYPE>(rhs) ?
+				&Comparator_With_One_Value::rhs_is_na :
+				&Comparator_With_One_Value::rhs_is_not_na ;
+
+	}
+
+	inline int operator[]( R_xlen_t i ) const {
+		return (this->*m)(i) ;
+	}
+
+	inline R_xlen_t size() const { return lhs.size() ; }
+
+private:
+	const VEC_TYPE& lhs ;
+	STORAGE rhs ;
+	METHOD m ;
+	Operator op ;
+
+	inline int rhs_is_na(int i) const { return rhs ; }
+	inline int rhs_is_not_na(int i) const {
+		return op( lhs[i], rhs ) ;
+	}
+
+} ;
+
+
+} // sugar
+} // Rcpp
+
+
+
+
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/operators/logical_operators__Vector__primitive.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/operators/logical_operators__Vector__primitive.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/operators/logical_operators__Vector__primitive.h	(revision 2477)
@@ -0,0 +1,290 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// logical_operators__Vector__primitive.h: Rcpp R/C++ interface class library --
+//    logical operators for Vector to primitive comparisons
+//
+// Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__logical_operators__Vector__primitive_h
+#define Rcpp__sugar__logical_operators__Vector__primitive_h
+
+/* Vector < primitive */
+template <int RTYPE, bool NA, typename T>
+inline Rcpp::sugar::Comparator_With_One_Value<
+	RTYPE ,
+	Rcpp::sugar::less<RTYPE>,
+	NA,
+	T
+	>
+operator<(
+	const Rcpp::VectorBase<RTYPE,NA,T>& lhs ,
+	typename Rcpp::traits::storage_type<RTYPE>::type rhs
+	){
+	return Rcpp::sugar::Comparator_With_One_Value<
+		RTYPE,
+		Rcpp::sugar::less<RTYPE>,
+		NA,
+		T
+		>(
+			lhs, rhs
+		) ;
+}
+template <int RTYPE, bool NA, typename T>
+inline Rcpp::sugar::Comparator_With_One_Value<
+	RTYPE ,
+	Rcpp::sugar::less<RTYPE>,
+	NA,
+	T
+	>
+operator>(
+	typename Rcpp::traits::storage_type<RTYPE>::type rhs,
+	const Rcpp::VectorBase<RTYPE,NA,T>& lhs
+	){
+	return Rcpp::sugar::Comparator_With_One_Value<
+		RTYPE,
+		Rcpp::sugar::less<RTYPE>,
+		NA,
+		T
+		>(
+			lhs, rhs
+		) ;
+}
+
+
+
+/* Vector > primitive */
+template <int RTYPE, bool NA, typename T>
+inline Rcpp::sugar::Comparator_With_One_Value<
+	RTYPE ,
+	Rcpp::sugar::greater<RTYPE>,
+	NA,
+	T
+	>
+operator>(
+	const Rcpp::VectorBase<RTYPE,NA,T>& lhs ,
+	typename Rcpp::traits::storage_type<RTYPE>::type rhs
+	){
+	return Rcpp::sugar::Comparator_With_One_Value<
+		RTYPE,
+		Rcpp::sugar::greater<RTYPE>,
+		NA,
+		T
+		>(
+			lhs, rhs
+		) ;
+}
+template <int RTYPE, bool NA, typename T>
+inline Rcpp::sugar::Comparator_With_One_Value<
+	RTYPE ,
+	Rcpp::sugar::greater<RTYPE>,
+	NA,
+	T
+	>
+operator<(
+	typename Rcpp::traits::storage_type<RTYPE>::type rhs,
+	const Rcpp::VectorBase<RTYPE,NA,T>& lhs
+	){
+	return Rcpp::sugar::Comparator_With_One_Value<
+		RTYPE,
+		Rcpp::sugar::greater<RTYPE>,
+		NA,
+		T
+		>(
+			lhs, rhs
+		) ;
+}
+
+
+
+/* Vector <= primitive */
+template <int RTYPE, bool NA, typename T>
+inline Rcpp::sugar::Comparator_With_One_Value<
+	RTYPE ,
+	Rcpp::sugar::less_or_equal<RTYPE>,
+	NA,
+	T
+	>
+operator<=(
+	const Rcpp::VectorBase<RTYPE,NA,T>& lhs ,
+	typename Rcpp::traits::storage_type<RTYPE>::type rhs
+	){
+	return Rcpp::sugar::Comparator_With_One_Value<
+		RTYPE,
+		Rcpp::sugar::less_or_equal<RTYPE>,
+		NA,
+		T
+		>(
+			lhs, rhs
+		) ;
+}
+template <int RTYPE, bool NA, typename T>
+inline Rcpp::sugar::Comparator_With_One_Value<
+	RTYPE ,
+	Rcpp::sugar::less_or_equal<RTYPE>,
+	NA,
+	T
+	>
+operator>=(
+	typename Rcpp::traits::storage_type<RTYPE>::type rhs,
+	const Rcpp::VectorBase<RTYPE,NA,T>& lhs
+	){
+	return Rcpp::sugar::Comparator_With_One_Value<
+		RTYPE,
+		Rcpp::sugar::less_or_equal<RTYPE>,
+		NA,
+		T
+		>(
+			lhs, rhs
+		) ;
+}
+
+
+
+
+/* Vector >= primitive */
+template <int RTYPE, bool NA, typename T>
+inline Rcpp::sugar::Comparator_With_One_Value<
+	RTYPE ,
+	Rcpp::sugar::greater_or_equal<RTYPE>,
+	NA,
+	T
+	>
+operator>=(
+	const Rcpp::VectorBase<RTYPE,NA,T>& lhs ,
+	typename Rcpp::traits::storage_type<RTYPE>::type rhs
+	){
+	return Rcpp::sugar::Comparator_With_One_Value<
+		RTYPE,
+		Rcpp::sugar::greater_or_equal<RTYPE>,
+		NA,
+		T
+		>(
+			lhs, rhs
+		) ;
+}
+template <int RTYPE, bool NA, typename T>
+inline Rcpp::sugar::Comparator_With_One_Value<
+	RTYPE ,
+	Rcpp::sugar::greater_or_equal<RTYPE>,
+	NA,
+	T
+	>
+operator<=(
+	typename Rcpp::traits::storage_type<RTYPE>::type rhs,
+	const Rcpp::VectorBase<RTYPE,NA,T>& lhs
+	){
+	return Rcpp::sugar::Comparator_With_One_Value<
+		RTYPE,
+		Rcpp::sugar::greater_or_equal<RTYPE>,
+		NA,
+		T
+		>(
+			lhs, rhs
+		) ;
+}
+
+
+
+/* Vector == primitive */
+template <int RTYPE, bool NA, typename T>
+inline Rcpp::sugar::Comparator_With_One_Value<
+	RTYPE ,
+	Rcpp::sugar::equal<RTYPE>,
+	NA,
+	T
+	>
+operator==(
+	const Rcpp::VectorBase<RTYPE,NA,T>& lhs ,
+	typename Rcpp::traits::storage_type<RTYPE>::type rhs
+	){
+	return Rcpp::sugar::Comparator_With_One_Value<
+		RTYPE,
+		Rcpp::sugar::equal<RTYPE>,
+		NA,
+		T
+		>(
+			lhs, rhs
+		) ;
+}
+template <int RTYPE, bool NA, typename T>
+inline Rcpp::sugar::Comparator_With_One_Value<
+	RTYPE ,
+	Rcpp::sugar::equal<RTYPE>,
+	NA,
+	T
+	>
+operator==(
+	typename Rcpp::traits::storage_type<RTYPE>::type rhs,
+	const Rcpp::VectorBase<RTYPE,NA,T>& lhs
+	){
+	return Rcpp::sugar::Comparator_With_One_Value<
+		RTYPE,
+		Rcpp::sugar::equal<RTYPE>,
+		NA,
+		T
+		>(
+			lhs, rhs
+		) ;
+}
+
+
+
+/* Vector != primitive */
+template <int RTYPE, bool NA, typename T>
+inline Rcpp::sugar::Comparator_With_One_Value<
+	RTYPE ,
+	Rcpp::sugar::not_equal<RTYPE>,
+	NA,
+	T
+	>
+operator!=(
+	const Rcpp::VectorBase<RTYPE,NA,T>& lhs ,
+	typename Rcpp::traits::storage_type<RTYPE>::type rhs
+	){
+	return Rcpp::sugar::Comparator_With_One_Value<
+		RTYPE,
+		Rcpp::sugar::not_equal<RTYPE>,
+		NA,
+		T
+		>(
+			lhs, rhs
+		) ;
+}
+template <int RTYPE, bool NA, typename T>
+inline Rcpp::sugar::Comparator_With_One_Value<
+	RTYPE ,
+	Rcpp::sugar::not_equal<RTYPE>,
+	NA,
+	T
+	>
+operator!=(
+	typename Rcpp::traits::storage_type<RTYPE>::type rhs,
+	const Rcpp::VectorBase<RTYPE,NA,T>& lhs
+	){
+	return Rcpp::sugar::Comparator_With_One_Value<
+		RTYPE,
+		Rcpp::sugar::not_equal<RTYPE>,
+		NA,
+		T
+		>(
+			lhs, rhs
+		) ;
+}
+
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/operators/not.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/operators/not.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/operators/not.h	(revision 2477)
@@ -0,0 +1,108 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// not.h: Rcpp R/C++ interface class library -- unary operator!
+//
+// Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__not_h
+#define Rcpp__sugar__not_h
+
+namespace Rcpp{
+namespace sugar{
+
+	template <int RTYPE,bool NA>
+	class not_ {
+	public:
+		typedef typename traits::storage_type<RTYPE>::type STORAGE ;
+		inline int apply( STORAGE x ) const {
+			return Rcpp::traits::is_na<RTYPE>(x) ? NA_LOGICAL : (x ? FALSE : TRUE) ;
+		}
+	} ;
+	template <int RTYPE>
+	class not_<RTYPE,false> {
+	public:
+		typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
+		inline int apply( STORAGE x ) const {
+			return x ? FALSE : TRUE ;
+		}
+	} ;
+	template <bool NA>
+	class not_<REALSXP,NA>{
+	public:
+		inline int apply( double x ) const {
+			return Rcpp::traits::is_na<REALSXP>( x ) ? NA_LOGICAL : ( (x == 0) ? FALSE : TRUE ) ;
+		}
+	} ;
+	template <>
+	class not_<REALSXP,false>{
+	public:
+		inline int apply( double x ) const {
+			return ( x == 0.0 ? FALSE : TRUE ) ;
+		}
+	} ;
+	template <bool NA>
+	class not_<CPLXSXP,NA>{
+	public:
+		inline int apply( Rcomplex x ) const {
+			return Rcpp::traits::is_na<CPLXSXP>( x ) ? NA_LOGICAL : ( (x.r == 0.0 & x.i == 0.0 ) ? FALSE : TRUE ) ;
+		}
+	} ;
+	template <>
+	class not_<CPLXSXP,false>{
+	public:
+		inline int apply( Rcomplex x ) const {
+			return ((x.r == 0.0) & (x.i == 0.0) ) ? FALSE : TRUE ;
+		}
+	} ;
+
+
+
+	template <int RTYPE, bool NA, typename T>
+	class Not_Vector : public Rcpp::VectorBase<LGLSXP,NA, Not_Vector<RTYPE,NA,T> > {
+	public:
+		typedef typename Rcpp::VectorBase<RTYPE,NA,T> VEC_TYPE ;
+		typedef typename traits::storage_type<RTYPE>::type STORAGE ;
+		typedef not_<RTYPE,NA> OPERATOR ;
+
+		Not_Vector( const VEC_TYPE& lhs_ ) :
+			lhs(lhs_), op() {}
+
+		inline STORAGE operator[]( R_xlen_t i ) const {
+			return op.apply( lhs[i] ) ;
+		}
+
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const VEC_TYPE& lhs ;
+		OPERATOR op ;
+	} ;
+
+}
+}
+
+template <int RTYPE,bool NA, typename T>
+inline Rcpp::sugar::Not_Vector< RTYPE , NA , T >
+operator!(
+	const Rcpp::VectorBase<RTYPE,NA,T>& x
+) {
+	return Rcpp::sugar::Not_Vector<RTYPE,NA, T >( x ) ;
+}
+
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/operators/times.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/operators/times.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/operators/times.h	(revision 2477)
@@ -0,0 +1,486 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 4 -*-
+//
+// times.h: Rcpp R/C++ interface class library -- operator*
+//
+// Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__times_h
+#define Rcpp__sugar__times_h
+
+namespace Rcpp{
+namespace sugar{
+
+	template <int RTYPE, bool LHS_NA, typename LHS_T, bool RHS_NA, typename RHS_T >
+	class Times_Vector_Vector : public Rcpp::VectorBase<RTYPE, true , Times_Vector_Vector<RTYPE,LHS_NA,LHS_T,RHS_NA,RHS_T> > {
+	public:
+		typedef typename traits::storage_type<RTYPE>::type STORAGE ;
+		typedef typename Rcpp::VectorBase<RTYPE,LHS_NA,LHS_T> LHS_TYPE ;
+		typedef typename Rcpp::VectorBase<RTYPE,RHS_NA,RHS_T> RHS_TYPE ;
+
+		typedef typename Rcpp::traits::Extractor< RTYPE, LHS_NA, LHS_T>::type LHS_EXT ;
+		typedef typename Rcpp::traits::Extractor< RTYPE, RHS_NA, RHS_T>::type RHS_EXT ;
+
+		Times_Vector_Vector( const LHS_TYPE& lhs_, const RHS_TYPE& rhs_ ) :
+			lhs(lhs_.get_ref()), rhs(rhs_.get_ref()) {
+		}
+
+		inline STORAGE operator[]( R_xlen_t i ) const {
+			STORAGE lhs_ = lhs[i] ;
+			if( traits::is_na<RTYPE>(lhs_) ) return lhs_ ;
+			STORAGE rhs_ = rhs[i] ;
+			return traits::is_na<RTYPE>(rhs_) ? rhs_ : (lhs_ * rhs_) ;
+		}
+
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const LHS_EXT& lhs ;
+		const RHS_EXT& rhs ;
+	} ;
+    // RTYPE = REALSXP
+    template <bool LHS_NA, typename LHS_T, bool RHS_NA, typename RHS_T >
+	class Times_Vector_Vector<REALSXP,LHS_NA,LHS_T,RHS_NA,RHS_T> :
+	    public Rcpp::VectorBase<REALSXP, true , Times_Vector_Vector<REALSXP,LHS_NA,LHS_T,RHS_NA,RHS_T> > {
+	public:
+		typedef typename Rcpp::VectorBase<REALSXP,LHS_NA,LHS_T> LHS_TYPE ;
+		typedef typename Rcpp::VectorBase<REALSXP,RHS_NA,RHS_T> RHS_TYPE ;
+
+		typedef typename Rcpp::traits::Extractor<REALSXP, LHS_NA, LHS_T>::type LHS_EXT ;
+		typedef typename Rcpp::traits::Extractor<REALSXP, RHS_NA, RHS_T>::type RHS_EXT ;
+
+		Times_Vector_Vector( const LHS_TYPE& lhs_, const RHS_TYPE& rhs_ ) :
+			lhs(lhs_.get_ref()), rhs(rhs_.get_ref()) {
+		}
+
+		inline double operator[]( R_xlen_t i ) const {
+			return lhs[i] * rhs[i];
+		}
+
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const LHS_EXT& lhs ;
+		const RHS_EXT& rhs ;
+	} ;
+
+
+	// specialization LHS_NA = false
+	template <int RTYPE, typename LHS_T, bool RHS_NA, typename RHS_T >
+	class Times_Vector_Vector<RTYPE,false,LHS_T,RHS_NA,RHS_T> : public Rcpp::VectorBase<RTYPE,true, Times_Vector_Vector<RTYPE,false,LHS_T,RHS_NA,RHS_T> > {
+	public:
+		typedef typename traits::storage_type<RTYPE>::type STORAGE ;
+		typedef typename Rcpp::VectorBase<RTYPE,false,LHS_T> LHS_TYPE ;
+		typedef typename Rcpp::VectorBase<RTYPE,RHS_NA,RHS_T> RHS_TYPE ;
+
+		typedef typename Rcpp::traits::Extractor< RTYPE, false, LHS_T>::type LHS_EXT ;
+		typedef typename Rcpp::traits::Extractor< RTYPE, RHS_NA, RHS_T>::type RHS_EXT ;
+
+		Times_Vector_Vector( const LHS_TYPE& lhs_, const RHS_TYPE& rhs_ ) :
+			lhs(lhs_.get_ref()), rhs(rhs_.get_ref()){}
+
+		inline STORAGE operator[]( R_xlen_t i ) const {
+			STORAGE rhs_ = rhs[i] ;
+			if( traits::is_na<RTYPE>(rhs_) ) return rhs_ ;
+			return lhs[i] * rhs_  ;
+		}
+
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const LHS_EXT& lhs ;
+		const RHS_EXT& rhs ;
+	} ;
+	// RTYPE = REALSXP
+	template <typename LHS_T, bool RHS_NA, typename RHS_T >
+	class Times_Vector_Vector<REALSXP,false,LHS_T,RHS_NA,RHS_T> :
+	    public Rcpp::VectorBase<REALSXP,true, Times_Vector_Vector<REALSXP,false,LHS_T,RHS_NA,RHS_T> > {
+	public:
+		typedef typename Rcpp::VectorBase<REALSXP,false,LHS_T> LHS_TYPE ;
+		typedef typename Rcpp::VectorBase<REALSXP,RHS_NA,RHS_T> RHS_TYPE ;
+
+		typedef typename Rcpp::traits::Extractor<REALSXP, false, LHS_T>::type LHS_EXT ;
+		typedef typename Rcpp::traits::Extractor<REALSXP, RHS_NA, RHS_T>::type RHS_EXT ;
+
+		Times_Vector_Vector( const LHS_TYPE& lhs_, const RHS_TYPE& rhs_ ) :
+			lhs(lhs_.get_ref()), rhs(rhs_.get_ref()){}
+
+		inline double operator[]( R_xlen_t i ) const {
+			return lhs[i] * rhs[i] ;
+		}
+
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const LHS_EXT& lhs ;
+		const RHS_EXT& rhs ;
+	} ;
+
+
+	// specialization for RHS_NA = false
+	template <int RTYPE, bool LHS_NA, typename LHS_T, typename RHS_T >
+	class Times_Vector_Vector<RTYPE,LHS_NA,LHS_T,false,RHS_T> : public Rcpp::VectorBase<RTYPE, true , Times_Vector_Vector<RTYPE,LHS_NA,LHS_T,false,RHS_T> > {
+	public:
+		typedef typename traits::storage_type<RTYPE>::type STORAGE ;
+		typedef typename Rcpp::VectorBase<RTYPE,LHS_NA,LHS_T> LHS_TYPE ;
+		typedef typename Rcpp::VectorBase<RTYPE,false,RHS_T> RHS_TYPE ;
+
+		typedef typename Rcpp::traits::Extractor< RTYPE, LHS_NA, LHS_T>::type LHS_EXT ;
+		typedef typename Rcpp::traits::Extractor< RTYPE, false, RHS_T>::type RHS_EXT ;
+
+		Times_Vector_Vector( const LHS_TYPE& lhs_, const RHS_TYPE& rhs_ ) :
+			lhs(lhs_.get_ref()), rhs(rhs_.get_ref()){}
+
+		inline STORAGE operator[]( R_xlen_t i ) const {
+			STORAGE lhs_ = lhs[i] ;
+			if( traits::is_na<RTYPE>(lhs_) ) return lhs_ ;
+			return lhs_ * rhs[i]  ;
+		}
+
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const LHS_EXT& lhs ;
+		const RHS_EXT& rhs ;
+	} ;
+	// RTYPE = REALSXP
+	template <bool LHS_NA, typename LHS_T, typename RHS_T >
+	class Times_Vector_Vector<REALSXP,LHS_NA,LHS_T,false,RHS_T> :
+	    public Rcpp::VectorBase<REALSXP, true , Times_Vector_Vector<REALSXP,LHS_NA,LHS_T,false,RHS_T> > {
+	public:
+		typedef typename Rcpp::VectorBase<REALSXP,LHS_NA,LHS_T> LHS_TYPE ;
+		typedef typename Rcpp::VectorBase<REALSXP,false,RHS_T> RHS_TYPE ;
+
+		typedef typename Rcpp::traits::Extractor<REALSXP, LHS_NA, LHS_T>::type LHS_EXT ;
+		typedef typename Rcpp::traits::Extractor<REALSXP, false, RHS_T>::type RHS_EXT ;
+
+		Times_Vector_Vector( const LHS_TYPE& lhs_, const RHS_TYPE& rhs_ ) :
+			lhs(lhs_.get_ref()), rhs(rhs_.get_ref()){}
+
+		inline double operator[]( R_xlen_t i ) const {
+			return lhs[i] * rhs[i] ;
+		}
+
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const LHS_EXT& lhs ;
+		const RHS_EXT& rhs ;
+	} ;
+
+	// specialization for RHS_NA = false  and LHS_NA = false
+	template <int RTYPE, typename LHS_T, typename RHS_T >
+	class Times_Vector_Vector<RTYPE,false,LHS_T,false,RHS_T> : public Rcpp::VectorBase<RTYPE, false , Times_Vector_Vector<RTYPE,false,LHS_T,false,RHS_T> > {
+	public:
+		typedef typename traits::storage_type<RTYPE>::type STORAGE ;
+		typedef typename Rcpp::VectorBase<RTYPE,false,LHS_T> LHS_TYPE ;
+		typedef typename Rcpp::VectorBase<RTYPE,false,RHS_T> RHS_TYPE ;
+
+		typedef typename Rcpp::traits::Extractor< RTYPE, false, LHS_T>::type LHS_EXT ;
+		typedef typename Rcpp::traits::Extractor< RTYPE, false, RHS_T>::type RHS_EXT ;
+
+		Times_Vector_Vector( const LHS_TYPE& lhs_, const RHS_TYPE& rhs_ ) :
+			lhs(lhs_.get_ref()), rhs(rhs_.get_ref()){}
+
+		inline STORAGE operator[]( R_xlen_t i ) const {
+			return lhs[i] * rhs[i]  ;
+		}
+
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const LHS_EXT& lhs ;
+		const RHS_EXT& rhs ;
+	} ;
+    // RTYPE = REALSXP
+	template <typename LHS_T, typename RHS_T >
+	class Times_Vector_Vector<REALSXP,false,LHS_T,false,RHS_T> :
+	    public Rcpp::VectorBase<REALSXP, false , Times_Vector_Vector<REALSXP,false,LHS_T,false,RHS_T> > {
+	public:
+		typedef typename Rcpp::VectorBase<REALSXP,false,LHS_T> LHS_TYPE ;
+		typedef typename Rcpp::VectorBase<REALSXP,false,RHS_T> RHS_TYPE ;
+
+		typedef typename Rcpp::traits::Extractor<REALSXP, false, LHS_T>::type LHS_EXT ;
+		typedef typename Rcpp::traits::Extractor<REALSXP, false, RHS_T>::type RHS_EXT ;
+
+		Times_Vector_Vector( const LHS_TYPE& lhs_, const RHS_TYPE& rhs_ ) :
+			lhs(lhs_.get_ref()), rhs(rhs_.get_ref()){}
+
+		inline double operator[]( R_xlen_t i ) const {
+			return lhs[i] * rhs[i]  ;
+		}
+
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const LHS_EXT& lhs ;
+		const RHS_EXT& rhs ;
+	} ;
+
+
+	template <int RTYPE, bool NA, typename T>
+	class Times_Vector_Primitive : public Rcpp::VectorBase<RTYPE,true, Times_Vector_Primitive<RTYPE,NA,T> > {
+	public:
+		typedef typename Rcpp::VectorBase<RTYPE,NA,T> VEC_TYPE ;
+		typedef typename traits::storage_type<RTYPE>::type STORAGE ;
+
+		typedef typename Rcpp::traits::Extractor< RTYPE, NA, T>::type EXT ;
+
+		Times_Vector_Primitive( const VEC_TYPE& lhs_, STORAGE rhs_ ) :
+			lhs(lhs_.get_ref()), rhs(rhs_), rhs_na( Rcpp::traits::is_na<RTYPE>(rhs_) )
+			{}
+
+		inline STORAGE operator[]( R_xlen_t i ) const {
+			if( rhs_na ) return rhs ;
+			STORAGE x = lhs[i] ;
+			return Rcpp::traits::is_na<RTYPE>(x) ? x : (x * rhs) ;
+		}
+
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const EXT& lhs ;
+		STORAGE rhs ;
+		bool rhs_na ;
+	} ;
+	// RTYPE = REALSXP
+	template <bool NA, typename T>
+	class Times_Vector_Primitive<REALSXP,NA,T> :
+	    public Rcpp::VectorBase<REALSXP,true, Times_Vector_Primitive<REALSXP,NA,T> > {
+	public:
+		typedef typename Rcpp::VectorBase<REALSXP,NA,T> VEC_TYPE ;
+		typedef typename Rcpp::traits::Extractor<REALSXP, NA, T>::type EXT ;
+
+		Times_Vector_Primitive( const VEC_TYPE& lhs_, double rhs_ ) :
+			lhs(lhs_.get_ref()), rhs(rhs_)
+			{}
+
+		inline double operator[]( R_xlen_t i ) const {
+			return rhs * lhs[i] ;
+		}
+
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const EXT& lhs ;
+		double rhs ;
+	} ;
+
+
+	template <int RTYPE, typename T>
+	class Times_Vector_Primitive<RTYPE,false,T> : public Rcpp::VectorBase<RTYPE,false, Times_Vector_Primitive<RTYPE,false,T> > {
+	public:
+		typedef typename Rcpp::VectorBase<RTYPE,false,T> VEC_TYPE ;
+		typedef typename traits::storage_type<RTYPE>::type STORAGE ;
+
+		typedef typename Rcpp::traits::Extractor< RTYPE, false, T>::type EXT ;
+
+		Times_Vector_Primitive( const VEC_TYPE& lhs_, STORAGE rhs_ ) :
+			lhs(lhs_.get_ref()), rhs(rhs_), rhs_na( Rcpp::traits::is_na<RTYPE>(rhs_) ) {}
+
+		inline STORAGE operator[]( R_xlen_t i ) const {
+			return rhs_na ? rhs : (rhs * lhs[i] ) ;
+		}
+
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const EXT& lhs ;
+		STORAGE rhs ;
+		bool rhs_na ;
+
+	} ;
+	// RTYPE = REALSXP
+	template <typename T>
+	class Times_Vector_Primitive<REALSXP,false,T> :
+	    public Rcpp::VectorBase<REALSXP,false, Times_Vector_Primitive<REALSXP,false,T> > {
+	public:
+		typedef typename Rcpp::VectorBase<REALSXP,false,T> VEC_TYPE ;
+		typedef typename Rcpp::traits::Extractor<REALSXP, false, T>::type EXT ;
+
+		Times_Vector_Primitive( const VEC_TYPE& lhs_, double rhs_ ) :
+			lhs(lhs_.get_ref()), rhs(rhs_) {}
+
+		inline double operator[]( R_xlen_t i ) const {
+			return rhs * lhs[i] ;
+		}
+
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const EXT& lhs ;
+		double rhs ;
+	} ;
+
+
+
+
+
+
+	// Vector * nona(primitive)
+	template <int RTYPE, bool NA, typename T>
+	class Times_Vector_Primitive_nona : public Rcpp::VectorBase<RTYPE,true, Times_Vector_Primitive_nona<RTYPE,NA,T> > {
+	public:
+		typedef typename Rcpp::VectorBase<RTYPE,NA,T> VEC_TYPE ;
+		typedef typename traits::storage_type<RTYPE>::type STORAGE ;
+		typedef typename Rcpp::traits::Extractor< RTYPE, NA, T>::type EXT ;
+
+		Times_Vector_Primitive_nona( const VEC_TYPE& lhs_, STORAGE rhs_ ) :
+			lhs(lhs_.get_ref()), rhs(rhs_)
+			{}
+
+		inline STORAGE operator[]( R_xlen_t i ) const {
+			STORAGE x = lhs[i] ;
+			return Rcpp::traits::is_na<RTYPE>(x) ? x : (x * rhs) ;
+		}
+
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const EXT& lhs ;
+		STORAGE rhs ;
+
+	} ;
+	// RTYPE = REALSXP
+	template <bool NA, typename T>
+	class Times_Vector_Primitive_nona<REALSXP,NA,T> :
+	    public Rcpp::VectorBase<REALSXP,true, Times_Vector_Primitive_nona<REALSXP,NA,T> > {
+	public:
+		typedef typename Rcpp::VectorBase<REALSXP,NA,T> VEC_TYPE ;
+		typedef typename Rcpp::traits::Extractor<REALSXP,NA,T>::type EXT ;
+
+		Times_Vector_Primitive_nona( const VEC_TYPE& lhs_, double rhs_ ) :
+			lhs(lhs_.get_ref()), rhs(rhs_)
+			{}
+
+		inline double operator[]( R_xlen_t i ) const {
+			return lhs[i] * rhs ;
+		}
+
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const EXT& lhs ;
+		double rhs ;
+	} ;
+
+
+	template <int RTYPE, typename T>
+	class Times_Vector_Primitive_nona<RTYPE,false,T> : public Rcpp::VectorBase<RTYPE,false, Times_Vector_Primitive_nona<RTYPE,false,T> > {
+	public:
+		typedef typename Rcpp::VectorBase<RTYPE,false,T> VEC_TYPE ;
+		typedef typename traits::storage_type<RTYPE>::type STORAGE ;
+
+		typedef typename Rcpp::traits::Extractor< RTYPE, false, T>::type EXT ;
+
+		Times_Vector_Primitive_nona( const VEC_TYPE& lhs_, STORAGE rhs_ ) :
+			lhs(lhs_.get_ref()), rhs(rhs_) {}
+
+		inline STORAGE operator[]( R_xlen_t i ) const {
+			return rhs * lhs[i] ;
+		}
+
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const EXT& lhs ;
+		STORAGE rhs ;
+
+	} ;
+	template <typename T>
+	class Times_Vector_Primitive_nona<REALSXP,false,T> :
+	    public Rcpp::VectorBase<REALSXP,false, Times_Vector_Primitive_nona<REALSXP,false,T> > {
+	public:
+		typedef typename Rcpp::VectorBase<REALSXP,false,T> VEC_TYPE ;
+		typedef typename Rcpp::traits::Extractor<REALSXP, false, T>::type EXT ;
+
+		Times_Vector_Primitive_nona( const VEC_TYPE& lhs_, double rhs_ ) :
+			lhs(lhs_.get_ref()), rhs(rhs_) {}
+
+		inline double operator[]( R_xlen_t i ) const {
+			return rhs * lhs[i] ;
+		}
+
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const EXT& lhs ;
+		double rhs ;
+	} ;
+
+}
+
+template <int RTYPE,bool NA, typename T, typename U>
+inline typename traits::enable_if<traits::is_convertible<typename traits::remove_const_and_reference<U>::type, typename traits::storage_type<RTYPE>::type>::value, sugar::Times_Vector_Primitive<RTYPE,NA,T> >::type
+operator*(
+	const VectorBase<RTYPE,NA,T>& lhs,
+	const U &rhs
+) {
+	return sugar::Times_Vector_Primitive<RTYPE,NA,T>( lhs, rhs ) ;
+}
+
+
+template <int RTYPE,bool NA, typename T, typename U>
+inline typename traits::enable_if<traits::is_convertible<typename traits::remove_const_and_reference<U>::type, typename traits::storage_type<RTYPE>::type>::value, sugar::Times_Vector_Primitive< RTYPE , NA , T > >::type
+operator*(
+	const U &rhs,
+	const VectorBase<RTYPE,NA,T>& lhs
+) {
+	return sugar::Times_Vector_Primitive<RTYPE,NA, T >( lhs, rhs ) ;
+}
+
+
+
+template <int RTYPE,bool NA, typename T, typename U>
+inline typename traits::enable_if<traits::is_convertible<typename traits::remove_const_and_reference<U>::type, typename traits::storage_type<RTYPE>::type>::value, sugar::Times_Vector_Primitive_nona<RTYPE,NA,T> >::type
+operator*(
+	const VectorBase<RTYPE,NA,T>& lhs,
+	const typename sugar::NonaPrimitive< U > &rhs
+) {
+	return sugar::Times_Vector_Primitive_nona<RTYPE,NA,T>( lhs, rhs ) ;
+}
+
+template <int RTYPE,bool NA, typename T, typename U>
+inline typename traits::enable_if<traits::is_convertible<typename traits::remove_const_and_reference<U>::type, typename traits::storage_type<RTYPE>::type>::value, sugar::Times_Vector_Primitive_nona< RTYPE , NA , T > >::type
+operator*(
+	const typename sugar::NonaPrimitive< U > &rhs,
+	const VectorBase<RTYPE,NA,T>& lhs
+) {
+	return sugar::Times_Vector_Primitive_nona<RTYPE,NA, T >( lhs, rhs ) ;
+}
+
+
+template <int RTYPE,bool LHS_NA, typename LHS_T, bool RHS_NA, typename RHS_T>
+inline sugar::Times_Vector_Vector<
+	RTYPE ,
+	LHS_NA, LHS_T,
+	RHS_NA, RHS_T
+	>
+operator*(
+	const VectorBase<RTYPE,LHS_NA,LHS_T>& lhs,
+	const VectorBase<RTYPE,RHS_NA,RHS_T>& rhs
+) {
+	return sugar::Times_Vector_Vector<
+		RTYPE,
+		LHS_NA, LHS_T,
+		RHS_NA, RHS_T
+		>( lhs, rhs ) ;
+}
+
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/operators/plus.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/operators/plus.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/operators/plus.h	(revision 2477)
@@ -0,0 +1,505 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 4 -*-
+//
+// plus.h: Rcpp R/C++ interface class library -- operator+
+//
+// Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__plus_h
+#define Rcpp__sugar__plus_h
+
+namespace Rcpp{
+namespace sugar{
+
+	template <int RTYPE, bool LHS_NA, typename LHS_T, bool RHS_NA, typename RHS_T >
+	class Plus_Vector_Vector : public Rcpp::VectorBase<RTYPE, true , Plus_Vector_Vector<RTYPE,LHS_NA,LHS_T,RHS_NA,RHS_T> > {
+	public:
+		typedef typename traits::storage_type<RTYPE>::type STORAGE ;
+		typedef typename Rcpp::VectorBase<RTYPE,LHS_NA,LHS_T> LHS_TYPE ;
+		typedef typename Rcpp::VectorBase<RTYPE,RHS_NA,RHS_T> RHS_TYPE ;
+
+		typedef typename Rcpp::traits::Extractor< RTYPE, LHS_NA, LHS_T>::type LHS_EXT ;
+		typedef typename Rcpp::traits::Extractor< RTYPE, RHS_NA, RHS_T>::type RHS_EXT ;
+
+		Plus_Vector_Vector( const LHS_TYPE& lhs_, const RHS_TYPE& rhs_ ) :
+			lhs(lhs_.get_ref()), rhs(rhs_.get_ref()) {}
+
+		inline STORAGE operator[]( R_xlen_t i ) const {
+			STORAGE lhs_ = lhs[i] ;
+			if( traits::is_na<RTYPE>(lhs_) ) return lhs_ ;
+			STORAGE rhs_ = rhs[i] ;
+			return traits::is_na<RTYPE>(rhs_) ? rhs_ : (lhs_ + rhs_) ;
+		}
+
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const LHS_EXT& lhs ;
+		const RHS_EXT& rhs ;
+	} ;
+	// specialization of the above for REALSXP because :
+	// NA_REAL + NA_REAL = NA_REAL
+	// NA_REAL + x = NA_REAL
+	// x + NA_REAL = NA_REAL
+	template <bool LHS_NA, typename LHS_T, bool RHS_NA, typename RHS_T >
+	class Plus_Vector_Vector<REALSXP,LHS_NA,LHS_T,RHS_NA,RHS_T> :
+	    public Rcpp::VectorBase<REALSXP, true , Plus_Vector_Vector<REALSXP,LHS_NA,LHS_T,RHS_NA,RHS_T> > {
+	public:
+		typedef typename Rcpp::VectorBase<REALSXP,LHS_NA,LHS_T> LHS_TYPE ;
+		typedef typename Rcpp::VectorBase<REALSXP,RHS_NA,RHS_T> RHS_TYPE ;
+
+		typedef typename Rcpp::traits::Extractor<REALSXP, LHS_NA, LHS_T>::type LHS_EXT ;
+		typedef typename Rcpp::traits::Extractor<REALSXP, RHS_NA, RHS_T>::type RHS_EXT ;
+
+		Plus_Vector_Vector( const LHS_TYPE& lhs_, const RHS_TYPE& rhs_ ) :
+			lhs(lhs_.get_ref()), rhs(rhs_.get_ref()) {}
+
+		inline double operator[]( R_xlen_t i ) const {
+			return lhs[i] + rhs[i] ;
+		}
+
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const LHS_EXT& lhs ;
+		const RHS_EXT& rhs ;
+	} ;
+
+
+
+
+	// specialization LHS_NA = false
+	template <int RTYPE, typename LHS_T, bool RHS_NA, typename RHS_T >
+	class Plus_Vector_Vector<RTYPE,false,LHS_T,RHS_NA,RHS_T> : public Rcpp::VectorBase<RTYPE,true, Plus_Vector_Vector<RTYPE,false,LHS_T,RHS_NA,RHS_T> > {
+	public:
+		typedef typename traits::storage_type<RTYPE>::type STORAGE ;
+		typedef typename Rcpp::VectorBase<RTYPE,false,LHS_T> LHS_TYPE ;
+		typedef typename Rcpp::VectorBase<RTYPE,RHS_NA,RHS_T> RHS_TYPE ;
+
+		typedef typename Rcpp::traits::Extractor< RTYPE, false, LHS_T>::type LHS_EXT ;
+		typedef typename Rcpp::traits::Extractor< RTYPE, RHS_NA, RHS_T>::type RHS_EXT ;
+
+		Plus_Vector_Vector( const LHS_TYPE& lhs_, const RHS_TYPE& rhs_ ) :
+			lhs(lhs_.get_ref()), rhs(rhs_.get_ref()){}
+
+		inline STORAGE operator[]( R_xlen_t i ) const {
+			STORAGE rhs_ = rhs[i] ;
+			if( traits::is_na<RTYPE>(rhs_) ) return rhs_ ;
+			return lhs[i] + rhs_  ;
+		}
+
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const LHS_EXT& lhs ;
+		const RHS_EXT& rhs ;
+	} ;
+	// LHS_NA = false & RTYPE = REALSXP
+	template <typename LHS_T, bool RHS_NA, typename RHS_T >
+	class Plus_Vector_Vector<REALSXP,false,LHS_T,RHS_NA,RHS_T> :
+	    public Rcpp::VectorBase<REALSXP,true, Plus_Vector_Vector<REALSXP,false,LHS_T,RHS_NA,RHS_T> > {
+	public:
+		typedef typename Rcpp::VectorBase<REALSXP,false,LHS_T> LHS_TYPE ;
+		typedef typename Rcpp::VectorBase<REALSXP,RHS_NA,RHS_T> RHS_TYPE ;
+
+		typedef typename Rcpp::traits::Extractor<REALSXP, false, LHS_T>::type LHS_EXT ;
+		typedef typename Rcpp::traits::Extractor<REALSXP, RHS_NA, RHS_T>::type RHS_EXT ;
+
+		Plus_Vector_Vector( const LHS_TYPE& lhs_, const RHS_TYPE& rhs_ ) :
+			lhs(lhs_.get_ref()), rhs(rhs_.get_ref()){}
+
+		inline double operator[]( R_xlen_t i ) const {
+			return lhs[i] + rhs[i] ;
+		}
+
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const LHS_EXT& lhs ;
+		const RHS_EXT& rhs ;
+	} ;
+
+
+
+	// specialization for RHS_NA = false
+	template <int RTYPE, bool LHS_NA, typename LHS_T, typename RHS_T >
+	class Plus_Vector_Vector<RTYPE,LHS_NA,LHS_T,false,RHS_T> : public Rcpp::VectorBase<RTYPE, true , Plus_Vector_Vector<RTYPE,LHS_NA,LHS_T,false,RHS_T> > {
+	public:
+		typedef typename traits::storage_type<RTYPE>::type STORAGE ;
+		typedef typename Rcpp::VectorBase<RTYPE,LHS_NA,LHS_T> LHS_TYPE ;
+		typedef typename Rcpp::VectorBase<RTYPE,false,RHS_T> RHS_TYPE ;
+
+		typedef typename Rcpp::traits::Extractor< RTYPE, LHS_NA, LHS_T>::type LHS_EXT ;
+		typedef typename Rcpp::traits::Extractor< RTYPE, false, RHS_T>::type RHS_EXT ;
+
+		Plus_Vector_Vector( const LHS_TYPE& lhs_, const RHS_TYPE& rhs_ ) :
+			lhs(lhs_.get_ref()), rhs(rhs_.get_ref()){}
+
+		inline STORAGE operator[]( R_xlen_t i ) const {
+			STORAGE lhs_ = lhs[i] ;
+			if( traits::is_na<RTYPE>(lhs_) ) return lhs_ ;
+			return lhs_ + rhs[i]  ;
+		}
+
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const LHS_EXT& lhs ;
+		const RHS_EXT& rhs ;
+	} ;
+    // RHS_NA = false, RTYPE = REALSXP
+	template <bool LHS_NA, typename LHS_T, typename RHS_T >
+	class Plus_Vector_Vector<REALSXP,LHS_NA,LHS_T,false,RHS_T> :
+	    public Rcpp::VectorBase<REALSXP, true , Plus_Vector_Vector<REALSXP,LHS_NA,LHS_T,false,RHS_T> > {
+	public:
+		typedef typename Rcpp::VectorBase<REALSXP,LHS_NA,LHS_T> LHS_TYPE ;
+		typedef typename Rcpp::VectorBase<REALSXP,false,RHS_T> RHS_TYPE ;
+
+		typedef typename Rcpp::traits::Extractor<REALSXP, LHS_NA, LHS_T>::type LHS_EXT ;
+		typedef typename Rcpp::traits::Extractor<REALSXP, false, RHS_T>::type RHS_EXT ;
+
+		Plus_Vector_Vector( const LHS_TYPE& lhs_, const RHS_TYPE& rhs_ ) :
+			lhs(lhs_.get_ref()), rhs(rhs_.get_ref()){}
+
+		inline double operator[]( R_xlen_t i ) const {
+			return lhs[i] + rhs[i] ;
+		}
+
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const LHS_EXT& lhs ;
+		const RHS_EXT& rhs ;
+	} ;
+
+
+
+
+	// specialization for RHS_NA = false  and LHS_NA = false
+	template <int RTYPE, typename LHS_T, typename RHS_T >
+	class Plus_Vector_Vector<RTYPE,false,LHS_T,false,RHS_T> : public Rcpp::VectorBase<RTYPE, false , Plus_Vector_Vector<RTYPE,false,LHS_T,false,RHS_T> > {
+	public:
+		typedef typename traits::storage_type<RTYPE>::type STORAGE ;
+		typedef typename Rcpp::VectorBase<RTYPE,false,LHS_T> LHS_TYPE ;
+		typedef typename Rcpp::VectorBase<RTYPE,false,RHS_T> RHS_TYPE ;
+
+		typedef typename Rcpp::traits::Extractor< RTYPE, false, LHS_T>::type LHS_EXT ;
+		typedef typename Rcpp::traits::Extractor< RTYPE, false, RHS_T>::type RHS_EXT ;
+
+		Plus_Vector_Vector( const LHS_TYPE& lhs_, const RHS_TYPE& rhs_ ) :
+			lhs(lhs_.get_ref()), rhs(rhs_.get_ref()){}
+
+		inline STORAGE operator[]( R_xlen_t i ) const {
+			return lhs[i] + rhs[i]  ;
+		}
+
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const LHS_EXT& lhs ;
+		const RHS_EXT& rhs ;
+	} ;
+	// specialization for RHS_NA = false  and LHS_NA = false, RTYPE = REALSXP
+	template <typename LHS_T, typename RHS_T >
+	class Plus_Vector_Vector<REALSXP,false,LHS_T,false,RHS_T> :
+	    public Rcpp::VectorBase<REALSXP, false , Plus_Vector_Vector<REALSXP,false,LHS_T,false,RHS_T> > {
+	public:
+		typedef typename Rcpp::VectorBase<REALSXP,false,LHS_T> LHS_TYPE ;
+		typedef typename Rcpp::VectorBase<REALSXP,false,RHS_T> RHS_TYPE ;
+
+		typedef typename Rcpp::traits::Extractor<REALSXP, false, LHS_T>::type LHS_EXT ;
+		typedef typename Rcpp::traits::Extractor<REALSXP, false, RHS_T>::type RHS_EXT ;
+
+		Plus_Vector_Vector( const LHS_TYPE& lhs_, const RHS_TYPE& rhs_ ) :
+			lhs(lhs_.get_ref()), rhs(rhs_.get_ref()){}
+
+		inline double operator[]( R_xlen_t i ) const {
+			return lhs[i] + rhs[i]  ;
+		}
+
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const LHS_EXT& lhs ;
+		const RHS_EXT& rhs ;
+	} ;
+
+
+
+
+
+
+
+	template <int RTYPE, bool NA, typename T>
+	class Plus_Vector_Primitive :
+	    public Rcpp::VectorBase<RTYPE,true, Plus_Vector_Primitive<RTYPE,NA,T> > {
+	public:
+		typedef typename Rcpp::VectorBase<RTYPE,NA,T> VEC_TYPE ;
+		typedef typename traits::storage_type<RTYPE>::type STORAGE ;
+
+		typedef typename Rcpp::traits::Extractor< RTYPE, NA, T>::type EXT ;
+
+		Plus_Vector_Primitive( const VEC_TYPE& lhs_, STORAGE rhs_ ) :
+			lhs(lhs_.get_ref()), rhs(rhs_), rhs_na( Rcpp::traits::is_na<RTYPE>(rhs_) )
+			{}
+
+		inline STORAGE operator[]( R_xlen_t i ) const {
+			if( rhs_na ) return rhs ;
+			STORAGE x = lhs[i] ;
+			return Rcpp::traits::is_na<RTYPE>(x) ? x : (x + rhs) ;
+		}
+
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const EXT& lhs ;
+		STORAGE rhs ;
+		bool rhs_na ;
+
+	} ;
+	// RTYPE = REALSXP
+	template <bool NA, typename T>
+	class Plus_Vector_Primitive<REALSXP,NA,T> :
+	    public Rcpp::VectorBase<REALSXP,true, Plus_Vector_Primitive<REALSXP,NA,T> > {
+	public:
+		typedef typename Rcpp::VectorBase<REALSXP,NA,T> VEC_TYPE ;
+		typedef typename Rcpp::traits::Extractor< REALSXP, NA, T>::type EXT ;
+
+		Plus_Vector_Primitive( const VEC_TYPE& lhs_, double rhs_ ) :
+			lhs(lhs_.get_ref()), rhs(rhs_)
+			{}
+
+		inline double operator[]( R_xlen_t i ) const {
+			return rhs + lhs[i] ;
+		}
+
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const EXT& lhs ;
+		double rhs ;
+	} ;
+
+
+
+	template <int RTYPE, typename T>
+	class Plus_Vector_Primitive<RTYPE,false,T> : public Rcpp::VectorBase<RTYPE,false, Plus_Vector_Primitive<RTYPE,false,T> > {
+	public:
+		typedef typename Rcpp::VectorBase<RTYPE,false,T> VEC_TYPE ;
+		typedef typename traits::storage_type<RTYPE>::type STORAGE ;
+
+		typedef typename Rcpp::traits::Extractor< RTYPE, false, T>::type EXT ;
+
+		Plus_Vector_Primitive( const VEC_TYPE& lhs_, STORAGE rhs_ ) :
+			lhs(lhs_.get_ref()), rhs(rhs_), rhs_na( Rcpp::traits::is_na<RTYPE>(rhs_) ) {}
+
+		inline STORAGE operator[]( R_xlen_t i ) const {
+			return rhs_na ? rhs : (rhs + lhs[i] ) ;
+		}
+
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const EXT& lhs ;
+		STORAGE rhs ;
+		bool rhs_na ;
+	} ;
+	// RTYPE = REALSXP
+	template <typename T>
+	class Plus_Vector_Primitive<REALSXP,false,T> :
+	    public Rcpp::VectorBase<REALSXP,false, Plus_Vector_Primitive<REALSXP,false,T> > {
+	public:
+		typedef typename Rcpp::VectorBase<REALSXP,false,T> VEC_TYPE ;
+
+		typedef typename Rcpp::traits::Extractor< REALSXP, false, T>::type EXT ;
+
+		Plus_Vector_Primitive( const VEC_TYPE& lhs_, double rhs_ ) :
+			lhs(lhs_.get_ref()), rhs(rhs_) {}
+
+		inline double operator[]( R_xlen_t i ) const {
+			return rhs + lhs[i] ;
+		}
+
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const EXT& lhs ;
+		double rhs ;
+	} ;
+
+
+
+
+
+
+	// Vector * nona(primitive)
+	template <int RTYPE, bool NA, typename T>
+	class Plus_Vector_Primitive_nona : public Rcpp::VectorBase<RTYPE,true, Plus_Vector_Primitive_nona<RTYPE,NA,T> > {
+	public:
+		typedef typename Rcpp::VectorBase<RTYPE,NA,T> VEC_TYPE ;
+		typedef typename traits::storage_type<RTYPE>::type STORAGE ;
+		typedef typename Rcpp::traits::Extractor< RTYPE, NA, T>::type EXT ;
+
+		Plus_Vector_Primitive_nona( const VEC_TYPE& lhs_, STORAGE rhs_ ) :
+			lhs(lhs_.get_ref()), rhs(rhs_)
+			{}
+
+		inline STORAGE operator[]( R_xlen_t i ) const {
+			STORAGE x = lhs[i] ;
+			return Rcpp::traits::is_na<RTYPE>(x) ? x : (x + rhs) ;
+		}
+
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const EXT& lhs ;
+		STORAGE rhs ;
+
+	} ;
+	template <bool NA, typename T>
+	class Plus_Vector_Primitive_nona<REALSXP,NA,T> :
+	    public Rcpp::VectorBase<REALSXP,true, Plus_Vector_Primitive_nona<REALSXP,NA,T> > {
+	public:
+		typedef typename Rcpp::VectorBase<REALSXP,NA,T> VEC_TYPE ;
+		typedef typename Rcpp::traits::Extractor<REALSXP, NA, T>::type EXT ;
+
+		Plus_Vector_Primitive_nona( const VEC_TYPE& lhs_, double rhs_ ) :
+			lhs(lhs_.get_ref()), rhs(rhs_)
+			{}
+
+		inline double operator[]( R_xlen_t i ) const {
+			return rhs + lhs[i] ;
+		}
+
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const EXT& lhs ;
+		double rhs ;
+
+	} ;
+
+
+
+	template <int RTYPE, typename T>
+	class Plus_Vector_Primitive_nona<RTYPE,false,T> : public Rcpp::VectorBase<RTYPE,false, Plus_Vector_Primitive_nona<RTYPE,false,T> > {
+	public:
+		typedef typename Rcpp::VectorBase<RTYPE,false,T> VEC_TYPE ;
+		typedef typename traits::storage_type<RTYPE>::type STORAGE ;
+
+		typedef typename Rcpp::traits::Extractor< RTYPE, false, T>::type EXT ;
+
+		Plus_Vector_Primitive_nona( const VEC_TYPE& lhs_, STORAGE rhs_ ) :
+			lhs(lhs_.get_ref()), rhs(rhs_) {}
+
+		inline STORAGE operator[]( R_xlen_t i ) const {
+			return rhs + lhs[i] ;
+		}
+
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const EXT& lhs ;
+		STORAGE rhs ;
+
+	} ;
+	// RTYPE = REALSXP
+	template <typename T>
+	class Plus_Vector_Primitive_nona<REALSXP,false,T> :
+	    public Rcpp::VectorBase<REALSXP,false, Plus_Vector_Primitive_nona<REALSXP,false,T> > {
+	public:
+		typedef typename Rcpp::VectorBase<REALSXP,false,T> VEC_TYPE ;
+		typedef typename Rcpp::traits::Extractor< REALSXP, false, T>::type EXT ;
+
+		Plus_Vector_Primitive_nona( const VEC_TYPE& lhs_, double rhs_ ) :
+			lhs(lhs_.get_ref()), rhs(rhs_) {}
+
+		inline double operator[]( R_xlen_t i ) const {
+			return rhs + lhs[i] ;
+		}
+
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const EXT& lhs ;
+		double rhs ;
+
+	} ;
+
+}
+
+
+template <int RTYPE,bool NA, typename T, typename U>
+inline typename traits::enable_if<traits::is_convertible<typename traits::remove_const_and_reference<U>::type, typename traits::storage_type<RTYPE>::type>::value, typename sugar::Plus_Vector_Primitive<RTYPE,NA,T> >::type
+operator+(
+	const VectorBase<RTYPE,NA,T>& lhs,
+	const U &rhs
+) {
+	return sugar::Plus_Vector_Primitive<RTYPE,NA,T>( lhs, rhs ) ;
+}
+
+
+template <int RTYPE,bool NA, typename T, typename U>
+inline typename traits::enable_if<traits::is_convertible<typename traits::remove_const_and_reference<U>::type, typename traits::storage_type<RTYPE>::type>::value, typename sugar::Plus_Vector_Primitive< RTYPE , NA , T> >::type
+operator+(
+	const U &rhs,
+	const VectorBase<RTYPE,NA,T>& lhs
+) {
+	return sugar::Plus_Vector_Primitive<RTYPE,NA, T >( lhs, rhs ) ;
+}
+
+
+
+template <int RTYPE,bool NA, typename T, typename U>
+inline typename traits::enable_if<traits::is_convertible<typename traits::remove_const_and_reference<U>::type, typename traits::storage_type<RTYPE>::type>::value, sugar::Plus_Vector_Primitive_nona<RTYPE,NA,T> >::type
+operator+(
+	const VectorBase<RTYPE,NA,T>& lhs,
+	const typename sugar::NonaPrimitive< U > &rhs
+) {
+	return sugar::Plus_Vector_Primitive_nona<RTYPE,NA,T>( lhs, rhs ) ;
+}
+
+template <int RTYPE,bool NA, typename T, typename U>
+inline typename traits::enable_if<traits::is_convertible<typename traits::remove_const_and_reference<U>::type, typename traits::storage_type<RTYPE>::type>::value, sugar::Plus_Vector_Primitive_nona< RTYPE , NA , T> >::type
+operator+(
+	const typename sugar::NonaPrimitive< U > &rhs,
+	const VectorBase<RTYPE,NA,T>& lhs
+) {
+	return sugar::Plus_Vector_Primitive_nona<RTYPE,NA, T >( lhs, rhs ) ;
+}
+
+
+template <int RTYPE,bool LHS_NA, typename LHS_T, bool RHS_NA, typename RHS_T>
+inline sugar::Plus_Vector_Vector<
+	RTYPE ,
+	LHS_NA, LHS_T,
+	RHS_NA, RHS_T
+	>
+operator+(
+	const VectorBase<RTYPE,LHS_NA,LHS_T>& lhs,
+	const VectorBase<RTYPE,RHS_NA,RHS_T>& rhs
+) {
+	return sugar::Plus_Vector_Vector<
+		RTYPE,
+		LHS_NA, LHS_T,
+		RHS_NA, RHS_T
+		>( lhs, rhs ) ;
+}
+
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/operators/r_binary_op.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/operators/r_binary_op.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/operators/r_binary_op.h	(revision 2477)
@@ -0,0 +1,50 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// LessThan.h: Rcpp R/C++ interface class library -- vector operators
+//
+// Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__r_binary_op_h
+#define Rcpp__sugar__r_binary_op_h
+
+namespace Rcpp{
+namespace sugar{
+
+#undef RCPP_OP
+#define RCPP_OP(NAME,OP)   	                                     \
+template <int RTYPE>                                                \
+class NAME {                                                        \
+public:                                                             \
+	typedef typename traits::storage_type<RTYPE>::type STORAGE ;    \
+	inline int operator()( STORAGE lhs, STORAGE rhs) const {       \
+		return lhs OP rhs ;                                         \
+	}                                                               \
+} ;
+RCPP_OP(less,<)
+RCPP_OP(greater,>)
+RCPP_OP(less_or_equal,<=)
+RCPP_OP(greater_or_equal,>=)
+RCPP_OP(equal,==)
+RCPP_OP(not_equal,!=)
+#undef RCPP_OP
+
+
+} // sugar
+} // Rcpp
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/operators/Comparator.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/operators/Comparator.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/operators/Comparator.h	(revision 2477)
@@ -0,0 +1,117 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// LessThan.h: Rcpp R/C++ interface class library -- vector operators
+//
+// Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__Comparator_h
+#define Rcpp__sugar__Comparator_h
+
+namespace Rcpp{
+namespace sugar{
+
+template <int RTYPE, typename Operator, bool LHS_NA, typename LHS_T, bool RHS_NA, typename RHS_T>
+class Comparator :
+	public ::Rcpp::VectorBase< LGLSXP, true, Comparator<RTYPE,Operator,LHS_NA,LHS_T,RHS_NA,RHS_T> > {
+
+public:
+	typedef typename Rcpp::VectorBase<RTYPE,LHS_NA,LHS_T> LHS_TYPE ;
+	typedef typename Rcpp::VectorBase<RTYPE,RHS_NA,RHS_T> RHS_TYPE ;
+	typedef typename traits::storage_type<RTYPE>::type STORAGE ;
+
+	Comparator( const LHS_TYPE& lhs_, const RHS_TYPE& rhs_) :
+		lhs(lhs_), rhs(rhs_), op() {}
+
+	inline int operator[]( R_xlen_t i ) const {
+		STORAGE x = lhs[i] ;
+		if( Rcpp::traits::is_na<RTYPE>( x ) ) return NA_LOGICAL ;
+		STORAGE y = rhs[i] ;
+		if( Rcpp::traits::is_na<RTYPE>( y ) ) return NA_LOGICAL ;
+		return op( x, y ) ;
+	}
+
+	inline R_xlen_t size() const { return lhs.size() ; }
+
+private:
+	const LHS_TYPE& lhs ;
+	const RHS_TYPE& rhs ;
+	Operator op ;
+
+} ;
+
+
+
+template <int RTYPE, typename Operator, typename LHS_T, bool RHS_NA, typename RHS_T>
+class Comparator<RTYPE,Operator,false,LHS_T,RHS_NA,RHS_T> :
+	public ::Rcpp::VectorBase< LGLSXP, true, Comparator<RTYPE,Operator,false,LHS_T,RHS_NA,RHS_T> > {
+
+public:
+	typedef typename Rcpp::VectorBase<RTYPE,false,LHS_T> LHS_TYPE ;
+	typedef typename Rcpp::VectorBase<RTYPE,RHS_NA,RHS_T> RHS_TYPE ;
+	typedef typename traits::storage_type<RTYPE>::type STORAGE ;
+
+	Comparator( const LHS_TYPE& lhs_, const RHS_TYPE& rhs_) :
+		lhs(lhs_), rhs(rhs_), op() {}
+
+	inline int operator[]( R_xlen_t i ) const {
+		STORAGE y = rhs[i] ;
+		if( Rcpp::traits::is_na<RTYPE>( y ) ) return NA_LOGICAL ;
+		return op( lhs[i], y ) ;
+	}
+
+	inline R_xlen_t size() const { return lhs.size() ; }
+
+private:
+	const LHS_TYPE& lhs ;
+	const RHS_TYPE& rhs ;
+	Operator op ;
+
+} ;
+
+
+template <int RTYPE, typename Operator, typename LHS_T, typename RHS_T>
+class Comparator<RTYPE,Operator,false,LHS_T,false,RHS_T> :
+	public ::Rcpp::VectorBase< LGLSXP, true, Comparator<RTYPE,Operator,false,LHS_T,false,RHS_T> > {
+
+public:
+	typedef typename Rcpp::VectorBase<RTYPE,false,LHS_T> LHS_TYPE ;
+	typedef typename Rcpp::VectorBase<RTYPE,false,RHS_T> RHS_TYPE ;
+	typedef typename traits::storage_type<RTYPE>::type STORAGE ;
+
+	Comparator( const LHS_TYPE& lhs_, const RHS_TYPE& rhs_) :
+		lhs(lhs_), rhs(rhs_), op() {}
+
+	inline int operator[]( R_xlen_t i ) const {
+		return op( lhs[i], rhs[i] ) ;
+	}
+
+	inline R_xlen_t size() const { return lhs.size() ; }
+
+private:
+	const LHS_TYPE& lhs ;
+	const RHS_TYPE& rhs ;
+	Operator op ;
+
+} ;
+
+
+}
+}
+
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/operators/divides.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/operators/divides.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/operators/divides.h	(revision 2477)
@@ -0,0 +1,449 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// divides.h: Rcpp R/C++ interface class library -- operator-
+//
+// Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__divides_h
+#define Rcpp__sugar__divides_h
+
+namespace Rcpp{
+namespace sugar{
+
+	template <int RTYPE, bool LHS_NA, typename LHS_T, bool RHS_NA, typename RHS_T >
+	class Divides_Vector_Vector : public Rcpp::VectorBase<RTYPE,true, Divides_Vector_Vector<RTYPE,LHS_NA,LHS_T,RHS_NA,RHS_T> > {
+	public:
+		typedef typename Rcpp::VectorBase<RTYPE,LHS_NA,LHS_T> LHS_TYPE ;
+		typedef typename Rcpp::VectorBase<RTYPE,RHS_NA,RHS_T> RHS_TYPE ;
+		typedef typename traits::storage_type<RTYPE>::type STORAGE ;
+		typedef typename Rcpp::traits::Extractor< RTYPE, LHS_NA, LHS_T>::type LHS_EXT ;
+		typedef typename Rcpp::traits::Extractor< RTYPE, RHS_NA, RHS_T>::type RHS_EXT ;
+
+		Divides_Vector_Vector( const LHS_TYPE& lhs_, const RHS_TYPE& rhs_ ) :
+			lhs(lhs_.get_ref()), rhs(rhs_.get_ref()) {}
+
+		inline STORAGE operator[]( R_xlen_t i ) const {
+			STORAGE x = lhs[i] ;
+			if( Rcpp::traits::is_na<RTYPE>( x ) ) return x ;
+			STORAGE y = rhs[i] ;
+			return Rcpp::traits::is_na<RTYPE>( y ) ? y : ( x / y ) ;
+		}
+
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const LHS_EXT& lhs ;
+		const RHS_EXT& rhs ;
+	} ;
+	// RTYPE = REALSXP
+	template <bool LHS_NA, typename LHS_T, bool RHS_NA, typename RHS_T >
+	class Divides_Vector_Vector<REALSXP,LHS_NA,LHS_T,RHS_NA,RHS_T> :
+	    public Rcpp::VectorBase<REALSXP,true, Divides_Vector_Vector<REALSXP,LHS_NA,LHS_T,RHS_NA,RHS_T> > {
+	public:
+		typedef typename Rcpp::VectorBase<REALSXP,LHS_NA,LHS_T> LHS_TYPE ;
+		typedef typename Rcpp::VectorBase<REALSXP,RHS_NA,RHS_T> RHS_TYPE ;
+		typedef typename Rcpp::traits::Extractor<REALSXP, LHS_NA, LHS_T>::type LHS_EXT ;
+		typedef typename Rcpp::traits::Extractor<REALSXP, RHS_NA, RHS_T>::type RHS_EXT ;
+
+		Divides_Vector_Vector( const LHS_TYPE& lhs_, const RHS_TYPE& rhs_ ) :
+			lhs(lhs_.get_ref()), rhs(rhs_.get_ref()) {}
+
+		inline double operator[]( R_xlen_t i ) const {
+			return lhs[i] / rhs[i] ;
+		}
+
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const LHS_EXT& lhs ;
+		const RHS_EXT& rhs ;
+	} ;
+
+
+	template <int RTYPE, typename LHS_T, bool RHS_NA, typename RHS_T >
+	class Divides_Vector_Vector<RTYPE,false,LHS_T,RHS_NA,RHS_T> : public Rcpp::VectorBase<RTYPE,true, Divides_Vector_Vector<RTYPE,false,LHS_T,RHS_NA,RHS_T> > {
+	public:
+		typedef typename Rcpp::VectorBase<RTYPE,false,LHS_T> LHS_TYPE ;
+		typedef typename Rcpp::VectorBase<RTYPE,RHS_NA,RHS_T> RHS_TYPE ;
+		typedef typename traits::storage_type<RTYPE>::type STORAGE ;
+		typedef typename Rcpp::traits::Extractor< RTYPE, false, LHS_T>::type LHS_EXT ;
+		typedef typename Rcpp::traits::Extractor< RTYPE, RHS_NA, RHS_T>::type RHS_EXT ;
+
+		Divides_Vector_Vector( const LHS_TYPE& lhs_, const RHS_TYPE& rhs_ ) :
+			lhs(lhs_.get_ref()), rhs(rhs_.get_ref()) {}
+
+		inline STORAGE operator[]( R_xlen_t i ) const {
+			STORAGE y = rhs[i] ;
+			if( Rcpp::traits::is_na<RTYPE>( y ) ) return y ;
+			return lhs[i] / y ;
+		}
+
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const LHS_EXT& lhs ;
+		const RHS_EXT& rhs ;
+	} ;
+	// RTYPE = REALSXP
+	template <typename LHS_T, bool RHS_NA, typename RHS_T >
+	class Divides_Vector_Vector<REALSXP,false,LHS_T,RHS_NA,RHS_T> :
+	    public Rcpp::VectorBase<REALSXP,true, Divides_Vector_Vector<REALSXP,false,LHS_T,RHS_NA,RHS_T> > {
+	public:
+		typedef typename Rcpp::VectorBase<REALSXP,false,LHS_T> LHS_TYPE ;
+		typedef typename Rcpp::VectorBase<REALSXP,RHS_NA,RHS_T> RHS_TYPE ;
+		typedef typename Rcpp::traits::Extractor<REALSXP, false, LHS_T>::type LHS_EXT ;
+		typedef typename Rcpp::traits::Extractor<REALSXP, RHS_NA, RHS_T>::type RHS_EXT ;
+
+		Divides_Vector_Vector( const LHS_TYPE& lhs_, const RHS_TYPE& rhs_ ) :
+			lhs(lhs_.get_ref()), rhs(rhs_.get_ref()) {}
+
+		inline double operator[]( R_xlen_t i ) const {
+			return lhs[i] / rhs[i] ;
+		}
+
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const LHS_EXT& lhs ;
+		const RHS_EXT& rhs ;
+	} ;
+
+
+	template <int RTYPE, bool LHS_NA, typename LHS_T, typename RHS_T >
+	class Divides_Vector_Vector<RTYPE,LHS_NA,LHS_T,false,RHS_T> :
+	    public Rcpp::VectorBase<RTYPE,true, Divides_Vector_Vector<RTYPE,LHS_NA,LHS_T,false,RHS_T> > {
+	public:
+		typedef typename Rcpp::VectorBase<RTYPE,LHS_NA,LHS_T> LHS_TYPE ;
+		typedef typename Rcpp::VectorBase<RTYPE,false,RHS_T> RHS_TYPE ;
+		typedef typename traits::storage_type<RTYPE>::type STORAGE ;
+		typedef typename Rcpp::traits::Extractor< RTYPE, LHS_NA, LHS_T>::type LHS_EXT ;
+		typedef typename Rcpp::traits::Extractor< RTYPE, false, RHS_T>::type RHS_EXT ;
+
+		Divides_Vector_Vector( const LHS_TYPE& lhs_, const RHS_TYPE& rhs_ ) :
+			lhs(lhs_.get_ref()), rhs(rhs_.get_ref()) {}
+
+		inline STORAGE operator[]( R_xlen_t i ) const {
+			STORAGE x = lhs[i] ;
+			if( Rcpp::traits::is_na<RTYPE>( x ) ) return x ;
+			return x / rhs[i] ;
+		}
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const LHS_EXT& lhs ;
+		const RHS_EXT& rhs ;
+	} ;
+	// RTYPE = REALSXP
+	template <bool LHS_NA, typename LHS_T, typename RHS_T >
+	class Divides_Vector_Vector<REALSXP,LHS_NA,LHS_T,false,RHS_T> :
+	    public Rcpp::VectorBase<REALSXP,true, Divides_Vector_Vector<REALSXP,LHS_NA,LHS_T,false,RHS_T> > {
+	public:
+		typedef typename Rcpp::VectorBase<REALSXP,LHS_NA,LHS_T> LHS_TYPE ;
+		typedef typename Rcpp::VectorBase<REALSXP,false,RHS_T> RHS_TYPE ;
+		typedef typename Rcpp::traits::Extractor<REALSXP, LHS_NA, LHS_T>::type LHS_EXT ;
+		typedef typename Rcpp::traits::Extractor<REALSXP, false, RHS_T>::type RHS_EXT ;
+
+		Divides_Vector_Vector( const LHS_TYPE& lhs_, const RHS_TYPE& rhs_ ) :
+			lhs(lhs_.get_ref()), rhs(rhs_.get_ref()) {}
+
+		inline double operator[]( R_xlen_t i ) const {
+			return lhs[i] / rhs[i] ;
+		}
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const LHS_EXT& lhs ;
+		const RHS_EXT& rhs ;
+	} ;
+
+
+	template <int RTYPE, typename LHS_T, typename RHS_T >
+	class Divides_Vector_Vector<RTYPE,false,LHS_T,false,RHS_T> :
+	    public Rcpp::VectorBase<RTYPE,false, Divides_Vector_Vector<RTYPE,false,LHS_T,false,RHS_T> > {
+	public:
+		typedef typename Rcpp::VectorBase<RTYPE,false,LHS_T> LHS_TYPE ;
+		typedef typename Rcpp::VectorBase<RTYPE,false,RHS_T> RHS_TYPE ;
+		typedef typename traits::storage_type<RTYPE>::type STORAGE ;
+		typedef typename Rcpp::traits::Extractor<RTYPE, false, LHS_T>::type LHS_EXT ;
+		typedef typename Rcpp::traits::Extractor<RTYPE, false, RHS_T>::type RHS_EXT ;
+
+		Divides_Vector_Vector( const LHS_TYPE& lhs_, const RHS_TYPE& rhs_ ) :
+			lhs(lhs_.get_ref()), rhs(rhs_.get_ref()) {}
+
+		inline STORAGE operator[]( R_xlen_t i ) const {
+			return lhs[i] / rhs[i] ;
+		}
+
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const LHS_EXT& lhs ;
+		const RHS_EXT& rhs ;
+	} ;
+    // RTYPE : REALSXP
+    template <typename LHS_T, typename RHS_T >
+	class Divides_Vector_Vector<REALSXP,false,LHS_T,false,RHS_T> :
+	    public Rcpp::VectorBase<REALSXP,false, Divides_Vector_Vector<REALSXP,false,LHS_T,false,RHS_T> > {
+	public:
+		typedef typename Rcpp::VectorBase<REALSXP,false,LHS_T> LHS_TYPE ;
+		typedef typename Rcpp::VectorBase<REALSXP,false,RHS_T> RHS_TYPE ;
+		typedef typename Rcpp::traits::Extractor<REALSXP, false, LHS_T>::type LHS_EXT ;
+		typedef typename Rcpp::traits::Extractor<REALSXP, false, RHS_T>::type RHS_EXT ;
+
+		Divides_Vector_Vector( const LHS_TYPE& lhs_, const RHS_TYPE& rhs_ ) :
+			lhs(lhs_.get_ref()), rhs(rhs_.get_ref()) {}
+
+		inline double operator[]( R_xlen_t i ) const {
+			return lhs[i] / rhs[i] ;
+		}
+
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const LHS_EXT& lhs ;
+		const RHS_EXT& rhs ;
+	} ;
+
+
+
+
+	template <int RTYPE, bool NA, typename T>
+	class Divides_Vector_Primitive :
+	    public Rcpp::VectorBase<RTYPE,true, Divides_Vector_Primitive<RTYPE,NA,T> > {
+	public:
+		typedef typename traits::storage_type<RTYPE>::type STORAGE ;
+		typedef typename Rcpp::VectorBase<RTYPE,NA,T> VEC_TYPE ;
+		typedef typename Rcpp::traits::Extractor<RTYPE,NA,T>::type VEC_EXT ;
+
+		Divides_Vector_Primitive( const VEC_TYPE& lhs_, STORAGE rhs_ ) :
+			lhs(lhs_.get_ref()), rhs(rhs_), rhs_na( Rcpp::traits::is_na<RTYPE>(rhs_) ) {
+		}
+
+		inline STORAGE operator[]( R_xlen_t i ) const {
+			if(rhs_na) return rhs ;
+			STORAGE x = lhs[i] ;
+			return Rcpp::traits::is_na<RTYPE>(x) ? x : (x / rhs) ;
+		}
+
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const VEC_EXT& lhs ;
+		STORAGE rhs ;
+		bool rhs_na ;
+	} ;
+	// RTYPE : REALSXP
+	template <bool NA, typename T>
+	class Divides_Vector_Primitive<REALSXP,NA,T> :
+	    public Rcpp::VectorBase<REALSXP,true, Divides_Vector_Primitive<REALSXP,NA,T> > {
+	public:
+		typedef typename Rcpp::VectorBase<REALSXP,NA,T> VEC_TYPE ;
+		typedef typename Rcpp::traits::Extractor<REALSXP,NA,T>::type VEC_EXT ;
+
+		Divides_Vector_Primitive( const VEC_TYPE& lhs_, double rhs_ ) :
+			lhs(lhs_.get_ref()), rhs(rhs_) {
+		}
+
+		inline double operator[]( R_xlen_t i ) const {
+			return lhs[i] / rhs ;
+		}
+
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const VEC_EXT& lhs ;
+		double rhs ;
+	} ;
+
+
+
+	template <int RTYPE, typename T>
+	class Divides_Vector_Primitive<RTYPE,false,T> :
+	    public Rcpp::VectorBase<RTYPE,true, Divides_Vector_Primitive<RTYPE,false,T> > {
+	public:
+		typedef typename traits::storage_type<RTYPE>::type STORAGE ;
+		typedef typename Rcpp::VectorBase<RTYPE,false,T> VEC_TYPE ;
+		typedef typename Rcpp::traits::Extractor<RTYPE,false,T>::type VEC_EXT ;
+
+		Divides_Vector_Primitive( const VEC_TYPE& lhs_, STORAGE rhs_ ) :
+			lhs(lhs_.get_ref()), rhs(rhs_), rhs_na( Rcpp::traits::is_na<RTYPE>(rhs_) ) {}
+
+		inline STORAGE operator[]( R_xlen_t i ) const {
+			if( rhs_na ) return rhs ;
+			STORAGE x = lhs[i] ;
+			return Rcpp::traits::is_na<RTYPE>(x) ? x : (x / rhs) ;
+		}
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const VEC_EXT& lhs ;
+		STORAGE rhs ;
+		bool rhs_na ;
+	} ;
+	// RTYPE = REALSXP
+	template <typename T>
+	class Divides_Vector_Primitive<REALSXP,false,T> :
+	    public Rcpp::VectorBase<REALSXP,true, Divides_Vector_Primitive<REALSXP,false,T> > {
+	public:
+		typedef typename Rcpp::VectorBase<REALSXP,false,T> VEC_TYPE ;
+		typedef typename Rcpp::traits::Extractor<REALSXP,false,T>::type VEC_EXT ;
+
+		Divides_Vector_Primitive( const VEC_TYPE& lhs_, double rhs_ ) :
+			lhs(lhs_), rhs(rhs_){}
+
+		inline double operator[]( R_xlen_t i ) const {
+			return lhs[i] / rhs ;
+		}
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const VEC_EXT& lhs ;
+		double rhs ;
+	} ;
+
+
+
+	template <int RTYPE, bool NA, typename T>
+	class Divides_Primitive_Vector :
+	    public Rcpp::VectorBase<RTYPE,true, Divides_Primitive_Vector<RTYPE,NA,T> > {
+	public:
+		typedef typename Rcpp::VectorBase<RTYPE,NA,T> VEC_TYPE ;
+		typedef typename Rcpp::traits::Extractor<RTYPE,NA,T>::type VEC_EXT ;
+		typedef typename traits::storage_type<RTYPE>::type STORAGE ;
+
+		Divides_Primitive_Vector( STORAGE lhs_, const VEC_TYPE& rhs_ ) :
+			lhs(lhs_), rhs(rhs_.get_ref()), lhs_na( Rcpp::traits::is_na<RTYPE>(lhs_) ) {}
+
+		inline STORAGE operator[]( R_xlen_t i ) const {
+			if( lhs_na ) return lhs ;
+			STORAGE x = rhs[i] ;
+			return Rcpp::traits::is_na<RTYPE>(x) ? x : (lhs / x) ;
+		}
+		inline R_xlen_t size() const { return rhs.size() ; }
+	private:
+		STORAGE lhs ;
+		const VEC_EXT& rhs ;
+		bool lhs_na ;
+	} ;
+	// RTYPE = REALSXP
+	template <bool NA, typename T>
+	class Divides_Primitive_Vector<REALSXP,NA,T> :
+	    public Rcpp::VectorBase<REALSXP,true, Divides_Primitive_Vector<REALSXP,NA,T> > {
+	public:
+		typedef typename Rcpp::VectorBase<REALSXP,NA,T> VEC_TYPE ;
+		typedef typename Rcpp::traits::Extractor<REALSXP,NA,T>::type VEC_EXT ;
+
+		Divides_Primitive_Vector( double lhs_, const VEC_TYPE& rhs_ ) :
+			lhs(lhs_), rhs(rhs_.get_ref()) {}
+
+		inline double operator[]( R_xlen_t i ) const {
+			return lhs / rhs[i] ;
+		}
+		inline R_xlen_t size() const { return rhs.size() ; }
+	private:
+		double lhs ;
+		const VEC_EXT& rhs ;
+	} ;
+
+
+
+	template <int RTYPE, typename T>
+	class Divides_Primitive_Vector<RTYPE,false,T> :
+	    public Rcpp::VectorBase<RTYPE,true, Divides_Primitive_Vector<RTYPE,false,T> > {
+	public:
+		typedef typename Rcpp::VectorBase<RTYPE,false,T> VEC_TYPE ;
+		typedef typename traits::storage_type<RTYPE>::type STORAGE ;
+		typedef typename Rcpp::traits::Extractor<RTYPE,false,T>::type VEC_EXT ;
+
+		Divides_Primitive_Vector( STORAGE lhs_, const VEC_TYPE& rhs_ ) :
+			lhs(lhs_), rhs(rhs_.get_ref()), lhs_na( Rcpp::traits::is_na<RTYPE>(lhs_) ) {}
+
+		inline STORAGE operator[]( R_xlen_t i ) const {
+			if( lhs_na ) return lhs ;
+			return lhs / rhs[i] ;
+		}
+		inline R_xlen_t size() const { return rhs.size() ; }
+
+	private:
+		STORAGE lhs ;
+		const VEC_EXT& rhs ;
+		bool lhs_na ;
+	} ;
+	// RTYPE = REALSXP
+	template <typename T>
+	class Divides_Primitive_Vector<REALSXP,false,T> :
+	    public Rcpp::VectorBase<REALSXP,true, Divides_Primitive_Vector<REALSXP,false,T> > {
+	public:
+		typedef typename Rcpp::VectorBase<REALSXP,false,T> VEC_TYPE ;
+		typedef typename Rcpp::traits::Extractor<REALSXP,false,T>::type VEC_EXT ;
+
+		Divides_Primitive_Vector( double lhs_, const VEC_TYPE& rhs_ ) :
+			lhs(lhs_), rhs(rhs_.get_ref()) {}
+
+		inline double operator[]( R_xlen_t i ) const {
+			return lhs / rhs[i] ;
+		}
+		inline R_xlen_t size() const { return rhs.size() ; }
+
+	private:
+		double lhs ;
+		const VEC_EXT& rhs ;
+	} ;
+
+
+}
+
+template <int RTYPE,bool NA, typename T, typename U>
+inline typename traits::enable_if<traits::is_convertible<typename traits::remove_const_and_reference<U>::type, typename traits::storage_type<RTYPE>::type>::value, sugar::Divides_Vector_Primitive< RTYPE , NA, T > >::type
+operator/(
+	const VectorBase<RTYPE,NA,T>& lhs,
+	const U &rhs
+) {
+	return sugar::Divides_Vector_Primitive<RTYPE,NA,T>( lhs, rhs ) ;
+}
+
+
+template <int RTYPE,bool NA, typename T, typename U>
+inline typename traits::enable_if< traits::is_convertible< typename traits::remove_const_and_reference<U>::type, typename traits::storage_type<RTYPE>::type>::value, sugar::Divides_Primitive_Vector< RTYPE , NA,T> >::type
+operator/(
+	const U &lhs,
+	const VectorBase<RTYPE,NA,T>& rhs
+) {
+	return sugar::Divides_Primitive_Vector<RTYPE,NA,T>( lhs, rhs ) ;
+}
+
+template <int RTYPE,bool LHS_NA, typename LHS_T, bool RHS_NA, typename RHS_T>
+inline sugar::Divides_Vector_Vector<
+	RTYPE ,
+	LHS_NA, LHS_T,
+	RHS_NA, RHS_T
+	>
+operator/(
+	const VectorBase<RTYPE,LHS_NA,LHS_T>& lhs,
+	const VectorBase<RTYPE,RHS_NA,RHS_T>& rhs
+) {
+	return sugar::Divides_Vector_Vector<
+		RTYPE,
+		LHS_NA,LHS_T,
+		RHS_NA,RHS_T
+		>( lhs, rhs ) ;
+}
+
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/operators/unary_minus.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/operators/unary_minus.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/operators/unary_minus.h	(revision 2477)
@@ -0,0 +1,120 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// unary_minus.h: Rcpp R/C++ interface class library -- unary operator-
+//
+// Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__unary_minus_h
+#define Rcpp__sugar__unary_minus_h
+
+namespace Rcpp{
+namespace sugar{
+
+	template <int RTYPE>
+	struct unary_minus_result_type{
+		typedef typename traits::storage_type<RTYPE>::type type ;
+		enum{ value = RTYPE } ;
+	} ;
+	template <>
+	struct unary_minus_result_type<LGLSXP>{
+		typedef traits::storage_type<INTSXP>::type type ;
+		enum{ value = INTSXP } ;
+	} ;
+
+
+	template <int RTYPE,bool NA>
+	class unary_minus {
+	public:
+		typedef typename traits::storage_type<RTYPE>::type STORAGE ;
+		typedef typename unary_minus_result_type<RTYPE>::type RESULT ;
+		inline RESULT apply( STORAGE x ) const {
+			return Rcpp::traits::is_na<RTYPE>(x) ? x : ( -x ) ;
+		}
+	} ;
+	template <int RTYPE>
+	class unary_minus<RTYPE,false> {
+	public:
+		typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
+		typedef typename unary_minus_result_type<RTYPE>::type RESULT ;
+		inline RESULT apply( STORAGE x ) const {
+			return -x ;
+		}
+	} ;
+	template <bool NA>
+	class unary_minus<CPLXSXP,NA>{
+	public:
+		inline Rcomplex apply( Rcomplex x ) const {
+			if (Rcpp::traits::is_na<CPLXSXP>( x ) ) return x;
+
+			Rcomplex cx ;
+			cx.r = -x.r;
+			cx.i = -x.i ;
+			return cx ;
+		}
+	} ;
+	template <>
+	class unary_minus<CPLXSXP,false>{
+	public:
+		inline Rcomplex apply( Rcomplex x ) const {
+			Rcomplex cx ;
+			cx.r = -x.r;
+			cx.i = -x.i ;
+			return cx ;
+		}
+	} ;
+
+
+	template <int RTYPE, bool NA, typename T>
+	class UnaryMinus_Vector : public Rcpp::VectorBase<
+		unary_minus_result_type<RTYPE>::value ,
+		NA,
+		UnaryMinus_Vector< unary_minus_result_type<RTYPE>::value ,NA,T>
+		> {
+	public:
+		typedef typename Rcpp::VectorBase<RTYPE,NA,T> VEC_TYPE ;
+		typedef typename traits::storage_type<RTYPE>::type STORAGE ;
+		typedef typename unary_minus_result_type<RTYPE>::type RESULT ;
+		typedef unary_minus<RTYPE,NA> OPERATOR ;
+
+		UnaryMinus_Vector( const VEC_TYPE& lhs_ ) :
+			lhs(lhs_), op() {}
+
+		inline RESULT operator[]( R_xlen_t i ) const {
+			return op.apply( lhs[i] ) ;
+		}
+
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const VEC_TYPE& lhs ;
+		OPERATOR op ;
+	} ;
+
+}
+}
+
+template <int RTYPE,bool NA, typename T>
+inline Rcpp::sugar::UnaryMinus_Vector< RTYPE , NA , T >
+operator-(
+	const Rcpp::VectorBase<RTYPE,NA,T>& x
+) {
+	return Rcpp::sugar::UnaryMinus_Vector<RTYPE,NA, T >( x ) ;
+}
+
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/operators/logical_operators__Vector__Vector.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/operators/logical_operators__Vector__Vector.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/operators/logical_operators__Vector__Vector.h	(revision 2477)
@@ -0,0 +1,153 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// logical_operators__Vector__Vector.h: Rcpp R/C++ interface class library --
+//    logical operators for Vector to Vector comparisons
+//
+// Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__logical_operators__Vector__Vector_h
+#define Rcpp__sugar__logical_operators__Vector__Vector_h
+
+/* Vector < Vector */
+template <int RTYPE,bool LHS_NA,typename LHS_T,bool RHS_NA, typename RHS_T>
+inline Rcpp::sugar::Comparator<
+	RTYPE ,
+	Rcpp::sugar::less<RTYPE>,
+	LHS_NA, LHS_T,
+	RHS_NA, RHS_T
+	>
+operator<(
+	const Rcpp::VectorBase<RTYPE,LHS_NA,LHS_T>& lhs ,
+	const Rcpp::VectorBase<RTYPE,RHS_NA,RHS_T>& rhs
+	){
+	return Rcpp::sugar::Comparator<
+		RTYPE,
+		Rcpp::sugar::less<RTYPE>,
+		LHS_NA, LHS_T,
+		RHS_NA, RHS_T
+		>(
+		lhs, rhs
+		) ;
+}
+/* Vector > Vector */
+template <int RTYPE,bool LHS_NA,typename LHS_T,bool RHS_NA, typename RHS_T>
+inline Rcpp::sugar::Comparator<
+	RTYPE ,
+	Rcpp::sugar::greater<RTYPE>,
+	LHS_NA, LHS_T,
+	RHS_NA, RHS_T
+	>
+operator>(
+	const Rcpp::VectorBase<RTYPE,LHS_NA,LHS_T>& lhs ,
+	const Rcpp::VectorBase<RTYPE,RHS_NA,RHS_T>& rhs
+	){
+	return Rcpp::sugar::Comparator<
+		RTYPE,
+		Rcpp::sugar::greater<RTYPE>,
+		LHS_NA, LHS_T,
+		RHS_NA, RHS_T
+		>(
+		lhs, rhs
+		) ;
+}
+/* Vector <= Vector */
+template <int RTYPE,bool LHS_NA,typename LHS_T,bool RHS_NA, typename RHS_T>
+inline Rcpp::sugar::Comparator<
+	RTYPE ,
+	Rcpp::sugar::less_or_equal<RTYPE>,
+	LHS_NA, LHS_T,
+	RHS_NA, RHS_T
+	>
+operator<=(
+	const Rcpp::VectorBase<RTYPE,LHS_NA,LHS_T>& lhs ,
+	const Rcpp::VectorBase<RTYPE,RHS_NA,RHS_T>& rhs
+	){
+	return Rcpp::sugar::Comparator<
+		RTYPE,
+		Rcpp::sugar::less_or_equal<RTYPE>,
+		LHS_NA, LHS_T,
+		RHS_NA, RHS_T
+		>(
+		lhs, rhs
+		) ;
+}
+/* Vector >= Vector */
+template <int RTYPE,bool LHS_NA,typename LHS_T,bool RHS_NA, typename RHS_T>
+inline Rcpp::sugar::Comparator<
+	RTYPE ,
+	Rcpp::sugar::greater_or_equal<RTYPE>,
+	LHS_NA, LHS_T,
+	RHS_NA, RHS_T
+	>
+operator>=(
+	const Rcpp::VectorBase<RTYPE,LHS_NA,LHS_T>& lhs ,
+	const Rcpp::VectorBase<RTYPE,RHS_NA,RHS_T>& rhs
+	){
+	return Rcpp::sugar::Comparator<
+		RTYPE,
+		Rcpp::sugar::greater_or_equal<RTYPE>,
+		LHS_NA, LHS_T,
+		RHS_NA, RHS_T
+		>(
+		lhs, rhs
+		) ;
+}
+/* Vector == Vector */
+template <int RTYPE,bool LHS_NA,typename LHS_T,bool RHS_NA, typename RHS_T>
+inline Rcpp::sugar::Comparator<
+	RTYPE ,
+	Rcpp::sugar::equal<RTYPE>,
+	LHS_NA, LHS_T,
+	RHS_NA, RHS_T
+	>
+operator==(
+	const Rcpp::VectorBase<RTYPE,LHS_NA,LHS_T>& lhs ,
+	const Rcpp::VectorBase<RTYPE,RHS_NA,RHS_T>& rhs
+	){
+	return Rcpp::sugar::Comparator<
+		RTYPE,
+		Rcpp::sugar::equal<RTYPE>,
+		LHS_NA, LHS_T,
+		RHS_NA, RHS_T
+		>(
+		lhs, rhs
+		) ;
+}
+/* Vector != Vector */
+template <int RTYPE,bool LHS_NA,typename LHS_T,bool RHS_NA, typename RHS_T>
+inline Rcpp::sugar::Comparator<
+	RTYPE ,
+	Rcpp::sugar::not_equal<RTYPE>,
+	LHS_NA, LHS_T,
+	RHS_NA, RHS_T
+	>
+operator!=(
+	const Rcpp::VectorBase<RTYPE,LHS_NA,LHS_T>& lhs ,
+	const Rcpp::VectorBase<RTYPE,RHS_NA,RHS_T>& rhs
+	){
+	return Rcpp::sugar::Comparator<
+		RTYPE,
+		Rcpp::sugar::not_equal<RTYPE>,
+		LHS_NA, LHS_T,
+		RHS_NA, RHS_T
+		>(
+		lhs, rhs
+		) ;
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/operators/minus.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/operators/minus.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/operators/minus.h	(revision 2477)
@@ -0,0 +1,453 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// minus.h: Rcpp R/C++ interface class library -- operator-
+//
+// Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__minus_h
+#define Rcpp__sugar__minus_h
+
+namespace Rcpp{
+namespace sugar{
+
+	template <int RTYPE, bool LHS_NA, typename LHS_T, bool RHS_NA, typename RHS_T >
+	class Minus_Vector_Vector :
+	    public Rcpp::VectorBase<RTYPE,true, Minus_Vector_Vector<RTYPE,LHS_NA,LHS_T,RHS_NA,RHS_T> > {
+	public:
+		typedef typename Rcpp::VectorBase<RTYPE,LHS_NA,LHS_T> LHS_TYPE ;
+		typedef typename Rcpp::VectorBase<RTYPE,RHS_NA,RHS_T> RHS_TYPE ;
+		typedef typename traits::storage_type<RTYPE>::type STORAGE ;
+		typedef typename Rcpp::traits::Extractor< RTYPE, LHS_NA, LHS_T>::type LHS_EXT ;
+		typedef typename Rcpp::traits::Extractor< RTYPE, RHS_NA, RHS_T>::type RHS_EXT ;
+
+		Minus_Vector_Vector( const LHS_TYPE& lhs_, const RHS_TYPE& rhs_ ) :
+			lhs(lhs_.get_ref()), rhs(rhs_.get_ref()) {}
+
+		inline STORAGE operator[]( R_xlen_t i ) const {
+			STORAGE x = lhs[i] ;
+			if( Rcpp::traits::is_na<RTYPE>( x ) ) return x ;
+			STORAGE y = rhs[i] ;
+			return Rcpp::traits::is_na<RTYPE>( y ) ? y : ( x - y ) ;
+		}
+
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const LHS_EXT& lhs ;
+		const RHS_EXT& rhs ;
+	} ;
+	// RTYPE = REALSXP
+	template <bool LHS_NA, typename LHS_T, bool RHS_NA, typename RHS_T >
+	class Minus_Vector_Vector<REALSXP,LHS_NA,LHS_T,RHS_NA,RHS_T> :
+	    public Rcpp::VectorBase<REALSXP,true, Minus_Vector_Vector<REALSXP,LHS_NA,LHS_T,RHS_NA,RHS_T> > {
+	public:
+		typedef typename Rcpp::VectorBase<REALSXP,LHS_NA,LHS_T> LHS_TYPE ;
+		typedef typename Rcpp::VectorBase<REALSXP,RHS_NA,RHS_T> RHS_TYPE ;
+		typedef typename Rcpp::traits::Extractor<REALSXP, LHS_NA, LHS_T>::type LHS_EXT ;
+		typedef typename Rcpp::traits::Extractor<REALSXP, RHS_NA, RHS_T>::type RHS_EXT ;
+
+		Minus_Vector_Vector( const LHS_TYPE& lhs_, const RHS_TYPE& rhs_ ) :
+			lhs(lhs_.get_ref()), rhs(rhs_.get_ref()) {}
+
+		inline double operator[]( R_xlen_t i ) const {
+		    return lhs[i] - rhs[i] ;
+		}
+
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const LHS_EXT& lhs ;
+		const RHS_EXT& rhs ;
+	} ;
+
+
+	template <int RTYPE, typename LHS_T, bool RHS_NA, typename RHS_T >
+	class Minus_Vector_Vector<RTYPE,false,LHS_T,RHS_NA,RHS_T> : public Rcpp::VectorBase<RTYPE,true, Minus_Vector_Vector<RTYPE,false,LHS_T,RHS_NA,RHS_T> > {
+	public:
+		typedef typename Rcpp::VectorBase<RTYPE,false,LHS_T> LHS_TYPE ;
+		typedef typename Rcpp::VectorBase<RTYPE,RHS_NA,RHS_T> RHS_TYPE ;
+		typedef typename traits::storage_type<RTYPE>::type STORAGE ;
+		typedef typename Rcpp::traits::Extractor<RTYPE, false, LHS_T>::type LHS_EXT ;
+		typedef typename Rcpp::traits::Extractor<RTYPE, RHS_NA, RHS_T>::type RHS_EXT ;
+
+		Minus_Vector_Vector( const LHS_TYPE& lhs_, const RHS_TYPE& rhs_ ) :
+			lhs(lhs_.get_ref()), rhs(rhs_.get_ref()) {}
+
+		inline STORAGE operator[]( R_xlen_t i ) const {
+			STORAGE y = rhs[i] ;
+			if( Rcpp::traits::is_na<RTYPE>( y ) ) return y ;
+			return lhs[i] - y ;
+		}
+
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const LHS_EXT& lhs ;
+		const RHS_EXT& rhs ;
+	} ;
+	// RTYPE = REALSXP
+	template <typename LHS_T, bool RHS_NA, typename RHS_T >
+	class Minus_Vector_Vector<REALSXP,false,LHS_T,RHS_NA,RHS_T> :
+	    public Rcpp::VectorBase<REALSXP,true, Minus_Vector_Vector<REALSXP,false,LHS_T,RHS_NA,RHS_T> > {
+	public:
+		typedef typename Rcpp::VectorBase<REALSXP,false,LHS_T> LHS_TYPE ;
+		typedef typename Rcpp::VectorBase<REALSXP,RHS_NA,RHS_T> RHS_TYPE ;
+		typedef typename Rcpp::traits::Extractor<REALSXP, false, LHS_T>::type LHS_EXT ;
+		typedef typename Rcpp::traits::Extractor<REALSXP, RHS_NA, RHS_T>::type RHS_EXT ;
+
+		Minus_Vector_Vector( const LHS_TYPE& lhs_, const RHS_TYPE& rhs_ ) :
+			lhs(lhs_.get_ref()), rhs(rhs_.get_ref()) {}
+
+		inline double operator[]( R_xlen_t i ) const {
+			return lhs[i] - rhs[i] ;
+		}
+
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const LHS_EXT& lhs ;
+		const RHS_EXT& rhs ;
+	} ;
+
+
+	template <int RTYPE, bool LHS_NA, typename LHS_T, typename RHS_T >
+	class Minus_Vector_Vector<RTYPE,LHS_NA,LHS_T,false,RHS_T> : public Rcpp::VectorBase<RTYPE,true, Minus_Vector_Vector<RTYPE,LHS_NA,LHS_T,false,RHS_T> > {
+	public:
+		typedef typename Rcpp::VectorBase<RTYPE,LHS_NA,LHS_T> LHS_TYPE ;
+		typedef typename Rcpp::VectorBase<RTYPE,false,RHS_T> RHS_TYPE ;
+		typedef typename traits::storage_type<RTYPE>::type STORAGE ;
+		typedef typename Rcpp::traits::Extractor<RTYPE, LHS_NA, LHS_T>::type LHS_EXT ;
+		typedef typename Rcpp::traits::Extractor<RTYPE, false, RHS_T>::type RHS_EXT ;
+
+		Minus_Vector_Vector( const LHS_TYPE& lhs_, const RHS_TYPE& rhs_ ) :
+			lhs(lhs_.get_ref()), rhs(rhs_.get_ref()) {}
+
+		inline STORAGE operator[]( R_xlen_t i ) const {
+			STORAGE x = lhs[i] ;
+			if( Rcpp::traits::is_na<RTYPE>( x ) ) return x ;
+			return x - rhs[i] ;
+		}
+
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const LHS_EXT& lhs ;
+		const RHS_EXT& rhs ;
+	} ;
+	// RTYPE = REALSXP
+	template <bool LHS_NA, typename LHS_T, typename RHS_T >
+	class Minus_Vector_Vector<REALSXP,LHS_NA,LHS_T,false,RHS_T> :
+	    public Rcpp::VectorBase<REALSXP,true, Minus_Vector_Vector<REALSXP,LHS_NA,LHS_T,false,RHS_T> > {
+	public:
+		typedef typename Rcpp::VectorBase<REALSXP,LHS_NA,LHS_T> LHS_TYPE ;
+		typedef typename Rcpp::VectorBase<REALSXP,false,RHS_T> RHS_TYPE ;
+		typedef typename Rcpp::traits::Extractor<REALSXP, LHS_NA, LHS_T>::type LHS_EXT ;
+		typedef typename Rcpp::traits::Extractor<REALSXP, false, RHS_T>::type RHS_EXT ;
+
+		Minus_Vector_Vector( const LHS_TYPE& lhs_, const RHS_TYPE& rhs_ ) :
+			lhs(lhs_.get_ref()), rhs(rhs_.get_ref()) {}
+
+		inline double operator[]( R_xlen_t i ) const {
+			return lhs[i] - rhs[i] ;
+		}
+
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const LHS_EXT& lhs ;
+		const RHS_EXT& rhs ;
+	} ;
+
+
+	template <int RTYPE, typename LHS_T, typename RHS_T >
+	class Minus_Vector_Vector<RTYPE,false,LHS_T,false,RHS_T> :
+	    public Rcpp::VectorBase<RTYPE,false, Minus_Vector_Vector<RTYPE,false,LHS_T,false,RHS_T> > {
+	public:
+		typedef typename Rcpp::VectorBase<RTYPE,false,LHS_T> LHS_TYPE ;
+		typedef typename Rcpp::VectorBase<RTYPE,false,RHS_T> RHS_TYPE ;
+		typedef typename traits::storage_type<RTYPE>::type STORAGE ;
+		typedef typename Rcpp::traits::Extractor<RTYPE, false, LHS_T>::type LHS_EXT ;
+		typedef typename Rcpp::traits::Extractor<RTYPE, false, RHS_T>::type RHS_EXT ;
+
+		Minus_Vector_Vector( const LHS_TYPE& lhs_, const RHS_TYPE& rhs_ ) :
+			lhs(lhs_.get_ref()), rhs(rhs_.get_ref()) {}
+
+		inline STORAGE operator[]( R_xlen_t i ) const {
+			return lhs[i] - rhs[i] ;
+		}
+
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const LHS_EXT& lhs ;
+		const RHS_EXT& rhs ;
+	} ;
+	template <typename LHS_T, typename RHS_T >
+	class Minus_Vector_Vector<REALSXP,false,LHS_T,false,RHS_T> :
+	    public Rcpp::VectorBase<REALSXP,false, Minus_Vector_Vector<REALSXP,false,LHS_T,false,RHS_T> > {
+	public:
+		typedef typename Rcpp::VectorBase<REALSXP,false,LHS_T> LHS_TYPE ;
+		typedef typename Rcpp::VectorBase<REALSXP,false,RHS_T> RHS_TYPE ;
+		typedef typename Rcpp::traits::Extractor<REALSXP, false, LHS_T>::type LHS_EXT ;
+		typedef typename Rcpp::traits::Extractor<REALSXP, false, RHS_T>::type RHS_EXT ;
+
+		Minus_Vector_Vector( const LHS_TYPE& lhs_, const RHS_TYPE& rhs_ ) :
+			lhs(lhs_.get_ref()), rhs(rhs_.get_ref()) {}
+
+		inline double operator[]( R_xlen_t i ) const {
+			return lhs[i] - rhs[i] ;
+		}
+
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const LHS_EXT& lhs ;
+		const RHS_EXT& rhs ;
+	} ;
+
+
+
+
+
+	template <int RTYPE, bool NA, typename T>
+	class Minus_Vector_Primitive :
+	    public Rcpp::VectorBase<RTYPE,true, Minus_Vector_Primitive<RTYPE,NA,T> > {
+	public:
+		typedef typename traits::storage_type<RTYPE>::type STORAGE ;
+		typedef typename Rcpp::VectorBase<RTYPE,NA,T> VEC_TYPE ;
+		typedef typename Rcpp::traits::Extractor<RTYPE,NA,T>::type VEC_EXT ;
+
+		Minus_Vector_Primitive( const VEC_TYPE& lhs_, STORAGE rhs_ ) :
+			lhs(lhs_.get_ref()), rhs(rhs_), rhs_na( Rcpp::traits::is_na<RTYPE>(rhs_) ) {}
+
+		inline STORAGE operator[]( R_xlen_t i ) const {
+			if( rhs_na ) return rhs ;
+			STORAGE x = lhs[i] ;
+			return Rcpp::traits::is_na<RTYPE>(x) ? x : (x - rhs) ;
+		}
+
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const VEC_EXT& lhs ;
+		STORAGE rhs ;
+		bool rhs_na ;
+	} ;
+	template <bool NA, typename T>
+	class Minus_Vector_Primitive<REALSXP,NA,T> :
+	    public Rcpp::VectorBase<REALSXP,true, Minus_Vector_Primitive<REALSXP,NA,T> > {
+	public:
+		typedef typename Rcpp::VectorBase<REALSXP,NA,T> VEC_TYPE ;
+		typedef typename Rcpp::traits::Extractor<REALSXP,NA,T>::type VEC_EXT ;
+
+		Minus_Vector_Primitive( const VEC_TYPE& lhs_, double rhs_ ) :
+			lhs(lhs_.get_ref()), rhs(rhs_){}
+
+		inline double operator[]( R_xlen_t i ) const {
+			return lhs[i] - rhs ;
+		}
+
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const VEC_EXT& lhs ;
+		double rhs ;
+	} ;
+
+
+	template <int RTYPE, typename T>
+	class Minus_Vector_Primitive<RTYPE,false,T> :
+	    public Rcpp::VectorBase<RTYPE,true, Minus_Vector_Primitive<RTYPE,false,T> > {
+	public:
+		typedef typename traits::storage_type<RTYPE>::type STORAGE ;
+		typedef typename Rcpp::VectorBase<RTYPE,false,T> VEC_TYPE ;
+		typedef typename Rcpp::traits::Extractor<RTYPE,false,T>::type VEC_EXT ;
+
+		Minus_Vector_Primitive( const VEC_TYPE& lhs_, STORAGE rhs_ ) :
+			lhs(lhs_.get_ref()), rhs(rhs_), rhs_na( Rcpp::traits::is_na<RTYPE>(rhs_) ) {}
+
+		inline STORAGE operator[]( R_xlen_t i ) const {
+			if( rhs_na ) return rhs ;
+			STORAGE x = lhs[i] ;
+			return Rcpp::traits::is_na<RTYPE>(x) ? x : (x - rhs) ;
+		}
+
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const VEC_EXT& lhs ;
+		STORAGE rhs ;
+		bool rhs_na ;
+	} ;
+	template <typename T>
+	class Minus_Vector_Primitive<REALSXP,false,T> :
+	    public Rcpp::VectorBase<REALSXP,true, Minus_Vector_Primitive<REALSXP,false,T> > {
+	public:
+		typedef typename Rcpp::VectorBase<REALSXP,false,T> VEC_TYPE ;
+		typedef typename Rcpp::traits::Extractor<REALSXP,false,T>::type VEC_EXT ;
+
+		Minus_Vector_Primitive( const VEC_TYPE& lhs_, double rhs_ ) :
+			lhs(lhs_.get_ref()), rhs(rhs_){}
+
+		inline double operator[]( R_xlen_t i ) const {
+			return lhs[i] - rhs ;
+		}
+
+		inline R_xlen_t size() const { return lhs.size() ; }
+
+	private:
+		const VEC_EXT& lhs ;
+		double rhs ;
+	} ;
+
+
+
+
+
+
+	template <int RTYPE, bool NA, typename T>
+	class Minus_Primitive_Vector :
+	    public Rcpp::VectorBase<RTYPE,true, Minus_Primitive_Vector<RTYPE,NA,T> > {
+	public:
+		typedef typename Rcpp::VectorBase<RTYPE,NA,T> VEC_TYPE ;
+		typedef typename traits::storage_type<RTYPE>::type STORAGE ;
+		typedef typename Rcpp::traits::Extractor<RTYPE,NA,T>::type VEC_EXT ;
+
+		Minus_Primitive_Vector( STORAGE lhs_, const VEC_TYPE& rhs_ ) :
+			lhs(lhs_), rhs(rhs_.get_ref()), lhs_na( Rcpp::traits::is_na<RTYPE>(lhs_) ) {}
+
+		inline STORAGE operator[]( R_xlen_t i ) const {
+			if( lhs_na ) return lhs ;
+			return lhs - rhs[i] ;
+		}
+		inline R_xlen_t size() const { return rhs.size() ; }
+
+	private:
+		STORAGE lhs ;
+		const VEC_EXT& rhs ;
+		bool lhs_na ;
+	} ;
+	template <bool NA, typename T>
+	class Minus_Primitive_Vector<REALSXP,NA,T> :
+	    public Rcpp::VectorBase<REALSXP,true, Minus_Primitive_Vector<REALSXP,NA,T> > {
+	public:
+		typedef typename Rcpp::VectorBase<REALSXP,NA,T> VEC_TYPE ;
+		typedef typename Rcpp::traits::Extractor<REALSXP,NA,T>::type VEC_EXT ;
+
+		Minus_Primitive_Vector( double lhs_, const VEC_TYPE& rhs_ ) :
+			lhs(lhs_), rhs(rhs_.get_ref()){}
+
+		inline double operator[]( R_xlen_t i ) const {
+			return lhs - rhs[i] ;
+		}
+		inline R_xlen_t size() const { return rhs.size() ; }
+
+	private:
+		double lhs ;
+		const VEC_EXT& rhs ;
+	} ;
+
+
+
+	template <int RTYPE, typename T>
+	class Minus_Primitive_Vector<RTYPE,false,T> :
+	    public Rcpp::VectorBase<RTYPE,true, Minus_Primitive_Vector<RTYPE,false,T> > {
+	public:
+		typedef typename Rcpp::VectorBase<RTYPE,false,T> VEC_TYPE ;
+		typedef typename traits::storage_type<RTYPE>::type STORAGE ;
+		typedef typename Rcpp::traits::Extractor<REALSXP,false,T>::type VEC_EXT ;
+
+		Minus_Primitive_Vector( STORAGE lhs_, const VEC_TYPE& rhs_ ) :
+			lhs(lhs_), rhs(rhs_.get_ref()), lhs_na( Rcpp::traits::is_na<RTYPE>(lhs_) ) {}
+
+		inline STORAGE operator[]( R_xlen_t i ) const {
+			if( lhs_na ) return lhs ;
+		    return lhs - rhs[i] ;
+		}
+
+		inline R_xlen_t size() const { return rhs.size() ; }
+
+	private:
+		STORAGE lhs ;
+		const VEC_EXT& rhs ;
+		bool lhs_na ;
+
+	} ;
+	template <typename T>
+	class Minus_Primitive_Vector<REALSXP,false,T> :
+	    public Rcpp::VectorBase<REALSXP,true, Minus_Primitive_Vector<REALSXP,false,T> > {
+	public:
+		typedef typename Rcpp::VectorBase<REALSXP,false,T> VEC_TYPE ;
+		typedef typename Rcpp::traits::Extractor<REALSXP,false,T>::type VEC_EXT ;
+
+		Minus_Primitive_Vector( double lhs_, const VEC_TYPE& rhs_ ) :
+			lhs(lhs_), rhs(rhs_.get_ref()){}
+
+		inline double operator[]( R_xlen_t i ) const {
+			return lhs - rhs[i] ;
+		}
+
+		inline R_xlen_t size() const { return rhs.size() ; }
+
+	private:
+		double lhs ;
+		const VEC_EXT& rhs ;
+	} ;
+
+
+}
+
+template <int RTYPE,bool NA, typename T, typename U>
+inline typename traits::enable_if<traits::is_convertible<typename traits::remove_const_and_reference<U>::type, typename traits::storage_type<RTYPE>::type>::value, sugar::Minus_Vector_Primitive< RTYPE , NA, T > >::type
+operator-(
+	const VectorBase<RTYPE,NA,T>& lhs,
+	const U &rhs
+) {
+	return sugar::Minus_Vector_Primitive<RTYPE,NA,T>( lhs, rhs ) ;
+}
+
+
+template <int RTYPE,bool NA, typename T, typename U>
+inline typename traits::enable_if<traits::is_convertible<typename traits::remove_const_and_reference<U>::type, typename traits::storage_type<RTYPE>::type>::value, sugar::Minus_Primitive_Vector< RTYPE , NA,T> >::type
+operator-(
+	const U &lhs,
+	const VectorBase<RTYPE,NA,T>& rhs
+) {
+	return sugar::Minus_Primitive_Vector<RTYPE,NA,T>( lhs, rhs ) ;
+}
+
+template <int RTYPE,bool LHS_NA, typename LHS_T, bool RHS_NA, typename RHS_T>
+inline sugar::Minus_Vector_Vector<
+	RTYPE ,
+	LHS_NA, LHS_T,
+	RHS_NA, RHS_T
+	>
+operator-(
+	const VectorBase<RTYPE,LHS_NA,LHS_T>& lhs,
+	const VectorBase<RTYPE,RHS_NA,RHS_T>& rhs
+) {
+	return sugar::Minus_Vector_Vector<
+		RTYPE,
+		LHS_NA,LHS_T,
+		RHS_NA,RHS_T
+		>( lhs, rhs ) ;
+}
+
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/operators/operators.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/operators/operators.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/operators/operators.h	(revision 2477)
@@ -0,0 +1,40 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// any.h: Rcpp R/C++ interface class library -- any
+//
+// Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__operators__operators_h
+#define Rcpp__sugar__operators__operators_h
+
+// binary operators
+#include <Rcpp/sugar/operators/Comparator.h>
+#include <Rcpp/sugar/operators/Comparator_With_One_Value.h>
+
+#include <Rcpp/sugar/operators/logical_operators__Vector__Vector.h>
+#include <Rcpp/sugar/operators/logical_operators__Vector__primitive.h>
+#include <Rcpp/sugar/operators/plus.h>
+#include <Rcpp/sugar/operators/minus.h>
+#include <Rcpp/sugar/operators/times.h>
+#include <Rcpp/sugar/operators/divides.h>
+
+// unary operators
+#include <Rcpp/sugar/operators/not.h>
+#include <Rcpp/sugar/operators/unary_minus.h>
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/tools/iterator.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/tools/iterator.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/tools/iterator.h	(revision 2477)
@@ -0,0 +1,155 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// iterator.h: Rcpp R/C++ interface class library --
+//
+// Copyright (C) 2012 - 2013    Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__tools_iterator_h
+#define Rcpp__sugar__tools_iterator_h
+
+namespace Rcpp {
+namespace sugar {
+
+    /* generic sugar iterator type */
+    template <typename T>
+    class SugarIterator {
+    public:
+
+        typedef R_xlen_t difference_type ;
+        typedef typename Rcpp::traits::storage_type< Rcpp::traits::r_sexptype_traits<T>::rtype >::type STORAGE_TYPE ;
+        typedef STORAGE_TYPE reference ;
+        typedef STORAGE_TYPE* pointer ;
+        typedef std::random_access_iterator_tag iterator_category ;
+        typedef SugarIterator iterator ;
+
+        SugarIterator( const T& ref_ ) :ref(ref_), index(0) {}
+        SugarIterator( const T& ref_, R_xlen_t index_) : ref(ref_), index(index_) {}
+        SugarIterator( const SugarIterator& other) : ref(other.ref), index(other.index){}
+
+        inline iterator& operator++(){ index++; return *this ; }
+        inline iterator operator++(int){
+            iterator orig(*this) ;
+            ++(*this);
+            return orig ;
+        }
+        inline iterator& operator--(){ index--; return *this ; }
+        inline iterator operator--(int){
+            iterator orig(*this) ;
+            --(*this);
+            return orig ;
+        }
+        inline iterator operator+(difference_type n) const {
+			return iterator( ref, index+n ) ;
+		}
+		inline iterator operator-(difference_type n) const {
+			return iterator( ref, index-n ) ;
+		}
+		inline iterator& operator+=(difference_type n) {
+			index += n ;
+			return *this ;
+		}
+		inline iterator& operator-=(difference_type n) {
+			index -= n;
+			return *this ;
+		}
+        inline reference operator[](R_xlen_t i){
+		    return ref[index+i] ;
+		}
+
+		inline reference operator*() {
+			return ref[index] ;
+		}
+		inline pointer operator->(){
+			return &ref[index] ;
+		}
+
+		inline bool operator==( const iterator& y) const {
+			return ( index == y.index ) ;
+		}
+		inline bool operator!=( const iterator& y) const {
+			return ( index != y.index ) ;
+		}
+		inline bool operator<( const iterator& other ) const {
+			return index < other.index ;
+		}
+		inline bool operator>( const iterator& other ) const {
+			return index > other.index ;
+		}
+		inline bool operator<=( const iterator& other ) const {
+			return index <= other.index ;
+		}
+		inline bool operator>=( const iterator& other ) const {
+			return index >= other.index ;
+		}
+
+		inline difference_type operator-(const iterator& other) const {
+			return index - other.index ;
+		}
+
+
+    private:
+        const T& ref ;
+        R_xlen_t index ;
+    } ;
+
+    template <typename T> struct sugar_const_iterator_type {
+        typedef SugarIterator<T> type ;
+    } ;
+    template <int RTYPE> struct sugar_const_iterator_type< Rcpp::Vector<RTYPE> >{
+        typedef typename Rcpp::Vector<RTYPE>::const_iterator type ;
+    } ;
+    template <> struct sugar_const_iterator_type< CharacterVector >{
+        typedef SEXP* type ;
+    } ;
+
+
+    template <typename T> struct is_sugar_vector : public Rcpp::traits::false_type{} ;
+    template <int RTYPE> struct is_sugar_vector< Rcpp::Vector<RTYPE> > : public Rcpp::traits::true_type{} ;
+
+
+    template <typename T>
+    inline typename sugar_const_iterator_type<T>::type get_const_begin__impl(const T& obj, Rcpp::traits::true_type ){
+        return obj.begin() ;
+    }
+    template <typename T>
+    inline typename sugar_const_iterator_type<T>::type get_const_begin__impl(const T& obj, Rcpp::traits::false_type ){
+        typedef typename sugar_const_iterator_type<T>::type const_iterator ;
+        return const_iterator( obj ) ;
+    }
+
+
+
+    template <typename T>
+    inline typename sugar_const_iterator_type<T>::type get_const_begin(const T& obj){
+        return get_const_begin__impl( obj, typename is_sugar_vector<T>::type() ) ;
+    }
+    /* full specialization for character vectors */
+    template <>
+    inline SEXP* get_const_begin(const CharacterVector& obj){
+        return get_string_ptr(obj) ;
+    }
+
+    template <typename T>
+    inline typename sugar_const_iterator_type<T>::type get_const_end(const T& obj){
+        return get_const_begin<T>(obj) + obj.size() ;
+    }
+
+
+}
+}
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/Range.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/Range.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/Range.h	(revision 2477)
@@ -0,0 +1,92 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+//
+// Range.h: Rcpp R/C++ interface class library --
+//
+// Copyright (C) 2010 - 2013 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef RCPP_SUGAR_RANGE_H
+#define RCPP_SUGAR_RANGE_H
+
+namespace Rcpp{
+
+    class Range : public VectorBase<INTSXP,false, Range >{
+    public:
+        Range( R_xlen_t start_, R_xlen_t end__ ) : start(start_), end_(end__){
+            if( start_ > end__ ){
+                throw std::range_error( "upper value must be greater than lower value" ) ;
+            }
+        }
+
+        inline R_xlen_t size() const{
+            return end_ - start + 1;
+        }
+
+        inline R_xlen_t operator[]( R_xlen_t i) const {
+            return start + i ;
+        }
+
+        Range& operator++() {
+            start++ ; end_++ ;
+            return *this ;
+        }
+        Range operator++(int) {
+            Range orig(*this) ;
+            ++(*this);
+            return orig ;
+        }
+
+        Range& operator--() {
+            start-- ; end_-- ;
+            return *this ;
+        }
+        Range operator--(int) {
+            Range orig(*this) ;
+            --(*this);
+            return orig ;
+        }
+
+        Range& operator+=( int n ) {
+            start += n ; end_ += n ;
+            return *this ;
+        }
+
+        Range& operator-=( int n ) {
+            start -= n ; end_ -= n ;
+            return *this ;
+        }
+
+        Range operator+( int n ){
+            return Range( start + n, end_ + n ) ;
+        }
+
+        Range operator-( int n ){
+            return Range( start - n, end_ - n ) ;
+        }
+
+        inline R_xlen_t get_start() const { return start ; }
+
+        inline R_xlen_t get_end() const { return end_ ; }
+
+    private:
+        R_xlen_t start ;
+        R_xlen_t end_ ;
+    } ;
+
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/sets.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/sets.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/sugar/sets.h	(revision 2477)
@@ -0,0 +1,61 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// sets.h: Rcpp R/C++ interface class library --
+//
+// Copyright (C) 2012   Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__sugar__sets_h
+#define Rcpp__sugar__sets_h
+
+#if __cplusplus >= 201103L
+    #define RCPP_UNORDERED_SET std::unordered_set
+    #define RCPP_UNORDERED_MAP std::unordered_map
+
+    namespace std {
+        template<>
+        struct hash<Rcpp::String> {
+            std::size_t operator()(const Rcpp::String& key) const {
+                return pointer_hasher( key.get_sexp() ) ;
+            }
+            hash<SEXP> pointer_hasher ;
+        };
+    }
+
+#elif defined(HAS_TR1_UNORDERED_SET)
+    #define RCPP_UNORDERED_SET std::tr1::unordered_set
+    #define RCPP_UNORDERED_MAP std::tr1::unordered_map
+
+    namespace std {
+        namespace tr1 {
+            template<>
+            struct hash<Rcpp::String> {
+                std::size_t operator()(const Rcpp::String& key) const {
+                    return pointer_hasher( key.get_sexp() ) ;
+                }
+                hash<SEXP> pointer_hasher ;
+            };
+        }
+    }
+
+
+#else
+    #define RCPP_UNORDERED_SET std::set
+    #define RCPP_UNORDERED_MAP std::map
+#endif
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/iostream/Rstreambuf.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/iostream/Rstreambuf.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/iostream/Rstreambuf.h	(revision 2477)
@@ -0,0 +1,92 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+//
+// Rstreambuf.h: Rcpp R/C++ interface class library -- stream buffer
+//
+// Copyright (C) 2011 - 2017  Dirk Eddelbuettel, Romain Francois and Jelmer Ypma
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef RCPP__IOSTREAM__RSTREAMBUF_H
+#define RCPP__IOSTREAM__RSTREAMBUF_H
+
+#include <cstdio>
+#include <streambuf>
+
+namespace Rcpp {
+
+    template <bool OUTPUT>
+    class Rstreambuf : public std::streambuf {
+    public:
+        Rstreambuf(){}
+
+    protected:
+        virtual std::streamsize xsputn(const char *s, std::streamsize n );
+
+        virtual int overflow(int c = EOF );
+
+        virtual int sync()  ;
+    };
+
+    template <bool OUTPUT>
+    class Rostream : public std::ostream {
+        typedef Rstreambuf<OUTPUT> Buffer ;
+        Buffer* buf ;
+    public:
+        Rostream() :
+            std::ostream( new Buffer ),
+            buf( static_cast<Buffer*>( rdbuf() ) )
+        {}
+        ~Rostream() {
+            if (buf != NULL) {
+                delete buf;
+                buf = NULL;
+            }
+        }
+    };
+							// #nocov start
+    template <> inline std::streamsize Rstreambuf<true>::xsputn(const char *s, std::streamsize num ) {
+        Rprintf( "%.*s", num, s ) ;
+        return num ;
+    }
+    template <> inline std::streamsize Rstreambuf<false>::xsputn(const char *s, std::streamsize num ) {
+        REprintf( "%.*s", num, s ) ;
+        return num ;
+    }
+
+    template <> inline int Rstreambuf<true>::overflow(int c ) {
+      if (c != EOF) Rprintf( "%.1s", &c ) ;
+      return c ;
+    }
+    template <> inline int Rstreambuf<false>::overflow(int c ) {
+      if (c != EOF) REprintf( "%.1s", &c ) ;
+      return c ;
+    }
+
+    template <> inline int Rstreambuf<true>::sync(){
+        ::R_FlushConsole() ;
+        return 0 ;
+    }
+    template <> inline int Rstreambuf<false>::sync(){
+        ::R_FlushConsole() ;
+        return 0 ;
+    }								// #nocov end
+    static Rostream<true>  Rcout;
+    static Rostream<false> Rcerr;
+
+
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/date_datetime/Datetime.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/date_datetime/Datetime.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/date_datetime/Datetime.h	(revision 2477)
@@ -0,0 +1,170 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+//
+// Datetime.h: Rcpp R/C++ interface class library -- Datetime (POSIXct)
+//
+// Copyright (C) 2010 - 2016  Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__Datetime_h
+#define Rcpp__Datetime_h
+
+#include <RcppCommon.h>
+
+#if defined(WIN32) || defined(__WIN32) || defined(__WIN32__)
+#include <time.h>
+#endif
+
+namespace Rcpp {
+
+    class Datetime {
+    public:
+        Datetime() {
+            m_dt = 0;
+            update_tm();
+        }
+        Datetime(SEXP s);
+
+        // from double, just like POSIXct
+        Datetime(const double &dt) {
+            m_dt = dt;
+            update_tm();
+        }
+        Datetime(const std::string &s, const std::string &fmt="%Y-%m-%d %H:%M:%OS");
+
+        double getFractionalTimestamp(void) const { return m_dt; }
+
+        int getMicroSeconds() const { return m_us; }
+        int getSeconds()      const { return m_tm.tm_sec; }
+        int getMinutes()      const { return m_tm.tm_min; }
+        int getHours()        const { return m_tm.tm_hour; }
+        int getDay()          const { return m_tm.tm_mday; }
+        int getMonth()        const { return m_tm.tm_mon + 1; }      // makes it 1 .. 12
+        int getYear()         const { return m_tm.tm_year ; }
+        int getWeekday()      const { return m_tm.tm_wday + 1; }     // makes it 1 .. 7
+        int getYearday()      const { return m_tm.tm_yday + 1; }     // makes it 1 .. 366
+
+        // Minimal set of date operations.
+        friend Datetime  operator+( const Datetime &dt, double offset);
+        friend Datetime  operator+( const Datetime &dt, int offset);
+        friend double    operator-( const Datetime &dt1, const Datetime& dt2);
+        friend bool      operator<( const Datetime &dt1, const Datetime& dt2);
+        friend bool      operator>( const Datetime &dt1, const Datetime& dt2);
+        friend bool      operator==(const Datetime &dt1, const Datetime& dt2);
+        friend bool      operator>=(const Datetime &dt1, const Datetime& dt2);
+        friend bool      operator<=(const Datetime &dt1, const Datetime& dt2);
+        friend bool      operator!=(const Datetime &dt1, const Datetime& dt2);
+
+        inline int is_na() const { return traits::is_na<REALSXP>(m_dt); }
+
+        operator double()  const { return m_dt; }
+
+        inline std::string format(const char *fmt = "%Y-%m-%d %H:%M:%S") const {
+            char txtiso[64], txtsec[64];
+            time_t t = static_cast<time_t>(std::floor(m_dt));
+            struct tm temp = *localtime(&t); // localtime, not gmtime
+            int res = ::strftime(txtiso, 63, fmt, &temp);
+            if (res == 0) {
+                return std::string("");
+            } else {
+                res = ::snprintf(txtsec, 63, "%s.%06d", txtiso, m_us);
+                if (res <= 0) {
+                    return std::string("");
+                } else {
+                    return std::string(txtsec);
+                }
+            }
+        }
+
+        friend inline std::ostream &operator<<(std::ostream & s, const Datetime d);
+
+    private:
+        double m_dt;            // fractional seconds since epoch
+        struct tm m_tm;         // standard time representation
+        unsigned int m_us;      // microsecond (to complement m_tm)
+
+        // update m_tm based on m_dt
+        void update_tm() {
+            if (R_FINITE(m_dt)) {
+                time_t t = static_cast<time_t>(std::floor(m_dt));
+                m_tm = *gmtime_(&t);
+                // m_us is fractional (micro)secs as diff. between (fractional) m_dt and m_tm
+                m_us = static_cast<int>(::Rf_fround( (m_dt - t) * 1.0e6, 0.0));
+            } else {
+                m_dt = NA_REAL;         // NaN and Inf need it set
+                m_tm.tm_sec = m_tm.tm_min = m_tm.tm_hour = m_tm.tm_isdst = NA_INTEGER;
+                m_tm.tm_min = m_tm.tm_hour = m_tm.tm_mday = m_tm.tm_mon  = m_tm.tm_year = NA_INTEGER;
+                m_us = NA_INTEGER;
+            }
+        }
+
+        // 1900 as per POSIX mktime() et al
+        static inline unsigned int baseYear() {
+            return 1900;
+        }
+
+    };
+
+
+    // template specialisation for wrap() on datetime
+    template <> SEXP wrap<Rcpp::Datetime>(const Rcpp::Datetime &dt);
+
+    // needed to wrap containers of Date such as vector<Datetime> or map<string,Datetime>
+    namespace internal {
+        template<> inline double caster<Rcpp::Datetime,double>(Rcpp::Datetime from) {
+            return from.getFractionalTimestamp();
+        }
+        template<> inline Rcpp::Datetime caster<double,Rcpp::Datetime>(double from) {
+            return Rcpp::Datetime( from );
+        }
+    }
+
+    template<> SEXP wrap_extra_steps<Rcpp::Datetime>(SEXP x);
+
+    inline Datetime operator+(const Datetime &datetime, double offset) {
+        Datetime newdt(datetime.m_dt);
+        newdt.m_dt += offset;
+        time_t t = static_cast<time_t>(std::floor(newdt.m_dt));
+        newdt.m_tm = *gmtime_(&t);
+        newdt.m_us = static_cast<int>(::Rf_fround( (newdt.m_dt - t) * 1.0e6, 0.0));
+        return newdt;
+    }
+
+    inline Datetime operator+(const Datetime &datetime, int offset) {
+        Datetime newdt(datetime.m_dt);
+        newdt.m_dt += offset;
+        time_t t = static_cast<time_t>(std::floor(newdt.m_dt));
+        newdt.m_tm = *gmtime_(&t);
+        newdt.m_us = static_cast<int>(::Rf_fround( (newdt.m_dt - t) * 1.0e6, 0.0));
+        return newdt;
+    }
+
+    inline double  operator-(const Datetime& d1, const Datetime& d2) { return d1.m_dt - d2.m_dt; }
+    inline bool    operator<(const Datetime &d1, const Datetime& d2) { return d1.m_dt < d2.m_dt; }
+    inline bool    operator>(const Datetime &d1, const Datetime& d2) { return d1.m_dt > d2.m_dt; }
+    inline bool    operator==(const Datetime &d1, const Datetime& d2) { return d1.m_dt == d2.m_dt; }
+    inline bool    operator>=(const Datetime &d1, const Datetime& d2) { return d1.m_dt >= d2.m_dt; }
+    inline bool    operator<=(const Datetime &d1, const Datetime& d2) { return d1.m_dt <= d2.m_dt; }
+    inline bool    operator!=(const Datetime &d1, const Datetime& d2) { return d1.m_dt != d2.m_dt; }
+
+    inline std::ostream &operator<<(std::ostream & os, const Datetime d) {
+        os << d.format();
+        return os;
+    }
+
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/date_datetime/Date.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/date_datetime/Date.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/date_datetime/Date.h	(revision 2477)
@@ -0,0 +1,205 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+//
+// Date.h: Rcpp R/C++ interface class library -- dates
+//
+// Copyright (C) 2010 - 2015  Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__Date_h
+#define Rcpp__Date_h
+
+#if defined(WIN32) || defined(__WIN32) || defined(__WIN32__)
+#include <time.h>
+#endif
+
+namespace Rcpp {
+
+    class Date {
+    public:
+        Date() {
+            m_d = 0;
+            update_tm();
+        }
+        Date(SEXP s);
+
+        // from integer (with negative dates before Jan 1, 1970)
+        Date(const int &dt) {
+            m_d = dt;
+            update_tm();
+        }
+
+        // from fractional integer since epoch, just like R
+        Date(const double &dt) {
+            m_d = dt;
+            update_tm();
+        }
+        Date(const std::string &s, const std::string &fmt="%Y-%m-%d");
+
+        Date(const unsigned int &mon, const unsigned int &day, const unsigned int &year) {
+            m_tm.tm_sec = m_tm.tm_min = m_tm.tm_hour = m_tm.tm_isdst = 0;
+
+            // allow for ISO-notation case (yyyy, mm, dd) which we prefer over (mm, dd, year)
+            if (mon >= baseYear() && day <= 12 && year <= 31) {
+                m_tm.tm_year = mon - baseYear();
+                m_tm.tm_mon  = day - 1;     // range 0 to 11
+                m_tm.tm_mday = year;
+            } else {
+                m_tm.tm_mday  = day;
+                m_tm.tm_mon   = mon - 1;    // range 0 to 11
+                m_tm.tm_year  = year - baseYear();
+            }
+            double tmp = mktime00(m_tm);    // use mktime() replacement borrowed from R
+            m_tm.tm_year += baseYear();    // we'd rather keep it as a normal year
+            m_d = tmp/(24*60*60);
+        }
+
+        ~Date() {};
+
+        double getDate(void) const {
+            return m_d;
+        }
+
+        // intra-day useless for date class
+        //int getSeconds() const { return m_tm.tm_sec; }
+        //int getMinutes() const { return m_tm.tm_min; }
+        //int getHours()   const { return m_tm.tm_hour; }
+        int getDay()     const { return m_tm.tm_mday; }
+        int getMonth()   const { return m_tm.tm_mon + 1; }      // makes it 1 .. 12
+        int getYear()    const { return m_tm.tm_year; }         // does include 1900 (see Date.cpp)
+        int getWeekday() const { return m_tm.tm_wday + 1; }     // makes it 1 .. 7
+        int getYearday() const { return m_tm.tm_yday + 1; }     // makes it 1 .. 366
+
+        // 1900 as per POSIX mktime() et al
+        static inline unsigned int baseYear() {
+            return 1900;
+        }
+
+        // Minimal set of date operations.
+        friend Date   operator+( const Date &date, int offset);
+        friend double operator-( const Date &date1, const Date& date2);
+        friend bool   operator<( const Date &date1, const Date& date2);
+        friend bool   operator>( const Date &date1, const Date& date2);
+        friend bool   operator==(const Date &date1, const Date& date2);
+        friend bool   operator>=(const Date &date1, const Date& date2);
+        friend bool   operator<=(const Date &date1, const Date& date2);
+        friend bool   operator!=(const Date &date1, const Date& date2);
+
+        inline int is_na() const {
+           return traits::is_na<REALSXP>(m_d);
+        }
+
+        operator double() const {
+            return m_d;
+        }
+
+        inline std::string format(const char *fmt = "%Y-%m-%d") const {
+            char txt[32];
+            struct tm temp = m_tm;
+            temp.tm_year -= baseYear();    // adjust for fact that system has year rel. to 1900
+            int res = ::strftime(txt, 31, fmt, &temp);
+            if (res == 0) {
+                return std::string("");
+            } else {
+                return std::string(txt);
+            }
+        }
+
+        friend inline std::ostream &operator<<(std::ostream & os, const Date d);
+
+    private:
+        double m_d;                 // (fractional) day number, relative to epoch of Jan 1, 1970
+        struct tm m_tm;             // standard time representation
+
+        // update m_tm based on m_d
+        void update_tm() {
+            if (R_FINITE(m_d)) {
+                time_t t = 24*60*60 * m_d;      // (fractional) days since epoch to seconds since epoch
+                m_tm = *gmtime_(&t);
+            } else {
+                m_tm.tm_sec = m_tm.tm_min = m_tm.tm_hour = m_tm.tm_isdst = NA_INTEGER;
+                m_tm.tm_min = m_tm.tm_hour = m_tm.tm_mday = m_tm.tm_mon  = m_tm.tm_year = NA_INTEGER;
+            }
+        }
+
+    };
+
+    // template specialisation for wrap() on the date
+    template <> SEXP wrap<Rcpp::Date>(const Rcpp::Date &date);
+
+    // needed to wrap containers of Date such as vector<Date> or map<string,Date>
+    namespace internal {
+        template<> inline double caster<Rcpp::Date,double>(Rcpp::Date from) {
+            return static_cast<double>(from.getDate());
+        }
+        template<> inline Rcpp::Date caster<double,Rcpp::Date>(double from) {
+            return Rcpp::Date(static_cast<int>(from));
+        }
+    }
+
+    template<> inline SEXP wrap_extra_steps<Rcpp::Date>(SEXP x) {
+        Rf_setAttrib(x, R_ClassSymbol, Rf_mkString("Date"));
+        return x;
+    }
+
+    inline Date operator+(const Date &date, int offset) {
+        Date newdate(date.m_d);
+        newdate.m_d += offset;
+        time_t t = 24*60*60 * newdate.m_d;  // days since epoch to seconds since epo
+        newdate.m_tm = *gmtime_(&t);
+        return newdate;
+    }
+
+    inline double operator-( const Date& d1, const Date& d2) { return d1.m_d -  d2.m_d; }
+    inline bool   operator<( const Date &d1, const Date& d2) { return d1.m_d <  d2.m_d; }
+    inline bool   operator>( const Date &d1, const Date& d2) { return d1.m_d >  d2.m_d; }
+    inline bool   operator==(const Date &d1, const Date& d2) { return d1.m_d == d2.m_d; }
+    inline bool   operator>=(const Date &d1, const Date& d2) { return d1.m_d >= d2.m_d; }
+    inline bool   operator<=(const Date &d1, const Date& d2) { return d1.m_d <= d2.m_d; }
+    inline bool   operator!=(const Date &d1, const Date& d2) { return d1.m_d != d2.m_d; }
+
+    inline std::ostream &operator<<(std::ostream & os, const Date d) {
+        os << d.format();
+        return os;
+    }
+
+    namespace internal {
+
+        inline SEXP getPosixClasses() {
+            Shield<SEXP> datetimeclass(Rf_allocVector(STRSXP,2));
+            SET_STRING_ELT(datetimeclass, 0, Rf_mkChar("POSIXct"));
+            SET_STRING_ELT(datetimeclass, 1, Rf_mkChar("POSIXt"));
+            return datetimeclass;
+        }
+
+        inline SEXP new_posixt_object( double d) {
+            Shield<SEXP> x(Rf_ScalarReal(d));
+            Rf_setAttrib(x, R_ClassSymbol, getPosixClasses());
+            return x;
+        }
+
+        inline SEXP new_date_object(double d) {
+            Shield<SEXP> x(Rf_ScalarReal(d));
+            Rf_setAttrib(x, R_ClassSymbol, Rf_mkString("Date"));
+            return x;
+        }
+
+    }
+
+
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/date_datetime/oldDatetimeVector.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/date_datetime/oldDatetimeVector.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/date_datetime/oldDatetimeVector.h	(revision 2477)
@@ -0,0 +1,43 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+//
+// DatetimeVector.h: Rcpp R/C++ interface class library -- Datetime vector
+//
+// Copyright (C) 2010 - 2015  Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__DatetimeVector_h
+#define Rcpp__DatetimeVector_h
+
+#include <RcppCommon.h>
+
+#include <Rcpp/internal/GreedyVector.h>
+
+namespace Rcpp {
+
+    class oldDatetimeVector : public GreedyVector<Datetime, oldDatetimeVector> {
+    public:
+        oldDatetimeVector(SEXP vec) : GreedyVector<Datetime, oldDatetimeVector>(vec) {}
+        oldDatetimeVector(int n) :    GreedyVector<Datetime, oldDatetimeVector>(n) {}
+
+        std::vector<Datetime> getDatetimes() const {
+            return v;
+        }
+
+    };
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/date_datetime/oldDateVector.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/date_datetime/oldDateVector.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/date_datetime/oldDateVector.h	(revision 2477)
@@ -0,0 +1,42 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+//
+// DateVector.h: Rcpp R/C++ interface class library -- Date vector support
+//
+// Copyright (C) 2010 - 2015  Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__DateVector_h
+#define Rcpp__DateVector_h
+
+#include <RcppCommon.h>
+#include <Rcpp/internal/GreedyVector.h>
+
+namespace Rcpp {
+
+    class oldDateVector : public GreedyVector<Date, oldDateVector> {
+    public:
+        oldDateVector(SEXP vec) : GreedyVector<Date, oldDateVector>(vec) {}
+        oldDateVector(int n) :    GreedyVector<Date, oldDateVector>(n) {}
+
+        inline std::vector<Date> getDates() const {
+            return v ;
+        }
+
+    };
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/date_datetime/date_datetime.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/date_datetime/date_datetime.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/date_datetime/date_datetime.h	(revision 2477)
@@ -0,0 +1,51 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+//
+// date_datetime.h: Rcpp R/C++ interface class library -- Date and Datetime support
+//
+// Copyright (C) 2016         Dirk Eddelbuettel
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__Date_Datetime_h
+#define Rcpp__Date_Datetime_h
+
+#include <Rcpp/date_datetime/Date.h>
+#include <Rcpp/date_datetime/oldDateVector.h>
+#include <Rcpp/date_datetime/newDateVector.h>
+
+#include <Rcpp/date_datetime/Datetime.h>
+#include <Rcpp/date_datetime/oldDatetimeVector.h>
+#include <Rcpp/date_datetime/newDatetimeVector.h>
+
+namespace Rcpp {
+
+    // this will not be on by default 
+    #if defined(RCPP_NEW_DATE_DATETIME_VECTORS)
+
+        typedef newDateVector DateVector;
+        typedef newDatetimeVector DatetimeVector;
+
+    #else
+
+        // for now the fallback-default is to use the existing classes
+        typedef oldDateVector DateVector;
+        typedef oldDatetimeVector DatetimeVector;
+
+    #endif
+
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/date_datetime/newDatetimeVector.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/date_datetime/newDatetimeVector.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/date_datetime/newDatetimeVector.h	(revision 2477)
@@ -0,0 +1,92 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+//
+// newDatetimeVector.h: Rcpp R/C++ interface class library -- Datetime vector support
+//
+// Copyright (C) 2016         Dirk Eddelbuettel
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__newDatetimeVector_h
+#define Rcpp__newDatetimeVector_h
+
+#include <RcppCommon.h>
+
+namespace Rcpp {
+
+    class newDatetimeVector : public NumericVector {
+    public:
+        template <int RTYPE, bool NA, typename VEC>
+        newDatetimeVector(const VectorBase<RTYPE,NA,VEC>& other, const char* tz = "") :
+            NumericVector(other) {
+            setClass(tz); 
+        }
+
+        newDatetimeVector(SEXP vec, const char* tz = "") :
+            NumericVector(vec) {
+            setClass(tz);
+        }
+
+        newDatetimeVector(int n, const char* tz = "") :
+            NumericVector(n) {
+            setClass(tz);
+        }
+
+        inline std::vector<Datetime> getDatetimes() const {
+            int n = this->size();
+            std::vector<Datetime> v(n);
+            for (int i=0; i<n; i++)
+                v[i] = (*this)[i];
+            return v;
+        }
+
+        inline newDatetimeVector &operator=(const newDatetimeVector &rhs) {
+            if (this != &rhs) {
+                NumericVector::operator=(rhs);
+                this->attr("tzone") = rhs.attr("tzone");
+            }
+
+            return *this;
+        }
+
+        friend inline std::ostream &operator<<(std::ostream & s, const newDatetimeVector d);
+
+    private:
+
+        void setClass(const char *tz) {
+            Shield<SEXP> datetimeclass(Rf_allocVector(STRSXP,2));
+            SET_STRING_ELT(datetimeclass, 0, Rf_mkChar("POSIXct"));
+            SET_STRING_ELT(datetimeclass, 1, Rf_mkChar("POSIXt"));
+            Rf_setAttrib(*this, R_ClassSymbol, datetimeclass);
+
+            if (strcmp(tz, "") != 0) {
+                Shield<SEXP> tzsexp(Rf_mkString(tz));
+                Rf_setAttrib(*this, Rf_install("tzone"), tzsexp);
+            }
+        }
+    };
+
+    inline std::ostream &operator<<(std::ostream & os, const newDatetimeVector d) {
+        int n = d.size();
+        for (int i=0; i<n; i++) {
+            os << Datetime(d[i]).format() << " ";
+            if ((i+1) % 4 == 0) os << "\n";
+        }
+        return os;
+    }
+
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/date_datetime/newDateVector.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/date_datetime/newDateVector.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/date_datetime/newDateVector.h	(revision 2477)
@@ -0,0 +1,75 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+//
+// newDateVector.h: Rcpp R/C++ interface class library -- Date vector support
+//
+// Copyright (C) 2016         Dirk Eddelbuettel
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__newDateVector_h
+#define Rcpp__newDateVector_h
+
+#include <RcppCommon.h>
+
+namespace Rcpp {
+
+    class newDateVector : public NumericVector {
+    public:
+        template <int RTYPE, bool NA, typename VEC>
+        newDateVector(const VectorBase<RTYPE,NA,VEC>& vec) : NumericVector(vec) {
+            setClass();
+        }
+
+        newDateVector(SEXP vec) : NumericVector(vec) { setClass(); }
+        newDateVector(int n) : NumericVector(n) { setClass(); }
+
+        inline std::vector<Date> getDates() const {
+            int n = this->size();
+            std::vector<Date> v(n);
+            for (int i=0; i<n; i++)
+                v[i] = (*this)[i];
+            return v;
+        }
+
+        inline newDateVector &operator=(const newDateVector &rhs) {
+            if (this != &rhs) {
+                NumericVector::operator=(rhs);
+            }
+
+            return *this;
+        }
+
+        friend inline std::ostream &operator<<(std::ostream & s, const newDateVector d);
+
+    private:
+
+        void setClass() {
+            Shield<SEXP> dateclass(Rf_mkString("Date"));
+            Rf_setAttrib(*this, R_ClassSymbol, dateclass);
+        }
+    };
+
+    inline std::ostream &operator<<(std::ostream & os, const newDateVector d) {
+        int n = d.size();
+        for (int i=0; i<n; i++) {
+            os << Date(d[i]).format() << " ";
+            if ((i+1) % 8 == 0) os << "\n";
+        }
+        return os;
+    }
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/stats/dpq/dpq.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/stats/dpq/dpq.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/stats/dpq/dpq.h	(revision 2477)
@@ -0,0 +1,408 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+//
+// dpq.h: Rcpp R/C++ interface class library -- normal distribution
+//
+// Copyright (C) 2010 - 2016  Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__stats__dpq__dpq_h
+#define Rcpp__stats__dpq__dpq_h
+
+#include <Rcpp/stats/dpq/macros.h>
+
+namespace Rcpp {
+namespace stats {
+
+// D
+
+template <int RTYPE, bool NA, typename T>
+class D0 : public Rcpp::VectorBase< REALSXP, NA, D0<RTYPE,NA,T> > {
+public:
+    typedef typename Rcpp::VectorBase<RTYPE,NA,T> VEC_TYPE ;
+    typedef double (*FunPtr)(double,int) ;
+
+    D0( FunPtr ptr_, const VEC_TYPE& vec_, bool log_ ) :
+        ptr(ptr_), vec(vec_), log(log_) {}
+
+    inline double operator[]( int i) const {
+        return ptr( vec[i], log );
+    }
+
+    inline int size() const { return vec.size(); }
+
+private:
+    FunPtr ptr ;
+    const VEC_TYPE& vec;
+    int log;
+};
+
+template <int RTYPE, bool NA, typename T>
+class D1 : public Rcpp::VectorBase< REALSXP, NA, D1<RTYPE,NA,T> > {
+public:
+    typedef typename Rcpp::VectorBase<RTYPE,NA,T> VEC_TYPE ;
+    typedef double (*FunPtr)(double,double,int) ;
+
+    D1( FunPtr ptr_, const VEC_TYPE& vec_, double p0_ , bool log_) :
+        ptr(ptr_), vec(vec_), p0(p0_), log(log_) {}
+
+    inline double operator[]( int i) const {
+        return ptr( vec[i], p0, log );
+    }
+
+    inline int size() const { return vec.size(); }
+
+private:
+    FunPtr ptr ;
+    const VEC_TYPE& vec;
+    double p0 ;
+    int log;
+} ;
+
+template <int RTYPE, bool NA, typename T>
+class D2 : public Rcpp::VectorBase< REALSXP, NA, D2<RTYPE,NA,T> > {
+public:
+    typedef typename Rcpp::VectorBase<RTYPE,NA,T> VEC_TYPE ;
+    typedef double (*FunPtr)(double,double,double,int) ;
+
+    D2( FunPtr ptr_, const VEC_TYPE& vec_, double p0_, double p1_ , bool log_) :
+        ptr(ptr_), vec(vec_), p0(p0_), p1(p1_), log(log_) {}
+
+    inline double operator[]( int i) const {
+        return ptr( vec[i], p0, p1, log );
+    }
+
+    inline int size() const { return vec.size(); }
+
+private:
+    FunPtr ptr ;
+    const VEC_TYPE& vec;
+    double p0, p1 ;
+    int log;
+} ;
+
+template <int RTYPE, bool NA, typename T>
+class D3 : public Rcpp::VectorBase< REALSXP, NA, D3<RTYPE,NA,T> > {
+public:
+    typedef typename Rcpp::VectorBase<RTYPE,NA,T> VEC_TYPE ;
+    typedef double (*FunPtr)(double,double,double,double,int) ;
+
+    D3( FunPtr ptr_, const VEC_TYPE& vec_, double p0_, double p1_, double p2_ , bool log_ ) :
+        ptr(ptr_), vec(vec_), p0(p0_), p1(p1_), p2(p2_), log(log_) {}
+
+    inline double operator[]( int i) const {
+        return ptr( vec[i], p0, p1, p2, log );
+    }
+
+    inline int size() const { return vec.size(); }
+
+private:
+    FunPtr ptr ;
+    const VEC_TYPE& vec;
+    double p0, p1, p2 ;
+    int log;
+} ;
+
+// P
+
+
+template <int RTYPE, bool NA, typename T>
+class P0 : public Rcpp::VectorBase< REALSXP, NA, P0<RTYPE,NA,T> >{
+public:
+    typedef typename Rcpp::VectorBase<RTYPE,NA,T> VEC_TYPE ;
+    typedef double (*FunPtr)(double,int,int) ;
+
+    P0( FunPtr ptr_, const VEC_TYPE& vec_,
+        bool lower_tail = true, bool log_ = false ) :
+        ptr(ptr_), vec(vec_), lower(lower_tail), log(log_) {}
+
+    inline double operator[]( int i) const {
+        return ptr( vec[i], lower, log );
+    }
+
+    inline int size() const { return vec.size(); }
+
+private:
+    FunPtr ptr ;
+    const VEC_TYPE& vec;
+    int lower, log;
+
+};
+
+
+template <int RTYPE, bool NA, typename T>
+class P1 : public Rcpp::VectorBase< REALSXP, NA, P1<RTYPE,NA,T> >{
+public:
+    typedef typename Rcpp::VectorBase<RTYPE,NA,T> VEC_TYPE ;
+    typedef double (*FunPtr)(double,double,int,int) ;
+
+    P1( FunPtr ptr_, const VEC_TYPE& vec_, double p0_,
+        bool lower_tail = true, bool log_ = false ) :
+        ptr(ptr_), vec(vec_), p0(p0_), lower(lower_tail), log(log_) {}
+
+    inline double operator[]( int i) const {
+        return ptr( vec[i], p0, lower, log );
+    }
+
+    inline int size() const { return vec.size(); }
+
+private:
+    FunPtr ptr ;
+    const VEC_TYPE& vec;
+    double p0 ;
+    int lower, log;
+
+};
+
+
+template <int RTYPE, bool NA, typename T>
+class P2 : public Rcpp::VectorBase< REALSXP, NA, P2<RTYPE,NA,T> >{
+public:
+    typedef typename Rcpp::VectorBase<RTYPE,NA,T> VEC_TYPE ;
+    typedef double (*FunPtr)(double,double,double,int,int) ;
+
+    P2( FunPtr ptr_, const VEC_TYPE& vec_, double p0_, double p1_,
+        bool lower_tail = true, bool log_ = false ) :
+        ptr(ptr_), vec(vec_), p0(p0_), p1(p1_), lower(lower_tail), log(log_) {}
+
+    inline double operator[]( int i) const {
+        return ptr( vec[i], p0, p1, lower, log );
+    }
+
+    inline int size() const { return vec.size(); }
+
+private:
+    FunPtr ptr ;
+    const VEC_TYPE& vec;
+    double p0, p1 ;
+    int lower, log;
+};
+
+template <int RTYPE, bool NA, typename T>
+class P3 : public Rcpp::VectorBase< REALSXP, NA, P3<RTYPE,NA,T> >{
+public:
+    typedef typename Rcpp::VectorBase<RTYPE,NA,T> VEC_TYPE ;
+    typedef double (*FunPtr)(double,double,double,double,int,int) ;
+
+    P3( FunPtr ptr_, const VEC_TYPE& vec_, double p0_, double p1_, double p2_,
+        bool lower_tail = true, bool log_ = false ) :
+        ptr(ptr_), vec(vec_), p0(p0_), p1(p1_), p2(p2_), lower(lower_tail), log(log_) {}
+
+    inline double operator[]( int i) const {
+        return ptr( vec[i], p0, p1, p2, lower, log );
+    }
+
+    inline int size() const { return vec.size(); }
+
+private:
+    FunPtr ptr ;
+    const VEC_TYPE& vec;
+    double p0, p1,p2 ;
+    int lower, log;
+
+};
+
+// Q
+
+template <int RTYPE, bool NA, typename T>
+class Q0 : public Rcpp::VectorBase< REALSXP, NA, Q0<RTYPE,NA,T> >{
+public:
+    typedef typename Rcpp::VectorBase<RTYPE,NA,T> VEC_TYPE ;
+    typedef double (*FunPtr)(double,int,int) ;
+
+    Q0( FunPtr ptr_, const VEC_TYPE& vec_,
+        bool lower_tail = true, bool log_ = false ) :
+        ptr(ptr_), vec(vec_), lower(lower_tail), log(log_) {}
+
+    inline double operator[]( int i) const {
+        return ptr( vec[i], lower, log );
+    }
+
+    inline int size() const { return vec.size(); }
+
+private:
+    FunPtr ptr ;
+    const VEC_TYPE& vec;
+    int lower, log;
+
+};
+
+template <int RTYPE, bool NA, typename T>
+class Q1 : public Rcpp::VectorBase< REALSXP, NA, Q1<RTYPE,NA,T> >{
+public:
+    typedef typename Rcpp::VectorBase<RTYPE,NA,T> VEC_TYPE ;
+    typedef double (*FunPtr)(double,double,int,int) ;
+
+    Q1( FunPtr ptr_, const VEC_TYPE& vec_, double p0_,
+        bool lower_tail = true, bool log_ = false ) :
+        ptr(ptr_), vec(vec_), p0(p0_), lower(lower_tail), log(log_) {}
+
+    inline double operator[]( int i) const {
+        return ptr( vec[i], p0, lower, log );
+    }
+
+    inline int size() const { return vec.size(); }
+
+private:
+    FunPtr ptr ;
+    const VEC_TYPE& vec;
+    double p0 ;
+    int lower, log;
+
+};
+
+template <int RTYPE, bool NA, typename T>
+class Q2 : public Rcpp::VectorBase< REALSXP, NA, Q2<RTYPE,NA,T> >{
+public:
+    typedef typename Rcpp::VectorBase<RTYPE,NA,T> VEC_TYPE ;
+    typedef double (*FunPtr)(double,double,double,int,int) ;
+
+    Q2( FunPtr ptr_, const VEC_TYPE& vec_, double p0_, double p1_,
+        bool lower_tail = true, bool log_ = false ) :
+        ptr(ptr_), vec(vec_), p0(p0_), p1(p1_), lower(lower_tail), log(log_) {}
+
+    inline double operator[]( int i) const {
+        return ptr( vec[i], p0, p1, lower, log );
+    }
+
+    inline int size() const { return vec.size(); }
+
+private:
+    FunPtr ptr ;
+    const VEC_TYPE& vec;
+    double p0, p1 ;
+    int lower, log;
+
+};
+
+template <int RTYPE, bool NA, typename T>
+class Q3 : public Rcpp::VectorBase< REALSXP, NA, Q3<RTYPE,NA,T> >{
+public:
+    typedef typename Rcpp::VectorBase<RTYPE,NA,T> VEC_TYPE ;
+    typedef double (*FunPtr)(double,double,double,double,int,int) ;
+
+    Q3( FunPtr ptr_, const VEC_TYPE& vec_, double p0_, double p1_, double p2_,
+        bool lower_tail = true, bool log_ = false ) :
+        ptr(ptr_), vec(vec_), p0(p0_), p1(p1_), p2(p2_), lower(lower_tail), log(log_) {}
+
+    inline double operator[]( int i) const {
+        return ptr( vec[i], p0, p1, p2, lower, log );
+    }
+
+    inline int size() const { return vec.size(); }
+
+private:
+    FunPtr ptr ;
+    const VEC_TYPE& vec;
+    double p0, p1, p2 ;
+    int lower, log;
+};
+
+
+} // stats
+} // Rcpp
+
+#define RCPP_DPQ_0(__NAME__,__D__,__P__,__Q__)                                         \
+namespace Rcpp {                                                                       \
+template <int RTYPE, bool NA, typename T>                                              \
+inline stats::D0<RTYPE,NA,T> d##__NAME__(                                              \
+    const Rcpp::VectorBase<RTYPE,NA,T>& x, bool log = false                            \
+) {                                                                                    \
+    return stats::D0<RTYPE,NA,T>( __D__, x, log );                                     \
+}                                                                                      \
+template <int RTYPE, bool NA, typename T>                                              \
+inline stats::P0<RTYPE,NA,T> p##__NAME__(                                              \
+    const Rcpp::VectorBase<RTYPE,NA,T>& x, bool lower = true, bool log = false         \
+) {                                                                                    \
+    return stats::P0<RTYPE,NA,T>( __P__, x, lower, log );                              \
+}                                                                                      \
+template <int RTYPE, bool NA, typename T>                                              \
+inline stats::Q0<RTYPE,NA,T> q##__NAME__(                                              \
+    const Rcpp::VectorBase<RTYPE,NA,T>& x, bool lower = true, bool log = false         \
+) {                                                                                    \
+    return stats::Q0<RTYPE,NA,T>( __Q__, x, lower, log );                              \
+} }
+
+
+#define RCPP_DPQ_1(__NAME__,__D__,__P__,__Q__)                                         \
+namespace Rcpp {                                                                       \
+template <int RTYPE, bool NA, typename T>                                              \
+inline stats::D1<RTYPE,NA,T> d##__NAME__(                                              \
+    const Rcpp::VectorBase<RTYPE,NA,T>& x, double p0, bool log = false                 \
+) {                                                                                    \
+    return stats::D1<RTYPE,NA,T>( __D__, x, p0, log );                                 \
+}                                                                                      \
+template <int RTYPE, bool NA, typename T>                                              \
+inline stats::P1<RTYPE,NA,T> p##__NAME__(                                              \
+    const Rcpp::VectorBase<RTYPE,NA,T>& x, double p0, bool lower = true, bool log = false \
+) {                                                                                    \
+    return stats::P1<RTYPE,NA,T>( __P__, x, p0, lower, log );                          \
+}                                                                                      \
+template <int RTYPE, bool NA, typename T>                                              \
+inline stats::Q1<RTYPE,NA,T> q##__NAME__(                                              \
+    const Rcpp::VectorBase<RTYPE,NA,T>& x, double p0, bool lower = true, bool log = false \
+) {                                                                                    \
+    return stats::Q1<RTYPE,NA,T>( __Q__, x, p0, lower, log );                          \
+} }
+
+
+
+#define RCPP_DPQ_2(__NAME__,__D__,__P__,__Q__)                                         \
+namespace Rcpp {                                                                       \
+template <int RTYPE, bool NA, typename T>                                              \
+inline stats::D2<RTYPE,NA,T> d##__NAME__(                                              \
+    const Rcpp::VectorBase<RTYPE,NA,T>& x, double p0, double p1, bool log = false      \
+) {                                                                                    \
+    return stats::D2<RTYPE,NA,T>( __D__, x, p0, p1, log );                             \
+}                                                                                      \
+template <int RTYPE, bool NA, typename T>                                              \
+inline stats::P2<RTYPE,NA,T> p##__NAME__(                                              \
+    const Rcpp::VectorBase<RTYPE,NA,T>& x, double p0, double p1, bool lower = true, bool log = false       \
+) {                                                                                    \
+    return stats::P2<RTYPE,NA,T>( __P__, x, p0, p1, lower, log );                      \
+}                                                                                      \
+template <int RTYPE, bool NA, typename T>                                              \
+inline stats::Q2<RTYPE,NA,T> q##__NAME__(                                              \
+    const Rcpp::VectorBase<RTYPE,NA,T>& x, double p0, double p1, bool lower = true, bool log = false       \
+) {                                                                                    \
+    return stats::Q2<RTYPE,NA,T>( __Q__, x, p0, p1, lower, log );                      \
+} }
+
+
+
+#define RCPP_DPQ_3(__NAME__,__D__,__P__,__Q__)                                         \
+namespace Rcpp {                                                                       \
+template <int RTYPE, bool NA, typename T>                                              \
+inline stats::D3<RTYPE,NA,T> d##__NAME__(                                              \
+    const Rcpp::VectorBase<RTYPE,NA,T>& x, double p0, double p1, double p2, bool log = false                          \
+) {                                                                                    \
+    return stats::D3<RTYPE,NA,T>( __D__, x, p0, p1, p2, log );                         \
+}                                                                                      \
+template <int RTYPE, bool NA, typename T>                                              \
+inline stats::P3<RTYPE,NA,T> p##__NAME__(                                              \
+    const Rcpp::VectorBase<RTYPE,NA,T>& x, double p0, double p1, double p2, bool lower = true, bool log = false       \
+) {                                                                                    \
+    return stats::P3<RTYPE,NA,T>( __P__, x, p0, p1, p2, lower, log );                  \
+}                                                                                      \
+template <int RTYPE, bool NA, typename T>                                              \
+inline stats::Q3<RTYPE,NA,T> q##__NAME__(                                              \
+    const Rcpp::VectorBase<RTYPE,NA,T>& x, double p0, double p1, double p2, bool lower = true, bool log = false       \
+) {                                                                                    \
+    return stats::Q3<RTYPE,NA,T>( __Q__, x, p0, p1, p2, lower, log );                  \
+} }
+
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/stats/dpq/macros.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/stats/dpq/macros.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/stats/dpq/macros.h	(revision 2477)
@@ -0,0 +1,127 @@
+/*
+ *  R : A Computer Language for Statistical Data Analysis
+ *  Copyright (C) 2000--2007  R Development Core Team
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, a copy is available at
+ *  http://www.r-project.org/Licenses/
+ */
+	/* Utilities for `dpq' handling (density/probability/quantile) */
+
+/* This is borrowed from R, with some changes */
+
+/* give_log in "d";  log_p in "p" & "q" : */
+#define give_log log_p
+							/* "DEFAULT" */
+							/* --------- */
+#define R_D__0	(log_p ? ML_NEGINF : 0.)		/* 0 */
+#define R_D__1	(log_p ? 0. : 1.)			/* 1 */
+#define R_DT_0	(lower_tail ? R_D__0 : R_D__1)		/* 0 */
+#define R_DT_1	(lower_tail ? R_D__1 : R_D__0)		/* 1 */
+
+/* Use 0.5 - p + 0.5 to perhaps gain 1 bit of accuracy */
+#define R_D_Lval(p)	(lower_tail ? (p) : (0.5 - (p) + 0.5))	/*  p  */
+#define R_D_Cval(p)	(lower_tail ? (0.5 - (p) + 0.5) : (p))	/*  1 - p */
+
+#define R_D_val(x)	(log_p	? ::log(x) : (x))		/*  x  in pF(x,..) */
+#define R_D_qIv(p)	(log_p	? ::exp(p) : (p))		/*  p  in qF(p,..) */
+#define R_D_exp(x)	(log_p	?  (x)	 : ::exp(x))	/* exp(x) */
+#define R_D_log(p)	(log_p	?  (p)	 : ::log(p))	/* log(p) */
+#define R_D_Clog(p)	(log_p	? ::log1p(-(p)) : (0.5 - (p) + 0.5)) /* [log](1-p) */
+
+/* log(1 - exp(x))  in more stable form than log1p(- R_D_qIv(x))) : */
+#define R_Log1_Exp(x)   ((x) > -M_LN2 ? ::log(-::expm1(x)) : ::log1p(-::exp(x)))
+
+/* log(1-exp(x)):  R_D_LExp(x) == (log1p(- R_D_qIv(x))) but even more stable:*/
+#define R_D_LExp(x)     (log_p ? R_Log1_Exp(x) : ::log1p(-x))
+
+#define R_DT_val(x)	(lower_tail ? R_D_val(x)  : R_D_Clog(x))
+#define R_DT_Cval(x)	(lower_tail ? R_D_Clog(x) : R_D_val(x))
+
+/*#define R_DT_qIv(p)	R_D_Lval(R_D_qIv(p))		 *  p  in qF ! */
+#define R_DT_qIv(p)	(log_p ? (lower_tail ? ::exp(p) : - ::expm1(p)) \
+			       : R_D_Lval(p))
+
+/*#define R_DT_CIv(p)	R_D_Cval(R_D_qIv(p))		 *  1 - p in qF */
+#define R_DT_CIv(p)	(log_p ? (lower_tail ? -expm1(p) : ::exp(p)) \
+			       : R_D_Cval(p))
+
+#define R_DT_exp(x)	R_D_exp(R_D_Lval(x))		/* exp(x) */
+#define R_DT_Cexp(x)	R_D_exp(R_D_Cval(x))		/* exp(1 - x) */
+
+#define R_DT_log(p)	(lower_tail? R_D_log(p) : R_D_LExp(p))/* log(p) in qF */
+#define R_DT_Clog(p)	(lower_tail? R_D_LExp(p): R_D_log(p))/* log(1-p) in qF*/
+#define R_DT_Log(p)	(lower_tail? (p) : R_Log1_Exp(p))
+/* ==   R_DT_log when we already "know" log_p == TRUE :*/
+
+
+#define R_Q_P01_check(p)			\
+    if ((log_p	&& p > 0) ||			\
+	(!log_p && (p < 0 || p > 1)) )		\
+	return R_NaN
+
+/* Do the boundaries exactly for q*() functions :
+ * Often  _LEFT_ = ML_NEGINF , and very often _RIGHT_ = ML_POSINF;
+ *
+ * R_Q_P01_boundaries(p, _LEFT_, _RIGHT_)  :<==>
+ *
+ *     R_Q_P01_check(p);
+ *     if (p == R_DT_0) return _LEFT_ ;
+ *     if (p == R_DT_1) return _RIGHT_;
+ *
+ * the following implementation should be more efficient (less tests):
+ */
+#define R_Q_P01_boundaries(p, _LEFT_, _RIGHT_)		\
+    if (log_p) {					\
+	if(p > 0)					\
+	    return R_NaN ;				\
+	if(p == 0) /* upper bound*/			\
+	    return lower_tail ? _RIGHT_ : _LEFT_;	\
+	if(p == ML_NEGINF)				\
+	    return lower_tail ? _LEFT_ : _RIGHT_;	\
+    }							\
+    else { /* !log_p */					\
+	if(p < 0 || p > 1)				\
+	    return R_NaN ;				\
+	if(p == 0)					\
+	    return lower_tail ? _LEFT_ : _RIGHT_;	\
+	if(p == 1)					\
+	    return lower_tail ? _RIGHT_ : _LEFT_;	\
+    }
+
+#define R_P_bounds_01(x, x_min, x_max) 	\
+    if(x <= x_min) return R_DT_0;		\
+    if(x >= x_max) return R_DT_1
+/* is typically not quite optimal for (-Inf,Inf) where
+ * you'd rather have */
+#define R_P_bounds_Inf_01(x)			\
+    if(!R_FINITE(x)) {				\
+	if (x > 0) return R_DT_1;		\
+	/* x < 0 */return R_DT_0;		\
+    }
+
+
+
+/* additions for density functions (C.Loader) */
+#define R_D_fexp(f,x)     (give_log ? -0.5*log(f)+(x) : exp(x)/sqrt(f))
+#define R_D_forceint(x)   floor((x) + 0.5)
+#define R_D_nonint(x) 	  (fabs((x) - floor((x)+0.5)) > 1e-7)
+/* [neg]ative or [non int]eger : */
+#define R_D_negInonint(x) (x < 0. || R_D_nonint(x))
+
+#define R_D_nonint_check(x) 				\
+   if(R_D_nonint(x)) {					\
+	MATHLIB_WARNING("non-integer x = %f", x);	\
+	return R_D__0;					\
+   }
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/utils/tinyformat.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/utils/tinyformat.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/utils/tinyformat.h	(revision 2477)
@@ -0,0 +1,1051 @@
+// tinyformat.h
+// Copyright (C) 2011, Chris Foster [chris42f (at) gmail (d0t) com]
+//
+// Boost Software License - Version 1.0
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+
+//------------------------------------------------------------------------------
+// Tinyformat: A minimal type safe printf replacement
+//
+// tinyformat.h is a type safe printf replacement library in a single C++
+// header file.  Design goals include:
+//
+// * Type safety and extensibility for user defined types.
+// * C99 printf() compatibility, to the extent possible using std::ostream
+// * Simplicity and minimalism.  A single header file to include and distribute
+//   with your projects.
+// * Augment rather than replace the standard stream formatting mechanism
+// * C++98 support, with optional C++11 niceties
+//
+//
+// Main interface example usage
+// ----------------------------
+//
+// To print a date to std::cout:
+//
+//   std::string weekday = "Wednesday";
+//   const char* month = "July";
+//   size_t day = 27;
+//   long hour = 14;
+//   int min = 44;
+//
+//   tfm::printf("%s, %s %d, %.2d:%.2d\n", weekday, month, day, hour, min);
+//
+// The strange types here emphasize the type safety of the interface; it is
+// possible to print a std::string using the "%s" conversion, and a
+// size_t using the "%d" conversion.  A similar result could be achieved
+// using either of the tfm::format() functions.  One prints on a user provided
+// stream:
+//
+//   tfm::format(std::cerr, "%s, %s %d, %.2d:%.2d\n",
+//               weekday, month, day, hour, min);
+//
+// The other returns a std::string:
+//
+//   std::string date = tfm::format("%s, %s %d, %.2d:%.2d\n",
+//                                  weekday, month, day, hour, min);
+//   std::cout << date;
+//
+// These are the three primary interface functions.  There is also a
+// convenience function printfln() which appends a newline to the usual result
+// of printf() for super simple logging.
+//
+//
+// User defined format functions
+// -----------------------------
+//
+// Simulating variadic templates in C++98 is pretty painful since it requires
+// writing out the same function for each desired number of arguments.  To make
+// this bearable tinyformat comes with a set of macros which are used
+// internally to generate the API, but which may also be used in user code.
+//
+// The three macros TINYFORMAT_ARGTYPES(n), TINYFORMAT_VARARGS(n) and
+// TINYFORMAT_PASSARGS(n) will generate a list of n argument types,
+// type/name pairs and argument names respectively when called with an integer
+// n between 1 and 16.  We can use these to define a macro which generates the
+// desired user defined function with n arguments.  To generate all 16 user
+// defined function bodies, use the macro TINYFORMAT_FOREACH_ARGNUM.  For an
+// example, see the implementation of printf() at the end of the source file.
+//
+// Sometimes it's useful to be able to pass a list of format arguments through
+// to a non-template function.  The FormatList class is provided as a way to do
+// this by storing the argument list in a type-opaque way.  Continuing the
+// example from above, we construct a FormatList using makeFormatList():
+//
+//   FormatListRef formatList = tfm::makeFormatList(weekday, month, day, hour, min);
+//
+// The format list can now be passed into any non-template function and used
+// via a call to the vformat() function:
+//
+//   tfm::vformat(std::cout, "%s, %s %d, %.2d:%.2d\n", formatList);
+//
+//
+// Additional API information
+// --------------------------
+//
+// Error handling: Define TINYFORMAT_ERROR to customize the error handling for
+// format strings which are unsupported or have the wrong number of format
+// specifiers (calls assert() by default).
+//
+// User defined types: Uses operator<< for user defined types by default.
+// Overload formatValue() for more control.
+
+
+#ifndef TINYFORMAT_H_INCLUDED
+#define TINYFORMAT_H_INCLUDED
+
+namespace tinyformat {}
+//------------------------------------------------------------------------------
+// Config section.  Customize to your liking!
+
+// Namespace alias to encourage brevity
+namespace tfm = tinyformat;
+
+// Error handling; calls assert() by default.
+namespace Rcpp {
+    void stop(const std::string& message);
+}
+#define TINYFORMAT_ERROR(REASON) ::Rcpp::stop(REASON)
+
+// Define for C++11 variadic templates which make the code shorter & more
+// general.  If you don't define this, C++11 support is autodetected below.
+// #define TINYFORMAT_USE_VARIADIC_TEMPLATES
+
+// don't use C++11 features (support older compilers)
+#define TINYFORMAT_NO_VARIADIC_TEMPLATES
+
+//------------------------------------------------------------------------------
+// Implementation details.
+#include <algorithm>
+// #include <cassert>
+#include <iostream>
+#include <sstream>
+
+// #ifndef TINYFORMAT_ERROR
+// #   define TINYFORMAT_ERROR(reason) assert(0 && reason)
+// #endif
+
+#if !defined(TINYFORMAT_USE_VARIADIC_TEMPLATES) && !defined(TINYFORMAT_NO_VARIADIC_TEMPLATES)
+#   ifdef __GXX_EXPERIMENTAL_CXX0X__
+#       define TINYFORMAT_USE_VARIADIC_TEMPLATES
+#   endif
+#endif
+
+#ifdef TINYFORMAT_USE_VARIADIC_TEMPLATES
+#   include <array>
+#   if defined(_MSC_VER) && _MSC_VER <= 1800 // VS2013
+#       define TINYFORMAT_BRACED_INIT_WORKAROUND(x) (x)
+#   else
+#       define TINYFORMAT_BRACED_INIT_WORKAROUND(x) {x}
+#   endif
+#endif
+
+#if defined(__GLIBCXX__) && __GLIBCXX__ < 20080201
+//  std::showpos is broken on old libstdc++ as provided with OSX.  See
+//  http://gcc.gnu.org/ml/libstdc++/2007-11/msg00075.html
+#   define TINYFORMAT_OLD_LIBSTDCPLUSPLUS_WORKAROUND
+#endif
+
+#ifdef __APPLE__
+// Workaround OSX linker warning: xcode uses different default symbol
+// visibilities for static libs vs executables (see issue #25)
+#   define TINYFORMAT_HIDDEN __attribute__((visibility("hidden")))
+#else
+#   define TINYFORMAT_HIDDEN
+#endif
+
+namespace tinyformat {
+
+//------------------------------------------------------------------------------
+namespace detail {
+
+// Test whether type T1 is convertible to type T2
+template <typename T1, typename T2>
+struct is_convertible
+{
+    private:
+        // two types of different size
+        struct fail { char dummy[2]; };
+        struct succeed { char dummy; };
+        // Try to convert a T1 to a T2 by plugging into tryConvert
+        static fail tryConvert(...);
+        static succeed tryConvert(const T2&);
+        static const T1& makeT1();
+    public:
+#       ifdef _MSC_VER
+        // Disable spurious loss of precision warnings in tryConvert(makeT1())
+#       pragma warning(push)
+#       pragma warning(disable:4244)
+#       pragma warning(disable:4267)
+#       endif
+        // Standard trick: the (...) version of tryConvert will be chosen from
+        // the overload set only if the version taking a T2 doesn't match.
+        // Then we compare the sizes of the return types to check which
+        // function matched.  Very neat, in a disgusting kind of way :)
+        static const bool value =
+            sizeof(tryConvert(makeT1())) == sizeof(succeed);
+#       ifdef _MSC_VER
+#       pragma warning(pop)
+#       endif
+};
+
+
+// Detect when a type is not a wchar_t string
+template<typename T> struct is_wchar { typedef int tinyformat_wchar_is_not_supported; };
+template<> struct is_wchar<wchar_t*> {};
+template<> struct is_wchar<const wchar_t*> {};
+template<int n> struct is_wchar<const wchar_t[n]> {};
+template<int n> struct is_wchar<wchar_t[n]> {};
+
+
+// Format the value by casting to type fmtT.  This default implementation
+// should never be called.
+template<typename T, typename fmtT, bool convertible = is_convertible<T, fmtT>::value>
+struct formatValueAsType
+{
+    static void invoke(std::ostream& /*out*/, const T& /*value*/) { /*assert(0);*/ }
+};
+// Specialized version for types that can actually be converted to fmtT, as
+// indicated by the "convertible" template parameter.
+template<typename T, typename fmtT>
+struct formatValueAsType<T,fmtT,true>
+{
+    static void invoke(std::ostream& out, const T& value)
+        { out << static_cast<fmtT>(value); }
+};
+
+#ifdef TINYFORMAT_OLD_LIBSTDCPLUSPLUS_WORKAROUND
+template<typename T, bool convertible = is_convertible<T, int>::value>
+struct formatZeroIntegerWorkaround
+{
+    static bool invoke(std::ostream& /**/, const T& /**/) { return false; }
+};
+template<typename T>
+struct formatZeroIntegerWorkaround<T,true>
+{
+    static bool invoke(std::ostream& out, const T& value)
+    {
+        if (static_cast<int>(value) == 0 && out.flags() & std::ios::showpos)
+        {
+            out << "+0";
+            return true;
+        }
+        return false;
+    }
+};
+#endif // TINYFORMAT_OLD_LIBSTDCPLUSPLUS_WORKAROUND
+
+// Convert an arbitrary type to integer.  The version with convertible=false
+// throws an error.
+template<typename T, bool convertible = is_convertible<T,int>::value>
+struct convertToInt
+{
+    static int invoke(const T& /*value*/)
+    {
+        TINYFORMAT_ERROR("tinyformat: Cannot convert from argument type to "
+                         "integer for use as variable width or precision");
+        return 0;
+    }
+};
+// Specialization for convertToInt when conversion is possible
+template<typename T>
+struct convertToInt<T,true>
+{
+    static int invoke(const T& value) { return static_cast<int>(value); }
+};
+
+// Format at most ntrunc characters to the given stream.
+template<typename T>
+inline void formatTruncated(std::ostream& out, const T& value, int ntrunc)
+{
+    std::ostringstream tmp;
+    tmp << value;
+    std::string result = tmp.str();
+    out.write(result.c_str(), std::min(ntrunc, static_cast<int>(result.size())));
+}
+#define TINYFORMAT_DEFINE_FORMAT_TRUNCATED_CSTR(type)       \
+inline void formatTruncated(std::ostream& out, type* value, int ntrunc) \
+{                                                           \
+    std::streamsize len = 0;                                \
+    while(len < ntrunc && value[len] != 0)                  \
+        ++len;                                              \
+    out.write(value, len);                                  \
+}
+// Overload for const char* and char*.  Could overload for signed & unsigned
+// char too, but these are technically unneeded for printf compatibility.
+TINYFORMAT_DEFINE_FORMAT_TRUNCATED_CSTR(const char)
+TINYFORMAT_DEFINE_FORMAT_TRUNCATED_CSTR(char)
+#undef TINYFORMAT_DEFINE_FORMAT_TRUNCATED_CSTR
+
+} // namespace detail
+
+
+//------------------------------------------------------------------------------
+// Variable formatting functions.  May be overridden for user-defined types if
+// desired.
+
+
+/// Format a value into a stream, delegating to operator<< by default.
+///
+/// Users may override this for their own types.  When this function is called,
+/// the stream flags will have been modified according to the format string.
+/// The format specification is provided in the range [fmtBegin, fmtEnd).  For
+/// truncating conversions, ntrunc is set to the desired maximum number of
+/// characters, for example "%.7s" calls formatValue with ntrunc = 7.
+///
+/// By default, formatValue() uses the usual stream insertion operator
+/// operator<< to format the type T, with special cases for the %c and %p
+/// conversions.
+template<typename T>
+inline void formatValue(std::ostream& out, const char* /*fmtBegin*/,
+                        const char* fmtEnd, int ntrunc, const T& value)
+{
+#ifndef TINYFORMAT_ALLOW_WCHAR_STRINGS
+    // Since we don't support printing of wchar_t using "%ls", make it fail at
+    // compile time in preference to printing as a void* at runtime.
+    typedef typename detail::is_wchar<T>::tinyformat_wchar_is_not_supported DummyType;
+    (void) DummyType(); // avoid unused type warning with gcc-4.8
+#endif
+    // The mess here is to support the %c and %p conversions: if these
+    // conversions are active we try to convert the type to a char or const
+    // void* respectively and format that instead of the value itself.  For the
+    // %p conversion it's important to avoid dereferencing the pointer, which
+    // could otherwise lead to a crash when printing a dangling (const char*).
+    bool canConvertToChar = detail::is_convertible<T,char>::value;
+    bool canConvertToVoidPtr = detail::is_convertible<T, const void*>::value;
+    if(canConvertToChar && *(fmtEnd-1) == 'c')
+        detail::formatValueAsType<T, char>::invoke(out, value);
+    else if(canConvertToVoidPtr && *(fmtEnd-1) == 'p')
+        detail::formatValueAsType<T, const void*>::invoke(out, value);
+#ifdef TINYFORMAT_OLD_LIBSTDCPLUSPLUS_WORKAROUND
+    else if(detail::formatZeroIntegerWorkaround<T>::invoke(out, value)) /**/;
+#endif
+    else if(ntrunc >= 0)
+    {
+        // Take care not to overread C strings in truncating conversions like
+        // "%.4s" where at most 4 characters may be read.
+        detail::formatTruncated(out, value, ntrunc);
+    }
+    else
+        out << value;
+}
+
+
+// Overloaded version for char types to support printing as an integer
+#define TINYFORMAT_DEFINE_FORMATVALUE_CHAR(charType)                  \
+inline void formatValue(std::ostream& out, const char* /*fmtBegin*/,  \
+                        const char* fmtEnd, int /**/, charType value) \
+{                                                                     \
+    switch(*(fmtEnd-1))                                               \
+    {                                                                 \
+        case 'u': case 'd': case 'i': case 'o': case 'X': case 'x':   \
+            out << static_cast<int>(value); break;                    \
+        default:                                                      \
+            out << value;                   break;                    \
+    }                                                                 \
+}
+// per 3.9.1: char, signed char and unsigned char are all distinct types
+TINYFORMAT_DEFINE_FORMATVALUE_CHAR(char)
+TINYFORMAT_DEFINE_FORMATVALUE_CHAR(signed char)
+TINYFORMAT_DEFINE_FORMATVALUE_CHAR(unsigned char)
+#undef TINYFORMAT_DEFINE_FORMATVALUE_CHAR
+
+
+//------------------------------------------------------------------------------
+// Tools for emulating variadic templates in C++98.  The basic idea here is
+// stolen from the boost preprocessor metaprogramming library and cut down to
+// be just general enough for what we need.
+
+#define TINYFORMAT_ARGTYPES(n) TINYFORMAT_ARGTYPES_ ## n
+#define TINYFORMAT_VARARGS(n) TINYFORMAT_VARARGS_ ## n
+#define TINYFORMAT_PASSARGS(n) TINYFORMAT_PASSARGS_ ## n
+#define TINYFORMAT_PASSARGS_TAIL(n) TINYFORMAT_PASSARGS_TAIL_ ## n
+
+// To keep it as transparent as possible, the macros below have been generated
+// using python via the excellent cog.py code generation script.  This avoids
+// the need for a bunch of complex (but more general) preprocessor tricks as
+// used in boost.preprocessor.
+//
+// To rerun the code generation in place, use `cog.py -r tinyformat.h`
+// (see http://nedbatchelder.com/code/cog).  Alternatively you can just create
+// extra versions by hand.
+
+/*[[[cog
+maxParams = 16
+
+def makeCommaSepLists(lineTemplate, elemTemplate, startInd=1):
+    for j in range(startInd,maxParams+1):
+        list = ', '.join([elemTemplate % {'i':i} for i in range(startInd,j+1)])
+        cog.outl(lineTemplate % {'j':j, 'list':list})
+
+makeCommaSepLists('#define TINYFORMAT_ARGTYPES_%(j)d %(list)s',
+                  'class T%(i)d')
+
+cog.outl()
+makeCommaSepLists('#define TINYFORMAT_VARARGS_%(j)d %(list)s',
+                  'const T%(i)d& v%(i)d')
+
+cog.outl()
+makeCommaSepLists('#define TINYFORMAT_PASSARGS_%(j)d %(list)s', 'v%(i)d')
+
+cog.outl()
+cog.outl('#define TINYFORMAT_PASSARGS_TAIL_1')
+makeCommaSepLists('#define TINYFORMAT_PASSARGS_TAIL_%(j)d , %(list)s',
+                  'v%(i)d', startInd = 2)
+
+cog.outl()
+cog.outl('#define TINYFORMAT_FOREACH_ARGNUM(m) \\\n    ' +
+         ' '.join(['m(%d)' % (j,) for j in range(1,maxParams+1)]))
+]]]*/
+#define TINYFORMAT_ARGTYPES_1 class T1
+#define TINYFORMAT_ARGTYPES_2 class T1, class T2
+#define TINYFORMAT_ARGTYPES_3 class T1, class T2, class T3
+#define TINYFORMAT_ARGTYPES_4 class T1, class T2, class T3, class T4
+#define TINYFORMAT_ARGTYPES_5 class T1, class T2, class T3, class T4, class T5
+#define TINYFORMAT_ARGTYPES_6 class T1, class T2, class T3, class T4, class T5, class T6
+#define TINYFORMAT_ARGTYPES_7 class T1, class T2, class T3, class T4, class T5, class T6, class T7
+#define TINYFORMAT_ARGTYPES_8 class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8
+#define TINYFORMAT_ARGTYPES_9 class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9
+#define TINYFORMAT_ARGTYPES_10 class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10
+#define TINYFORMAT_ARGTYPES_11 class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11
+#define TINYFORMAT_ARGTYPES_12 class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12
+#define TINYFORMAT_ARGTYPES_13 class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13
+#define TINYFORMAT_ARGTYPES_14 class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14
+#define TINYFORMAT_ARGTYPES_15 class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15
+#define TINYFORMAT_ARGTYPES_16 class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10, class T11, class T12, class T13, class T14, class T15, class T16
+
+#define TINYFORMAT_VARARGS_1 const T1& v1
+#define TINYFORMAT_VARARGS_2 const T1& v1, const T2& v2
+#define TINYFORMAT_VARARGS_3 const T1& v1, const T2& v2, const T3& v3
+#define TINYFORMAT_VARARGS_4 const T1& v1, const T2& v2, const T3& v3, const T4& v4
+#define TINYFORMAT_VARARGS_5 const T1& v1, const T2& v2, const T3& v3, const T4& v4, const T5& v5
+#define TINYFORMAT_VARARGS_6 const T1& v1, const T2& v2, const T3& v3, const T4& v4, const T5& v5, const T6& v6
+#define TINYFORMAT_VARARGS_7 const T1& v1, const T2& v2, const T3& v3, const T4& v4, const T5& v5, const T6& v6, const T7& v7
+#define TINYFORMAT_VARARGS_8 const T1& v1, const T2& v2, const T3& v3, const T4& v4, const T5& v5, const T6& v6, const T7& v7, const T8& v8
+#define TINYFORMAT_VARARGS_9 const T1& v1, const T2& v2, const T3& v3, const T4& v4, const T5& v5, const T6& v6, const T7& v7, const T8& v8, const T9& v9
+#define TINYFORMAT_VARARGS_10 const T1& v1, const T2& v2, const T3& v3, const T4& v4, const T5& v5, const T6& v6, const T7& v7, const T8& v8, const T9& v9, const T10& v10
+#define TINYFORMAT_VARARGS_11 const T1& v1, const T2& v2, const T3& v3, const T4& v4, const T5& v5, const T6& v6, const T7& v7, const T8& v8, const T9& v9, const T10& v10, const T11& v11
+#define TINYFORMAT_VARARGS_12 const T1& v1, const T2& v2, const T3& v3, const T4& v4, const T5& v5, const T6& v6, const T7& v7, const T8& v8, const T9& v9, const T10& v10, const T11& v11, const T12& v12
+#define TINYFORMAT_VARARGS_13 const T1& v1, const T2& v2, const T3& v3, const T4& v4, const T5& v5, const T6& v6, const T7& v7, const T8& v8, const T9& v9, const T10& v10, const T11& v11, const T12& v12, const T13& v13
+#define TINYFORMAT_VARARGS_14 const T1& v1, const T2& v2, const T3& v3, const T4& v4, const T5& v5, const T6& v6, const T7& v7, const T8& v8, const T9& v9, const T10& v10, const T11& v11, const T12& v12, const T13& v13, const T14& v14
+#define TINYFORMAT_VARARGS_15 const T1& v1, const T2& v2, const T3& v3, const T4& v4, const T5& v5, const T6& v6, const T7& v7, const T8& v8, const T9& v9, const T10& v10, const T11& v11, const T12& v12, const T13& v13, const T14& v14, const T15& v15
+#define TINYFORMAT_VARARGS_16 const T1& v1, const T2& v2, const T3& v3, const T4& v4, const T5& v5, const T6& v6, const T7& v7, const T8& v8, const T9& v9, const T10& v10, const T11& v11, const T12& v12, const T13& v13, const T14& v14, const T15& v15, const T16& v16
+
+#define TINYFORMAT_PASSARGS_1 v1
+#define TINYFORMAT_PASSARGS_2 v1, v2
+#define TINYFORMAT_PASSARGS_3 v1, v2, v3
+#define TINYFORMAT_PASSARGS_4 v1, v2, v3, v4
+#define TINYFORMAT_PASSARGS_5 v1, v2, v3, v4, v5
+#define TINYFORMAT_PASSARGS_6 v1, v2, v3, v4, v5, v6
+#define TINYFORMAT_PASSARGS_7 v1, v2, v3, v4, v5, v6, v7
+#define TINYFORMAT_PASSARGS_8 v1, v2, v3, v4, v5, v6, v7, v8
+#define TINYFORMAT_PASSARGS_9 v1, v2, v3, v4, v5, v6, v7, v8, v9
+#define TINYFORMAT_PASSARGS_10 v1, v2, v3, v4, v5, v6, v7, v8, v9, v10
+#define TINYFORMAT_PASSARGS_11 v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11
+#define TINYFORMAT_PASSARGS_12 v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12
+#define TINYFORMAT_PASSARGS_13 v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13
+#define TINYFORMAT_PASSARGS_14 v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14
+#define TINYFORMAT_PASSARGS_15 v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15
+#define TINYFORMAT_PASSARGS_16 v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16
+
+#define TINYFORMAT_PASSARGS_TAIL_1
+#define TINYFORMAT_PASSARGS_TAIL_2 , v2
+#define TINYFORMAT_PASSARGS_TAIL_3 , v2, v3
+#define TINYFORMAT_PASSARGS_TAIL_4 , v2, v3, v4
+#define TINYFORMAT_PASSARGS_TAIL_5 , v2, v3, v4, v5
+#define TINYFORMAT_PASSARGS_TAIL_6 , v2, v3, v4, v5, v6
+#define TINYFORMAT_PASSARGS_TAIL_7 , v2, v3, v4, v5, v6, v7
+#define TINYFORMAT_PASSARGS_TAIL_8 , v2, v3, v4, v5, v6, v7, v8
+#define TINYFORMAT_PASSARGS_TAIL_9 , v2, v3, v4, v5, v6, v7, v8, v9
+#define TINYFORMAT_PASSARGS_TAIL_10 , v2, v3, v4, v5, v6, v7, v8, v9, v10
+#define TINYFORMAT_PASSARGS_TAIL_11 , v2, v3, v4, v5, v6, v7, v8, v9, v10, v11
+#define TINYFORMAT_PASSARGS_TAIL_12 , v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12
+#define TINYFORMAT_PASSARGS_TAIL_13 , v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13
+#define TINYFORMAT_PASSARGS_TAIL_14 , v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14
+#define TINYFORMAT_PASSARGS_TAIL_15 , v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15
+#define TINYFORMAT_PASSARGS_TAIL_16 , v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16
+
+#define TINYFORMAT_FOREACH_ARGNUM(m) \
+    m(1) m(2) m(3) m(4) m(5) m(6) m(7) m(8) m(9) m(10) m(11) m(12) m(13) m(14) m(15) m(16)
+//[[[end]]]
+
+
+
+namespace detail {
+
+// Type-opaque holder for an argument to format(), with associated actions on
+// the type held as explicit function pointers.  This allows FormatArg's for
+// each argument to be allocated as a homogenous array inside FormatList
+// whereas a naive implementation based on inheritance does not.
+class FormatArg
+{
+    public:
+        FormatArg() {}
+
+        template<typename T>
+        FormatArg(const T& value)
+            : m_value(static_cast<const void*>(&value)),
+            m_formatImpl(&formatImpl<T>),
+            m_toIntImpl(&toIntImpl<T>)
+        { }
+
+        void format(std::ostream& out, const char* fmtBegin,
+                    const char* fmtEnd, int ntrunc) const
+        {
+            m_formatImpl(out, fmtBegin, fmtEnd, ntrunc, m_value);
+        }
+
+        int toInt() const
+        {
+            return m_toIntImpl(m_value);
+        }
+
+    private:
+        template<typename T>
+        TINYFORMAT_HIDDEN static void formatImpl(std::ostream& out, const char* fmtBegin,
+                        const char* fmtEnd, int ntrunc, const void* value)
+        {
+            formatValue(out, fmtBegin, fmtEnd, ntrunc, *static_cast<const T*>(value));
+        }
+
+        template<typename T>
+        TINYFORMAT_HIDDEN static int toIntImpl(const void* value)
+        {
+            return convertToInt<T>::invoke(*static_cast<const T*>(value));
+        }
+
+        const void* m_value;
+        void (*m_formatImpl)(std::ostream& out, const char* fmtBegin,
+                             const char* fmtEnd, int ntrunc, const void* value);
+        int (*m_toIntImpl)(const void* value);
+};
+
+
+// Parse and return an integer from the string c, as atoi()
+// On return, c is set to one past the end of the integer.
+inline int parseIntAndAdvance(const char*& c)
+{
+    int i = 0;
+    for(;*c >= '0' && *c <= '9'; ++c)
+        i = 10*i + (*c - '0');
+    return i;
+}
+
+// Print literal part of format string and return next format spec
+// position.
+//
+// Skips over any occurrences of '%%', printing a literal '%' to the
+// output.  The position of the first % character of the next
+// nontrivial format spec is returned, or the end of string.
+inline const char* printFormatStringLiteral(std::ostream& out, const char* fmt)
+{
+    const char* c = fmt;
+    for(;; ++c)
+    {
+        switch(*c)
+        {
+            case '\0':
+                out.write(fmt, static_cast<std::streamsize>(c - fmt));
+                return c;
+            case '%':
+                out.write(fmt, static_cast<std::streamsize>(c - fmt));
+                if(*(c+1) != '%')
+                    return c;
+                // for "%%", tack trailing % onto next literal section.
+                fmt = ++c;
+                break;
+        }
+    }
+}
+
+
+// Parse a format string and set the stream state accordingly.
+//
+// The format mini-language recognized here is meant to be the one from C99,
+// with the form "%[flags][width][.precision][length]type".
+//
+// Formatting options which can't be natively represented using the ostream
+// state are returned in spacePadPositive (for space padded positive numbers)
+// and ntrunc (for truncating conversions).  argIndex is incremented if
+// necessary to pull out variable width and precision .  The function returns a
+// pointer to the character after the end of the current format spec.
+inline const char* streamStateFromFormat(std::ostream& out, bool& spacePadPositive,
+                                         int& ntrunc, const char* fmtStart,
+                                         const detail::FormatArg* formatters,
+                                         int& argIndex, int numFormatters)
+{
+    if(*fmtStart != '%')
+    {
+        TINYFORMAT_ERROR("tinyformat: Not enough conversion specifiers in format string");
+        return fmtStart;
+    }
+    // Reset stream state to defaults.
+    out.width(0);
+    out.precision(6);
+    out.fill(' ');
+    // Reset most flags; ignore irrelevant unitbuf & skipws.
+    out.unsetf(std::ios::adjustfield | std::ios::basefield |
+               std::ios::floatfield | std::ios::showbase | std::ios::boolalpha |
+               std::ios::showpoint | std::ios::showpos | std::ios::uppercase);
+    bool precisionSet = false;
+    bool widthSet = false;
+    int widthExtra = 0;
+    const char* c = fmtStart + 1;
+    // 1) Parse flags
+    for(;; ++c)
+    {
+        switch(*c)
+        {
+            case '#':
+                out.setf(std::ios::showpoint | std::ios::showbase);
+                continue;
+            case '0':
+                // overridden by left alignment ('-' flag)
+                if(!(out.flags() & std::ios::left))
+                {
+                    // Use internal padding so that numeric values are
+                    // formatted correctly, eg -00010 rather than 000-10
+                    out.fill('0');
+                    out.setf(std::ios::internal, std::ios::adjustfield);
+                }
+                continue;
+            case '-':
+                out.fill(' ');
+                out.setf(std::ios::left, std::ios::adjustfield);
+                continue;
+            case ' ':
+                // overridden by show positive sign, '+' flag.
+                if(!(out.flags() & std::ios::showpos))
+                    spacePadPositive = true;
+                continue;
+            case '+':
+                out.setf(std::ios::showpos);
+                spacePadPositive = false;
+                widthExtra = 1;
+                continue;
+        }
+        break;
+    }
+    // 2) Parse width
+    if(*c >= '0' && *c <= '9')
+    {
+        widthSet = true;
+        out.width(parseIntAndAdvance(c));
+    }
+    if(*c == '*')
+    {
+        widthSet = true;
+        int width = 0;
+        if(argIndex < numFormatters)
+            width = formatters[argIndex++].toInt();
+        else
+            TINYFORMAT_ERROR("tinyformat: Not enough arguments to read variable width");
+        if(width < 0)
+        {
+            // negative widths correspond to '-' flag set
+            out.fill(' ');
+            out.setf(std::ios::left, std::ios::adjustfield);
+            width = -width;
+        }
+        out.width(width);
+        ++c;
+    }
+    // 3) Parse precision
+    if(*c == '.')
+    {
+        ++c;
+        int precision = 0;
+        if(*c == '*')
+        {
+            ++c;
+            if(argIndex < numFormatters)
+                precision = formatters[argIndex++].toInt();
+            else
+                TINYFORMAT_ERROR("tinyformat: Not enough arguments to read variable precision");
+        }
+        else
+        {
+            if(*c >= '0' && *c <= '9')
+                precision = parseIntAndAdvance(c);
+            else if(*c == '-') // negative precisions ignored, treated as zero.
+                parseIntAndAdvance(++c);
+        }
+        out.precision(precision);
+        precisionSet = true;
+    }
+    // 4) Ignore any C99 length modifier
+    while(*c == 'l' || *c == 'h' || *c == 'L' ||
+          *c == 'j' || *c == 'z' || *c == 't')
+        ++c;
+    // 5) We're up to the conversion specifier character.
+    // Set stream flags based on conversion specifier (thanks to the
+    // boost::format class for forging the way here).
+    bool intConversion = false;
+    switch(*c)
+    {
+        case 'u': case 'd': case 'i':
+            out.setf(std::ios::dec, std::ios::basefield);
+            intConversion = true;
+            break;
+        case 'o':
+            out.setf(std::ios::oct, std::ios::basefield);
+            intConversion = true;
+            break;
+        case 'X':
+            out.setf(std::ios::uppercase);
+        case 'x': case 'p':
+            out.setf(std::ios::hex, std::ios::basefield);
+            intConversion = true;
+            break;
+        case 'E':
+            out.setf(std::ios::uppercase);
+        case 'e':
+            out.setf(std::ios::scientific, std::ios::floatfield);
+            out.setf(std::ios::dec, std::ios::basefield);
+            break;
+        case 'F':
+            out.setf(std::ios::uppercase);
+        case 'f':
+            out.setf(std::ios::fixed, std::ios::floatfield);
+            break;
+        case 'G':
+            out.setf(std::ios::uppercase);
+        case 'g':
+            out.setf(std::ios::dec, std::ios::basefield);
+            // As in boost::format, let stream decide float format.
+            out.flags(out.flags() & ~std::ios::floatfield);
+            break;
+        case 'a': case 'A':
+            TINYFORMAT_ERROR("tinyformat: the %a and %A conversion specs "
+                             "are not supported");
+            break;
+        case 'c':
+            // Handled as special case inside formatValue()
+            break;
+        case 's':
+            if(precisionSet)
+                ntrunc = static_cast<int>(out.precision());
+            // Make %s print booleans as "true" and "false"
+            out.setf(std::ios::boolalpha);
+            break;
+        case 'n':
+            // Not supported - will cause problems!
+            TINYFORMAT_ERROR("tinyformat: %n conversion spec not supported");
+            break;
+        case '\0':
+            TINYFORMAT_ERROR("tinyformat: Conversion spec incorrectly "
+                             "terminated by end of string");
+            return c;
+    }
+    if(intConversion && precisionSet && !widthSet)
+    {
+        // "precision" for integers gives the minimum number of digits (to be
+        // padded with zeros on the left).  This isn't really supported by the
+        // iostreams, but we can approximately simulate it with the width if
+        // the width isn't otherwise used.
+        out.width(out.precision() + widthExtra);
+        out.setf(std::ios::internal, std::ios::adjustfield);
+        out.fill('0');
+    }
+    return c+1;
+}
+
+
+//------------------------------------------------------------------------------
+inline void formatImpl(std::ostream& out, const char* fmt,
+                       const detail::FormatArg* formatters,
+                       int numFormatters)
+{
+    // Saved stream state
+    std::streamsize origWidth = out.width();
+    std::streamsize origPrecision = out.precision();
+    std::ios::fmtflags origFlags = out.flags();
+    char origFill = out.fill();
+
+    for (int argIndex = 0; argIndex < numFormatters; ++argIndex)
+    {
+        // Parse the format string
+        fmt = printFormatStringLiteral(out, fmt);
+        bool spacePadPositive = false;
+        int ntrunc = -1;
+        const char* fmtEnd = streamStateFromFormat(out, spacePadPositive, ntrunc, fmt,
+                                                   formatters, argIndex, numFormatters);
+        if (argIndex >= numFormatters)
+        {
+            // Check args remain after reading any variable width/precision
+            TINYFORMAT_ERROR("tinyformat: Not enough format arguments");
+            return;
+        }
+        const FormatArg& arg = formatters[argIndex];
+        // Format the arg into the stream.
+        if(!spacePadPositive)
+            arg.format(out, fmt, fmtEnd, ntrunc);
+        else
+        {
+            // The following is a special case with no direct correspondence
+            // between stream formatting and the printf() behaviour.  Simulate
+            // it crudely by formatting into a temporary string stream and
+            // munging the resulting string.
+            std::ostringstream tmpStream;
+            tmpStream.copyfmt(out);
+            tmpStream.setf(std::ios::showpos);
+            arg.format(tmpStream, fmt, fmtEnd, ntrunc);
+            std::string result = tmpStream.str(); // allocates... yuck.
+            for(size_t i = 0, iend = result.size(); i < iend; ++i)
+                if(result[i] == '+') result[i] = ' ';
+            out << result;
+        }
+        fmt = fmtEnd;
+    }
+
+    // Print remaining part of format string.
+    fmt = printFormatStringLiteral(out, fmt);
+    if(*fmt != '\0')
+        TINYFORMAT_ERROR("tinyformat: Too many conversion specifiers in format string");
+
+    // Restore stream state
+    out.width(origWidth);
+    out.precision(origPrecision);
+    out.flags(origFlags);
+    out.fill(origFill);
+}
+
+} // namespace detail
+
+
+/// List of template arguments format(), held in a type-opaque way.
+///
+/// A const reference to FormatList (typedef'd as FormatListRef) may be
+/// conveniently used to pass arguments to non-template functions: All type
+/// information has been stripped from the arguments, leaving just enough of a
+/// common interface to perform formatting as required.
+class FormatList
+{
+    public:
+        FormatList(detail::FormatArg* formatters, int N)
+            : m_formatters(formatters), m_N(N) { }
+
+        friend void vformat(std::ostream& out, const char* fmt,
+                            const FormatList& list);
+
+    private:
+        const detail::FormatArg* m_formatters;
+        int m_N;
+};
+
+/// Reference to type-opaque format list for passing to vformat()
+typedef const FormatList& FormatListRef;
+
+
+namespace detail {
+
+// Format list subclass with fixed storage to avoid dynamic allocation
+template<int N>
+class FormatListN : public FormatList
+{
+    public:
+#ifdef TINYFORMAT_USE_VARIADIC_TEMPLATES
+        template<typename... Args>
+        FormatListN(const Args&... args)
+            : FormatList(&m_formatterStore[0], N),
+            m_formatterStore TINYFORMAT_BRACED_INIT_WORKAROUND({ FormatArg(args)... })
+        { static_assert(sizeof...(args) == N, "Number of args must be N"); }
+#else // C++98 version
+        void init(int) {}
+#       define TINYFORMAT_MAKE_FORMATLIST_CONSTRUCTOR(n)       \
+                                                               \
+        template<TINYFORMAT_ARGTYPES(n)>                       \
+        FormatListN(TINYFORMAT_VARARGS(n))                     \
+            : FormatList(&m_formatterStore[0], n)              \
+        {/*assert*n == N);*/init(0, TINYFORMAT_PASSARGS(n)); } \
+                                                               \
+        template<TINYFORMAT_ARGTYPES(n)>                       \
+        void init(int i, TINYFORMAT_VARARGS(n))                \
+        {                                                      \
+            m_formatterStore[i] = FormatArg(v1);               \
+            init(i+1 TINYFORMAT_PASSARGS_TAIL(n));             \
+        }
+
+        TINYFORMAT_FOREACH_ARGNUM(TINYFORMAT_MAKE_FORMATLIST_CONSTRUCTOR)
+#       undef TINYFORMAT_MAKE_FORMATLIST_CONSTRUCTOR
+#endif
+
+    private:
+#ifdef TINYFORMAT_USE_VARIADIC_TEMPLATES
+        std::array<FormatArg, N> m_formatterStore;
+#else // C++98 version
+        FormatArg m_formatterStore[N];
+#endif
+};
+
+// Special 0-arg version - MSVC says zero-sized C array in struct is nonstandard
+template<> class FormatListN<0> : public FormatList
+{
+    public: FormatListN() : FormatList(0, 0) {}
+};
+
+} // namespace detail
+
+
+//------------------------------------------------------------------------------
+// Primary API functions
+
+#ifdef TINYFORMAT_USE_VARIADIC_TEMPLATES
+
+/// Make type-agnostic format list from list of template arguments.
+///
+/// The exact return type of this function is an implementation detail and
+/// shouldn't be relied upon.  Instead it should be stored as a FormatListRef:
+///
+///   FormatListRef formatList = makeFormatList( /*...*/ );
+template<typename... Args>
+detail::FormatListN<sizeof...(Args)> makeFormatList(const Args&... args)
+{
+    return detail::FormatListN<sizeof...(args)>(args...);
+}
+
+#else // C++98 version
+
+inline detail::FormatListN<0> makeFormatList()
+{
+    return detail::FormatListN<0>();
+}
+#define TINYFORMAT_MAKE_MAKEFORMATLIST(n)                     \
+template<TINYFORMAT_ARGTYPES(n)>                              \
+detail::FormatListN<n> makeFormatList(TINYFORMAT_VARARGS(n))  \
+{                                                             \
+    return detail::FormatListN<n>(TINYFORMAT_PASSARGS(n));    \
+}
+TINYFORMAT_FOREACH_ARGNUM(TINYFORMAT_MAKE_MAKEFORMATLIST)
+#undef TINYFORMAT_MAKE_MAKEFORMATLIST
+
+#endif
+
+/// Format list of arguments to the stream according to the given format string.
+///
+/// The name vformat() is chosen for the semantic similarity to vprintf(): the
+/// list of format arguments is held in a single function argument.
+inline void vformat(std::ostream& out, const char* fmt, FormatListRef list)
+{
+    detail::formatImpl(out, fmt, list.m_formatters, list.m_N);
+}
+
+
+#ifdef TINYFORMAT_USE_VARIADIC_TEMPLATES
+
+/// Format list of arguments to the stream according to given format string.
+template<typename... Args>
+void format(std::ostream& out, const char* fmt, const Args&... args)
+{
+    vformat(out, fmt, makeFormatList(args...));
+}
+
+/// Format list of arguments according to the given format string and return
+/// the result as a string.
+template<typename... Args>
+std::string format(const char* fmt, const Args&... args)
+{
+    std::ostringstream oss;
+    format(oss, fmt, args...);
+    return oss.str();
+}
+
+/// Format list of arguments to std::cout, according to the given format string
+template<typename... Args>
+void printf(const char* fmt, const Args&... args)
+{
+    format(std::cout, fmt, args...);
+}
+
+template<typename... Args>
+void printfln(const char* fmt, const Args&... args)
+{
+    format(std::cout, fmt, args...);
+    std::cout << '\n';
+}
+
+
+#else // C++98 version
+
+inline void format(std::ostream& out, const char* fmt)
+{
+    vformat(out, fmt, makeFormatList());
+}
+
+inline std::string format(const char* fmt)
+{
+    std::ostringstream oss;
+    format(oss, fmt);
+    return oss.str();
+}
+
+inline void printf(const char* fmt)
+{
+    format(std::cout, fmt);
+}
+
+inline void printfln(const char* fmt)
+{
+    format(std::cout, fmt);
+    std::cout << '\n';
+}
+
+#define TINYFORMAT_MAKE_FORMAT_FUNCS(n)                                   \
+                                                                          \
+template<TINYFORMAT_ARGTYPES(n)>                                          \
+void format(std::ostream& out, const char* fmt, TINYFORMAT_VARARGS(n))    \
+{                                                                         \
+    vformat(out, fmt, makeFormatList(TINYFORMAT_PASSARGS(n)));            \
+}                                                                         \
+                                                                          \
+template<TINYFORMAT_ARGTYPES(n)>                                          \
+std::string format(const char* fmt, TINYFORMAT_VARARGS(n))                \
+{                                                                         \
+    std::ostringstream oss;                                               \
+    format(oss, fmt, TINYFORMAT_PASSARGS(n));                             \
+    return oss.str();                                                     \
+}                                                                         \
+                                                                          \
+template<TINYFORMAT_ARGTYPES(n)>                                          \
+void printf(const char* fmt, TINYFORMAT_VARARGS(n))                       \
+{                                                                         \
+    format(std::cout, fmt, TINYFORMAT_PASSARGS(n));                       \
+}                                                                         \
+                                                                          \
+template<TINYFORMAT_ARGTYPES(n)>                                          \
+void printfln(const char* fmt, TINYFORMAT_VARARGS(n))                     \
+{                                                                         \
+    format(std::cout, fmt, TINYFORMAT_PASSARGS(n));                       \
+    std::cout << '\n';                                                    \
+}
+
+TINYFORMAT_FOREACH_ARGNUM(TINYFORMAT_MAKE_FORMAT_FUNCS)
+#undef TINYFORMAT_MAKE_FORMAT_FUNCS
+
+#endif
+
+
+} // namespace tinyformat
+
+#endif // TINYFORMAT_H_INCLUDED
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/r/headers.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/r/headers.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/r/headers.h	(revision 2477)
@@ -0,0 +1,84 @@
+// headers.h: Rcpp R/C++ interface class library -- R headers
+//
+// Copyright (C) 2008 - 2009 Dirk Eddelbuettel
+// Copyright (C) 2009 - 2013 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef RCPP__R__HEADERS__H
+#define RCPP__R__HEADERS__H
+
+// include R headers, but set R_NO_REMAP and access everything via Rf_ prefixes
+#define MAXELTSIZE 8192
+#define R_NO_REMAP
+
+// prevent some macro pollution when including R headers
+// in particular, on Linux, gcc 'leaks' the 'major',
+// 'minor' and 'makedev' macros on Linux; we prevent
+// letting those leak in after including any R headers
+
+#ifdef major
+# define RCPP_HAS_MAJOR_MACRO
+# pragma push_macro("major")
+#endif
+
+#ifdef minor
+# define RCPP_HAS_MINOR_MACRO
+# pragma push_macro("minor")
+#endif
+
+#ifdef makedev
+# define RCPP_HAS_MAKEDEV_MACRO
+# pragma push_macro("makedev")
+#endif
+
+#include <Rcpp/platform/compiler.h>
+#include <Rcpp/config.h>
+#include <Rcpp/macros/macros.h>
+
+#include <R.h>
+#include <Rinternals.h>
+#include <R_ext/Complex.h>
+#include <R_ext/Parse.h>
+#include <R_ext/Rdynload.h>
+#include <Rversion.h>
+
+/* Ensure NORET defined (normally provided by R headers with R >= 3.2.0) */
+#ifndef NORET
+# if defined(__GNUC__) && __GNUC__ >= 3
+#  define NORET __attribute__((noreturn))
+# else
+#  define NORET
+# endif
+#endif
+
+#undef major
+#undef minor
+#undef makedev
+
+#ifdef RCPP_HAS_MAJOR_MACRO
+# pragma pop_macro("major")
+#endif
+
+#ifdef RCPP_HAS_MINOR_MACRO
+# pragma pop_macro("minor")
+#endif
+
+#ifdef RCPP_HAS_MAKEDEV_MACRO
+# pragma pop_macro("makedev")
+#endif
+
+#endif /* RCPP__R__HEADERS__H */
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/MatrixRow.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/MatrixRow.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/MatrixRow.h	(revision 2477)
@@ -0,0 +1,296 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+//
+// MatrixRow.h: Rcpp R/C++ interface class library -- matrices row
+//
+// Copyright (C) 2010 - 2013 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__vector__MatrixRow_h
+#define Rcpp__vector__MatrixRow_h
+
+namespace Rcpp{
+
+template <int RTYPE>
+class MatrixRow : public VectorBase< RTYPE, true, MatrixRow<RTYPE> > {
+public:
+    typedef Matrix<RTYPE> MATRIX ;
+    typedef typename MATRIX::Proxy Proxy ;
+    typedef typename MATRIX::Proxy reference ;
+    typedef typename MATRIX::const_Proxy const_reference ;
+    typedef typename MATRIX::value_type value_type ;
+
+    class iterator {
+    public:
+        typedef typename traits::r_vector_iterator<RTYPE>::type vector_iterator ;
+
+        typedef int difference_type ;
+        typedef typename traits::r_vector_proxy<RTYPE>::type value_type ;
+        typedef typename traits::r_vector_proxy<RTYPE>::type reference ;
+        typedef typename std::iterator_traits<vector_iterator>::pointer pointer ;
+
+        typedef std::random_access_iterator_tag iterator_category ;
+
+        iterator( const iterator& other) : row(other.row), index(other.index){}
+        iterator( MatrixRow& row_, int index_ ) : row(row_), index(index_){}
+
+        iterator& operator++(){
+            index++;
+            return *this ;
+        }
+        iterator operator++(int) {
+            iterator orig(*this);
+            index++ ;
+            return orig ;
+        }
+
+        iterator& operator--(){
+            index-- ;
+            return *this ;
+        }
+        iterator operator--(int){
+            iterator orig(*this);
+            index-- ;
+            return orig ;
+        }
+
+        iterator operator+(difference_type n) const { return iterator( row, index + n ) ; }
+        iterator operator-(difference_type n) const { return iterator( row, index - n ) ; }
+        difference_type operator-(const iterator& other) const { return index - other.index ; }
+
+        iterator& operator+=(difference_type n) { index += n ; return *this ;}
+        iterator& operator-=(difference_type n) { index -= n ; return *this ;}
+
+        reference operator*() {
+            return row[index] ;
+        }
+        pointer operator->(){
+            return &row[index] ;
+        }
+
+        bool operator==( const iterator& other) { return index == other.index ; }
+        bool operator!=( const iterator& other) { return index != other.index ; }
+        bool operator<( const iterator& other ) { return index < other.index ;}
+        bool operator>( const iterator& other ) { return index > other.index ;}
+        bool operator<=( const iterator& other ) { return index <= other.index ; }
+        bool operator>=( const iterator& other ) { return index >= other.index ; }
+
+        inline reference operator[]( int i) const {
+            return row[ index + i ] ;
+        }
+
+        difference_type operator-(const iterator& other) {
+            return index - other.index ;
+        }
+
+    private:
+        MatrixRow& row ;
+        int index ;
+    } ;
+
+    MatrixRow( MATRIX& object, int i ) :
+        parent(object),
+        start(parent.begin() + i),
+        parent_nrow(parent.nrow()),
+        row(i)
+    {
+        if( i < 0 || i >= parent.nrow() ) throw index_out_of_bounds() ;
+    }
+
+    MatrixRow( const MatrixRow& other ) :
+        parent(other.parent),
+        start(other.start),
+        parent_nrow(other.parent_nrow),
+        row(other.row)
+    {} ;
+
+    template <int RT, bool NA, typename T>
+    MatrixRow& operator=( const Rcpp::VectorBase<RT,NA,T>& rhs ){
+        int n = size() ;
+        const T& ref = rhs.get_ref() ;
+        RCPP_LOOP_UNROLL_LHSFUN(start,get_parent_index,ref)
+            return *this ;
+    }
+
+    MatrixRow& operator=( const MatrixRow& rhs ){
+        int n = size() ;
+        RCPP_LOOP_UNROLL_LHSFUN(start,get_parent_index,rhs)
+            return *this ;
+    }
+
+    inline reference operator[]( int i ){
+        return start[ get_parent_index(i) ] ;
+    }
+
+    inline reference operator[]( int i ) const {
+        return parent[ row + i * parent_nrow ] ;
+    }
+
+    inline iterator begin(){
+        return iterator( *this, 0 ) ;
+    }
+
+    inline iterator end(){
+        return iterator( *this, size() ) ;
+    }
+
+    inline iterator begin() const {
+        return iterator( const_cast<MatrixRow&>(*this), 0 ) ;
+    }
+
+    inline iterator end() const {
+        return iterator( const_cast<MatrixRow&>(*this), size() ) ;
+    }
+
+    inline int size() const {
+        return parent.ncol() ;
+    }
+
+private:
+    MATRIX& parent;
+    typename MATRIX::iterator start ;
+    int parent_nrow ;
+    int row ;
+
+    inline int get_parent_index(int i) const {
+        RCPP_DEBUG_4( "MatrixRow<%d>::get_parent_index(int = %d), parent_nrow = %d >> %d\n", RTYPE, i, parent_nrow, i*parent_nrow )
+        return i * parent_nrow ;
+    }
+} ;
+
+template <int RTYPE>
+class ConstMatrixRow : public VectorBase< RTYPE, true, ConstMatrixRow<RTYPE> > {
+public:
+    typedef Matrix<RTYPE> MATRIX ;
+    typedef typename MATRIX::const_Proxy const_reference ;
+    typedef typename MATRIX::value_type value_type ;
+
+    class const_iterator {
+    public:
+        typedef typename traits::r_vector_iterator<RTYPE>::type vector_iterator ;
+
+        typedef int difference_type ;
+        typedef typename traits::r_vector_const_proxy<RTYPE>::type value_type ;
+        typedef typename traits::r_vector_const_proxy<RTYPE>::type reference ;
+        typedef typename std::iterator_traits<vector_iterator>::pointer pointer ;
+
+        typedef std::random_access_iterator_tag iterator_category ;
+
+        const_iterator( const const_iterator& other) : row(other.row), index(other.index){}
+        const_iterator( const ConstMatrixRow& row_, int index_ ) : row(row_), index(index_){}
+
+        const_iterator& operator++(){
+            index++;
+            return *this ;
+        }
+        const_iterator operator++(int) {
+            const_iterator orig(*this);
+            index++ ;
+            return orig ;
+        }
+
+        const_iterator& operator--(){
+            index-- ;
+            return *this ;
+        }
+        const_iterator operator--(int){
+            const_iterator orig(*this);
+            index-- ;
+            return orig ;
+        }
+
+        const_iterator operator+(difference_type n) const { return iterator( row, index + n ) ; }
+        const_iterator operator-(difference_type n) const { return iterator( row, index - n ) ; }
+        difference_type operator-(const const_iterator& other) const { return index - other.index ; }
+
+        const_iterator& operator+=(difference_type n) { index += n ; return *this ;}
+        const_iterator& operator-=(difference_type n) { index -= n ; return *this ;}
+
+        const reference operator*() {
+            return row[index] ;
+        }
+        const pointer operator->(){
+            return &row[index] ;
+        }
+
+        bool operator==( const const_iterator& other) { return index == other.index ; }
+        bool operator!=( const const_iterator& other) { return index != other.index ; }
+        bool operator<( const const_iterator& other ) { return index < other.index ;}
+        bool operator>( const const_iterator& other ) { return index > other.index ;}
+        bool operator<=( const const_iterator& other ) { return index <= other.index ; }
+        bool operator>=( const const_iterator& other ) { return index >= other.index ; }
+
+        inline const reference operator[]( int i) const {
+            return row[ index + i ] ;
+        }
+
+        difference_type operator-(const const_iterator& other) {
+            return index - other.index ;
+        }
+
+    private:
+        const ConstMatrixRow& row ;
+        int index ;
+    } ;
+    
+    typedef const_iterator iterator;
+
+    ConstMatrixRow( const MATRIX& object, int i ) :
+        parent(object),
+        start(parent.begin() + i),
+        parent_nrow(parent.nrow()),
+        row(i)
+    {
+        if( i < 0 || i >= parent.nrow() ) throw index_out_of_bounds() ;
+    }
+
+    ConstMatrixRow( const ConstMatrixRow& other ) :
+        parent(other.parent),
+        start(other.start),
+        parent_nrow(other.parent_nrow),
+        row(other.row)
+    {} ;
+
+    inline const_reference operator[]( int i ) const {
+        return parent[ row + i * parent_nrow ] ;
+    }
+
+    inline const_iterator begin() const {
+        return const_iterator( *this, 0 ) ;
+    }
+
+    inline const_iterator end() const {
+        return const_iterator( *this, size() ) ;
+    }
+
+    inline int size() const {
+        return parent.ncol() ;
+    }
+
+private:
+    const MATRIX& parent;
+    typename MATRIX::const_iterator start ;
+    int parent_nrow ;
+    int row ;
+
+    inline int get_parent_index(int i) const {
+        RCPP_DEBUG_4( "ConstMatrixRow<%d>::get_parent_index(int = %d), parent_nrow = %d >> %d\n", RTYPE, i, parent_nrow, i*parent_nrow )
+        return i * parent_nrow ;
+    }
+} ;
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/VectorBase.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/VectorBase.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/VectorBase.h	(revision 2477)
@@ -0,0 +1,146 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// VectorBase.h: Rcpp R/C++ interface class library --
+//
+// Copyright (C) 2010 - 2013 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__vector__VectorBase_h
+#define Rcpp__vector__VectorBase_h
+
+namespace Rcpp{
+
+/** a base class for vectors, modelled after the CRTP */
+template <int RTYPE, bool na, typename VECTOR>
+class VectorBase : public traits::expands_to_logical__impl<RTYPE> {
+public:
+	struct rcpp_sugar_expression{} ;
+    struct r_type : traits::integral_constant<int,RTYPE>{} ;
+	struct can_have_na : traits::integral_constant<bool,na>{} ;
+	typedef typename traits::storage_type<RTYPE>::type stored_type ;
+	typedef typename traits::storage_type<RTYPE>::type elem_type ;
+
+	VECTOR& get_ref(){
+		return static_cast<VECTOR&>(*this) ;
+	}
+
+	const VECTOR& get_ref() const {
+		return static_cast<const VECTOR&>(*this) ;
+	}
+
+	inline stored_type operator[]( R_xlen_t i) const {
+	    return static_cast<const VECTOR*>(this)->operator[](i) ;
+	}
+
+	inline R_xlen_t size() const { return static_cast<const VECTOR*>(this)->size() ; }
+
+	class iterator {
+	public:
+		typedef stored_type reference ;
+		typedef stored_type* pointer ;
+		typedef R_xlen_t difference_type ;
+		typedef stored_type value_type;
+		typedef std::random_access_iterator_tag iterator_category ;
+
+		iterator( const VectorBase& object_, R_xlen_t index_ ) : object(object_.get_ref()), index(index_){}
+		iterator( const iterator& other) : object(other.object), index(other.index){};
+
+		inline iterator& operator++(){
+			index++ ;
+			return *this ;
+		}
+		inline iterator operator++(int){
+			iterator orig(*this);
+		    ++(*this) ;
+			return orig ;
+		}
+
+		inline iterator& operator--(){
+			index-- ;
+			return *this ;
+		}
+		inline iterator operator--(int){
+			iterator orig(*this);
+		    --(*this) ;
+			return orig ;
+		}
+
+		inline iterator operator+(difference_type n) const {
+			return iterator( object, index+n ) ;
+		}
+		inline iterator operator-(difference_type n) const {
+			return iterator( object, index-n ) ;
+		}
+
+		inline iterator& operator+=(difference_type n) {
+			index += n ;
+			return *this ;
+		}
+		inline iterator& operator-=(difference_type n) {
+			index -= n;
+			return *this ;
+		}
+
+		inline reference operator[](R_xlen_t i){
+		    return object[index+i] ;
+		}
+
+		inline reference operator*() {
+			return object[index] ;
+		}
+		inline pointer operator->(){
+			return &object[index] ;
+		}
+
+		inline bool operator==( const iterator& y) const {
+			return ( index == y.index ) ;
+		}
+		inline bool operator!=( const iterator& y) const {
+			return ( index != y.index ) ;
+		}
+		inline bool operator<( const iterator& other ) const {
+			return index < other.index ;
+		}
+		inline bool operator>( const iterator& other ) const {
+			return index > other.index ;
+		}
+		inline bool operator<=( const iterator& other ) const {
+			return index <= other.index ;
+		}
+		inline bool operator>=( const iterator& other ) const {
+			return index >= other.index ;
+		}
+
+		inline difference_type operator-(const iterator& other) const {
+			return index - other.index ;
+		}
+
+
+	private:
+		const VECTOR& object ;
+		R_xlen_t index;
+	} ;
+
+        typedef iterator const_iterator;
+
+	inline iterator begin() const { return iterator(*this, 0) ; }
+	inline iterator end() const { return iterator(*this, size() ) ; }
+
+} ;
+
+} // namespace Rcpp
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/no_init.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/no_init.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/no_init.h	(revision 2477)
@@ -0,0 +1,79 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+//
+// Vector.h: Rcpp R/C++ interface class library -- vectors
+//
+// Copyright (C) 2010 - 2013 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__vector__no_init_h
+#define Rcpp__vector__no_init_h
+
+namespace Rcpp{
+
+template <int RTYPE, template <class> class StoragePolicy>
+class Matrix;
+
+class no_init_vector {
+public:
+    no_init_vector(R_xlen_t size_): size(size_){}
+
+    inline R_xlen_t get() const {
+        return size;
+    }
+
+    template <int RTYPE, template <class> class StoragePolicy >
+    operator Vector<RTYPE, StoragePolicy>() const {
+        return Rf_allocVector(RTYPE, size) ;
+    }
+
+private:
+    R_xlen_t size ;
+} ;
+
+class no_init_matrix {
+public:
+    no_init_matrix(int nr_, int nc_): nr(nr_), nc(nc_) {}
+
+    inline int nrow() const {
+        return nr;
+    }
+
+    inline int ncol() const {
+        return nc;
+    }
+
+    template <int RTYPE, template <class> class StoragePolicy >
+    operator Matrix<RTYPE, StoragePolicy>() const {
+        return Rf_allocMatrix(RTYPE, nr, nc);
+    }
+
+private:
+    int nr;
+    int nc;
+} ;
+
+inline no_init_vector no_init(int size) {
+    return no_init_vector(size);
+}
+
+inline no_init_matrix no_init(int nr, int nc) {
+    return no_init_matrix(nr, nc);
+}
+
+
+}
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/MatrixBase.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/MatrixBase.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/MatrixBase.h	(revision 2477)
@@ -0,0 +1,197 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+//
+// MatrixBase.h: Rcpp R/C++ interface class library --
+//
+// Copyright (C) 2010 - 2016 Dirk Eddelbuettel and Romain Francois
+// Copyright (C) 2016        Dirk Eddelbuettel and Romain Francois and Nathan Russell
+//               
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__vector__MatrixBase_h
+#define Rcpp__vector__MatrixBase_h
+
+#include <Rcpp/sugar/matrix/tools.h>
+
+namespace Rcpp{
+
+    /** a base class for vectors, modelled after the CRTP */
+    template <int RTYPE, bool na, typename MATRIX>
+    class MatrixBase : public traits::expands_to_logical__impl<RTYPE> {
+    public:
+        struct r_type : traits::integral_constant<int,RTYPE>{} ;
+        struct r_matrix_interface {} ;
+        struct can_have_na : traits::integral_constant<bool,na>{} ;
+        typedef typename traits::storage_type<RTYPE>::type stored_type ;
+
+        MATRIX& get_ref(){
+            return static_cast<MATRIX&>(*this) ;
+        }
+
+        inline stored_type operator()( int i, int j) const {
+            return static_cast<const MATRIX*>(this)->operator()(i, j) ;
+        }
+
+        inline R_xlen_t size() const { return static_cast<const MATRIX&>(*this).size() ; }
+        inline R_xlen_t nrow() const { return static_cast<const MATRIX&>(*this).nrow() ; }
+        inline R_xlen_t ncol() const { return static_cast<const MATRIX&>(*this).ncol() ; }
+
+        static MATRIX eye(int n) {
+            const bool enabled = 
+                traits::is_arithmetic<stored_type>::value || 
+                traits::same_type<stored_type, Rcomplex>::value;
+            (void)sizeof(traits::allowed_matrix_type<enabled>);
+            
+            return MATRIX::diag(n, traits::one_type<stored_type>());
+        }
+        
+        static MATRIX ones(int n) {
+            const bool enabled = 
+                traits::is_arithmetic<stored_type>::value || 
+                traits::same_type<stored_type, Rcomplex>::value;
+            (void)sizeof(traits::allowed_matrix_type<enabled>);
+            
+            MATRIX res(n, n);
+            std::fill(
+                res.begin(), res.end(), 
+                traits::one_type<stored_type>()
+            );
+            return res;
+        }
+        
+        static MATRIX zeros(int n) {
+            const bool enabled = 
+                traits::is_arithmetic<stored_type>::value || 
+                traits::same_type<stored_type, Rcomplex>::value;
+            (void)sizeof(traits::allowed_matrix_type<enabled>);
+            
+            return MATRIX(n, n);
+        }
+
+        class iterator {
+        public:
+            typedef stored_type reference ;
+            typedef stored_type* pointer ;
+            typedef R_xlen_t difference_type ;
+            typedef stored_type value_type;
+            typedef std::random_access_iterator_tag iterator_category ;
+
+            iterator( const MatrixBase& object_, R_xlen_t index_ ) :
+                object(object_), i(0), j(0), nr(object_.nrow()), nc(object_.ncol()) {
+
+                update_index( index_) ;
+            }
+
+            iterator( const iterator& other) :
+                object(other.object), i(other.i), j(other.j), nr(other.nr), nc(other.nc){}
+
+            inline iterator& operator++(){
+                i++ ;
+                if( i == nr ){
+                    j++ ;
+                    i=0 ;
+                }
+                return *this ;
+            }
+            inline iterator operator++(int){
+                iterator orig(*this) ;
+                ++(*this) ;
+                return orig ;
+            }
+
+            inline iterator& operator--(){
+                i-- ;
+                if( i == -1 ){
+                    j-- ;
+                    i = nr - 1 ;
+                }
+                return *this ;
+            }
+            inline iterator operator--(int){
+                iterator orig(*this) ;
+                --(*this) ;
+                return orig ;
+            }
+
+            inline iterator operator+(difference_type n) const {
+                return iterator( object, i + (j*nr) + n ) ;
+            }
+            inline iterator operator-(difference_type n) const {
+                return iterator( object, i + (j*nr) - n ) ;
+            }
+
+            inline iterator& operator+=(difference_type n) {
+                update_index( i + j*nr + n );
+                return *this ;
+            }
+            inline iterator& operator-=(difference_type n) {
+                update_index( i + j*nr - n );
+                return *this ;
+            }
+
+            inline reference operator*() {
+                return object(i,j) ;
+            }
+            inline pointer operator->(){
+                return &object(i,j) ;
+            }
+
+            inline bool operator==( const iterator& y) const {
+                return ( i == y.i && j == y.j ) ;
+            }
+            inline bool operator!=( const iterator& y) const {
+                return ( i != y.i || j != y.j ) ;
+            }
+            inline bool operator<( const iterator& other ) const {
+                return index() < other.index() ;
+            }
+            inline bool operator>( const iterator& other ) const {
+                return index() > other.index() ;
+            }
+            inline bool operator<=( const iterator& other ) const {
+                return index() <= other.index() ;
+            }
+            inline bool operator>=( const iterator& other ) const {
+                return index() >= other.index() ;
+            }
+
+            inline difference_type operator-(const iterator& other) const {
+                return index() - other.index() ;
+            }
+
+
+        private:
+            const MatrixBase& object ;
+            int i, j ;
+            int nr, nc ;
+
+            inline void update_index( int index_ ){
+                i = internal::get_line( index_, nr );
+                j = internal::get_column( index_, nr, i ) ;
+            }
+
+            inline R_xlen_t index() const {
+                return i + nr * j ;
+            }
+
+        } ;
+
+        inline iterator begin() const { return iterator(*this, 0) ; }
+        inline iterator end() const { return iterator(*this, size() ) ; }
+
+    } ;
+
+} // namespace Rcpp
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/ListOf.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/ListOf.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/ListOf.h	(revision 2477)
@@ -0,0 +1,140 @@
+// ListOf.h: Rcpp R/C++ interface class library -- templated List container
+//
+// Copyright (C) 2014 Dirk Eddelbuettel, Romain Francois and Kevin Ushey
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp_vector_ListOf_h_
+#define Rcpp_vector_ListOf_h_
+
+namespace Rcpp {
+
+template <typename T>
+class ListOf
+    : public NamesProxyPolicy<T>
+    , public AttributeProxyPolicy<T>
+    , public RObjectMethods<T>
+{
+
+public:
+    typedef typename traits::r_vector_iterator<VECSXP>::type iterator;
+    typedef typename traits::r_vector_const_iterator<VECSXP>::type const_iterator;
+
+    ListOf(): list(R_NilValue) {}
+
+    ListOf(SEXP data_): list(data_) {
+        std::transform(list.begin(), list.end(), list.begin(), as<T>);
+    }
+
+    template <typename U>
+    ListOf(const U& data_): list(data_) {
+        std::transform(list.begin(), list.end(), list.begin(), as<T>);
+    }
+
+    ListOf(const ListOf& other): list(other.list) {}
+
+    ListOf& operator=(const ListOf& other) {
+        if (this != &other) {
+            list = other.list;
+        }
+        return *this;
+    }
+
+    template <typename U>
+    ListOf& operator=(const U& other) {
+        list = as<List>(other);
+        return *this;
+    }
+
+    // subsetting operators
+
+    ChildVector<T> operator[](R_xlen_t i) {
+        return ChildVector<T>(list[i], list, i);
+    }
+
+    const ChildVector<T> operator[](R_xlen_t i) const {
+        return ChildVector<T>(list[i], list, i);
+    }
+
+    ChildVector<T> operator[](const std::string& str) {
+        return ChildVector<T>(list[str], list, list.findName(str));
+    }
+
+    const ChildVector<T> operator[](const std::string& str) const {
+        return ChildVector<T>(list[str], list, list.findName(str));
+    }
+
+    // iteration operators pass down to list
+
+    inline iterator begin() {
+        return list.begin();
+    }
+
+    inline iterator end() {
+        return list.end();
+    }
+
+    inline const_iterator begin() const {
+        return list.begin();
+    }
+
+    inline const_iterator end() const {
+        return list.end();
+    }
+
+    inline R_xlen_t size() const {
+        return list.size() ;
+    }
+
+    inline List get() const {
+        return list;
+    }
+
+    // conversion operators
+    operator SEXP() const { return wrap(list); }
+    operator List() const { return list; }
+
+private:
+
+    List list;
+
+}; // ListOf<T>
+
+// sapply, lapply wrappers
+
+namespace sugar {
+
+template <int RTYPE, bool NA, typename T, typename Function>
+class Lapply;
+
+template <int RTYPE, bool NA, typename T, typename Function, bool NO_CONVERSION>
+class Sapply;
+
+}
+
+template <typename T, typename Function>
+List lapply(const ListOf<T>& t, Function fun) {
+    return lapply(t.get(), fun);
+}
+
+template <typename T, typename Function>
+T sapply(const ListOf<T>& t, Function fun) {
+    return sapply(t.get(), fun);
+}
+
+} // Rcpp
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/Vector.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/Vector.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/Vector.h	(revision 2477)
@@ -0,0 +1,1132 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+//
+// Vector.h: Rcpp R/C++ interface class library -- vectors
+//
+// Copyright (C) 2010 - 2013 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__vector__Vector_h
+#define Rcpp__vector__Vector_h
+
+#include <Rcpp/vector/Subsetter.h>
+
+namespace Rcpp{
+
+template <int RTYPE, template <class> class StoragePolicy = PreserveStorage >
+class Vector :
+    public StoragePolicy< Vector<RTYPE,StoragePolicy> >,
+    public SlotProxyPolicy< Vector<RTYPE,StoragePolicy> >,
+    public AttributeProxyPolicy< Vector<RTYPE,StoragePolicy> >,
+    public NamesProxyPolicy< Vector<RTYPE, StoragePolicy> >,
+    public RObjectMethods< Vector<RTYPE, StoragePolicy> >,
+    public VectorBase< RTYPE, true, Vector<RTYPE,StoragePolicy> >
+{
+public:
+
+    typedef StoragePolicy<Vector> Storage ;
+
+    typename traits::r_vector_cache_type<RTYPE, StoragePolicy>::type cache ;
+    typedef typename traits::r_vector_proxy<RTYPE>::type Proxy ;
+    typedef typename traits::r_vector_const_proxy<RTYPE>::type const_Proxy ;
+    typedef typename traits::r_vector_name_proxy<RTYPE>::type NameProxy ;
+    typedef typename traits::r_vector_proxy<RTYPE>::type value_type ;
+    typedef typename traits::r_vector_iterator<RTYPE>::type iterator ;
+    typedef typename traits::r_vector_const_iterator<RTYPE>::type const_iterator ;
+    typedef typename traits::init_type<RTYPE>::type init_type ;
+    typedef typename traits::r_vector_element_converter<RTYPE>::type converter_type ;
+    typedef typename traits::storage_type<RTYPE>::type stored_type ;
+
+    /**
+     * Default constructor. Creates a vector of the appropriate type
+     * and 0 length
+     */
+    Vector() {
+      Storage::set__( Rf_allocVector(RTYPE, 0 ) );
+      init() ;
+    }
+
+    /**
+     * copy constructor. shallow copy of the SEXP
+     */
+    Vector( const Vector& other){
+        Storage::copy__(other) ;
+    }
+
+    Vector& operator=(const Vector& rhs) {
+        return Storage::copy__(rhs) ;
+    }
+
+    Vector( SEXP x ) {
+        Storage::set__( r_cast<RTYPE>(x) ) ;
+    }
+
+    template <typename Proxy>
+    Vector( const GenericProxy<Proxy>& proxy ){
+        Storage::set__( r_cast<RTYPE>(proxy.get()) ) ;
+    }
+
+    explicit Vector( const no_init_vector& obj) {
+        Storage::set__( Rf_allocVector( RTYPE, obj.get() ) ) ;
+    }
+
+    template<typename T>
+    Vector( const T& size, const stored_type& u,
+        typename Rcpp::traits::enable_if<traits::is_arithmetic<T>::value, void>::type* = 0) {
+        RCPP_DEBUG_2( "Vector<%d>( const T& size = %d, const stored_type& u )", RTYPE, size)
+        Storage::set__( Rf_allocVector( RTYPE, size) ) ;
+        fill( u ) ;
+    }
+
+    Vector( const int& size, const stored_type& u) {
+        RCPP_DEBUG_2( "Vector<%d>( const int& size = %d, const stored_type& u )", RTYPE, size)
+        Storage::set__( Rf_allocVector( RTYPE, size) ) ;
+        fill( u ) ;
+    }
+
+    // constructor for CharacterVector()
+    Vector( const std::string& st ){
+        RCPP_DEBUG_2( "Vector<%d>( const std::string& = %s )", RTYPE, st.c_str() )
+        Storage::set__( internal::vector_from_string<RTYPE>(st) ) ;
+    }
+
+    // constructor for CharacterVector()
+    Vector( const char* st ) {
+        RCPP_DEBUG_2( "Vector<%d>( const char* = %s )", RTYPE, st )
+        Storage::set__(internal::vector_from_string<RTYPE>(st) ) ;
+    }
+
+    template<typename T>
+    Vector( const T& siz, stored_type (*gen)(void),
+        typename Rcpp::traits::enable_if<traits::is_arithmetic<T>::value, void>::type* = 0) {
+        RCPP_DEBUG_2( "Vector<%d>( const int& siz = %s, stored_type (*gen)(void) )", RTYPE, siz )
+        Storage::set__( Rf_allocVector( RTYPE, siz) ) ;
+        std::generate( begin(), end(), gen );
+    }
+    
+    // Add template class T and then restict T to arithmetic.
+    template <typename T>
+    Vector(T size, 
+        typename Rcpp::traits::enable_if<traits::is_arithmetic<T>::value, void>::type* = 0) {
+        Storage::set__( Rf_allocVector( RTYPE, size) ) ;
+        init() ;
+    }
+    
+    Vector( const int& size ) {
+        Storage::set__( Rf_allocVector( RTYPE, size) ) ;
+        init() ;
+    }
+
+    Vector( const Dimension& dims) {
+        Storage::set__( Rf_allocVector( RTYPE, dims.prod() ) ) ;
+        init() ;
+        if( dims.size() > 1 ){
+            AttributeProxyPolicy<Vector>::attr( "dim" ) = dims;
+        }
+    }
+
+    // Enable construction from bool for LogicalVectors
+    // SFINAE only work for template. Add template class T and then restict T to
+    // bool.
+    template <typename T>
+    Vector(T value,
+           typename Rcpp::traits::enable_if<traits::is_bool<T>::value && RTYPE == LGLSXP, void>::type* = 0) {
+        Storage::set__(Rf_allocVector(RTYPE, 1));
+        fill(value);
+    }
+
+    template <typename U>
+    Vector( const Dimension& dims, const U& u) {
+        RCPP_DEBUG_2( "Vector<%d>( const Dimension& (%d), const U& )", RTYPE, dims.size() )
+        Storage::set__( Rf_allocVector( RTYPE, dims.prod() ) ) ;
+        fill(u) ;
+        if( dims.size() > 1 ){
+            AttributeProxyPolicy<Vector>::attr( "dim" ) = dims;
+        }
+    }
+
+    template <bool NA, typename VEC>
+    Vector( const VectorBase<RTYPE,NA,VEC>& other ) {
+        RCPP_DEBUG_2( "Vector<%d>( const VectorBase<RTYPE,NA,VEC>& ) [VEC = %s]", RTYPE, DEMANGLE(VEC) )
+        import_sugar_expression( other, typename traits::same_type<Vector,VEC>::type() ) ;
+    }
+    
+    template <typename T, typename U>
+    Vector( const T& size, const U& u,
+        typename Rcpp::traits::enable_if<traits::is_arithmetic<T>::value, void>::type* = 0) {
+        RCPP_DEBUG_2( "Vector<%d>( const T& size, const U& u )", RTYPE, size )
+        Storage::set__( Rf_allocVector( RTYPE, size) ) ;
+        fill_or_generate( u ) ;
+    }
+    
+    template <bool NA, typename T>
+    Vector( const sugar::SingleLogicalResult<NA,T>& obj ) {
+        Storage::set__( r_cast<RTYPE>( const_cast<sugar::SingleLogicalResult<NA,T>&>(obj).get_sexp() ) ) ;
+        RCPP_DEBUG_2( "Vector<%d>( const sugar::SingleLogicalResult<NA,T>& ) [T = %s]", RTYPE, DEMANGLE(T) )
+    }
+
+    template <typename T, typename U1>
+    Vector( const T& siz, stored_type (*gen)(U1), const U1& u1,
+        typename Rcpp::traits::enable_if<traits::is_arithmetic<T>::value, void>::type* = 0) {
+        Storage::set__( Rf_allocVector( RTYPE, siz) ) ;
+        RCPP_DEBUG_2( "const T& siz, stored_type (*gen)(U1), const U1& u1 )", RTYPE, siz )
+        iterator first = begin(), last = end() ;
+        while( first != last ) *first++ = gen(u1) ;
+    }
+
+    template <typename T, typename U1, typename U2>
+    Vector( const T& siz, stored_type (*gen)(U1,U2), const U1& u1, const U2& u2,
+        typename Rcpp::traits::enable_if<traits::is_arithmetic<T>::value, void>::type* = 0) {
+        Storage::set__( Rf_allocVector( RTYPE, siz) ) ;
+        RCPP_DEBUG_2( "const T& siz, stored_type (*gen)(U1,U2), const U1& u1, const U2& u2)", RTYPE, siz )
+        iterator first = begin(), last = end() ;
+        while( first != last ) *first++ = gen(u1,u2) ;
+    }
+
+    template <typename T, typename U1, typename U2, typename U3>
+    Vector( const T& siz, stored_type (*gen)(U1,U2,U3), const U1& u1, const U2& u2, const U3& u3,
+        typename Rcpp::traits::enable_if<traits::is_arithmetic<T>::value, void>::type* = 0) {
+        Storage::set__( Rf_allocVector( RTYPE, siz) ) ;
+        RCPP_DEBUG_2( "const T& siz, stored_type (*gen)(U1,U2,U3), const U1& u1, const U2& u2, const U3& u3)", RTYPE, siz )
+        iterator first = begin(), last = end() ;
+        while( first != last ) *first++ = gen(u1,u2,u3) ;
+    }
+
+    template <typename InputIterator>
+    Vector( InputIterator first, InputIterator last){
+        RCPP_DEBUG_1( "Vector<%d>( InputIterator first, InputIterator last", RTYPE )
+        Storage::set__( Rf_allocVector(RTYPE, std::distance(first, last) ) ) ;
+        std::copy( first, last, begin() ) ;
+    }
+
+    template <typename InputIterator, typename T>
+    Vector( InputIterator first, InputIterator last, T n,
+        typename Rcpp::traits::enable_if<traits::is_arithmetic<T>::value, void>::type* = 0) {
+        Storage::set__(Rf_allocVector(RTYPE, n)) ;
+        RCPP_DEBUG_2( "Vector<%d>( InputIterator first, InputIterator last, T n = %d)", RTYPE, n )
+        std::copy( first, last, begin() ) ;
+    }
+
+    template <typename InputIterator, typename Func>
+    Vector( InputIterator first, InputIterator last, Func func) {
+        Storage::set__( Rf_allocVector( RTYPE, std::distance(first,last) ) );
+        RCPP_DEBUG_1( "Vector<%d>( InputIterator, InputIterator, Func )", RTYPE )
+        std::transform( first, last, begin(), func) ;
+    }
+
+    template <typename InputIterator, typename Func, typename T>
+    Vector( InputIterator first, InputIterator last, Func func, T n,
+        typename Rcpp::traits::enable_if<traits::is_arithmetic<T>::value, void>::type* = 0){
+        Storage::set__( Rf_allocVector( RTYPE, n ) );
+        RCPP_DEBUG_2( "Vector<%d>( InputIterator, InputIterator, Func, T n = %d )", RTYPE, n )
+        std::transform( first, last, begin(), func) ;
+    }
+
+#ifdef HAS_CXX0X_INITIALIZER_LIST
+    Vector( std::initializer_list<init_type> list ) {
+        assign( list.begin() , list.end() ) ;
+    }
+#endif
+
+    template <typename T>
+    Vector& operator=( const T& x) {
+        assign_object( x, typename traits::is_sugar_expression<T>::type() ) ;
+        return *this ;
+    }
+
+    static inline stored_type get_na() {
+        return traits::get_na<RTYPE>();
+    }
+    static inline bool is_na( stored_type x){
+        return traits::is_na<RTYPE>(x);
+    }
+
+    #ifdef RCPP_COMMA_INITIALIZATION
+    internal::ListInitialization<iterator,init_type> operator=( init_type x){
+        iterator start = begin() ; *start = x;
+        return internal::ListInitialization<iterator,init_type>( start + 1 ) ; ;
+    }
+    #endif
+
+    /**
+     * the length of the vector, uses Rf_xlength
+     */
+    inline R_xlen_t length() const {
+        return ::Rf_xlength( Storage::get__() ) ;
+    }
+
+    /**
+     * alias of length
+     */
+    inline R_xlen_t size() const {
+        return ::Rf_xlength( Storage::get__() ) ;
+    }
+
+    /**
+     * offset based on the dimensions of this vector
+     */
+    R_xlen_t offset(const int& i, const int& j) const {
+        if( !::Rf_isMatrix(Storage::get__()) ) throw not_a_matrix() ;
+
+        /* we need to extract the dimensions */
+        const int* dim = dims() ;
+        const int nrow = dim[0] ;
+        const int ncol = dim[1] ;
+        if(i < 0|| i >= nrow || j < 0 || j >= ncol ) throw index_out_of_bounds() ;
+        return i + static_cast<R_xlen_t>(nrow)*j ;
+    }
+
+    /**
+     * one dimensional offset doing bounds checking to ensure
+     * it is valid
+     */
+    R_xlen_t offset(const R_xlen_t& i) const {
+        if(i < 0 || i >= ::Rf_xlength(Storage::get__()) ) throw index_out_of_bounds() ;
+        return i ;
+    }
+    
+    R_xlen_t offset(const std::string& name) const {
+        SEXP names = RCPP_GET_NAMES( Storage::get__() ) ;
+        if( Rf_isNull(names) ) throw index_out_of_bounds();
+        R_xlen_t n=size() ;
+        for( R_xlen_t i=0; i<n; ++i){
+            if( ! name.compare( CHAR(STRING_ELT(names, i)) ) ){
+                return i ;
+            }
+        }
+        throw index_out_of_bounds() ;
+        return -1 ; /* -Wall */
+    }
+
+    template <typename U>
+    void fill( const U& u){
+        fill__dispatch( typename traits::is_trivial<RTYPE>::type(), u ) ;
+    }
+
+    inline iterator begin() { return cache.get() ; }
+    inline iterator end() { return cache.get() + size() ; }
+    inline const_iterator begin() const{ return cache.get_const() ; }
+    inline const_iterator end() const{ return cache.get_const() + size() ; }
+
+    inline Proxy operator[]( R_xlen_t i ){ return cache.ref(i) ; }
+    inline const_Proxy operator[]( R_xlen_t i ) const { return cache.ref(i) ; }
+
+    inline Proxy operator()( const size_t& i) {
+        return cache.ref( offset(i) ) ;
+    }
+    inline const_Proxy operator()( const size_t& i) const {
+        return cache.ref( offset(i) ) ;
+    }
+
+    inline Proxy at( const size_t& i) {
+       return cache.ref( offset(i) ) ;
+    }
+    inline const_Proxy at( const size_t& i) const {
+       return cache.ref( offset(i) ) ;
+    }
+
+    inline Proxy operator()( const size_t& i, const size_t& j) {
+        return cache.ref( offset(i,j) ) ;
+    }
+    inline const_Proxy operator()( const size_t& i, const size_t& j) const {
+        return cache.ref( offset(i,j) ) ;
+    }
+
+    inline NameProxy operator[]( const std::string& name ){
+        return NameProxy( *this, name ) ;
+    }
+    inline NameProxy operator()( const std::string& name ){
+        return NameProxy( *this, name ) ;
+    }
+
+    inline NameProxy operator[]( const std::string& name ) const {
+        return NameProxy( const_cast<Vector&>(*this), name ) ;
+    }
+    inline NameProxy operator()( const std::string& name ) const {
+        return NameProxy( const_cast<Vector&>(*this), name ) ;
+    }
+
+    inline operator RObject() const {
+        return RObject( Storage::get__() );
+    }
+
+    // sugar subsetting requires dispatch on VectorBase
+    template <int RHS_RTYPE, bool RHS_NA, typename RHS_T>
+    SubsetProxy<RTYPE, StoragePolicy, RHS_RTYPE, RHS_NA, RHS_T>
+    operator[](const VectorBase<RHS_RTYPE, RHS_NA, RHS_T>& rhs) {
+        return SubsetProxy<RTYPE, StoragePolicy, RHS_RTYPE, RHS_NA, RHS_T>(
+            *this,
+            rhs
+        );
+    }
+
+    template <int RHS_RTYPE, bool RHS_NA, typename RHS_T>
+    const SubsetProxy<RTYPE, StoragePolicy, RHS_RTYPE, RHS_NA, RHS_T>
+    operator[](const VectorBase<RHS_RTYPE, RHS_NA, RHS_T>& rhs) const {
+        return SubsetProxy<RTYPE, StoragePolicy, RHS_RTYPE, RHS_NA, RHS_T>(
+            const_cast< Vector<RTYPE, StoragePolicy>& >(*this),
+            rhs
+        );
+    }
+
+    Vector& sort(bool decreasing = false) {
+        // sort() does not apply to List, RawVector or ExpressionVector.
+        //
+        // The function below does nothing for qualified Vector types,
+        // and is undefined for other types. Hence there will be a
+        // compiler error when sorting List, RawVector or ExpressionVector.
+        internal::Sort_is_not_allowed_for_this_type<RTYPE>::do_nothing();
+        
+        typename traits::storage_type<RTYPE>::type* start = internal::r_vector_start<RTYPE>( Storage::get__() );
+        
+        if (!decreasing) {
+            std::sort(
+                start,
+                start + size(),
+                internal::NAComparator<typename traits::storage_type<RTYPE>::type>()
+            );            
+        } else {
+            std::sort(
+                start,
+                start + size(),
+                internal::NAComparatorGreater<typename traits::storage_type<RTYPE>::type>()
+            );     
+        }
+
+        return *this;
+    }
+
+    template <typename InputIterator>
+    void assign( InputIterator first, InputIterator last){
+        /* FIXME: we can do better than this r_cast to avoid
+           allocating an unnecessary temporary object
+        */
+        Shield<SEXP> wrapped(wrap(first, last));
+        Shield<SEXP> casted(r_cast<RTYPE>(wrapped));
+        Storage::set__(casted) ;
+    }
+
+    template <typename InputIterator>
+    static Vector import( InputIterator first, InputIterator last){
+        Vector v ;
+        v.assign( first , last ) ;
+        return v ;
+    }
+
+    template <typename InputIterator, typename F>
+    static Vector import_transform( InputIterator first, InputIterator last, F f){
+        return Vector( first, last, f) ;
+    }
+
+    template <typename T>
+    void push_back( const T& object){
+        push_back__impl( converter_type::get(object),
+                         typename traits::same_type<stored_type,SEXP>()
+                         ) ;
+    }
+
+    template <typename T>
+    void push_back( const T& object, const std::string& name ){
+        push_back_name__impl( converter_type::get(object), name,
+                              typename traits::same_type<stored_type,SEXP>()
+                              ) ;
+    }
+
+    template <typename T>
+    void push_front( const T& object){
+        push_front__impl( converter_type::get(object),
+                          typename traits::same_type<stored_type,SEXP>() ) ;
+    }
+
+    template <typename T>
+    void push_front( const T& object, const std::string& name){
+        push_front_name__impl( converter_type::get(object), name,
+                               typename traits::same_type<stored_type,SEXP>() ) ;
+    }
+
+
+    template <typename T>
+    iterator insert( iterator position, const T& object){
+        return insert__impl( position, converter_type::get(object),
+                             typename traits::same_type<stored_type,SEXP>()
+                             ) ;
+    }
+
+    template <typename T>
+    iterator insert( int position, const T& object){
+        return insert__impl( cache.get() + position, converter_type::get(object),
+                             typename traits::same_type<stored_type,SEXP>()
+                             );
+    }
+
+    iterator erase( int position){
+        return erase_single__impl( cache.get() + position) ;
+    }
+
+    iterator erase( iterator position){
+        return erase_single__impl( position ) ;
+    }
+
+    iterator erase( int first, int last){
+        iterator start = cache.get() ;
+        return erase_range__impl( start + first, start + last ) ;
+    }
+
+    iterator erase( iterator first, iterator last){
+        return erase_range__impl( first, last ) ;
+    }
+
+    void update(SEXP){
+        cache.update(*this) ;
+    }
+
+    template <typename U>
+    static void replace_element( iterator it, SEXP names, R_xlen_t index, const U& u){
+        replace_element__dispatch( typename traits::is_named<U>::type(),
+                                   it, names, index, u ) ;
+    }
+
+    template <typename U>
+    static void replace_element__dispatch( traits::false_type, iterator it, SEXP names, R_xlen_t index, const U& u){
+        *it = converter_type::get(u);
+    }
+
+    template <typename U>
+    static void replace_element__dispatch( traits::true_type, iterator it, SEXP names, R_xlen_t index, const U& u){
+        replace_element__dispatch__isArgument( typename traits::same_type<U,Argument>(), it, names, index, u ) ;
+    }
+
+    template <typename U>
+    static void replace_element__dispatch__isArgument( traits::false_type, iterator it, SEXP names, R_xlen_t index, const U& u){
+        RCPP_DEBUG_2( "  Vector::replace_element__dispatch<%s>(true, index= %d) ", DEMANGLE(U), index ) ;
+
+        *it = converter_type::get(u.object ) ;
+        SET_STRING_ELT( names, index, ::Rf_mkChar( u.name.c_str() ) ) ;
+    }
+
+    template <typename U>
+    static void replace_element__dispatch__isArgument( traits::true_type, iterator it, SEXP names, R_xlen_t index, const U& u){
+        RCPP_DEBUG_2( "  Vector::replace_element__dispatch<%s>(true, index= %d) ", DEMANGLE(U), index ) ;
+
+        *it = R_MissingArg ;
+        SET_STRING_ELT( names, index, ::Rf_mkChar( u.name.c_str() ) ) ;
+    }
+
+    typedef internal::RangeIndexer<RTYPE,true,Vector> Indexer ;
+
+    inline Indexer operator[]( const Range& range ){
+        return Indexer( const_cast<Vector&>(*this), range );
+    }
+
+    template <typename EXPR_VEC>
+    Vector& operator+=( const VectorBase<RTYPE,true,EXPR_VEC>& rhs ) {
+          const EXPR_VEC& ref = rhs.get_ref() ;
+        iterator start = begin() ;
+        R_xlen_t n = size() ;
+        // TODO: maybe unroll this
+        stored_type tmp ;
+        for( R_xlen_t i=0; i<n; i++){
+            Proxy left = start[i] ;
+            if( ! traits::is_na<RTYPE>( left ) ){
+                tmp = ref[i] ;
+                left = traits::is_na<RTYPE>( tmp ) ? tmp : ( left + tmp ) ;
+            }
+        }
+        return *this ;
+    }
+
+    template <typename EXPR_VEC>
+    Vector& operator+=( const VectorBase<RTYPE,false,EXPR_VEC>& rhs ) {
+          const EXPR_VEC& ref = rhs.get_ref() ;
+        iterator start = begin() ;
+        R_xlen_t n = size() ;
+        stored_type tmp ;
+        for( R_xlen_t i=0; i<n; i++){
+            if( ! traits::is_na<RTYPE>(start[i]) ){
+                start[i] += ref[i] ;
+            }
+        }
+        return *this ;
+
+    }
+
+    /**
+     *  Does this vector have an element with the target name
+     */
+    bool containsElementNamed( const char* target ) const {
+          SEXP names = RCPP_GET_NAMES(Storage::get__()) ;
+        if( Rf_isNull(names) ) return false ;
+        R_xlen_t n = Rf_xlength(names) ;
+        for( R_xlen_t i=0; i<n; i++){
+            if( !strcmp( target, CHAR(STRING_ELT(names, i)) ) )
+                return true ;
+        }
+        return false ;
+    }
+
+    int findName(const std::string& name) const {
+        SEXP names = RCPP_GET_NAMES(Storage::get__());
+        if (Rf_isNull(names)) stop("'names' attribute is null");
+        R_xlen_t n = Rf_xlength(names);
+        for (R_xlen_t i=0; i < n; ++i) {
+            if (strcmp(name.c_str(), CHAR(STRING_ELT(names, i))) == 0) {
+                return i;
+            }
+        }
+        std::stringstream ss;
+        ss << "no name '" << name << "' found";
+        stop(ss.str());
+        return -1;
+    }
+
+protected:
+    inline int* dims() const {
+        if( !::Rf_isMatrix(Storage::get__()) ) throw not_a_matrix() ;
+        return INTEGER( ::Rf_getAttrib( Storage::get__(), R_DimSymbol ) ) ;
+    }
+    void init(){
+        RCPP_DEBUG_2( "VECTOR<%d>::init( SEXP = <%p> )", RTYPE, Storage::get__() )
+        internal::r_init_vector<RTYPE>(Storage::get__()) ;
+    }
+
+private:
+
+    void push_back__impl(const stored_type& object, traits::true_type ) {
+        Shield<SEXP> object_sexp( object ) ;
+        R_xlen_t n = size() ;
+        Vector target( n + 1 ) ;
+        SEXP names = RCPP_GET_NAMES(Storage::get__()) ;
+        iterator target_it( target.begin() ) ;
+        iterator it(begin()) ;
+        iterator this_end(end());
+        if( Rf_isNull(names) ){
+            for( ; it < this_end; ++it, ++target_it ){
+                *target_it = *it ;
+            }
+        } else {
+            Shield<SEXP> newnames( ::Rf_allocVector( STRSXP, n + 1) ) ;
+            int i = 0 ;
+            for( ; it < this_end; ++it, ++target_it, i++ ){
+                *target_it = *it ;
+                SET_STRING_ELT( newnames, i, STRING_ELT(names, i ) ) ;
+            }
+            SET_STRING_ELT( newnames, i, Rf_mkChar("") ) ;
+            target.attr("names") = newnames ;
+        }
+        *target_it = object_sexp;
+        Storage::set__( target.get__() ) ;
+    }
+
+    void push_back__impl(const stored_type& object, traits::false_type ) {
+        R_xlen_t n = size() ;
+        Vector target( n + 1 ) ;
+        SEXP names = RCPP_GET_NAMES(Storage::get__()) ;
+        iterator target_it( target.begin() ) ;
+        iterator it(begin()) ;
+        iterator this_end(end());
+        if( Rf_isNull(names) ){
+            for( ; it < this_end; ++it, ++target_it ){
+                *target_it = *it ;
+            }
+        } else {
+            Shield<SEXP> newnames( ::Rf_allocVector( STRSXP, n + 1) ) ;
+            int i = 0 ;
+            for( ; it < this_end; ++it, ++target_it, i++ ){
+                *target_it = *it ;
+                SET_STRING_ELT( newnames, i, STRING_ELT(names, i ) ) ;
+            }
+            SET_STRING_ELT( newnames, i, Rf_mkChar("") ) ;
+            target.attr("names") = newnames ;
+        }
+        *target_it = object;
+        Storage::set__( target.get__() ) ;
+    }
+
+    void push_back_name__impl(const stored_type& object, const std::string& name, traits::true_type ) {
+        Shield<SEXP> object_sexp( object ) ;
+        R_xlen_t n = size() ;
+        Vector target( n + 1 ) ;
+        iterator target_it( target.begin() ) ;
+        iterator it(begin()) ;
+        iterator this_end(end());
+        SEXP names = RCPP_GET_NAMES(Storage::get__()) ;
+        Shield<SEXP> newnames( ::Rf_allocVector( STRSXP, n+1 ) ) ;
+        int i=0;
+        if( Rf_isNull(names) ){
+            for( ; it < this_end; ++it, ++target_it,i++ ){
+                *target_it = *it ;
+                SET_STRING_ELT( newnames, i , R_BlankString );
+            }
+        } else {
+            for( ; it < this_end; ++it, ++target_it, i++ ){
+                *target_it = *it ;
+                SET_STRING_ELT( newnames, i, STRING_ELT(names, i ) ) ;
+            }
+        }
+        SET_STRING_ELT( newnames, i, Rf_mkChar( name.c_str() ) );
+        target.attr("names") = newnames ;
+
+        *target_it = object_sexp;
+        Storage::set__( target.get__() ) ;
+    }
+    void push_back_name__impl(const stored_type& object, const std::string& name, traits::false_type ) {
+        R_xlen_t n = size() ;
+        Vector target( n + 1 ) ;
+        iterator target_it( target.begin() ) ;
+        iterator it(begin()) ;
+        iterator this_end(end());
+        SEXP names = RCPP_GET_NAMES(Storage::get__()) ;
+        Shield<SEXP> newnames( ::Rf_allocVector( STRSXP, n+1 ) ) ;
+        int i=0;
+        if( Rf_isNull(names) ){
+            Shield<SEXP> dummy( Rf_mkChar("") );
+            for( ; it < this_end; ++it, ++target_it,i++ ){
+                *target_it = *it ;
+                SET_STRING_ELT( newnames, i , dummy );
+            }
+        } else {
+            for( ; it < this_end; ++it, ++target_it, i++ ){
+                *target_it = *it ;
+                SET_STRING_ELT( newnames, i, STRING_ELT(names, i ) ) ;
+            }
+        }
+        SET_STRING_ELT( newnames, i, Rf_mkChar( name.c_str() ) );
+        target.attr("names") = newnames ;
+
+        *target_it = object;
+        Storage::set__( target.get__() ) ;
+    }
+
+    void push_front__impl(const stored_type& object, traits::true_type ) {
+            Shield<SEXP> object_sexp( object ) ;
+        R_xlen_t n = size() ;
+        Vector target( n+1);
+        iterator target_it(target.begin());
+        iterator it(begin());
+        iterator this_end(end());
+        *target_it = object_sexp ;
+        ++target_it ;
+        SEXP names = RCPP_GET_NAMES(Storage::get__()) ;
+        if( Rf_isNull(names) ){
+            for( ; it<this_end; ++it, ++target_it){
+                *target_it = *it ;
+            }
+        } else{
+            Shield<SEXP> newnames( ::Rf_allocVector( STRSXP, n + 1) );
+            int i=1 ;
+            SET_STRING_ELT( newnames, 0, Rf_mkChar("") ) ;
+            for( ; it<this_end; ++it, ++target_it, i++){
+                *target_it = *it ;
+                SET_STRING_ELT( newnames, i, STRING_ELT(names, i-1 ) ) ;
+            }
+            target.attr("names") = newnames ;
+        }
+        Storage::set__( target.get__() ) ;
+
+    }
+    void push_front__impl(const stored_type& object, traits::false_type ) {
+        R_xlen_t n = size() ;
+        Vector target( n+1);
+        iterator target_it(target.begin());
+        iterator it(begin());
+        iterator this_end(end());
+        *target_it = object ;
+        ++target_it ;
+        SEXP names = RCPP_GET_NAMES(Storage::get__()) ;
+        if( Rf_isNull(names) ){
+            for( ; it<this_end; ++it, ++target_it){
+                *target_it = *it ;
+            }
+        } else{
+            Shield<SEXP> newnames( ::Rf_allocVector( STRSXP, n + 1) );
+            int i=1 ;
+            SET_STRING_ELT( newnames, 0, Rf_mkChar("") ) ;
+            for( ; it<this_end; ++it, ++target_it, i++){
+                *target_it = *it ;
+                SET_STRING_ELT( newnames, i, STRING_ELT(names, i-1 ) ) ;
+            }
+            target.attr("names") = newnames ;
+        }
+        Storage::set__( target.get__() ) ;
+
+    }
+
+    void push_front_name__impl(const stored_type& object, const std::string& name, traits::true_type ) {
+        Shield<SEXP> object_sexp(object) ;
+        R_xlen_t n = size() ;
+        Vector target( n + 1 ) ;
+        iterator target_it( target.begin() ) ;
+        iterator it(begin()) ;
+        iterator this_end(end());
+        SEXP names = RCPP_GET_NAMES(Storage::get__()) ;
+        Shield<SEXP> newnames( ::Rf_allocVector( STRSXP, n+1 ) ) ;
+        int i=1;
+        SET_STRING_ELT( newnames, 0, Rf_mkChar( name.c_str() ) );
+        *target_it = object_sexp;
+        ++target_it ;
+
+        if( Rf_isNull(names) ){
+            for( ; it < this_end; ++it, ++target_it,i++ ){
+                *target_it = *it ;
+                SET_STRING_ELT( newnames, i , R_BlankString );
+            }
+        } else {
+            for( ; it < this_end; ++it, ++target_it, i++ ){
+                *target_it = *it ;
+                SET_STRING_ELT( newnames, i, STRING_ELT(names, i-1 ) ) ;
+            }
+        }
+        target.attr("names") = newnames ;
+        Storage::set__( target.get__() ) ;
+
+    }
+    void push_front_name__impl(const stored_type& object, const std::string& name, traits::false_type ) {
+        R_xlen_t n = size() ;
+        Vector target( n + 1 ) ;
+        iterator target_it( target.begin() ) ;
+        iterator it(begin()) ;
+        iterator this_end(end());
+        SEXP names = RCPP_GET_NAMES(Storage::get__()) ;
+        Shield<SEXP> newnames( ::Rf_allocVector( STRSXP, n+1 ) ) ;
+        int i=1;
+        SET_STRING_ELT( newnames, 0, Rf_mkChar( name.c_str() ) );
+        *target_it = object;
+        ++target_it ;
+
+        if( Rf_isNull(names) ){
+            for( ; it < this_end; ++it, ++target_it,i++ ){
+                *target_it = *it ;
+                SET_STRING_ELT( newnames, i , R_BlankString );
+            }
+        } else {
+            for( ; it < this_end; ++it, ++target_it, i++ ){
+                *target_it = *it ;
+                SET_STRING_ELT( newnames, i, STRING_ELT(names, i-1 ) ) ;
+            }
+        }
+        target.attr("names") = newnames ;
+
+        Storage::set__( target.get__() ) ;
+
+    }
+
+    iterator insert__impl( iterator position, const stored_type& object_, traits::true_type ) {
+        Shield<SEXP> object( object_ ) ;
+        R_xlen_t n = size() ;
+        Vector target( n+1 ) ;
+        iterator target_it = target.begin();
+        iterator it = begin() ;
+        iterator this_end = end() ;
+        SEXP names = RCPP_GET_NAMES(Storage::get__()) ;
+        iterator result ;
+        if( Rf_isNull(names) ){
+            for( ; it < position; ++it, ++target_it){
+                *target_it = *it ;
+            }
+            result = target_it;
+            *target_it = object ;
+            ++target_it ;
+            for( ; it < this_end; ++it, ++target_it ){
+                *target_it = *it ;
+            }
+        } else{
+            Shield<SEXP> newnames( ::Rf_allocVector( STRSXP, n + 1 ) ) ;
+            int i=0;
+            for( ; it < position; ++it, ++target_it, i++){
+                *target_it = *it ;
+                SET_STRING_ELT( newnames, i, STRING_ELT(names, i ) ) ;
+            }
+            result = target_it;
+            *target_it = object ;
+            SET_STRING_ELT( newnames, i, ::Rf_mkChar("") ) ;
+            i++ ;
+            ++target_it ;
+            for( ; it < this_end; ++it, ++target_it, i++ ){
+                *target_it = *it ;
+                SET_STRING_ELT( newnames, i, STRING_ELT(names, i - 1) ) ;
+            }
+            target.attr( "names" ) = newnames ;
+        }
+        Storage::set__( target.get__() ) ;
+        return result ;
+    }
+
+    iterator insert__impl( iterator position, const stored_type& object, traits::false_type ) {
+        R_xlen_t n = size() ;
+        Vector target( n+1 ) ;
+        iterator target_it = target.begin();
+        iterator it = begin() ;
+        iterator this_end = end() ;
+        SEXP names = RCPP_GET_NAMES(Storage::get__()) ;
+        iterator result ;
+        if( Rf_isNull(names) ){
+            for( ; it < position; ++it, ++target_it){
+                *target_it = *it ;
+            }
+            result = target_it;
+            *target_it = object ;
+            ++target_it ;
+            for( ; it < this_end; ++it, ++target_it ){
+                *target_it = *it ;
+            }
+        } else{
+            Shield<SEXP> newnames( ::Rf_allocVector( STRSXP, n + 1 ) ) ;
+            int i=0;
+            for( ; it < position; ++it, ++target_it, i++){
+                *target_it = *it ;
+                SET_STRING_ELT( newnames, i, STRING_ELT(names, i ) ) ;
+            }
+            result = target_it;
+            *target_it = object ;
+            SET_STRING_ELT( newnames, i, ::Rf_mkChar("") ) ;
+            i++ ;
+            ++target_it ;
+            for( ; it < this_end; ++it, ++target_it, i++ ){
+                *target_it = *it ;
+                SET_STRING_ELT( newnames, i, STRING_ELT(names, i - 1) ) ;
+            }
+            target.attr( "names" ) = newnames ;
+        }
+        Storage::set__( target.get__() ) ;
+        return result ;
+    }
+
+    iterator erase_single__impl( iterator position ) {
+              if( position < begin() || position > end() ) throw index_out_of_bounds( ) ;
+        R_xlen_t n = size() ;
+        Vector target( n - 1 ) ;
+        iterator target_it(target.begin()) ;
+        iterator it(begin()) ;
+        iterator this_end(end()) ;
+        SEXP names = RCPP_GET_NAMES(Storage::get__()) ;
+        if( Rf_isNull(names) ){
+            int i=0;
+            for( ; it < position; ++it, ++target_it, i++){
+                *target_it = *it;
+            }
+            ++it ;
+            for( ; it < this_end ; ++it, ++target_it){
+                *target_it = *it;
+            }
+            Storage::set__( target.get__() ) ;
+            return begin()+i ;
+        } else {
+            Shield<SEXP> newnames(::Rf_allocVector( STRSXP, n-1 ));
+            int i= 0 ;
+            for( ; it < position; ++it, ++target_it,i++){
+                *target_it = *it;
+                SET_STRING_ELT( newnames, i , STRING_ELT(names,i) ) ;
+            }
+            int result=i ;
+            ++it ;
+            i++ ;
+            for( ; it < this_end ; ++it, ++target_it, i++){
+                *target_it = *it;
+                SET_STRING_ELT( newnames, i-1, STRING_ELT(names,i) ) ;
+            }
+            target.attr( "names" ) = newnames ;
+            Storage::set__( target.get__() ) ;
+            return begin()+result ;
+        }
+    }
+
+    iterator erase_range__impl( iterator first, iterator last ) {
+        if( first > last ) throw std::range_error("invalid range") ;
+        if( last > end() || first < begin() ) throw index_out_of_bounds() ;
+
+        iterator it = begin() ;
+        iterator this_end = end() ;
+        R_xlen_t nremoved = std::distance(first,last) ;
+        R_xlen_t target_size = size() - nremoved  ;
+        Vector target( target_size ) ;
+        iterator target_it = target.begin() ;
+
+        SEXP names = RCPP_GET_NAMES(Storage::get__()) ;
+        int result = 0;
+        if( Rf_isNull(names) ){
+            int i=0;
+            for( ; it < first; ++it, ++target_it, i++ ){
+                *target_it = *it ;
+            }
+            result = i;
+            for( it = last ; it < this_end; ++it, ++target_it ){
+                *target_it = *it ;
+            }
+        } else{
+            Shield<SEXP> newnames( ::Rf_allocVector(STRSXP, target_size) ) ;
+            int i= 0 ;
+            for( ; it < first; ++it, ++target_it, i++ ){
+                *target_it = *it ;
+                SET_STRING_ELT( newnames, i, STRING_ELT(names, i ) );
+            }
+            result = i;
+            for( it = last ; it < this_end; ++it, ++target_it, i++ ){
+                *target_it = *it ;
+                SET_STRING_ELT( newnames, i, STRING_ELT(names, i + nremoved ) );
+            }
+            target.attr("names" ) = newnames ;
+        }
+        Storage::set__( target.get__() ) ;
+
+        return begin() + result;
+
+    }
+
+    template <typename T>
+    inline void assign_sugar_expression( const T& x ) {
+        R_xlen_t n = size() ;
+        if( n == x.size() ){
+            // just copy the data
+            import_expression<T>(x, n ) ;
+        } else{
+            // different size, so we change the memory
+            Shield<SEXP> wrapped(wrap(x));
+            Shield<SEXP> casted(r_cast<RTYPE>(wrapped));
+            Storage::set__(casted);
+        }
+    }
+
+    // sugar
+    template <typename T>
+    inline void assign_object( const T& x, traits::true_type ) {
+        assign_sugar_expression( x.get_ref() ) ;
+    }
+
+    // anything else
+    template <typename T>
+    inline void assign_object( const T& x, traits::false_type ) {
+        Shield<SEXP> wrapped(wrap(x));
+        Shield<SEXP> casted(r_cast<RTYPE>(wrapped));
+        Storage::set__(casted);
+    }
+
+    // we are importing a real sugar expression, i.e. not a vector
+    template <bool NA, typename VEC>
+    inline void import_sugar_expression( const Rcpp::VectorBase<RTYPE,NA,VEC>& other, traits::false_type ) {
+        RCPP_DEBUG_4( "Vector<%d>::import_sugar_expression( VectorBase<%d,%d,%s>, false_type )", RTYPE, NA, RTYPE, DEMANGLE(VEC) ) ;
+        R_xlen_t n = other.size() ;
+        Storage::set__( Rf_allocVector( RTYPE, n ) ) ;
+        import_expression<VEC>( other.get_ref() , n ) ;
+    }
+
+    // we are importing a sugar expression that actually is a vector
+    template <bool NA, typename VEC>
+    inline void import_sugar_expression( const Rcpp::VectorBase<RTYPE,NA,VEC>& other, traits::true_type ) {
+        RCPP_DEBUG_4( "Vector<%d>::import_sugar_expression( VectorBase<%d,%d,%s>, true_type )", RTYPE, NA, RTYPE, DEMANGLE(VEC) ) ;
+        Storage::set__( other.get_ref() ) ;
+    }
+
+
+    template <typename T>
+    inline void import_expression( const T& other, int n ) {
+        iterator start = begin() ;
+        RCPP_LOOP_UNROLL(start,other)
+    }
+
+    template <typename T>
+    inline void fill_or_generate( const T& t) {
+        fill_or_generate__impl( t, typename traits::is_generator<T>::type() ) ;
+    }
+
+    template <typename T>
+    inline void fill_or_generate__impl( const T& gen, traits::true_type) {
+        iterator first = begin() ;
+        iterator last = end() ;
+        while( first != last ) *first++ = gen() ;
+    }
+
+    template <typename T>
+    inline void fill_or_generate__impl( const T& t, traits::false_type) {
+        fill(t) ;
+    }
+
+    template <typename U>
+    void fill__dispatch( traits::false_type, const U& u){
+        // when this is not trivial, this is SEXP
+        Shield<SEXP> elem( converter_type::get( u ) );
+        iterator it(begin());
+        for( R_xlen_t i=0; i<size() ; i++, ++it){
+            *it = ::Rf_duplicate( elem ) ;
+        }
+    }
+
+    template <typename U>
+    void fill__dispatch( traits::true_type, const U& u){
+        std::fill( begin(), end(), converter_type::get( u ) ) ;
+    }
+
+public:
+
+    static Vector create(){
+        return Vector( 0 ) ;
+    }
+
+    #include <Rcpp/generated/Vector__create.h>
+
+public:
+
+    inline SEXP eval() const {
+        return Rcpp_eval( Storage::get__(), R_GlobalEnv ) ;
+    }
+
+    inline SEXP eval(SEXP env) const {
+        return Rcpp_eval( Storage::get__(), env );
+    }
+
+
+} ; /* Vector */
+
+template <int RTYPE, template <class> class StoragePolicy >
+inline std::ostream &operator<<(std::ostream & s, const Vector<RTYPE, StoragePolicy> & rhs) {
+    typedef Vector<RTYPE, StoragePolicy> VECTOR;
+
+    typename VECTOR::iterator i = const_cast<VECTOR &>(rhs).begin();
+    typename VECTOR::iterator iend = const_cast<VECTOR &>(rhs).end();
+
+    if (i != iend) {
+        s << (*i);
+        ++i;
+
+        for ( ; i != iend; ++i) {
+            s << " " << (*i);
+        }
+    }
+
+    return s;
+}
+
+template<template <class> class StoragePolicy >
+inline std::ostream &operator<<(std::ostream & s, const Vector<STRSXP, StoragePolicy> & rhs) {
+    typedef Vector<STRSXP, StoragePolicy> VECTOR;
+
+    typename VECTOR::iterator i = const_cast<VECTOR &>(rhs).begin();
+    typename VECTOR::iterator iend = const_cast<VECTOR &>(rhs).end();
+
+    if (i != iend) {
+        s << "\"" << (*i) << "\"";
+        ++i;
+
+        for ( ; i != iend; ++i) {
+            s << " \"" << (*i) << "\"";
+        }
+    }
+
+    return s;
+}
+
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/LazyVector.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/LazyVector.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/LazyVector.h	(revision 2477)
@@ -0,0 +1,70 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+//
+// LazyVector.h: Rcpp R/C++ interface class library -- lazy vectors
+//
+// Copyright (C) 2010 - 2012 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__vector__LazyVector_h
+#define Rcpp__vector__LazyVector_h
+
+namespace Rcpp{
+namespace internal{
+
+template <typename VECTOR>
+class LazyVector{
+public:
+    typedef typename VECTOR::r_type r_type ;
+    typedef typename Rcpp::traits::storage_type< r_type::value >::type stored_type ;
+
+    LazyVector( const VECTOR& vec_ ) : vec(vec_), n(vec_.size()), data(n), known(n,false){}
+
+    inline stored_type operator[]( R_xlen_t i) const {
+        stored_type res ;
+        if( ! known[i] ) {
+            data[i] = res = vec[i] ;
+            known[i] = true ;
+        } else {
+            res = data[i] ;
+        }
+        return res ;
+    }
+
+private:
+    const VECTOR& vec ;
+    R_xlen_t n ;
+    mutable std::vector<stored_type> data ;
+    mutable std::vector<bool> known ;
+} ;
+
+template <int RTYPE>
+class LazyVector< Rcpp::Vector<RTYPE> >{
+public:
+    typedef Rcpp::Vector<RTYPE> VECTOR ;
+    typedef typename VECTOR::Proxy Proxy ;
+
+    LazyVector( const VECTOR& vec_) : vec(vec_){}
+    inline Proxy operator[]( R_xlen_t i) const { return vec[i] ; }
+
+private:
+    const VECTOR& vec ;
+} ;
+
+
+} // internal
+} // Rcpp
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/Matrix.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/Matrix.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/Matrix.h	(revision 2477)
@@ -0,0 +1,452 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+//
+// Matrix.h: Rcpp R/C++ interface class library -- matrices
+//
+// Copyright (C) 2010 - 2016  Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__vector__Matrix_h
+#define Rcpp__vector__Matrix_h
+
+namespace Rcpp{
+
+template <int RTYPE, template <class> class StoragePolicy = PreserveStorage >
+class Matrix : public Vector<RTYPE, StoragePolicy>, public MatrixBase<RTYPE, true, Matrix<RTYPE,StoragePolicy> > {
+    int nrows ;
+
+public:
+    using Vector<RTYPE, StoragePolicy>::size; 	// disambiguate diamond pattern for g++-6 and later
+
+    struct r_type : traits::integral_constant<int,RTYPE>{} ;
+    struct can_have_na : traits::true_type{} ;
+    typedef MatrixRow<RTYPE> Row ;
+    typedef ConstMatrixRow<RTYPE> ConstRow ;
+    typedef MatrixColumn<RTYPE> Column ;
+    typedef ConstMatrixColumn<RTYPE> ConstColumn ;
+    typedef SubMatrix<RTYPE> Sub ;
+
+    typedef StoragePolicy<Matrix> Storage ;
+    typedef Vector<RTYPE, StoragePolicy> VECTOR ;
+    typedef typename VECTOR::iterator iterator ;
+    typedef typename VECTOR::const_iterator const_iterator ;
+    typedef typename VECTOR::converter_type converter_type ;
+    typedef typename VECTOR::stored_type stored_type ;
+    typedef typename VECTOR::Proxy Proxy ;
+    typedef typename VECTOR::const_Proxy const_Proxy ;
+
+    Matrix() : VECTOR(Dimension(0, 0)), nrows(0) {}
+
+    Matrix(SEXP x) : VECTOR( r_cast<RTYPE>( x ) ), nrows( VECTOR::dims()[0] ) {}
+
+    Matrix( const Dimension& dims) : VECTOR( Rf_allocMatrix( RTYPE, dims[0], dims[1] ) ), nrows(dims[0]) {
+        if( dims.size() != 2 ) throw not_compatible("not a matrix") ;
+        VECTOR::init() ;
+    }
+    Matrix( const int& nrows_, const int& ncols) : VECTOR( Dimension( nrows_, ncols ) ),
+      nrows(nrows_)
+    {}
+
+    template <typename Iterator>
+    Matrix( const int& nrows_, const int& ncols, Iterator start ) :
+        VECTOR( start, start + (static_cast<R_xlen_t>(nrows_)*ncols) ),
+        nrows(nrows_)
+    {
+        VECTOR::attr( "dim" ) = Dimension( nrows, ncols ) ;
+    }
+
+    Matrix( const int& n) : VECTOR( Dimension( n, n ) ), nrows(n) {}
+
+
+    Matrix( const Matrix& other) : VECTOR( other.get__() ), nrows(other.nrows) {}
+
+    template <bool NA, typename MAT>
+    Matrix( const MatrixBase<RTYPE,NA,MAT>& other ) : VECTOR( Rf_allocMatrix( RTYPE, other.nrow(), other.ncol() ) ), nrows(other.nrow()) {
+        import_matrix_expression<NA,MAT>( other, nrows, ncol() ) ;
+    }
+
+    Matrix( const SubMatrix<RTYPE>& ) ;
+
+    Matrix& operator=(const Matrix& other) {
+        SEXP x = other.get__() ;
+        if( ! ::Rf_isMatrix(x) ) not_compatible("not a matrix") ;
+        VECTOR::set__( x ) ;
+        nrows = other.nrows ;
+        return *this ;
+    }
+    Matrix& operator=( const SubMatrix<RTYPE>& ) ;
+
+    explicit Matrix( const no_init_matrix& obj) {
+        Storage::set__( Rf_allocMatrix( RTYPE, obj.nrow(), obj.ncol() ) );
+    }
+
+    inline int ncol() const {
+        return VECTOR::dims()[1];
+    }
+    inline int nrow() const {
+        return nrows ;
+    }
+    inline int cols() const {
+        return VECTOR::dims()[1];
+    }
+    inline int rows() const {
+        return nrows ;
+    }
+
+    inline Row row( int i ){ return Row( *this, i ) ; }
+    inline ConstRow row( int i ) const{ return ConstRow( *this, i ) ; }
+    inline Column column( int i ){ return Column(*this, i ) ; }
+    inline ConstColumn column( int i ) const{ return ConstColumn( *this, i ) ; }
+
+    inline const_iterator begin() const{ return VECTOR::begin() ; }
+    inline const_iterator end() const{ return VECTOR::end() ; }
+    inline iterator begin() { return VECTOR::begin() ; }
+    inline iterator end() { return VECTOR::end() ; }
+
+    template <typename U>
+    void fill_diag( const U& u) {
+      fill_diag__dispatch( typename traits::is_trivial<RTYPE>::type(), u ) ;
+    }
+
+    template <typename U> static Matrix diag( int size, const U& diag_value ) {
+      Matrix res(size,size) ;
+        res.fill_diag( diag_value ) ;
+        return res ;
+    }
+
+    inline Proxy operator[]( R_xlen_t i ) {
+      return static_cast< Vector<RTYPE>* >( this )->operator[]( i ) ;
+    }
+    inline const_Proxy operator[]( R_xlen_t i ) const {
+      return static_cast< const Vector<RTYPE>* >( this )->operator[]( i ) ;
+    }
+
+    inline Proxy operator()( const size_t& i, const size_t& j) {
+      return static_cast< Vector<RTYPE>* >( this )->operator[]( offset( i, j ) ) ;
+    }
+    inline const_Proxy operator()( const size_t& i, const size_t& j) const {
+       return static_cast< const Vector<RTYPE>* >( this )->operator[]( offset( i, j ) ) ;
+    }
+
+    inline Proxy at( const size_t& i, const size_t& j) {
+        return static_cast< Vector<RTYPE>* >( this )->operator()( i, j ) ;
+    }
+    inline const_Proxy at( const size_t& i, const size_t& j) const {
+        return static_cast< const Vector<RTYPE>* >( this )->operator()( i, j ) ;
+    }
+
+    inline Row operator()( int i, internal::NamedPlaceHolder ) {
+      return Row( *this, i ) ;
+    }
+    inline ConstRow operator()( int i, internal::NamedPlaceHolder ) const {
+      return ConstRow( *this, i ) ;
+    }
+    inline Column operator()( internal::NamedPlaceHolder, int i ) {
+      return Column( *this, i ) ;
+    }
+    inline ConstColumn operator()( internal::NamedPlaceHolder, int i ) const {
+      return ConstColumn( *this, i ) ;
+    }
+    inline Sub operator()( const Range& row_range, const Range& col_range) {
+      return Sub( const_cast<Matrix&>(*this), row_range, col_range ) ;
+    }
+    inline Sub operator()( internal::NamedPlaceHolder, const Range& col_range) {
+      return Sub( const_cast<Matrix&>(*this), Range(0,nrow()-1) , col_range ) ;
+    }
+    inline Sub operator()( const Range& row_range, internal::NamedPlaceHolder ) {
+      return Sub( const_cast<Matrix&>(*this), row_range, Range(0,ncol()-1) ) ;
+    }
+
+private:
+    inline R_xlen_t offset(const int i, const int j) const { return i + static_cast<R_xlen_t>(nrows) * j ; }
+
+    template <typename U>
+    void fill_diag__dispatch( traits::false_type, const U& u) {
+        Shield<SEXP> elem( converter_type::get( u ) );
+
+        R_xlen_t bounds = std::min(Matrix::nrow(), Matrix::ncol());
+        for (R_xlen_t i = 0; i < bounds; ++i) {
+            (*this)(i, i) = elem;
+        }
+    }
+
+    template <typename U>
+    void fill_diag__dispatch( traits::true_type, const U& u) {
+        stored_type elem = converter_type::get( u );
+
+        R_xlen_t bounds = std::min(Matrix::nrow(), Matrix::ncol());
+
+        for (R_xlen_t i = 0; i < bounds; ++i) {
+            (*this)(i, i) = elem;
+        }
+    }
+
+    template <bool NA, typename MAT>
+    void import_matrix_expression( const MatrixBase<RTYPE,NA,MAT>& other, int nr, int nc ) {
+      iterator start = VECTOR::begin() ;
+        for( int j=0; j<nc; j++){
+            for( int i=0; i<nr; i++, ++start){
+                *start = other(i,j) ;
+            }
+        }
+    }
+
+};
+
+inline internal::DimNameProxy rownames(SEXP x) {
+    return internal::DimNameProxy(x, 0);
+}
+
+inline internal::DimNameProxy colnames(SEXP x) {
+    return internal::DimNameProxy(x, 1);
+}
+
+template<template <class> class StoragePolicy >
+inline std::ostream &operator<<(std::ostream & s, const Matrix<REALSXP, StoragePolicy> & rhs) {
+    typedef Matrix<REALSXP, StoragePolicy> MATRIX;
+
+    std::ios::fmtflags flags = s.flags();
+    s.unsetf(std::ios::floatfield);
+    std::streamsize precision = s.precision();
+
+    const int rows = rhs.rows();
+
+    for (int i = 0; i < rows; ++i) {
+        typename MATRIX::Row row = const_cast<MATRIX &>(rhs).row(i);
+
+        typename MATRIX::Row::iterator j = row.begin();
+        typename MATRIX::Row::iterator jend = row.end();
+
+        if (j != jend) {
+            s << std::showpoint << std::setw(precision + 1) << (*j);
+            j++;
+
+            for ( ; j != jend; j++) {
+                s << " " << std::showpoint << std::setw(precision + 1) << (*j);
+            }
+        }
+
+        s << std::endl;
+    }
+
+    s.flags(flags);
+    return s;
+}
+
+#ifndef RCPP_NO_SUGAR
+#define RCPP_GENERATE_MATRIX_SCALAR_OPERATOR(__OPERATOR__)                                                                    \
+    template <int RTYPE, template <class> class StoragePolicy, typename T >                                                   \
+    inline typename traits::enable_if< traits::is_convertible< typename traits::remove_const_and_reference< T >::type,        \
+         typename Matrix<RTYPE, StoragePolicy>::stored_type >::value, Matrix<RTYPE, StoragePolicy> >::type                    \
+             operator __OPERATOR__ (const Matrix<RTYPE, StoragePolicy> &lhs, const T &rhs) {                                  \
+        Vector<RTYPE, StoragePolicy> v = static_cast<const Vector<RTYPE, StoragePolicy> &>(lhs) __OPERATOR__ rhs;             \
+        v.attr("dim") = Vector<INTSXP>::create(lhs.nrow(), lhs.ncol());                                                       \
+        return as< Matrix<RTYPE, StoragePolicy> >(v);                                                                         \
+    }
+
+RCPP_GENERATE_MATRIX_SCALAR_OPERATOR(+)
+RCPP_GENERATE_MATRIX_SCALAR_OPERATOR(-)
+RCPP_GENERATE_MATRIX_SCALAR_OPERATOR(*)
+RCPP_GENERATE_MATRIX_SCALAR_OPERATOR(/)
+
+#undef RCPP_GENERATE_MATRIX_SCALAR_OPERATOR
+
+#define RCPP_GENERATE_SCALAR_MATRIX_OPERATOR(__OPERATOR__)                                                                    \
+    template <int RTYPE, template <class> class StoragePolicy, typename T >                                                   \
+    inline typename traits::enable_if< traits::is_convertible< typename traits::remove_const_and_reference< T >::type,        \
+         typename Matrix<RTYPE, StoragePolicy>::stored_type >::value, Matrix<RTYPE, StoragePolicy> >::type                    \
+             operator __OPERATOR__ (const T &lhs, const Matrix<RTYPE, StoragePolicy> &rhs) {                                  \
+        Vector<RTYPE, StoragePolicy> v = static_cast<const Vector<RTYPE, StoragePolicy> &>(rhs);                              \
+        v = lhs __OPERATOR__ v;                                                                                               \
+        v.attr("dim") = Vector<INTSXP>::create(rhs.nrow(), rhs.ncol());                                                       \
+        return as< Matrix<RTYPE, StoragePolicy> >(v);                                                                         \
+    }
+
+RCPP_GENERATE_SCALAR_MATRIX_OPERATOR(+)
+RCPP_GENERATE_SCALAR_MATRIX_OPERATOR(-)
+RCPP_GENERATE_SCALAR_MATRIX_OPERATOR(*)
+RCPP_GENERATE_SCALAR_MATRIX_OPERATOR(/)
+
+#undef RCPP_GENERATE_SCALAR_MATRIX_OPERATOR
+#endif
+
+template<template <class> class StoragePolicy >
+inline std::ostream &operator<<(std::ostream & s, const Matrix<INTSXP, StoragePolicy> & rhs) {
+    typedef Matrix<INTSXP, StoragePolicy> MATRIX;
+    typedef Vector<INTSXP, StoragePolicy> VECTOR;
+
+    std::ios::fmtflags flags = s.flags();
+
+    s << std::dec;
+
+    int min = std::numeric_limits<int>::max();
+    int max = std::numeric_limits<int>::min();
+
+    typename VECTOR::iterator j = static_cast<VECTOR &>(const_cast<MATRIX &>(rhs)).begin();
+    typename VECTOR::iterator jend = static_cast<VECTOR &>(const_cast<MATRIX &>(rhs)).end();
+
+    for ( ; j != jend; ++j) {
+        if (*j < min) {
+            min = *j;
+        }
+
+        if (*j > max) {
+            max = *j;
+        }
+    }
+
+    int digitsMax = (max >= 0) ? 0 : 1;
+    int digitsMin = (min >= 0) ? 0 : 1;
+
+    while (min != 0)
+    {
+        ++digitsMin;
+        min /= 10;
+    }
+
+    while (max != 0)
+    {
+        ++digitsMax;
+        max /= 10;
+    }
+
+    int digits = std::max(digitsMin, digitsMax);
+
+    const int rows = rhs.rows();
+
+    for (int i = 0; i < rows; ++i) {
+        typename MATRIX::Row row = const_cast<MATRIX &>(rhs).row(i);
+
+        typename MATRIX::Row::iterator j = row.begin();
+        typename MATRIX::Row::iterator jend = row.end();
+
+        if (j != jend) {
+            s << std::setw(digits) << (*j);
+            ++j;
+
+            for ( ; j != jend; ++j) {
+                s << " " << std::setw(digits) << (*j);
+            }
+        }
+
+        s << std::endl;
+    }
+
+    s.flags(flags);
+    return s;
+}
+
+template<template <class> class StoragePolicy >
+inline std::ostream &operator<<(std::ostream & s, const Matrix<STRSXP, StoragePolicy> & rhs) {
+    typedef Matrix<STRSXP, StoragePolicy> MATRIX;
+
+    const int rows = rhs.rows();
+
+    for (int i = 0; i < rows; ++i) {
+        typename MATRIX::Row row = const_cast<MATRIX &>(rhs).row(i);
+
+        typename MATRIX::Row::iterator j = row.begin();
+        typename MATRIX::Row::iterator jend = row.end();
+
+        if (j != jend) {
+            s << "\"" << (*j) << "\"";
+            j++;
+
+            for ( ; j != jend; j++) {
+                s << " \"" << (*j) << "\"";
+            }
+        }
+
+        s << std::endl;
+    }
+
+    return s;
+}
+
+template<int RTYPE, template <class> class StoragePolicy >
+inline std::ostream &operator<<(std::ostream & s, const Matrix<RTYPE, StoragePolicy> & rhs) {
+    typedef Matrix<RTYPE, StoragePolicy> MATRIX;
+
+    const int rows = rhs.rows();
+
+    for (int i = 0; i < rows; ++i) {
+        typename MATRIX::Row row = const_cast<MATRIX &>(rhs).row(i);
+
+        typename MATRIX::Row::iterator j = row.begin();
+        typename MATRIX::Row::iterator jend = row.end();
+
+        if (j != jend) {
+            s << (*j);
+            j++;
+
+            for ( ; j != jend; j++) {
+                s << (*j);
+            }
+        }
+
+        s << std::endl;
+    }
+
+    return s;
+}
+
+template<int RTYPE, template <class> class StoragePolicy >
+Matrix<RTYPE, StoragePolicy> tranpose_impl(const Matrix<RTYPE, StoragePolicy> & x) {
+    typedef Matrix<RTYPE, StoragePolicy> MATRIX;
+    typedef Vector<RTYPE, StoragePolicy> VECTOR;
+
+    Vector<INTSXP, StoragePolicy> dims = ::Rf_getAttrib(x, R_DimSymbol);
+    int nrow = dims[0], ncol = dims[1];
+    MATRIX r(Dimension(ncol, nrow)); 	// new Matrix with reversed dimension
+    R_xlen_t len = XLENGTH(x), len2 = XLENGTH(x)-1;
+
+    // similar approach as in R: fill by in column, "accessing row-wise"
+    VECTOR s = VECTOR(r.get__());
+    for (R_xlen_t i = 0, j = 0; i < len; i++, j += nrow) {
+        if (j > len2) j -= len2;
+        s[i] = x[j];
+    }
+
+    // there must be a simpler, more C++-ish way for this ...
+    SEXP dimNames = Rf_getAttrib(x, R_DimNamesSymbol);
+    if (!Rf_isNull(dimNames)) {
+        // do we need dimnamesnames ?
+        Shield<SEXP> newDimNames(Rf_allocVector(VECSXP, 2));
+        SET_VECTOR_ELT(newDimNames, 0, VECTOR_ELT(dimNames, 1));
+        SET_VECTOR_ELT(newDimNames, 1, VECTOR_ELT(dimNames, 0));
+        Rf_setAttrib(r, R_DimNamesSymbol, newDimNames);
+    }
+    return r;
+}
+
+template<template <class> class StoragePolicy>
+Matrix<REALSXP, StoragePolicy> transpose(const Matrix<REALSXP, StoragePolicy> & x) {
+    return tranpose_impl<REALSXP, StoragePolicy>(x);
+}
+
+template<template <class> class StoragePolicy>
+Matrix<INTSXP, StoragePolicy> transpose(const Matrix<INTSXP, StoragePolicy> & x) {
+    return tranpose_impl<INTSXP, StoragePolicy>(x);
+}
+
+template<template <class> class StoragePolicy>
+Matrix<STRSXP, StoragePolicy> transpose(const Matrix<STRSXP, StoragePolicy> & x) {
+    return tranpose_impl<STRSXP, StoragePolicy>(x);
+}
+
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/00_forward_proxy.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/00_forward_proxy.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/00_forward_proxy.h	(revision 2477)
@@ -0,0 +1,51 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// 00_forward_proxy.h: Rcpp R/C++ interface class library -- proxies
+//
+// Copyright (C) 2010 - 2013 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__vector__forward_proxy_h
+#define Rcpp__vector__forward_proxy_h
+
+namespace Rcpp{
+
+namespace internal{
+	template <int RTYPE> class string_proxy ;
+	template <int RTYPE> class const_string_proxy ;
+	template <int RTYPE> class generic_proxy ;
+	template <int RTYPE> class const_generic_proxy ;
+	template <int RTYPE> class simple_name_proxy ;
+	template <int RTYPE> class string_name_proxy ;
+	template <int RTYPE> class generic_name_proxy ;
+}
+
+namespace traits {
+    template <int RTYPE, template <class> class StoragePolicy> struct r_vector_cache_type ;
+	template <int RTYPE, template <class> class StoragePolicy> class r_vector_cache ;
+
+	template <int RTYPE> struct r_vector_name_proxy ;
+	template <int RTYPE> struct r_vector_proxy ;
+	template <int RTYPE> struct r_vector_const_proxy ;
+
+	template <int RTYPE> struct r_vector_iterator ;
+	template <int RTYPE> struct r_vector_const_iterator ;
+
+}
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/ChildVector.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/ChildVector.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/ChildVector.h	(revision 2477)
@@ -0,0 +1,77 @@
+// ChildVector.h: Rcpp R/C++ interface class library -- vector children of lists
+//
+// Copyright (C) 2014 Dirk Eddelbuettel, Romain Francois and Kevin Ushey
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__Vector__ChildVector__h
+#define Rcpp__Vector__ChildVector__h
+
+namespace Rcpp {
+
+template <typename T>
+class ChildVector : public T {
+
+    public:
+
+    ChildVector(SEXP data_, SEXP parent_, R_xlen_t i_):
+        T(data_),
+        parent(parent_),
+        i(i_) {}
+
+    ChildVector(const ChildVector& other):
+        T(wrap(other)),
+        parent(other.parent),
+        i(other.i) {}
+
+    inline ChildVector& operator=(const ChildVector& other) {
+        if (this != &other) {
+            this->set__(other);
+            if (parent != NULL && !Rf_isNull(parent)) {
+                SET_VECTOR_ELT(parent, i, other);
+            }
+        }
+        return *this;
+    }
+
+    inline ChildVector& operator=(const T& other) {
+        this->set__(other);
+        if (parent != NULL && !Rf_isNull(parent)) {
+            SET_VECTOR_ELT(parent, i, other);
+        }
+        return *this;
+    }
+
+    template <typename U>
+    inline ChildVector& operator=(const U& other) {
+        Shield<SEXP> wrapped( wrap(other) );
+        T vec = as<T>(wrapped);
+        this->set__(vec);
+        if (parent != NULL && !Rf_isNull(parent)) {
+            SET_VECTOR_ELT(parent, i, vec);
+        }
+        return *this;
+    }
+
+    private:
+        SEXP parent;
+        R_xlen_t i;
+};
+
+} // namespace Rcpp
+
+#endif
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/traits.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/traits.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/traits.h	(revision 2477)
@@ -0,0 +1,105 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// traits.h: Rcpp R/C++ interface class library -- support traits for vector
+//
+// Copyright (C) 2010 - 2015 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__vector__traits_h
+#define Rcpp__vector__traits_h
+
+namespace Rcpp{
+namespace traits{
+
+	template <int RTYPE, template <class> class StoragePolicy = PreserveStorage >
+	class r_vector_cache{
+	public:
+		typedef typename ::Rcpp::Vector<RTYPE, StoragePolicy> VECTOR ;
+		typedef typename r_vector_iterator<RTYPE>::type iterator ;
+		typedef typename r_vector_const_iterator<RTYPE>::type const_iterator ;
+		typedef typename r_vector_proxy<RTYPE>::type proxy ;
+		typedef typename r_vector_const_proxy<RTYPE>::type const_proxy ;
+		typedef typename storage_type<RTYPE>::type storage_type ;
+
+		r_vector_cache() : start(0){} ;
+		inline void update( const VECTOR& v ) {
+		    start = ::Rcpp::internal::r_vector_start<RTYPE>(v) ;
+		}
+		inline iterator get() const { return start; }
+		inline const_iterator get_const() const { return start; }
+
+		inline proxy ref() { return *start ;}
+		inline proxy ref(R_xlen_t i) { return start[i] ; }
+
+		inline proxy ref() const { return *start ;}
+		inline proxy ref(R_xlen_t i) const { return start[i] ; }
+
+		private:
+			iterator start ;
+	} ;
+	template <int RTYPE, template <class> class StoragePolicy = PreserveStorage> 
+	class proxy_cache{
+	public:
+		typedef typename ::Rcpp::Vector<RTYPE, StoragePolicy> VECTOR ;
+		typedef typename r_vector_iterator<RTYPE>::type iterator ;
+		typedef typename r_vector_const_iterator<RTYPE>::type const_iterator ;
+		typedef typename r_vector_proxy<RTYPE>::type proxy ;
+		typedef typename r_vector_const_proxy<RTYPE>::type const_proxy ;
+
+		proxy_cache(): p(0){}
+		~proxy_cache(){}
+		void update( const VECTOR& v ){
+			p = const_cast<VECTOR*>(&v) ;
+		}
+		inline iterator get() const { return iterator( proxy(*p, 0 ) ) ;}
+		// inline const_iterator get_const() const { return const_iterator( *p ) ;}
+		inline const_iterator get_const() const { return const_iterator( const_proxy(*p, 0) ) ; }
+
+		inline proxy ref() { return proxy(*p,0) ; }
+		inline proxy ref(R_xlen_t i) { return proxy(*p,i);}
+
+		inline const_proxy ref() const { return const_proxy(*p,0) ; }
+		inline const_proxy ref(R_xlen_t i) const { return const_proxy(*p,i);}
+
+		private:
+			VECTOR* p ;
+	} ;
+
+	// regular types for INTSXP, REALSXP, ...
+	template <int RTYPE, template <class> class StoragePolicy = PreserveStorage> 
+	struct r_vector_cache_type { 
+	    typedef r_vector_cache<RTYPE, StoragePolicy> type ;  
+	} ;
+
+	// proxy types for VECSXP, STRSXP and EXPRSXP
+	template <template <class> class StoragePolicy> 
+	struct r_vector_cache_type<VECSXP, StoragePolicy>  { 
+	    typedef proxy_cache<VECSXP, StoragePolicy> type ;  
+	} ;
+	template <template <class> class StoragePolicy> 
+	struct r_vector_cache_type<EXPRSXP, StoragePolicy> { 
+	    typedef proxy_cache<EXPRSXP, StoragePolicy> type ; 
+	} ;
+	template <template <class> class StoragePolicy> 
+	struct r_vector_cache_type<STRSXP, StoragePolicy>  { 
+	    typedef proxy_cache<STRSXP, StoragePolicy> type ;  
+	} ;
+
+} // traits
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/converter.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/converter.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/converter.h	(revision 2477)
@@ -0,0 +1,109 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// converter.h: Rcpp R/C++ interface class library -- converters
+//
+// Copyright (C) 2010 - 2013 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__vector__converters_h
+#define Rcpp__vector__converters_h
+
+namespace Rcpp{
+namespace internal {
+	template <int RTYPE>
+	class element_converter{
+	public:
+		typedef typename ::Rcpp::traits::storage_type<RTYPE>::type target ;
+
+		template <typename T>
+		static target get( const T& input ){
+			return caster<T,target>(input) ;
+		}
+
+		static target get( const target& input ){
+			return input ;
+		}
+	} ;
+
+	template <int RTYPE>
+	class string_element_converter {
+	public:
+		typedef SEXP target ;
+
+		template <typename T>
+		static SEXP get( const T& input){
+			std::string out(input) ;
+			RCPP_DEBUG_1( "string_element_converter::get< T = %s >()", DEMANGLE(T) )
+			return Rf_mkChar( out.c_str() ) ;
+		}
+
+		static SEXP get(const std::string& input){
+			RCPP_DEBUG( "string_element_converter::get< std::string >()" )
+			return Rf_mkChar( input.c_str() ) ;
+		}
+
+		static SEXP get( const Rcpp::String& input) ;
+
+		static SEXP get(const char& input){
+		    RCPP_DEBUG( "string_element_converter::get< char >()" )
+			return Rf_mkCharLen( &input, 1 ) ;
+		}
+
+		// assuming a CHARSXP
+		static SEXP get(SEXP x){
+		    RCPP_DEBUG( "string_element_converter::get< SEXP >()" )
+		    return x;
+		}
+	} ;
+
+	template <int RTYPE>
+	class generic_element_converter {
+	public:
+		typedef SEXP target ;
+
+		template <typename T>
+		static SEXP get( const T& input){
+			return ::Rcpp::wrap( input ) ;
+		}
+
+		static SEXP get( const char* input){
+			return ::Rcpp::wrap( input );
+		}
+
+		static SEXP get(SEXP input){
+			return input ;
+		}
+	} ;
+}
+
+namespace traits{
+	template <int RTYPE> struct r_vector_element_converter{
+		typedef typename ::Rcpp::internal::element_converter<RTYPE> type ;
+	} ;
+	template<> struct r_vector_element_converter<STRSXP>{
+		typedef ::Rcpp::internal::string_element_converter<STRSXP> type ;
+	} ;
+	template<> struct r_vector_element_converter<VECSXP>{
+		typedef ::Rcpp::internal::generic_element_converter<VECSXP> type ;
+	} ;
+	template<> struct r_vector_element_converter<EXPRSXP>{
+		typedef ::Rcpp::internal::generic_element_converter<EXPRSXP> type ;
+	} ;
+}
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/string_proxy.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/string_proxy.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/string_proxy.h	(revision 2477)
@@ -0,0 +1,255 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// string_proxy.h: Rcpp R/C++ interface class library --
+//
+// Copyright (C) 2010 - 2013 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__vector__string_proxy_h
+#define Rcpp__vector__string_proxy_h
+
+namespace Rcpp{
+namespace internal{
+
+	template<int RTYPE> class string_proxy {
+	public:
+
+		typedef typename ::Rcpp::Vector<RTYPE> VECTOR ;
+		typedef const char* iterator ;
+		typedef const char& reference ;
+
+		string_proxy() : parent(0), index(-1){};
+
+		/**
+		 * Creates a proxy
+		 *
+		 * @param v reference to the associated character vector
+		 * @param index index
+		 */
+		string_proxy( VECTOR& v, R_xlen_t index_ ) : parent(&v), index(index_){}
+
+		string_proxy( const string_proxy& other ) :
+			parent(other.parent), index(other.index){} ;
+
+		/**
+		 * lhs use. Assign the value of the referred element to
+		 * the current content of the element referred by the
+		 * rhs proxy
+		 *
+		 * @param rhs another proxy, possibly from another vector
+		 */
+		string_proxy& operator=(const string_proxy& other){
+			set( other.get() ) ;
+			return *this ;
+		}
+
+		string_proxy& operator=( const const_string_proxy<RTYPE>& other) ;
+
+		string_proxy& operator=( const String& s) ;
+
+		/**
+		 * lhs use. Assigns the value of the referred element
+		 * of the character vector
+		 *
+		 * @param rhs new content for the element referred by this proxy
+		 */
+		template <typename T>
+		string_proxy& operator=(const std::basic_string<T>& rhs){
+			set( rhs ) ;
+			return *this ;
+		}
+
+		string_proxy& operator=(const char* rhs){
+			set( Rf_mkChar( rhs ) ) ;
+			return *this ;
+		}
+
+		string_proxy& operator=(const wchar_t* rhs){
+			set( internal::make_charsexp( rhs ) ) ;
+			return *this ;
+		}
+
+
+		string_proxy& operator=(SEXP rhs){
+			// TODO: check this is a CHARSXP
+			set( rhs ) ;
+			return *this ;
+		}
+
+		void import( const string_proxy& other){
+			parent = other.parent ;
+			index  = other.index ;
+		}
+
+        /**
+         * lhs use. Adds the content of the rhs proxy to the
+         * element this proxy refers to.
+         */
+        template <typename T>
+        string_proxy& operator+=(const T& rhs) ;
+
+		/**
+		 * rhs use. Retrieves the current value of the
+		 * element this proxy refers to.
+		 */
+		operator SEXP() const {
+			return get() ;
+		}
+
+		/**
+		 * rhs use. Retrieves the current value of the
+		 * element this proxy refers to and convert it to a
+		 * C string
+		 */
+		 operator /* const */ char*() const {
+		 	 return const_cast<char*>( CHAR(get()) );
+		 }
+
+		 // operator std::wstring() const {
+		 //     const char* st = CHAR(get()) ;
+		 //     return std::wstring( st, st+strlen(st) ) ;
+		 // }
+
+		/**
+		 * Prints the element this proxy refers to to an
+		 * output stream
+		 */
+		template <int RT>
+		friend std::ostream& operator<<(std::ostream& os, const string_proxy<RT>& proxy);
+
+		template <int RT>
+		friend std::string operator+( const std::string& x, const string_proxy<RT>& proxy);
+
+		void swap( string_proxy& other ){
+			Shield<SEXP> tmp( STRING_ELT(*parent, index)) ;
+			SET_STRING_ELT( *parent, index, STRING_ELT( *(other.parent), other.index) ) ;
+			SET_STRING_ELT( *(other.parent), other.index, tmp ) ;
+		}
+
+		VECTOR* parent;
+		R_xlen_t index ;
+		inline void move( R_xlen_t n ){ index += n ;}
+
+		inline SEXP get() const {
+			return STRING_ELT( *parent, index ) ;
+		}
+		template <typename T>
+		inline void set( const T& x ){
+			set( internal::make_charsexp(x) ) ;
+		}
+		inline void set(SEXP x){
+			SET_STRING_ELT( *parent, index, x ) ;
+		}
+
+		inline iterator begin() const { return CHAR( STRING_ELT( *parent, index ) ) ; }
+		inline iterator end() const { return begin() + size() ; }
+		inline R_xlen_t size() const { return strlen( begin() ) ; }
+		inline bool empty() const { return *begin() == '\0' ; }
+		inline reference operator[]( R_xlen_t n ){ return *( begin() + n ) ; }
+
+		template <typename UnaryOperator>
+		void transform( UnaryOperator op ){
+			buffer = begin() ;
+			std::transform( buffer.begin(), buffer.end(), buffer.begin(), op ) ;
+			set( buffer ) ;
+		}
+
+		template <typename OutputIterator, typename UnaryOperator>
+		void apply( OutputIterator target, UnaryOperator op){
+			std::transform( begin(), end(), target, op ) ;
+		}
+
+		template <typename UnaryOperator>
+		void apply( UnaryOperator op){
+			std::for_each( begin(), end(), op );
+		}
+
+		bool operator==( const char* other){
+			return strcmp( begin(), other ) == 0 ;
+		}
+		bool operator!=( const char* other){
+			return strcmp( begin(), other ) != 0 ;
+		}
+
+		bool operator==( const string_proxy& other){
+			return strcmp( begin(), other.begin() ) == 0 ;
+		}
+		bool operator!=( const string_proxy& other){
+			return strcmp( begin(), other.begin() ) != 0 ;
+		}
+
+                bool operator==( SEXP other ) const {
+                    return get() == other;
+                }
+
+                bool operator!=( SEXP other ) const {
+                    return get() != other;
+                }
+
+
+		private:
+			static std::string buffer ;
+
+	} ;
+
+	template <int RT>
+	bool operator<( const string_proxy<RT>& lhs, const string_proxy<RT>& rhs) {
+		return strcmp(
+			const_cast<char *>(lhs.begin() ),
+			const_cast<char *>(rhs.begin())
+			) < 0 ;
+	}
+
+	template <int RT>
+	bool operator>( const string_proxy<RT>& lhs, const string_proxy<RT>& rhs) {
+		return strcmp(
+			const_cast<char *>(lhs.begin() ),
+			const_cast<char *>(rhs.begin())
+			) > 0 ;
+	}
+
+	template <int RT>
+	bool operator>=( const string_proxy<RT>& lhs, const string_proxy<RT>& rhs) {
+		return strcmp(
+			const_cast<char *>(lhs.begin() ),
+			const_cast<char *>(rhs.begin())
+			) >= 0 ;
+	}
+
+	template <int RT>
+	bool operator<=( const string_proxy<RT>& lhs, const string_proxy<RT>& rhs) {
+		return strcmp(
+			const_cast<char *>(lhs.begin() ),
+			const_cast<char *>(rhs.begin())
+			) <= 0 ;
+	}
+
+	template<int RTYPE> std::string string_proxy<RTYPE>::buffer ;
+
+	inline std::ostream& operator<<(std::ostream& os, const string_proxy<STRSXP>& proxy) {
+	    os << static_cast<const char*>(proxy) ;
+	    return os;
+	}
+
+	inline std::string operator+( const std::string& x, const string_proxy<STRSXP>& y ){
+		return x + static_cast<const char*>(y) ;
+	}
+
+}
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/swap.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/swap.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/swap.h	(revision 2477)
@@ -0,0 +1,42 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// swap.h: Rcpp R/C++ interface class library --
+//
+// Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__vector__swap_h
+#define Rcpp__vector__swap_h
+
+namespace std {
+
+#undef RCPP_GENERATE_SWAP
+#define RCPP_GENERATE_SWAP(TYPE,RTYPE) 							\
+	template<> inline void swap< Rcpp::internal::TYPE<RTYPE> >(	\
+		Rcpp::internal::TYPE<RTYPE>& a ,							\
+		Rcpp::internal::TYPE<RTYPE>& b) { 							\
+			a.swap(b) ;												\
+		}
+
+RCPP_GENERATE_SWAP(generic_proxy,VECSXP)
+RCPP_GENERATE_SWAP(generic_proxy,EXPRSXP)
+RCPP_GENERATE_SWAP(string_proxy,STRSXP)
+#undef RCPP_GENERATE_SWAP
+
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/vector_from_string.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/vector_from_string.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/vector_from_string.h	(revision 2477)
@@ -0,0 +1,57 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+//
+// vector_from_string.h: Rcpp R/C++ interface class library --
+//
+// Copyright (C) 2010 - 2013 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__vector__forward_vector_from_string_h
+#define Rcpp__vector__forward_vector_from_string_h
+
+namespace Rcpp{
+namespace internal{
+
+    template <int RTYPE>
+    inline SEXP vector_from_string( const std::string& st ) {
+        Shield<SEXP> str(Rf_mkString(st.c_str()));
+        return r_cast<RTYPE>(str) ;
+    }
+
+    template <int RTYPE>
+    SEXP vector_from_string_expr( const std::string& code) {
+        ParseStatus status;
+        Shield<SEXP> expr( Rf_mkString( code.c_str() ) ) ;
+        Shield<SEXP> res( R_ParseVector(expr, -1, &status, R_NilValue) );
+        switch( status ){
+        case PARSE_OK:
+            return(res) ;
+            break;
+        default:
+            throw parse_error() ;
+        }
+        return R_NilValue ; /* -Wall */
+    }
+
+    template <>
+    inline SEXP vector_from_string<EXPRSXP>( const std::string& st ) {
+        return vector_from_string_expr<EXPRSXP>( st ) ;
+    }
+
+}
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/RangeIndexer.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/RangeIndexer.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/RangeIndexer.h	(revision 2477)
@@ -0,0 +1,104 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// RangeIndexer.h: Rcpp R/C++ interface class library --
+//
+// Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__vector__RangeIndexer_h
+#define Rcpp__vector__RangeIndexer_h
+
+#define UNROLL_LOOP(OP)                              \
+    typedef typename ::Rcpp::traits::Extractor<RTYPE,NA,T>::type EXT ; \
+    const EXT& input( x.get_ref() ) ;                   \
+    int __trip_count = (size_) >> 2;                 \
+    int i=0 ;                                        \
+    for ( ; __trip_count > 0 ; --__trip_count) {     \
+        start[i] OP input[i] ; i++ ;                 \
+        start[i] OP input[i] ; i++ ;                 \
+        start[i] OP input[i] ; i++ ;                 \
+        start[i] OP input[i] ; i++ ;                 \
+    }                                                \
+    switch (size_ - i){                              \
+      case 3:                                        \
+          start[i] OP input[i] ; i++ ;               \
+      case 2:                                        \
+          start[i] OP input[i] ; i++ ;               \
+      case 1:                                        \
+          start[i] OP input[i] ; i++ ;               \
+      case 0:                                        \
+      default:                                       \
+          return *this ;                             \
+    }
+
+
+namespace Rcpp{
+namespace internal{
+
+template <int RTYPE, bool NA, typename VECTOR>
+class RangeIndexer : public VectorBase<RTYPE, NA, RangeIndexer<RTYPE,NA,VECTOR> >  {
+public:
+	typedef typename VECTOR::Proxy Proxy ;
+	typedef typename VECTOR::iterator iterator ;
+
+	RangeIndexer( VECTOR& vec_, const Rcpp::Range& range_) :
+		start(vec_.begin() + range_.get_start() ), size_( range_.size() ) {}
+
+	template <bool NA_, typename T>
+	RangeIndexer& operator=( const Rcpp::VectorBase<RTYPE,NA_,T>& x){
+	    UNROLL_LOOP(=)
+	}
+
+	template <bool NA_, typename T>
+	RangeIndexer& operator+=( const Rcpp::VectorBase<RTYPE,NA_,T>& x){
+		 UNROLL_LOOP(+=)
+	}
+
+	template <bool NA_, typename T>
+	RangeIndexer& operator*=( const Rcpp::VectorBase<RTYPE,NA_,T>& x){
+		UNROLL_LOOP(*=)
+	}
+
+	template <bool NA_, typename T>
+	RangeIndexer& operator-=( const Rcpp::VectorBase<RTYPE,NA_,T>& x){
+		UNROLL_LOOP(-=)
+	}
+
+	template <bool NA_, typename T>
+	RangeIndexer& operator/=( const Rcpp::VectorBase<RTYPE,NA_,T>& x){
+		UNROLL_LOOP(/=)
+	}
+
+	inline Proxy operator[]( R_xlen_t i ) const {
+	    return start[i] ;
+	}
+
+	inline R_xlen_t size() const {
+		return size_ ;
+	}
+
+private:
+	iterator start ;
+	R_xlen_t size_ ;
+} ;
+
+}
+}
+
+#undef UNROLL_LOOP
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/DimNameProxy.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/DimNameProxy.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/DimNameProxy.h	(revision 2477)
@@ -0,0 +1,91 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// DimNameProxy.h: Rcpp R/C++ interface class library -- dimension name proxy
+//
+// Copyright (C) 2010 - 2014 Dirk Eddelbuettel, Romain Francois and Kevin Ushey
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp_vector_DimNameProxy_h
+#define Rcpp_vector_DimNameProxy_h
+
+namespace Rcpp{
+namespace internal{
+
+    class DimNameProxy {
+
+    public:
+
+        DimNameProxy(SEXP data, int dim): data_(data), dim_(dim) {}
+        DimNameProxy(DimNameProxy const& other):
+            data_(other.data_), dim_(other.dim_) {}
+            
+        inline DimNameProxy& assign(SEXP other) {
+            if (Rf_length(other) == 0)
+            {
+                Rf_setAttrib(data_, R_DimNamesSymbol, R_NilValue);
+            } else {
+                SEXP dims = Rf_getAttrib(data_, R_DimSymbol);
+                if (INTEGER(dims)[dim_] != Rf_length(other)) {
+                    stop("dimension extent is '%d' while length of names is '%d'", INTEGER(dims)[dim_], Rf_length(other));
+                }
+
+                SEXP dimnames = Rf_getAttrib(data_, R_DimNamesSymbol);
+                if (Rf_isNull(dimnames)) {
+                    Shield<SEXP> new_dimnames(Rf_allocVector(VECSXP, Rf_length(dims)));
+                    SET_VECTOR_ELT(new_dimnames, dim_, other);
+                    Rf_setAttrib(data_, R_DimNamesSymbol, new_dimnames);
+                } else {
+                    SET_VECTOR_ELT(dimnames, dim_, other);
+                }
+            }
+            return *this;
+        }
+
+        inline DimNameProxy& operator=(SEXP other) {
+            return assign(other);
+        }
+        
+        inline DimNameProxy& operator=(const DimNameProxy& other) {
+            return assign(SEXP(other));
+        }
+
+        inline operator SEXP() const {
+            SEXP dimnames = Rf_getAttrib(data_, R_DimNamesSymbol);
+            return Rf_isNull(dimnames) ? (R_NilValue) : (VECTOR_ELT(dimnames, dim_));
+        }
+
+        template <typename T>
+        inline operator T() const {
+            SEXP dimnames = Rf_getAttrib(data_, R_DimNamesSymbol);
+            if (Rf_isNull(dimnames)) {
+                return T();
+            } else {
+                return T(VECTOR_ELT(dimnames, dim_));
+            }
+        }
+
+    private:
+
+        SEXP data_;
+        int dim_;
+    };
+
+}
+
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/generic_proxy.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/generic_proxy.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/generic_proxy.h	(revision 2477)
@@ -0,0 +1,94 @@
+// generic_proxy.h: Rcpp R/C++ interface class library --
+//
+// Copyright (C) 2010 - 2013 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__vector__generic_proxy_h
+#define Rcpp__vector__generic_proxy_h
+
+namespace Rcpp{
+namespace internal{
+
+	template <int RTYPE>
+	class generic_proxy : public GenericProxy< generic_proxy<RTYPE> > {
+		public:
+			typedef typename ::Rcpp::Vector<RTYPE> VECTOR ;
+
+			generic_proxy(): parent(0), index(-1){}
+
+			generic_proxy( const generic_proxy& other ) :
+				parent(other.parent), index(other.index){} ;
+
+			generic_proxy( VECTOR& v, R_xlen_t i ) : parent(&v), index(i){} ;
+
+			generic_proxy& operator=(SEXP rhs) {
+				set(rhs) ;
+				return *this ;
+			}
+
+			generic_proxy& operator=(const generic_proxy& rhs) {
+				set(rhs.get());
+				return *this ;
+			}
+
+			template <typename T>
+			generic_proxy& operator=( const T& rhs){
+				set(wrap(rhs)) ;
+				return *this;
+			}
+
+			operator SEXP() const {
+			    return get() ;
+			}
+
+			template <typename U> operator U() const {
+				return ::Rcpp::as<U>(get()) ;
+			}
+
+			// helping the compiler (not sure why it can't help itself)
+			operator bool() const { return ::Rcpp::as<bool>(get()) ; }
+			operator int() const { return ::Rcpp::as<int>(get()) ; }
+
+			void swap(generic_proxy& other){
+				Shield<SEXP> tmp(get()) ;
+				set( other.get() ) ;
+				other.set(tmp) ;
+			}
+
+			VECTOR* parent;
+			R_xlen_t index ;
+			inline void move(R_xlen_t n) { index += n ; }
+
+			void import( const generic_proxy& other){
+				parent = other.parent ;
+				index  = other.index ;
+			}
+
+		private:
+			inline void set(SEXP x) {
+			    SET_VECTOR_ELT( *parent, index, x ) ;
+			}
+			inline SEXP get() const {
+			    return VECTOR_ELT(*parent, index );
+			}
+
+	}  ;
+
+}
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/const_string_proxy.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/const_string_proxy.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/const_string_proxy.h	(revision 2477)
@@ -0,0 +1,179 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// const_string_proxy.h: Rcpp R/C++ interface class library --
+//
+// Copyright (C) 2013 Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__vector__const_string_proxy_h
+#define Rcpp__vector__const_string_proxy_h
+
+namespace Rcpp{
+namespace internal{
+
+	template<int RTYPE> class const_string_proxy {
+	public:
+
+		typedef typename ::Rcpp::Vector<RTYPE> VECTOR ;
+		typedef const char* iterator ;
+		typedef const char& reference ;
+
+		const_string_proxy() : parent(0), index(-1){};
+
+		/**
+		 * Creates a proxy
+		 *
+		 * @param v reference to the associated character vector
+		 * @param index index
+		 */
+		const_string_proxy( const VECTOR& v, R_xlen_t index_ ) : parent(&v), index(index_){}
+
+        const_string_proxy(SEXP x): parent(0), index(0) {
+            Vector<RTYPE> tmp(x);
+            parent = &tmp;
+        }
+
+		const_string_proxy( const const_string_proxy& other ) :
+			parent(other.parent), index(other.index){} ;
+
+		void import( const const_string_proxy& other){
+			parent = other.parent ;
+			index  = other.index ;
+		}
+
+        /**
+		 * rhs use. Retrieves the current value of the
+		 * element this proxy refers to.
+		 */
+		operator SEXP() const {
+			return get() ;
+		}
+
+		/**
+		 * rhs use. Retrieves the current value of the
+		 * element this proxy refers to and convert it to a
+		 * C string
+		 */
+		 operator /* const */ char*() const {
+		 	 return const_cast<char*>( CHAR(get()) );
+		 }
+
+		/**
+		 * Prints the element this proxy refers to to an
+		 * output stream
+		 */
+		template <int RT>
+		friend std::ostream& operator<<(std::ostream& os, const const_string_proxy<RT>& proxy);
+
+		template <int RT>
+		friend std::string operator+( const std::string& x, const const_string_proxy<RT>& proxy);
+
+		const VECTOR* parent;
+		R_xlen_t index ;
+		inline void move( R_xlen_t n ){ index += n ;}
+
+		inline SEXP get() const {
+			return STRING_ELT( *parent, index ) ;
+		}
+
+		inline iterator begin() const { return CHAR( STRING_ELT( *parent, index ) ) ; }
+		inline iterator end() const { return begin() + size() ; }
+		inline R_xlen_t size() const { return strlen( begin() ) ; }
+		inline bool empty() const { return *begin() == '\0' ; }
+		inline reference operator[]( R_xlen_t n ){ return *( begin() + n ) ; }
+
+		bool operator==( const char* other){
+			return strcmp( begin(), other ) == 0 ;
+		}
+		bool operator!=( const char* other){
+			return strcmp( begin(), other ) != 0 ;
+		}
+
+		bool operator==( const const_string_proxy& other){
+			return strcmp( begin(), other.begin() ) == 0 ;
+		}
+		bool operator!=( const const_string_proxy& other){
+			return strcmp( begin(), other.begin() ) != 0 ;
+		}
+
+                bool operator==( SEXP other ) const {
+                    return get() == other;
+                }
+
+                bool operator!=( SEXP other ) const {
+                    return get() != other;
+                }
+
+		private:
+			static std::string buffer ;
+
+	} ;
+
+	template <int RT>
+	bool operator<( const const_string_proxy<RT>& lhs, const const_string_proxy<RT>& rhs) {
+		return strcmp(
+			const_cast<char *>(lhs.begin() ),
+			const_cast<char *>(rhs.begin())
+			) < 0 ;
+	}
+
+	template <int RT>
+	bool operator>( const const_string_proxy<RT>& lhs, const const_string_proxy<RT>& rhs) {
+		return strcmp(
+			const_cast<char *>(lhs.begin() ),
+			const_cast<char *>(rhs.begin())
+			) > 0 ;
+	}
+
+	template <int RT>
+	bool operator>=( const const_string_proxy<RT>& lhs, const const_string_proxy<RT>& rhs) {
+		return strcmp(
+			const_cast<char *>(lhs.begin() ),
+			const_cast<char *>(rhs.begin())
+			) >= 0 ;
+	}
+
+	template <int RT>
+	bool operator<=( const const_string_proxy<RT>& lhs, const const_string_proxy<RT>& rhs) {
+		return strcmp(
+			const_cast<char *>(lhs.begin() ),
+			const_cast<char *>(rhs.begin())
+			) <= 0 ;
+	}
+
+	template<int RTYPE> std::string const_string_proxy<RTYPE>::buffer ;
+
+	inline std::ostream& operator<<(std::ostream& os, const const_string_proxy<STRSXP>& proxy) {
+	    os << static_cast<const char*>(proxy) ;
+	    return os;
+	}
+
+	inline std::string operator+( const std::string& x, const const_string_proxy<STRSXP>& y ){
+		return x + static_cast<const char*>(y) ;
+	}
+
+
+	template <int RTYPE>
+	string_proxy<RTYPE>& string_proxy<RTYPE>::operator=(const const_string_proxy<RTYPE>& other){
+       set( other.get() ) ;
+       return *this ;
+    }
+
+}
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/SubMatrix.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/SubMatrix.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/SubMatrix.h	(revision 2477)
@@ -0,0 +1,107 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// SubMatrix.h: Rcpp R/C++ interface class library -- sub matrices
+//
+// Copyright (C) 2010 - 2013 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__vector__SubMatrix_h
+#define Rcpp__vector__SubMatrix_h
+
+namespace Rcpp{
+
+template <int RTYPE>
+class SubMatrix : public Rcpp::MatrixBase< RTYPE, true, SubMatrix<RTYPE> > {
+public:
+    typedef Matrix<RTYPE> MATRIX ;
+    typedef typename Vector<RTYPE>::iterator vec_iterator ;
+    typedef typename MATRIX::Proxy Proxy ;
+
+    SubMatrix( MATRIX& m_, const Range& row_range_, const Range& col_range_ ) :
+        m(m_),
+        iter( static_cast< Vector<RTYPE>& >(m_).begin() + row_range_.get_start() + col_range_.get_start() * m_.nrow() ),
+        m_nr( m.nrow() ),
+        nc( col_range_.size() ),
+        nr( row_range_.size() )
+    {}
+
+    inline R_xlen_t size() const { return ((R_xlen_t)ncol()) * nrow() ; }
+    inline int ncol() const { return nc ; }
+    inline int nrow() const { return nr ; }
+
+    inline Proxy operator()(int i, int j) const {
+        return iter[ i + j*m_nr ] ;
+    }
+
+    inline vec_iterator column_iterator( int j ) const { return iter + j*m_nr ; }
+
+private:
+    MATRIX& m ;
+    vec_iterator iter ;
+    int m_nr, nc, nr ;
+} ;
+
+template <int RTYPE, template <class> class StoragePolicy >
+Matrix<RTYPE,StoragePolicy>::Matrix( const SubMatrix<RTYPE>& sub ) : VECTOR( Rf_allocMatrix( RTYPE, sub.nrow(), sub.ncol() )), nrows(sub.nrow()) {
+    int nc = sub.ncol() ;
+    iterator start = VECTOR::begin() ;
+	iterator rhs_it ;
+	for( int j=0; j<nc; j++){
+	    rhs_it = sub.column_iterator(j) ;
+	    for( int i=0; i<nrows; i++, ++start){
+	        *start = rhs_it[i] ;
+	    }
+	}
+}
+
+template <int RTYPE, template <class> class StoragePolicy >
+Matrix<RTYPE,StoragePolicy>& Matrix<RTYPE,StoragePolicy>::operator=( const SubMatrix<RTYPE>& sub ){
+    int nc = sub.ncol(), nr = sub.nrow() ;
+    if( nc != nrow() || nr != ncol() ){
+        nrows = nr ;
+        VECTOR::set__( Rf_allocMatrix( RTYPE, nr, nc ) ) ;
+	}
+	iterator start = VECTOR::begin() ;
+	iterator rhs_it ;
+	for( int j=0; j<nc; j++){
+	    rhs_it = sub.column_iterator(j) ;
+	    for( int i=0; i<nrows; i++, ++start){
+	        *start = rhs_it[i] ;
+	    }
+	}
+	return *this ;
+}
+
+#undef RCPP_WRAP_SUBMATRIX
+#define RCPP_WRAP_SUBMATRIX(RTYPE)                \
+template<> inline SEXP wrap< SubMatrix<RTYPE> >(  \
+    const SubMatrix<RTYPE>& object                \
+    ) {                                           \
+        return Matrix<RTYPE>( object ) ;          \
+    }
+RCPP_WRAP_SUBMATRIX(REALSXP)
+RCPP_WRAP_SUBMATRIX(INTSXP)
+RCPP_WRAP_SUBMATRIX(LGLSXP)
+RCPP_WRAP_SUBMATRIX(RAWSXP)
+// RCPP_WRAP_SUBMATRIX(STRSXP)
+// RCPP_WRAP_SUBMATRIX(VECSXP)
+// RCPP_WRAP_SUBMATRIX(EXPRSXP)
+#undef RCPP_WRAP_SUBMATRIX
+
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/Subsetter.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/Subsetter.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/Subsetter.h	(revision 2477)
@@ -0,0 +1,259 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+//
+// Subsetter.h: Rcpp R/C++ interface class library -- vector subsetting
+//
+// Copyright (C) 2014  Dirk Eddelbuettel, Romain Francois and Kevin Ushey
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp_vector_Subsetter_h_
+#define Rcpp_vector_Subsetter_h_
+
+namespace Rcpp {
+
+template <
+    int RTYPE, template <class> class StoragePolicy,
+    int RHS_RTYPE, bool RHS_NA, typename RHS_T
+>
+class SubsetProxy {
+
+    typedef Vector<RTYPE, StoragePolicy> LHS_t;
+    typedef Vector<RHS_RTYPE, StoragePolicy> RHS_t;
+
+public:
+
+    SubsetProxy(LHS_t& lhs_, const RHS_t& rhs_):
+        lhs(lhs_), rhs(rhs_), lhs_n(lhs.size()), rhs_n(rhs.size()) {
+        get_indices( traits::identity< traits::int2type<RHS_RTYPE> >() );
+    }
+
+    SubsetProxy(const SubsetProxy& other):
+        lhs(other.lhs),
+        rhs(other.rhs),
+        lhs_n(other.lhs_n),
+        rhs_n(other.rhs_n),
+        indices(other.indices),
+        indices_n(other.indices_n) {}
+
+    // Enable e.g. x[y] = z
+    template <int OtherRTYPE, template <class> class OtherStoragePolicy>
+    SubsetProxy& operator=(const Vector<OtherRTYPE, OtherStoragePolicy>& other) {
+        int n = other.size();
+
+        if (n == 1) {
+            for (int i=0; i < indices_n; ++i) {
+                lhs[ indices[i] ] = other[0];
+            }
+        } else if (n == indices_n) {
+            for (int i=0; i < n; ++i) {
+                lhs[ indices[i] ] = other[i];
+            }
+        } else {
+            stop("index error");
+        }
+        return *this;
+    }  
+
+    // Enable e.g. x[y] = 1;
+    // TODO: std::enable_if<primitive> with C++11
+    SubsetProxy& operator=(double other) {
+        for (int i=0; i < indices_n; ++i) {
+            lhs[ indices[i] ] = other;
+        }
+        return *this;
+    }
+
+    SubsetProxy& operator=(int other) {
+        for (int i=0; i < indices_n; ++i) {
+            lhs[ indices[i] ] = other;
+        }
+        return *this;
+    }
+
+    SubsetProxy& operator=(const char* other) {
+        for (int i=0; i < indices_n; ++i) {
+            lhs[ indices[i] ] = other;
+        }
+        return *this;
+    }
+
+    SubsetProxy& operator=(bool other) {
+        for (int i=0; i < indices_n; ++i) {
+            lhs[ indices[i] ] = other;
+        }
+        return *this;
+    }
+
+    template <int RTYPE_OTHER, template <class> class StoragePolicyOther,int RHS_RTYPE_OTHER, bool RHS_NA_OTHER, typename RHS_T_OTHER>
+    SubsetProxy& operator=(const SubsetProxy<RTYPE_OTHER, StoragePolicyOther, RHS_RTYPE_OTHER, RHS_NA_OTHER, RHS_T_OTHER>& other) {
+
+        Vector<RTYPE_OTHER, StoragePolicyOther> other_vec = other;
+        *this = other_vec;
+        return *this;
+    }
+
+    SubsetProxy& operator=(const SubsetProxy& other) {
+        if (other.indices_n == 1) {
+            for (int i=0; i < indices_n; ++i) {
+                lhs[ indices[i] ] = other.lhs[other.indices[0]];
+            }
+        }
+        else if (indices_n == other.indices_n) {
+            for (int i=0; i < indices_n; ++i)
+                lhs[ indices[i] ] = other.lhs[other.indices[i]];
+            }
+        else {
+            stop("index error");
+        }
+        return *this;
+    }
+
+    operator Vector<RTYPE, StoragePolicy>() const {
+        return get_vec();
+    }
+
+    operator SEXP() const {
+        return wrap( get_vec() );
+    }
+
+private:
+
+    #ifndef RCPP_NO_BOUNDS_CHECK
+    void check_indices(int* x, int n, int size) {
+        for (int i=0; i < n; ++i) {
+            if (x[i] < 0 or x[i] >= size) {
+                stop("index error");
+            }
+        }
+    }
+    #else
+    void check_indices(int* x, int n, int size) {}
+    #endif
+
+    void get_indices( traits::identity< traits::int2type<INTSXP> > t ) {
+        indices.reserve(rhs_n);
+        int* ptr = INTEGER(rhs);
+        check_indices(ptr, rhs_n, lhs_n);
+        for (int i=0; i < rhs_n; ++i) {
+            indices.push_back( rhs[i] );
+        }
+        indices_n = rhs_n;        
+    }
+
+    void get_indices( traits::identity< traits::int2type<REALSXP> > t ) {
+        indices.reserve(rhs_n);
+        Vector<INTSXP, StoragePolicy> tmp =
+            as< Vector<INTSXP, StoragePolicy> >(rhs);
+        int* ptr = INTEGER(tmp);
+        check_indices(ptr, rhs_n, lhs_n);
+        for (int i=0; i < rhs_n; ++i) {
+            indices.push_back( tmp[i] );
+        }
+        indices_n = rhs_n;
+    }
+
+    void get_indices( traits::identity< traits::int2type<STRSXP> > t ) {
+        indices.reserve(rhs_n);
+        SEXP names = Rf_getAttrib(lhs, R_NamesSymbol);
+        if (Rf_isNull(names)) stop("names is null");
+        SEXP* namesPtr = STRING_PTR(names);
+        SEXP* rhsPtr = STRING_PTR(rhs);
+        for (int i = 0; i < rhs_n; ++i) {
+            SEXP* match = std::find(namesPtr, namesPtr + lhs_n, *(rhsPtr + i));
+            if (match == namesPtr + lhs_n)
+                stop("not found");
+            indices.push_back(match - namesPtr);
+        }
+        indices_n = indices.size();
+    }
+
+    void get_indices( traits::identity< traits::int2type<LGLSXP> > t ) {
+        indices.reserve(rhs_n);
+        if (lhs_n != rhs_n) {
+            stop("logical subsetting requires vectors of identical size");
+        }
+        int* ptr = LOGICAL(rhs);
+        for (int i=0; i < rhs_n; ++i) {
+            if (ptr[i] == NA_INTEGER) {
+                stop("can't subset using a logical vector with NAs");
+            }
+            if (ptr[i]) {
+                indices.push_back(i);
+            }
+        }
+        indices_n = indices.size();
+    }
+
+    Vector<RTYPE, StoragePolicy> get_vec() const {
+        Vector<RTYPE, StoragePolicy> output = no_init(indices_n);
+        for (int i=0; i < indices_n; ++i) {
+            output[i] = lhs[ indices[i] ];
+        }
+        SEXP names = Rf_getAttrib(lhs, R_NamesSymbol);
+        if (!Rf_isNull(names)) {
+            Shield<SEXP> out_names( Rf_allocVector(STRSXP, indices_n) );
+            for (int i=0; i < indices_n; ++i) {
+                SET_STRING_ELT(out_names, i, STRING_ELT(names, indices[i]));
+            }
+            Rf_setAttrib(output, R_NamesSymbol, out_names);
+        }
+        Rf_copyMostAttrib(lhs, output);
+        return output;
+    }
+
+    LHS_t& lhs;
+    const RHS_t& rhs;
+    int lhs_n;
+    int rhs_n;
+
+    std::vector<int> indices;
+
+    // because of the above, we keep track of the size
+    int indices_n;
+
+public:
+
+#define RCPP_GENERATE_SUBSET_PROXY_OPERATOR(__OPERATOR__)                             \
+    template <int RTYPE_OTHER, template <class> class StoragePolicyOther,             \
+              int RHS_RTYPE_OTHER, bool RHS_NA_OTHER, typename RHS_T_OTHER>           \
+    Vector<RTYPE, StoragePolicy> operator __OPERATOR__ (                              \
+        const SubsetProxy<RTYPE_OTHER, StoragePolicyOther, RHS_RTYPE_OTHER,           \
+                          RHS_NA_OTHER, RHS_T_OTHER>& other) {                        \
+        Vector<RTYPE, StoragePolicy> result(indices_n);                               \
+        if (other.indices_n == 1) {                                                   \
+            for (int i = 0; i < indices_n; ++i)                                       \
+                result[i] = lhs[indices[i]] __OPERATOR__ other.lhs[other.indices[0]]; \
+        } else if (indices_n == other.indices_n) {                                    \
+            for (int i = 0; i < indices_n; ++i)                                       \
+                result[i] = lhs[indices[i]] __OPERATOR__ other.lhs[other.indices[i]]; \
+        } else {                                                                      \
+            stop("index error");                                                      \
+        }                                                                             \
+        return result;                                                                \
+    }
+
+RCPP_GENERATE_SUBSET_PROXY_OPERATOR(+)
+RCPP_GENERATE_SUBSET_PROXY_OPERATOR(-)
+RCPP_GENERATE_SUBSET_PROXY_OPERATOR(*)
+RCPP_GENERATE_SUBSET_PROXY_OPERATOR(/)
+
+#undef RCPP_GENERATE_SUBSET_PROXY_OPERATOR
+
+};
+
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/proxy.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/proxy.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/proxy.h	(revision 2477)
@@ -0,0 +1,263 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// proxy.h: Rcpp R/C++ interface class library -- proxies
+//
+// Copyright (C) 2010 - 2014  Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__vector__proxy_h
+#define Rcpp__vector__proxy_h
+
+namespace Rcpp{
+namespace internal{
+
+	template <int RTYPE> class simple_name_proxy {
+	public:
+		typedef ::Rcpp::Vector<RTYPE> VECTOR ;
+		typedef typename ::Rcpp::traits::storage_type<RTYPE>::type CTYPE ;
+		simple_name_proxy( VECTOR& v, const std::string& name_) :
+			parent(v), name(name_){} ;
+		simple_name_proxy( const simple_name_proxy& other ) :
+			parent(other.parent), name(other.name){} ;
+		~simple_name_proxy() {} ;
+
+		simple_name_proxy& operator=( CTYPE rhs ){
+			set( rhs ) ;
+			return *this ;
+		}
+		simple_name_proxy& operator=( const simple_name_proxy& other){
+			set( other.get() ) ;
+			return *this ;
+		}
+
+		template <typename T>
+		simple_name_proxy& operator=( const T& rhs ){
+			set( caster<T,CTYPE>(rhs) ) ;
+			return *this ;
+		}
+
+		// TODO: other operators +=, -=, ...
+
+		operator CTYPE() const {
+			 return get() ;
+		}
+
+		// this helps wrap, for example : wrap( x["foo"] )
+		operator SEXP() const {
+			return ::Rcpp::wrap(get()) ;
+		}
+
+	private:
+		VECTOR& parent ;
+		std::string name;
+		void set( CTYPE rhs ){
+			R_xlen_t index = 0 ;
+			try{
+				index = parent.offset(name) ;
+				parent[ index ] = rhs ;
+			} catch( const index_out_of_bounds& ex ){
+				parent.push_back( rhs, name );
+			}
+		}
+		CTYPE get() const {
+			return parent[ parent.offset(name) ];
+		}
+	} ;
+
+	template <int RTYPE>
+	class string_name_proxy{
+	public:
+		typedef typename ::Rcpp::Vector<RTYPE> VECTOR ;
+		typedef const char* iterator ;
+		typedef const char& reference ;
+
+		string_name_proxy( VECTOR& v, const std::string& name_) :
+			parent(v), name(name_){} ;
+		string_name_proxy( const string_name_proxy& other ) :
+			parent(other.parent), name(other.name){} ;
+		~string_name_proxy(){} ;
+
+		string_name_proxy& operator=( const std::string& rhs ){
+			set( rhs ) ;
+			return *this ;
+		}
+		string_name_proxy& operator=( const string_name_proxy& other){
+			set( other.get() ) ;
+			return *this ;
+		}
+
+		operator char* (){
+			 return get() ;
+		}
+
+		operator SEXP(){
+			return ::Rf_mkString(get()) ;
+		}
+
+		inline iterator begin() { return get() ; }
+		inline iterator end(){ return begin() + size() ; }
+		inline reference operator[]( R_xlen_t i ){ return *( get() + i ) ; }
+		inline R_xlen_t size(){ return strlen( get() ) ; }
+
+	private:
+		VECTOR& parent ;
+		std::string name;
+		void set( const std::string& rhs ){
+			R_xlen_t index = 0 ;
+			try{
+				index = parent.offset(name) ;
+				parent[ index ] = rhs ;
+			} catch( const index_out_of_bounds& ex ){
+				parent.push_back( rhs, name );
+			}
+		}
+		char* get(){
+			return parent[ parent.offset(name) ];
+		}
+
+	} ;
+
+	template <int RTYPE> class generic_name_proxy {
+	public:
+		typedef ::Rcpp::Vector<RTYPE> VECTOR ;
+		generic_name_proxy( VECTOR& v, const std::string& name_) :
+			parent(v), name(name_){}
+		generic_name_proxy( const generic_name_proxy& other ) :
+			parent(other.parent), name(other.name){}
+		~generic_name_proxy(){} ;
+
+		generic_name_proxy& operator=( SEXP rhs ){
+			set( rhs ) ;
+			return *this ;
+		}
+		generic_name_proxy& operator=( const generic_name_proxy& other){
+			set( other.get() ) ;
+			return *this ;
+		}
+
+		template <typename T>
+		generic_name_proxy& operator=( const T& rhs ){
+			set( ::Rcpp::wrap(rhs) ) ;
+			return *this ;
+		}
+
+		// TODO: other operators +=, -=, ...
+
+		operator SEXP() const {
+			 return get() ;
+		}
+
+		template <typename T>
+		operator T() const {
+			#if RCPP_DEBUG_LEVEL > 0
+			SEXP res = get() ;
+			RCPP_DEBUG_1( "generic_name_proxy::get() = <%p> ", res ) ;
+			return ::Rcpp::as<T>( res ) ;
+			#else
+			return ::Rcpp::as<T>( get() ) ;
+			#endif
+		}
+
+	private:
+		VECTOR& parent ;
+		std::string name;
+		void set( SEXP rhs ){
+			R_xlen_t index = 0 ;
+			try{
+				index = parent.offset(name) ;
+				parent[ index ] = rhs ;
+			} catch( const index_out_of_bounds& ex ){
+				parent.push_back( rhs, name );
+			}
+		}
+		SEXP get() const {
+			return parent[ parent.offset(name) ];
+		}
+	} ;
+}
+
+namespace traits {
+
+	template <int RTYPE>
+	struct r_vector_name_proxy{
+		typedef typename ::Rcpp::internal::simple_name_proxy<RTYPE> type ;
+	} ;
+	template<> struct r_vector_name_proxy<STRSXP>{
+		typedef ::Rcpp::internal::string_name_proxy<STRSXP> type ;
+	} ;
+	template<> struct r_vector_name_proxy<VECSXP>{
+		typedef ::Rcpp::internal::generic_name_proxy<VECSXP> type ;
+	} ;
+	template<> struct r_vector_name_proxy<EXPRSXP>{
+		typedef ::Rcpp::internal::generic_name_proxy<EXPRSXP> type ;
+	} ;
+
+	template <int RTYPE>
+	struct r_vector_proxy{
+		typedef typename storage_type<RTYPE>::type& type ;
+	} ;
+	template<> struct r_vector_proxy<STRSXP> {
+		typedef ::Rcpp::internal::string_proxy<STRSXP> type ;
+	} ;
+	template<> struct r_vector_proxy<EXPRSXP> {
+		typedef ::Rcpp::internal::generic_proxy<EXPRSXP> type ;
+	} ;
+	template<> struct r_vector_proxy<VECSXP> {
+		typedef ::Rcpp::internal::generic_proxy<VECSXP> type ;
+	} ;
+
+	template <int RTYPE>
+	struct r_vector_const_proxy{
+		typedef const typename storage_type<RTYPE>::type& type ;
+	} ;
+	template<> struct r_vector_const_proxy<STRSXP> {
+		typedef ::Rcpp::internal::const_string_proxy<STRSXP> type ;
+	} ;
+	template<> struct r_vector_const_proxy<VECSXP> {
+		typedef ::Rcpp::internal::const_generic_proxy<VECSXP> type ;
+	} ;
+	template<> struct r_vector_const_proxy<EXPRSXP> {
+		typedef ::Rcpp::internal::const_generic_proxy<EXPRSXP> type ;
+	} ;
+
+	template <int RTYPE>
+	struct r_vector_iterator {
+		typedef typename storage_type<RTYPE>::type* type ;
+	};
+	template <int RTYPE>
+	struct r_vector_const_iterator {
+		typedef const typename storage_type<RTYPE>::type* type ;
+	};
+
+	template <int RTYPE> struct proxy_based_iterator{
+		typedef ::Rcpp::internal::Proxy_Iterator< typename r_vector_proxy<RTYPE>::type > type ;
+	} ;
+	template<> struct r_vector_iterator<VECSXP> : proxy_based_iterator<VECSXP>{} ;
+	template<> struct r_vector_iterator<EXPRSXP> : proxy_based_iterator<EXPRSXP>{} ;
+	template<> struct r_vector_iterator<STRSXP> : proxy_based_iterator<STRSXP>{} ;
+	
+	template <int RTYPE> struct proxy_based_const_iterator{
+		typedef ::Rcpp::internal::Proxy_Iterator< typename r_vector_const_proxy<RTYPE>::type > type ;
+	} ;
+	template<> struct r_vector_const_iterator<VECSXP> : proxy_based_const_iterator<VECSXP>{} ;
+	template<> struct r_vector_const_iterator<EXPRSXP> : proxy_based_const_iterator<EXPRSXP>{} ;
+	template<> struct r_vector_const_iterator<STRSXP> : proxy_based_const_iterator<STRSXP>{} ;
+
+}  // traits
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/MatrixColumn.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/MatrixColumn.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/MatrixColumn.h	(revision 2477)
@@ -0,0 +1,148 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+//
+// MatrixColumn.h: Rcpp R/C++ interface class library -- matrices column
+//
+// Copyright (C) 2010 - 2013 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__vector__MatrixColumn_h
+#define Rcpp__vector__MatrixColumn_h
+
+namespace Rcpp{
+
+template <int RTYPE>
+class MatrixColumn : public VectorBase<RTYPE,true,MatrixColumn<RTYPE> > {
+public:
+    typedef Matrix<RTYPE> MATRIX ;
+    typedef typename MATRIX::Proxy Proxy ;
+    typedef typename MATRIX::const_Proxy const_Proxy ;
+    typedef typename MATRIX::value_type value_type ;
+    typedef typename MATRIX::iterator iterator ;
+    typedef typename MATRIX::const_iterator const_iterator ;
+
+    MatrixColumn( MATRIX& parent, int i ) :
+        n(parent.nrow()),
+        start(parent.begin() + static_cast<R_xlen_t>(i) * n ),
+        const_start(const_cast<const MATRIX&>(parent).begin() + static_cast<R_xlen_t>(i) * n)
+    {
+        if( i < 0 || i >= parent.ncol() ) throw index_out_of_bounds() ;
+    }
+
+    MatrixColumn( const MATRIX& parent, int i ) :
+        n(parent.nrow()),
+        start( const_cast<MATRIX&>(parent).begin() + static_cast<R_xlen_t>(i) * n ),
+        const_start(parent.begin() + static_cast<R_xlen_t>(i) * n)
+    {
+        if( i < 0 || i >= parent.ncol() ) throw index_out_of_bounds() ;
+    }
+
+    MatrixColumn( const MatrixColumn& other ) :
+        n(other.n),
+        start(other.start),
+        const_start(other.const_start) {}
+
+    template <int RT, bool NA, typename T>
+    MatrixColumn& operator=( const Rcpp::VectorBase<RT,NA,T>& rhs ){
+        const T& ref = rhs.get_ref() ;
+        RCPP_LOOP_UNROLL(start,ref)
+        return *this ;
+    }
+
+    MatrixColumn& operator=( const MatrixColumn& rhs ){
+        iterator rhs_start = rhs.start ;
+        RCPP_LOOP_UNROLL(start,rhs_start)
+        return *this ;
+    }
+
+    inline Proxy operator[]( int i ){
+        return start[i] ;
+    }
+
+    inline const_Proxy operator[]( int i ) const {
+        return const_start[i] ;
+    }
+
+    inline iterator begin(){
+        return start ;
+    }
+
+    inline const_iterator begin() const {
+        return const_start ;
+    }
+
+    inline iterator end(){
+        return start + n ;
+    }
+
+    inline const_iterator end() const {
+        return const_start + n ;
+    }
+
+    inline int size() const {
+        return n ;
+    }
+
+private:
+    const int n ;
+    iterator start ;
+    const_iterator const_start ;
+
+} ;
+
+template <int RTYPE>
+class ConstMatrixColumn : public VectorBase<RTYPE,true,ConstMatrixColumn<RTYPE> > {
+public:
+    typedef Matrix<RTYPE> MATRIX ;
+    typedef typename MATRIX::const_Proxy const_Proxy ;
+    typedef typename MATRIX::value_type value_type ;
+    typedef typename MATRIX::const_iterator const_iterator ;
+
+    ConstMatrixColumn( const MATRIX& parent, int i ) :
+        n(parent.nrow()),
+        const_start(parent.begin() + i *n)
+    {
+        if( i < 0 || i >= parent.ncol() ) throw index_out_of_bounds() ;
+    }
+
+    ConstMatrixColumn( const ConstMatrixColumn& other ) :
+        n(other.n),
+        const_start(other.const_start) {}
+        
+    inline const_Proxy operator[]( int i ) const {
+        return const_start[i] ;
+    }
+
+    inline const_iterator begin() const {
+        return const_start ;
+    }
+
+    inline const_iterator end() const {
+        return const_start + n ;
+    }
+
+    inline int size() const {
+        return n ;
+    }
+
+private:
+    const int n ;
+    const_iterator const_start ;
+
+} ;
+
+}
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/const_generic_proxy.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/const_generic_proxy.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/const_generic_proxy.h	(revision 2477)
@@ -0,0 +1,66 @@
+// const_generic_proxy.h: Rcpp R/C++ interface class library --
+//
+// Copyright (C) 2013 Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__vector__const_generic_proxy_h
+#define Rcpp__vector__const_generic_proxy_h
+
+namespace Rcpp{
+namespace internal{
+
+    template <int RTYPE>
+	class const_generic_proxy : public GenericProxy< const_generic_proxy<RTYPE> > {
+		public:
+			typedef typename ::Rcpp::Vector<RTYPE> VECTOR ;
+
+			const_generic_proxy(): parent(0), index(-1){}
+
+			const_generic_proxy( const const_generic_proxy& other ) :
+				parent(other.parent), index(other.index){} ;
+
+			const_generic_proxy( const VECTOR& v, R_xlen_t i ) : parent(&v), index(i){} ;
+
+			operator SEXP() const {
+			    return get() ;
+			}
+
+			template <typename U> operator U() const {
+				return ::Rcpp::as<U>(get()) ;
+			}
+
+			// helping the compiler (not sure why it can't help itself)
+			operator bool() const { return ::Rcpp::as<bool>(get()) ; }
+			operator int() const { return ::Rcpp::as<int>(get()) ; }
+
+			inline void move(R_xlen_t n) { index += n ; }
+			
+			const VECTOR* parent;
+			R_xlen_t index ;
+
+		private:
+
+		    inline SEXP get() const {
+			    return VECTOR_ELT(*parent, index );
+			}
+
+	}  ;
+
+}
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/instantiation.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/instantiation.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/instantiation.h	(revision 2477)
@@ -0,0 +1,54 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// instantiation.h: Rcpp R/C++ interface class library --
+//
+// Copyright (C) 2010 - 2013 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__vector__instantiation_h
+#define Rcpp__vector__instantiation_h
+
+namespace Rcpp{
+
+    typedef Vector<CPLXSXP> ComplexVector ;
+    typedef Vector<INTSXP> IntegerVector ;
+    typedef Vector<LGLSXP> LogicalVector ;
+    typedef Vector<REALSXP> NumericVector ;
+    typedef Vector<REALSXP> DoubleVector ;
+    typedef Vector<RAWSXP> RawVector ;
+
+    typedef Vector<STRSXP> CharacterVector ;
+    typedef Vector<STRSXP> StringVector ;
+    typedef Vector<VECSXP> GenericVector ;
+    typedef Vector<VECSXP> List ;
+    typedef Vector<EXPRSXP> ExpressionVector ;
+
+    typedef Matrix<CPLXSXP> ComplexMatrix ;
+    typedef Matrix<INTSXP> IntegerMatrix ;
+    typedef Matrix<LGLSXP> LogicalMatrix ;
+    typedef Matrix<REALSXP> NumericMatrix ;
+    typedef Matrix<RAWSXP> RawMatrix ;
+
+    typedef Matrix<STRSXP> CharacterMatrix ;
+    typedef Matrix<STRSXP> StringMatrix ;
+    typedef Matrix<VECSXP> GenericMatrix ;
+    typedef Matrix<VECSXP> ListMatrix ;
+    typedef Matrix<EXPRSXP> ExpressionMatrix ;
+
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/00_forward_Vector.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/00_forward_Vector.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/vector/00_forward_Vector.h	(revision 2477)
@@ -0,0 +1,28 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// 00_forward_Vector.h: Rcpp R/C++ interface class library --
+//
+// Copyright (C) 2010 - 2013 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__vector__forward_Vector_h
+#define Rcpp__vector__forward_Vector_h
+
+namespace Rcpp{
+    template <int RTYPE, template <class> class StoragePolicy> class Vector ;
+}
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/internal/Exporter.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/internal/Exporter.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/internal/Exporter.h	(revision 2477)
@@ -0,0 +1,116 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+//
+// exporter.h: Rcpp R/C++ interface class library -- identify if a class has a nested iterator typedef
+//
+// Copyright (C) 2010 - 2013 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__internal__exporter__h
+#define Rcpp__internal__exporter__h
+
+namespace Rcpp{
+    namespace traits{
+
+		template <typename T>
+		class Exporter{
+		public:
+		    Exporter( SEXP x ) : t(x){}
+		    inline T get(){ return t ; }
+
+		private:
+		    T t ;
+		} ;
+
+		template <typename T> class RangeExporter {
+		public:
+		    typedef typename T::value_type r_export_type ;
+
+		    RangeExporter( SEXP x ) : object(x){}
+		    ~RangeExporter(){}
+
+		    T get(){
+		        T vec( ::Rf_length(object) );
+		        ::Rcpp::internal::export_range( object, vec.begin() ) ;
+		        return vec ;
+		    }
+
+		private:
+		    SEXP object ;
+		} ;
+
+		template <typename T, typename value_type> class IndexingExporter {
+        public:
+            typedef value_type r_export_type ;
+
+            IndexingExporter( SEXP x) : object(x){}
+            ~IndexingExporter(){}
+
+            T get(){
+                T result( ::Rf_length(object) ) ;
+                ::Rcpp::internal::export_indexing<T,value_type>( object, result ) ;
+                return result ;
+            }
+
+        private:
+            SEXP object ;
+        } ;
+
+        template <typename T, typename value_type> class MatrixExporter {
+        public:
+            typedef value_type r_export_type ;
+
+            MatrixExporter( SEXP x) : object(x){}
+            ~MatrixExporter(){}
+
+            T get() {
+                Shield<SEXP> dims( ::Rf_getAttrib( object, R_DimSymbol ) ) ;
+                if( Rf_isNull(dims) || ::Rf_length(dims) != 2 ){
+                    throw ::Rcpp::not_a_matrix() ;
+                }
+                int* dims_ = INTEGER(dims) ;
+                T result( dims_[0], dims_[1] ) ;
+                ::Rcpp::internal::export_indexing<T,value_type>( object, result ) ;
+                return result ;
+            }
+
+        private:
+            SEXP object ;
+        } ;
+
+        template < template<class,class> class Container, typename T>
+        struct container_exporter{
+        		typedef RangeExporter< Container<T, std::allocator<T> > > type ;
+        } ;
+        template < template<class,class> class Container > struct container_exporter< Container, int > ;
+        template < template<class,class> class Container > struct container_exporter< Container, double > ;
+
+        template <typename T> class Exporter< std::vector<T> > : public container_exporter< std::vector, T>::type {
+        public:
+            Exporter(SEXP x) : container_exporter< std::vector, T>::type(x){}
+        };
+        template <typename T> class Exporter< std::deque<T> > : public container_exporter< std::deque, T>::type {
+        public:
+            Exporter(SEXP x) : container_exporter< std::deque, T>::type(x){}
+        };
+        template <typename T> class Exporter< std::list<T> > : public container_exporter< std::list, T>::type {
+        public:
+            Exporter(SEXP x) : container_exporter< std::list, T>::type(x){}
+        };
+
+    } // namespace traits
+} // namespace Rcpp
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/internal/SEXP_Iterator.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/internal/SEXP_Iterator.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/internal/SEXP_Iterator.h	(revision 2477)
@@ -0,0 +1,75 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+/* :tabSize=4:indentSize=4:noTabs=false:folding=explicit:collapseFolds=1: */
+//
+// SEXP_Iterator.h: Rcpp R/C++ interface class library --
+//
+// Copyright (C) 2012 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__internal__SEXP_Iterator__h
+#define Rcpp__internal__SEXP_Iterator__h
+
+namespace Rcpp{
+namespace internal{
+
+template <int RTYPE, typename VECTOR>
+class SEXP_Iterator {
+public:
+		typedef const SEXP& reference ;
+		typedef const SEXP* pointer ;
+		typedef int difference_type ;
+		typedef SEXP value_type;
+		typedef std::random_access_iterator_tag iterator_category ;
+
+		SEXP_Iterator( ): ptr(){} ;
+		SEXP_Iterator( const SEXP_Iterator& other) : ptr(other.ptr){} ;
+		SEXP_Iterator( const VECTOR& vec ) : ptr( get_vector_ptr(vec) ){} ;
+
+		SEXP_Iterator& operator=(const SEXP_Iterator& other){ ptr = other.ptr ; return *this ;}
+
+   		int operator-( const SEXP_Iterator& other){ return ptr - other.ptr ; }
+
+   		SEXP_Iterator operator+( int n){ return SEXP_Iterator(ptr+n); }
+   		SEXP_Iterator operator-( int n){ return SEXP_Iterator(ptr-n); }
+
+   		SEXP_Iterator& operator++(){ ptr++ ; return *this ; }
+   		SEXP_Iterator& operator--(){ ptr-- ; return *this ; }
+   		SEXP_Iterator& operator+=(int n){ ptr += n; return *this ; }
+   		SEXP_Iterator& operator-=(int n){ ptr -= n; return *this ; }
+
+   		bool operator<( const SEXP_Iterator& other ){ return ptr < other.ptr ; }
+   		bool operator>( const SEXP_Iterator& other ){ return ptr > other.ptr ; }
+   		bool operator<=( const SEXP_Iterator& other ){ return ptr <= other.ptr ; }
+   		bool operator>=( const SEXP_Iterator& other ){ return ptr >= other.ptr ; }
+
+   		reference  operator*(){ return *ptr ; }
+   		reference  operator[](int n){ return ptr[n] ; }
+   		bool operator==(const SEXP_Iterator& other) const { return ptr == other.ptr ;}
+   		bool operator!=(const SEXP_Iterator& other) const { return ptr != other.ptr ;}
+
+
+private:
+	const SEXP* ptr ;
+	SEXP_Iterator( const SEXP* ptr_) : ptr(ptr_){}
+
+} ;
+
+}
+}
+
+#endif
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/internal/NAEquals.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/internal/NAEquals.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/internal/NAEquals.h	(revision 2477)
@@ -0,0 +1,46 @@
+// NAEquals.h: Rcpp R/C++ interface class library -- for allowing NA == NA
+//
+// Copyright (C) 2014 Kevin Ushey
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__internal__NAEquals__h
+#define Rcpp__internal__NAEquals__h
+
+namespace Rcpp {
+
+namespace internal {
+
+template <typename T>
+struct NAEquals {
+    inline bool operator()(T left, T right) const {
+        return left == right;
+    }
+};
+
+// TODO: check different kinds of NA, NaNs
+template <>
+struct NAEquals<double> {
+    inline bool operator()(double left, double right) const {
+        return memcmp(&left, &right, sizeof(double)) == 0;
+    }
+};
+
+}
+
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/internal/wrap.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/internal/wrap.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/internal/wrap.h	(revision 2477)
@@ -0,0 +1,947 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+/* :tabSize=4:indentSize=4:noTabs=false:folding=explicit:collapseFolds=1: */
+//
+// wrap.h: Rcpp R/C++ interface class library -- wrap implementations
+//
+// Copyright (C) 2010 - 2013  Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp_internal_wrap_h
+#define Rcpp_internal_wrap_h
+
+#include <iterator>
+
+// this is a private header, included in RcppCommon.h
+// don't include it directly
+
+namespace Rcpp{
+
+  namespace RcppEigen{
+		template <typename T> SEXP eigen_wrap( const T& object ) ;
+	}
+
+template <typename T> SEXP wrap( const T& object ) ;
+
+template <typename T> class CustomImporter ;
+
+namespace internal{
+
+	inline SEXP make_charsexp__impl__wstring( const wchar_t* data ){
+		char* buffer = get_string_buffer() ;
+		wcstombs( buffer, data, MAXELTSIZE ) ;
+		return Rf_mkChar(buffer) ;
+	}
+	inline SEXP make_charsexp__impl__wstring( wchar_t data ){
+		wchar_t x[2] ; x[0] = data ; x[1] = '\0' ;
+		char* buffer = get_string_buffer() ;
+		wcstombs( buffer, x, MAXELTSIZE ) ;
+		return Rf_mkChar(buffer) ;
+	}
+	inline SEXP make_charsexp__impl__wstring( const std::wstring& st ){
+		return make_charsexp__impl__wstring( st.data()) ;
+	}
+	inline SEXP make_charsexp__impl__cstring( const char* data ){
+		return Rf_mkChar( data ) ;
+	}
+	inline SEXP make_charsexp__impl__cstring( char data ){
+		char x[2]; x[0] = data ; x[1] = '\0' ;
+		return Rf_mkChar( x ) ;
+	}
+
+	inline SEXP make_charsexp__impl__cstring( const std::string& st ){
+		return make_charsexp__impl__cstring( st.c_str() ) ;
+	}
+
+	template <typename T>
+	inline SEXP make_charsexp__impl( const T& s, Rcpp::traits::true_type ){
+		return make_charsexp__impl__wstring(s) ;
+	}
+
+	template <typename T>
+	inline SEXP make_charsexp__impl( const T& s, Rcpp::traits::false_type ){
+		return make_charsexp__impl__cstring(s) ;
+	}
+
+	template <typename T>
+	inline SEXP make_charsexp( const T& s) {
+		return make_charsexp__impl<T>( s, typename Rcpp::traits::is_wide_string<T>::type() ) ;
+	}
+	template <>
+	inline SEXP make_charsexp<Rcpp::String>( const Rcpp::String& );
+
+	template <typename InputIterator> SEXP range_wrap(InputIterator first, InputIterator last) ;
+	template <typename InputIterator> SEXP rowmajor_wrap(InputIterator first, int nrow, int ncol) ;
+
+// {{{ range wrap
+// {{{ unnamed range wrap
+
+/**
+ * Range based primitive wrap implementation. used when
+ * - T is a primitive type, indicated by the r_type_traits
+ * - T needs a static_cast to be of the type suitable to fit in the R vector
+ *
+ * This produces an unnamed vector of the appropriate type using the
+ * std::transform algorithm
+ */
+template <typename InputIterator, typename T>
+inline SEXP primitive_range_wrap__impl( InputIterator first, InputIterator last, ::Rcpp::traits::true_type ){
+	size_t size = std::distance( first, last ) ;
+	const int RTYPE = ::Rcpp::traits::r_sexptype_traits<T>::rtype ;
+	Shield<SEXP> x( Rf_allocVector( RTYPE, size ) );
+	std::transform( first, last, r_vector_start<RTYPE>(x),
+		caster< T, typename ::Rcpp::traits::storage_type<RTYPE>::type >
+		) ;
+	return wrap_extra_steps<T>( x ) ;
+}
+
+template <typename InputIterator, typename T>
+inline SEXP primitive_range_wrap__impl__nocast( InputIterator first, InputIterator last, std::random_access_iterator_tag ){
+	size_t size = std::distance( first, last ) ;
+	const int RTYPE = ::Rcpp::traits::r_sexptype_traits<T>::rtype ;
+	Shield<SEXP> x( Rf_allocVector( RTYPE, size ) );
+
+	typedef typename ::Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
+	int __trip_count = size >> 2 ;
+	STORAGE* start = r_vector_start<RTYPE>(x) ;
+	int i = 0 ;
+	for ( ; __trip_count > 0 ; --__trip_count) {
+    	start[i] = first[i] ; i++ ;
+    	start[i] = first[i] ; i++ ;
+    	start[i] = first[i] ; i++ ;
+    	start[i] = first[i] ; i++ ;
+	}
+	switch (size - i){
+	  case 3:
+	      start[i] = first[i] ; i++ ;
+      case 2:
+	      start[i] = first[i] ; i++ ;
+	  case 1:
+	      start[i] = first[i] ; i++ ;
+	  case 0:
+	  default:
+	      {}
+	}
+
+	return wrap_extra_steps<T>( x ) ;
+}
+
+template <typename InputIterator, typename T>
+inline SEXP primitive_range_wrap__impl__nocast( InputIterator first, InputIterator last, std::input_iterator_tag ){
+	size_t size = std::distance( first, last ) ;
+	const int RTYPE = ::Rcpp::traits::r_sexptype_traits<T>::rtype ;
+	Shield<SEXP> x( Rf_allocVector( RTYPE, size ) );
+	std::copy( first, last, r_vector_start<RTYPE>(x) ) ;
+	return wrap_extra_steps<T>( x ) ;
+}
+
+/**
+ * Range based primitive wrap implementation. used when :
+ * - T is a primitive type
+ * - T does not need a cast
+ *
+ * This produces an unnamed vector of the appropriate type using
+ * the std::copy algorithm
+ */
+template <typename InputIterator, typename T>
+inline SEXP primitive_range_wrap__impl( InputIterator first, InputIterator last, ::Rcpp::traits::false_type ){
+	return primitive_range_wrap__impl__nocast<InputIterator,T>( first, last, typename std::iterator_traits<InputIterator>::iterator_category() ) ;
+}
+
+
+/**
+ * Range based wrap implementation that deals with iterator over
+ * primitive types (int, double, etc ...)
+ *
+ * This produces an unnamed vector of the appropriate type
+ */
+template <typename InputIterator, typename T>
+inline SEXP range_wrap_dispatch___impl( InputIterator first, InputIterator last, ::Rcpp::traits::r_type_primitive_tag){
+	return primitive_range_wrap__impl<InputIterator,T>( first, last, typename ::Rcpp::traits::r_sexptype_needscast<T>() ) ;
+}
+
+/**
+ * range based wrap implementation that deals with iterators over
+ * some type U. each U object is itself wrapped
+ *
+ * This produces an unnamed generic vector (list)
+ */
+template <typename InputIterator, typename T>
+inline SEXP range_wrap_dispatch___generic( InputIterator first, InputIterator last ){
+	size_t size = std::distance( first, last ) ;
+	Shield<SEXP> x( Rf_allocVector( VECSXP, size ) );
+	size_t i =0 ;
+	while( i < size ){
+		SET_VECTOR_ELT( x, i, ::Rcpp::wrap(*first) ) ;
+		i++ ;
+		++first ;
+	}
+	return x ;
+}
+
+template <typename InputIterator, typename T>
+inline SEXP range_wrap_dispatch___impl( InputIterator first, InputIterator last, ::Rcpp::traits::r_type_generic_tag ){
+	return range_wrap_dispatch___generic<InputIterator, T>( first, last ) ;
+}
+
+// modules
+template <typename InputIterator, typename T>
+inline SEXP range_wrap_dispatch___impl( InputIterator first, InputIterator last, ::Rcpp::traits::r_type_module_object_pointer_tag ){
+	return range_wrap_dispatch___generic<InputIterator, T>( first, last ) ;
+}
+template <typename InputIterator, typename T>
+inline SEXP range_wrap_dispatch___impl( InputIterator first, InputIterator last, ::Rcpp::traits::r_type_module_object_const_pointer_tag ){
+	return range_wrap_dispatch___generic<InputIterator, T>( first, last ) ;
+}
+template <typename InputIterator, typename T>
+inline SEXP range_wrap_dispatch___impl( InputIterator first, InputIterator last, ::Rcpp::traits::r_type_module_object_tag ){
+	return range_wrap_dispatch___generic<InputIterator, T>( first, last ) ;
+}
+template <typename InputIterator, typename T>
+inline SEXP range_wrap_dispatch___impl( InputIterator first, InputIterator last, ::Rcpp::traits::r_type_module_object_reference_tag ){
+	return range_wrap_dispatch___generic<InputIterator, T>( first, last ) ;
+}
+template <typename InputIterator, typename T>
+inline SEXP range_wrap_dispatch___impl( InputIterator first, InputIterator last, ::Rcpp::traits::r_type_module_object_const_reference_tag ){
+	return range_wrap_dispatch___generic<InputIterator, T>( first, last ) ;
+}
+
+
+
+/**
+ * Range based wrap implementation for iterators over std::string
+ *
+ * This produces an unnamed character vector
+ */
+template<typename InputIterator, typename T>
+inline SEXP range_wrap_dispatch___impl( InputIterator first, InputIterator last, ::Rcpp::traits::r_type_string_tag ){
+	size_t size = std::distance( first, last ) ;
+	Shield<SEXP> x( Rf_allocVector( STRSXP, size ) ) ;
+	size_t i = 0 ;
+	while( i < size ){
+		SET_STRING_ELT( x, i, make_charsexp(*first) ) ;
+		i++ ;
+		++first ;
+	}
+	return x ;
+}
+
+// }}}
+
+// {{{ named range wrap
+
+/**
+ * range based wrap implementation that deals with iterators over
+ * pair<const string,T> where T is a primitive type : int, double ...
+ *
+ * This version is used when there is no need to cast T
+ *
+ * This produces a named R vector of the appropriate type
+ */
+template <typename InputIterator, typename T>
+inline SEXP range_wrap_dispatch___impl__cast( InputIterator first, InputIterator last, ::Rcpp::traits::false_type ){
+	size_t size = std::distance( first, last ) ;
+	const int RTYPE = ::Rcpp::traits::r_sexptype_traits<typename T::second_type>::rtype ;
+	Shield<SEXP> x( Rf_allocVector( RTYPE, size ) );
+	Shield<SEXP> names( Rf_allocVector( STRSXP, size ) ) ;
+	typedef typename ::Rcpp::traits::storage_type<RTYPE>::type CTYPE ;
+	CTYPE* start = r_vector_start<RTYPE>(x) ;
+	size_t i =0;
+	std::string buf ;
+	for( ; i<size; i++, ++first){
+		start[i] = (*first).second ;
+		buf = (*first).first ;
+		SET_STRING_ELT( names, i, Rf_mkChar(buf.c_str()) ) ;
+	}
+	::Rf_setAttrib( x, R_NamesSymbol, names ) ;
+	return wrap_extra_steps<T>( x ) ;
+}
+
+/**
+ * range based wrap implementation that deals with iterators over
+ * pair<const string,T> where T is a primitive type : int, double ...
+ *
+ * This version is used when T needs to be cast to the associated R
+ * type
+ *
+ * This produces a named R vector of the appropriate type
+ */
+template <typename InputIterator, typename T>
+inline SEXP range_wrap_dispatch___impl__cast( InputIterator first, InputIterator last, ::Rcpp::traits::true_type ){
+	size_t size = std::distance( first, last ) ;
+	const int RTYPE = ::Rcpp::traits::r_sexptype_traits<typename T::second_type>::rtype ;
+	Shield<SEXP> x( Rf_allocVector( RTYPE, size ) );
+	Shield<SEXP> names( Rf_allocVector( STRSXP, size ) ) ;
+	typedef typename ::Rcpp::traits::storage_type<RTYPE>::type CTYPE ;
+	CTYPE* start = r_vector_start<RTYPE>(x) ;
+	size_t i =0;
+	std::string buf ;
+	for( ; i<size; i++, ++first){
+		start[i] = static_cast<CTYPE>( first->second );
+		buf = first->first ;
+		SET_STRING_ELT( names, i, Rf_mkChar(buf.c_str()) ) ;
+	}
+	::Rf_setAttrib( x, R_NamesSymbol, names ) ;
+	return wrap_extra_steps<T>( x ) ;
+}
+
+
+/**
+ * range based wrap implementation that deals with iterators over
+ * pair<const string,T> where T is a primitive type : int, double ...
+ *
+ * This dispatches further depending on whether the type needs
+ * a cast to fit into the associated R type
+ *
+ * This produces a named R vector of the appropriate type
+ */
+template <typename InputIterator, typename T>
+inline SEXP range_wrap_dispatch___impl( InputIterator first, InputIterator last, ::Rcpp::traits::r_type_pairstring_primitive_tag){
+	return range_wrap_dispatch___impl__cast<InputIterator,T>( first, last,
+		typename ::Rcpp::traits::r_sexptype_needscast<typename T::second_type>() ) ;
+}
+
+/**
+ * Range based wrap implementation that deals with iterators over
+ * pair<const string, U> where U is wrappable. This is the kind of
+ * iterators that are produced by map<string,U>
+ *
+ * This produces a named generic vector (named list). The first
+ * element of the list contains the result of a call to wrap on the
+ * object of type U, etc ...
+ *
+ * The names are taken from the keys
+ */
+template <typename InputIterator, typename T>
+inline SEXP range_wrap_dispatch___impl( InputIterator first, InputIterator last, ::Rcpp::traits::r_type_pairstring_generic_tag ){
+	size_t size = std::distance( first, last ) ;
+	Shield<SEXP> x( Rf_allocVector( VECSXP, size ) );
+	Shield<SEXP> names( Rf_allocVector( STRSXP, size ) ) ;
+	size_t i =0 ;
+	std::string buf ;
+	SEXP element = R_NilValue ;
+	while( i < size ){
+		element = ::Rcpp::wrap( first->second ) ;
+		buf = first->first ;
+		SET_VECTOR_ELT( x, i, element ) ;
+		SET_STRING_ELT( names, i, Rf_mkChar(buf.c_str()) ) ;
+		i++ ;
+		++first ;
+	}
+	::Rf_setAttrib( x, R_NamesSymbol, names ) ;
+	return x ;
+}
+
+
+/**
+ * Range based wrap for iterators over std::pair<const std::(w)?string, std::(w)?string>
+ *
+ * This is mainly used for wrapping map<string,string> and friends
+ * which happens to produce iterators over pair<const string, string>
+ *
+ * This produces a character vector containing copies of the
+ * string iterated over. The names of the vector is set to the keys
+ * of the pair
+ */
+template<typename InputIterator, typename T>
+inline SEXP range_wrap_dispatch___impl( InputIterator first, InputIterator last, ::Rcpp::traits::r_type_pairstring_string_tag ){
+	size_t size = std::distance( first, last ) ;
+	Shield<SEXP> x( Rf_allocVector( STRSXP, size ) ) ;
+	Shield<SEXP> names( Rf_allocVector( STRSXP, size ) ) ;
+	for( size_t i = 0; i < size ; i++, ++first){
+		SET_STRING_ELT( x, i, make_charsexp( first->second ) ) ;
+		SET_STRING_ELT( names, i, make_charsexp( first->first) ) ;
+	}
+	::Rf_setAttrib( x, R_NamesSymbol, names ) ;
+	return x ;
+}
+
+/**
+ * iterating over pair<const int, VALUE>
+ * where VALUE is some primitive type
+ */
+template <typename InputIterator, typename KEY, typename VALUE, int RTYPE>
+inline SEXP range_wrap_dispatch___impl__pair( InputIterator first, InputIterator last, Rcpp::traits::true_type ) ;
+
+/**
+ * iterating over pair<const int, VALUE>
+ * where VALUE is a type that needs wrapping
+ */
+template <typename InputIterator, typename KEY, typename VALUE, int RTYPE>
+inline SEXP range_wrap_dispatch___impl__pair( InputIterator first, InputIterator last, Rcpp::traits::false_type ) ;
+
+
+/**
+ * Range wrap dispatch for iterators over std::pair<const int, T>
+ */
+template<typename InputIterator, typename T>
+inline SEXP range_wrap_dispatch___impl( InputIterator first, InputIterator last, ::Rcpp::traits::r_type_pair_tag ){
+	typedef typename T::second_type VALUE ;
+	typedef typename T::first_type KEY ;
+
+	return range_wrap_dispatch___impl__pair<
+			InputIterator,
+			KEY,
+			VALUE,
+			Rcpp::traits::r_sexptype_traits<VALUE>::rtype
+		>( first, last,
+		typename Rcpp::traits::is_primitive<VALUE>::type()
+		) ;
+}
+
+// }}}
+
+/**
+ * Dispatcher for all range based wrap implementations
+ *
+ * This uses the Rcpp::traits::r_type_traits to perform further dispatch
+ */
+template<typename InputIterator, typename T>
+inline SEXP range_wrap_dispatch( InputIterator first, InputIterator last ){
+#if RCPP_DEBUG_LEVEL > 0
+	typedef typename ::Rcpp::traits::r_type_traits<T>::r_category categ ;
+#endif
+	RCPP_DEBUG_3( "range_wrap_dispatch< InputIterator = \n%s , T = %s, categ = %s>\n", DEMANGLE(InputIterator), DEMANGLE(T), DEMANGLE(categ) ) ;
+	return range_wrap_dispatch___impl<InputIterator,T>( first, last, typename ::Rcpp::traits::r_type_traits<T>::r_category() ) ;
+}
+
+// we use the iterator trait to make the dispatch
+/**
+ * range based wrap. This uses the std::iterator_traits class
+ * to perform further dispatch
+ */
+template <typename InputIterator>
+inline SEXP range_wrap(InputIterator first, InputIterator last){
+	return range_wrap_dispatch<InputIterator,typename traits::remove_reference<typename std::iterator_traits<InputIterator>::value_type>::type >( first, last ) ;
+}
+// }}}
+
+// {{{ primitive wrap (wrapping a single primitive value)
+
+/**
+ * wraps a single primitive value when there is no need for a cast
+ */
+template <typename T>
+inline SEXP primitive_wrap__impl__cast( const T& object, ::Rcpp::traits::false_type ){
+	const int RTYPE = ::Rcpp::traits::r_sexptype_traits<T>::rtype ;
+	Shield<SEXP> x( Rf_allocVector( RTYPE, 1 ) );
+	r_vector_start<RTYPE>(x)[0] = object ;
+	return x;
+}
+
+/**
+ * wraps a single primitive value when a cast is needed
+ */
+template <typename T>
+inline SEXP primitive_wrap__impl__cast( const T& object, ::Rcpp::traits::true_type ){
+	const int RTYPE = ::Rcpp::traits::r_sexptype_traits<T>::rtype ;
+	typedef typename ::Rcpp::traits::storage_type<RTYPE>::type STORAGE_TYPE ;
+	Shield<SEXP> x( Rf_allocVector( RTYPE, 1 ) );
+	r_vector_start<RTYPE>(x)[0] = caster<T,STORAGE_TYPE>(object) ;
+	return x;
+}
+
+/**
+ * primitive wrap for 'easy' primitive types: int, double, Rbyte, Rcomplex
+ *
+ * This produces a vector of length 1 of the appropriate type
+ */
+template <typename T>
+inline SEXP primitive_wrap__impl( const T& object, ::Rcpp::traits::r_type_primitive_tag ){
+	return primitive_wrap__impl__cast( object, typename ::Rcpp::traits::r_sexptype_needscast<T>() );
+}
+
+/**
+ * primitive wrap for types that can be converted implicitely to std::string or std::wstring
+ *
+ * This produces a character vector of length 1 containing the std::string or wstring
+ */
+template <typename T>
+inline SEXP primitive_wrap__impl( const T& object, ::Rcpp::traits::r_type_string_tag){
+	Shield<SEXP> x( ::Rf_allocVector( STRSXP, 1) ) ;
+	SET_STRING_ELT( x, 0, make_charsexp(object) ) ;
+	return x;
+}
+
+
+/**
+ * called when T is a primitive type : int, bool, double, std::string, etc ...
+ * This uses the Rcpp::traits::r_type_traits on the type T to perform
+ * further dispatching and wrap the object into an vector of length 1
+ * of the appropriate SEXP type
+ */
+template <typename T>
+inline SEXP primitive_wrap(const T& object){
+	return primitive_wrap__impl( object, typename ::Rcpp::traits::r_type_traits<T>::r_category() ) ;
+}
+// }}}
+
+// {{{ unknown
+/**
+ * Called when the type T is known to be implicitely convertible to
+ * SEXP. It uses the implicit conversion to SEXP to wrap the object
+ * into a SEXP
+ */
+template <typename T>
+inline SEXP wrap_dispatch_unknown( const T& object, ::Rcpp::traits::true_type ){
+	RCPP_DEBUG_1( "wrap_dispatch_unknown<%s>(., false  )", DEMANGLE(T) )
+	// here we know (or assume) that T is convertible to SEXP
+	SEXP x = object ;
+	return x ;
+}
+
+/**
+ * This is the worst case :
+ * - not a primitive
+ * - not implicitely convertible tp SEXP
+ * - not iterable
+ *
+ * so we just give up and attempt to use static_assert to generate
+ * a compile time message if it is available, otherwise we use
+ * implicit conversion to SEXP to bomb the compiler, which will give
+ * quite a cryptic message
+ */
+template <typename T>
+inline SEXP wrap_dispatch_unknown_iterable(const T& object, ::Rcpp::traits::false_type){
+RCPP_DEBUG_1( "wrap_dispatch_unknown_iterable<%s>(., false  )", DEMANGLE(T) )
+		// here we know that T is not convertible to SEXP
+#ifdef HAS_STATIC_ASSERT
+	static_assert( !sizeof(T), "cannot convert type to SEXP" ) ;
+#else
+	// leave the cryptic message
+	SEXP x = object ;
+	return x ;
+#endif
+	return R_NilValue ; // -Wall
+}
+
+template <typename T>
+inline SEXP wrap_dispatch_unknown_iterable__logical( const T& object, ::Rcpp::traits::true_type){
+	RCPP_DEBUG_1( "wrap_dispatch_unknown_iterable__logical<%s>(., true  )", DEMANGLE(T) )
+	size_t size = object.size() ;
+	Shield<SEXP> x( Rf_allocVector( LGLSXP, size ) );
+	std::copy( object.begin(), object.end(), LOGICAL(x) ) ;
+	return x ;
+}
+
+template <typename T>
+inline SEXP wrap_range_sugar_expression( const T& object, Rcpp::traits::false_type){
+	RCPP_DEBUG_1( "wrap_range_sugar_expression<%s>(., false  )", DEMANGLE(T) )
+	return range_wrap( object.begin(), object.end() ) ;
+}
+template <typename T>
+inline SEXP wrap_range_sugar_expression( const T& object, Rcpp::traits::true_type) ;
+
+template <typename T>
+inline SEXP wrap_dispatch_unknown_iterable__logical( const T& object, ::Rcpp::traits::false_type){
+	RCPP_DEBUG_1( "wrap_dispatch_unknown_iterable__logical<%s>(., false  )", DEMANGLE(T) )
+	return wrap_range_sugar_expression( object, typename Rcpp::traits::is_sugar_expression<T>::type() ) ;
+}
+
+
+template <typename T>
+inline SEXP wrap_dispatch_unknown_iterable__matrix_interface( const T& object, ::Rcpp::traits::false_type ){
+	RCPP_DEBUG_1( "wrap_dispatch_unknown_iterable__matrix_interface<%s>(., false  )", DEMANGLE(T) )
+	return wrap_dispatch_unknown_iterable__logical( object,
+			typename ::Rcpp::traits::expands_to_logical<T>::type() );
+}
+
+template <typename T>
+inline SEXP wrap_dispatch_matrix_logical( const T& object, ::Rcpp::traits::true_type ){
+	int nr = object.nrow(), nc = object.ncol() ;
+	Shield<SEXP> res( Rf_allocVector( LGLSXP, nr * nc ) ) ;
+	int k=0 ;
+	int* p = LOGICAL(res) ;
+	for( int j=0; j<nc; j++)
+		for( int i=0; i<nr; i++, k++)
+			p[k] = object(i,j) ;
+	Shield<SEXP> dim( Rf_allocVector( INTSXP, 2) ) ;
+	INTEGER(dim)[0] = nr ;
+	INTEGER(dim)[1] = nc ;
+	Rf_setAttrib( res, R_DimSymbol , dim ) ;
+	return res ;
+}
+
+template <typename T, typename STORAGE>
+inline SEXP wrap_dispatch_matrix_primitive( const T& object ){
+	const int RTYPE = ::Rcpp::traits::r_sexptype_traits<STORAGE>::rtype ;
+	int nr = object.nrow(), nc = object.ncol() ;
+	Shield<SEXP> res( Rf_allocVector( RTYPE, nr*nc ) );
+
+	int k=0 ;
+	STORAGE* p = r_vector_start< RTYPE>(res) ;
+	for( int j=0; j<nc; j++)
+		for( int i=0; i<nr; i++, k++)
+			p[k] = object(i,j) ;
+	Shield<SEXP> dim( Rf_allocVector( INTSXP, 2) ) ;
+	INTEGER(dim)[0] = nr ;
+	INTEGER(dim)[1] = nc ;
+	Rf_setAttrib( res, R_DimSymbol , dim ) ;
+	return res ;
+}
+
+template <typename T>
+inline SEXP wrap_dispatch_matrix_not_logical( const T& object, ::Rcpp::traits::r_type_primitive_tag ){
+	return wrap_dispatch_matrix_primitive<T, typename T::stored_type>( object ) ;
+}
+
+template <typename T>
+inline SEXP wrap_dispatch_matrix_not_logical( const T& object, ::Rcpp::traits::r_type_string_tag ){
+	int nr = object.nrow(), nc = object.ncol() ;
+	Shield<SEXP> res( Rf_allocVector( STRSXP, nr*nc ) ) ;
+
+	int k=0 ;
+	for( int j=0; j<nc; j++)
+		for( int i=0; i<nr; i++, k++)
+			SET_STRING_ELT( res, k, make_charsexp(object(i,j)) ) ;
+	Shield<SEXP> dim( Rf_allocVector( INTSXP, 2) ) ;
+	INTEGER(dim)[0] = nr ;
+	INTEGER(dim)[1] = nc ;
+	Rf_setAttrib( res, R_DimSymbol , dim ) ;
+	return res ;
+}
+
+template <typename T>
+inline SEXP wrap_dispatch_matrix_not_logical( const T& object, ::Rcpp::traits::r_type_generic_tag ){
+	int nr = object.nrow(), nc = object.ncol() ;
+	Shield<SEXP> res( Rf_allocVector( VECSXP, nr*nc ) );
+
+	int k=0 ;
+	for( int j=0; j<nc; j++)
+		for( int i=0; i<nr; i++, k++)
+			SET_VECTOR_ELT( res, k, ::Rcpp::wrap( object(i,j) ) ) ;
+	Shield<SEXP> dim( Rf_allocVector( INTSXP, 2) ) ;
+	INTEGER(dim)[0] = nr ;
+	INTEGER(dim)[1] = nc ;
+	Rf_setAttrib( res, R_DimSymbol , dim ) ;
+	return res ;
+}
+
+template <typename T>
+inline SEXP wrap_dispatch_matrix_logical( const T& object, ::Rcpp::traits::false_type ){
+	return wrap_dispatch_matrix_not_logical<T>( object, typename ::Rcpp::traits::r_type_traits<typename T::stored_type>::r_category() ) ;
+}
+
+template <typename T>
+inline SEXP wrap_dispatch_unknown_iterable__matrix_interface( const T& object, ::Rcpp::traits::true_type ){
+	RCPP_DEBUG_1( "wrap_dispatch_unknown_iterable__matrix_interface<%s>(., true  )", DEMANGLE(T) )
+	return wrap_dispatch_matrix_logical( object, typename ::Rcpp::traits::expands_to_logical<T>::type() ) ;
+}
+
+
+/**
+ * Here we know for sure that type T has a T::iterator typedef
+ * so we hope for the best and call the range based wrap with begin
+ * and end
+ *
+ * This works fine for all stl containers and classes T that have :
+ * - T::iterator
+ * - T::iterator begin()
+ * - T::iterator end()
+ *
+ * If someone knows a better way, please advise
+ */
+template <typename T>
+inline SEXP wrap_dispatch_unknown_iterable(const T& object, ::Rcpp::traits::true_type){
+	RCPP_DEBUG_1( "wrap_dispatch_unknown_iterable<%s>(., true  )", DEMANGLE(T) )
+	return wrap_dispatch_unknown_iterable__matrix_interface( object,
+		typename ::Rcpp::traits::matrix_interface<T>::type() ) ;
+}
+
+template <typename T, typename elem_type>
+inline SEXP wrap_dispatch_importer__impl__prim( const T& object, ::Rcpp::traits::false_type ){
+	int size = object.size() ;
+	const int RTYPE = ::Rcpp::traits::r_sexptype_traits<elem_type>::rtype ;
+	Shield<SEXP> x( Rf_allocVector( RTYPE, size ) );
+	typedef typename ::Rcpp::traits::storage_type<RTYPE>::type CTYPE ;
+	CTYPE* start = r_vector_start<RTYPE>(x) ;
+	for( int i=0; i<size; i++){
+		start[i] = object.get(i) ;
+	}
+	return x ;
+
+}
+
+template <typename T, typename elem_type>
+inline SEXP wrap_dispatch_importer__impl__prim( const T& object, ::Rcpp::traits::true_type ){
+	int size = object.size() ;
+	const int RTYPE = ::Rcpp::traits::r_sexptype_traits<elem_type>::rtype ;
+	Shield<SEXP> x( Rf_allocVector( RTYPE, size ) );
+	typedef typename ::Rcpp::traits::storage_type<RTYPE>::type CTYPE ;
+	CTYPE* start = r_vector_start<RTYPE>(x) ;
+	for( int i=0; i<size; i++){
+		start[i] = caster<elem_type,CTYPE>( object.get(i) );
+	}
+	return x ;
+}
+
+template <typename T, typename elem_type>
+inline SEXP wrap_dispatch_importer__impl( const T& object, ::Rcpp::traits::r_type_primitive_tag ){
+	return wrap_dispatch_importer__impl__prim<T,elem_type>( object,
+		typename ::Rcpp::traits::r_sexptype_needscast<elem_type>() ) ;
+}
+
+template <typename T, typename elem_type>
+inline SEXP wrap_dispatch_importer__impl( const T& object, ::Rcpp::traits::r_type_string_tag ){
+	int size = object.size() ;
+	Shield<SEXP> x( Rf_allocVector( STRSXP, size ) );
+	for( int i=0; i<size; i++){
+		SET_STRING_ELT( x, i, make_charsexp(object.get(i)) ) ;
+	}
+	return x ;
+}
+
+template <typename T, typename elem_type>
+inline SEXP wrap_dispatch_importer__impl( const T& object, ::Rcpp::traits::r_type_generic_tag ){
+	int size = object.size() ;
+	Shield<SEXP> x( Rf_allocVector( VECSXP, size ) );
+	for( int i=0; i<size; i++){
+		SET_VECTOR_ELT( x, i, object.wrap(i) ) ;
+	}
+	return x ;
+}
+
+template <typename T, typename elem_type>
+inline SEXP wrap_dispatch_importer( const T& object ){
+	return wrap_dispatch_importer__impl<T,elem_type>( object,
+		typename ::Rcpp::traits::r_type_traits<elem_type>::r_category()
+		 ) ;
+}
+
+/**
+ * Called when no implicit conversion to SEXP is possible and this is
+ * not tagged as a primitive type, checks whether the type is
+ * iterable
+ */
+template <typename T>
+inline SEXP wrap_dispatch_unknown( const T& object, ::Rcpp::traits::false_type){
+	RCPP_DEBUG_1( "wrap_dispatch_unknown<%s>(., false  )", DEMANGLE(T) )
+	return wrap_dispatch_unknown_iterable( object, typename ::Rcpp::traits::has_iterator<T>::type() ) ;
+}
+// }}}
+
+// {{{ wrap dispatch
+/**
+ * wrapping a __single__ primitive type : int, double, std::string, size_t,
+ * Rbyte, Rcomplex
+ */
+
+template <typename T>
+inline SEXP wrap_dispatch( const T& object, ::Rcpp::traits::wrap_type_primitive_tag ){
+	return primitive_wrap( object ) ;
+}
+
+template <typename T>
+inline SEXP wrap_dispatch( const T& object, ::Rcpp::traits::wrap_type_char_array ) {
+  return Rf_mkString(object);
+}
+
+template <typename T>
+inline SEXP wrap_dispatch( const T& object, ::Rcpp::traits::wrap_type_module_object_pointer_tag ){
+	return Rcpp::internal::make_new_object< typename T::object_type >( object.ptr ) ;
+}
+
+template <typename T>
+inline SEXP wrap_dispatch( const T& object, ::Rcpp::traits::wrap_type_module_object_tag ){
+	return Rcpp::internal::make_new_object<T>( new T(object) ) ;
+}
+
+template <typename T>
+inline SEXP wrap_dispatch( const T& object, ::Rcpp::traits::wrap_type_enum_tag ){
+	return wrap( (int)object ) ;
+}
+
+template <typename T>
+inline SEXP wrap_dispatch_eigen( const T& object, ::Rcpp::traits::false_type){
+	RCPP_DEBUG_1( "wrap_dispatch_eigen<%s>(., false  )", DEMANGLE(T) )
+	return wrap_dispatch_unknown( object, typename ::Rcpp::traits::is_convertible<T,SEXP>::type() ) ;
+}
+
+template <typename T>
+inline SEXP wrap_dispatch_eigen( const T& object, ::Rcpp::traits::true_type){
+	RCPP_DEBUG_1( "wrap_dispatch_eigen<%s>(., true  )", DEMANGLE(T) )
+	return ::Rcpp::RcppEigen::eigen_wrap( object ) ;
+}
+
+
+/**
+ * called when T is wrap_type_unknown_tag and is not an Importer class
+ * The next step is to try implicit conversion to SEXP
+ */
+template <typename T>
+inline SEXP wrap_dispatch_unknown_importable( const T& object, ::Rcpp::traits::false_type){
+	RCPP_DEBUG_1( "wrap_dispatch_unknown_importable<%s>(., false  )", DEMANGLE(T) )
+	return wrap_dispatch_eigen( object, typename traits::is_eigen_base<T>::type() ) ;
+}
+
+/**
+ * called when T is an Importer
+ */
+template <typename T>
+inline SEXP wrap_dispatch_unknown_importable( const T& object, ::Rcpp::traits::true_type){
+	RCPP_DEBUG_1( "wrap_dispatch_unknown_importable<%s>(., true  )", DEMANGLE(T) )
+	return wrap_dispatch_importer<T,typename T::r_import_type>( object ) ;
+}
+
+/**
+ * This is called by wrap when the wrap_type_traits is wrap_type_unknown_tag
+ *
+ * This tries to identify if the object conforms to the Importer class
+ */
+template <typename T>
+inline SEXP wrap_dispatch( const T& object, ::Rcpp::traits::wrap_type_unknown_tag ){
+	RCPP_DEBUG_1( "wrap_dispatch<%s>(., wrap_type_unknown_tag )", DEMANGLE(T) )
+	return wrap_dispatch_unknown_importable( object, typename ::Rcpp::traits::is_importer<T>::type() ) ;
+}
+	// }}}
+
+// {{{ wrap a container that is structured in row major order
+template <typename value_type, typename InputIterator>
+inline SEXP rowmajor_wrap__dispatch( InputIterator first, int nrow, int ncol, ::Rcpp::traits::r_type_generic_tag ){
+	Shield<SEXP> out( ::Rf_allocVector( VECSXP, nrow * ncol) );
+	int i=0, j=0 ;
+	for( j=0; j<ncol; j++){
+		for( i=0; i<nrow; i++, ++first ){
+			SET_VECTOR_ELT( out, j + ncol*i, ::Rcpp::wrap( *first) ) ;
+		}
+	}
+	Shield<SEXP> dims( ::Rf_allocVector( INTSXP, 2) );
+	INTEGER(dims)[0] = nrow;
+	INTEGER(dims)[1] = ncol;
+	::Rf_setAttrib( out, R_DimSymbol, dims) ;
+	return out ;
+}
+
+template <typename value_type, typename InputIterator>
+inline SEXP rowmajor_wrap__dispatch( InputIterator first, int nrow, int ncol, ::Rcpp::traits::r_type_string_tag ){
+	Shield<SEXP> out( ::Rf_allocVector( STRSXP, nrow * ncol) );
+	int i=0, j=0 ;
+	for( j=0; j<ncol; j++){
+		for( i=0; i<nrow; i++, ++first ){
+			SET_STRING_ELT( out, j + ncol*i, make_charsexp(*first) ) ;
+		}
+	}
+	Shield<SEXP> dims( ::Rf_allocVector( INTSXP, 2) );
+	INTEGER(dims)[0] = nrow;
+	INTEGER(dims)[1] = ncol;
+	::Rf_setAttrib( out, R_DimSymbol, dims) ;
+	return out ;
+}
+
+template <typename value_type, typename InputIterator>
+inline SEXP primitive_rowmajor_wrap__dispatch( InputIterator first, int nrow, int ncol, ::Rcpp::traits::false_type ){
+	const int RTYPE = ::Rcpp::traits::r_sexptype_traits<value_type>::rtype ;
+	Shield<SEXP> out( ::Rf_allocVector( RTYPE, nrow * ncol ) );
+	value_type* ptr = r_vector_start<RTYPE>( out );
+	int i=0, j=0 ;
+	for( j=0; j<ncol; j++){
+		for( i=0; i<nrow; i++, ++first ){
+			ptr[ j + ncol*i ] = *first ;
+		}
+	}
+	Shield<SEXP> dims( ::Rf_allocVector( INTSXP, 2) );
+	INTEGER(dims)[0] = nrow;
+	INTEGER(dims)[1] = ncol;
+	::Rf_setAttrib( out, R_DimSymbol, dims) ;
+	return out ;
+}
+template <typename value_type, typename InputIterator>
+inline SEXP primitive_rowmajor_wrap__dispatch( InputIterator first, int nrow, int ncol, ::Rcpp::traits::true_type ){
+	const int RTYPE = ::Rcpp::traits::r_sexptype_traits<value_type>::rtype ;
+	typedef typename ::Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
+	Shield<SEXP> out( ::Rf_allocVector( RTYPE, nrow * ncol ) );
+	STORAGE* ptr = r_vector_start<RTYPE>( out );
+	int i=0, j=0 ;
+	for( j=0; j<ncol; j++){
+		for( i=0; i<nrow; i++, ++first ){
+			ptr[ j + ncol*i ] = caster<value_type,STORAGE>( *first );
+		}
+	}
+	Shield<SEXP> dims( ::Rf_allocVector( INTSXP, 2) );
+	INTEGER(dims)[0] = nrow;
+	INTEGER(dims)[1] = ncol;
+	::Rf_setAttrib( out, R_DimSymbol, dims) ;
+	return out ;
+
+}
+
+template <typename value_type, typename InputIterator>
+inline SEXP rowmajor_wrap__dispatch( InputIterator first, int nrow, int ncol, ::Rcpp::traits::r_type_primitive_tag ){
+	return primitive_rowmajor_wrap__dispatch<value_type,InputIterator>( first, nrow, ncol, typename ::Rcpp::traits::r_sexptype_needscast<value_type>() ) ;
+}
+
+template <typename InputIterator>
+inline SEXP rowmajor_wrap(InputIterator first, int nrow, int ncol){
+	typedef typename std::iterator_traits<InputIterator>::value_type VALUE_TYPE ;
+	return rowmajor_wrap__dispatch<VALUE_TYPE,InputIterator>( first, nrow, ncol, typename ::Rcpp::traits::r_type_traits<VALUE_TYPE>::r_category() );
+}
+// }}}
+
+} // internal
+
+/**
+ * wraps an object of type T in a SEXP
+ *
+ * This method depends on the Rcpp::traits::wrap_type_traits trait
+ * class to dispatch to the appropriate internal implementation
+ * method
+ *
+ */
+template <typename T>
+inline SEXP wrap(const T& object) ;
+
+template <> inline SEXP wrap<Rcpp::String>( const Rcpp::String& object) ;
+
+template <typename T>
+inline SEXP module_wrap_dispatch( const T& obj, Rcpp::traits::void_wrap_tag ){
+	return R_NilValue ;
+}
+
+// these are defined in wrap_end.h
+template <typename T>
+inline SEXP module_wrap_dispatch( const T& obj, Rcpp::traits::pointer_wrap_tag ) ;
+
+template <typename T>
+inline SEXP module_wrap_dispatch( const T& obj, Rcpp::traits::normal_wrap_tag ) ;
+
+template <typename T>
+inline SEXP module_wrap( const T& obj ){
+	return module_wrap_dispatch<T>( obj, typename Rcpp::traits::module_wrap_traits<T>::category() ) ;
+}
+template <>
+inline SEXP module_wrap<SEXP>( const SEXP& obj ){
+	return obj ;
+}
+
+inline SEXP wrap(const char* const v ){
+	if (v != NULL)
+		return Rf_mkString(v) ;
+	else
+		return R_NilValue;
+}
+
+/**
+ * Range based version of wrap
+ */
+template <typename InputIterator>
+inline SEXP wrap(InputIterator first, InputIterator last){
+	return internal::range_wrap( first, last ) ;
+}
+
+
+} // Rcpp
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/internal/Proxy_Iterator.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/internal/Proxy_Iterator.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/internal/Proxy_Iterator.h	(revision 2477)
@@ -0,0 +1,125 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+/* :tabSize=4:indentSize=4:noTabs=false:folding=explicit:collapseFolds=1: */
+//
+// Proxy_Iterator.h: Rcpp R/C++ interface class library --
+//
+// Copyright (C) 2010 - 2013 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__internal__Proxy_Iterator__h
+#define Rcpp__internal__Proxy_Iterator__h
+
+namespace Rcpp{
+namespace internal{
+
+template <typename PROXY>
+class Proxy_Iterator {
+public:
+		typedef PROXY& reference ;
+		typedef PROXY* pointer ;
+		typedef int difference_type ;
+		typedef PROXY value_type;
+		typedef std::random_access_iterator_tag iterator_category ;
+
+		Proxy_Iterator( ): proxy(){} ;
+		Proxy_Iterator( const Proxy_Iterator& other) : proxy( other.proxy){}
+		Proxy_Iterator( const PROXY& proxy_ ) : proxy( proxy_ ){} ;
+
+		Proxy_Iterator& operator=( const Proxy_Iterator& other ){
+			proxy.import( other.proxy ) ;
+			return *this ;
+		}
+
+		inline Proxy_Iterator& operator++(){
+			proxy.move(1) ;
+			return *this ;
+		}
+		inline Proxy_Iterator operator++(int){
+			Proxy_Iterator orig(*this) ;
+			++(*this) ;
+			return orig ;
+		}
+
+		inline Proxy_Iterator& operator--(){
+			proxy.move(-1) ;
+			return *this ;
+		}
+		inline Proxy_Iterator operator--(int){
+			Proxy_Iterator orig(*this) ;
+			--(*this) ;
+			return orig ;
+		}
+
+		inline Proxy_Iterator operator+(difference_type n) const {
+			return Proxy_Iterator( PROXY(*proxy.parent, proxy.index + n) ) ;
+		}
+		inline Proxy_Iterator operator-(difference_type n) const {
+			return Proxy_Iterator( PROXY(*proxy.parent, proxy.index - n) ) ;
+		}
+
+		inline Proxy_Iterator& operator+=(difference_type n) {
+			proxy.move( n ) ;
+			return *this ;
+		}
+		inline Proxy_Iterator& operator-=(difference_type n) {
+			proxy.move( -n ) ;
+			return *this ;
+		}
+
+		inline reference operator*() {
+			return proxy ;
+		}
+		inline pointer operator->(){
+			return &proxy ;
+		}
+
+		inline bool operator==( const Proxy_Iterator& y) const {
+			return ( this->proxy.index == y.proxy.index ) && ( this->proxy.parent == y.proxy.parent );
+		}
+		inline bool operator!=( const Proxy_Iterator& y) const {
+			return ( this->proxy.index != y.proxy.index ) || ( this->proxy.parent != y.proxy.parent );
+		}
+		inline bool operator<( const Proxy_Iterator& other ) const {
+			return proxy.index < other.proxy.index ;
+		}
+		inline bool operator>( const Proxy_Iterator& other ) const {
+			return proxy.index > other.proxy.index ;
+		}
+		inline bool operator<=( const Proxy_Iterator& other ) const {
+			return proxy.index <= other.proxy.index ;
+		}
+		inline bool operator>=( const Proxy_Iterator& other ) const {
+			return proxy.index >= other.proxy.index ;
+		}
+
+		inline difference_type operator-(const Proxy_Iterator& other) const {
+			return proxy.index - other.proxy.index ;
+		}
+
+		inline int index() const { return proxy.index ; }
+
+		inline PROXY operator[](R_xlen_t i) const { return PROXY(*proxy.parent, proxy.index + i) ; }
+
+private:
+	PROXY proxy ;
+} ;
+
+}
+}
+
+#endif
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/internal/na.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/internal/na.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/internal/na.h	(revision 2477)
@@ -0,0 +1,98 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+/* :tabSize=4:indentSize=4:noTabs=false:folding=explicit:collapseFolds=1: */
+//
+// na.h: Rcpp R/C++ interface class library -- optimized na checking
+//
+// Copyright (C) 2012-2014 Dirk Eddelbuettel, Romain Francois and Kevin Ushey
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+namespace Rcpp {
+namespace internal {
+
+// we rely on the presence of unsigned long long types, since we
+// want to compare specific bit patterns, but we can't explicitly
+// assign a hex to a double storage.
+
+#ifdef RCPP_HAS_LONG_LONG_TYPES
+
+#ifdef HAS_STATIC_ASSERT
+static_assert(
+    sizeof(rcpp_ulong_long_type) == sizeof(double),
+    "unsigned long long and double have same size"
+);
+#endif
+
+// motivation: on 32bit architectures, we only see 'LargeNA'
+// as defined ahead; on 64bit architectures, R defaults to
+// 'SmallNA' for R_NaReal, but this can get promoted to 'LargeNA'
+// if a certain operation can create a 'signalling' NA, e.g. NA_real_+1
+static const rcpp_ulong_long_type SmallNA = 0x7FF00000000007A2;
+static const rcpp_ulong_long_type LargeNA = 0x7FF80000000007A2;
+
+struct NACanChange {
+    enum { value = sizeof(void*) == 8 };
+};
+
+template <bool NACanChange>
+bool Rcpp_IsNA__impl(double);
+
+template <>
+inline bool Rcpp_IsNA__impl<true>(double x) {
+    return memcmp(
+        (void*) &x,
+        (void*) &SmallNA,
+        sizeof(double)
+    ) == 0 or memcmp(
+        (void*) &x,
+        (void*) &LargeNA,
+        sizeof(double)
+    ) == 0;
+}
+
+template <>
+inline bool Rcpp_IsNA__impl<false>(double x) {
+    return memcmp(
+        (void*) &x,
+        (void*) &LargeNA,
+        sizeof(double)
+    ) == 0;
+}
+
+inline bool Rcpp_IsNA(double x) {
+    return Rcpp_IsNA__impl< NACanChange::value >(x);
+}
+
+inline bool Rcpp_IsNaN(double x) {
+    return R_IsNaN(x);
+}
+
+#else
+
+// fallback when we don't have unsigned long long
+
+inline bool Rcpp_IsNA(double x) {
+    return R_IsNA(x);
+}
+
+inline bool Rcpp_IsNaN(double x) {
+    return R_IsNaN(x);
+}
+
+#endif
+
+}
+}
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/internal/wrap_end.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/internal/wrap_end.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/internal/wrap_end.h	(revision 2477)
@@ -0,0 +1,44 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+//
+// wrap_end.h: R/C++ interface class library
+//
+// Copyright (C) 2012 - 2013 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp_internal_wrap_end_h
+#define Rcpp_internal_wrap_end_h
+
+namespace Rcpp{
+
+    template <typename T>
+    inline SEXP wrap(const T& object){
+        RCPP_DEBUG_1( "inline SEXP wrap<%s>(const T& object)", DEMANGLE(T) )
+    	  return internal::wrap_dispatch( object, typename ::Rcpp::traits::wrap_type_traits<T>::wrap_category() ) ;
+    }
+
+    template <typename T>
+    inline SEXP module_wrap_dispatch( const T& obj, Rcpp::traits::normal_wrap_tag ){
+        return wrap( obj ) ;
+    }
+    template <typename T>
+    inline SEXP module_wrap_dispatch( const T& obj, Rcpp::traits::pointer_wrap_tag ) {
+        return wrap( object< typename traits::un_pointer<T>::type >( obj ) ) ;
+    }
+}
+
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/internal/caster.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/internal/caster.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/internal/caster.h	(revision 2477)
@@ -0,0 +1,70 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+/* :tabSize=4:indentSize=4:noTabs=false:folding=explicit:collapseFolds=1: */
+//
+// caster.h: Rcpp R/C++ interface class library --
+//
+// Copyright (C) 2010 - 2013 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__internal__caster__h
+#define Rcpp__internal__caster__h
+
+namespace Rcpp{
+namespace internal{
+
+template <typename FROM, typename TO> TO caster(FROM from){
+	return static_cast<TO>(from) ;
+}
+
+template <typename T>
+inline Rcomplex Rcomplex_caster( std::complex<T> from ){
+	Rcomplex cx ;
+	cx.r = (double)from.real() ;
+	cx.i = (double)from.imag() ;
+	return cx ;
+}
+
+template <>
+inline Rcomplex caster<std::complex<double>, Rcomplex>( std::complex<double> from){
+	return Rcomplex_caster(from) ;
+}
+template<>
+inline Rcomplex caster<std::complex<float>, Rcomplex>( std::complex<float> from){
+	return Rcomplex_caster(from) ;
+}
+
+template <typename T>
+inline std::complex<T> std_complex_caster( Rcomplex from ){
+	return std::complex<T>( static_cast<T>(from.r), static_cast<T>(from.i) ) ;
+}
+
+template <>
+inline std::complex<double> caster<Rcomplex,std::complex<double> >( Rcomplex from){
+	return std_complex_caster<double>(from);
+}
+
+template<>
+inline std::complex<float>  caster<Rcomplex,std::complex<float> >( Rcomplex from){
+	return std_complex_caster<float>(from) ;
+}
+
+
+}
+}
+
+#endif
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/internal/export.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/internal/export.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/internal/export.h	(revision 2477)
@@ -0,0 +1,155 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+/* :tabSize=4:indentSize=4:noTabs=false:folding=explicit:collapseFolds=1: */
+//
+// export.h: Rcpp R/C++ interface class library --
+//
+// Copyright (C) 2010 - 2013 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__internal__export__h
+#define Rcpp__internal__export__h
+
+namespace Rcpp{
+    namespace internal{
+
+
+		template <typename T>
+		std::wstring as_string_elt__impl( SEXP x, R_xlen_t i, Rcpp::traits::true_type ){
+			const char* y = char_get_string_elt( x, i ) ;
+			return std::wstring(y, y+strlen(y) ) ;
+		}
+
+		template <typename T>
+		std::string as_string_elt__impl( SEXP x, R_xlen_t i, Rcpp::traits::false_type ){
+			return char_get_string_elt( x, i ) ;
+		}
+
+		template <typename T>
+		const std::basic_string< typename Rcpp::traits::char_type<T>::type >
+		as_string_elt( SEXP x, R_xlen_t i ){
+			return as_string_elt__impl<T>( x, i, typename Rcpp::traits::is_wide_string<T>::type() ) ;
+		}
+
+        /* iterating */
+
+		template <typename InputIterator, typename value_type>
+			void export_range__impl( SEXP x, InputIterator first, ::Rcpp::traits::false_type ) {
+			const int RTYPE = ::Rcpp::traits::r_sexptype_traits<value_type>::rtype ;
+			typedef typename ::Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
+			Shield<SEXP> y( ::Rcpp::r_cast<RTYPE>(x) ) ;
+			STORAGE* start = ::Rcpp::internal::r_vector_start<RTYPE>(y) ;
+			std::copy( start, start + ::Rf_xlength(y), first ) ;
+		}
+
+		template <typename InputIterator, typename value_type>
+		void export_range__impl( SEXP x, InputIterator first, ::Rcpp::traits::true_type ) {
+			const int RTYPE = ::Rcpp::traits::r_sexptype_traits<value_type>::rtype ;
+			typedef typename ::Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
+			Shield<SEXP> y( ::Rcpp::r_cast<RTYPE>(x) ) ;
+			STORAGE* start = ::Rcpp::internal::r_vector_start<RTYPE>(y) ;
+			std::transform( start, start + ::Rf_xlength(y) , first, caster<STORAGE,value_type> ) ;
+        }
+
+        // implemented in meat
+        template <typename InputIterator, typename value_type>
+        void export_range__dispatch( SEXP x, InputIterator first, ::Rcpp::traits::r_type_generic_tag ) ;
+
+        template <typename InputIterator, typename value_type>
+        void export_range__dispatch( SEXP x, InputIterator first, ::Rcpp::traits::r_type_primitive_tag ) {
+			export_range__impl<InputIterator,value_type>(
+				x,
+				first,
+				typename ::Rcpp::traits::r_sexptype_needscast<value_type>()
+			);
+		}
+
+		template <typename InputIterator, typename value_type>
+		void export_range__dispatch( SEXP x, InputIterator first, ::Rcpp::traits::r_type_string_tag ) {
+			if( ! ::Rf_isString( x) ) throw ::Rcpp::not_compatible( "expecting a string vector" ) ;
+			R_xlen_t n = ::Rf_xlength(x) ;
+			for( R_xlen_t i=0; i<n; i++, ++first ){
+				*first = as_string_elt<typename std::iterator_traits<InputIterator>::value_type> ( x, i ) ;
+			}
+		}
+
+		template <typename InputIterator>
+		void export_range( SEXP x, InputIterator first ) {
+			export_range__dispatch<InputIterator,typename std::iterator_traits<InputIterator>::value_type>(
+				x,
+				first,
+				typename ::Rcpp::traits::r_type_traits<typename std::iterator_traits<InputIterator>::value_type>::r_category()
+			);
+		}
+
+
+        /* indexing */
+
+		template <typename T, typename value_type>
+			void export_indexing__impl( SEXP x, T& res, ::Rcpp::traits::false_type ) {
+			const int RTYPE = ::Rcpp::traits::r_sexptype_traits<value_type>::rtype ;
+			typedef typename ::Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
+			Shield<SEXP> y( ::Rcpp::r_cast<RTYPE>(x) ) ;
+			STORAGE* start = ::Rcpp::internal::r_vector_start<RTYPE>(y) ;
+			R_xlen_t size = ::Rf_xlength(y)  ;
+			for( R_xlen_t i=0; i<size; i++){
+				res[i] =  start[i] ;
+			}
+		}
+
+		template <typename T, typename value_type>
+		void export_indexing__impl( SEXP x, T& res, ::Rcpp::traits::true_type ) {
+			const int RTYPE = ::Rcpp::traits::r_sexptype_traits<value_type>::rtype ;
+			typedef typename ::Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
+			Shield<SEXP> y( ::Rcpp::r_cast<RTYPE>(x) );
+			STORAGE* start = ::Rcpp::internal::r_vector_start<RTYPE>(y) ;
+			R_xlen_t size = ::Rf_xlength(y)  ;
+			for( R_xlen_t i=0; i<size; i++){
+				res[i] = caster<STORAGE,value_type>(start[i]) ;
+			}
+		}
+
+		template <typename T, typename value_type>
+		void export_indexing__dispatch( SEXP x, T& res, ::Rcpp::traits::r_type_primitive_tag ) {
+			export_indexing__impl<T,value_type>(
+				x,
+				res,
+				typename ::Rcpp::traits::r_sexptype_needscast<value_type>()
+			);
+		}
+
+		template <typename T, typename value_type>
+		void export_indexing__dispatch( SEXP x, T& res, ::Rcpp::traits::r_type_string_tag ) {
+			if( ! ::Rf_isString( x) ) throw Rcpp::not_compatible( "expecting a string vector" ) ;
+			R_xlen_t n = ::Rf_xlength(x) ;
+			for( R_xlen_t i=0; i<n; i++ ){
+				res[i] = as_string_elt< value_type >( x, i) ;
+			}
+		}
+
+		template <typename T, typename value_type>
+		void export_indexing( SEXP x, T& res ) {
+			export_indexing__dispatch<T,value_type>(
+				x,
+				res,
+				typename ::Rcpp::traits::r_type_traits<value_type>::r_category()
+			);
+		}
+
+    }
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/internal/r_coerce.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/internal/r_coerce.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/internal/r_coerce.h	(revision 2477)
@@ -0,0 +1,301 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+/* :tabSize=4:indentSize=4:noTabs=false:folding=explicit:collapseFolds=1: */
+//
+// r_coerce.h: Rcpp R/C++ interface class library -- coercion
+//
+// Copyright (C) 2010 - 2013 Dirk Eddelbuettel, Romain Francois, and Kevin Ushey
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__internal__r_coerce__h
+#define Rcpp__internal__r_coerce__h
+
+namespace Rcpp{
+namespace internal{
+
+template <int FROM, int TO>
+typename ::Rcpp::traits::storage_type<TO>::type
+r_coerce( typename ::Rcpp::traits::storage_type<FROM>::type from ) ;
+
+template <>
+inline int r_coerce<INTSXP,INTSXP>(int from) { return from ; }
+
+template <>
+inline int r_coerce<LGLSXP,LGLSXP>(int from) { return from ; }
+
+template <>
+inline double r_coerce<REALSXP,REALSXP>(double from) { return from ; }
+
+template <>
+inline Rcomplex r_coerce<CPLXSXP,CPLXSXP>(Rcomplex from) { return from ; }
+
+template <>
+inline Rbyte r_coerce<RAWSXP,RAWSXP>(Rbyte from) { return from ; }
+
+// -> INTSXP
+template <>
+inline int r_coerce<LGLSXP,INTSXP>(int from){
+	return (from==NA_LOGICAL) ? NA_INTEGER : from ;
+}
+template <>
+inline int r_coerce<REALSXP,INTSXP>(double from){
+	if (Rcpp_IsNA(from)) {
+		return NA_INTEGER;
+	} else if (from > INT_MAX || from <= INT_MIN ) {
+		return NA_INTEGER;
+	}
+	return static_cast<int>(from);
+
+}
+template <>
+inline int r_coerce<CPLXSXP,INTSXP>(Rcomplex from){
+	return r_coerce<REALSXP,INTSXP>(from.r) ;
+}
+template <>
+inline int r_coerce<RAWSXP,INTSXP>(Rbyte from){
+	return static_cast<int>(from);
+}
+
+// -> REALSXP
+template <>
+inline double r_coerce<LGLSXP,REALSXP>(int from){
+	return from == NA_LOGICAL ? NA_REAL : static_cast<double>(from) ;
+}
+template <>
+inline double r_coerce<INTSXP,REALSXP>(int from){
+	return from == NA_INTEGER ? NA_REAL : static_cast<double>(from) ;
+}
+template <>
+inline double r_coerce<CPLXSXP,REALSXP>(Rcomplex from){
+	return from.r ;
+}
+template <>
+inline double r_coerce<RAWSXP,REALSXP>(Rbyte from){
+	return static_cast<double>(from) ;
+}
+
+// -> LGLSXP
+template <>
+inline int r_coerce<REALSXP,LGLSXP>(double from){
+	return Rcpp_IsNA(from) ? NA_LOGICAL : (from!=0.0);
+}
+
+template <>
+inline int r_coerce<INTSXP,LGLSXP>(int from){
+	return ( from == NA_INTEGER ) ? NA_LOGICAL : (from!=0);
+}
+
+template <>
+inline int r_coerce<CPLXSXP,LGLSXP>(Rcomplex from){
+	if( Rcpp_IsNA(from.r) ) return NA_LOGICAL ;
+	if( from.r == 0.0 || from.i == 0.0 ) return FALSE ;
+	return TRUE ;
+}
+
+template <>
+inline int r_coerce<RAWSXP,LGLSXP>(Rbyte from){
+	if( from != static_cast<Rbyte>(0) ) return TRUE ;
+	return FALSE ;
+}
+
+// -> RAWSXP
+template <>
+inline Rbyte r_coerce<INTSXP,RAWSXP>(int from){
+	return (from < 0 || from > 255) ? static_cast<Rbyte>(0) : static_cast<Rbyte>(from) ;
+}
+
+template <>
+inline Rbyte r_coerce<REALSXP,RAWSXP>(double from){
+	if( Rcpp_IsNA(from) ) return static_cast<Rbyte>(0) ;
+	return r_coerce<INTSXP,RAWSXP>(static_cast<int>(from)) ;
+}
+
+template <>
+inline Rbyte r_coerce<CPLXSXP,RAWSXP>(Rcomplex from){
+	 return r_coerce<REALSXP,RAWSXP>(from.r) ;
+}
+
+template <>
+inline Rbyte r_coerce<LGLSXP,RAWSXP>(int from){
+	return static_cast<Rbyte>(from == TRUE) ;
+}
+
+// -> CPLXSXP
+template <>
+inline Rcomplex r_coerce<REALSXP,CPLXSXP>(double from){
+	Rcomplex c ;
+	if( Rcpp_IsNA(from) ){
+		c.r = NA_REAL;
+		c.i = NA_REAL;
+	} else{
+		c.r = from ;
+		c.i = 0.0 ;
+	}
+	return c ;
+}
+
+template <>
+inline Rcomplex r_coerce<INTSXP,CPLXSXP>(int from){
+	Rcomplex c ;
+	if( from == NA_INTEGER ){
+		c.r = NA_REAL;
+		c.i = NA_REAL;
+	} else{
+		c.r = static_cast<double>(from) ;
+		c.i = 0.0 ;
+	}
+	return c ;
+}
+
+template <>
+inline Rcomplex r_coerce<RAWSXP,CPLXSXP>(Rbyte from){
+	Rcomplex c ;
+	c.r = static_cast<double>(from);
+	c.i = 0.0 ;
+	return c ;
+}
+
+template <>
+inline Rcomplex r_coerce<LGLSXP,CPLXSXP>(int from){
+	Rcomplex c ;
+	if( from == TRUE ){
+		c.r = 1.0 ; c.i = 0.0 ;
+	} else if( from == FALSE ){
+		c.r = c.i = 0.0 ;
+	} else { /* NA */
+		c.r = c.i = NA_REAL;
+	}
+	return c ;
+}
+
+// -> STRSXP
+template <int RTYPE>
+const char* coerce_to_string( typename ::Rcpp::traits::storage_type<RTYPE>::type from ) ;
+
+inline const char* dropTrailing0(char *s, char cdec) {
+    /* Note that  's'  is modified */
+    char *p = s;
+    for (p = s; *p; p++) {
+        if(*p == cdec) {
+            char *replace = p++;
+            while ('0' <= *p  &&  *p <= '9')
+            if(*(p++) != '0')
+                replace = p;
+            if(replace != p)
+                while((*(replace++) = *(p++))) ;
+            break;
+        }
+    }
+    return s;
+}
+
+inline int integer_width( int n ){
+    return n < 0 ? ( (int) ( ::log10( -n+0.5) + 2 ) ) : ( (int) ( ::log10( n+0.5) + 1 ) ) ;
+}
+
+template <>
+inline const char* coerce_to_string<CPLXSXP>(Rcomplex x){
+	//int wr, dr, er, wi, di, ei;
+    //Rf_formatComplex(&x, 1, &wr, &dr, &er, &wi, &di, &ei, 0);
+    // we are no longer allowed to use this:
+    //     Rf_EncodeComplex(x, wr, dr, er, wi, di, ei, '.' );
+    // so approximate it poorly as
+    static char tmp1[128], tmp2[128], tmp3[256];
+    //snprintf(tmp, 127, "%*.*f+%*.*fi", wr, dr, x.r, wi, di, x.i);
+    //snprintf(tmp, 127, "%f+%fi", x.r, x.i); // FIXEM: barebones default formatting
+    snprintf(tmp1, 127, "%f", x.r);
+    snprintf(tmp2, 127, "%f", x.i);
+    snprintf(tmp3, 255, "%s+%si", dropTrailing0(tmp1, '.'), dropTrailing0(tmp2, '.'));
+    return tmp3;
+}
+template <>
+inline const char* coerce_to_string<REALSXP>(double x){
+	//int w,d,e ;
+    // cf src/main/format.c in R's sources:
+    //   The return values are
+    //     w : the required field width
+    //     d : use %w.df in fixed format, %#w.de in scientific format
+    //     e : use scientific format if != 0, value is number of exp digits - 1
+    //
+    //   nsmall specifies the minimum number of decimal digits in fixed format:
+    //   it is 0 except when called from do_format.
+    //Rf_formatReal( &x, 1, &w, &d, &e, 0 ) ;
+    // we are no longer allowed to use this:
+    //     char* tmp = const_cast<char*>( Rf_EncodeReal(x, w, d, e, '.') );
+    // so approximate it poorly as
+
+    static char tmp[128];
+    snprintf(tmp, 127, "%f", x);
+    if (strcmp( dropTrailing0(tmp, '.'), "-0") == 0) return "0";
+    else return dropTrailing0(tmp, '.');
+}
+#define NB 1000
+template <>
+inline const char* coerce_to_string<INTSXP >(int from) {
+	static char buffer[NB] ;
+    snprintf( buffer, NB, "%*d", integer_width(from), from );
+    return buffer ;
+}
+template <>
+inline const char* coerce_to_string<RAWSXP >(Rbyte from){
+	static char buff[3];
+    ::sprintf(buff, "%02x", from);
+    return buff ;
+}
+template <>
+inline const char* coerce_to_string<LGLSXP >(int from){
+	return from == 0 ? "FALSE" : "TRUE" ;
+}
+
+#undef NB
+template <>
+inline SEXP r_coerce<STRSXP ,STRSXP>(SEXP from){
+	return from ;
+}
+template <>
+inline SEXP r_coerce<CPLXSXP,STRSXP>(Rcomplex from) {
+	return Rcpp::traits::is_na<CPLXSXP>(from) ? NA_STRING : Rf_mkChar( coerce_to_string<CPLXSXP>( from ) ) ;
+}
+template <>
+inline SEXP r_coerce<REALSXP,STRSXP>(double from){
+
+  // handle some special values explicitly
+  if (Rcpp_IsNaN(from)) return Rf_mkChar("NaN");
+  else if (from == R_PosInf) return Rf_mkChar("Inf");
+  else if (from == R_NegInf) return Rf_mkChar("-Inf");
+  else return Rcpp::traits::is_na<REALSXP>(from) ? NA_STRING :Rf_mkChar( coerce_to_string<REALSXP>( from ) ) ;
+}
+template <>
+inline SEXP r_coerce<INTSXP ,STRSXP>(int from){
+	return Rcpp::traits::is_na<INTSXP>(from) ? NA_STRING :Rf_mkChar( coerce_to_string<INTSXP>( from ) ) ;
+}
+template <>
+inline SEXP r_coerce<RAWSXP ,STRSXP>(Rbyte from){
+	return Rf_mkChar( coerce_to_string<RAWSXP>(from));
+}
+template <>
+inline SEXP r_coerce<LGLSXP ,STRSXP>(int from){
+	return Rcpp::traits::is_na<LGLSXP>(from) ? NA_STRING :Rf_mkChar( coerce_to_string<LGLSXP>(from));
+}
+template <>
+inline SEXP r_coerce<SYMSXP ,STRSXP>(SEXP from){
+	return Rf_ScalarString( PRINTNAME(from) ) ;
+}
+
+} // internal
+} // Rcpp
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/internal/GreedyVector.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/internal/GreedyVector.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/internal/GreedyVector.h	(revision 2477)
@@ -0,0 +1,96 @@
+// Copyright (C) 2013 Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef RCPP_INTERNAL_GREEDYVECTOR_H
+#define RCPP_INTERNAL_GREEDYVECTOR_H
+
+namespace Rcpp {
+
+    template <typename T, typename CLASS>
+    class GreedyVector {
+    public:
+        typedef typename std::vector<T>::iterator iterator;
+        typedef typename std::vector<T>::const_iterator const_iterator;
+
+        GreedyVector(SEXP vec) : v(0){
+            if (!Rf_isNumeric(vec) || Rf_isMatrix(vec) || Rf_isLogical(vec))
+                throw std::range_error("invalid numeric vector in constructor");
+            int len = Rf_length(vec);
+            if (len == 0)
+                throw std::range_error("null vector in constructor");
+            v.resize(len);
+            for (int i = 0; i < len; i++)
+                v[i] = T( static_cast<double>(REAL(vec)[i]));
+        }
+
+        GreedyVector(int n) : v(n){}
+
+        inline const T& operator()(int i) const{
+            return at(i) ;
+        }
+        inline T& operator()(int i){
+            return at(i) ;
+        }
+
+        inline const T& operator[](int i) const{
+            return at(i) ;
+        }
+        inline T& operator[](int i){
+            return at(i) ;
+        }
+
+        inline int size() const {
+            return (int)v.size();
+        }
+
+        inline iterator begin(){ return v.begin(); }
+        inline iterator end(){ return v.end(); }
+
+        inline const_iterator begin() const { return v.begin(); }
+        inline const_iterator end() const { return v.end(); }
+
+        inline operator SEXP() const {
+            return wrap( v ) ;
+        }
+
+    protected:
+        std::vector<T> v;
+
+    private:
+        const T& at(int i) const{
+            if (i < 0 || i >= static_cast<int>(v.size())) {
+                std::ostringstream oss;
+                oss << "subscript out of range: " << i;
+                throw std::range_error(oss.str());
+            }
+            return v[i];
+        }
+
+        T& at(int i) {
+            if (i < 0 || i >= static_cast<int>(v.size())) {
+                std::ostringstream oss;
+                oss << "subscript out of range: " << i;
+                throw std::range_error(oss.str());
+            }
+            return v[i];
+        }
+
+    } ;
+
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/internal/ListInitialization.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/internal/ListInitialization.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/internal/ListInitialization.h	(revision 2477)
@@ -0,0 +1,44 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+/* :tabSize=4:indentSize=4:noTabs=false:folding=explicit:collapseFolds=1: */
+//
+// ListInitialization.h: Rcpp R/C++ interface class library --
+//
+// Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__internal__ListInitialization__h
+#define Rcpp__internal__ListInitialization__h
+
+namespace Rcpp{
+namespace internal{
+
+template <typename iterator, typename value_type> class ListInitialization {
+public:
+	ListInitialization( iterator iter_ ) : iter(iter_) {} ;
+	ListInitialization<iterator,value_type> operator,( value_type x ){
+		*iter = x ;
+		return ListInitialization<iterator,value_type>( iter + 1 );
+	}
+
+private:
+	iterator iter ;
+} ;
+
+} // internal
+} // Rcpp
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/internal/r_vector.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/internal/r_vector.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/internal/r_vector.h	(revision 2477)
@@ -0,0 +1,145 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+/* :tabSize=4:indentSize=4:noTabs=false:folding=explicit:collapseFolds=1: */
+//
+// r_vector.h: Rcpp R/C++ interface class library -- information about R vectors
+//
+// Copyright (C) 2010 - 2013 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__internal__r_vector_h
+#define Rcpp__internal__r_vector_h
+
+namespace Rcpp{
+namespace internal{
+
+template <int RTYPE>
+typename Rcpp::traits::storage_type<RTYPE>::type* r_vector_start(SEXP x){
+	typedef typename Rcpp::traits::storage_type<RTYPE>::type* pointer ;
+	return reinterpret_cast<pointer>( dataptr(x) ) ;
+}
+
+/**
+ * The value 0 statically casted to the appropriate type for
+ * the given SEXP type
+ */
+template <int RTYPE,typename CTYPE>
+inline CTYPE get_zero(){
+	return static_cast<CTYPE>(0) ;
+}
+
+
+/**
+ * Specialization for Rcomplex
+ */
+template<>
+inline Rcomplex get_zero<CPLXSXP,Rcomplex>(){
+	Rcomplex x ;
+	x.r = 0.0 ;
+	x.i = 0.0 ;
+	return x ;
+}
+
+/**
+ * Initializes a vector of the given SEXP type. The template fills the
+ * vector with the value 0 of the appropriate type, for example
+ * an INTSXP vector is initialized with (int)0, etc...
+ */
+template<int RTYPE> void r_init_vector(SEXP x){
+	typedef typename ::Rcpp::traits::storage_type<RTYPE>::type CTYPE ;
+	CTYPE* start=r_vector_start<RTYPE>(x) ;
+	std::fill( start, start + Rf_xlength(x), get_zero<RTYPE,CTYPE>() ) ;
+}
+/**
+ * Initializes a generic vector (VECSXP). Does nothing since
+ * R already initializes all elements to NULL
+ */
+template<>
+inline void r_init_vector<VECSXP>(SEXP /*x*/){}
+
+/**
+ * Initializes an expression vector (EXPRSXP). Does nothing since
+ * R already initializes all elements to NULL
+ */
+template<>
+inline void r_init_vector<EXPRSXP>(SEXP /*x*/){}
+
+/**
+ * Initializes a character vector (STRSXP). Does nothing since
+ * R already initializes all elements to ""
+ */
+template<>
+inline void r_init_vector<STRSXP>(SEXP /*x*/){}
+
+
+
+/**
+ * We do not allow List(RTYPE=VECSXP), RawVector(RTYPE=RAWSXP)
+ * or ExpressionVector(RTYPE=EXPRSXP) to be sorted, so it is
+ * desirable to issue a compiler error if user attempts to sort
+ * these types of Vectors.
+ *
+ * We declare a template class without defining the generic
+ * class body, but complete the definition in specialization
+ * of qualified Vector types. Hence when using this class
+ * on unqualified Vectors, the compiler will emit errors.
+ */
+template<int RTYPE>
+class Sort_is_not_allowed_for_this_type;
+
+/**
+ * Specialization for CPLXSXP, INTSXP, LGLSXP, REALSXP, and STRSXP
+ */
+template<>
+class Sort_is_not_allowed_for_this_type<CPLXSXP>
+{
+public:
+    static void do_nothing() {}
+};
+
+template<>
+class Sort_is_not_allowed_for_this_type<INTSXP>
+{
+public:
+    static void do_nothing() {}
+};
+
+template<>
+class Sort_is_not_allowed_for_this_type<LGLSXP>
+{
+public:
+    static void do_nothing() {}
+};
+
+template<>
+class Sort_is_not_allowed_for_this_type<REALSXP>
+{
+public:
+    static void do_nothing() {}
+};
+
+template<>
+class Sort_is_not_allowed_for_this_type<STRSXP>
+{
+public:
+    static void do_nothing() {}
+};
+
+
+} // internal
+} // Rcpp
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/internal/NAComparator.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/internal/NAComparator.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/internal/NAComparator.h	(revision 2477)
@@ -0,0 +1,119 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+/* :tabSize=4:indentSize=4:noTabs=false:folding=explicit:collapseFolds=1: */
+//
+// NAComparator.h: Rcpp R/C++ interface class library -- comparator
+//
+// Copyright (C) 2012-2014 Dirk Eddelbuettel, Romain Francois and Kevin Ushey
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__internal__NAComparator__h
+#define Rcpp__internal__NAComparator__h
+
+namespace Rcpp {
+
+namespace internal {
+
+inline int StrCmp(SEXP x, SEXP y) {
+    if (x == NA_STRING) return (y == NA_STRING ? 0 : 1);
+    if (y == NA_STRING) return -1;
+    if (x == y) return 0;  // same string in cache
+    return strcmp(char_nocheck(x), char_nocheck(y));
+}
+
+template <typename T>
+struct NAComparator {
+    inline bool operator()(T left, T right) const {
+        return left < right;
+    }
+};
+
+template <>
+struct NAComparator<int> {
+    inline bool operator()(int left, int right) const {
+        if (left == NA_INTEGER) return false;
+        if (right == NA_INTEGER) return true;
+        return left < right;
+    }
+};
+
+template <>
+struct NAComparator<double> {
+    inline bool operator()(double left, double right) const {
+
+        bool leftNaN = (left != left);
+        bool rightNaN = (right != right);
+
+        // this branch inspired by data.table: see
+        // https://github.com/arunsrinivasan/datatable/commit/1a3e476d3f746e18261662f484d2afa84ac7a146#commitcomment-4885242
+        if (Rcpp_IsNaN(right) and Rcpp_IsNA(left))
+            return true;
+
+        if (leftNaN != rightNaN) {
+            return leftNaN < rightNaN;
+        } else {
+            return left < right;
+        }
+
+      }
+
+};
+
+template <>
+struct NAComparator<Rcomplex> {
+    inline bool operator()(Rcomplex left, Rcomplex right) const {
+        // sort() in R says that complex numbers are first sorted by
+        // the real parts, and then the imaginary parts.
+
+        // When only one of the two numbers contains NA or NaN, move
+        // it to the right hand side.
+
+        // When both left and right contain NA or NaN, return true.
+
+        bool leftNaN = (left.r != left.r) || (left.i != left.i);
+        bool rightNaN = (right.r != right.r) || (right.i != right.i);
+
+        if (!(leftNaN || rightNaN))  // if both are nice numbers
+        {
+            if (left.r == right.r)   // if real parts are the same
+                return left.i < right.i;
+            else
+                return left.r < right.r;
+        } else
+            return leftNaN <= rightNaN;
+    }
+};
+
+template <>
+struct NAComparator<SEXP> {
+    inline bool operator()(SEXP left, SEXP right) const {
+        return StrCmp(left, right) < 0;
+    }
+};
+
+
+template <typename T>
+struct NAComparatorGreater {
+    inline bool operator()(T left, T right) const {
+        return NAComparator<T>()(right, left);
+    }
+};
+
+} // internal
+
+} // Rcpp
+
+#endif // Rcpp__internal__NAComparator__h
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/internal/converter.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/internal/converter.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/internal/converter.h	(revision 2477)
@@ -0,0 +1,48 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+//
+// converter.h: Rcpp R/C++ interface class library --
+//
+// Copyright (C) 2012 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp_internal_converter_h
+#define Rcpp_internal_converter_h
+
+namespace Rcpp{
+namespace internal{
+	class converter {
+	public:
+		converter( ) : x(R_NilValue){} ;
+		converter( SEXP x_) : x(x_){} ;
+		converter( const converter& other) : x(other.x){}
+		converter& operator=( const converter& other){
+			x = other.x ;
+			return *this ;
+		}
+		~converter(){}
+
+		template <typename T> operator T(){
+			return ::Rcpp::as<T>( x ) ;
+		}
+	private:
+		SEXP x ;
+
+	} ;
+} // namespace internal
+} // namespace Rcpp
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/hash/IndexHash.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/hash/IndexHash.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/hash/IndexHash.h	(revision 2477)
@@ -0,0 +1,241 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 4 -*-
+//
+// IndexHash.h: Rcpp R/C++ interface class library -- hashing utility, inspired
+// from Simon's fastmatch package
+//
+// Copyright (C) 2010, 2011  Simon Urbanek
+// Copyright (C) 2012  Dirk Eddelbuettel and Romain Francois
+// Copyright (C) 2014  Dirk Eddelbuettel, Romain Francois and Kevin Ushey
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef RCPP__HASH__INDEX_HASH_H
+#define RCPP__HASH__INDEX_HASH_H
+
+#if ( defined(HASH_PROFILE) && defined(__APPLE__) )
+    // only mac version for now
+    #include <mach/mach_time.h>
+    #define ABSOLUTE_TIME mach_absolute_time
+    #define RCPP_PROFILE_TIC start = ABSOLUTE_TIME() ;
+    #define RCPP_PROFILE_TOC end   = ABSOLUTE_TIME() ;
+    #define RCPP_PROFILE_RECORD(name) profile_data[#name] = end - start ;
+#else
+    #define RCPP_PROFILE_TIC
+    #define RCPP_PROFILE_TOC
+    #define RCPP_PROFILE_RECORD(name)
+#endif
+#define RCPP_USE_CACHE_HASH
+
+namespace Rcpp{
+    namespace sugar{
+
+    #ifndef RCPP_HASH
+    #define RCPP_HASH(X) (3141592653U * ((unsigned int)(X)) >> (32 - k))
+    #endif
+
+    template <int RTYPE>
+    class IndexHash {
+    public:
+        typedef typename traits::storage_type<RTYPE>::type STORAGE ;
+        typedef Vector<RTYPE> VECTOR ;
+
+        IndexHash( SEXP table ) : n(Rf_length(table)), m(2), k(1), src( (STORAGE*)dataptr(table) ), size_(0)
+            , data()
+        #ifdef HASH_PROFILE
+            , profile_data()
+        #endif
+        {
+            RCPP_PROFILE_TIC
+            int desired = n*2 ;
+            while( m < desired ){ m *= 2 ; k++ ; }
+            #ifdef RCPP_USE_CACHE_HASH
+                data = get_cache(m) ;
+            #else
+                data.resize( m ) ;
+            #endif
+            RCPP_PROFILE_TOC
+            RCPP_PROFILE_RECORD(ctor_body)
+
+        }
+
+        inline IndexHash& fill(){
+            RCPP_PROFILE_TIC
+
+            for( int i=0; i<n; i++) add_value(i) ;
+
+            RCPP_PROFILE_TOC
+            RCPP_PROFILE_RECORD(fill)
+
+            return *this ;
+        }
+
+        inline LogicalVector fill_and_get_duplicated() {
+            LogicalVector result = no_init(n) ;
+            int* res = LOGICAL(result) ;
+            for( int i=0; i<n; i++) res[i] = ! add_value(i) ;
+            return result ;
+        }
+
+        template <typename T>
+        inline SEXP lookup(const T& vec) const {
+            return lookup__impl(vec, vec.size() ) ;
+        }
+
+        // use the pointers for actual (non sugar expression vectors)
+        inline SEXP lookup(const VECTOR& vec) const {
+            return lookup__impl(vec.begin(), vec.size() ) ;
+        }
+
+        inline bool contains(STORAGE val) const {
+            return get_index(val) != NA_INTEGER ;
+        }
+
+        inline int size() const {
+            return size_ ;
+        }
+
+        // keys, in the order they appear in the data
+        inline Vector<RTYPE> keys() const{
+            Vector<RTYPE> res = no_init(size_) ;
+            for( int i=0, j=0; j<size_; i++){
+                if( data[i] ) res[j++] = src[data[i]-1] ;
+            }
+            return res ;
+        }
+
+        int n, m, k ;
+        STORAGE* src ;
+        int size_ ;
+        #ifdef RCPP_USE_CACHE_HASH
+            int* data ;
+        #else
+            std::vector<int> data ;
+        #endif
+
+        #ifdef HASH_PROFILE
+        mutable std::map<std::string,int> profile_data ;
+        mutable uint64_t start ;
+        mutable uint64_t end ;
+        #endif
+
+        template <typename T>
+        SEXP lookup__impl(const T& vec, int n_) const {
+            RCPP_PROFILE_TIC
+
+            SEXP res = Rf_allocVector(INTSXP, n_) ;
+
+            RCPP_PROFILE_TOC
+            RCPP_PROFILE_RECORD(allocVector)
+
+            int *v = INTEGER(res) ;
+
+            RCPP_PROFILE_TIC
+
+            for( int i=0; i<n_; i++) v[i] = get_index( vec[i] ) ;
+
+            RCPP_PROFILE_TOC
+            RCPP_PROFILE_RECORD(lookup)
+
+            return res ;
+        }
+
+        SEXP get_profile_data(){
+        #ifdef HASH_PROFILE
+            return wrap( profile_data ) ;
+        #else
+            return R_NilValue ;
+        #endif
+        }
+
+        inline bool not_equal(const STORAGE& lhs, const STORAGE& rhs) {
+            return ! internal::NAEquals<STORAGE>()(lhs, rhs);
+        }
+
+        bool add_value(int i){
+            RCPP_DEBUG_2( "%s::add_value(%d)", DEMANGLE(IndexHash), i )
+            STORAGE val = src[i++] ;
+            unsigned int addr = get_addr(val) ;
+            while (data[addr] && not_equal( src[data[addr] - 1], val)) {
+              addr++;
+              if (addr == static_cast<unsigned int>(m)) {
+                addr = 0;
+              }
+            }
+
+            if (!data[addr]){
+              data[addr] = i ;
+              size_++ ;
+
+              return true ;
+            }
+            return false;
+        }
+
+        /* NOTE: we are returning a 1-based index ! */
+        inline unsigned int get_index(STORAGE value) const {
+            unsigned int addr = get_addr(value) ;
+            while (data[addr]) {
+              if (src[data[addr] - 1] == value)
+                return data[addr];
+              addr++;
+              if (addr == static_cast<unsigned int>(m)) addr = 0;
+            }
+            return NA_INTEGER;
+        }
+
+        // defined below
+        unsigned int get_addr(STORAGE value) const ;
+    } ;
+
+    template <>
+    inline unsigned int IndexHash<INTSXP>::get_addr(int value) const {
+        return RCPP_HASH(value) ;
+    }
+    template <>
+    inline unsigned int IndexHash<REALSXP>::get_addr(double val) const {
+      unsigned int addr;
+      union dint_u {
+          double d;
+          unsigned int u[2];
+        };
+      union dint_u val_u;
+      /* double is a bit tricky - we nave to normalize 0.0, NA and NaN */
+      if (val == 0.0) val = 0.0;
+      if (internal::Rcpp_IsNA(val)) val = NA_REAL;
+      else if (internal::Rcpp_IsNaN(val)) val = R_NaN;
+      val_u.d = val;
+      addr = RCPP_HASH(val_u.u[0] + val_u.u[1]);
+      return addr ;
+    }
+
+    template <>
+    inline unsigned int IndexHash<STRSXP>::get_addr(SEXP value) const {
+        intptr_t val = (intptr_t) value;
+        unsigned int addr;
+        #if (defined _LP64) || (defined __LP64__) || (defined WIN64)
+          addr = RCPP_HASH((val & 0xffffffff) ^ (val >> 32));
+        #else
+          addr = RCPP_HASH(val);
+        #endif
+        return addr ;
+    }
+
+
+} // sugar
+} // Rcpp
+
+#endif
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/hash/SelfHash.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/hash/SelfHash.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/hash/SelfHash.h	(revision 2477)
@@ -0,0 +1,129 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 4 -*-
+//
+// hash.h: Rcpp R/C++ interface class library -- hashing utility, inspired
+// from Simon's fastmatch package
+//
+// Copyright (C) 2010, 2011  Simon Urbanek
+// Copyright (C) 2012  Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef RCPP__HASH__SELF_HASH_H
+#define RCPP__HASH__SELF_HASH_H
+
+namespace Rcpp{
+namespace sugar{
+
+
+    template <int RTYPE>
+    class SelfHash {
+    public:
+        typedef typename traits::storage_type<RTYPE>::type STORAGE ;
+        typedef Vector<RTYPE> VECTOR ;
+
+        SelfHash( SEXP table ) : n(Rf_length(table)), m(2), k(1),
+            src( (STORAGE*)dataptr(table) ), data(), indices(), size_(0)
+        {
+            int desired = n*2 ;
+            while( m < desired ){ m *= 2 ; k++ ; }
+            data.resize( m ) ;
+            indices.resize( m ) ;
+        }
+
+        inline IntegerVector fill_and_self_match(){
+            IntegerVector result = no_init(n) ;
+            int* res = INTEGER(result) ;
+            for( int i=0; i<n; i++) res[i] = add_value_get_index(i) ;
+            return result ;
+        }
+
+        inline int size() const {
+            return size_ ;
+        }
+
+        int n, m, k ;
+        STORAGE* src ;
+        std::vector<int> data ;
+        std::vector<int> indices ;
+        int size_ ;
+
+        int add_value_get_index(int i){
+            STORAGE val = src[i++] ;
+            unsigned int addr = get_addr(val) ;
+            while (data[addr] && src[data[addr] - 1] != val) {
+              addr++;
+              if (addr == static_cast<unsigned int>(m)) addr = 0;
+            }
+            if (!data[addr]) {
+                data[addr] = i ;
+                indices[addr] = ++size_ ;
+            }
+            return indices[addr] ;
+        }
+
+        /* NOTE: we are returning a 1-based index ! */
+        unsigned int get_index(STORAGE value) const {
+            unsigned int addr = get_addr(value) ;
+            while (data[addr]) {
+              if (src[data[addr] - 1] == value)
+                return data[addr];
+              addr++;
+              if (addr == static_cast<unsigned int>(m)) addr = 0;
+            }
+            return NA_INTEGER;
+        }
+
+        // defined below
+        unsigned int get_addr(STORAGE value) const ;
+    } ;
+
+    template <>
+    inline unsigned int SelfHash<INTSXP>::get_addr(int value) const {
+        return RCPP_HASH(value) ;
+    }
+    template <>
+    inline unsigned int SelfHash<REALSXP>::get_addr(double val) const {
+      unsigned int addr;
+      union dint_u {
+          double d;
+          unsigned int u[2];
+        };
+      union dint_u val_u;
+      /* double is a bit tricky - we nave to normalize 0.0, NA and NaN */
+      if (val == 0.0) val = 0.0;
+      if (internal::Rcpp_IsNA(val)) val = NA_REAL;
+      else if (internal::Rcpp_IsNaN(val)) val = R_NaN;
+      val_u.d = val;
+      addr = RCPP_HASH(val_u.u[0] + val_u.u[1]);
+      return addr ;
+    }
+
+    template <>
+    inline unsigned int SelfHash<STRSXP>::get_addr(SEXP value) const {
+        intptr_t val = (intptr_t) value;
+        unsigned int addr;
+        #if (defined _LP64) || (defined __LP64__) || (defined WIN64)
+          addr = RCPP_HASH((val & 0xffffffff) ^ (val >> 32));
+        #else
+          addr = RCPP_HASH(val);
+        #endif
+        return addr ;
+    }
+
+} // sugar
+} // Rcpp
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/hash/hash.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/hash/hash.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/hash/hash.h	(revision 2477)
@@ -0,0 +1,31 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 4 -*-
+//
+// hash.h: Rcpp R/C++ interface class library -- hashing
+//
+// Copyright (C) 2012  Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef RCPP__HASH__HASH_H
+#define RCPP__HASH__HASH_H
+
+#include <inttypes.h>			// needed with g++-4.7 to declare intptr_t
+
+#include <Rcpp/hash/IndexHash.h>
+#include <Rcpp/hash/SelfHash.h>
+
+#endif
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/platform/compiler.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/platform/compiler.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/platform/compiler.h	(revision 2477)
@@ -0,0 +1,196 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+//
+// compiler.h: Rcpp R/C++ interface class library -- check compiler
+//
+// Copyright (C) 2012 - 2013  Dirk Eddelbuettel, Romain Francois, and Kevin Ushey
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__platform__compiler_h
+#define Rcpp__platform__compiler_h
+
+// NB: A vast list valid identifiers is at these wiki pages:
+//     http://sourceforge.net/p/predef/wiki/Home/
+
+#undef GOOD_COMPILER_FOR_RCPP
+#ifdef __GNUC__
+#define GOOD_COMPILER_FOR_RCPP
+#endif
+#ifdef __SUNPRO_CC
+#define GOOD_COMPILER_FOR_RCPP
+#endif
+#ifdef __clang__
+#define GOOD_COMPILER_FOR_RCPP
+#endif
+#ifdef __INTEL_COMPILER
+#define GOOD_COMPILER_FOR_RCPP
+#endif
+
+#ifndef GOOD_COMPILER_FOR_RCPP
+# error "This compiler is not supported"
+#endif
+
+#ifdef __GNUC__
+    #define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
+    // g++ 4.5 does not seem to like some of the fast indexing
+    #if GCC_VERSION >= 40500
+        #define IS_GCC_450_OR_LATER
+    #endif
+    // g++ 4.6 switches from exception_defines.h to bits/exception_defines.h
+    #if GCC_VERSION < 40600
+        #define IS_EARLIER_THAN_GCC_460
+    #endif
+    #if GCC_VERSION >= 40600
+        #define IS_GCC_460_OR_LATER
+    #endif
+#endif
+
+// Check for the presence of C++0x (or later) support
+#if defined(__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus >= 201103L)
+  #define RCPP_USING_CXX0X_OR_LATER
+#endif
+
+// Check C++0x/11 features
+#if defined(__INTEL_COMPILER)
+    #if __cplusplus >= 201103L
+        #define RCPP_USING_CXX11
+        #if __INTEL_COMPILER >= 1210
+            // #define HAS_VARIADIC_TEMPLATES
+        #endif
+        #if __INTEL_COMPILER >= 1100
+            #define HAS_STATIC_ASSERT
+        #endif
+    #endif
+#elif defined(__clang__)
+    #if __cplusplus >= 201103L
+        #define RCPP_USING_CXX11
+        #if __has_feature(cxx_variadic_templates)
+            // #define HAS_VARIADIC_TEMPLATES
+        #endif
+        #if __has_feature(cxx_static_assert)
+            #define HAS_STATIC_ASSERT
+        #endif
+    #endif
+#elif defined(__GNUC__)
+    #ifdef __GXX_EXPERIMENTAL_CXX0X__
+        #if GCC_VERSION >= 40300
+            // #define HAS_VARIADIC_TEMPLATES
+            #define HAS_STATIC_ASSERT
+        #endif
+    #endif
+	#if GCC_VERSION >= 40800 && __cplusplus >= 201103L
+		#define RCPP_USING_CXX11
+	#endif
+#endif
+
+// Check C++0x headers
+#include <cmath>
+#if defined(__INTEL_COMPILER) || (defined(__GNUC__) && !defined(__clang__))
+    #if defined(__GLIBCXX__) && defined(__GXX_EXPERIMENTAL_CXX0X__)
+        #if GCC_VERSION >= 40400
+            #define HAS_CXX0X_UNORDERED_MAP
+            #define HAS_CXX0X_UNORDERED_SET
+            #define HAS_CXX0X_INITIALIZER_LIST
+        #endif
+    #endif
+#elif defined(__clang__)
+    #if __cplusplus >= 201103L
+        #if __has_include(<unordered_map>)
+            #define HAS_CXX0X_UNORDERED_MAP
+        #endif
+        #if __has_include(<unordered_set>)
+            #define HAS_CXX0X_UNORDERED_SET
+        #endif
+        #if __has_include(<initializer_list>)
+            #define HAS_CXX0X_INITIALIZER_LIST
+        #endif
+    #endif
+#endif
+
+// Check TR1 Headers
+#if defined(__INTEL_COMPILER) || (defined(__GNUC__) && !defined(__clang__))
+    #if defined(__GLIBCXX__)
+        #if GCC_VERSION >= 40400 || ( GCC_VERSION >= 40201 && defined(__APPLE__) )
+            #define HAS_TR1_UNORDERED_MAP
+            #define HAS_TR1_UNORDERED_SET
+        #endif
+    #endif
+#elif defined(__clang__)
+    #if __cplusplus >= 201103L
+        #if __has_include(<tr1/unordered_map>)
+            #define HAS_TR1_UNORDERED_MAP
+        #endif
+        #if __has_include(<tr1/unordered_set>)
+            #define HAS_TR1_UNORDERED_SET
+        #endif
+    #endif
+#endif
+
+#if defined(HAS_TR1_UNORDERED_MAP) && defined(HAS_TR1_UNORDERED_SET)
+#define HAS_TR1
+#endif
+
+// Conditionally include headers
+#ifdef HAS_CXX0X_INITIALIZER_LIST
+#include <initializer_list>
+#endif
+
+#ifdef RCPP_USING_CXX11
+    #if defined(HAS_CXX0X_UNORDERED_MAP)
+        #include <unordered_map>
+        #define RCPP_USING_UNORDERED_MAP
+        #define RCPP_UNORDERED_MAP std::unordered_map
+    #else
+        #include <map>
+        #define RCPP_USING_MAP
+        #define RCPP_UNORDERED_MAP std::map
+    #endif
+    #if defined(HAS_CXX0X_UNORDERED_SET)
+        #include <unordered_set>
+        #define RCPP_USING_UNORDERED_SET
+        #define RCPP_UNORDERED_SET std::unordered_set
+    #else
+        #include <set>
+        #define RCPP_USING_SET
+        #define RCPP_UNORDERED_SET std::set
+    #endif
+#else
+    #if defined(HAS_TR1_UNORDERED_MAP)
+        #include <tr1/unordered_map>
+        #define RCPP_USING_TR1_UNORDERED_MAP
+        #define RCPP_UNORDERED_MAP std::tr1::unordered_map
+    #else
+        #include <map>
+        #define RCPP_USING_MAP
+        #define RCPP_UNORDERED_MAP std::map
+    #endif
+    #if defined(HAS_TR1_UNORDERED_SET)
+        #include <tr1/unordered_set>
+        #define RCPP_USING_TR1_UNORDERED_SET
+        #define RCPP_UNORDERED_SET std::tr1::unordered_set
+    #else
+        #include <set>
+        #define RCPP_USING_SET
+        #define RCPP_UNORDERED_SET std::set
+    #endif
+#endif
+
+#ifdef __GNUC__
+  #define RCPP_HAS_DEMANGLING
+#endif
+
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/platform/solaris.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/platform/solaris.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/platform/solaris.h	(revision 2477)
@@ -0,0 +1,70 @@
+// Copyright (C) 2014  Romain Francois
+
+#ifndef Rcpp__platform__solaris_h
+#define Rcpp__platform__solaris_h
+
+#ifdef __SUNPRO_CC
+
+namespace Rcpp{
+namespace traits{
+
+  template <typename T> struct is_convertible< std::list<T>, SEXP> : public false_type{} ;
+  template <typename T> struct is_convertible< std::set<T>, SEXP> : public false_type{} ;
+  template <typename T> struct is_convertible< std::vector<T>, SEXP> : public false_type{} ;
+  template <typename T> struct is_convertible< std::deque<T>, SEXP> : public false_type{} ;
+
+  template <typename KEY, typename VALUE>
+  struct is_convertible< std::map<KEY,VALUE>, SEXP> : public false_type{} ;
+
+  template <typename KEY, typename VALUE>
+  struct is_convertible< std::multimap<KEY,VALUE>, SEXP> : public false_type{} ;
+
+  template <> struct is_convertible<Range,SEXP> : public false_type{} ;
+
+  #if !defined(RCPP_NO_SUGAR)
+  template <int RTYPE, bool NA, typename T>
+  struct is_convertible< sugar::Minus_Vector_Primitive< RTYPE, NA, T >, SEXP> : public false_type{} ;
+
+  template <int RTYPE, bool NA, typename T>
+  struct is_convertible< sugar::Plus_Vector_Primitive< RTYPE, NA, T >, SEXP> : public false_type{} ;
+
+  template <int RTYPE, bool LHS_NA, typename LHS_T, bool RHS_NA, typename RHS_T >
+  struct is_convertible< sugar::Plus_Vector_Vector< RTYPE, LHS_NA, LHS_T, RHS_NA, RHS_T >, SEXP> : public false_type{} ;
+
+  template <int RTYPE, bool LHS_NA, typename LHS_T, bool RHS_NA, typename RHS_T >
+  struct is_convertible< sugar::Minus_Vector_Vector< RTYPE, LHS_NA, LHS_T, RHS_NA, RHS_T >, SEXP> : public false_type{} ;
+
+  template <int RTYPE, bool LHS_NA, typename LHS_T, bool RHS_NA, typename RHS_T >
+  struct is_convertible< sugar::Times_Vector_Vector< RTYPE, LHS_NA, LHS_T, RHS_NA, RHS_T >, SEXP> : public false_type{} ;
+
+  template <int RTYPE, bool LHS_NA, typename LHS_T, bool RHS_NA, typename RHS_T >
+  struct is_convertible< sugar::Divides_Vector_Vector< RTYPE, LHS_NA, LHS_T, RHS_NA, RHS_T >, SEXP> : public false_type{} ;
+
+  template <
+	  int RTYPE,
+	  bool COND_NA, typename COND_T,
+	  bool RHS_NA , typename RHS_T
+	>
+	struct is_convertible< sugar::IfElse_Primitive_Vector<RTYPE,COND_NA,COND_T,RHS_NA,RHS_T> , SEXP > : public false_type{} ;
+
+	template <
+	  int RTYPE,
+	  bool COND_NA, typename COND_T
+	>
+	struct is_convertible< sugar::IfElse_Primitive_Primitive<RTYPE,COND_NA,COND_T>, SEXP > : public false_type{} ;
+
+  #endif
+
+  template <int RTYPE>
+  struct is_convertible< MatrixRow<RTYPE>, SEXP> : public false_type{} ;
+
+  template <int RTYPE>
+  struct is_convertible< MatrixColumn<RTYPE>, SEXP> : public false_type{} ;
+
+}
+}
+
+
+#endif
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/Benchmark/Timer.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/Benchmark/Timer.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/Benchmark/Timer.h	(revision 2477)
@@ -0,0 +1,147 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+//
+// Timer.h: Rcpp R/C++ interface class library -- Rcpp benchmark utility
+//
+// Copyright (C) 2012 - 2014  JJ Allaire, Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef RCPP_BENCHMARH_TIMER_H
+#define RCPP_BENCHMARH_TIMER_H
+
+#include <stdint.h>
+#include <vector>
+#include <string>
+
+#define R_NO_REMAP
+#include <Rinternals.h>
+
+#if defined(_WIN32)
+    #define WIN32_LEAN_AND_MEAN
+    #include <windows.h>
+#elif defined(__APPLE__)
+    #include <mach/mach_time.h>
+#elif defined(linux) || defined(__linux) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__GLIBC__) || defined(__GNU__) || defined(__CYGWIN__)
+    #include <time.h>
+#elif defined(sun) || defined(__sun) || defined(_AIX)
+    #include <sys/time.h>
+#else /* Unsupported OS */
+    #error "Rcpp::Timer not supported by your OS."
+#endif
+
+namespace Rcpp{
+
+    typedef uint64_t nanotime_t;
+
+#if defined(_WIN32)
+
+    inline nanotime_t get_nanotime(void) {
+        LARGE_INTEGER time_var, frequency;
+        QueryPerformanceCounter(&time_var);
+        QueryPerformanceFrequency(&frequency);
+
+        /* Convert to nanoseconds */
+        return 1.0e9 * time_var.QuadPart / frequency.QuadPart;
+    }
+
+#elif defined(__APPLE__)
+
+    inline nanotime_t get_nanotime(void) {
+        nanotime_t time;
+        mach_timebase_info_data_t info;
+
+        time = mach_absolute_time();
+        mach_timebase_info(&info);
+
+        /* Convert to nanoseconds */
+        return time * (info.numer / info.denom);
+    }
+
+#elif defined(linux) || defined(__linux) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__GLIBC__) || defined(__GNU__) || defined(__CYGWIN__)
+
+    static const nanotime_t nanoseconds_in_second = static_cast<nanotime_t>(1000000000.0);
+
+    inline nanotime_t get_nanotime(void) {
+        struct timespec time_var;
+
+        /* Possible other values we could have used are CLOCK_MONOTONIC,
+         * which is takes longer to retrieve and CLOCK_PROCESS_CPUTIME_ID
+         * which, if I understand it correctly, would require the R
+         * process to be bound to one core.
+         */
+        clock_gettime(CLOCK_REALTIME, &time_var);
+
+        nanotime_t sec = time_var.tv_sec;
+        nanotime_t nsec = time_var.tv_nsec;
+
+        /* Combine both values to one nanoseconds value */
+        return (nanoseconds_in_second * sec) + nsec;
+    }
+
+#elif defined(sun) || defined(__sun) || defined(_AIX)
+
+    /* short an sweet! */
+    inline nanotime_t get_nanotime(void) {
+        return gethrtime();
+    }
+
+#endif
+
+    class Timer {
+    public:
+        Timer() : data(), start_time( get_nanotime() ){}
+        Timer(nanotime_t start_time_) : data(), start_time(start_time_){}
+
+        void step( const std::string& name){
+            data.push_back(std::make_pair(name, now()));
+        }
+
+        operator SEXP() const {
+            size_t n = data.size();
+            NumericVector out(n);
+            CharacterVector names(n);
+            for (size_t i=0; i<n; i++) {
+                names[i] = data[i].first;
+                out[i] = data[i].second - start_time ;
+            }
+            out.attr("names") = names;
+            return out;
+        }
+        
+        static std::vector<Timer> get_timers(int n){
+            return std::vector<Timer>( n, Timer() ) ;
+        }
+        
+        inline nanotime_t now() const {
+            return get_nanotime() ;
+        }
+        
+        inline nanotime_t origin() const {
+            return start_time ;    
+        }
+
+    private:
+        typedef std::pair<std::string,nanotime_t> Step;
+        typedef std::vector<Step> Steps;
+
+        Steps data;
+        const nanotime_t start_time;
+    };
+
+}
+
+#endif
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/generated/Function__operator.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/generated/Function__operator.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/generated/Function__operator.h	(revision 2477)
@@ -0,0 +1,135 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// Function__operator.h: Rcpp R/C++ interface class library -- generated helper code for Function.h
+//
+// Copyright (C) 2010 - 2013 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__generated__Function_operator_h
+#define Rcpp__generated__Function_operator_h
+
+/* <code-bloat>
+
+	template <TYPENAMES>
+	SEXP operator()(ARGUMENTS){
+		return Rcpp_eval( Rf_lang2( Storage::get__(), pairlist(PARAMETERS) ) ) ;
+	}
+
+*/
+	template <typename T1>
+	SEXP operator()(const T1& t1) const {
+		return Rcpp_eval( Rcpp_lcons( Storage::get__(), pairlist(t1) ) ) ;
+	}
+
+	template <typename T1, typename T2>
+	SEXP operator()(const T1& t1, const T2& t2) const {
+		return Rcpp_eval( Rcpp_lcons( Storage::get__(), pairlist(t1, t2) ) ) ;
+	}
+
+	template <typename T1, typename T2, typename T3>
+	SEXP operator()(const T1& t1, const T2& t2, const T3& t3) const {
+		return Rcpp_eval( Rcpp_lcons( Storage::get__(), pairlist(t1, t2, t3) ) ) ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4>
+	SEXP operator()(const T1& t1, const T2& t2, const T3& t3, const T4& t4) const {
+		return Rcpp_eval( Rcpp_lcons( Storage::get__(), pairlist(t1, t2, t3, t4) ) ) ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5>
+	SEXP operator()(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5) const {
+		return Rcpp_eval( Rcpp_lcons( Storage::get__(), pairlist(t1, t2, t3, t4, t5) ) ) ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>
+	SEXP operator()(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6) const {
+		return Rcpp_eval( Rcpp_lcons( Storage::get__(), pairlist(t1, t2, t3, t4, t5, t6) ) ) ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7>
+	SEXP operator()(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7) const {
+		return Rcpp_eval( Rcpp_lcons( Storage::get__(), pairlist(t1, t2, t3, t4, t5, t6, t7) ) ) ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8>
+	SEXP operator()(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8) const {
+		return Rcpp_eval( Rcpp_lcons( Storage::get__(), pairlist(t1, t2, t3, t4, t5, t6, t7, t8) ) ) ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9>
+	SEXP operator()(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9) const {
+		return Rcpp_eval( Rcpp_lcons( Storage::get__(), pairlist(t1, t2, t3, t4, t5, t6, t7, t8, t9) ) ) ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10>
+	SEXP operator()(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10) const {
+		return Rcpp_eval( Rcpp_lcons( Storage::get__(), pairlist(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10) ) ) ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11>
+	SEXP operator()(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11) const {
+		return Rcpp_eval( Rcpp_lcons( Storage::get__(), pairlist(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11) ) ) ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12>
+	SEXP operator()(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12) const {
+		return Rcpp_eval( Rcpp_lcons( Storage::get__(), pairlist(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12) ) ) ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13>
+	SEXP operator()(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13) const {
+		return Rcpp_eval( Rcpp_lcons( Storage::get__(), pairlist(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13) ) ) ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14>
+	SEXP operator()(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14) const {
+		return Rcpp_eval( Rcpp_lcons( Storage::get__(), pairlist(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14) ) ) ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15>
+	SEXP operator()(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15) const {
+		return Rcpp_eval( Rcpp_lcons( Storage::get__(), pairlist(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15) ) ) ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16>
+	SEXP operator()(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16) const {
+		return Rcpp_eval( Rcpp_lcons( Storage::get__(), pairlist(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16) ) ) ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17>
+	SEXP operator()(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17) const {
+		return Rcpp_eval( Rcpp_lcons( Storage::get__(), pairlist(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17) ) ) ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18>
+	SEXP operator()(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18) const {
+		return Rcpp_eval( Rcpp_lcons( Storage::get__(), pairlist(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18) ) ) ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19>
+	SEXP operator()(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19) const {
+		return Rcpp_eval( Rcpp_lcons( Storage::get__(), pairlist(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19) ) ) ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19, typename T20>
+	SEXP operator()(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19, const T20& t20) const {
+		return Rcpp_eval( Rcpp_lcons( Storage::get__(), pairlist(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20) ) ) ;
+	}
+
+/* </code-bloat> */
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/generated/Pairlist__ctors.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/generated/Pairlist__ctors.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/generated/Pairlist__ctors.h	(revision 2477)
@@ -0,0 +1,125 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// Pairlist__ctors.h: Rcpp R/C++ interface class library -- generated helper code for Pairlist.h
+//
+// Copyright (C) 2010 - 2013 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__generated__Pairlist_ctors_h
+#define Rcpp__generated__Pairlist_ctors_h
+
+	template <typename T1>
+	Pairlist_Impl( const T1& t1 ){
+		Storage::set__( pairlist( t1 ) ) ;
+	}
+
+	template <typename T1, typename T2>
+	Pairlist_Impl( const T1& t1, const T2& t2 ){
+		Storage::set__( pairlist( t1, t2 ) ) ;
+	}
+
+	template <typename T1, typename T2, typename T3>
+	Pairlist_Impl( const T1& t1, const T2& t2, const T3& t3 ){
+		Storage::set__( pairlist( t1, t2, t3 ) ) ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4>
+	Pairlist_Impl( const T1& t1, const T2& t2, const T3& t3, const T4& t4 ){
+		Storage::set__( pairlist( t1, t2, t3, t4 ) ) ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5>
+	Pairlist_Impl( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5 ){
+		Storage::set__( pairlist( t1, t2, t3, t4, t5 ) ) ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>
+	Pairlist_Impl( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6 ){
+		Storage::set__( pairlist( t1, t2, t3, t4, t5, t6 ) ) ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7>
+	Pairlist_Impl( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7 ){
+		Storage::set__( pairlist( t1, t2, t3, t4, t5, t6, t7 ) ) ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8>
+	Pairlist_Impl( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8 ){
+		Storage::set__( pairlist( t1, t2, t3, t4, t5, t6, t7, t8 ) ) ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9>
+	Pairlist_Impl( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9 ){
+		Storage::set__( pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9 ) ) ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10>
+	Pairlist_Impl( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10 ){
+		Storage::set__( pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10 ) ) ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11>
+	Pairlist_Impl( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11 ){
+		Storage::set__( pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11 ) ) ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12>
+	Pairlist_Impl( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12 ){
+		Storage::set__( pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12 ) ) ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13>
+	Pairlist_Impl( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13 ){
+		Storage::set__( pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13 ) ) ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14>
+	Pairlist_Impl( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14 ){
+		Storage::set__( pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14 ) ) ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15>
+	Pairlist_Impl( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15 ){
+		Storage::set__( pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15 ) ) ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16>
+	Pairlist_Impl( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16 ){
+		Storage::set__( pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16 ) ) ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17>
+	Pairlist_Impl( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17 ){
+		Storage::set__( pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17 ) ) ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18>
+	Pairlist_Impl( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18 ){
+		Storage::set__( pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18 ) ) ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19>
+	Pairlist_Impl( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19 ){
+		Storage::set__( pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19 ) ) ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19, typename T20>
+	Pairlist_Impl( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19, const T20& t20 ){
+		Storage::set__( pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20 ) ) ;
+	}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/generated/DataFrame_generated.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/generated/DataFrame_generated.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/generated/DataFrame_generated.h	(revision 2477)
@@ -0,0 +1,147 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+//
+// DataFrame_generated.h: Rcpp R/C++ interface class library -- data frames
+//
+// Copyright (C) 2010 - 2013  Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+
+#ifndef Rcpp__DataFrame_generated_h
+#define Rcpp__DataFrame_generated_h
+
+
+template <typename T1>
+static DataFrame_Impl create( const T1& t1 ) {
+    return DataFrame_Impl::from_list( Parent::create( t1 ) ) ;
+}
+
+
+template <typename T1, typename T2>
+static DataFrame_Impl create( const T1& t1, const T2& t2 ) {
+    return DataFrame_Impl::from_list( Parent::create( t1, t2 ) ) ;
+}
+
+
+template <typename T1, typename T2, typename T3>
+static DataFrame_Impl create( const T1& t1, const T2& t2, const T3& t3 ) {
+    return DataFrame_Impl::from_list( Parent::create( t1, t2, t3 ) ) ;
+}
+
+
+template <typename T1, typename T2, typename T3, typename T4>
+static DataFrame_Impl create( const T1& t1, const T2& t2, const T3& t3, const T4& t4 ) {
+    return DataFrame_Impl::from_list( Parent::create( t1, t2, t3, t4 ) ) ;
+}
+
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5>
+static DataFrame_Impl create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5 ) {
+    return DataFrame_Impl::from_list( Parent::create( t1, t2, t3, t4, t5 ) ) ;
+}
+
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>
+static DataFrame_Impl create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6 ) {
+    return DataFrame_Impl::from_list( Parent::create( t1, t2, t3, t4, t5, t6 ) ) ;
+}
+
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7>
+static DataFrame_Impl create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7 ) {
+    return DataFrame_Impl::from_list( Parent::create( t1, t2, t3, t4, t5, t6, t7 ) ) ;
+}
+
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8>
+static DataFrame_Impl create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8 ) {
+    return DataFrame_Impl::from_list( Parent::create( t1, t2, t3, t4, t5, t6, t7, t8 ) ) ;
+}
+
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9>
+static DataFrame_Impl create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9 ) {
+    return DataFrame_Impl::from_list( Parent::create( t1, t2, t3, t4, t5, t6, t7, t8, t9 ) ) ;
+}
+
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10>
+static DataFrame_Impl create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10 ) {
+    return DataFrame_Impl::from_list( Parent::create( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10 ) ) ;
+}
+
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11>
+static DataFrame_Impl create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11 ) {
+    return DataFrame_Impl::from_list( Parent::create( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11 ) ) ;
+}
+
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12>
+static DataFrame_Impl create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12 ) {
+    return DataFrame_Impl::from_list( Parent::create( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12 ) ) ;
+}
+
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13>
+static DataFrame_Impl create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13 ) {
+    return DataFrame_Impl::from_list( Parent::create( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13 ) ) ;
+}
+
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14>
+static DataFrame_Impl create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14 ) {
+    return DataFrame_Impl::from_list( Parent::create( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14 ) ) ;
+}
+
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15>
+static DataFrame_Impl create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15 ) {
+    return DataFrame_Impl::from_list( Parent::create( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15 ) ) ;
+}
+
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16>
+static DataFrame_Impl create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16 ) {
+    return DataFrame_Impl::from_list( Parent::create( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16 ) ) ;
+}
+
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17>
+static DataFrame_Impl create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17 ) {
+    return DataFrame_Impl::from_list( Parent::create( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17 ) ) ;
+}
+
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18>
+static DataFrame_Impl create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18 ) {
+    return DataFrame_Impl::from_list( Parent::create( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18 ) ) ;
+}
+
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19>
+static DataFrame_Impl create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19 ) {
+    return DataFrame_Impl::from_list( Parent::create( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19 ) ) ;
+}
+
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19, typename T20>
+static DataFrame_Impl create( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19, const T20& t20 ) {
+    return DataFrame_Impl::from_list( Parent::create( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20 ) ) ;
+}
+
+#endif
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/generated/Vector__create.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/generated/Vector__create.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/generated/Vector__create.h	(revision 2477)
@@ -0,0 +1,1229 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// Vector__create.h: Rcpp R/C++ interface class library -- generated helper code for Vector.h
+//
+// Copyright (C) 2010 - 2013 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__generated__Vector_create_h
+#define Rcpp__generated__Vector_create_h
+
+/* <code-bloat>
+
+public:
+
+	template <TYPENAMES>
+	static Vector create(ARGUMENTS){
+		return create__dispatch( typename traits::integral_constant<bool,
+			__OR__{{  traits::is_named<___T___>::value  }}
+		>::type(), PARAMETERS ) ;
+	}
+
+private:
+
+	template <TYPENAMES>
+	static Vector create__dispatch( traits::false_type, ARGUMENTS ){
+		Vector res(___N___) ;
+		iterator it( res.begin() );
+
+		////
+		__FOR_EACH__{{ *it = converter_type::get(___X___) ; ++it ; }}
+		////
+
+		return res ;
+	}
+
+	template <TYPENAMES>
+	static Vector create__dispatch( traits::true_type, ARGUMENTS){
+		Vector res( ___N___ ) ;
+		Shield<SEXP> names( ::Rf_allocVector( STRSXP, ___N___ ) ) ;
+		int index = 0 ;
+		iterator it( res.begin() );
+
+		////
+		__FOR_EACH__{{ replace_element( it, names, index, ___X___ ) ; ++it; ++index ; }}
+		////
+
+		res.attr("names") = names ;
+
+		return res ;
+	}
+
+*/
+public:
+
+	template <typename T1>
+	static Vector create(const T1& t1){
+		return create__dispatch( typename traits::integral_constant<bool,
+  traits::is_named<T1>::value
+		>::type(), t1 ) ;
+	}
+
+private:
+
+	template <typename T1>
+	static Vector create__dispatch( traits::false_type, const T1& t1 ){
+		Vector res(1) ;
+		iterator it( res.begin() );
+
+		////
+ *it = converter_type::get(t1) ; ++it ;
+		////
+
+		return res ;
+	}
+
+	template <typename T1>
+	static Vector create__dispatch( traits::true_type, const T1& t1){
+		Vector res( 1 ) ;
+		Shield<SEXP> names( ::Rf_allocVector( STRSXP, 1 ) ) ;
+		int index = 0 ;
+		iterator it( res.begin() );
+
+		////
+ replace_element( it, names, index, t1 ) ; ++it; ++index ;
+		////
+
+		res.attr("names") = names ;
+
+		return res ;
+	}
+
+public:
+
+	template <typename T1, typename T2>
+	static Vector create(const T1& t1, const T2& t2){
+		return create__dispatch( typename traits::integral_constant<bool,
+  traits::is_named<T1>::value  ||  traits::is_named<T2>::value
+		>::type(), t1, t2 ) ;
+	}
+
+private:
+
+	template <typename T1, typename T2>
+	static Vector create__dispatch( traits::false_type, const T1& t1, const T2& t2 ){
+		Vector res(2) ;
+		iterator it( res.begin() );
+
+		////
+ *it = converter_type::get(t1) ; ++it ;
+ *it = converter_type::get(t2) ; ++it ;
+		////
+
+		return res ;
+	}
+
+	template <typename T1, typename T2>
+	static Vector create__dispatch( traits::true_type, const T1& t1, const T2& t2){
+		Vector res( 2 ) ;
+		Shield<SEXP> names( ::Rf_allocVector( STRSXP, 2 ) ) ;
+		int index = 0 ;
+		iterator it( res.begin() );
+
+		////
+ replace_element( it, names, index, t1 ) ; ++it; ++index ;
+ replace_element( it, names, index, t2 ) ; ++it; ++index ;
+		////
+
+		res.attr("names") = names ;
+
+		return res ;
+	}
+
+public:
+
+	template <typename T1, typename T2, typename T3>
+	static Vector create(const T1& t1, const T2& t2, const T3& t3){
+		return create__dispatch( typename traits::integral_constant<bool,
+  traits::is_named<T1>::value  ||  traits::is_named<T2>::value  ||  traits::is_named<T3>::value
+		>::type(), t1, t2, t3 ) ;
+	}
+
+private:
+
+	template <typename T1, typename T2, typename T3>
+	static Vector create__dispatch( traits::false_type, const T1& t1, const T2& t2, const T3& t3 ){
+		Vector res(3) ;
+		iterator it( res.begin() );
+
+		////
+ *it = converter_type::get(t1) ; ++it ;
+ *it = converter_type::get(t2) ; ++it ;
+ *it = converter_type::get(t3) ; ++it ;
+		////
+
+		return res ;
+	}
+
+	template <typename T1, typename T2, typename T3>
+	static Vector create__dispatch( traits::true_type, const T1& t1, const T2& t2, const T3& t3){
+		Vector res( 3 ) ;
+		Shield<SEXP> names( ::Rf_allocVector( STRSXP, 3 ) ) ;
+		int index = 0 ;
+		iterator it( res.begin() );
+
+		////
+ replace_element( it, names, index, t1 ) ; ++it; ++index ;
+ replace_element( it, names, index, t2 ) ; ++it; ++index ;
+ replace_element( it, names, index, t3 ) ; ++it; ++index ;
+		////
+
+		res.attr("names") = names ;
+
+		return res ;
+	}
+
+public:
+
+	template <typename T1, typename T2, typename T3, typename T4>
+	static Vector create(const T1& t1, const T2& t2, const T3& t3, const T4& t4){
+		return create__dispatch( typename traits::integral_constant<bool,
+  traits::is_named<T1>::value  ||  traits::is_named<T2>::value  ||  traits::is_named<T3>::value  ||  traits::is_named<T4>::value
+		>::type(), t1, t2, t3, t4 ) ;
+	}
+
+private:
+
+	template <typename T1, typename T2, typename T3, typename T4>
+	static Vector create__dispatch( traits::false_type, const T1& t1, const T2& t2, const T3& t3, const T4& t4 ){
+		Vector res(4) ;
+		iterator it( res.begin() );
+
+		////
+ *it = converter_type::get(t1) ; ++it ;
+ *it = converter_type::get(t2) ; ++it ;
+ *it = converter_type::get(t3) ; ++it ;
+ *it = converter_type::get(t4) ; ++it ;
+		////
+
+		return res ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4>
+	static Vector create__dispatch( traits::true_type, const T1& t1, const T2& t2, const T3& t3, const T4& t4){
+		Vector res( 4 ) ;
+		Shield<SEXP> names( ::Rf_allocVector( STRSXP, 4 ) ) ;
+		int index = 0 ;
+		iterator it( res.begin() );
+
+		////
+ replace_element( it, names, index, t1 ) ; ++it; ++index ;
+ replace_element( it, names, index, t2 ) ; ++it; ++index ;
+ replace_element( it, names, index, t3 ) ; ++it; ++index ;
+ replace_element( it, names, index, t4 ) ; ++it; ++index ;
+		////
+
+		res.attr("names") = names ;
+
+		return res ;
+	}
+
+public:
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5>
+	static Vector create(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5){
+		return create__dispatch( typename traits::integral_constant<bool,
+  traits::is_named<T1>::value  ||  traits::is_named<T2>::value  ||  traits::is_named<T3>::value  ||  traits::is_named<T4>::value  ||  traits::is_named<T5>::value
+		>::type(), t1, t2, t3, t4, t5 ) ;
+	}
+
+private:
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5>
+	static Vector create__dispatch( traits::false_type, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5 ){
+		Vector res(5) ;
+		iterator it( res.begin() );
+
+		////
+ *it = converter_type::get(t1) ; ++it ;
+ *it = converter_type::get(t2) ; ++it ;
+ *it = converter_type::get(t3) ; ++it ;
+ *it = converter_type::get(t4) ; ++it ;
+ *it = converter_type::get(t5) ; ++it ;
+		////
+
+		return res ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5>
+	static Vector create__dispatch( traits::true_type, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5){
+		Vector res( 5 ) ;
+		Shield<SEXP> names( ::Rf_allocVector( STRSXP, 5 ) ) ;
+		int index = 0 ;
+		iterator it( res.begin() );
+
+		////
+ replace_element( it, names, index, t1 ) ; ++it; ++index ;
+ replace_element( it, names, index, t2 ) ; ++it; ++index ;
+ replace_element( it, names, index, t3 ) ; ++it; ++index ;
+ replace_element( it, names, index, t4 ) ; ++it; ++index ;
+ replace_element( it, names, index, t5 ) ; ++it; ++index ;
+		////
+
+		res.attr("names") = names ;
+
+		return res ;
+	}
+
+public:
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>
+	static Vector create(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6){
+		return create__dispatch( typename traits::integral_constant<bool,
+  traits::is_named<T1>::value  ||  traits::is_named<T2>::value  ||  traits::is_named<T3>::value  ||  traits::is_named<T4>::value  ||  traits::is_named<T5>::value  ||  traits::is_named<T6>::value
+		>::type(), t1, t2, t3, t4, t5, t6 ) ;
+	}
+
+private:
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>
+	static Vector create__dispatch( traits::false_type, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6 ){
+		Vector res(6) ;
+		iterator it( res.begin() );
+
+		////
+ *it = converter_type::get(t1) ; ++it ;
+ *it = converter_type::get(t2) ; ++it ;
+ *it = converter_type::get(t3) ; ++it ;
+ *it = converter_type::get(t4) ; ++it ;
+ *it = converter_type::get(t5) ; ++it ;
+ *it = converter_type::get(t6) ; ++it ;
+		////
+
+		return res ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>
+	static Vector create__dispatch( traits::true_type, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6){
+		Vector res( 6 ) ;
+		Shield<SEXP> names( ::Rf_allocVector( STRSXP, 6 ) ) ;
+		int index = 0 ;
+		iterator it( res.begin() );
+
+		////
+ replace_element( it, names, index, t1 ) ; ++it; ++index ;
+ replace_element( it, names, index, t2 ) ; ++it; ++index ;
+ replace_element( it, names, index, t3 ) ; ++it; ++index ;
+ replace_element( it, names, index, t4 ) ; ++it; ++index ;
+ replace_element( it, names, index, t5 ) ; ++it; ++index ;
+ replace_element( it, names, index, t6 ) ; ++it; ++index ;
+		////
+
+		res.attr("names") = names ;
+
+		return res ;
+	}
+
+public:
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7>
+	static Vector create(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7){
+		return create__dispatch( typename traits::integral_constant<bool,
+  traits::is_named<T1>::value  ||  traits::is_named<T2>::value  ||  traits::is_named<T3>::value  ||  traits::is_named<T4>::value  ||  traits::is_named<T5>::value  ||  traits::is_named<T6>::value  ||  traits::is_named<T7>::value
+		>::type(), t1, t2, t3, t4, t5, t6, t7 ) ;
+	}
+
+private:
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7>
+	static Vector create__dispatch( traits::false_type, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7 ){
+		Vector res(7) ;
+		iterator it( res.begin() );
+
+		////
+ *it = converter_type::get(t1) ; ++it ;
+ *it = converter_type::get(t2) ; ++it ;
+ *it = converter_type::get(t3) ; ++it ;
+ *it = converter_type::get(t4) ; ++it ;
+ *it = converter_type::get(t5) ; ++it ;
+ *it = converter_type::get(t6) ; ++it ;
+ *it = converter_type::get(t7) ; ++it ;
+		////
+
+		return res ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7>
+	static Vector create__dispatch( traits::true_type, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7){
+		Vector res( 7 ) ;
+		Shield<SEXP> names( ::Rf_allocVector( STRSXP, 7 ) ) ;
+		int index = 0 ;
+		iterator it( res.begin() );
+
+		////
+ replace_element( it, names, index, t1 ) ; ++it; ++index ;
+ replace_element( it, names, index, t2 ) ; ++it; ++index ;
+ replace_element( it, names, index, t3 ) ; ++it; ++index ;
+ replace_element( it, names, index, t4 ) ; ++it; ++index ;
+ replace_element( it, names, index, t5 ) ; ++it; ++index ;
+ replace_element( it, names, index, t6 ) ; ++it; ++index ;
+ replace_element( it, names, index, t7 ) ; ++it; ++index ;
+		////
+
+		res.attr("names") = names ;
+
+		return res ;
+	}
+
+public:
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8>
+	static Vector create(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8){
+		return create__dispatch( typename traits::integral_constant<bool,
+  traits::is_named<T1>::value  ||  traits::is_named<T2>::value  ||  traits::is_named<T3>::value  ||  traits::is_named<T4>::value  ||  traits::is_named<T5>::value  ||  traits::is_named<T6>::value  ||  traits::is_named<T7>::value  ||  traits::is_named<T8>::value
+		>::type(), t1, t2, t3, t4, t5, t6, t7, t8 ) ;
+	}
+
+private:
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8>
+	static Vector create__dispatch( traits::false_type, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8 ){
+		Vector res(8) ;
+		iterator it( res.begin() );
+
+		////
+ *it = converter_type::get(t1) ; ++it ;
+ *it = converter_type::get(t2) ; ++it ;
+ *it = converter_type::get(t3) ; ++it ;
+ *it = converter_type::get(t4) ; ++it ;
+ *it = converter_type::get(t5) ; ++it ;
+ *it = converter_type::get(t6) ; ++it ;
+ *it = converter_type::get(t7) ; ++it ;
+ *it = converter_type::get(t8) ; ++it ;
+		////
+
+		return res ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8>
+	static Vector create__dispatch( traits::true_type, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8){
+		Vector res( 8 ) ;
+		Shield<SEXP> names( ::Rf_allocVector( STRSXP, 8 ) ) ;
+		int index = 0 ;
+		iterator it( res.begin() );
+
+		////
+ replace_element( it, names, index, t1 ) ; ++it; ++index ;
+ replace_element( it, names, index, t2 ) ; ++it; ++index ;
+ replace_element( it, names, index, t3 ) ; ++it; ++index ;
+ replace_element( it, names, index, t4 ) ; ++it; ++index ;
+ replace_element( it, names, index, t5 ) ; ++it; ++index ;
+ replace_element( it, names, index, t6 ) ; ++it; ++index ;
+ replace_element( it, names, index, t7 ) ; ++it; ++index ;
+ replace_element( it, names, index, t8 ) ; ++it; ++index ;
+		////
+
+		res.attr("names") = names ;
+
+		return res ;
+	}
+
+public:
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9>
+	static Vector create(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9){
+		return create__dispatch( typename traits::integral_constant<bool,
+  traits::is_named<T1>::value  ||  traits::is_named<T2>::value  ||  traits::is_named<T3>::value  ||  traits::is_named<T4>::value  ||  traits::is_named<T5>::value  ||  traits::is_named<T6>::value  ||  traits::is_named<T7>::value  ||  traits::is_named<T8>::value  ||  traits::is_named<T9>::value
+		>::type(), t1, t2, t3, t4, t5, t6, t7, t8, t9 ) ;
+	}
+
+private:
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9>
+	static Vector create__dispatch( traits::false_type, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9 ){
+		Vector res(9) ;
+		iterator it( res.begin() );
+
+		////
+ *it = converter_type::get(t1) ; ++it ;
+ *it = converter_type::get(t2) ; ++it ;
+ *it = converter_type::get(t3) ; ++it ;
+ *it = converter_type::get(t4) ; ++it ;
+ *it = converter_type::get(t5) ; ++it ;
+ *it = converter_type::get(t6) ; ++it ;
+ *it = converter_type::get(t7) ; ++it ;
+ *it = converter_type::get(t8) ; ++it ;
+ *it = converter_type::get(t9) ; ++it ;
+		////
+
+		return res ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9>
+	static Vector create__dispatch( traits::true_type, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9){
+		Vector res( 9 ) ;
+		Shield<SEXP> names( ::Rf_allocVector( STRSXP, 9 ) ) ;
+		int index = 0 ;
+		iterator it( res.begin() );
+
+		////
+ replace_element( it, names, index, t1 ) ; ++it; ++index ;
+ replace_element( it, names, index, t2 ) ; ++it; ++index ;
+ replace_element( it, names, index, t3 ) ; ++it; ++index ;
+ replace_element( it, names, index, t4 ) ; ++it; ++index ;
+ replace_element( it, names, index, t5 ) ; ++it; ++index ;
+ replace_element( it, names, index, t6 ) ; ++it; ++index ;
+ replace_element( it, names, index, t7 ) ; ++it; ++index ;
+ replace_element( it, names, index, t8 ) ; ++it; ++index ;
+ replace_element( it, names, index, t9 ) ; ++it; ++index ;
+		////
+
+		res.attr("names") = names ;
+
+		return res ;
+	}
+
+public:
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10>
+	static Vector create(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10){
+		return create__dispatch( typename traits::integral_constant<bool,
+  traits::is_named<T1>::value  ||  traits::is_named<T2>::value  ||  traits::is_named<T3>::value  ||  traits::is_named<T4>::value  ||  traits::is_named<T5>::value  ||  traits::is_named<T6>::value  ||  traits::is_named<T7>::value  ||  traits::is_named<T8>::value  ||  traits::is_named<T9>::value  ||  traits::is_named<T10>::value
+		>::type(), t1, t2, t3, t4, t5, t6, t7, t8, t9, t10 ) ;
+	}
+
+private:
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10>
+	static Vector create__dispatch( traits::false_type, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10 ){
+		Vector res(10) ;
+		iterator it( res.begin() );
+
+		////
+ *it = converter_type::get(t1) ; ++it ;
+ *it = converter_type::get(t2) ; ++it ;
+ *it = converter_type::get(t3) ; ++it ;
+ *it = converter_type::get(t4) ; ++it ;
+ *it = converter_type::get(t5) ; ++it ;
+ *it = converter_type::get(t6) ; ++it ;
+ *it = converter_type::get(t7) ; ++it ;
+ *it = converter_type::get(t8) ; ++it ;
+ *it = converter_type::get(t9) ; ++it ;
+ *it = converter_type::get(t10) ; ++it ;
+		////
+
+		return res ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10>
+	static Vector create__dispatch( traits::true_type, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10){
+		Vector res( 10 ) ;
+		Shield<SEXP> names( ::Rf_allocVector( STRSXP, 10 ) ) ;
+		int index = 0 ;
+		iterator it( res.begin() );
+
+		////
+ replace_element( it, names, index, t1 ) ; ++it; ++index ;
+ replace_element( it, names, index, t2 ) ; ++it; ++index ;
+ replace_element( it, names, index, t3 ) ; ++it; ++index ;
+ replace_element( it, names, index, t4 ) ; ++it; ++index ;
+ replace_element( it, names, index, t5 ) ; ++it; ++index ;
+ replace_element( it, names, index, t6 ) ; ++it; ++index ;
+ replace_element( it, names, index, t7 ) ; ++it; ++index ;
+ replace_element( it, names, index, t8 ) ; ++it; ++index ;
+ replace_element( it, names, index, t9 ) ; ++it; ++index ;
+ replace_element( it, names, index, t10 ) ; ++it; ++index ;
+		////
+
+		res.attr("names") = names ;
+
+		return res ;
+	}
+
+public:
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11>
+	static Vector create(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11){
+		return create__dispatch( typename traits::integral_constant<bool,
+  traits::is_named<T1>::value  ||  traits::is_named<T2>::value  ||  traits::is_named<T3>::value  ||  traits::is_named<T4>::value  ||  traits::is_named<T5>::value  ||  traits::is_named<T6>::value  ||  traits::is_named<T7>::value  ||  traits::is_named<T8>::value  ||  traits::is_named<T9>::value  ||  traits::is_named<T10>::value  ||  traits::is_named<T11>::value
+		>::type(), t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11 ) ;
+	}
+
+private:
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11>
+	static Vector create__dispatch( traits::false_type, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11 ){
+		Vector res(11) ;
+		iterator it( res.begin() );
+
+		////
+ *it = converter_type::get(t1) ; ++it ;
+ *it = converter_type::get(t2) ; ++it ;
+ *it = converter_type::get(t3) ; ++it ;
+ *it = converter_type::get(t4) ; ++it ;
+ *it = converter_type::get(t5) ; ++it ;
+ *it = converter_type::get(t6) ; ++it ;
+ *it = converter_type::get(t7) ; ++it ;
+ *it = converter_type::get(t8) ; ++it ;
+ *it = converter_type::get(t9) ; ++it ;
+ *it = converter_type::get(t10) ; ++it ;
+ *it = converter_type::get(t11) ; ++it ;
+		////
+
+		return res ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11>
+	static Vector create__dispatch( traits::true_type, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11){
+		Vector res( 11 ) ;
+		Shield<SEXP> names( ::Rf_allocVector( STRSXP, 11 ) ) ;
+		int index = 0 ;
+		iterator it( res.begin() );
+
+		////
+ replace_element( it, names, index, t1 ) ; ++it; ++index ;
+ replace_element( it, names, index, t2 ) ; ++it; ++index ;
+ replace_element( it, names, index, t3 ) ; ++it; ++index ;
+ replace_element( it, names, index, t4 ) ; ++it; ++index ;
+ replace_element( it, names, index, t5 ) ; ++it; ++index ;
+ replace_element( it, names, index, t6 ) ; ++it; ++index ;
+ replace_element( it, names, index, t7 ) ; ++it; ++index ;
+ replace_element( it, names, index, t8 ) ; ++it; ++index ;
+ replace_element( it, names, index, t9 ) ; ++it; ++index ;
+ replace_element( it, names, index, t10 ) ; ++it; ++index ;
+ replace_element( it, names, index, t11 ) ; ++it; ++index ;
+		////
+
+		res.attr("names") = names ;
+
+		return res ;
+	}
+
+public:
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12>
+	static Vector create(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12){
+		return create__dispatch( typename traits::integral_constant<bool,
+  traits::is_named<T1>::value  ||  traits::is_named<T2>::value  ||  traits::is_named<T3>::value  ||  traits::is_named<T4>::value  ||  traits::is_named<T5>::value  ||  traits::is_named<T6>::value  ||  traits::is_named<T7>::value  ||  traits::is_named<T8>::value  ||  traits::is_named<T9>::value  ||  traits::is_named<T10>::value  ||  traits::is_named<T11>::value  ||  traits::is_named<T12>::value
+		>::type(), t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12 ) ;
+	}
+
+private:
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12>
+	static Vector create__dispatch( traits::false_type, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12 ){
+		Vector res(12) ;
+		iterator it( res.begin() );
+
+		////
+ *it = converter_type::get(t1) ; ++it ;
+ *it = converter_type::get(t2) ; ++it ;
+ *it = converter_type::get(t3) ; ++it ;
+ *it = converter_type::get(t4) ; ++it ;
+ *it = converter_type::get(t5) ; ++it ;
+ *it = converter_type::get(t6) ; ++it ;
+ *it = converter_type::get(t7) ; ++it ;
+ *it = converter_type::get(t8) ; ++it ;
+ *it = converter_type::get(t9) ; ++it ;
+ *it = converter_type::get(t10) ; ++it ;
+ *it = converter_type::get(t11) ; ++it ;
+ *it = converter_type::get(t12) ; ++it ;
+		////
+
+		return res ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12>
+	static Vector create__dispatch( traits::true_type, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12){
+		Vector res( 12 ) ;
+		Shield<SEXP> names( ::Rf_allocVector( STRSXP, 12 ) ) ;
+		int index = 0 ;
+		iterator it( res.begin() );
+
+		////
+ replace_element( it, names, index, t1 ) ; ++it; ++index ;
+ replace_element( it, names, index, t2 ) ; ++it; ++index ;
+ replace_element( it, names, index, t3 ) ; ++it; ++index ;
+ replace_element( it, names, index, t4 ) ; ++it; ++index ;
+ replace_element( it, names, index, t5 ) ; ++it; ++index ;
+ replace_element( it, names, index, t6 ) ; ++it; ++index ;
+ replace_element( it, names, index, t7 ) ; ++it; ++index ;
+ replace_element( it, names, index, t8 ) ; ++it; ++index ;
+ replace_element( it, names, index, t9 ) ; ++it; ++index ;
+ replace_element( it, names, index, t10 ) ; ++it; ++index ;
+ replace_element( it, names, index, t11 ) ; ++it; ++index ;
+ replace_element( it, names, index, t12 ) ; ++it; ++index ;
+		////
+
+		res.attr("names") = names ;
+
+		return res ;
+	}
+
+public:
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13>
+	static Vector create(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13){
+		return create__dispatch( typename traits::integral_constant<bool,
+  traits::is_named<T1>::value  ||  traits::is_named<T2>::value  ||  traits::is_named<T3>::value  ||  traits::is_named<T4>::value  ||  traits::is_named<T5>::value  ||  traits::is_named<T6>::value  ||  traits::is_named<T7>::value  ||  traits::is_named<T8>::value  ||  traits::is_named<T9>::value  ||  traits::is_named<T10>::value  ||  traits::is_named<T11>::value  ||  traits::is_named<T12>::value  ||  traits::is_named<T13>::value
+		>::type(), t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13 ) ;
+	}
+
+private:
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13>
+	static Vector create__dispatch( traits::false_type, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13 ){
+		Vector res(13) ;
+		iterator it( res.begin() );
+
+		////
+ *it = converter_type::get(t1) ; ++it ;
+ *it = converter_type::get(t2) ; ++it ;
+ *it = converter_type::get(t3) ; ++it ;
+ *it = converter_type::get(t4) ; ++it ;
+ *it = converter_type::get(t5) ; ++it ;
+ *it = converter_type::get(t6) ; ++it ;
+ *it = converter_type::get(t7) ; ++it ;
+ *it = converter_type::get(t8) ; ++it ;
+ *it = converter_type::get(t9) ; ++it ;
+ *it = converter_type::get(t10) ; ++it ;
+ *it = converter_type::get(t11) ; ++it ;
+ *it = converter_type::get(t12) ; ++it ;
+ *it = converter_type::get(t13) ; ++it ;
+		////
+
+		return res ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13>
+	static Vector create__dispatch( traits::true_type, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13){
+		Vector res( 13 ) ;
+		Shield<SEXP> names( ::Rf_allocVector( STRSXP, 13 ) ) ;
+		int index = 0 ;
+		iterator it( res.begin() );
+
+		////
+ replace_element( it, names, index, t1 ) ; ++it; ++index ;
+ replace_element( it, names, index, t2 ) ; ++it; ++index ;
+ replace_element( it, names, index, t3 ) ; ++it; ++index ;
+ replace_element( it, names, index, t4 ) ; ++it; ++index ;
+ replace_element( it, names, index, t5 ) ; ++it; ++index ;
+ replace_element( it, names, index, t6 ) ; ++it; ++index ;
+ replace_element( it, names, index, t7 ) ; ++it; ++index ;
+ replace_element( it, names, index, t8 ) ; ++it; ++index ;
+ replace_element( it, names, index, t9 ) ; ++it; ++index ;
+ replace_element( it, names, index, t10 ) ; ++it; ++index ;
+ replace_element( it, names, index, t11 ) ; ++it; ++index ;
+ replace_element( it, names, index, t12 ) ; ++it; ++index ;
+ replace_element( it, names, index, t13 ) ; ++it; ++index ;
+		////
+
+		res.attr("names") = names ;
+
+		return res ;
+	}
+
+public:
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14>
+	static Vector create(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14){
+		return create__dispatch( typename traits::integral_constant<bool,
+  traits::is_named<T1>::value  ||  traits::is_named<T2>::value  ||  traits::is_named<T3>::value  ||  traits::is_named<T4>::value  ||  traits::is_named<T5>::value  ||  traits::is_named<T6>::value  ||  traits::is_named<T7>::value  ||  traits::is_named<T8>::value  ||  traits::is_named<T9>::value  ||  traits::is_named<T10>::value  ||  traits::is_named<T11>::value  ||  traits::is_named<T12>::value  ||  traits::is_named<T13>::value  ||  traits::is_named<T14>::value
+		>::type(), t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14 ) ;
+	}
+
+private:
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14>
+	static Vector create__dispatch( traits::false_type, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14 ){
+		Vector res(14) ;
+		iterator it( res.begin() );
+
+		////
+ *it = converter_type::get(t1) ; ++it ;
+ *it = converter_type::get(t2) ; ++it ;
+ *it = converter_type::get(t3) ; ++it ;
+ *it = converter_type::get(t4) ; ++it ;
+ *it = converter_type::get(t5) ; ++it ;
+ *it = converter_type::get(t6) ; ++it ;
+ *it = converter_type::get(t7) ; ++it ;
+ *it = converter_type::get(t8) ; ++it ;
+ *it = converter_type::get(t9) ; ++it ;
+ *it = converter_type::get(t10) ; ++it ;
+ *it = converter_type::get(t11) ; ++it ;
+ *it = converter_type::get(t12) ; ++it ;
+ *it = converter_type::get(t13) ; ++it ;
+ *it = converter_type::get(t14) ; ++it ;
+		////
+
+		return res ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14>
+	static Vector create__dispatch( traits::true_type, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14){
+		Vector res( 14 ) ;
+		Shield<SEXP> names( ::Rf_allocVector( STRSXP, 14 ) ) ;
+		int index = 0 ;
+		iterator it( res.begin() );
+
+		////
+ replace_element( it, names, index, t1 ) ; ++it; ++index ;
+ replace_element( it, names, index, t2 ) ; ++it; ++index ;
+ replace_element( it, names, index, t3 ) ; ++it; ++index ;
+ replace_element( it, names, index, t4 ) ; ++it; ++index ;
+ replace_element( it, names, index, t5 ) ; ++it; ++index ;
+ replace_element( it, names, index, t6 ) ; ++it; ++index ;
+ replace_element( it, names, index, t7 ) ; ++it; ++index ;
+ replace_element( it, names, index, t8 ) ; ++it; ++index ;
+ replace_element( it, names, index, t9 ) ; ++it; ++index ;
+ replace_element( it, names, index, t10 ) ; ++it; ++index ;
+ replace_element( it, names, index, t11 ) ; ++it; ++index ;
+ replace_element( it, names, index, t12 ) ; ++it; ++index ;
+ replace_element( it, names, index, t13 ) ; ++it; ++index ;
+ replace_element( it, names, index, t14 ) ; ++it; ++index ;
+		////
+
+		res.attr("names") = names ;
+
+		return res ;
+	}
+
+public:
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15>
+	static Vector create(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15){
+		return create__dispatch( typename traits::integral_constant<bool,
+  traits::is_named<T1>::value  ||  traits::is_named<T2>::value  ||  traits::is_named<T3>::value  ||  traits::is_named<T4>::value  ||  traits::is_named<T5>::value  ||  traits::is_named<T6>::value  ||  traits::is_named<T7>::value  ||  traits::is_named<T8>::value  ||  traits::is_named<T9>::value  ||  traits::is_named<T10>::value  ||  traits::is_named<T11>::value  ||  traits::is_named<T12>::value  ||  traits::is_named<T13>::value  ||  traits::is_named<T14>::value  ||  traits::is_named<T15>::value
+		>::type(), t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15 ) ;
+	}
+
+private:
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15>
+	static Vector create__dispatch( traits::false_type, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15 ){
+		Vector res(15) ;
+		iterator it( res.begin() );
+
+		////
+ *it = converter_type::get(t1) ; ++it ;
+ *it = converter_type::get(t2) ; ++it ;
+ *it = converter_type::get(t3) ; ++it ;
+ *it = converter_type::get(t4) ; ++it ;
+ *it = converter_type::get(t5) ; ++it ;
+ *it = converter_type::get(t6) ; ++it ;
+ *it = converter_type::get(t7) ; ++it ;
+ *it = converter_type::get(t8) ; ++it ;
+ *it = converter_type::get(t9) ; ++it ;
+ *it = converter_type::get(t10) ; ++it ;
+ *it = converter_type::get(t11) ; ++it ;
+ *it = converter_type::get(t12) ; ++it ;
+ *it = converter_type::get(t13) ; ++it ;
+ *it = converter_type::get(t14) ; ++it ;
+ *it = converter_type::get(t15) ; ++it ;
+		////
+
+		return res ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15>
+	static Vector create__dispatch( traits::true_type, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15){
+		Vector res( 15 ) ;
+		Shield<SEXP> names( ::Rf_allocVector( STRSXP, 15 ) ) ;
+		int index = 0 ;
+		iterator it( res.begin() );
+
+		////
+ replace_element( it, names, index, t1 ) ; ++it; ++index ;
+ replace_element( it, names, index, t2 ) ; ++it; ++index ;
+ replace_element( it, names, index, t3 ) ; ++it; ++index ;
+ replace_element( it, names, index, t4 ) ; ++it; ++index ;
+ replace_element( it, names, index, t5 ) ; ++it; ++index ;
+ replace_element( it, names, index, t6 ) ; ++it; ++index ;
+ replace_element( it, names, index, t7 ) ; ++it; ++index ;
+ replace_element( it, names, index, t8 ) ; ++it; ++index ;
+ replace_element( it, names, index, t9 ) ; ++it; ++index ;
+ replace_element( it, names, index, t10 ) ; ++it; ++index ;
+ replace_element( it, names, index, t11 ) ; ++it; ++index ;
+ replace_element( it, names, index, t12 ) ; ++it; ++index ;
+ replace_element( it, names, index, t13 ) ; ++it; ++index ;
+ replace_element( it, names, index, t14 ) ; ++it; ++index ;
+ replace_element( it, names, index, t15 ) ; ++it; ++index ;
+		////
+
+		res.attr("names") = names ;
+
+		return res ;
+	}
+
+public:
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16>
+	static Vector create(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16){
+		return create__dispatch( typename traits::integral_constant<bool,
+  traits::is_named<T1>::value  ||  traits::is_named<T2>::value  ||  traits::is_named<T3>::value  ||  traits::is_named<T4>::value  ||  traits::is_named<T5>::value  ||  traits::is_named<T6>::value  ||  traits::is_named<T7>::value  ||  traits::is_named<T8>::value  ||  traits::is_named<T9>::value  ||  traits::is_named<T10>::value  ||  traits::is_named<T11>::value  ||  traits::is_named<T12>::value  ||  traits::is_named<T13>::value  ||  traits::is_named<T14>::value  ||  traits::is_named<T15>::value  ||  traits::is_named<T16>::value
+		>::type(), t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16 ) ;
+	}
+
+private:
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16>
+	static Vector create__dispatch( traits::false_type, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16 ){
+		Vector res(16) ;
+		iterator it( res.begin() );
+
+		////
+ *it = converter_type::get(t1) ; ++it ;
+ *it = converter_type::get(t2) ; ++it ;
+ *it = converter_type::get(t3) ; ++it ;
+ *it = converter_type::get(t4) ; ++it ;
+ *it = converter_type::get(t5) ; ++it ;
+ *it = converter_type::get(t6) ; ++it ;
+ *it = converter_type::get(t7) ; ++it ;
+ *it = converter_type::get(t8) ; ++it ;
+ *it = converter_type::get(t9) ; ++it ;
+ *it = converter_type::get(t10) ; ++it ;
+ *it = converter_type::get(t11) ; ++it ;
+ *it = converter_type::get(t12) ; ++it ;
+ *it = converter_type::get(t13) ; ++it ;
+ *it = converter_type::get(t14) ; ++it ;
+ *it = converter_type::get(t15) ; ++it ;
+ *it = converter_type::get(t16) ; ++it ;
+		////
+
+		return res ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16>
+	static Vector create__dispatch( traits::true_type, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16){
+		Vector res( 16 ) ;
+		Shield<SEXP> names( ::Rf_allocVector( STRSXP, 16 ) ) ;
+		int index = 0 ;
+		iterator it( res.begin() );
+
+		////
+ replace_element( it, names, index, t1 ) ; ++it; ++index ;
+ replace_element( it, names, index, t2 ) ; ++it; ++index ;
+ replace_element( it, names, index, t3 ) ; ++it; ++index ;
+ replace_element( it, names, index, t4 ) ; ++it; ++index ;
+ replace_element( it, names, index, t5 ) ; ++it; ++index ;
+ replace_element( it, names, index, t6 ) ; ++it; ++index ;
+ replace_element( it, names, index, t7 ) ; ++it; ++index ;
+ replace_element( it, names, index, t8 ) ; ++it; ++index ;
+ replace_element( it, names, index, t9 ) ; ++it; ++index ;
+ replace_element( it, names, index, t10 ) ; ++it; ++index ;
+ replace_element( it, names, index, t11 ) ; ++it; ++index ;
+ replace_element( it, names, index, t12 ) ; ++it; ++index ;
+ replace_element( it, names, index, t13 ) ; ++it; ++index ;
+ replace_element( it, names, index, t14 ) ; ++it; ++index ;
+ replace_element( it, names, index, t15 ) ; ++it; ++index ;
+ replace_element( it, names, index, t16 ) ; ++it; ++index ;
+		////
+
+		res.attr("names") = names ;
+
+		return res ;
+	}
+
+public:
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17>
+	static Vector create(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17){
+		return create__dispatch( typename traits::integral_constant<bool,
+  traits::is_named<T1>::value  ||  traits::is_named<T2>::value  ||  traits::is_named<T3>::value  ||  traits::is_named<T4>::value  ||  traits::is_named<T5>::value  ||  traits::is_named<T6>::value  ||  traits::is_named<T7>::value  ||  traits::is_named<T8>::value  ||  traits::is_named<T9>::value  ||  traits::is_named<T10>::value  ||  traits::is_named<T11>::value  ||  traits::is_named<T12>::value  ||  traits::is_named<T13>::value  ||  traits::is_named<T14>::value  ||  traits::is_named<T15>::value  ||  traits::is_named<T16>::value  ||  traits::is_named<T17>::value
+		>::type(), t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17 ) ;
+	}
+
+private:
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17>
+	static Vector create__dispatch( traits::false_type, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17 ){
+		Vector res(17) ;
+		iterator it( res.begin() );
+
+		////
+ *it = converter_type::get(t1) ; ++it ;
+ *it = converter_type::get(t2) ; ++it ;
+ *it = converter_type::get(t3) ; ++it ;
+ *it = converter_type::get(t4) ; ++it ;
+ *it = converter_type::get(t5) ; ++it ;
+ *it = converter_type::get(t6) ; ++it ;
+ *it = converter_type::get(t7) ; ++it ;
+ *it = converter_type::get(t8) ; ++it ;
+ *it = converter_type::get(t9) ; ++it ;
+ *it = converter_type::get(t10) ; ++it ;
+ *it = converter_type::get(t11) ; ++it ;
+ *it = converter_type::get(t12) ; ++it ;
+ *it = converter_type::get(t13) ; ++it ;
+ *it = converter_type::get(t14) ; ++it ;
+ *it = converter_type::get(t15) ; ++it ;
+ *it = converter_type::get(t16) ; ++it ;
+ *it = converter_type::get(t17) ; ++it ;
+		////
+
+		return res ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17>
+	static Vector create__dispatch( traits::true_type, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17){
+		Vector res( 17 ) ;
+		Shield<SEXP> names( ::Rf_allocVector( STRSXP, 17 ) ) ;
+		int index = 0 ;
+		iterator it( res.begin() );
+
+		////
+ replace_element( it, names, index, t1 ) ; ++it; ++index ;
+ replace_element( it, names, index, t2 ) ; ++it; ++index ;
+ replace_element( it, names, index, t3 ) ; ++it; ++index ;
+ replace_element( it, names, index, t4 ) ; ++it; ++index ;
+ replace_element( it, names, index, t5 ) ; ++it; ++index ;
+ replace_element( it, names, index, t6 ) ; ++it; ++index ;
+ replace_element( it, names, index, t7 ) ; ++it; ++index ;
+ replace_element( it, names, index, t8 ) ; ++it; ++index ;
+ replace_element( it, names, index, t9 ) ; ++it; ++index ;
+ replace_element( it, names, index, t10 ) ; ++it; ++index ;
+ replace_element( it, names, index, t11 ) ; ++it; ++index ;
+ replace_element( it, names, index, t12 ) ; ++it; ++index ;
+ replace_element( it, names, index, t13 ) ; ++it; ++index ;
+ replace_element( it, names, index, t14 ) ; ++it; ++index ;
+ replace_element( it, names, index, t15 ) ; ++it; ++index ;
+ replace_element( it, names, index, t16 ) ; ++it; ++index ;
+ replace_element( it, names, index, t17 ) ; ++it; ++index ;
+		////
+
+		res.attr("names") = names ;
+
+		return res ;
+	}
+
+public:
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18>
+	static Vector create(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18){
+		return create__dispatch( typename traits::integral_constant<bool,
+  traits::is_named<T1>::value  ||  traits::is_named<T2>::value  ||  traits::is_named<T3>::value  ||  traits::is_named<T4>::value  ||  traits::is_named<T5>::value  ||  traits::is_named<T6>::value  ||  traits::is_named<T7>::value  ||  traits::is_named<T8>::value  ||  traits::is_named<T9>::value  ||  traits::is_named<T10>::value  ||  traits::is_named<T11>::value  ||  traits::is_named<T12>::value  ||  traits::is_named<T13>::value  ||  traits::is_named<T14>::value  ||  traits::is_named<T15>::value  ||  traits::is_named<T16>::value  ||  traits::is_named<T17>::value  ||  traits::is_named<T18>::value
+		>::type(), t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18 ) ;
+	}
+
+private:
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18>
+	static Vector create__dispatch( traits::false_type, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18 ){
+		Vector res(18) ;
+		iterator it( res.begin() );
+
+		////
+ *it = converter_type::get(t1) ; ++it ;
+ *it = converter_type::get(t2) ; ++it ;
+ *it = converter_type::get(t3) ; ++it ;
+ *it = converter_type::get(t4) ; ++it ;
+ *it = converter_type::get(t5) ; ++it ;
+ *it = converter_type::get(t6) ; ++it ;
+ *it = converter_type::get(t7) ; ++it ;
+ *it = converter_type::get(t8) ; ++it ;
+ *it = converter_type::get(t9) ; ++it ;
+ *it = converter_type::get(t10) ; ++it ;
+ *it = converter_type::get(t11) ; ++it ;
+ *it = converter_type::get(t12) ; ++it ;
+ *it = converter_type::get(t13) ; ++it ;
+ *it = converter_type::get(t14) ; ++it ;
+ *it = converter_type::get(t15) ; ++it ;
+ *it = converter_type::get(t16) ; ++it ;
+ *it = converter_type::get(t17) ; ++it ;
+ *it = converter_type::get(t18) ; ++it ;
+		////
+
+		return res ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18>
+	static Vector create__dispatch( traits::true_type, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18){
+		Vector res( 18 ) ;
+		Shield<SEXP> names( ::Rf_allocVector( STRSXP, 18 ) ) ;
+		int index = 0 ;
+		iterator it( res.begin() );
+
+		////
+ replace_element( it, names, index, t1 ) ; ++it; ++index ;
+ replace_element( it, names, index, t2 ) ; ++it; ++index ;
+ replace_element( it, names, index, t3 ) ; ++it; ++index ;
+ replace_element( it, names, index, t4 ) ; ++it; ++index ;
+ replace_element( it, names, index, t5 ) ; ++it; ++index ;
+ replace_element( it, names, index, t6 ) ; ++it; ++index ;
+ replace_element( it, names, index, t7 ) ; ++it; ++index ;
+ replace_element( it, names, index, t8 ) ; ++it; ++index ;
+ replace_element( it, names, index, t9 ) ; ++it; ++index ;
+ replace_element( it, names, index, t10 ) ; ++it; ++index ;
+ replace_element( it, names, index, t11 ) ; ++it; ++index ;
+ replace_element( it, names, index, t12 ) ; ++it; ++index ;
+ replace_element( it, names, index, t13 ) ; ++it; ++index ;
+ replace_element( it, names, index, t14 ) ; ++it; ++index ;
+ replace_element( it, names, index, t15 ) ; ++it; ++index ;
+ replace_element( it, names, index, t16 ) ; ++it; ++index ;
+ replace_element( it, names, index, t17 ) ; ++it; ++index ;
+ replace_element( it, names, index, t18 ) ; ++it; ++index ;
+		////
+
+		res.attr("names") = names ;
+
+		return res ;
+	}
+
+public:
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19>
+	static Vector create(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19){
+		return create__dispatch( typename traits::integral_constant<bool,
+  traits::is_named<T1>::value  ||  traits::is_named<T2>::value  ||  traits::is_named<T3>::value  ||  traits::is_named<T4>::value  ||  traits::is_named<T5>::value  ||  traits::is_named<T6>::value  ||  traits::is_named<T7>::value  ||  traits::is_named<T8>::value  ||  traits::is_named<T9>::value  ||  traits::is_named<T10>::value  ||  traits::is_named<T11>::value  ||  traits::is_named<T12>::value  ||  traits::is_named<T13>::value  ||  traits::is_named<T14>::value  ||  traits::is_named<T15>::value  ||  traits::is_named<T16>::value  ||  traits::is_named<T17>::value  ||  traits::is_named<T18>::value  ||  traits::is_named<T19>::value
+		>::type(), t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19 ) ;
+	}
+
+private:
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19>
+	static Vector create__dispatch( traits::false_type, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19 ){
+		Vector res(19) ;
+		iterator it( res.begin() );
+
+		////
+ *it = converter_type::get(t1) ; ++it ;
+ *it = converter_type::get(t2) ; ++it ;
+ *it = converter_type::get(t3) ; ++it ;
+ *it = converter_type::get(t4) ; ++it ;
+ *it = converter_type::get(t5) ; ++it ;
+ *it = converter_type::get(t6) ; ++it ;
+ *it = converter_type::get(t7) ; ++it ;
+ *it = converter_type::get(t8) ; ++it ;
+ *it = converter_type::get(t9) ; ++it ;
+ *it = converter_type::get(t10) ; ++it ;
+ *it = converter_type::get(t11) ; ++it ;
+ *it = converter_type::get(t12) ; ++it ;
+ *it = converter_type::get(t13) ; ++it ;
+ *it = converter_type::get(t14) ; ++it ;
+ *it = converter_type::get(t15) ; ++it ;
+ *it = converter_type::get(t16) ; ++it ;
+ *it = converter_type::get(t17) ; ++it ;
+ *it = converter_type::get(t18) ; ++it ;
+ *it = converter_type::get(t19) ; ++it ;
+		////
+
+		return res ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19>
+	static Vector create__dispatch( traits::true_type, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19){
+		Vector res( 19 ) ;
+		Shield<SEXP> names( ::Rf_allocVector( STRSXP, 19 ) ) ;
+		int index = 0 ;
+		iterator it( res.begin() );
+
+		////
+ replace_element( it, names, index, t1 ) ; ++it; ++index ;
+ replace_element( it, names, index, t2 ) ; ++it; ++index ;
+ replace_element( it, names, index, t3 ) ; ++it; ++index ;
+ replace_element( it, names, index, t4 ) ; ++it; ++index ;
+ replace_element( it, names, index, t5 ) ; ++it; ++index ;
+ replace_element( it, names, index, t6 ) ; ++it; ++index ;
+ replace_element( it, names, index, t7 ) ; ++it; ++index ;
+ replace_element( it, names, index, t8 ) ; ++it; ++index ;
+ replace_element( it, names, index, t9 ) ; ++it; ++index ;
+ replace_element( it, names, index, t10 ) ; ++it; ++index ;
+ replace_element( it, names, index, t11 ) ; ++it; ++index ;
+ replace_element( it, names, index, t12 ) ; ++it; ++index ;
+ replace_element( it, names, index, t13 ) ; ++it; ++index ;
+ replace_element( it, names, index, t14 ) ; ++it; ++index ;
+ replace_element( it, names, index, t15 ) ; ++it; ++index ;
+ replace_element( it, names, index, t16 ) ; ++it; ++index ;
+ replace_element( it, names, index, t17 ) ; ++it; ++index ;
+ replace_element( it, names, index, t18 ) ; ++it; ++index ;
+ replace_element( it, names, index, t19 ) ; ++it; ++index ;
+		////
+
+		res.attr("names") = names ;
+
+		return res ;
+	}
+
+public:
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19, typename T20>
+	static Vector create(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19, const T20& t20){
+		return create__dispatch( typename traits::integral_constant<bool,
+  traits::is_named<T1>::value  ||  traits::is_named<T2>::value  ||  traits::is_named<T3>::value  ||  traits::is_named<T4>::value  ||  traits::is_named<T5>::value  ||  traits::is_named<T6>::value  ||  traits::is_named<T7>::value  ||  traits::is_named<T8>::value  ||  traits::is_named<T9>::value  ||  traits::is_named<T10>::value  ||  traits::is_named<T11>::value  ||  traits::is_named<T12>::value  ||  traits::is_named<T13>::value  ||  traits::is_named<T14>::value  ||  traits::is_named<T15>::value  ||  traits::is_named<T16>::value  ||  traits::is_named<T17>::value  ||  traits::is_named<T18>::value  ||  traits::is_named<T19>::value  ||  traits::is_named<T20>::value
+		>::type(), t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20 ) ;
+	}
+
+private:
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19, typename T20>
+	static Vector create__dispatch( traits::false_type, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19, const T20& t20 ){
+		Vector res(20) ;
+		iterator it( res.begin() );
+
+		////
+ *it = converter_type::get(t1) ; ++it ;
+ *it = converter_type::get(t2) ; ++it ;
+ *it = converter_type::get(t3) ; ++it ;
+ *it = converter_type::get(t4) ; ++it ;
+ *it = converter_type::get(t5) ; ++it ;
+ *it = converter_type::get(t6) ; ++it ;
+ *it = converter_type::get(t7) ; ++it ;
+ *it = converter_type::get(t8) ; ++it ;
+ *it = converter_type::get(t9) ; ++it ;
+ *it = converter_type::get(t10) ; ++it ;
+ *it = converter_type::get(t11) ; ++it ;
+ *it = converter_type::get(t12) ; ++it ;
+ *it = converter_type::get(t13) ; ++it ;
+ *it = converter_type::get(t14) ; ++it ;
+ *it = converter_type::get(t15) ; ++it ;
+ *it = converter_type::get(t16) ; ++it ;
+ *it = converter_type::get(t17) ; ++it ;
+ *it = converter_type::get(t18) ; ++it ;
+ *it = converter_type::get(t19) ; ++it ;
+ *it = converter_type::get(t20) ; ++it ;
+		////
+
+		return res ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19, typename T20>
+	static Vector create__dispatch( traits::true_type, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19, const T20& t20){
+		Vector res( 20 ) ;
+		Shield<SEXP> names( ::Rf_allocVector( STRSXP, 20 ) ) ;
+		int index = 0 ;
+		iterator it( res.begin() );
+
+		////
+ replace_element( it, names, index, t1 ) ; ++it; ++index ;
+ replace_element( it, names, index, t2 ) ; ++it; ++index ;
+ replace_element( it, names, index, t3 ) ; ++it; ++index ;
+ replace_element( it, names, index, t4 ) ; ++it; ++index ;
+ replace_element( it, names, index, t5 ) ; ++it; ++index ;
+ replace_element( it, names, index, t6 ) ; ++it; ++index ;
+ replace_element( it, names, index, t7 ) ; ++it; ++index ;
+ replace_element( it, names, index, t8 ) ; ++it; ++index ;
+ replace_element( it, names, index, t9 ) ; ++it; ++index ;
+ replace_element( it, names, index, t10 ) ; ++it; ++index ;
+ replace_element( it, names, index, t11 ) ; ++it; ++index ;
+ replace_element( it, names, index, t12 ) ; ++it; ++index ;
+ replace_element( it, names, index, t13 ) ; ++it; ++index ;
+ replace_element( it, names, index, t14 ) ; ++it; ++index ;
+ replace_element( it, names, index, t15 ) ; ++it; ++index ;
+ replace_element( it, names, index, t16 ) ; ++it; ++index ;
+ replace_element( it, names, index, t17 ) ; ++it; ++index ;
+ replace_element( it, names, index, t18 ) ; ++it; ++index ;
+ replace_element( it, names, index, t19 ) ; ++it; ++index ;
+ replace_element( it, names, index, t20 ) ; ++it; ++index ;
+		////
+
+		res.attr("names") = names ;
+
+		return res ;
+	}
+
+/* </code-bloat> */
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/generated/grow__pairlist.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/generated/grow__pairlist.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/generated/grow__pairlist.h	(revision 2477)
@@ -0,0 +1,135 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// grow__pairlist.h: Rcpp R/C++ interface class library -- generated helper code for grow.h
+//
+// Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__generated__grow_pairlist_h
+#define Rcpp__generated__grow_pairlist_h
+
+/* <code-bloat>
+
+template <TYPENAMES>
+SEXP pairlist( ARGUMENTS ){
+	return GROW ;
+}
+
+*/
+template <typename T1>
+SEXP pairlist( const T1& t1 ){
+	return grow( t1, R_NilValue ) ;
+}
+
+template <typename T1, typename T2>
+SEXP pairlist( const T1& t1, const T2& t2 ){
+	return grow( t1, grow( t2, R_NilValue ) ) ;
+}
+
+template <typename T1, typename T2, typename T3>
+SEXP pairlist( const T1& t1, const T2& t2, const T3& t3 ){
+	return grow( t1, grow( t2, grow( t3, R_NilValue ) ) ) ;
+}
+
+template <typename T1, typename T2, typename T3, typename T4>
+SEXP pairlist( const T1& t1, const T2& t2, const T3& t3, const T4& t4 ){
+	return grow( t1, grow( t2, grow( t3, grow( t4, R_NilValue ) ) ) ) ;
+}
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5>
+SEXP pairlist( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5 ){
+	return grow( t1, grow( t2, grow( t3, grow( t4, grow( t5, R_NilValue ) ) ) ) ) ;
+}
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>
+SEXP pairlist( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6 ){
+	return grow( t1, grow( t2, grow( t3, grow( t4, grow( t5, grow( t6, R_NilValue ) ) ) ) ) ) ;
+}
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7>
+SEXP pairlist( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7 ){
+	return grow( t1, grow( t2, grow( t3, grow( t4, grow( t5, grow( t6, grow( t7, R_NilValue ) ) ) ) ) ) ) ;
+}
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8>
+SEXP pairlist( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8 ){
+	return grow( t1, grow( t2, grow( t3, grow( t4, grow( t5, grow( t6, grow( t7, grow( t8, R_NilValue ) ) ) ) ) ) ) ) ;
+}
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9>
+SEXP pairlist( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9 ){
+	return grow( t1, grow( t2, grow( t3, grow( t4, grow( t5, grow( t6, grow( t7, grow( t8, grow( t9, R_NilValue ) ) ) ) ) ) ) ) ) ;
+}
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10>
+SEXP pairlist( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10 ){
+	return grow( t1, grow( t2, grow( t3, grow( t4, grow( t5, grow( t6, grow( t7, grow( t8, grow( t9, grow( t10, R_NilValue ) ) ) ) ) ) ) ) ) ) ;
+}
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11>
+SEXP pairlist( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11 ){
+	return grow( t1, grow( t2, grow( t3, grow( t4, grow( t5, grow( t6, grow( t7, grow( t8, grow( t9, grow( t10, grow( t11, R_NilValue ) ) ) ) ) ) ) ) ) ) ) ;
+}
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12>
+SEXP pairlist( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12 ){
+	return grow( t1, grow( t2, grow( t3, grow( t4, grow( t5, grow( t6, grow( t7, grow( t8, grow( t9, grow( t10, grow( t11, grow( t12, R_NilValue ) ) ) ) ) ) ) ) ) ) ) ) ;
+}
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13>
+SEXP pairlist( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13 ){
+	return grow( t1, grow( t2, grow( t3, grow( t4, grow( t5, grow( t6, grow( t7, grow( t8, grow( t9, grow( t10, grow( t11, grow( t12, grow( t13, R_NilValue ) ) ) ) ) ) ) ) ) ) ) ) ) ;
+}
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14>
+SEXP pairlist( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14 ){
+	return grow( t1, grow( t2, grow( t3, grow( t4, grow( t5, grow( t6, grow( t7, grow( t8, grow( t9, grow( t10, grow( t11, grow( t12, grow( t13, grow( t14, R_NilValue ) ) ) ) ) ) ) ) ) ) ) ) ) ) ;
+}
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15>
+SEXP pairlist( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15 ){
+	return grow( t1, grow( t2, grow( t3, grow( t4, grow( t5, grow( t6, grow( t7, grow( t8, grow( t9, grow( t10, grow( t11, grow( t12, grow( t13, grow( t14, grow( t15, R_NilValue ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ;
+}
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16>
+SEXP pairlist( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16 ){
+	return grow( t1, grow( t2, grow( t3, grow( t4, grow( t5, grow( t6, grow( t7, grow( t8, grow( t9, grow( t10, grow( t11, grow( t12, grow( t13, grow( t14, grow( t15, grow( t16, R_NilValue ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ;
+}
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17>
+SEXP pairlist( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17 ){
+	return grow( t1, grow( t2, grow( t3, grow( t4, grow( t5, grow( t6, grow( t7, grow( t8, grow( t9, grow( t10, grow( t11, grow( t12, grow( t13, grow( t14, grow( t15, grow( t16, grow( t17, R_NilValue ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ;
+}
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18>
+SEXP pairlist( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18 ){
+	return grow( t1, grow( t2, grow( t3, grow( t4, grow( t5, grow( t6, grow( t7, grow( t8, grow( t9, grow( t10, grow( t11, grow( t12, grow( t13, grow( t14, grow( t15, grow( t16, grow( t17, grow( t18, R_NilValue ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ;
+}
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19>
+SEXP pairlist( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19 ){
+	return grow( t1, grow( t2, grow( t3, grow( t4, grow( t5, grow( t6, grow( t7, grow( t8, grow( t9, grow( t10, grow( t11, grow( t12, grow( t13, grow( t14, grow( t15, grow( t16, grow( t17, grow( t18, grow( t19, R_NilValue ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ;
+}
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19, typename T20>
+SEXP pairlist( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19, const T20& t20 ){
+	return grow( t1, grow( t2, grow( t3, grow( t4, grow( t5, grow( t6, grow( t7, grow( t8, grow( t9, grow( t10, grow( t11, grow( t12, grow( t13, grow( t14, grow( t15, grow( t16, grow( t17, grow( t18, grow( t19, grow( t20, R_NilValue ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ;
+}
+
+/* </code-bloat> */
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/generated/DottedPair__ctors.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/generated/DottedPair__ctors.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/generated/DottedPair__ctors.h	(revision 2477)
@@ -0,0 +1,125 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// DottedPair_Impl__ctors.h: Rcpp R/C++ interface class library -- generated helper code for DottedPair_Impl.h
+//
+// Copyright (C) 2010 - 2013 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__generated__DottedPair_Impl_ctors_h
+#define Rcpp__generated__DottedPair_Impl_ctors_h
+
+	template <typename T1>
+	DottedPair_Impl( const T1& t1 ){
+		Storage::set__( pairlist( t1 ) ) ;
+	}
+
+	template <typename T1, typename T2>
+	DottedPair_Impl( const T1& t1, const T2& t2 ){
+		Storage::set__( pairlist( t1, t2 ) ) ;
+	}
+
+	template <typename T1, typename T2, typename T3>
+	DottedPair_Impl( const T1& t1, const T2& t2, const T3& t3 ){
+		Storage::set__( pairlist( t1, t2, t3 ) ) ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4>
+	DottedPair_Impl( const T1& t1, const T2& t2, const T3& t3, const T4& t4 ){
+		Storage::set__( pairlist( t1, t2, t3, t4 ) ) ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5>
+	DottedPair_Impl( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5 ){
+		Storage::set__( pairlist( t1, t2, t3, t4, t5 ) ) ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>
+	DottedPair_Impl( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6 ){
+		Storage::set__( pairlist( t1, t2, t3, t4, t5, t6 ) ) ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7>
+	DottedPair_Impl( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7 ){
+		Storage::set__( pairlist( t1, t2, t3, t4, t5, t6, t7 ) ) ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8>
+	DottedPair_Impl( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8 ){
+		Storage::set__( pairlist( t1, t2, t3, t4, t5, t6, t7, t8 ) ) ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9>
+	DottedPair_Impl( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9 ){
+		Storage::set__( pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9 ) ) ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10>
+	DottedPair_Impl( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10 ){
+		Storage::set__( pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10 ) ) ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11>
+	DottedPair_Impl( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11 ){
+		Storage::set__( pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11 ) ) ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12>
+	DottedPair_Impl( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12 ){
+		Storage::set__( pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12 ) ) ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13>
+	DottedPair_Impl( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13 ){
+		Storage::set__( pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13 ) ) ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14>
+	DottedPair_Impl( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14 ){
+		Storage::set__( pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14 ) ) ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15>
+	DottedPair_Impl( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15 ){
+		Storage::set__( pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15 ) ) ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16>
+	DottedPair_Impl( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16 ){
+		Storage::set__( pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16 ) ) ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17>
+	DottedPair_Impl( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17 ){
+		Storage::set__( pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17 ) ) ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18>
+	DottedPair_Impl( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18 ){
+		Storage::set__( pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18 ) ) ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19>
+	DottedPair_Impl( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19 ){
+		Storage::set__( pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19 ) ) ;
+	}
+
+	template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19, typename T20>
+	DottedPair_Impl( const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19, const T20& t20 ){
+		Storage::set__( pairlist( t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20 ) ) ;
+	}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/generated/InternalFunctionWithStdFunction_call.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/generated/InternalFunctionWithStdFunction_call.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/generated/InternalFunctionWithStdFunction_call.h	(revision 2477)
@@ -0,0 +1,2570 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+//
+// InternalFunctionWithStdFunction_call.h -- generated helper code for
+//                                  InternalFunctionWithStdFunction.h
+//                                  see rcpp-scripts repo for generator script
+//
+// Copyright (C) 2010 - 2014  Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__generated__InternalFunctionWithStdFunction_calls_h
+#define Rcpp__generated__InternalFunctionWithStdFunction_calls_h
+
+
+    template <typename RESULT_TYPE>
+    RESULT_TYPE call(const std::function<RESULT_TYPE()> &fun, SEXP* args) {
+        return fun();
+    }
+
+
+    template <typename RESULT_TYPE,typename U0>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        return fun(x0);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        return fun(x0,x1);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        return fun(x0,x1,x2);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        return fun(x0,x1,x2,x3);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        return fun(x0,x1,x2,x3,x4);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        return fun(x0,x1,x2,x3,x4,x5);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        return fun(x0,x1,x2,x3,x4,x5,x6);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7,U8)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        typename traits::input_parameter<U8>::type x8(args[8]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7,x8);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7,U8,U9)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        typename traits::input_parameter<U8>::type x8(args[8]);
+        typename traits::input_parameter<U9>::type x9(args[9]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        typename traits::input_parameter<U8>::type x8(args[8]);
+        typename traits::input_parameter<U9>::type x9(args[9]);
+        typename traits::input_parameter<U10>::type x10(args[10]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        typename traits::input_parameter<U8>::type x8(args[8]);
+        typename traits::input_parameter<U9>::type x9(args[9]);
+        typename traits::input_parameter<U10>::type x10(args[10]);
+        typename traits::input_parameter<U11>::type x11(args[11]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        typename traits::input_parameter<U8>::type x8(args[8]);
+        typename traits::input_parameter<U9>::type x9(args[9]);
+        typename traits::input_parameter<U10>::type x10(args[10]);
+        typename traits::input_parameter<U11>::type x11(args[11]);
+        typename traits::input_parameter<U12>::type x12(args[12]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        typename traits::input_parameter<U8>::type x8(args[8]);
+        typename traits::input_parameter<U9>::type x9(args[9]);
+        typename traits::input_parameter<U10>::type x10(args[10]);
+        typename traits::input_parameter<U11>::type x11(args[11]);
+        typename traits::input_parameter<U12>::type x12(args[12]);
+        typename traits::input_parameter<U13>::type x13(args[13]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        typename traits::input_parameter<U8>::type x8(args[8]);
+        typename traits::input_parameter<U9>::type x9(args[9]);
+        typename traits::input_parameter<U10>::type x10(args[10]);
+        typename traits::input_parameter<U11>::type x11(args[11]);
+        typename traits::input_parameter<U12>::type x12(args[12]);
+        typename traits::input_parameter<U13>::type x13(args[13]);
+        typename traits::input_parameter<U14>::type x14(args[14]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        typename traits::input_parameter<U8>::type x8(args[8]);
+        typename traits::input_parameter<U9>::type x9(args[9]);
+        typename traits::input_parameter<U10>::type x10(args[10]);
+        typename traits::input_parameter<U11>::type x11(args[11]);
+        typename traits::input_parameter<U12>::type x12(args[12]);
+        typename traits::input_parameter<U13>::type x13(args[13]);
+        typename traits::input_parameter<U14>::type x14(args[14]);
+        typename traits::input_parameter<U15>::type x15(args[15]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        typename traits::input_parameter<U8>::type x8(args[8]);
+        typename traits::input_parameter<U9>::type x9(args[9]);
+        typename traits::input_parameter<U10>::type x10(args[10]);
+        typename traits::input_parameter<U11>::type x11(args[11]);
+        typename traits::input_parameter<U12>::type x12(args[12]);
+        typename traits::input_parameter<U13>::type x13(args[13]);
+        typename traits::input_parameter<U14>::type x14(args[14]);
+        typename traits::input_parameter<U15>::type x15(args[15]);
+        typename traits::input_parameter<U16>::type x16(args[16]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        typename traits::input_parameter<U8>::type x8(args[8]);
+        typename traits::input_parameter<U9>::type x9(args[9]);
+        typename traits::input_parameter<U10>::type x10(args[10]);
+        typename traits::input_parameter<U11>::type x11(args[11]);
+        typename traits::input_parameter<U12>::type x12(args[12]);
+        typename traits::input_parameter<U13>::type x13(args[13]);
+        typename traits::input_parameter<U14>::type x14(args[14]);
+        typename traits::input_parameter<U15>::type x15(args[15]);
+        typename traits::input_parameter<U16>::type x16(args[16]);
+        typename traits::input_parameter<U17>::type x17(args[17]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        typename traits::input_parameter<U8>::type x8(args[8]);
+        typename traits::input_parameter<U9>::type x9(args[9]);
+        typename traits::input_parameter<U10>::type x10(args[10]);
+        typename traits::input_parameter<U11>::type x11(args[11]);
+        typename traits::input_parameter<U12>::type x12(args[12]);
+        typename traits::input_parameter<U13>::type x13(args[13]);
+        typename traits::input_parameter<U14>::type x14(args[14]);
+        typename traits::input_parameter<U15>::type x15(args[15]);
+        typename traits::input_parameter<U16>::type x16(args[16]);
+        typename traits::input_parameter<U17>::type x17(args[17]);
+        typename traits::input_parameter<U18>::type x18(args[18]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        typename traits::input_parameter<U8>::type x8(args[8]);
+        typename traits::input_parameter<U9>::type x9(args[9]);
+        typename traits::input_parameter<U10>::type x10(args[10]);
+        typename traits::input_parameter<U11>::type x11(args[11]);
+        typename traits::input_parameter<U12>::type x12(args[12]);
+        typename traits::input_parameter<U13>::type x13(args[13]);
+        typename traits::input_parameter<U14>::type x14(args[14]);
+        typename traits::input_parameter<U15>::type x15(args[15]);
+        typename traits::input_parameter<U16>::type x16(args[16]);
+        typename traits::input_parameter<U17>::type x17(args[17]);
+        typename traits::input_parameter<U18>::type x18(args[18]);
+        typename traits::input_parameter<U19>::type x19(args[19]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        typename traits::input_parameter<U8>::type x8(args[8]);
+        typename traits::input_parameter<U9>::type x9(args[9]);
+        typename traits::input_parameter<U10>::type x10(args[10]);
+        typename traits::input_parameter<U11>::type x11(args[11]);
+        typename traits::input_parameter<U12>::type x12(args[12]);
+        typename traits::input_parameter<U13>::type x13(args[13]);
+        typename traits::input_parameter<U14>::type x14(args[14]);
+        typename traits::input_parameter<U15>::type x15(args[15]);
+        typename traits::input_parameter<U16>::type x16(args[16]);
+        typename traits::input_parameter<U17>::type x17(args[17]);
+        typename traits::input_parameter<U18>::type x18(args[18]);
+        typename traits::input_parameter<U19>::type x19(args[19]);
+        typename traits::input_parameter<U20>::type x20(args[20]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        typename traits::input_parameter<U8>::type x8(args[8]);
+        typename traits::input_parameter<U9>::type x9(args[9]);
+        typename traits::input_parameter<U10>::type x10(args[10]);
+        typename traits::input_parameter<U11>::type x11(args[11]);
+        typename traits::input_parameter<U12>::type x12(args[12]);
+        typename traits::input_parameter<U13>::type x13(args[13]);
+        typename traits::input_parameter<U14>::type x14(args[14]);
+        typename traits::input_parameter<U15>::type x15(args[15]);
+        typename traits::input_parameter<U16>::type x16(args[16]);
+        typename traits::input_parameter<U17>::type x17(args[17]);
+        typename traits::input_parameter<U18>::type x18(args[18]);
+        typename traits::input_parameter<U19>::type x19(args[19]);
+        typename traits::input_parameter<U20>::type x20(args[20]);
+        typename traits::input_parameter<U21>::type x21(args[21]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        typename traits::input_parameter<U8>::type x8(args[8]);
+        typename traits::input_parameter<U9>::type x9(args[9]);
+        typename traits::input_parameter<U10>::type x10(args[10]);
+        typename traits::input_parameter<U11>::type x11(args[11]);
+        typename traits::input_parameter<U12>::type x12(args[12]);
+        typename traits::input_parameter<U13>::type x13(args[13]);
+        typename traits::input_parameter<U14>::type x14(args[14]);
+        typename traits::input_parameter<U15>::type x15(args[15]);
+        typename traits::input_parameter<U16>::type x16(args[16]);
+        typename traits::input_parameter<U17>::type x17(args[17]);
+        typename traits::input_parameter<U18>::type x18(args[18]);
+        typename traits::input_parameter<U19>::type x19(args[19]);
+        typename traits::input_parameter<U20>::type x20(args[20]);
+        typename traits::input_parameter<U21>::type x21(args[21]);
+        typename traits::input_parameter<U22>::type x22(args[22]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        typename traits::input_parameter<U8>::type x8(args[8]);
+        typename traits::input_parameter<U9>::type x9(args[9]);
+        typename traits::input_parameter<U10>::type x10(args[10]);
+        typename traits::input_parameter<U11>::type x11(args[11]);
+        typename traits::input_parameter<U12>::type x12(args[12]);
+        typename traits::input_parameter<U13>::type x13(args[13]);
+        typename traits::input_parameter<U14>::type x14(args[14]);
+        typename traits::input_parameter<U15>::type x15(args[15]);
+        typename traits::input_parameter<U16>::type x16(args[16]);
+        typename traits::input_parameter<U17>::type x17(args[17]);
+        typename traits::input_parameter<U18>::type x18(args[18]);
+        typename traits::input_parameter<U19>::type x19(args[19]);
+        typename traits::input_parameter<U20>::type x20(args[20]);
+        typename traits::input_parameter<U21>::type x21(args[21]);
+        typename traits::input_parameter<U22>::type x22(args[22]);
+        typename traits::input_parameter<U23>::type x23(args[23]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        typename traits::input_parameter<U8>::type x8(args[8]);
+        typename traits::input_parameter<U9>::type x9(args[9]);
+        typename traits::input_parameter<U10>::type x10(args[10]);
+        typename traits::input_parameter<U11>::type x11(args[11]);
+        typename traits::input_parameter<U12>::type x12(args[12]);
+        typename traits::input_parameter<U13>::type x13(args[13]);
+        typename traits::input_parameter<U14>::type x14(args[14]);
+        typename traits::input_parameter<U15>::type x15(args[15]);
+        typename traits::input_parameter<U16>::type x16(args[16]);
+        typename traits::input_parameter<U17>::type x17(args[17]);
+        typename traits::input_parameter<U18>::type x18(args[18]);
+        typename traits::input_parameter<U19>::type x19(args[19]);
+        typename traits::input_parameter<U20>::type x20(args[20]);
+        typename traits::input_parameter<U21>::type x21(args[21]);
+        typename traits::input_parameter<U22>::type x22(args[22]);
+        typename traits::input_parameter<U23>::type x23(args[23]);
+        typename traits::input_parameter<U24>::type x24(args[24]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24,U25)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        typename traits::input_parameter<U8>::type x8(args[8]);
+        typename traits::input_parameter<U9>::type x9(args[9]);
+        typename traits::input_parameter<U10>::type x10(args[10]);
+        typename traits::input_parameter<U11>::type x11(args[11]);
+        typename traits::input_parameter<U12>::type x12(args[12]);
+        typename traits::input_parameter<U13>::type x13(args[13]);
+        typename traits::input_parameter<U14>::type x14(args[14]);
+        typename traits::input_parameter<U15>::type x15(args[15]);
+        typename traits::input_parameter<U16>::type x16(args[16]);
+        typename traits::input_parameter<U17>::type x17(args[17]);
+        typename traits::input_parameter<U18>::type x18(args[18]);
+        typename traits::input_parameter<U19>::type x19(args[19]);
+        typename traits::input_parameter<U20>::type x20(args[20]);
+        typename traits::input_parameter<U21>::type x21(args[21]);
+        typename traits::input_parameter<U22>::type x22(args[22]);
+        typename traits::input_parameter<U23>::type x23(args[23]);
+        typename traits::input_parameter<U24>::type x24(args[24]);
+        typename traits::input_parameter<U25>::type x25(args[25]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24,U25,U26)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        typename traits::input_parameter<U8>::type x8(args[8]);
+        typename traits::input_parameter<U9>::type x9(args[9]);
+        typename traits::input_parameter<U10>::type x10(args[10]);
+        typename traits::input_parameter<U11>::type x11(args[11]);
+        typename traits::input_parameter<U12>::type x12(args[12]);
+        typename traits::input_parameter<U13>::type x13(args[13]);
+        typename traits::input_parameter<U14>::type x14(args[14]);
+        typename traits::input_parameter<U15>::type x15(args[15]);
+        typename traits::input_parameter<U16>::type x16(args[16]);
+        typename traits::input_parameter<U17>::type x17(args[17]);
+        typename traits::input_parameter<U18>::type x18(args[18]);
+        typename traits::input_parameter<U19>::type x19(args[19]);
+        typename traits::input_parameter<U20>::type x20(args[20]);
+        typename traits::input_parameter<U21>::type x21(args[21]);
+        typename traits::input_parameter<U22>::type x22(args[22]);
+        typename traits::input_parameter<U23>::type x23(args[23]);
+        typename traits::input_parameter<U24>::type x24(args[24]);
+        typename traits::input_parameter<U25>::type x25(args[25]);
+        typename traits::input_parameter<U26>::type x26(args[26]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24,U25,U26,U27)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        typename traits::input_parameter<U8>::type x8(args[8]);
+        typename traits::input_parameter<U9>::type x9(args[9]);
+        typename traits::input_parameter<U10>::type x10(args[10]);
+        typename traits::input_parameter<U11>::type x11(args[11]);
+        typename traits::input_parameter<U12>::type x12(args[12]);
+        typename traits::input_parameter<U13>::type x13(args[13]);
+        typename traits::input_parameter<U14>::type x14(args[14]);
+        typename traits::input_parameter<U15>::type x15(args[15]);
+        typename traits::input_parameter<U16>::type x16(args[16]);
+        typename traits::input_parameter<U17>::type x17(args[17]);
+        typename traits::input_parameter<U18>::type x18(args[18]);
+        typename traits::input_parameter<U19>::type x19(args[19]);
+        typename traits::input_parameter<U20>::type x20(args[20]);
+        typename traits::input_parameter<U21>::type x21(args[21]);
+        typename traits::input_parameter<U22>::type x22(args[22]);
+        typename traits::input_parameter<U23>::type x23(args[23]);
+        typename traits::input_parameter<U24>::type x24(args[24]);
+        typename traits::input_parameter<U25>::type x25(args[25]);
+        typename traits::input_parameter<U26>::type x26(args[26]);
+        typename traits::input_parameter<U27>::type x27(args[27]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24,U25,U26,U27,U28)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        typename traits::input_parameter<U8>::type x8(args[8]);
+        typename traits::input_parameter<U9>::type x9(args[9]);
+        typename traits::input_parameter<U10>::type x10(args[10]);
+        typename traits::input_parameter<U11>::type x11(args[11]);
+        typename traits::input_parameter<U12>::type x12(args[12]);
+        typename traits::input_parameter<U13>::type x13(args[13]);
+        typename traits::input_parameter<U14>::type x14(args[14]);
+        typename traits::input_parameter<U15>::type x15(args[15]);
+        typename traits::input_parameter<U16>::type x16(args[16]);
+        typename traits::input_parameter<U17>::type x17(args[17]);
+        typename traits::input_parameter<U18>::type x18(args[18]);
+        typename traits::input_parameter<U19>::type x19(args[19]);
+        typename traits::input_parameter<U20>::type x20(args[20]);
+        typename traits::input_parameter<U21>::type x21(args[21]);
+        typename traits::input_parameter<U22>::type x22(args[22]);
+        typename traits::input_parameter<U23>::type x23(args[23]);
+        typename traits::input_parameter<U24>::type x24(args[24]);
+        typename traits::input_parameter<U25>::type x25(args[25]);
+        typename traits::input_parameter<U26>::type x26(args[26]);
+        typename traits::input_parameter<U27>::type x27(args[27]);
+        typename traits::input_parameter<U28>::type x28(args[28]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24,U25,U26,U27,U28,U29)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        typename traits::input_parameter<U8>::type x8(args[8]);
+        typename traits::input_parameter<U9>::type x9(args[9]);
+        typename traits::input_parameter<U10>::type x10(args[10]);
+        typename traits::input_parameter<U11>::type x11(args[11]);
+        typename traits::input_parameter<U12>::type x12(args[12]);
+        typename traits::input_parameter<U13>::type x13(args[13]);
+        typename traits::input_parameter<U14>::type x14(args[14]);
+        typename traits::input_parameter<U15>::type x15(args[15]);
+        typename traits::input_parameter<U16>::type x16(args[16]);
+        typename traits::input_parameter<U17>::type x17(args[17]);
+        typename traits::input_parameter<U18>::type x18(args[18]);
+        typename traits::input_parameter<U19>::type x19(args[19]);
+        typename traits::input_parameter<U20>::type x20(args[20]);
+        typename traits::input_parameter<U21>::type x21(args[21]);
+        typename traits::input_parameter<U22>::type x22(args[22]);
+        typename traits::input_parameter<U23>::type x23(args[23]);
+        typename traits::input_parameter<U24>::type x24(args[24]);
+        typename traits::input_parameter<U25>::type x25(args[25]);
+        typename traits::input_parameter<U26>::type x26(args[26]);
+        typename traits::input_parameter<U27>::type x27(args[27]);
+        typename traits::input_parameter<U28>::type x28(args[28]);
+        typename traits::input_parameter<U29>::type x29(args[29]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24,U25,U26,U27,U28,U29,U30)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        typename traits::input_parameter<U8>::type x8(args[8]);
+        typename traits::input_parameter<U9>::type x9(args[9]);
+        typename traits::input_parameter<U10>::type x10(args[10]);
+        typename traits::input_parameter<U11>::type x11(args[11]);
+        typename traits::input_parameter<U12>::type x12(args[12]);
+        typename traits::input_parameter<U13>::type x13(args[13]);
+        typename traits::input_parameter<U14>::type x14(args[14]);
+        typename traits::input_parameter<U15>::type x15(args[15]);
+        typename traits::input_parameter<U16>::type x16(args[16]);
+        typename traits::input_parameter<U17>::type x17(args[17]);
+        typename traits::input_parameter<U18>::type x18(args[18]);
+        typename traits::input_parameter<U19>::type x19(args[19]);
+        typename traits::input_parameter<U20>::type x20(args[20]);
+        typename traits::input_parameter<U21>::type x21(args[21]);
+        typename traits::input_parameter<U22>::type x22(args[22]);
+        typename traits::input_parameter<U23>::type x23(args[23]);
+        typename traits::input_parameter<U24>::type x24(args[24]);
+        typename traits::input_parameter<U25>::type x25(args[25]);
+        typename traits::input_parameter<U26>::type x26(args[26]);
+        typename traits::input_parameter<U27>::type x27(args[27]);
+        typename traits::input_parameter<U28>::type x28(args[28]);
+        typename traits::input_parameter<U29>::type x29(args[29]);
+        typename traits::input_parameter<U30>::type x30(args[30]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24,U25,U26,U27,U28,U29,U30,U31)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        typename traits::input_parameter<U8>::type x8(args[8]);
+        typename traits::input_parameter<U9>::type x9(args[9]);
+        typename traits::input_parameter<U10>::type x10(args[10]);
+        typename traits::input_parameter<U11>::type x11(args[11]);
+        typename traits::input_parameter<U12>::type x12(args[12]);
+        typename traits::input_parameter<U13>::type x13(args[13]);
+        typename traits::input_parameter<U14>::type x14(args[14]);
+        typename traits::input_parameter<U15>::type x15(args[15]);
+        typename traits::input_parameter<U16>::type x16(args[16]);
+        typename traits::input_parameter<U17>::type x17(args[17]);
+        typename traits::input_parameter<U18>::type x18(args[18]);
+        typename traits::input_parameter<U19>::type x19(args[19]);
+        typename traits::input_parameter<U20>::type x20(args[20]);
+        typename traits::input_parameter<U21>::type x21(args[21]);
+        typename traits::input_parameter<U22>::type x22(args[22]);
+        typename traits::input_parameter<U23>::type x23(args[23]);
+        typename traits::input_parameter<U24>::type x24(args[24]);
+        typename traits::input_parameter<U25>::type x25(args[25]);
+        typename traits::input_parameter<U26>::type x26(args[26]);
+        typename traits::input_parameter<U27>::type x27(args[27]);
+        typename traits::input_parameter<U28>::type x28(args[28]);
+        typename traits::input_parameter<U29>::type x29(args[29]);
+        typename traits::input_parameter<U30>::type x30(args[30]);
+        typename traits::input_parameter<U31>::type x31(args[31]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x31);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24,U25,U26,U27,U28,U29,U30,U31,U32)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        typename traits::input_parameter<U8>::type x8(args[8]);
+        typename traits::input_parameter<U9>::type x9(args[9]);
+        typename traits::input_parameter<U10>::type x10(args[10]);
+        typename traits::input_parameter<U11>::type x11(args[11]);
+        typename traits::input_parameter<U12>::type x12(args[12]);
+        typename traits::input_parameter<U13>::type x13(args[13]);
+        typename traits::input_parameter<U14>::type x14(args[14]);
+        typename traits::input_parameter<U15>::type x15(args[15]);
+        typename traits::input_parameter<U16>::type x16(args[16]);
+        typename traits::input_parameter<U17>::type x17(args[17]);
+        typename traits::input_parameter<U18>::type x18(args[18]);
+        typename traits::input_parameter<U19>::type x19(args[19]);
+        typename traits::input_parameter<U20>::type x20(args[20]);
+        typename traits::input_parameter<U21>::type x21(args[21]);
+        typename traits::input_parameter<U22>::type x22(args[22]);
+        typename traits::input_parameter<U23>::type x23(args[23]);
+        typename traits::input_parameter<U24>::type x24(args[24]);
+        typename traits::input_parameter<U25>::type x25(args[25]);
+        typename traits::input_parameter<U26>::type x26(args[26]);
+        typename traits::input_parameter<U27>::type x27(args[27]);
+        typename traits::input_parameter<U28>::type x28(args[28]);
+        typename traits::input_parameter<U29>::type x29(args[29]);
+        typename traits::input_parameter<U30>::type x30(args[30]);
+        typename traits::input_parameter<U31>::type x31(args[31]);
+        typename traits::input_parameter<U32>::type x32(args[32]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x31,x32);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24,U25,U26,U27,U28,U29,U30,U31,U32,U33)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        typename traits::input_parameter<U8>::type x8(args[8]);
+        typename traits::input_parameter<U9>::type x9(args[9]);
+        typename traits::input_parameter<U10>::type x10(args[10]);
+        typename traits::input_parameter<U11>::type x11(args[11]);
+        typename traits::input_parameter<U12>::type x12(args[12]);
+        typename traits::input_parameter<U13>::type x13(args[13]);
+        typename traits::input_parameter<U14>::type x14(args[14]);
+        typename traits::input_parameter<U15>::type x15(args[15]);
+        typename traits::input_parameter<U16>::type x16(args[16]);
+        typename traits::input_parameter<U17>::type x17(args[17]);
+        typename traits::input_parameter<U18>::type x18(args[18]);
+        typename traits::input_parameter<U19>::type x19(args[19]);
+        typename traits::input_parameter<U20>::type x20(args[20]);
+        typename traits::input_parameter<U21>::type x21(args[21]);
+        typename traits::input_parameter<U22>::type x22(args[22]);
+        typename traits::input_parameter<U23>::type x23(args[23]);
+        typename traits::input_parameter<U24>::type x24(args[24]);
+        typename traits::input_parameter<U25>::type x25(args[25]);
+        typename traits::input_parameter<U26>::type x26(args[26]);
+        typename traits::input_parameter<U27>::type x27(args[27]);
+        typename traits::input_parameter<U28>::type x28(args[28]);
+        typename traits::input_parameter<U29>::type x29(args[29]);
+        typename traits::input_parameter<U30>::type x30(args[30]);
+        typename traits::input_parameter<U31>::type x31(args[31]);
+        typename traits::input_parameter<U32>::type x32(args[32]);
+        typename traits::input_parameter<U33>::type x33(args[33]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x31,x32,x33);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24,U25,U26,U27,U28,U29,U30,U31,U32,U33,U34)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        typename traits::input_parameter<U8>::type x8(args[8]);
+        typename traits::input_parameter<U9>::type x9(args[9]);
+        typename traits::input_parameter<U10>::type x10(args[10]);
+        typename traits::input_parameter<U11>::type x11(args[11]);
+        typename traits::input_parameter<U12>::type x12(args[12]);
+        typename traits::input_parameter<U13>::type x13(args[13]);
+        typename traits::input_parameter<U14>::type x14(args[14]);
+        typename traits::input_parameter<U15>::type x15(args[15]);
+        typename traits::input_parameter<U16>::type x16(args[16]);
+        typename traits::input_parameter<U17>::type x17(args[17]);
+        typename traits::input_parameter<U18>::type x18(args[18]);
+        typename traits::input_parameter<U19>::type x19(args[19]);
+        typename traits::input_parameter<U20>::type x20(args[20]);
+        typename traits::input_parameter<U21>::type x21(args[21]);
+        typename traits::input_parameter<U22>::type x22(args[22]);
+        typename traits::input_parameter<U23>::type x23(args[23]);
+        typename traits::input_parameter<U24>::type x24(args[24]);
+        typename traits::input_parameter<U25>::type x25(args[25]);
+        typename traits::input_parameter<U26>::type x26(args[26]);
+        typename traits::input_parameter<U27>::type x27(args[27]);
+        typename traits::input_parameter<U28>::type x28(args[28]);
+        typename traits::input_parameter<U29>::type x29(args[29]);
+        typename traits::input_parameter<U30>::type x30(args[30]);
+        typename traits::input_parameter<U31>::type x31(args[31]);
+        typename traits::input_parameter<U32>::type x32(args[32]);
+        typename traits::input_parameter<U33>::type x33(args[33]);
+        typename traits::input_parameter<U34>::type x34(args[34]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x31,x32,x33,x34);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24,U25,U26,U27,U28,U29,U30,U31,U32,U33,U34,U35)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        typename traits::input_parameter<U8>::type x8(args[8]);
+        typename traits::input_parameter<U9>::type x9(args[9]);
+        typename traits::input_parameter<U10>::type x10(args[10]);
+        typename traits::input_parameter<U11>::type x11(args[11]);
+        typename traits::input_parameter<U12>::type x12(args[12]);
+        typename traits::input_parameter<U13>::type x13(args[13]);
+        typename traits::input_parameter<U14>::type x14(args[14]);
+        typename traits::input_parameter<U15>::type x15(args[15]);
+        typename traits::input_parameter<U16>::type x16(args[16]);
+        typename traits::input_parameter<U17>::type x17(args[17]);
+        typename traits::input_parameter<U18>::type x18(args[18]);
+        typename traits::input_parameter<U19>::type x19(args[19]);
+        typename traits::input_parameter<U20>::type x20(args[20]);
+        typename traits::input_parameter<U21>::type x21(args[21]);
+        typename traits::input_parameter<U22>::type x22(args[22]);
+        typename traits::input_parameter<U23>::type x23(args[23]);
+        typename traits::input_parameter<U24>::type x24(args[24]);
+        typename traits::input_parameter<U25>::type x25(args[25]);
+        typename traits::input_parameter<U26>::type x26(args[26]);
+        typename traits::input_parameter<U27>::type x27(args[27]);
+        typename traits::input_parameter<U28>::type x28(args[28]);
+        typename traits::input_parameter<U29>::type x29(args[29]);
+        typename traits::input_parameter<U30>::type x30(args[30]);
+        typename traits::input_parameter<U31>::type x31(args[31]);
+        typename traits::input_parameter<U32>::type x32(args[32]);
+        typename traits::input_parameter<U33>::type x33(args[33]);
+        typename traits::input_parameter<U34>::type x34(args[34]);
+        typename traits::input_parameter<U35>::type x35(args[35]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x31,x32,x33,x34,x35);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24,U25,U26,U27,U28,U29,U30,U31,U32,U33,U34,U35,U36)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        typename traits::input_parameter<U8>::type x8(args[8]);
+        typename traits::input_parameter<U9>::type x9(args[9]);
+        typename traits::input_parameter<U10>::type x10(args[10]);
+        typename traits::input_parameter<U11>::type x11(args[11]);
+        typename traits::input_parameter<U12>::type x12(args[12]);
+        typename traits::input_parameter<U13>::type x13(args[13]);
+        typename traits::input_parameter<U14>::type x14(args[14]);
+        typename traits::input_parameter<U15>::type x15(args[15]);
+        typename traits::input_parameter<U16>::type x16(args[16]);
+        typename traits::input_parameter<U17>::type x17(args[17]);
+        typename traits::input_parameter<U18>::type x18(args[18]);
+        typename traits::input_parameter<U19>::type x19(args[19]);
+        typename traits::input_parameter<U20>::type x20(args[20]);
+        typename traits::input_parameter<U21>::type x21(args[21]);
+        typename traits::input_parameter<U22>::type x22(args[22]);
+        typename traits::input_parameter<U23>::type x23(args[23]);
+        typename traits::input_parameter<U24>::type x24(args[24]);
+        typename traits::input_parameter<U25>::type x25(args[25]);
+        typename traits::input_parameter<U26>::type x26(args[26]);
+        typename traits::input_parameter<U27>::type x27(args[27]);
+        typename traits::input_parameter<U28>::type x28(args[28]);
+        typename traits::input_parameter<U29>::type x29(args[29]);
+        typename traits::input_parameter<U30>::type x30(args[30]);
+        typename traits::input_parameter<U31>::type x31(args[31]);
+        typename traits::input_parameter<U32>::type x32(args[32]);
+        typename traits::input_parameter<U33>::type x33(args[33]);
+        typename traits::input_parameter<U34>::type x34(args[34]);
+        typename traits::input_parameter<U35>::type x35(args[35]);
+        typename traits::input_parameter<U36>::type x36(args[36]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x31,x32,x33,x34,x35,x36);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36, typename U37>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24,U25,U26,U27,U28,U29,U30,U31,U32,U33,U34,U35,U36,U37)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        typename traits::input_parameter<U8>::type x8(args[8]);
+        typename traits::input_parameter<U9>::type x9(args[9]);
+        typename traits::input_parameter<U10>::type x10(args[10]);
+        typename traits::input_parameter<U11>::type x11(args[11]);
+        typename traits::input_parameter<U12>::type x12(args[12]);
+        typename traits::input_parameter<U13>::type x13(args[13]);
+        typename traits::input_parameter<U14>::type x14(args[14]);
+        typename traits::input_parameter<U15>::type x15(args[15]);
+        typename traits::input_parameter<U16>::type x16(args[16]);
+        typename traits::input_parameter<U17>::type x17(args[17]);
+        typename traits::input_parameter<U18>::type x18(args[18]);
+        typename traits::input_parameter<U19>::type x19(args[19]);
+        typename traits::input_parameter<U20>::type x20(args[20]);
+        typename traits::input_parameter<U21>::type x21(args[21]);
+        typename traits::input_parameter<U22>::type x22(args[22]);
+        typename traits::input_parameter<U23>::type x23(args[23]);
+        typename traits::input_parameter<U24>::type x24(args[24]);
+        typename traits::input_parameter<U25>::type x25(args[25]);
+        typename traits::input_parameter<U26>::type x26(args[26]);
+        typename traits::input_parameter<U27>::type x27(args[27]);
+        typename traits::input_parameter<U28>::type x28(args[28]);
+        typename traits::input_parameter<U29>::type x29(args[29]);
+        typename traits::input_parameter<U30>::type x30(args[30]);
+        typename traits::input_parameter<U31>::type x31(args[31]);
+        typename traits::input_parameter<U32>::type x32(args[32]);
+        typename traits::input_parameter<U33>::type x33(args[33]);
+        typename traits::input_parameter<U34>::type x34(args[34]);
+        typename traits::input_parameter<U35>::type x35(args[35]);
+        typename traits::input_parameter<U36>::type x36(args[36]);
+        typename traits::input_parameter<U37>::type x37(args[37]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x31,x32,x33,x34,x35,x36,x37);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36, typename U37, typename U38>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24,U25,U26,U27,U28,U29,U30,U31,U32,U33,U34,U35,U36,U37,U38)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        typename traits::input_parameter<U8>::type x8(args[8]);
+        typename traits::input_parameter<U9>::type x9(args[9]);
+        typename traits::input_parameter<U10>::type x10(args[10]);
+        typename traits::input_parameter<U11>::type x11(args[11]);
+        typename traits::input_parameter<U12>::type x12(args[12]);
+        typename traits::input_parameter<U13>::type x13(args[13]);
+        typename traits::input_parameter<U14>::type x14(args[14]);
+        typename traits::input_parameter<U15>::type x15(args[15]);
+        typename traits::input_parameter<U16>::type x16(args[16]);
+        typename traits::input_parameter<U17>::type x17(args[17]);
+        typename traits::input_parameter<U18>::type x18(args[18]);
+        typename traits::input_parameter<U19>::type x19(args[19]);
+        typename traits::input_parameter<U20>::type x20(args[20]);
+        typename traits::input_parameter<U21>::type x21(args[21]);
+        typename traits::input_parameter<U22>::type x22(args[22]);
+        typename traits::input_parameter<U23>::type x23(args[23]);
+        typename traits::input_parameter<U24>::type x24(args[24]);
+        typename traits::input_parameter<U25>::type x25(args[25]);
+        typename traits::input_parameter<U26>::type x26(args[26]);
+        typename traits::input_parameter<U27>::type x27(args[27]);
+        typename traits::input_parameter<U28>::type x28(args[28]);
+        typename traits::input_parameter<U29>::type x29(args[29]);
+        typename traits::input_parameter<U30>::type x30(args[30]);
+        typename traits::input_parameter<U31>::type x31(args[31]);
+        typename traits::input_parameter<U32>::type x32(args[32]);
+        typename traits::input_parameter<U33>::type x33(args[33]);
+        typename traits::input_parameter<U34>::type x34(args[34]);
+        typename traits::input_parameter<U35>::type x35(args[35]);
+        typename traits::input_parameter<U36>::type x36(args[36]);
+        typename traits::input_parameter<U37>::type x37(args[37]);
+        typename traits::input_parameter<U38>::type x38(args[38]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x31,x32,x33,x34,x35,x36,x37,x38);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36, typename U37, typename U38, typename U39>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24,U25,U26,U27,U28,U29,U30,U31,U32,U33,U34,U35,U36,U37,U38,U39)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        typename traits::input_parameter<U8>::type x8(args[8]);
+        typename traits::input_parameter<U9>::type x9(args[9]);
+        typename traits::input_parameter<U10>::type x10(args[10]);
+        typename traits::input_parameter<U11>::type x11(args[11]);
+        typename traits::input_parameter<U12>::type x12(args[12]);
+        typename traits::input_parameter<U13>::type x13(args[13]);
+        typename traits::input_parameter<U14>::type x14(args[14]);
+        typename traits::input_parameter<U15>::type x15(args[15]);
+        typename traits::input_parameter<U16>::type x16(args[16]);
+        typename traits::input_parameter<U17>::type x17(args[17]);
+        typename traits::input_parameter<U18>::type x18(args[18]);
+        typename traits::input_parameter<U19>::type x19(args[19]);
+        typename traits::input_parameter<U20>::type x20(args[20]);
+        typename traits::input_parameter<U21>::type x21(args[21]);
+        typename traits::input_parameter<U22>::type x22(args[22]);
+        typename traits::input_parameter<U23>::type x23(args[23]);
+        typename traits::input_parameter<U24>::type x24(args[24]);
+        typename traits::input_parameter<U25>::type x25(args[25]);
+        typename traits::input_parameter<U26>::type x26(args[26]);
+        typename traits::input_parameter<U27>::type x27(args[27]);
+        typename traits::input_parameter<U28>::type x28(args[28]);
+        typename traits::input_parameter<U29>::type x29(args[29]);
+        typename traits::input_parameter<U30>::type x30(args[30]);
+        typename traits::input_parameter<U31>::type x31(args[31]);
+        typename traits::input_parameter<U32>::type x32(args[32]);
+        typename traits::input_parameter<U33>::type x33(args[33]);
+        typename traits::input_parameter<U34>::type x34(args[34]);
+        typename traits::input_parameter<U35>::type x35(args[35]);
+        typename traits::input_parameter<U36>::type x36(args[36]);
+        typename traits::input_parameter<U37>::type x37(args[37]);
+        typename traits::input_parameter<U38>::type x38(args[38]);
+        typename traits::input_parameter<U39>::type x39(args[39]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x31,x32,x33,x34,x35,x36,x37,x38,x39);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36, typename U37, typename U38, typename U39, typename U40>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24,U25,U26,U27,U28,U29,U30,U31,U32,U33,U34,U35,U36,U37,U38,U39,U40)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        typename traits::input_parameter<U8>::type x8(args[8]);
+        typename traits::input_parameter<U9>::type x9(args[9]);
+        typename traits::input_parameter<U10>::type x10(args[10]);
+        typename traits::input_parameter<U11>::type x11(args[11]);
+        typename traits::input_parameter<U12>::type x12(args[12]);
+        typename traits::input_parameter<U13>::type x13(args[13]);
+        typename traits::input_parameter<U14>::type x14(args[14]);
+        typename traits::input_parameter<U15>::type x15(args[15]);
+        typename traits::input_parameter<U16>::type x16(args[16]);
+        typename traits::input_parameter<U17>::type x17(args[17]);
+        typename traits::input_parameter<U18>::type x18(args[18]);
+        typename traits::input_parameter<U19>::type x19(args[19]);
+        typename traits::input_parameter<U20>::type x20(args[20]);
+        typename traits::input_parameter<U21>::type x21(args[21]);
+        typename traits::input_parameter<U22>::type x22(args[22]);
+        typename traits::input_parameter<U23>::type x23(args[23]);
+        typename traits::input_parameter<U24>::type x24(args[24]);
+        typename traits::input_parameter<U25>::type x25(args[25]);
+        typename traits::input_parameter<U26>::type x26(args[26]);
+        typename traits::input_parameter<U27>::type x27(args[27]);
+        typename traits::input_parameter<U28>::type x28(args[28]);
+        typename traits::input_parameter<U29>::type x29(args[29]);
+        typename traits::input_parameter<U30>::type x30(args[30]);
+        typename traits::input_parameter<U31>::type x31(args[31]);
+        typename traits::input_parameter<U32>::type x32(args[32]);
+        typename traits::input_parameter<U33>::type x33(args[33]);
+        typename traits::input_parameter<U34>::type x34(args[34]);
+        typename traits::input_parameter<U35>::type x35(args[35]);
+        typename traits::input_parameter<U36>::type x36(args[36]);
+        typename traits::input_parameter<U37>::type x37(args[37]);
+        typename traits::input_parameter<U38>::type x38(args[38]);
+        typename traits::input_parameter<U39>::type x39(args[39]);
+        typename traits::input_parameter<U40>::type x40(args[40]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x31,x32,x33,x34,x35,x36,x37,x38,x39,x40);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36, typename U37, typename U38, typename U39, typename U40, typename U41>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24,U25,U26,U27,U28,U29,U30,U31,U32,U33,U34,U35,U36,U37,U38,U39,U40,U41)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        typename traits::input_parameter<U8>::type x8(args[8]);
+        typename traits::input_parameter<U9>::type x9(args[9]);
+        typename traits::input_parameter<U10>::type x10(args[10]);
+        typename traits::input_parameter<U11>::type x11(args[11]);
+        typename traits::input_parameter<U12>::type x12(args[12]);
+        typename traits::input_parameter<U13>::type x13(args[13]);
+        typename traits::input_parameter<U14>::type x14(args[14]);
+        typename traits::input_parameter<U15>::type x15(args[15]);
+        typename traits::input_parameter<U16>::type x16(args[16]);
+        typename traits::input_parameter<U17>::type x17(args[17]);
+        typename traits::input_parameter<U18>::type x18(args[18]);
+        typename traits::input_parameter<U19>::type x19(args[19]);
+        typename traits::input_parameter<U20>::type x20(args[20]);
+        typename traits::input_parameter<U21>::type x21(args[21]);
+        typename traits::input_parameter<U22>::type x22(args[22]);
+        typename traits::input_parameter<U23>::type x23(args[23]);
+        typename traits::input_parameter<U24>::type x24(args[24]);
+        typename traits::input_parameter<U25>::type x25(args[25]);
+        typename traits::input_parameter<U26>::type x26(args[26]);
+        typename traits::input_parameter<U27>::type x27(args[27]);
+        typename traits::input_parameter<U28>::type x28(args[28]);
+        typename traits::input_parameter<U29>::type x29(args[29]);
+        typename traits::input_parameter<U30>::type x30(args[30]);
+        typename traits::input_parameter<U31>::type x31(args[31]);
+        typename traits::input_parameter<U32>::type x32(args[32]);
+        typename traits::input_parameter<U33>::type x33(args[33]);
+        typename traits::input_parameter<U34>::type x34(args[34]);
+        typename traits::input_parameter<U35>::type x35(args[35]);
+        typename traits::input_parameter<U36>::type x36(args[36]);
+        typename traits::input_parameter<U37>::type x37(args[37]);
+        typename traits::input_parameter<U38>::type x38(args[38]);
+        typename traits::input_parameter<U39>::type x39(args[39]);
+        typename traits::input_parameter<U40>::type x40(args[40]);
+        typename traits::input_parameter<U41>::type x41(args[41]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x31,x32,x33,x34,x35,x36,x37,x38,x39,x40,x41);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36, typename U37, typename U38, typename U39, typename U40, typename U41, typename U42>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24,U25,U26,U27,U28,U29,U30,U31,U32,U33,U34,U35,U36,U37,U38,U39,U40,U41,U42)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        typename traits::input_parameter<U8>::type x8(args[8]);
+        typename traits::input_parameter<U9>::type x9(args[9]);
+        typename traits::input_parameter<U10>::type x10(args[10]);
+        typename traits::input_parameter<U11>::type x11(args[11]);
+        typename traits::input_parameter<U12>::type x12(args[12]);
+        typename traits::input_parameter<U13>::type x13(args[13]);
+        typename traits::input_parameter<U14>::type x14(args[14]);
+        typename traits::input_parameter<U15>::type x15(args[15]);
+        typename traits::input_parameter<U16>::type x16(args[16]);
+        typename traits::input_parameter<U17>::type x17(args[17]);
+        typename traits::input_parameter<U18>::type x18(args[18]);
+        typename traits::input_parameter<U19>::type x19(args[19]);
+        typename traits::input_parameter<U20>::type x20(args[20]);
+        typename traits::input_parameter<U21>::type x21(args[21]);
+        typename traits::input_parameter<U22>::type x22(args[22]);
+        typename traits::input_parameter<U23>::type x23(args[23]);
+        typename traits::input_parameter<U24>::type x24(args[24]);
+        typename traits::input_parameter<U25>::type x25(args[25]);
+        typename traits::input_parameter<U26>::type x26(args[26]);
+        typename traits::input_parameter<U27>::type x27(args[27]);
+        typename traits::input_parameter<U28>::type x28(args[28]);
+        typename traits::input_parameter<U29>::type x29(args[29]);
+        typename traits::input_parameter<U30>::type x30(args[30]);
+        typename traits::input_parameter<U31>::type x31(args[31]);
+        typename traits::input_parameter<U32>::type x32(args[32]);
+        typename traits::input_parameter<U33>::type x33(args[33]);
+        typename traits::input_parameter<U34>::type x34(args[34]);
+        typename traits::input_parameter<U35>::type x35(args[35]);
+        typename traits::input_parameter<U36>::type x36(args[36]);
+        typename traits::input_parameter<U37>::type x37(args[37]);
+        typename traits::input_parameter<U38>::type x38(args[38]);
+        typename traits::input_parameter<U39>::type x39(args[39]);
+        typename traits::input_parameter<U40>::type x40(args[40]);
+        typename traits::input_parameter<U41>::type x41(args[41]);
+        typename traits::input_parameter<U42>::type x42(args[42]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x31,x32,x33,x34,x35,x36,x37,x38,x39,x40,x41,x42);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36, typename U37, typename U38, typename U39, typename U40, typename U41, typename U42, typename U43>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24,U25,U26,U27,U28,U29,U30,U31,U32,U33,U34,U35,U36,U37,U38,U39,U40,U41,U42,U43)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        typename traits::input_parameter<U8>::type x8(args[8]);
+        typename traits::input_parameter<U9>::type x9(args[9]);
+        typename traits::input_parameter<U10>::type x10(args[10]);
+        typename traits::input_parameter<U11>::type x11(args[11]);
+        typename traits::input_parameter<U12>::type x12(args[12]);
+        typename traits::input_parameter<U13>::type x13(args[13]);
+        typename traits::input_parameter<U14>::type x14(args[14]);
+        typename traits::input_parameter<U15>::type x15(args[15]);
+        typename traits::input_parameter<U16>::type x16(args[16]);
+        typename traits::input_parameter<U17>::type x17(args[17]);
+        typename traits::input_parameter<U18>::type x18(args[18]);
+        typename traits::input_parameter<U19>::type x19(args[19]);
+        typename traits::input_parameter<U20>::type x20(args[20]);
+        typename traits::input_parameter<U21>::type x21(args[21]);
+        typename traits::input_parameter<U22>::type x22(args[22]);
+        typename traits::input_parameter<U23>::type x23(args[23]);
+        typename traits::input_parameter<U24>::type x24(args[24]);
+        typename traits::input_parameter<U25>::type x25(args[25]);
+        typename traits::input_parameter<U26>::type x26(args[26]);
+        typename traits::input_parameter<U27>::type x27(args[27]);
+        typename traits::input_parameter<U28>::type x28(args[28]);
+        typename traits::input_parameter<U29>::type x29(args[29]);
+        typename traits::input_parameter<U30>::type x30(args[30]);
+        typename traits::input_parameter<U31>::type x31(args[31]);
+        typename traits::input_parameter<U32>::type x32(args[32]);
+        typename traits::input_parameter<U33>::type x33(args[33]);
+        typename traits::input_parameter<U34>::type x34(args[34]);
+        typename traits::input_parameter<U35>::type x35(args[35]);
+        typename traits::input_parameter<U36>::type x36(args[36]);
+        typename traits::input_parameter<U37>::type x37(args[37]);
+        typename traits::input_parameter<U38>::type x38(args[38]);
+        typename traits::input_parameter<U39>::type x39(args[39]);
+        typename traits::input_parameter<U40>::type x40(args[40]);
+        typename traits::input_parameter<U41>::type x41(args[41]);
+        typename traits::input_parameter<U42>::type x42(args[42]);
+        typename traits::input_parameter<U43>::type x43(args[43]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x31,x32,x33,x34,x35,x36,x37,x38,x39,x40,x41,x42,x43);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36, typename U37, typename U38, typename U39, typename U40, typename U41, typename U42, typename U43, typename U44>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24,U25,U26,U27,U28,U29,U30,U31,U32,U33,U34,U35,U36,U37,U38,U39,U40,U41,U42,U43,U44)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        typename traits::input_parameter<U8>::type x8(args[8]);
+        typename traits::input_parameter<U9>::type x9(args[9]);
+        typename traits::input_parameter<U10>::type x10(args[10]);
+        typename traits::input_parameter<U11>::type x11(args[11]);
+        typename traits::input_parameter<U12>::type x12(args[12]);
+        typename traits::input_parameter<U13>::type x13(args[13]);
+        typename traits::input_parameter<U14>::type x14(args[14]);
+        typename traits::input_parameter<U15>::type x15(args[15]);
+        typename traits::input_parameter<U16>::type x16(args[16]);
+        typename traits::input_parameter<U17>::type x17(args[17]);
+        typename traits::input_parameter<U18>::type x18(args[18]);
+        typename traits::input_parameter<U19>::type x19(args[19]);
+        typename traits::input_parameter<U20>::type x20(args[20]);
+        typename traits::input_parameter<U21>::type x21(args[21]);
+        typename traits::input_parameter<U22>::type x22(args[22]);
+        typename traits::input_parameter<U23>::type x23(args[23]);
+        typename traits::input_parameter<U24>::type x24(args[24]);
+        typename traits::input_parameter<U25>::type x25(args[25]);
+        typename traits::input_parameter<U26>::type x26(args[26]);
+        typename traits::input_parameter<U27>::type x27(args[27]);
+        typename traits::input_parameter<U28>::type x28(args[28]);
+        typename traits::input_parameter<U29>::type x29(args[29]);
+        typename traits::input_parameter<U30>::type x30(args[30]);
+        typename traits::input_parameter<U31>::type x31(args[31]);
+        typename traits::input_parameter<U32>::type x32(args[32]);
+        typename traits::input_parameter<U33>::type x33(args[33]);
+        typename traits::input_parameter<U34>::type x34(args[34]);
+        typename traits::input_parameter<U35>::type x35(args[35]);
+        typename traits::input_parameter<U36>::type x36(args[36]);
+        typename traits::input_parameter<U37>::type x37(args[37]);
+        typename traits::input_parameter<U38>::type x38(args[38]);
+        typename traits::input_parameter<U39>::type x39(args[39]);
+        typename traits::input_parameter<U40>::type x40(args[40]);
+        typename traits::input_parameter<U41>::type x41(args[41]);
+        typename traits::input_parameter<U42>::type x42(args[42]);
+        typename traits::input_parameter<U43>::type x43(args[43]);
+        typename traits::input_parameter<U44>::type x44(args[44]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x31,x32,x33,x34,x35,x36,x37,x38,x39,x40,x41,x42,x43,x44);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36, typename U37, typename U38, typename U39, typename U40, typename U41, typename U42, typename U43, typename U44, typename U45>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24,U25,U26,U27,U28,U29,U30,U31,U32,U33,U34,U35,U36,U37,U38,U39,U40,U41,U42,U43,U44,U45)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        typename traits::input_parameter<U8>::type x8(args[8]);
+        typename traits::input_parameter<U9>::type x9(args[9]);
+        typename traits::input_parameter<U10>::type x10(args[10]);
+        typename traits::input_parameter<U11>::type x11(args[11]);
+        typename traits::input_parameter<U12>::type x12(args[12]);
+        typename traits::input_parameter<U13>::type x13(args[13]);
+        typename traits::input_parameter<U14>::type x14(args[14]);
+        typename traits::input_parameter<U15>::type x15(args[15]);
+        typename traits::input_parameter<U16>::type x16(args[16]);
+        typename traits::input_parameter<U17>::type x17(args[17]);
+        typename traits::input_parameter<U18>::type x18(args[18]);
+        typename traits::input_parameter<U19>::type x19(args[19]);
+        typename traits::input_parameter<U20>::type x20(args[20]);
+        typename traits::input_parameter<U21>::type x21(args[21]);
+        typename traits::input_parameter<U22>::type x22(args[22]);
+        typename traits::input_parameter<U23>::type x23(args[23]);
+        typename traits::input_parameter<U24>::type x24(args[24]);
+        typename traits::input_parameter<U25>::type x25(args[25]);
+        typename traits::input_parameter<U26>::type x26(args[26]);
+        typename traits::input_parameter<U27>::type x27(args[27]);
+        typename traits::input_parameter<U28>::type x28(args[28]);
+        typename traits::input_parameter<U29>::type x29(args[29]);
+        typename traits::input_parameter<U30>::type x30(args[30]);
+        typename traits::input_parameter<U31>::type x31(args[31]);
+        typename traits::input_parameter<U32>::type x32(args[32]);
+        typename traits::input_parameter<U33>::type x33(args[33]);
+        typename traits::input_parameter<U34>::type x34(args[34]);
+        typename traits::input_parameter<U35>::type x35(args[35]);
+        typename traits::input_parameter<U36>::type x36(args[36]);
+        typename traits::input_parameter<U37>::type x37(args[37]);
+        typename traits::input_parameter<U38>::type x38(args[38]);
+        typename traits::input_parameter<U39>::type x39(args[39]);
+        typename traits::input_parameter<U40>::type x40(args[40]);
+        typename traits::input_parameter<U41>::type x41(args[41]);
+        typename traits::input_parameter<U42>::type x42(args[42]);
+        typename traits::input_parameter<U43>::type x43(args[43]);
+        typename traits::input_parameter<U44>::type x44(args[44]);
+        typename traits::input_parameter<U45>::type x45(args[45]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x31,x32,x33,x34,x35,x36,x37,x38,x39,x40,x41,x42,x43,x44,x45);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36, typename U37, typename U38, typename U39, typename U40, typename U41, typename U42, typename U43, typename U44, typename U45, typename U46>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24,U25,U26,U27,U28,U29,U30,U31,U32,U33,U34,U35,U36,U37,U38,U39,U40,U41,U42,U43,U44,U45,U46)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        typename traits::input_parameter<U8>::type x8(args[8]);
+        typename traits::input_parameter<U9>::type x9(args[9]);
+        typename traits::input_parameter<U10>::type x10(args[10]);
+        typename traits::input_parameter<U11>::type x11(args[11]);
+        typename traits::input_parameter<U12>::type x12(args[12]);
+        typename traits::input_parameter<U13>::type x13(args[13]);
+        typename traits::input_parameter<U14>::type x14(args[14]);
+        typename traits::input_parameter<U15>::type x15(args[15]);
+        typename traits::input_parameter<U16>::type x16(args[16]);
+        typename traits::input_parameter<U17>::type x17(args[17]);
+        typename traits::input_parameter<U18>::type x18(args[18]);
+        typename traits::input_parameter<U19>::type x19(args[19]);
+        typename traits::input_parameter<U20>::type x20(args[20]);
+        typename traits::input_parameter<U21>::type x21(args[21]);
+        typename traits::input_parameter<U22>::type x22(args[22]);
+        typename traits::input_parameter<U23>::type x23(args[23]);
+        typename traits::input_parameter<U24>::type x24(args[24]);
+        typename traits::input_parameter<U25>::type x25(args[25]);
+        typename traits::input_parameter<U26>::type x26(args[26]);
+        typename traits::input_parameter<U27>::type x27(args[27]);
+        typename traits::input_parameter<U28>::type x28(args[28]);
+        typename traits::input_parameter<U29>::type x29(args[29]);
+        typename traits::input_parameter<U30>::type x30(args[30]);
+        typename traits::input_parameter<U31>::type x31(args[31]);
+        typename traits::input_parameter<U32>::type x32(args[32]);
+        typename traits::input_parameter<U33>::type x33(args[33]);
+        typename traits::input_parameter<U34>::type x34(args[34]);
+        typename traits::input_parameter<U35>::type x35(args[35]);
+        typename traits::input_parameter<U36>::type x36(args[36]);
+        typename traits::input_parameter<U37>::type x37(args[37]);
+        typename traits::input_parameter<U38>::type x38(args[38]);
+        typename traits::input_parameter<U39>::type x39(args[39]);
+        typename traits::input_parameter<U40>::type x40(args[40]);
+        typename traits::input_parameter<U41>::type x41(args[41]);
+        typename traits::input_parameter<U42>::type x42(args[42]);
+        typename traits::input_parameter<U43>::type x43(args[43]);
+        typename traits::input_parameter<U44>::type x44(args[44]);
+        typename traits::input_parameter<U45>::type x45(args[45]);
+        typename traits::input_parameter<U46>::type x46(args[46]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x31,x32,x33,x34,x35,x36,x37,x38,x39,x40,x41,x42,x43,x44,x45,x46);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36, typename U37, typename U38, typename U39, typename U40, typename U41, typename U42, typename U43, typename U44, typename U45, typename U46, typename U47>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24,U25,U26,U27,U28,U29,U30,U31,U32,U33,U34,U35,U36,U37,U38,U39,U40,U41,U42,U43,U44,U45,U46,U47)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        typename traits::input_parameter<U8>::type x8(args[8]);
+        typename traits::input_parameter<U9>::type x9(args[9]);
+        typename traits::input_parameter<U10>::type x10(args[10]);
+        typename traits::input_parameter<U11>::type x11(args[11]);
+        typename traits::input_parameter<U12>::type x12(args[12]);
+        typename traits::input_parameter<U13>::type x13(args[13]);
+        typename traits::input_parameter<U14>::type x14(args[14]);
+        typename traits::input_parameter<U15>::type x15(args[15]);
+        typename traits::input_parameter<U16>::type x16(args[16]);
+        typename traits::input_parameter<U17>::type x17(args[17]);
+        typename traits::input_parameter<U18>::type x18(args[18]);
+        typename traits::input_parameter<U19>::type x19(args[19]);
+        typename traits::input_parameter<U20>::type x20(args[20]);
+        typename traits::input_parameter<U21>::type x21(args[21]);
+        typename traits::input_parameter<U22>::type x22(args[22]);
+        typename traits::input_parameter<U23>::type x23(args[23]);
+        typename traits::input_parameter<U24>::type x24(args[24]);
+        typename traits::input_parameter<U25>::type x25(args[25]);
+        typename traits::input_parameter<U26>::type x26(args[26]);
+        typename traits::input_parameter<U27>::type x27(args[27]);
+        typename traits::input_parameter<U28>::type x28(args[28]);
+        typename traits::input_parameter<U29>::type x29(args[29]);
+        typename traits::input_parameter<U30>::type x30(args[30]);
+        typename traits::input_parameter<U31>::type x31(args[31]);
+        typename traits::input_parameter<U32>::type x32(args[32]);
+        typename traits::input_parameter<U33>::type x33(args[33]);
+        typename traits::input_parameter<U34>::type x34(args[34]);
+        typename traits::input_parameter<U35>::type x35(args[35]);
+        typename traits::input_parameter<U36>::type x36(args[36]);
+        typename traits::input_parameter<U37>::type x37(args[37]);
+        typename traits::input_parameter<U38>::type x38(args[38]);
+        typename traits::input_parameter<U39>::type x39(args[39]);
+        typename traits::input_parameter<U40>::type x40(args[40]);
+        typename traits::input_parameter<U41>::type x41(args[41]);
+        typename traits::input_parameter<U42>::type x42(args[42]);
+        typename traits::input_parameter<U43>::type x43(args[43]);
+        typename traits::input_parameter<U44>::type x44(args[44]);
+        typename traits::input_parameter<U45>::type x45(args[45]);
+        typename traits::input_parameter<U46>::type x46(args[46]);
+        typename traits::input_parameter<U47>::type x47(args[47]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x31,x32,x33,x34,x35,x36,x37,x38,x39,x40,x41,x42,x43,x44,x45,x46,x47);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36, typename U37, typename U38, typename U39, typename U40, typename U41, typename U42, typename U43, typename U44, typename U45, typename U46, typename U47, typename U48>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24,U25,U26,U27,U28,U29,U30,U31,U32,U33,U34,U35,U36,U37,U38,U39,U40,U41,U42,U43,U44,U45,U46,U47,U48)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        typename traits::input_parameter<U8>::type x8(args[8]);
+        typename traits::input_parameter<U9>::type x9(args[9]);
+        typename traits::input_parameter<U10>::type x10(args[10]);
+        typename traits::input_parameter<U11>::type x11(args[11]);
+        typename traits::input_parameter<U12>::type x12(args[12]);
+        typename traits::input_parameter<U13>::type x13(args[13]);
+        typename traits::input_parameter<U14>::type x14(args[14]);
+        typename traits::input_parameter<U15>::type x15(args[15]);
+        typename traits::input_parameter<U16>::type x16(args[16]);
+        typename traits::input_parameter<U17>::type x17(args[17]);
+        typename traits::input_parameter<U18>::type x18(args[18]);
+        typename traits::input_parameter<U19>::type x19(args[19]);
+        typename traits::input_parameter<U20>::type x20(args[20]);
+        typename traits::input_parameter<U21>::type x21(args[21]);
+        typename traits::input_parameter<U22>::type x22(args[22]);
+        typename traits::input_parameter<U23>::type x23(args[23]);
+        typename traits::input_parameter<U24>::type x24(args[24]);
+        typename traits::input_parameter<U25>::type x25(args[25]);
+        typename traits::input_parameter<U26>::type x26(args[26]);
+        typename traits::input_parameter<U27>::type x27(args[27]);
+        typename traits::input_parameter<U28>::type x28(args[28]);
+        typename traits::input_parameter<U29>::type x29(args[29]);
+        typename traits::input_parameter<U30>::type x30(args[30]);
+        typename traits::input_parameter<U31>::type x31(args[31]);
+        typename traits::input_parameter<U32>::type x32(args[32]);
+        typename traits::input_parameter<U33>::type x33(args[33]);
+        typename traits::input_parameter<U34>::type x34(args[34]);
+        typename traits::input_parameter<U35>::type x35(args[35]);
+        typename traits::input_parameter<U36>::type x36(args[36]);
+        typename traits::input_parameter<U37>::type x37(args[37]);
+        typename traits::input_parameter<U38>::type x38(args[38]);
+        typename traits::input_parameter<U39>::type x39(args[39]);
+        typename traits::input_parameter<U40>::type x40(args[40]);
+        typename traits::input_parameter<U41>::type x41(args[41]);
+        typename traits::input_parameter<U42>::type x42(args[42]);
+        typename traits::input_parameter<U43>::type x43(args[43]);
+        typename traits::input_parameter<U44>::type x44(args[44]);
+        typename traits::input_parameter<U45>::type x45(args[45]);
+        typename traits::input_parameter<U46>::type x46(args[46]);
+        typename traits::input_parameter<U47>::type x47(args[47]);
+        typename traits::input_parameter<U48>::type x48(args[48]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x31,x32,x33,x34,x35,x36,x37,x38,x39,x40,x41,x42,x43,x44,x45,x46,x47,x48);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36, typename U37, typename U38, typename U39, typename U40, typename U41, typename U42, typename U43, typename U44, typename U45, typename U46, typename U47, typename U48, typename U49>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24,U25,U26,U27,U28,U29,U30,U31,U32,U33,U34,U35,U36,U37,U38,U39,U40,U41,U42,U43,U44,U45,U46,U47,U48,U49)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        typename traits::input_parameter<U8>::type x8(args[8]);
+        typename traits::input_parameter<U9>::type x9(args[9]);
+        typename traits::input_parameter<U10>::type x10(args[10]);
+        typename traits::input_parameter<U11>::type x11(args[11]);
+        typename traits::input_parameter<U12>::type x12(args[12]);
+        typename traits::input_parameter<U13>::type x13(args[13]);
+        typename traits::input_parameter<U14>::type x14(args[14]);
+        typename traits::input_parameter<U15>::type x15(args[15]);
+        typename traits::input_parameter<U16>::type x16(args[16]);
+        typename traits::input_parameter<U17>::type x17(args[17]);
+        typename traits::input_parameter<U18>::type x18(args[18]);
+        typename traits::input_parameter<U19>::type x19(args[19]);
+        typename traits::input_parameter<U20>::type x20(args[20]);
+        typename traits::input_parameter<U21>::type x21(args[21]);
+        typename traits::input_parameter<U22>::type x22(args[22]);
+        typename traits::input_parameter<U23>::type x23(args[23]);
+        typename traits::input_parameter<U24>::type x24(args[24]);
+        typename traits::input_parameter<U25>::type x25(args[25]);
+        typename traits::input_parameter<U26>::type x26(args[26]);
+        typename traits::input_parameter<U27>::type x27(args[27]);
+        typename traits::input_parameter<U28>::type x28(args[28]);
+        typename traits::input_parameter<U29>::type x29(args[29]);
+        typename traits::input_parameter<U30>::type x30(args[30]);
+        typename traits::input_parameter<U31>::type x31(args[31]);
+        typename traits::input_parameter<U32>::type x32(args[32]);
+        typename traits::input_parameter<U33>::type x33(args[33]);
+        typename traits::input_parameter<U34>::type x34(args[34]);
+        typename traits::input_parameter<U35>::type x35(args[35]);
+        typename traits::input_parameter<U36>::type x36(args[36]);
+        typename traits::input_parameter<U37>::type x37(args[37]);
+        typename traits::input_parameter<U38>::type x38(args[38]);
+        typename traits::input_parameter<U39>::type x39(args[39]);
+        typename traits::input_parameter<U40>::type x40(args[40]);
+        typename traits::input_parameter<U41>::type x41(args[41]);
+        typename traits::input_parameter<U42>::type x42(args[42]);
+        typename traits::input_parameter<U43>::type x43(args[43]);
+        typename traits::input_parameter<U44>::type x44(args[44]);
+        typename traits::input_parameter<U45>::type x45(args[45]);
+        typename traits::input_parameter<U46>::type x46(args[46]);
+        typename traits::input_parameter<U47>::type x47(args[47]);
+        typename traits::input_parameter<U48>::type x48(args[48]);
+        typename traits::input_parameter<U49>::type x49(args[49]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x31,x32,x33,x34,x35,x36,x37,x38,x39,x40,x41,x42,x43,x44,x45,x46,x47,x48,x49);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36, typename U37, typename U38, typename U39, typename U40, typename U41, typename U42, typename U43, typename U44, typename U45, typename U46, typename U47, typename U48, typename U49, typename U50>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24,U25,U26,U27,U28,U29,U30,U31,U32,U33,U34,U35,U36,U37,U38,U39,U40,U41,U42,U43,U44,U45,U46,U47,U48,U49,U50)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        typename traits::input_parameter<U8>::type x8(args[8]);
+        typename traits::input_parameter<U9>::type x9(args[9]);
+        typename traits::input_parameter<U10>::type x10(args[10]);
+        typename traits::input_parameter<U11>::type x11(args[11]);
+        typename traits::input_parameter<U12>::type x12(args[12]);
+        typename traits::input_parameter<U13>::type x13(args[13]);
+        typename traits::input_parameter<U14>::type x14(args[14]);
+        typename traits::input_parameter<U15>::type x15(args[15]);
+        typename traits::input_parameter<U16>::type x16(args[16]);
+        typename traits::input_parameter<U17>::type x17(args[17]);
+        typename traits::input_parameter<U18>::type x18(args[18]);
+        typename traits::input_parameter<U19>::type x19(args[19]);
+        typename traits::input_parameter<U20>::type x20(args[20]);
+        typename traits::input_parameter<U21>::type x21(args[21]);
+        typename traits::input_parameter<U22>::type x22(args[22]);
+        typename traits::input_parameter<U23>::type x23(args[23]);
+        typename traits::input_parameter<U24>::type x24(args[24]);
+        typename traits::input_parameter<U25>::type x25(args[25]);
+        typename traits::input_parameter<U26>::type x26(args[26]);
+        typename traits::input_parameter<U27>::type x27(args[27]);
+        typename traits::input_parameter<U28>::type x28(args[28]);
+        typename traits::input_parameter<U29>::type x29(args[29]);
+        typename traits::input_parameter<U30>::type x30(args[30]);
+        typename traits::input_parameter<U31>::type x31(args[31]);
+        typename traits::input_parameter<U32>::type x32(args[32]);
+        typename traits::input_parameter<U33>::type x33(args[33]);
+        typename traits::input_parameter<U34>::type x34(args[34]);
+        typename traits::input_parameter<U35>::type x35(args[35]);
+        typename traits::input_parameter<U36>::type x36(args[36]);
+        typename traits::input_parameter<U37>::type x37(args[37]);
+        typename traits::input_parameter<U38>::type x38(args[38]);
+        typename traits::input_parameter<U39>::type x39(args[39]);
+        typename traits::input_parameter<U40>::type x40(args[40]);
+        typename traits::input_parameter<U41>::type x41(args[41]);
+        typename traits::input_parameter<U42>::type x42(args[42]);
+        typename traits::input_parameter<U43>::type x43(args[43]);
+        typename traits::input_parameter<U44>::type x44(args[44]);
+        typename traits::input_parameter<U45>::type x45(args[45]);
+        typename traits::input_parameter<U46>::type x46(args[46]);
+        typename traits::input_parameter<U47>::type x47(args[47]);
+        typename traits::input_parameter<U48>::type x48(args[48]);
+        typename traits::input_parameter<U49>::type x49(args[49]);
+        typename traits::input_parameter<U50>::type x50(args[50]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x31,x32,x33,x34,x35,x36,x37,x38,x39,x40,x41,x42,x43,x44,x45,x46,x47,x48,x49,x50);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36, typename U37, typename U38, typename U39, typename U40, typename U41, typename U42, typename U43, typename U44, typename U45, typename U46, typename U47, typename U48, typename U49, typename U50, typename U51>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24,U25,U26,U27,U28,U29,U30,U31,U32,U33,U34,U35,U36,U37,U38,U39,U40,U41,U42,U43,U44,U45,U46,U47,U48,U49,U50,U51)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        typename traits::input_parameter<U8>::type x8(args[8]);
+        typename traits::input_parameter<U9>::type x9(args[9]);
+        typename traits::input_parameter<U10>::type x10(args[10]);
+        typename traits::input_parameter<U11>::type x11(args[11]);
+        typename traits::input_parameter<U12>::type x12(args[12]);
+        typename traits::input_parameter<U13>::type x13(args[13]);
+        typename traits::input_parameter<U14>::type x14(args[14]);
+        typename traits::input_parameter<U15>::type x15(args[15]);
+        typename traits::input_parameter<U16>::type x16(args[16]);
+        typename traits::input_parameter<U17>::type x17(args[17]);
+        typename traits::input_parameter<U18>::type x18(args[18]);
+        typename traits::input_parameter<U19>::type x19(args[19]);
+        typename traits::input_parameter<U20>::type x20(args[20]);
+        typename traits::input_parameter<U21>::type x21(args[21]);
+        typename traits::input_parameter<U22>::type x22(args[22]);
+        typename traits::input_parameter<U23>::type x23(args[23]);
+        typename traits::input_parameter<U24>::type x24(args[24]);
+        typename traits::input_parameter<U25>::type x25(args[25]);
+        typename traits::input_parameter<U26>::type x26(args[26]);
+        typename traits::input_parameter<U27>::type x27(args[27]);
+        typename traits::input_parameter<U28>::type x28(args[28]);
+        typename traits::input_parameter<U29>::type x29(args[29]);
+        typename traits::input_parameter<U30>::type x30(args[30]);
+        typename traits::input_parameter<U31>::type x31(args[31]);
+        typename traits::input_parameter<U32>::type x32(args[32]);
+        typename traits::input_parameter<U33>::type x33(args[33]);
+        typename traits::input_parameter<U34>::type x34(args[34]);
+        typename traits::input_parameter<U35>::type x35(args[35]);
+        typename traits::input_parameter<U36>::type x36(args[36]);
+        typename traits::input_parameter<U37>::type x37(args[37]);
+        typename traits::input_parameter<U38>::type x38(args[38]);
+        typename traits::input_parameter<U39>::type x39(args[39]);
+        typename traits::input_parameter<U40>::type x40(args[40]);
+        typename traits::input_parameter<U41>::type x41(args[41]);
+        typename traits::input_parameter<U42>::type x42(args[42]);
+        typename traits::input_parameter<U43>::type x43(args[43]);
+        typename traits::input_parameter<U44>::type x44(args[44]);
+        typename traits::input_parameter<U45>::type x45(args[45]);
+        typename traits::input_parameter<U46>::type x46(args[46]);
+        typename traits::input_parameter<U47>::type x47(args[47]);
+        typename traits::input_parameter<U48>::type x48(args[48]);
+        typename traits::input_parameter<U49>::type x49(args[49]);
+        typename traits::input_parameter<U50>::type x50(args[50]);
+        typename traits::input_parameter<U51>::type x51(args[51]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x31,x32,x33,x34,x35,x36,x37,x38,x39,x40,x41,x42,x43,x44,x45,x46,x47,x48,x49,x50,x51);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36, typename U37, typename U38, typename U39, typename U40, typename U41, typename U42, typename U43, typename U44, typename U45, typename U46, typename U47, typename U48, typename U49, typename U50, typename U51, typename U52>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24,U25,U26,U27,U28,U29,U30,U31,U32,U33,U34,U35,U36,U37,U38,U39,U40,U41,U42,U43,U44,U45,U46,U47,U48,U49,U50,U51,U52)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        typename traits::input_parameter<U8>::type x8(args[8]);
+        typename traits::input_parameter<U9>::type x9(args[9]);
+        typename traits::input_parameter<U10>::type x10(args[10]);
+        typename traits::input_parameter<U11>::type x11(args[11]);
+        typename traits::input_parameter<U12>::type x12(args[12]);
+        typename traits::input_parameter<U13>::type x13(args[13]);
+        typename traits::input_parameter<U14>::type x14(args[14]);
+        typename traits::input_parameter<U15>::type x15(args[15]);
+        typename traits::input_parameter<U16>::type x16(args[16]);
+        typename traits::input_parameter<U17>::type x17(args[17]);
+        typename traits::input_parameter<U18>::type x18(args[18]);
+        typename traits::input_parameter<U19>::type x19(args[19]);
+        typename traits::input_parameter<U20>::type x20(args[20]);
+        typename traits::input_parameter<U21>::type x21(args[21]);
+        typename traits::input_parameter<U22>::type x22(args[22]);
+        typename traits::input_parameter<U23>::type x23(args[23]);
+        typename traits::input_parameter<U24>::type x24(args[24]);
+        typename traits::input_parameter<U25>::type x25(args[25]);
+        typename traits::input_parameter<U26>::type x26(args[26]);
+        typename traits::input_parameter<U27>::type x27(args[27]);
+        typename traits::input_parameter<U28>::type x28(args[28]);
+        typename traits::input_parameter<U29>::type x29(args[29]);
+        typename traits::input_parameter<U30>::type x30(args[30]);
+        typename traits::input_parameter<U31>::type x31(args[31]);
+        typename traits::input_parameter<U32>::type x32(args[32]);
+        typename traits::input_parameter<U33>::type x33(args[33]);
+        typename traits::input_parameter<U34>::type x34(args[34]);
+        typename traits::input_parameter<U35>::type x35(args[35]);
+        typename traits::input_parameter<U36>::type x36(args[36]);
+        typename traits::input_parameter<U37>::type x37(args[37]);
+        typename traits::input_parameter<U38>::type x38(args[38]);
+        typename traits::input_parameter<U39>::type x39(args[39]);
+        typename traits::input_parameter<U40>::type x40(args[40]);
+        typename traits::input_parameter<U41>::type x41(args[41]);
+        typename traits::input_parameter<U42>::type x42(args[42]);
+        typename traits::input_parameter<U43>::type x43(args[43]);
+        typename traits::input_parameter<U44>::type x44(args[44]);
+        typename traits::input_parameter<U45>::type x45(args[45]);
+        typename traits::input_parameter<U46>::type x46(args[46]);
+        typename traits::input_parameter<U47>::type x47(args[47]);
+        typename traits::input_parameter<U48>::type x48(args[48]);
+        typename traits::input_parameter<U49>::type x49(args[49]);
+        typename traits::input_parameter<U50>::type x50(args[50]);
+        typename traits::input_parameter<U51>::type x51(args[51]);
+        typename traits::input_parameter<U52>::type x52(args[52]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x31,x32,x33,x34,x35,x36,x37,x38,x39,x40,x41,x42,x43,x44,x45,x46,x47,x48,x49,x50,x51,x52);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36, typename U37, typename U38, typename U39, typename U40, typename U41, typename U42, typename U43, typename U44, typename U45, typename U46, typename U47, typename U48, typename U49, typename U50, typename U51, typename U52, typename U53>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24,U25,U26,U27,U28,U29,U30,U31,U32,U33,U34,U35,U36,U37,U38,U39,U40,U41,U42,U43,U44,U45,U46,U47,U48,U49,U50,U51,U52,U53)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        typename traits::input_parameter<U8>::type x8(args[8]);
+        typename traits::input_parameter<U9>::type x9(args[9]);
+        typename traits::input_parameter<U10>::type x10(args[10]);
+        typename traits::input_parameter<U11>::type x11(args[11]);
+        typename traits::input_parameter<U12>::type x12(args[12]);
+        typename traits::input_parameter<U13>::type x13(args[13]);
+        typename traits::input_parameter<U14>::type x14(args[14]);
+        typename traits::input_parameter<U15>::type x15(args[15]);
+        typename traits::input_parameter<U16>::type x16(args[16]);
+        typename traits::input_parameter<U17>::type x17(args[17]);
+        typename traits::input_parameter<U18>::type x18(args[18]);
+        typename traits::input_parameter<U19>::type x19(args[19]);
+        typename traits::input_parameter<U20>::type x20(args[20]);
+        typename traits::input_parameter<U21>::type x21(args[21]);
+        typename traits::input_parameter<U22>::type x22(args[22]);
+        typename traits::input_parameter<U23>::type x23(args[23]);
+        typename traits::input_parameter<U24>::type x24(args[24]);
+        typename traits::input_parameter<U25>::type x25(args[25]);
+        typename traits::input_parameter<U26>::type x26(args[26]);
+        typename traits::input_parameter<U27>::type x27(args[27]);
+        typename traits::input_parameter<U28>::type x28(args[28]);
+        typename traits::input_parameter<U29>::type x29(args[29]);
+        typename traits::input_parameter<U30>::type x30(args[30]);
+        typename traits::input_parameter<U31>::type x31(args[31]);
+        typename traits::input_parameter<U32>::type x32(args[32]);
+        typename traits::input_parameter<U33>::type x33(args[33]);
+        typename traits::input_parameter<U34>::type x34(args[34]);
+        typename traits::input_parameter<U35>::type x35(args[35]);
+        typename traits::input_parameter<U36>::type x36(args[36]);
+        typename traits::input_parameter<U37>::type x37(args[37]);
+        typename traits::input_parameter<U38>::type x38(args[38]);
+        typename traits::input_parameter<U39>::type x39(args[39]);
+        typename traits::input_parameter<U40>::type x40(args[40]);
+        typename traits::input_parameter<U41>::type x41(args[41]);
+        typename traits::input_parameter<U42>::type x42(args[42]);
+        typename traits::input_parameter<U43>::type x43(args[43]);
+        typename traits::input_parameter<U44>::type x44(args[44]);
+        typename traits::input_parameter<U45>::type x45(args[45]);
+        typename traits::input_parameter<U46>::type x46(args[46]);
+        typename traits::input_parameter<U47>::type x47(args[47]);
+        typename traits::input_parameter<U48>::type x48(args[48]);
+        typename traits::input_parameter<U49>::type x49(args[49]);
+        typename traits::input_parameter<U50>::type x50(args[50]);
+        typename traits::input_parameter<U51>::type x51(args[51]);
+        typename traits::input_parameter<U52>::type x52(args[52]);
+        typename traits::input_parameter<U53>::type x53(args[53]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x31,x32,x33,x34,x35,x36,x37,x38,x39,x40,x41,x42,x43,x44,x45,x46,x47,x48,x49,x50,x51,x52,x53);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36, typename U37, typename U38, typename U39, typename U40, typename U41, typename U42, typename U43, typename U44, typename U45, typename U46, typename U47, typename U48, typename U49, typename U50, typename U51, typename U52, typename U53, typename U54>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24,U25,U26,U27,U28,U29,U30,U31,U32,U33,U34,U35,U36,U37,U38,U39,U40,U41,U42,U43,U44,U45,U46,U47,U48,U49,U50,U51,U52,U53,U54)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        typename traits::input_parameter<U8>::type x8(args[8]);
+        typename traits::input_parameter<U9>::type x9(args[9]);
+        typename traits::input_parameter<U10>::type x10(args[10]);
+        typename traits::input_parameter<U11>::type x11(args[11]);
+        typename traits::input_parameter<U12>::type x12(args[12]);
+        typename traits::input_parameter<U13>::type x13(args[13]);
+        typename traits::input_parameter<U14>::type x14(args[14]);
+        typename traits::input_parameter<U15>::type x15(args[15]);
+        typename traits::input_parameter<U16>::type x16(args[16]);
+        typename traits::input_parameter<U17>::type x17(args[17]);
+        typename traits::input_parameter<U18>::type x18(args[18]);
+        typename traits::input_parameter<U19>::type x19(args[19]);
+        typename traits::input_parameter<U20>::type x20(args[20]);
+        typename traits::input_parameter<U21>::type x21(args[21]);
+        typename traits::input_parameter<U22>::type x22(args[22]);
+        typename traits::input_parameter<U23>::type x23(args[23]);
+        typename traits::input_parameter<U24>::type x24(args[24]);
+        typename traits::input_parameter<U25>::type x25(args[25]);
+        typename traits::input_parameter<U26>::type x26(args[26]);
+        typename traits::input_parameter<U27>::type x27(args[27]);
+        typename traits::input_parameter<U28>::type x28(args[28]);
+        typename traits::input_parameter<U29>::type x29(args[29]);
+        typename traits::input_parameter<U30>::type x30(args[30]);
+        typename traits::input_parameter<U31>::type x31(args[31]);
+        typename traits::input_parameter<U32>::type x32(args[32]);
+        typename traits::input_parameter<U33>::type x33(args[33]);
+        typename traits::input_parameter<U34>::type x34(args[34]);
+        typename traits::input_parameter<U35>::type x35(args[35]);
+        typename traits::input_parameter<U36>::type x36(args[36]);
+        typename traits::input_parameter<U37>::type x37(args[37]);
+        typename traits::input_parameter<U38>::type x38(args[38]);
+        typename traits::input_parameter<U39>::type x39(args[39]);
+        typename traits::input_parameter<U40>::type x40(args[40]);
+        typename traits::input_parameter<U41>::type x41(args[41]);
+        typename traits::input_parameter<U42>::type x42(args[42]);
+        typename traits::input_parameter<U43>::type x43(args[43]);
+        typename traits::input_parameter<U44>::type x44(args[44]);
+        typename traits::input_parameter<U45>::type x45(args[45]);
+        typename traits::input_parameter<U46>::type x46(args[46]);
+        typename traits::input_parameter<U47>::type x47(args[47]);
+        typename traits::input_parameter<U48>::type x48(args[48]);
+        typename traits::input_parameter<U49>::type x49(args[49]);
+        typename traits::input_parameter<U50>::type x50(args[50]);
+        typename traits::input_parameter<U51>::type x51(args[51]);
+        typename traits::input_parameter<U52>::type x52(args[52]);
+        typename traits::input_parameter<U53>::type x53(args[53]);
+        typename traits::input_parameter<U54>::type x54(args[54]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x31,x32,x33,x34,x35,x36,x37,x38,x39,x40,x41,x42,x43,x44,x45,x46,x47,x48,x49,x50,x51,x52,x53,x54);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36, typename U37, typename U38, typename U39, typename U40, typename U41, typename U42, typename U43, typename U44, typename U45, typename U46, typename U47, typename U48, typename U49, typename U50, typename U51, typename U52, typename U53, typename U54, typename U55>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24,U25,U26,U27,U28,U29,U30,U31,U32,U33,U34,U35,U36,U37,U38,U39,U40,U41,U42,U43,U44,U45,U46,U47,U48,U49,U50,U51,U52,U53,U54,U55)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        typename traits::input_parameter<U8>::type x8(args[8]);
+        typename traits::input_parameter<U9>::type x9(args[9]);
+        typename traits::input_parameter<U10>::type x10(args[10]);
+        typename traits::input_parameter<U11>::type x11(args[11]);
+        typename traits::input_parameter<U12>::type x12(args[12]);
+        typename traits::input_parameter<U13>::type x13(args[13]);
+        typename traits::input_parameter<U14>::type x14(args[14]);
+        typename traits::input_parameter<U15>::type x15(args[15]);
+        typename traits::input_parameter<U16>::type x16(args[16]);
+        typename traits::input_parameter<U17>::type x17(args[17]);
+        typename traits::input_parameter<U18>::type x18(args[18]);
+        typename traits::input_parameter<U19>::type x19(args[19]);
+        typename traits::input_parameter<U20>::type x20(args[20]);
+        typename traits::input_parameter<U21>::type x21(args[21]);
+        typename traits::input_parameter<U22>::type x22(args[22]);
+        typename traits::input_parameter<U23>::type x23(args[23]);
+        typename traits::input_parameter<U24>::type x24(args[24]);
+        typename traits::input_parameter<U25>::type x25(args[25]);
+        typename traits::input_parameter<U26>::type x26(args[26]);
+        typename traits::input_parameter<U27>::type x27(args[27]);
+        typename traits::input_parameter<U28>::type x28(args[28]);
+        typename traits::input_parameter<U29>::type x29(args[29]);
+        typename traits::input_parameter<U30>::type x30(args[30]);
+        typename traits::input_parameter<U31>::type x31(args[31]);
+        typename traits::input_parameter<U32>::type x32(args[32]);
+        typename traits::input_parameter<U33>::type x33(args[33]);
+        typename traits::input_parameter<U34>::type x34(args[34]);
+        typename traits::input_parameter<U35>::type x35(args[35]);
+        typename traits::input_parameter<U36>::type x36(args[36]);
+        typename traits::input_parameter<U37>::type x37(args[37]);
+        typename traits::input_parameter<U38>::type x38(args[38]);
+        typename traits::input_parameter<U39>::type x39(args[39]);
+        typename traits::input_parameter<U40>::type x40(args[40]);
+        typename traits::input_parameter<U41>::type x41(args[41]);
+        typename traits::input_parameter<U42>::type x42(args[42]);
+        typename traits::input_parameter<U43>::type x43(args[43]);
+        typename traits::input_parameter<U44>::type x44(args[44]);
+        typename traits::input_parameter<U45>::type x45(args[45]);
+        typename traits::input_parameter<U46>::type x46(args[46]);
+        typename traits::input_parameter<U47>::type x47(args[47]);
+        typename traits::input_parameter<U48>::type x48(args[48]);
+        typename traits::input_parameter<U49>::type x49(args[49]);
+        typename traits::input_parameter<U50>::type x50(args[50]);
+        typename traits::input_parameter<U51>::type x51(args[51]);
+        typename traits::input_parameter<U52>::type x52(args[52]);
+        typename traits::input_parameter<U53>::type x53(args[53]);
+        typename traits::input_parameter<U54>::type x54(args[54]);
+        typename traits::input_parameter<U55>::type x55(args[55]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x31,x32,x33,x34,x35,x36,x37,x38,x39,x40,x41,x42,x43,x44,x45,x46,x47,x48,x49,x50,x51,x52,x53,x54,x55);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36, typename U37, typename U38, typename U39, typename U40, typename U41, typename U42, typename U43, typename U44, typename U45, typename U46, typename U47, typename U48, typename U49, typename U50, typename U51, typename U52, typename U53, typename U54, typename U55, typename U56>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24,U25,U26,U27,U28,U29,U30,U31,U32,U33,U34,U35,U36,U37,U38,U39,U40,U41,U42,U43,U44,U45,U46,U47,U48,U49,U50,U51,U52,U53,U54,U55,U56)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        typename traits::input_parameter<U8>::type x8(args[8]);
+        typename traits::input_parameter<U9>::type x9(args[9]);
+        typename traits::input_parameter<U10>::type x10(args[10]);
+        typename traits::input_parameter<U11>::type x11(args[11]);
+        typename traits::input_parameter<U12>::type x12(args[12]);
+        typename traits::input_parameter<U13>::type x13(args[13]);
+        typename traits::input_parameter<U14>::type x14(args[14]);
+        typename traits::input_parameter<U15>::type x15(args[15]);
+        typename traits::input_parameter<U16>::type x16(args[16]);
+        typename traits::input_parameter<U17>::type x17(args[17]);
+        typename traits::input_parameter<U18>::type x18(args[18]);
+        typename traits::input_parameter<U19>::type x19(args[19]);
+        typename traits::input_parameter<U20>::type x20(args[20]);
+        typename traits::input_parameter<U21>::type x21(args[21]);
+        typename traits::input_parameter<U22>::type x22(args[22]);
+        typename traits::input_parameter<U23>::type x23(args[23]);
+        typename traits::input_parameter<U24>::type x24(args[24]);
+        typename traits::input_parameter<U25>::type x25(args[25]);
+        typename traits::input_parameter<U26>::type x26(args[26]);
+        typename traits::input_parameter<U27>::type x27(args[27]);
+        typename traits::input_parameter<U28>::type x28(args[28]);
+        typename traits::input_parameter<U29>::type x29(args[29]);
+        typename traits::input_parameter<U30>::type x30(args[30]);
+        typename traits::input_parameter<U31>::type x31(args[31]);
+        typename traits::input_parameter<U32>::type x32(args[32]);
+        typename traits::input_parameter<U33>::type x33(args[33]);
+        typename traits::input_parameter<U34>::type x34(args[34]);
+        typename traits::input_parameter<U35>::type x35(args[35]);
+        typename traits::input_parameter<U36>::type x36(args[36]);
+        typename traits::input_parameter<U37>::type x37(args[37]);
+        typename traits::input_parameter<U38>::type x38(args[38]);
+        typename traits::input_parameter<U39>::type x39(args[39]);
+        typename traits::input_parameter<U40>::type x40(args[40]);
+        typename traits::input_parameter<U41>::type x41(args[41]);
+        typename traits::input_parameter<U42>::type x42(args[42]);
+        typename traits::input_parameter<U43>::type x43(args[43]);
+        typename traits::input_parameter<U44>::type x44(args[44]);
+        typename traits::input_parameter<U45>::type x45(args[45]);
+        typename traits::input_parameter<U46>::type x46(args[46]);
+        typename traits::input_parameter<U47>::type x47(args[47]);
+        typename traits::input_parameter<U48>::type x48(args[48]);
+        typename traits::input_parameter<U49>::type x49(args[49]);
+        typename traits::input_parameter<U50>::type x50(args[50]);
+        typename traits::input_parameter<U51>::type x51(args[51]);
+        typename traits::input_parameter<U52>::type x52(args[52]);
+        typename traits::input_parameter<U53>::type x53(args[53]);
+        typename traits::input_parameter<U54>::type x54(args[54]);
+        typename traits::input_parameter<U55>::type x55(args[55]);
+        typename traits::input_parameter<U56>::type x56(args[56]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x31,x32,x33,x34,x35,x36,x37,x38,x39,x40,x41,x42,x43,x44,x45,x46,x47,x48,x49,x50,x51,x52,x53,x54,x55,x56);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36, typename U37, typename U38, typename U39, typename U40, typename U41, typename U42, typename U43, typename U44, typename U45, typename U46, typename U47, typename U48, typename U49, typename U50, typename U51, typename U52, typename U53, typename U54, typename U55, typename U56, typename U57>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24,U25,U26,U27,U28,U29,U30,U31,U32,U33,U34,U35,U36,U37,U38,U39,U40,U41,U42,U43,U44,U45,U46,U47,U48,U49,U50,U51,U52,U53,U54,U55,U56,U57)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        typename traits::input_parameter<U8>::type x8(args[8]);
+        typename traits::input_parameter<U9>::type x9(args[9]);
+        typename traits::input_parameter<U10>::type x10(args[10]);
+        typename traits::input_parameter<U11>::type x11(args[11]);
+        typename traits::input_parameter<U12>::type x12(args[12]);
+        typename traits::input_parameter<U13>::type x13(args[13]);
+        typename traits::input_parameter<U14>::type x14(args[14]);
+        typename traits::input_parameter<U15>::type x15(args[15]);
+        typename traits::input_parameter<U16>::type x16(args[16]);
+        typename traits::input_parameter<U17>::type x17(args[17]);
+        typename traits::input_parameter<U18>::type x18(args[18]);
+        typename traits::input_parameter<U19>::type x19(args[19]);
+        typename traits::input_parameter<U20>::type x20(args[20]);
+        typename traits::input_parameter<U21>::type x21(args[21]);
+        typename traits::input_parameter<U22>::type x22(args[22]);
+        typename traits::input_parameter<U23>::type x23(args[23]);
+        typename traits::input_parameter<U24>::type x24(args[24]);
+        typename traits::input_parameter<U25>::type x25(args[25]);
+        typename traits::input_parameter<U26>::type x26(args[26]);
+        typename traits::input_parameter<U27>::type x27(args[27]);
+        typename traits::input_parameter<U28>::type x28(args[28]);
+        typename traits::input_parameter<U29>::type x29(args[29]);
+        typename traits::input_parameter<U30>::type x30(args[30]);
+        typename traits::input_parameter<U31>::type x31(args[31]);
+        typename traits::input_parameter<U32>::type x32(args[32]);
+        typename traits::input_parameter<U33>::type x33(args[33]);
+        typename traits::input_parameter<U34>::type x34(args[34]);
+        typename traits::input_parameter<U35>::type x35(args[35]);
+        typename traits::input_parameter<U36>::type x36(args[36]);
+        typename traits::input_parameter<U37>::type x37(args[37]);
+        typename traits::input_parameter<U38>::type x38(args[38]);
+        typename traits::input_parameter<U39>::type x39(args[39]);
+        typename traits::input_parameter<U40>::type x40(args[40]);
+        typename traits::input_parameter<U41>::type x41(args[41]);
+        typename traits::input_parameter<U42>::type x42(args[42]);
+        typename traits::input_parameter<U43>::type x43(args[43]);
+        typename traits::input_parameter<U44>::type x44(args[44]);
+        typename traits::input_parameter<U45>::type x45(args[45]);
+        typename traits::input_parameter<U46>::type x46(args[46]);
+        typename traits::input_parameter<U47>::type x47(args[47]);
+        typename traits::input_parameter<U48>::type x48(args[48]);
+        typename traits::input_parameter<U49>::type x49(args[49]);
+        typename traits::input_parameter<U50>::type x50(args[50]);
+        typename traits::input_parameter<U51>::type x51(args[51]);
+        typename traits::input_parameter<U52>::type x52(args[52]);
+        typename traits::input_parameter<U53>::type x53(args[53]);
+        typename traits::input_parameter<U54>::type x54(args[54]);
+        typename traits::input_parameter<U55>::type x55(args[55]);
+        typename traits::input_parameter<U56>::type x56(args[56]);
+        typename traits::input_parameter<U57>::type x57(args[57]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x31,x32,x33,x34,x35,x36,x37,x38,x39,x40,x41,x42,x43,x44,x45,x46,x47,x48,x49,x50,x51,x52,x53,x54,x55,x56,x57);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36, typename U37, typename U38, typename U39, typename U40, typename U41, typename U42, typename U43, typename U44, typename U45, typename U46, typename U47, typename U48, typename U49, typename U50, typename U51, typename U52, typename U53, typename U54, typename U55, typename U56, typename U57, typename U58>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24,U25,U26,U27,U28,U29,U30,U31,U32,U33,U34,U35,U36,U37,U38,U39,U40,U41,U42,U43,U44,U45,U46,U47,U48,U49,U50,U51,U52,U53,U54,U55,U56,U57,U58)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        typename traits::input_parameter<U8>::type x8(args[8]);
+        typename traits::input_parameter<U9>::type x9(args[9]);
+        typename traits::input_parameter<U10>::type x10(args[10]);
+        typename traits::input_parameter<U11>::type x11(args[11]);
+        typename traits::input_parameter<U12>::type x12(args[12]);
+        typename traits::input_parameter<U13>::type x13(args[13]);
+        typename traits::input_parameter<U14>::type x14(args[14]);
+        typename traits::input_parameter<U15>::type x15(args[15]);
+        typename traits::input_parameter<U16>::type x16(args[16]);
+        typename traits::input_parameter<U17>::type x17(args[17]);
+        typename traits::input_parameter<U18>::type x18(args[18]);
+        typename traits::input_parameter<U19>::type x19(args[19]);
+        typename traits::input_parameter<U20>::type x20(args[20]);
+        typename traits::input_parameter<U21>::type x21(args[21]);
+        typename traits::input_parameter<U22>::type x22(args[22]);
+        typename traits::input_parameter<U23>::type x23(args[23]);
+        typename traits::input_parameter<U24>::type x24(args[24]);
+        typename traits::input_parameter<U25>::type x25(args[25]);
+        typename traits::input_parameter<U26>::type x26(args[26]);
+        typename traits::input_parameter<U27>::type x27(args[27]);
+        typename traits::input_parameter<U28>::type x28(args[28]);
+        typename traits::input_parameter<U29>::type x29(args[29]);
+        typename traits::input_parameter<U30>::type x30(args[30]);
+        typename traits::input_parameter<U31>::type x31(args[31]);
+        typename traits::input_parameter<U32>::type x32(args[32]);
+        typename traits::input_parameter<U33>::type x33(args[33]);
+        typename traits::input_parameter<U34>::type x34(args[34]);
+        typename traits::input_parameter<U35>::type x35(args[35]);
+        typename traits::input_parameter<U36>::type x36(args[36]);
+        typename traits::input_parameter<U37>::type x37(args[37]);
+        typename traits::input_parameter<U38>::type x38(args[38]);
+        typename traits::input_parameter<U39>::type x39(args[39]);
+        typename traits::input_parameter<U40>::type x40(args[40]);
+        typename traits::input_parameter<U41>::type x41(args[41]);
+        typename traits::input_parameter<U42>::type x42(args[42]);
+        typename traits::input_parameter<U43>::type x43(args[43]);
+        typename traits::input_parameter<U44>::type x44(args[44]);
+        typename traits::input_parameter<U45>::type x45(args[45]);
+        typename traits::input_parameter<U46>::type x46(args[46]);
+        typename traits::input_parameter<U47>::type x47(args[47]);
+        typename traits::input_parameter<U48>::type x48(args[48]);
+        typename traits::input_parameter<U49>::type x49(args[49]);
+        typename traits::input_parameter<U50>::type x50(args[50]);
+        typename traits::input_parameter<U51>::type x51(args[51]);
+        typename traits::input_parameter<U52>::type x52(args[52]);
+        typename traits::input_parameter<U53>::type x53(args[53]);
+        typename traits::input_parameter<U54>::type x54(args[54]);
+        typename traits::input_parameter<U55>::type x55(args[55]);
+        typename traits::input_parameter<U56>::type x56(args[56]);
+        typename traits::input_parameter<U57>::type x57(args[57]);
+        typename traits::input_parameter<U58>::type x58(args[58]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x31,x32,x33,x34,x35,x36,x37,x38,x39,x40,x41,x42,x43,x44,x45,x46,x47,x48,x49,x50,x51,x52,x53,x54,x55,x56,x57,x58);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36, typename U37, typename U38, typename U39, typename U40, typename U41, typename U42, typename U43, typename U44, typename U45, typename U46, typename U47, typename U48, typename U49, typename U50, typename U51, typename U52, typename U53, typename U54, typename U55, typename U56, typename U57, typename U58, typename U59>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24,U25,U26,U27,U28,U29,U30,U31,U32,U33,U34,U35,U36,U37,U38,U39,U40,U41,U42,U43,U44,U45,U46,U47,U48,U49,U50,U51,U52,U53,U54,U55,U56,U57,U58,U59)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        typename traits::input_parameter<U8>::type x8(args[8]);
+        typename traits::input_parameter<U9>::type x9(args[9]);
+        typename traits::input_parameter<U10>::type x10(args[10]);
+        typename traits::input_parameter<U11>::type x11(args[11]);
+        typename traits::input_parameter<U12>::type x12(args[12]);
+        typename traits::input_parameter<U13>::type x13(args[13]);
+        typename traits::input_parameter<U14>::type x14(args[14]);
+        typename traits::input_parameter<U15>::type x15(args[15]);
+        typename traits::input_parameter<U16>::type x16(args[16]);
+        typename traits::input_parameter<U17>::type x17(args[17]);
+        typename traits::input_parameter<U18>::type x18(args[18]);
+        typename traits::input_parameter<U19>::type x19(args[19]);
+        typename traits::input_parameter<U20>::type x20(args[20]);
+        typename traits::input_parameter<U21>::type x21(args[21]);
+        typename traits::input_parameter<U22>::type x22(args[22]);
+        typename traits::input_parameter<U23>::type x23(args[23]);
+        typename traits::input_parameter<U24>::type x24(args[24]);
+        typename traits::input_parameter<U25>::type x25(args[25]);
+        typename traits::input_parameter<U26>::type x26(args[26]);
+        typename traits::input_parameter<U27>::type x27(args[27]);
+        typename traits::input_parameter<U28>::type x28(args[28]);
+        typename traits::input_parameter<U29>::type x29(args[29]);
+        typename traits::input_parameter<U30>::type x30(args[30]);
+        typename traits::input_parameter<U31>::type x31(args[31]);
+        typename traits::input_parameter<U32>::type x32(args[32]);
+        typename traits::input_parameter<U33>::type x33(args[33]);
+        typename traits::input_parameter<U34>::type x34(args[34]);
+        typename traits::input_parameter<U35>::type x35(args[35]);
+        typename traits::input_parameter<U36>::type x36(args[36]);
+        typename traits::input_parameter<U37>::type x37(args[37]);
+        typename traits::input_parameter<U38>::type x38(args[38]);
+        typename traits::input_parameter<U39>::type x39(args[39]);
+        typename traits::input_parameter<U40>::type x40(args[40]);
+        typename traits::input_parameter<U41>::type x41(args[41]);
+        typename traits::input_parameter<U42>::type x42(args[42]);
+        typename traits::input_parameter<U43>::type x43(args[43]);
+        typename traits::input_parameter<U44>::type x44(args[44]);
+        typename traits::input_parameter<U45>::type x45(args[45]);
+        typename traits::input_parameter<U46>::type x46(args[46]);
+        typename traits::input_parameter<U47>::type x47(args[47]);
+        typename traits::input_parameter<U48>::type x48(args[48]);
+        typename traits::input_parameter<U49>::type x49(args[49]);
+        typename traits::input_parameter<U50>::type x50(args[50]);
+        typename traits::input_parameter<U51>::type x51(args[51]);
+        typename traits::input_parameter<U52>::type x52(args[52]);
+        typename traits::input_parameter<U53>::type x53(args[53]);
+        typename traits::input_parameter<U54>::type x54(args[54]);
+        typename traits::input_parameter<U55>::type x55(args[55]);
+        typename traits::input_parameter<U56>::type x56(args[56]);
+        typename traits::input_parameter<U57>::type x57(args[57]);
+        typename traits::input_parameter<U58>::type x58(args[58]);
+        typename traits::input_parameter<U59>::type x59(args[59]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x31,x32,x33,x34,x35,x36,x37,x38,x39,x40,x41,x42,x43,x44,x45,x46,x47,x48,x49,x50,x51,x52,x53,x54,x55,x56,x57,x58,x59);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36, typename U37, typename U38, typename U39, typename U40, typename U41, typename U42, typename U43, typename U44, typename U45, typename U46, typename U47, typename U48, typename U49, typename U50, typename U51, typename U52, typename U53, typename U54, typename U55, typename U56, typename U57, typename U58, typename U59, typename U60>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24,U25,U26,U27,U28,U29,U30,U31,U32,U33,U34,U35,U36,U37,U38,U39,U40,U41,U42,U43,U44,U45,U46,U47,U48,U49,U50,U51,U52,U53,U54,U55,U56,U57,U58,U59,U60)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        typename traits::input_parameter<U8>::type x8(args[8]);
+        typename traits::input_parameter<U9>::type x9(args[9]);
+        typename traits::input_parameter<U10>::type x10(args[10]);
+        typename traits::input_parameter<U11>::type x11(args[11]);
+        typename traits::input_parameter<U12>::type x12(args[12]);
+        typename traits::input_parameter<U13>::type x13(args[13]);
+        typename traits::input_parameter<U14>::type x14(args[14]);
+        typename traits::input_parameter<U15>::type x15(args[15]);
+        typename traits::input_parameter<U16>::type x16(args[16]);
+        typename traits::input_parameter<U17>::type x17(args[17]);
+        typename traits::input_parameter<U18>::type x18(args[18]);
+        typename traits::input_parameter<U19>::type x19(args[19]);
+        typename traits::input_parameter<U20>::type x20(args[20]);
+        typename traits::input_parameter<U21>::type x21(args[21]);
+        typename traits::input_parameter<U22>::type x22(args[22]);
+        typename traits::input_parameter<U23>::type x23(args[23]);
+        typename traits::input_parameter<U24>::type x24(args[24]);
+        typename traits::input_parameter<U25>::type x25(args[25]);
+        typename traits::input_parameter<U26>::type x26(args[26]);
+        typename traits::input_parameter<U27>::type x27(args[27]);
+        typename traits::input_parameter<U28>::type x28(args[28]);
+        typename traits::input_parameter<U29>::type x29(args[29]);
+        typename traits::input_parameter<U30>::type x30(args[30]);
+        typename traits::input_parameter<U31>::type x31(args[31]);
+        typename traits::input_parameter<U32>::type x32(args[32]);
+        typename traits::input_parameter<U33>::type x33(args[33]);
+        typename traits::input_parameter<U34>::type x34(args[34]);
+        typename traits::input_parameter<U35>::type x35(args[35]);
+        typename traits::input_parameter<U36>::type x36(args[36]);
+        typename traits::input_parameter<U37>::type x37(args[37]);
+        typename traits::input_parameter<U38>::type x38(args[38]);
+        typename traits::input_parameter<U39>::type x39(args[39]);
+        typename traits::input_parameter<U40>::type x40(args[40]);
+        typename traits::input_parameter<U41>::type x41(args[41]);
+        typename traits::input_parameter<U42>::type x42(args[42]);
+        typename traits::input_parameter<U43>::type x43(args[43]);
+        typename traits::input_parameter<U44>::type x44(args[44]);
+        typename traits::input_parameter<U45>::type x45(args[45]);
+        typename traits::input_parameter<U46>::type x46(args[46]);
+        typename traits::input_parameter<U47>::type x47(args[47]);
+        typename traits::input_parameter<U48>::type x48(args[48]);
+        typename traits::input_parameter<U49>::type x49(args[49]);
+        typename traits::input_parameter<U50>::type x50(args[50]);
+        typename traits::input_parameter<U51>::type x51(args[51]);
+        typename traits::input_parameter<U52>::type x52(args[52]);
+        typename traits::input_parameter<U53>::type x53(args[53]);
+        typename traits::input_parameter<U54>::type x54(args[54]);
+        typename traits::input_parameter<U55>::type x55(args[55]);
+        typename traits::input_parameter<U56>::type x56(args[56]);
+        typename traits::input_parameter<U57>::type x57(args[57]);
+        typename traits::input_parameter<U58>::type x58(args[58]);
+        typename traits::input_parameter<U59>::type x59(args[59]);
+        typename traits::input_parameter<U60>::type x60(args[60]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x31,x32,x33,x34,x35,x36,x37,x38,x39,x40,x41,x42,x43,x44,x45,x46,x47,x48,x49,x50,x51,x52,x53,x54,x55,x56,x57,x58,x59,x60);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36, typename U37, typename U38, typename U39, typename U40, typename U41, typename U42, typename U43, typename U44, typename U45, typename U46, typename U47, typename U48, typename U49, typename U50, typename U51, typename U52, typename U53, typename U54, typename U55, typename U56, typename U57, typename U58, typename U59, typename U60, typename U61>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24,U25,U26,U27,U28,U29,U30,U31,U32,U33,U34,U35,U36,U37,U38,U39,U40,U41,U42,U43,U44,U45,U46,U47,U48,U49,U50,U51,U52,U53,U54,U55,U56,U57,U58,U59,U60,U61)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        typename traits::input_parameter<U8>::type x8(args[8]);
+        typename traits::input_parameter<U9>::type x9(args[9]);
+        typename traits::input_parameter<U10>::type x10(args[10]);
+        typename traits::input_parameter<U11>::type x11(args[11]);
+        typename traits::input_parameter<U12>::type x12(args[12]);
+        typename traits::input_parameter<U13>::type x13(args[13]);
+        typename traits::input_parameter<U14>::type x14(args[14]);
+        typename traits::input_parameter<U15>::type x15(args[15]);
+        typename traits::input_parameter<U16>::type x16(args[16]);
+        typename traits::input_parameter<U17>::type x17(args[17]);
+        typename traits::input_parameter<U18>::type x18(args[18]);
+        typename traits::input_parameter<U19>::type x19(args[19]);
+        typename traits::input_parameter<U20>::type x20(args[20]);
+        typename traits::input_parameter<U21>::type x21(args[21]);
+        typename traits::input_parameter<U22>::type x22(args[22]);
+        typename traits::input_parameter<U23>::type x23(args[23]);
+        typename traits::input_parameter<U24>::type x24(args[24]);
+        typename traits::input_parameter<U25>::type x25(args[25]);
+        typename traits::input_parameter<U26>::type x26(args[26]);
+        typename traits::input_parameter<U27>::type x27(args[27]);
+        typename traits::input_parameter<U28>::type x28(args[28]);
+        typename traits::input_parameter<U29>::type x29(args[29]);
+        typename traits::input_parameter<U30>::type x30(args[30]);
+        typename traits::input_parameter<U31>::type x31(args[31]);
+        typename traits::input_parameter<U32>::type x32(args[32]);
+        typename traits::input_parameter<U33>::type x33(args[33]);
+        typename traits::input_parameter<U34>::type x34(args[34]);
+        typename traits::input_parameter<U35>::type x35(args[35]);
+        typename traits::input_parameter<U36>::type x36(args[36]);
+        typename traits::input_parameter<U37>::type x37(args[37]);
+        typename traits::input_parameter<U38>::type x38(args[38]);
+        typename traits::input_parameter<U39>::type x39(args[39]);
+        typename traits::input_parameter<U40>::type x40(args[40]);
+        typename traits::input_parameter<U41>::type x41(args[41]);
+        typename traits::input_parameter<U42>::type x42(args[42]);
+        typename traits::input_parameter<U43>::type x43(args[43]);
+        typename traits::input_parameter<U44>::type x44(args[44]);
+        typename traits::input_parameter<U45>::type x45(args[45]);
+        typename traits::input_parameter<U46>::type x46(args[46]);
+        typename traits::input_parameter<U47>::type x47(args[47]);
+        typename traits::input_parameter<U48>::type x48(args[48]);
+        typename traits::input_parameter<U49>::type x49(args[49]);
+        typename traits::input_parameter<U50>::type x50(args[50]);
+        typename traits::input_parameter<U51>::type x51(args[51]);
+        typename traits::input_parameter<U52>::type x52(args[52]);
+        typename traits::input_parameter<U53>::type x53(args[53]);
+        typename traits::input_parameter<U54>::type x54(args[54]);
+        typename traits::input_parameter<U55>::type x55(args[55]);
+        typename traits::input_parameter<U56>::type x56(args[56]);
+        typename traits::input_parameter<U57>::type x57(args[57]);
+        typename traits::input_parameter<U58>::type x58(args[58]);
+        typename traits::input_parameter<U59>::type x59(args[59]);
+        typename traits::input_parameter<U60>::type x60(args[60]);
+        typename traits::input_parameter<U61>::type x61(args[61]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x31,x32,x33,x34,x35,x36,x37,x38,x39,x40,x41,x42,x43,x44,x45,x46,x47,x48,x49,x50,x51,x52,x53,x54,x55,x56,x57,x58,x59,x60,x61);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36, typename U37, typename U38, typename U39, typename U40, typename U41, typename U42, typename U43, typename U44, typename U45, typename U46, typename U47, typename U48, typename U49, typename U50, typename U51, typename U52, typename U53, typename U54, typename U55, typename U56, typename U57, typename U58, typename U59, typename U60, typename U61, typename U62>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24,U25,U26,U27,U28,U29,U30,U31,U32,U33,U34,U35,U36,U37,U38,U39,U40,U41,U42,U43,U44,U45,U46,U47,U48,U49,U50,U51,U52,U53,U54,U55,U56,U57,U58,U59,U60,U61,U62)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        typename traits::input_parameter<U8>::type x8(args[8]);
+        typename traits::input_parameter<U9>::type x9(args[9]);
+        typename traits::input_parameter<U10>::type x10(args[10]);
+        typename traits::input_parameter<U11>::type x11(args[11]);
+        typename traits::input_parameter<U12>::type x12(args[12]);
+        typename traits::input_parameter<U13>::type x13(args[13]);
+        typename traits::input_parameter<U14>::type x14(args[14]);
+        typename traits::input_parameter<U15>::type x15(args[15]);
+        typename traits::input_parameter<U16>::type x16(args[16]);
+        typename traits::input_parameter<U17>::type x17(args[17]);
+        typename traits::input_parameter<U18>::type x18(args[18]);
+        typename traits::input_parameter<U19>::type x19(args[19]);
+        typename traits::input_parameter<U20>::type x20(args[20]);
+        typename traits::input_parameter<U21>::type x21(args[21]);
+        typename traits::input_parameter<U22>::type x22(args[22]);
+        typename traits::input_parameter<U23>::type x23(args[23]);
+        typename traits::input_parameter<U24>::type x24(args[24]);
+        typename traits::input_parameter<U25>::type x25(args[25]);
+        typename traits::input_parameter<U26>::type x26(args[26]);
+        typename traits::input_parameter<U27>::type x27(args[27]);
+        typename traits::input_parameter<U28>::type x28(args[28]);
+        typename traits::input_parameter<U29>::type x29(args[29]);
+        typename traits::input_parameter<U30>::type x30(args[30]);
+        typename traits::input_parameter<U31>::type x31(args[31]);
+        typename traits::input_parameter<U32>::type x32(args[32]);
+        typename traits::input_parameter<U33>::type x33(args[33]);
+        typename traits::input_parameter<U34>::type x34(args[34]);
+        typename traits::input_parameter<U35>::type x35(args[35]);
+        typename traits::input_parameter<U36>::type x36(args[36]);
+        typename traits::input_parameter<U37>::type x37(args[37]);
+        typename traits::input_parameter<U38>::type x38(args[38]);
+        typename traits::input_parameter<U39>::type x39(args[39]);
+        typename traits::input_parameter<U40>::type x40(args[40]);
+        typename traits::input_parameter<U41>::type x41(args[41]);
+        typename traits::input_parameter<U42>::type x42(args[42]);
+        typename traits::input_parameter<U43>::type x43(args[43]);
+        typename traits::input_parameter<U44>::type x44(args[44]);
+        typename traits::input_parameter<U45>::type x45(args[45]);
+        typename traits::input_parameter<U46>::type x46(args[46]);
+        typename traits::input_parameter<U47>::type x47(args[47]);
+        typename traits::input_parameter<U48>::type x48(args[48]);
+        typename traits::input_parameter<U49>::type x49(args[49]);
+        typename traits::input_parameter<U50>::type x50(args[50]);
+        typename traits::input_parameter<U51>::type x51(args[51]);
+        typename traits::input_parameter<U52>::type x52(args[52]);
+        typename traits::input_parameter<U53>::type x53(args[53]);
+        typename traits::input_parameter<U54>::type x54(args[54]);
+        typename traits::input_parameter<U55>::type x55(args[55]);
+        typename traits::input_parameter<U56>::type x56(args[56]);
+        typename traits::input_parameter<U57>::type x57(args[57]);
+        typename traits::input_parameter<U58>::type x58(args[58]);
+        typename traits::input_parameter<U59>::type x59(args[59]);
+        typename traits::input_parameter<U60>::type x60(args[60]);
+        typename traits::input_parameter<U61>::type x61(args[61]);
+        typename traits::input_parameter<U62>::type x62(args[62]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x31,x32,x33,x34,x35,x36,x37,x38,x39,x40,x41,x42,x43,x44,x45,x46,x47,x48,x49,x50,x51,x52,x53,x54,x55,x56,x57,x58,x59,x60,x61,x62);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36, typename U37, typename U38, typename U39, typename U40, typename U41, typename U42, typename U43, typename U44, typename U45, typename U46, typename U47, typename U48, typename U49, typename U50, typename U51, typename U52, typename U53, typename U54, typename U55, typename U56, typename U57, typename U58, typename U59, typename U60, typename U61, typename U62, typename U63>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24,U25,U26,U27,U28,U29,U30,U31,U32,U33,U34,U35,U36,U37,U38,U39,U40,U41,U42,U43,U44,U45,U46,U47,U48,U49,U50,U51,U52,U53,U54,U55,U56,U57,U58,U59,U60,U61,U62,U63)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        typename traits::input_parameter<U8>::type x8(args[8]);
+        typename traits::input_parameter<U9>::type x9(args[9]);
+        typename traits::input_parameter<U10>::type x10(args[10]);
+        typename traits::input_parameter<U11>::type x11(args[11]);
+        typename traits::input_parameter<U12>::type x12(args[12]);
+        typename traits::input_parameter<U13>::type x13(args[13]);
+        typename traits::input_parameter<U14>::type x14(args[14]);
+        typename traits::input_parameter<U15>::type x15(args[15]);
+        typename traits::input_parameter<U16>::type x16(args[16]);
+        typename traits::input_parameter<U17>::type x17(args[17]);
+        typename traits::input_parameter<U18>::type x18(args[18]);
+        typename traits::input_parameter<U19>::type x19(args[19]);
+        typename traits::input_parameter<U20>::type x20(args[20]);
+        typename traits::input_parameter<U21>::type x21(args[21]);
+        typename traits::input_parameter<U22>::type x22(args[22]);
+        typename traits::input_parameter<U23>::type x23(args[23]);
+        typename traits::input_parameter<U24>::type x24(args[24]);
+        typename traits::input_parameter<U25>::type x25(args[25]);
+        typename traits::input_parameter<U26>::type x26(args[26]);
+        typename traits::input_parameter<U27>::type x27(args[27]);
+        typename traits::input_parameter<U28>::type x28(args[28]);
+        typename traits::input_parameter<U29>::type x29(args[29]);
+        typename traits::input_parameter<U30>::type x30(args[30]);
+        typename traits::input_parameter<U31>::type x31(args[31]);
+        typename traits::input_parameter<U32>::type x32(args[32]);
+        typename traits::input_parameter<U33>::type x33(args[33]);
+        typename traits::input_parameter<U34>::type x34(args[34]);
+        typename traits::input_parameter<U35>::type x35(args[35]);
+        typename traits::input_parameter<U36>::type x36(args[36]);
+        typename traits::input_parameter<U37>::type x37(args[37]);
+        typename traits::input_parameter<U38>::type x38(args[38]);
+        typename traits::input_parameter<U39>::type x39(args[39]);
+        typename traits::input_parameter<U40>::type x40(args[40]);
+        typename traits::input_parameter<U41>::type x41(args[41]);
+        typename traits::input_parameter<U42>::type x42(args[42]);
+        typename traits::input_parameter<U43>::type x43(args[43]);
+        typename traits::input_parameter<U44>::type x44(args[44]);
+        typename traits::input_parameter<U45>::type x45(args[45]);
+        typename traits::input_parameter<U46>::type x46(args[46]);
+        typename traits::input_parameter<U47>::type x47(args[47]);
+        typename traits::input_parameter<U48>::type x48(args[48]);
+        typename traits::input_parameter<U49>::type x49(args[49]);
+        typename traits::input_parameter<U50>::type x50(args[50]);
+        typename traits::input_parameter<U51>::type x51(args[51]);
+        typename traits::input_parameter<U52>::type x52(args[52]);
+        typename traits::input_parameter<U53>::type x53(args[53]);
+        typename traits::input_parameter<U54>::type x54(args[54]);
+        typename traits::input_parameter<U55>::type x55(args[55]);
+        typename traits::input_parameter<U56>::type x56(args[56]);
+        typename traits::input_parameter<U57>::type x57(args[57]);
+        typename traits::input_parameter<U58>::type x58(args[58]);
+        typename traits::input_parameter<U59>::type x59(args[59]);
+        typename traits::input_parameter<U60>::type x60(args[60]);
+        typename traits::input_parameter<U61>::type x61(args[61]);
+        typename traits::input_parameter<U62>::type x62(args[62]);
+        typename traits::input_parameter<U63>::type x63(args[63]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x31,x32,x33,x34,x35,x36,x37,x38,x39,x40,x41,x42,x43,x44,x45,x46,x47,x48,x49,x50,x51,x52,x53,x54,x55,x56,x57,x58,x59,x60,x61,x62,x63);
+    }
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36, typename U37, typename U38, typename U39, typename U40, typename U41, typename U42, typename U43, typename U44, typename U45, typename U46, typename U47, typename U48, typename U49, typename U50, typename U51, typename U52, typename U53, typename U54, typename U55, typename U56, typename U57, typename U58, typename U59, typename U60, typename U61, typename U62, typename U63, typename U64>
+    RESULT_TYPE call(const std::function<RESULT_TYPE(U0,U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24,U25,U26,U27,U28,U29,U30,U31,U32,U33,U34,U35,U36,U37,U38,U39,U40,U41,U42,U43,U44,U45,U46,U47,U48,U49,U50,U51,U52,U53,U54,U55,U56,U57,U58,U59,U60,U61,U62,U63,U64)> &fun, SEXP* args) {
+        typename traits::input_parameter<U0>::type x0(args[0]);
+        typename traits::input_parameter<U1>::type x1(args[1]);
+        typename traits::input_parameter<U2>::type x2(args[2]);
+        typename traits::input_parameter<U3>::type x3(args[3]);
+        typename traits::input_parameter<U4>::type x4(args[4]);
+        typename traits::input_parameter<U5>::type x5(args[5]);
+        typename traits::input_parameter<U6>::type x6(args[6]);
+        typename traits::input_parameter<U7>::type x7(args[7]);
+        typename traits::input_parameter<U8>::type x8(args[8]);
+        typename traits::input_parameter<U9>::type x9(args[9]);
+        typename traits::input_parameter<U10>::type x10(args[10]);
+        typename traits::input_parameter<U11>::type x11(args[11]);
+        typename traits::input_parameter<U12>::type x12(args[12]);
+        typename traits::input_parameter<U13>::type x13(args[13]);
+        typename traits::input_parameter<U14>::type x14(args[14]);
+        typename traits::input_parameter<U15>::type x15(args[15]);
+        typename traits::input_parameter<U16>::type x16(args[16]);
+        typename traits::input_parameter<U17>::type x17(args[17]);
+        typename traits::input_parameter<U18>::type x18(args[18]);
+        typename traits::input_parameter<U19>::type x19(args[19]);
+        typename traits::input_parameter<U20>::type x20(args[20]);
+        typename traits::input_parameter<U21>::type x21(args[21]);
+        typename traits::input_parameter<U22>::type x22(args[22]);
+        typename traits::input_parameter<U23>::type x23(args[23]);
+        typename traits::input_parameter<U24>::type x24(args[24]);
+        typename traits::input_parameter<U25>::type x25(args[25]);
+        typename traits::input_parameter<U26>::type x26(args[26]);
+        typename traits::input_parameter<U27>::type x27(args[27]);
+        typename traits::input_parameter<U28>::type x28(args[28]);
+        typename traits::input_parameter<U29>::type x29(args[29]);
+        typename traits::input_parameter<U30>::type x30(args[30]);
+        typename traits::input_parameter<U31>::type x31(args[31]);
+        typename traits::input_parameter<U32>::type x32(args[32]);
+        typename traits::input_parameter<U33>::type x33(args[33]);
+        typename traits::input_parameter<U34>::type x34(args[34]);
+        typename traits::input_parameter<U35>::type x35(args[35]);
+        typename traits::input_parameter<U36>::type x36(args[36]);
+        typename traits::input_parameter<U37>::type x37(args[37]);
+        typename traits::input_parameter<U38>::type x38(args[38]);
+        typename traits::input_parameter<U39>::type x39(args[39]);
+        typename traits::input_parameter<U40>::type x40(args[40]);
+        typename traits::input_parameter<U41>::type x41(args[41]);
+        typename traits::input_parameter<U42>::type x42(args[42]);
+        typename traits::input_parameter<U43>::type x43(args[43]);
+        typename traits::input_parameter<U44>::type x44(args[44]);
+        typename traits::input_parameter<U45>::type x45(args[45]);
+        typename traits::input_parameter<U46>::type x46(args[46]);
+        typename traits::input_parameter<U47>::type x47(args[47]);
+        typename traits::input_parameter<U48>::type x48(args[48]);
+        typename traits::input_parameter<U49>::type x49(args[49]);
+        typename traits::input_parameter<U50>::type x50(args[50]);
+        typename traits::input_parameter<U51>::type x51(args[51]);
+        typename traits::input_parameter<U52>::type x52(args[52]);
+        typename traits::input_parameter<U53>::type x53(args[53]);
+        typename traits::input_parameter<U54>::type x54(args[54]);
+        typename traits::input_parameter<U55>::type x55(args[55]);
+        typename traits::input_parameter<U56>::type x56(args[56]);
+        typename traits::input_parameter<U57>::type x57(args[57]);
+        typename traits::input_parameter<U58>::type x58(args[58]);
+        typename traits::input_parameter<U59>::type x59(args[59]);
+        typename traits::input_parameter<U60>::type x60(args[60]);
+        typename traits::input_parameter<U61>::type x61(args[61]);
+        typename traits::input_parameter<U62>::type x62(args[62]);
+        typename traits::input_parameter<U63>::type x63(args[63]);
+        typename traits::input_parameter<U64>::type x64(args[64]);
+        return fun(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x31,x32,x33,x34,x35,x36,x37,x38,x39,x40,x41,x42,x43,x44,x45,x46,x47,x48,x49,x50,x51,x52,x53,x54,x55,x56,x57,x58,x59,x60,x61,x62,x63,x64);
+    }
+
+
+#endif
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/generated/InternalFunction__ctors.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/generated/InternalFunction__ctors.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/generated/InternalFunction__ctors.h	(revision 2477)
@@ -0,0 +1,490 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+//
+// InternalFunction_Impl_ctors.h -- generated helper code for InternalFunction__ctors.h
+//                                  see rcpp-scripts repo for generator script
+//
+// Copyright (C) 2010 - 2014  Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__generated__InternalFunction_Impl_ctors_h
+#define Rcpp__generated__InternalFunction_Impl_ctors_h
+
+
+
+    template <typename RESULT_TYPE>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(void)) {
+        set(XPtr<CppFunction0<RESULT_TYPE> >(new CppFunction0<RESULT_TYPE>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0)) {
+        set(XPtr<CppFunction1<RESULT_TYPE,U0> >(new CppFunction1<RESULT_TYPE,U0>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1)) {
+        set(XPtr<CppFunction2<RESULT_TYPE,U0, U1> >(new CppFunction2<RESULT_TYPE,U0, U1>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2)) {
+        set(XPtr<CppFunction3<RESULT_TYPE,U0, U1, U2> >(new CppFunction3<RESULT_TYPE,U0, U1, U2>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3)) {
+        set(XPtr<CppFunction4<RESULT_TYPE,U0, U1, U2, U3> >(new CppFunction4<RESULT_TYPE,U0, U1, U2, U3>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4)) {
+        set(XPtr<CppFunction5<RESULT_TYPE,U0, U1, U2, U3, U4> >(new CppFunction5<RESULT_TYPE,U0, U1, U2, U3, U4>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5)) {
+        set(XPtr<CppFunction6<RESULT_TYPE,U0, U1, U2, U3, U4, U5> >(new CppFunction6<RESULT_TYPE,U0, U1, U2, U3, U4, U5>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6)) {
+        set(XPtr<CppFunction7<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6> >(new CppFunction7<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7)) {
+        set(XPtr<CppFunction8<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7> >(new CppFunction8<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8)) {
+        set(XPtr<CppFunction9<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8> >(new CppFunction9<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9)) {
+        set(XPtr<CppFunction10<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9> >(new CppFunction10<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10)) {
+        set(XPtr<CppFunction11<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10> >(new CppFunction11<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11)) {
+        set(XPtr<CppFunction12<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11> >(new CppFunction12<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12)) {
+        set(XPtr<CppFunction13<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12> >(new CppFunction13<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13)) {
+        set(XPtr<CppFunction14<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13> >(new CppFunction14<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14)) {
+        set(XPtr<CppFunction15<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14> >(new CppFunction15<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15)) {
+        set(XPtr<CppFunction16<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15> >(new CppFunction16<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16)) {
+        set(XPtr<CppFunction17<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16> >(new CppFunction17<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17)) {
+        set(XPtr<CppFunction18<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17> >(new CppFunction18<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18)) {
+        set(XPtr<CppFunction19<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18> >(new CppFunction19<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19)) {
+        set(XPtr<CppFunction20<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19> >(new CppFunction20<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20)) {
+        set(XPtr<CppFunction21<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20> >(new CppFunction21<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21)) {
+        set(XPtr<CppFunction22<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21> >(new CppFunction22<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22)) {
+        set(XPtr<CppFunction23<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22> >(new CppFunction23<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23)) {
+        set(XPtr<CppFunction24<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23> >(new CppFunction24<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24)) {
+        set(XPtr<CppFunction25<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24> >(new CppFunction25<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25)) {
+        set(XPtr<CppFunction26<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25> >(new CppFunction26<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26)) {
+        set(XPtr<CppFunction27<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26> >(new CppFunction27<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27)) {
+        set(XPtr<CppFunction28<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27> >(new CppFunction28<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28)) {
+        set(XPtr<CppFunction29<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28> >(new CppFunction29<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29)) {
+        set(XPtr<CppFunction30<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29> >(new CppFunction30<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30)) {
+        set(XPtr<CppFunction31<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30> >(new CppFunction31<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31)) {
+        set(XPtr<CppFunction32<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31> >(new CppFunction32<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32)) {
+        set(XPtr<CppFunction33<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32> >(new CppFunction33<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33)) {
+        set(XPtr<CppFunction34<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33> >(new CppFunction34<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34)) {
+        set(XPtr<CppFunction35<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34> >(new CppFunction35<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35)) {
+        set(XPtr<CppFunction36<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35> >(new CppFunction36<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36)) {
+        set(XPtr<CppFunction37<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36> >(new CppFunction37<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36, typename U37>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36, U37 u37)) {
+        set(XPtr<CppFunction38<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36, U37> >(new CppFunction38<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36, U37>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36, typename U37, typename U38>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36, U37 u37, U38 u38)) {
+        set(XPtr<CppFunction39<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36, U37, U38> >(new CppFunction39<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36, U37, U38>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36, typename U37, typename U38, typename U39>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36, U37 u37, U38 u38, U39 u39)) {
+        set(XPtr<CppFunction40<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36, U37, U38, U39> >(new CppFunction40<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36, U37, U38, U39>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36, typename U37, typename U38, typename U39, typename U40>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36, U37 u37, U38 u38, U39 u39, U40 u40)) {
+        set(XPtr<CppFunction41<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36, U37, U38, U39, U40> >(new CppFunction41<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36, U37, U38, U39, U40>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36, typename U37, typename U38, typename U39, typename U40, typename U41>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36, U37 u37, U38 u38, U39 u39, U40 u40, U41 u41)) {
+        set(XPtr<CppFunction42<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36, U37, U38, U39, U40, U41> >(new CppFunction42<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36, U37, U38, U39, U40, U41>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36, typename U37, typename U38, typename U39, typename U40, typename U41, typename U42>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36, U37 u37, U38 u38, U39 u39, U40 u40, U41 u41, U42 u42)) {
+        set(XPtr<CppFunction43<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36, U37, U38, U39, U40, U41, U42> >(new CppFunction43<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36, U37, U38, U39, U40, U41, U42>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36, typename U37, typename U38, typename U39, typename U40, typename U41, typename U42, typename U43>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36, U37 u37, U38 u38, U39 u39, U40 u40, U41 u41, U42 u42, U43 u43)) {
+        set(XPtr<CppFunction44<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36, U37, U38, U39, U40, U41, U42, U43> >(new CppFunction44<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36, U37, U38, U39, U40, U41, U42, U43>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36, typename U37, typename U38, typename U39, typename U40, typename U41, typename U42, typename U43, typename U44>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36, U37 u37, U38 u38, U39 u39, U40 u40, U41 u41, U42 u42, U43 u43, U44 u44)) {
+        set(XPtr<CppFunction45<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36, U37, U38, U39, U40, U41, U42, U43, U44> >(new CppFunction45<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36, U37, U38, U39, U40, U41, U42, U43, U44>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36, typename U37, typename U38, typename U39, typename U40, typename U41, typename U42, typename U43, typename U44, typename U45>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36, U37 u37, U38 u38, U39 u39, U40 u40, U41 u41, U42 u42, U43 u43, U44 u44, U45 u45)) {
+        set(XPtr<CppFunction46<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36, U37, U38, U39, U40, U41, U42, U43, U44, U45> >(new CppFunction46<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36, U37, U38, U39, U40, U41, U42, U43, U44, U45>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36, typename U37, typename U38, typename U39, typename U40, typename U41, typename U42, typename U43, typename U44, typename U45, typename U46>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36, U37 u37, U38 u38, U39 u39, U40 u40, U41 u41, U42 u42, U43 u43, U44 u44, U45 u45, U46 u46)) {
+        set(XPtr<CppFunction47<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36, U37, U38, U39, U40, U41, U42, U43, U44, U45, U46> >(new CppFunction47<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36, U37, U38, U39, U40, U41, U42, U43, U44, U45, U46>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36, typename U37, typename U38, typename U39, typename U40, typename U41, typename U42, typename U43, typename U44, typename U45, typename U46, typename U47>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36, U37 u37, U38 u38, U39 u39, U40 u40, U41 u41, U42 u42, U43 u43, U44 u44, U45 u45, U46 u46, U47 u47)) {
+        set(XPtr<CppFunction48<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36, U37, U38, U39, U40, U41, U42, U43, U44, U45, U46, U47> >(new CppFunction48<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36, U37, U38, U39, U40, U41, U42, U43, U44, U45, U46, U47>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36, typename U37, typename U38, typename U39, typename U40, typename U41, typename U42, typename U43, typename U44, typename U45, typename U46, typename U47, typename U48>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36, U37 u37, U38 u38, U39 u39, U40 u40, U41 u41, U42 u42, U43 u43, U44 u44, U45 u45, U46 u46, U47 u47, U48 u48)) {
+        set(XPtr<CppFunction49<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36, U37, U38, U39, U40, U41, U42, U43, U44, U45, U46, U47, U48> >(new CppFunction49<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36, U37, U38, U39, U40, U41, U42, U43, U44, U45, U46, U47, U48>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36, typename U37, typename U38, typename U39, typename U40, typename U41, typename U42, typename U43, typename U44, typename U45, typename U46, typename U47, typename U48, typename U49>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36, U37 u37, U38 u38, U39 u39, U40 u40, U41 u41, U42 u42, U43 u43, U44 u44, U45 u45, U46 u46, U47 u47, U48 u48, U49 u49)) {
+        set(XPtr<CppFunction50<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36, U37, U38, U39, U40, U41, U42, U43, U44, U45, U46, U47, U48, U49> >(new CppFunction50<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36, U37, U38, U39, U40, U41, U42, U43, U44, U45, U46, U47, U48, U49>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36, typename U37, typename U38, typename U39, typename U40, typename U41, typename U42, typename U43, typename U44, typename U45, typename U46, typename U47, typename U48, typename U49, typename U50>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36, U37 u37, U38 u38, U39 u39, U40 u40, U41 u41, U42 u42, U43 u43, U44 u44, U45 u45, U46 u46, U47 u47, U48 u48, U49 u49, U50 u50)) {
+        set(XPtr<CppFunction51<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36, U37, U38, U39, U40, U41, U42, U43, U44, U45, U46, U47, U48, U49, U50> >(new CppFunction51<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36, U37, U38, U39, U40, U41, U42, U43, U44, U45, U46, U47, U48, U49, U50>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36, typename U37, typename U38, typename U39, typename U40, typename U41, typename U42, typename U43, typename U44, typename U45, typename U46, typename U47, typename U48, typename U49, typename U50, typename U51>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36, U37 u37, U38 u38, U39 u39, U40 u40, U41 u41, U42 u42, U43 u43, U44 u44, U45 u45, U46 u46, U47 u47, U48 u48, U49 u49, U50 u50, U51 u51)) {
+        set(XPtr<CppFunction52<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36, U37, U38, U39, U40, U41, U42, U43, U44, U45, U46, U47, U48, U49, U50, U51> >(new CppFunction52<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36, U37, U38, U39, U40, U41, U42, U43, U44, U45, U46, U47, U48, U49, U50, U51>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36, typename U37, typename U38, typename U39, typename U40, typename U41, typename U42, typename U43, typename U44, typename U45, typename U46, typename U47, typename U48, typename U49, typename U50, typename U51, typename U52>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36, U37 u37, U38 u38, U39 u39, U40 u40, U41 u41, U42 u42, U43 u43, U44 u44, U45 u45, U46 u46, U47 u47, U48 u48, U49 u49, U50 u50, U51 u51, U52 u52)) {
+        set(XPtr<CppFunction53<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36, U37, U38, U39, U40, U41, U42, U43, U44, U45, U46, U47, U48, U49, U50, U51, U52> >(new CppFunction53<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36, U37, U38, U39, U40, U41, U42, U43, U44, U45, U46, U47, U48, U49, U50, U51, U52>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36, typename U37, typename U38, typename U39, typename U40, typename U41, typename U42, typename U43, typename U44, typename U45, typename U46, typename U47, typename U48, typename U49, typename U50, typename U51, typename U52, typename U53>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36, U37 u37, U38 u38, U39 u39, U40 u40, U41 u41, U42 u42, U43 u43, U44 u44, U45 u45, U46 u46, U47 u47, U48 u48, U49 u49, U50 u50, U51 u51, U52 u52, U53 u53)) {
+        set(XPtr<CppFunction54<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36, U37, U38, U39, U40, U41, U42, U43, U44, U45, U46, U47, U48, U49, U50, U51, U52, U53> >(new CppFunction54<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36, U37, U38, U39, U40, U41, U42, U43, U44, U45, U46, U47, U48, U49, U50, U51, U52, U53>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36, typename U37, typename U38, typename U39, typename U40, typename U41, typename U42, typename U43, typename U44, typename U45, typename U46, typename U47, typename U48, typename U49, typename U50, typename U51, typename U52, typename U53, typename U54>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36, U37 u37, U38 u38, U39 u39, U40 u40, U41 u41, U42 u42, U43 u43, U44 u44, U45 u45, U46 u46, U47 u47, U48 u48, U49 u49, U50 u50, U51 u51, U52 u52, U53 u53, U54 u54)) {
+        set(XPtr<CppFunction55<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36, U37, U38, U39, U40, U41, U42, U43, U44, U45, U46, U47, U48, U49, U50, U51, U52, U53, U54> >(new CppFunction55<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36, U37, U38, U39, U40, U41, U42, U43, U44, U45, U46, U47, U48, U49, U50, U51, U52, U53, U54>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36, typename U37, typename U38, typename U39, typename U40, typename U41, typename U42, typename U43, typename U44, typename U45, typename U46, typename U47, typename U48, typename U49, typename U50, typename U51, typename U52, typename U53, typename U54, typename U55>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36, U37 u37, U38 u38, U39 u39, U40 u40, U41 u41, U42 u42, U43 u43, U44 u44, U45 u45, U46 u46, U47 u47, U48 u48, U49 u49, U50 u50, U51 u51, U52 u52, U53 u53, U54 u54, U55 u55)) {
+        set(XPtr<CppFunction56<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36, U37, U38, U39, U40, U41, U42, U43, U44, U45, U46, U47, U48, U49, U50, U51, U52, U53, U54, U55> >(new CppFunction56<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36, U37, U38, U39, U40, U41, U42, U43, U44, U45, U46, U47, U48, U49, U50, U51, U52, U53, U54, U55>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36, typename U37, typename U38, typename U39, typename U40, typename U41, typename U42, typename U43, typename U44, typename U45, typename U46, typename U47, typename U48, typename U49, typename U50, typename U51, typename U52, typename U53, typename U54, typename U55, typename U56>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36, U37 u37, U38 u38, U39 u39, U40 u40, U41 u41, U42 u42, U43 u43, U44 u44, U45 u45, U46 u46, U47 u47, U48 u48, U49 u49, U50 u50, U51 u51, U52 u52, U53 u53, U54 u54, U55 u55, U56 u56)) {
+        set(XPtr<CppFunction57<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36, U37, U38, U39, U40, U41, U42, U43, U44, U45, U46, U47, U48, U49, U50, U51, U52, U53, U54, U55, U56> >(new CppFunction57<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36, U37, U38, U39, U40, U41, U42, U43, U44, U45, U46, U47, U48, U49, U50, U51, U52, U53, U54, U55, U56>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36, typename U37, typename U38, typename U39, typename U40, typename U41, typename U42, typename U43, typename U44, typename U45, typename U46, typename U47, typename U48, typename U49, typename U50, typename U51, typename U52, typename U53, typename U54, typename U55, typename U56, typename U57>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36, U37 u37, U38 u38, U39 u39, U40 u40, U41 u41, U42 u42, U43 u43, U44 u44, U45 u45, U46 u46, U47 u47, U48 u48, U49 u49, U50 u50, U51 u51, U52 u52, U53 u53, U54 u54, U55 u55, U56 u56, U57 u57)) {
+        set(XPtr<CppFunction58<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36, U37, U38, U39, U40, U41, U42, U43, U44, U45, U46, U47, U48, U49, U50, U51, U52, U53, U54, U55, U56, U57> >(new CppFunction58<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36, U37, U38, U39, U40, U41, U42, U43, U44, U45, U46, U47, U48, U49, U50, U51, U52, U53, U54, U55, U56, U57>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36, typename U37, typename U38, typename U39, typename U40, typename U41, typename U42, typename U43, typename U44, typename U45, typename U46, typename U47, typename U48, typename U49, typename U50, typename U51, typename U52, typename U53, typename U54, typename U55, typename U56, typename U57, typename U58>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36, U37 u37, U38 u38, U39 u39, U40 u40, U41 u41, U42 u42, U43 u43, U44 u44, U45 u45, U46 u46, U47 u47, U48 u48, U49 u49, U50 u50, U51 u51, U52 u52, U53 u53, U54 u54, U55 u55, U56 u56, U57 u57, U58 u58)) {
+        set(XPtr<CppFunction59<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36, U37, U38, U39, U40, U41, U42, U43, U44, U45, U46, U47, U48, U49, U50, U51, U52, U53, U54, U55, U56, U57, U58> >(new CppFunction59<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36, U37, U38, U39, U40, U41, U42, U43, U44, U45, U46, U47, U48, U49, U50, U51, U52, U53, U54, U55, U56, U57, U58>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36, typename U37, typename U38, typename U39, typename U40, typename U41, typename U42, typename U43, typename U44, typename U45, typename U46, typename U47, typename U48, typename U49, typename U50, typename U51, typename U52, typename U53, typename U54, typename U55, typename U56, typename U57, typename U58, typename U59>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36, U37 u37, U38 u38, U39 u39, U40 u40, U41 u41, U42 u42, U43 u43, U44 u44, U45 u45, U46 u46, U47 u47, U48 u48, U49 u49, U50 u50, U51 u51, U52 u52, U53 u53, U54 u54, U55 u55, U56 u56, U57 u57, U58 u58, U59 u59)) {
+        set(XPtr<CppFunction60<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36, U37, U38, U39, U40, U41, U42, U43, U44, U45, U46, U47, U48, U49, U50, U51, U52, U53, U54, U55, U56, U57, U58, U59> >(new CppFunction60<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36, U37, U38, U39, U40, U41, U42, U43, U44, U45, U46, U47, U48, U49, U50, U51, U52, U53, U54, U55, U56, U57, U58, U59>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36, typename U37, typename U38, typename U39, typename U40, typename U41, typename U42, typename U43, typename U44, typename U45, typename U46, typename U47, typename U48, typename U49, typename U50, typename U51, typename U52, typename U53, typename U54, typename U55, typename U56, typename U57, typename U58, typename U59, typename U60>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36, U37 u37, U38 u38, U39 u39, U40 u40, U41 u41, U42 u42, U43 u43, U44 u44, U45 u45, U46 u46, U47 u47, U48 u48, U49 u49, U50 u50, U51 u51, U52 u52, U53 u53, U54 u54, U55 u55, U56 u56, U57 u57, U58 u58, U59 u59, U60 u60)) {
+        set(XPtr<CppFunction61<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36, U37, U38, U39, U40, U41, U42, U43, U44, U45, U46, U47, U48, U49, U50, U51, U52, U53, U54, U55, U56, U57, U58, U59, U60> >(new CppFunction61<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36, U37, U38, U39, U40, U41, U42, U43, U44, U45, U46, U47, U48, U49, U50, U51, U52, U53, U54, U55, U56, U57, U58, U59, U60>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36, typename U37, typename U38, typename U39, typename U40, typename U41, typename U42, typename U43, typename U44, typename U45, typename U46, typename U47, typename U48, typename U49, typename U50, typename U51, typename U52, typename U53, typename U54, typename U55, typename U56, typename U57, typename U58, typename U59, typename U60, typename U61>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36, U37 u37, U38 u38, U39 u39, U40 u40, U41 u41, U42 u42, U43 u43, U44 u44, U45 u45, U46 u46, U47 u47, U48 u48, U49 u49, U50 u50, U51 u51, U52 u52, U53 u53, U54 u54, U55 u55, U56 u56, U57 u57, U58 u58, U59 u59, U60 u60, U61 u61)) {
+        set(XPtr<CppFunction62<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36, U37, U38, U39, U40, U41, U42, U43, U44, U45, U46, U47, U48, U49, U50, U51, U52, U53, U54, U55, U56, U57, U58, U59, U60, U61> >(new CppFunction62<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36, U37, U38, U39, U40, U41, U42, U43, U44, U45, U46, U47, U48, U49, U50, U51, U52, U53, U54, U55, U56, U57, U58, U59, U60, U61>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36, typename U37, typename U38, typename U39, typename U40, typename U41, typename U42, typename U43, typename U44, typename U45, typename U46, typename U47, typename U48, typename U49, typename U50, typename U51, typename U52, typename U53, typename U54, typename U55, typename U56, typename U57, typename U58, typename U59, typename U60, typename U61, typename U62>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36, U37 u37, U38 u38, U39 u39, U40 u40, U41 u41, U42 u42, U43 u43, U44 u44, U45 u45, U46 u46, U47 u47, U48 u48, U49 u49, U50 u50, U51 u51, U52 u52, U53 u53, U54 u54, U55 u55, U56 u56, U57 u57, U58 u58, U59 u59, U60 u60, U61 u61, U62 u62)) {
+        set(XPtr<CppFunction63<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36, U37, U38, U39, U40, U41, U42, U43, U44, U45, U46, U47, U48, U49, U50, U51, U52, U53, U54, U55, U56, U57, U58, U59, U60, U61, U62> >(new CppFunction63<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36, U37, U38, U39, U40, U41, U42, U43, U44, U45, U46, U47, U48, U49, U50, U51, U52, U53, U54, U55, U56, U57, U58, U59, U60, U61, U62>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36, typename U37, typename U38, typename U39, typename U40, typename U41, typename U42, typename U43, typename U44, typename U45, typename U46, typename U47, typename U48, typename U49, typename U50, typename U51, typename U52, typename U53, typename U54, typename U55, typename U56, typename U57, typename U58, typename U59, typename U60, typename U61, typename U62, typename U63>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36, U37 u37, U38 u38, U39 u39, U40 u40, U41 u41, U42 u42, U43 u43, U44 u44, U45 u45, U46 u46, U47 u47, U48 u48, U49 u49, U50 u50, U51 u51, U52 u52, U53 u53, U54 u54, U55 u55, U56 u56, U57 u57, U58 u58, U59 u59, U60 u60, U61 u61, U62 u62, U63 u63)) {
+        set(XPtr<CppFunction64<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36, U37, U38, U39, U40, U41, U42, U43, U44, U45, U46, U47, U48, U49, U50, U51, U52, U53, U54, U55, U56, U57, U58, U59, U60, U61, U62, U63> >(new CppFunction64<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36, U37, U38, U39, U40, U41, U42, U43, U44, U45, U46, U47, U48, U49, U50, U51, U52, U53, U54, U55, U56, U57, U58, U59, U60, U61, U62, U63>(fun), false));
+    }
+
+
+
+    template <typename RESULT_TYPE,typename U0, typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, typename U7, typename U8, typename U9, typename U10, typename U11, typename U12, typename U13, typename U14, typename U15, typename U16, typename U17, typename U18, typename U19, typename U20, typename U21, typename U22, typename U23, typename U24, typename U25, typename U26, typename U27, typename U28, typename U29, typename U30, typename U31, typename U32, typename U33, typename U34, typename U35, typename U36, typename U37, typename U38, typename U39, typename U40, typename U41, typename U42, typename U43, typename U44, typename U45, typename U46, typename U47, typename U48, typename U49, typename U50, typename U51, typename U52, typename U53, typename U54, typename U55, typename U56, typename U57, typename U58, typename U59, typename U60, typename U61, typename U62, typename U63, typename U64>
+    InternalFunction_Impl(RESULT_TYPE (*fun)(U0 u0, U1 u1, U2 u2, U3 u3, U4 u4, U5 u5, U6 u6, U7 u7, U8 u8, U9 u9, U10 u10, U11 u11, U12 u12, U13 u13, U14 u14, U15 u15, U16 u16, U17 u17, U18 u18, U19 u19, U20 u20, U21 u21, U22 u22, U23 u23, U24 u24, U25 u25, U26 u26, U27 u27, U28 u28, U29 u29, U30 u30, U31 u31, U32 u32, U33 u33, U34 u34, U35 u35, U36 u36, U37 u37, U38 u38, U39 u39, U40 u40, U41 u41, U42 u42, U43 u43, U44 u44, U45 u45, U46 u46, U47 u47, U48 u48, U49 u49, U50 u50, U51 u51, U52 u52, U53 u53, U54 u54, U55 u55, U56 u56, U57 u57, U58 u58, U59 u59, U60 u60, U61 u61, U62 u62, U63 u63, U64 u64)) {
+        set(XPtr<CppFunction65<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36, U37, U38, U39, U40, U41, U42, U43, U44, U45, U46, U47, U48, U49, U50, U51, U52, U53, U54, U55, U56, U57, U58, U59, U60, U61, U62, U63, U64> >(new CppFunction65<RESULT_TYPE,U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19, U20, U21, U22, U23, U24, U25, U26, U27, U28, U29, U30, U31, U32, U33, U34, U35, U36, U37, U38, U39, U40, U41, U42, U43, U44, U45, U46, U47, U48, U49, U50, U51, U52, U53, U54, U55, U56, U57, U58, U59, U60, U61, U62, U63, U64>(fun), false));
+    }
+
+
+#endif
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/generated/Language__ctors.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/generated/Language__ctors.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/generated/Language__ctors.h	(revision 2477)
@@ -0,0 +1,241 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
+//
+// Language__ctors.h: Rcpp R/C++ interface class library -- generated helper code for Language.h
+//
+// Copyright (C) 2010 - 2013 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__generated__Language_ctors_h
+#define Rcpp__generated__Language_ctors_h
+
+
+/* <code-bloat>
+
+template <TYPENAMES>
+Language_Impl( const std::string& symbol, ARGUMENTS) {
+    Storage::set__( pairlist(Rf_install( symbol.c_str() ), PARAMETERS) ) ;
+}
+
+template <TYPENAMES>
+Language_Impl( const Function& function, ARGUMENTS) {
+    Storage::set__( pairlist( function, PARAMETERS) );
+}
+
+*/
+
+template <typename T1>
+Language_Impl( const std::string& symbol, const T1& t1) {
+    Storage::set__( pairlist(Rf_install( symbol.c_str() ), t1) );
+}
+
+template <typename T1>
+Language_Impl( const Function& function, const T1& t1) {
+    Storage::set__( pairlist( function, t1) ) ;
+
+}
+
+template <typename T1, typename T2>
+Language_Impl( const std::string& symbol, const T1& t1, const T2& t2) {
+    Storage::set__( pairlist(Rf_install( symbol.c_str() ), t1, t2));
+}
+
+template <typename T1, typename T2>
+Language_Impl( const Function& function, const T1& t1, const T2& t2) {
+    Storage::set__( pairlist( function, t1, t2))  ;
+}
+
+template <typename T1, typename T2, typename T3>
+Language_Impl( const std::string& symbol, const T1& t1, const T2& t2, const T3& t3) {
+    Storage::set__( pairlist(Rf_install( symbol.c_str() ), t1, t2, t3) );
+}
+
+template <typename T1, typename T2, typename T3>
+Language_Impl( const Function& function, const T1& t1, const T2& t2, const T3& t3) {
+    Storage::set__( pairlist( function, t1, t2, t3) );
+}
+
+template <typename T1, typename T2, typename T3, typename T4>
+Language_Impl( const std::string& symbol, const T1& t1, const T2& t2, const T3& t3, const T4& t4) {
+    Storage::set__( pairlist(Rf_install( symbol.c_str() ), t1, t2, t3, t4) );
+}
+
+template <typename T1, typename T2, typename T3, typename T4>
+Language_Impl( const Function& function, const T1& t1, const T2& t2, const T3& t3, const T4& t4) {
+    Storage::set__( pairlist( function, t1, t2, t3, t4) );
+}
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5>
+Language_Impl( const std::string& symbol, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5) {
+    Storage::set__( pairlist(Rf_install( symbol.c_str() ), t1, t2, t3, t4, t5) );
+}
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5>
+Language_Impl( const Function& function, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5) {
+    Storage::set__( pairlist( function, t1, t2, t3, t4, t5) );
+}
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>
+Language_Impl( const std::string& symbol, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6) {
+    Storage::set__( pairlist(Rf_install( symbol.c_str() ), t1, t2, t3, t4, t5, t6) );
+}
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>
+Language_Impl( const Function& function, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6) {
+    Storage::set__( pairlist( function, t1, t2, t3, t4, t5, t6) );
+}
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7>
+Language_Impl( const std::string& symbol, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7) {
+    Storage::set__( pairlist(Rf_install( symbol.c_str() ), t1, t2, t3, t4, t5, t6, t7) );
+}
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7>
+Language_Impl( const Function& function, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7) {
+    Storage::set__( pairlist( function, t1, t2, t3, t4, t5, t6, t7) );
+}
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8>
+Language_Impl( const std::string& symbol, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8) {
+    Storage::set__( pairlist(Rf_install( symbol.c_str() ), t1, t2, t3, t4, t5, t6, t7, t8) );
+}
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8>
+Language_Impl( const Function& function, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8) {
+    Storage::set__( pairlist( function, t1, t2, t3, t4, t5, t6, t7, t8) );
+}
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9>
+Language_Impl( const std::string& symbol, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9) {
+    Storage::set__( pairlist(Rf_install( symbol.c_str() ), t1, t2, t3, t4, t5, t6, t7, t8, t9) );
+}
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9>
+Language_Impl( const Function& function, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9) {
+    Storage::set__( pairlist( function, t1, t2, t3, t4, t5, t6, t7, t8, t9) );
+}
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10>
+Language_Impl( const std::string& symbol, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10) {
+    Storage::set__( pairlist(Rf_install( symbol.c_str() ), t1, t2, t3, t4, t5, t6, t7, t8, t9, t10) );
+}
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10>
+Language_Impl( const Function& function, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10) {
+    Storage::set__( pairlist( function, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10) );
+}
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11>
+Language_Impl( const std::string& symbol, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11) {
+    Storage::set__( pairlist(Rf_install( symbol.c_str() ), t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11) );
+}
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11>
+Language_Impl( const Function& function, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11) {
+    Storage::set__( pairlist( function, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11) );
+}
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12>
+Language_Impl( const std::string& symbol, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12) {
+    Storage::set__( pairlist(Rf_install( symbol.c_str() ), t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12) );
+}
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12>
+Language_Impl( const Function& function, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12) {
+    Storage::set__( pairlist( function, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12) );
+}
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13>
+Language_Impl( const std::string& symbol, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13) {
+    Storage::set__( pairlist(Rf_install( symbol.c_str() ), t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13) );
+}
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13>
+Language_Impl( const Function& function, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13) {
+    Storage::set__( pairlist( function, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13) );
+}
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14>
+Language_Impl( const std::string& symbol, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14) {
+    Storage::set__( pairlist(Rf_install( symbol.c_str() ), t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14) );
+}
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14>
+Language_Impl( const Function& function, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14) {
+    Storage::set__( pairlist( function, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14) );
+}
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15>
+Language_Impl( const std::string& symbol, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15) {
+    Storage::set__( pairlist(Rf_install( symbol.c_str() ), t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15) );
+}
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15>
+Language_Impl( const Function& function, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15) {
+    Storage::set__( pairlist( function, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15) );
+}
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16>
+Language_Impl( const std::string& symbol, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16) {
+    Storage::set__( pairlist(Rf_install( symbol.c_str() ), t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16) );
+}
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16>
+Language_Impl( const Function& function, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16) {
+    Storage::set__( pairlist( function, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16) );
+}
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17>
+Language_Impl( const std::string& symbol, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17) {
+    Storage::set__( pairlist(Rf_install( symbol.c_str() ), t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17) );
+}
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17>
+Language_Impl( const Function& function, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17) {
+    Storage::set__( pairlist( function, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17) );
+}
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18>
+Language_Impl( const std::string& symbol, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18) {
+    Storage::set__( pairlist(Rf_install( symbol.c_str() ), t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18) );
+}
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18>
+Language_Impl( const Function& function, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18) {
+    Storage::set__( pairlist( function, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18) );
+}
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19>
+Language_Impl( const std::string& symbol, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19) {
+    Storage::set__( pairlist(Rf_install( symbol.c_str() ), t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19) );
+}
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19>
+Language_Impl( const Function& function, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19) {
+    Storage::set__( pairlist( function, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19) );
+}
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19, typename T20>
+Language_Impl( const std::string& symbol, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19, const T20& t20) {
+    Storage::set__( pairlist(Rf_install( symbol.c_str() ), t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20) );
+}
+
+template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13, typename T14, typename T15, typename T16, typename T17, typename T18, typename T19, typename T20>
+Language_Impl( const Function& function, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10, const T11& t11, const T12& t12, const T13& t13, const T14& t14, const T15& t15, const T16& t16, const T17& t17, const T18& t18, const T19& t19, const T20& t20) {
+    Storage::set__( pairlist( function, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20) );
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/bones/Datetime.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/bones/Datetime.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/bones/Datetime.h	(revision 2477)
@@ -0,0 +1,49 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 4 -*-
+//
+// Datetime_forward.h: Rcpp R/C++ interface class library --
+//
+// Copyright (C) 2010 - 2012 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__api__bones__Datetime_h
+#define Rcpp__api__bones__Datetime_h
+
+namespace Rcpp {
+	class Datetime ;
+	namespace traits{
+		template <> struct wrap_type_traits<Rcpp::Datetime>{
+			typedef wrap_type_primitive_tag wrap_category;
+		} ;
+		template<> struct r_type_traits<Rcpp::Datetime>{
+			typedef r_type_primitive_tag r_category ;
+		} ;
+		template<> struct r_type_traits< std::pair<const std::string,Rcpp::Datetime> >{
+			typedef r_type_primitive_tag r_category ;
+		} ;
+		template<> struct r_sexptype_traits<Rcpp::Datetime>{
+			enum{ rtype = REALSXP } ;
+		} ;
+	}
+
+	template<> SEXP wrap_extra_steps<Rcpp::Datetime>( SEXP ) ;
+	namespace internal{
+		template<> double caster<Rcpp::Datetime,double>( Rcpp::Datetime from) ;
+		template<> Rcpp::Datetime caster<double,Rcpp::Datetime>( double from) ;
+	}
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/bones/Date.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/bones/Date.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/bones/Date.h	(revision 2477)
@@ -0,0 +1,49 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 4 -*-
+//
+// Date_forward.h: Rcpp R/C++ interface class library --
+//
+// Copyright (C) 2010 - 2012 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__api__bones__Date_h
+#define Rcpp__api__bones__Date_h
+
+namespace Rcpp {
+	class Date ;
+	namespace traits{
+		template <> struct wrap_type_traits<Rcpp::Date>{
+			typedef wrap_type_primitive_tag wrap_category;
+		} ;
+		template<> struct r_type_traits<Rcpp::Date>{
+			typedef r_type_primitive_tag r_category ;
+		} ;
+		template<> struct r_type_traits< std::pair<const std::string,Rcpp::Date> >{
+			typedef r_type_primitive_tag r_category ;
+		} ;
+		template<> struct r_sexptype_traits<Rcpp::Date>{
+			enum{ rtype = REALSXP } ;
+		} ;
+	}
+
+	template<> SEXP wrap_extra_steps<Rcpp::Date>( SEXP ) ;
+	namespace internal{
+		template<> double caster<Rcpp::Date,double>( Rcpp::Date from) ;
+		template<> Rcpp::Date caster<double,Rcpp::Date>( double from) ;
+	}
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/bones/bones.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/bones/bones.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/bones/bones.h	(revision 2477)
@@ -0,0 +1,29 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 4 -*-
+//
+// bones.h: Rcpp R/C++ interface class library --
+//
+// Copyright (C) 2010 - 2012 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__api__bones__bones_h
+#define Rcpp__api__bones__bones_h
+
+#include <Rcpp/api/bones/wrap_extra_steps.h>
+#include <Rcpp/api/bones/Date.h>
+#include <Rcpp/api/bones/Datetime.h>
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/bones/wrap_extra_steps.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/bones/wrap_extra_steps.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/bones/wrap_extra_steps.h	(revision 2477)
@@ -0,0 +1,34 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+/* :tabSize=4:indentSize=4:noTabs=false:folding=explicit:collapseFolds=1: */
+//
+// wrap_extra_steps.h: Rcpp R/C++ interface class library -- wrap forward decl
+//
+// Copyright (C) 2010 - 2017  Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp__api__bones__wrap_extra_steps_h
+#define Rcpp__api__bones__wrap_extra_steps_h
+
+namespace Rcpp {
+
+template<typename T> SEXP wrap_extra_steps(SEXP x) {	// #nocov start
+    return x;
+}							// #nocov end
+
+} // Rcpp
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/meat/is.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/meat/is.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/meat/is.h	(revision 2477)
@@ -0,0 +1,168 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+//
+// is.h: Rcpp R/C++ interface class library -- is implementations
+//
+// Copyright (C) 2013 - 2015  Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp_api_meat_is_h
+#define Rcpp_api_meat_is_h
+
+namespace Rcpp {
+  namespace internal {
+
+    inline bool is_atomic(SEXP x) { return Rf_length(x) == 1; }
+    inline bool is_matrix(SEXP x) {
+        SEXP dim = Rf_getAttrib( x, R_DimSymbol);
+        return dim != R_NilValue && Rf_length(dim) == 2;
+    }
+    template <> inline bool is__simple<int>(SEXP x) {
+        return is_atomic(x) && TYPEOF(x) == INTSXP;
+    }
+    template <> inline bool is__simple<double>(SEXP x) {
+        return is_atomic(x) && TYPEOF(x) == REALSXP;
+    }
+    template <> inline bool is__simple<bool>(SEXP x) {
+        return is_atomic(x) && TYPEOF(x) == LGLSXP;
+    }
+    template <> inline bool is__simple<std::string>(SEXP x) {
+        return is_atomic(x) && TYPEOF(x) == STRSXP;
+    }
+    template <> inline bool is__simple<String>(SEXP x) {
+        return is_atomic(x) && TYPEOF(x) == STRSXP;
+    }
+    template <> inline bool is__simple<Rcomplex>(SEXP x) {
+        return is_atomic(x) && TYPEOF(x) == CPLXSXP;
+    }
+    template <> inline bool is__simple<CharacterVector>(SEXP x) {
+        return TYPEOF(x) == STRSXP;
+    }
+    template <> inline bool is__simple<CharacterMatrix>(SEXP x) {
+        return TYPEOF(x) == STRSXP && is_matrix(x);
+    }
+    template <> inline bool is__simple<RObject>(SEXP) {
+        return true;
+    }
+    template <> inline bool is__simple<IntegerVector>(SEXP x) {
+        return TYPEOF(x) == INTSXP;
+    }
+    template <> inline bool is__simple<ComplexVector>(SEXP x) {
+        return TYPEOF(x) == CPLXSXP;
+    }
+    template <> inline bool is__simple<RawVector>(SEXP x) {
+        return TYPEOF(x) == RAWSXP;
+    }
+    template <> inline bool is__simple<NumericVector>(SEXP x) {
+        return TYPEOF(x) == REALSXP;
+    }
+    template <> inline bool is__simple<LogicalVector>(SEXP x) {
+        return TYPEOF(x) == LGLSXP;
+    }
+    template <> inline bool is__simple<Language>(SEXP x) {
+        return TYPEOF(x) == LANGSXP;
+    }
+    template <> inline bool is__simple<DottedPair>(SEXP x) {
+        return (TYPEOF(x) == LANGSXP) || (TYPEOF(x) == LISTSXP);
+    }
+    template <> inline bool is__simple<List>(SEXP x) {
+        return TYPEOF(x) == VECSXP;
+    }
+    template <> inline bool is__simple<IntegerMatrix>(SEXP x) {
+        return TYPEOF(x) == INTSXP && is_matrix(x);
+    }
+    template <> inline bool is__simple<ComplexMatrix>(SEXP x) {
+        return TYPEOF(x) == CPLXSXP && is_matrix(x);
+    }
+    template <> inline bool is__simple<RawMatrix>(SEXP x) {
+        return TYPEOF(x) == RAWSXP && is_matrix(x);
+    }
+    template <> inline bool is__simple<NumericMatrix>(SEXP x) {
+        return TYPEOF(x) == REALSXP && is_matrix(x);
+    }
+    template <> inline bool is__simple<LogicalMatrix>(SEXP x) {
+        return TYPEOF(x) == LGLSXP && is_matrix(x);
+    }
+    template <> inline bool is__simple<GenericMatrix>(SEXP x) {
+        return TYPEOF(x) == VECSXP && is_matrix(x);
+    }
+
+
+    template <> inline bool is__simple<DataFrame>(SEXP x) {
+        if( TYPEOF(x) != VECSXP ) return false;
+        return Rf_inherits( x, "data.frame" );
+    }
+    template <> inline bool is__simple<WeakReference>(SEXP x) {
+        return TYPEOF(x) == WEAKREFSXP;
+    }
+    template <> inline bool is__simple<Symbol>(SEXP x) {
+        return TYPEOF(x) == SYMSXP;
+    }
+    template <> inline bool is__simple<S4>(SEXP x) {
+        return ::Rf_isS4(x);
+    }
+    template <> inline bool is__simple<Reference>(SEXP x) {
+        if( ! ::Rf_isS4(x) ) return false;
+        return ::Rf_inherits(x, "envRefClass" );
+    }
+    template <> inline bool is__simple<Promise>(SEXP x) {
+        return TYPEOF(x) == PROMSXP;
+    }
+    template <> inline bool is__simple<Pairlist>(SEXP x) {
+        return TYPEOF(x) == LISTSXP;
+    }
+    template <> inline bool is__simple<Function>(SEXP x) {
+        return TYPEOF(x) == CLOSXP || TYPEOF(x) == SPECIALSXP || TYPEOF(x) == BUILTINSXP;
+    }
+    template <> inline bool is__simple<Environment>(SEXP x) {
+        return TYPEOF(x) == ENVSXP;
+    }
+    template <> inline bool is__simple<Formula>(SEXP x) {
+        if( TYPEOF(x) != LANGSXP ) return false;
+        return Rf_inherits(x, "formula");
+    }
+
+    template <> inline bool is__simple<Date>(SEXP x) {
+        return is_atomic(x) && TYPEOF(x) == REALSXP && Rf_inherits(x, "Date");
+    }
+    template <> inline bool is__simple<Datetime>(SEXP x) {
+        return is_atomic(x) && TYPEOF(x) == REALSXP && Rf_inherits(x, "POSIXt");
+    }
+    template <> inline bool is__simple<DateVector>(SEXP x) {
+        return TYPEOF(x) == REALSXP && Rf_inherits(x, "Date");
+    }
+    template <> inline bool is__simple<DatetimeVector>(SEXP x) {
+        return TYPEOF(x) == REALSXP && Rf_inherits(x, "POSIXt");
+    }
+
+    inline bool is_module_object_internal(SEXP obj, const char* clazz){
+        Environment env(obj);
+        SEXP sexp = env.get(".cppclass");
+        if (TYPEOF(sexp) != EXTPTRSXP) return false;
+        XPtr<class_Base> xp(sexp);
+        return xp->has_typeinfo_name(clazz);
+    }
+    template <typename T> bool is__module__object(SEXP x) {
+        if (!is__simple<S4>(x)) return false;
+        typedef typename Rcpp::traits::un_pointer<T>::type CLASS;
+        return is_module_object_internal(x, typeid(CLASS).name());
+    }
+
+
+  } // namespace internal
+} // namespace Rcpp
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/meat/Rcpp_eval.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/meat/Rcpp_eval.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/meat/Rcpp_eval.h	(revision 2477)
@@ -0,0 +1,85 @@
+// Copyright (C) 2013 Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp_api_meat_Rcpp_eval_h
+#define Rcpp_api_meat_Rcpp_eval_h
+
+#include <Rcpp/Interrupt.h>
+
+namespace Rcpp {
+
+inline SEXP Rcpp_eval(SEXP expr, SEXP env) {
+
+    // 'identity' function used to capture errors, interrupts
+    SEXP identity = Rf_findFun(
+        ::Rf_install("identity"),
+        R_BaseNamespace
+    );
+    
+    if (identity == R_UnboundValue) {
+        stop("Failed to find 'base::identity()'");
+    }
+
+    // define the evalq call -- the actual R evaluation we
+    // want to execute
+    Shield<SEXP> evalqCall(Rf_lang3(
+        ::Rf_install("evalq"),
+        expr,
+        env
+    ));
+    
+    // define the call -- enclose with `tryCatch` so we can record
+    // and later forward error messages
+    Shield<SEXP> call(Rf_lang4(
+        ::Rf_install("tryCatch"),
+        evalqCall,
+        identity,
+        identity
+    ));
+    SET_TAG(CDDR(call), ::Rf_install("error"));
+    SET_TAG(CDDR(CDR(call)), ::Rf_install("interrupt"));
+
+    // execute the call
+    Shield<SEXP> res(::Rf_eval(call, R_GlobalEnv));
+
+    // check for condition results (errors, interrupts)
+    if (Rf_inherits(res, "condition")) {
+        
+        if (Rf_inherits(res, "error")) {
+            
+            Shield<SEXP> conditionMessageCall(::Rf_lang2(
+                    ::Rf_install("conditionMessage"),
+                    res
+            ));
+            
+            Shield<SEXP> conditionMessage(::Rf_eval(conditionMessageCall, R_GlobalEnv));
+            throw eval_error(CHAR(STRING_ELT(conditionMessage, 0)));
+        }
+        
+        // check for interrupt
+        if (Rf_inherits(res, "interrupt")) {
+            throw internal::InterruptedException();
+        }
+        
+    }
+    
+    return res;
+}
+
+} // namespace Rcpp
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/meat/Date.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/meat/Date.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/meat/Date.h	(revision 2477)
@@ -0,0 +1,44 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+//
+// Copyright (C) 2013 - 2015  Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp_api_meat_Date_h
+#define Rcpp_api_meat_Date_h
+
+namespace Rcpp{
+
+    inline Date::Date(SEXP d) {
+        m_d = Rcpp::as<double>(d);
+        update_tm();
+    }
+
+    inline Date::Date(const std::string &s, const std::string &fmt) {
+        Function strptime("strptime");	// we cheat and call strptime() from R
+        Function asDate("as.Date");	// and we need to convert to Date
+        m_d = Rcpp::as<int>(asDate(strptime(s, fmt, "UTC")));
+        update_tm();
+    }
+
+    template <>
+    inline SEXP wrap(const Date &date) {
+        return internal::new_date_object(date.getDate());
+    }
+
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/meat/proxy.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/meat/proxy.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/meat/proxy.h	(revision 2477)
@@ -0,0 +1,207 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+//
+// proxy.h: Rcpp R/C++ interface class library -- proxy meat
+//
+// Copyright (C) 2014    Dirk Eddelbuettel, Romain Francois, and Kevin Ushey
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+#ifndef RCPP_API_MEAT_PROXY_H
+#define RCPP_API_MEAT_PROXY_H
+
+// NOTE: Implementing this as 'meat' is necessary as it allows user-defined
+// classes writing their own overloads of 'wrap', 'as' to function correctly!
+namespace Rcpp {
+
+// AttributeProxy
+template <typename CLASS>
+template <typename T>
+typename AttributeProxyPolicy<CLASS>::AttributeProxy&
+AttributeProxyPolicy<CLASS>::AttributeProxy::operator=(const T& rhs) {
+    set( wrap(rhs) );
+    return *this;
+}
+
+template <typename CLASS>
+template <typename T>
+AttributeProxyPolicy<CLASS>::AttributeProxy::operator T() const {
+    return as<T>(get());
+}
+
+template <typename CLASS>
+AttributeProxyPolicy<CLASS>::AttributeProxy::operator SEXP() const {
+    return get();
+}
+
+template <typename CLASS>
+template <typename T>
+AttributeProxyPolicy<CLASS>::const_AttributeProxy::operator T() const {
+    return as<T>(get());
+}
+
+template <typename CLASS>
+AttributeProxyPolicy<CLASS>::const_AttributeProxy::operator SEXP() const {
+    return get();
+}
+
+// NamesProxy
+template <typename CLASS>
+template <typename T>
+typename NamesProxyPolicy<CLASS>::NamesProxy&
+NamesProxyPolicy<CLASS>::NamesProxy::operator=(const T& rhs) {
+    set( wrap(rhs) );
+    return *this;
+}
+
+template <typename CLASS>
+template <typename T>
+NamesProxyPolicy<CLASS>::NamesProxy::operator T() const {
+    return as<T>( get() );
+}
+
+template <typename CLASS>
+template <typename T>
+NamesProxyPolicy<CLASS>::const_NamesProxy::operator T() const {
+    return as<T>( get() );
+}
+
+// SlotProxy
+template <typename CLASS>
+template <typename T>
+typename SlotProxyPolicy<CLASS>::SlotProxy&
+SlotProxyPolicy<CLASS>::SlotProxy::operator=(const T& rhs) {
+    set(wrap(rhs));
+    return *this;
+}
+
+template <typename CLASS>
+template <typename T>
+SlotProxyPolicy<CLASS>::SlotProxy::operator T() const {
+    return as<T>(get());
+}
+
+// TagProxy
+template <typename CLASS>
+template <typename T>
+typename TagProxyPolicy<CLASS>::TagProxy&
+TagProxyPolicy<CLASS>::TagProxy::operator=(const T& rhs) {
+    set( wrap(rhs) );
+    return *this;
+}
+
+template <typename CLASS>
+template <typename T>
+TagProxyPolicy<CLASS>::TagProxy::operator T() const {
+    return as<T>(get());
+}
+
+template <typename CLASS>
+TagProxyPolicy<CLASS>::TagProxy::operator SEXP() const {
+    return get();
+}
+
+template <typename CLASS>
+template <typename T>
+TagProxyPolicy<CLASS>::const_TagProxy::operator T() const {
+    return as<T>(get());
+}
+
+template <typename CLASS>
+TagProxyPolicy<CLASS>::const_TagProxy::operator SEXP() const {
+    return get();
+}
+
+// Binding
+template <typename CLASS>
+template <typename T>
+typename BindingPolicy<CLASS>::Binding&
+BindingPolicy<CLASS>::Binding::operator=(const T& rhs) {
+    set(wrap(rhs));
+    return *this;
+}
+
+template <typename CLASS>
+template <typename T>
+BindingPolicy<CLASS>::Binding::operator T() const {
+    return as<T>(get());
+}
+
+template <typename CLASS>
+template <typename T>
+BindingPolicy<CLASS>::const_Binding::operator T() const {
+    return as<T>(get());
+}
+
+// DottedPairProxy
+template <typename CLASS>
+template <typename T>
+typename DottedPairProxyPolicy<CLASS>::DottedPairProxy&
+DottedPairProxyPolicy<CLASS>::DottedPairProxy::operator=(const T& rhs) {
+    set(wrap(rhs));
+    return *this;
+}
+
+template <typename CLASS>
+template <typename T>
+typename DottedPairProxyPolicy<CLASS>::DottedPairProxy&
+DottedPairProxyPolicy<CLASS>::DottedPairProxy::operator=(const traits::named_object<T>& rhs) {
+    return set(wrap(rhs.object), rhs.name);
+}
+
+template <typename CLASS>
+template <typename T>
+DottedPairProxyPolicy<CLASS>::DottedPairProxy::operator T() const {
+    return as<T>(get());
+}
+
+template <typename CLASS>
+template <typename T>
+DottedPairProxyPolicy<CLASS>::const_DottedPairProxy::operator T() const {
+    return as<T>(get());
+}
+
+// FieldProxy
+template <typename CLASS>
+typename FieldProxyPolicy<CLASS>::FieldProxy&
+FieldProxyPolicy<CLASS>::FieldProxy::operator=(const FieldProxyPolicy<CLASS>::FieldProxy& rhs) {
+    if (this != &rhs) set(rhs.get());
+    return *this;
+}
+
+template <typename CLASS>
+template <typename T>
+typename FieldProxyPolicy<CLASS>::FieldProxy&
+FieldProxyPolicy<CLASS>::FieldProxy::operator=(const T& rhs) {
+    SEXP tmp = PROTECT(wrap(rhs));
+    set(tmp);
+    UNPROTECT(1);
+    return *this;
+}
+
+template <typename CLASS>
+template <typename T>
+FieldProxyPolicy<CLASS>::FieldProxy::operator T() const {
+    return as<T>(get());
+}
+
+template <typename CLASS>
+template <typename T>
+FieldProxyPolicy<CLASS>::const_FieldProxy::operator T() const {
+    return as<T>(get());
+}
+
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/meat/DottedPairImpl.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/meat/DottedPairImpl.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/meat/DottedPairImpl.h	(revision 2477)
@@ -0,0 +1,102 @@
+// Copyright (C) 2013    Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp_api_meat_DottedPairImpl_h
+#define Rcpp_api_meat_DottedPairImpl_h
+
+namespace Rcpp{
+
+    template <typename CLASS>
+    template <typename T>
+    void DottedPairImpl<CLASS>::push_front( const T& object){
+       CLASS& ref = static_cast<CLASS&>(*this) ;
+       ref.set__( grow(object, ref.get__() ) ) ;
+    }
+
+    template <typename CLASS>
+    template <typename T>
+    void DottedPairImpl<CLASS>::push_back( const T& object){
+        CLASS& ref = static_cast<CLASS&>(*this) ;
+        if( ref.isNULL() ){
+            ref.set__( grow( object, ref.get__() ) ) ;
+        } else {
+            SEXP x = ref.get__() ;
+            /* traverse the pairlist */
+            while( !Rf_isNull(CDR(x)) ){
+                x = CDR(x) ;
+            }
+            Shield<SEXP> tail( grow( object, R_NilValue ) );
+            SETCDR( x, tail ) ;
+        }
+	}
+
+    template <typename CLASS>
+    template <typename T>
+	void DottedPairImpl<CLASS>::insert( const size_t& index, const T& object) {
+		CLASS& ref = static_cast<CLASS&>(*this) ;
+        if( index == 0 ) {
+			push_front( object ) ;
+		} else {
+			if( ref.isNULL( ) ) throw index_out_of_bounds() ;
+
+                        if( static_cast<R_xlen_t>(index) > ::Rf_xlength(ref.get__()) ) throw index_out_of_bounds() ;
+
+			size_t i=1;
+			SEXP x = ref.get__() ;
+			while( i < index ){
+				x = CDR(x) ;
+				i++;
+			}
+			Shield<SEXP> tail( grow( object, CDR(x) ) );
+			SETCDR( x, tail ) ;
+		}
+	}
+
+	template <typename CLASS>
+    template <typename T>
+	void DottedPairImpl<CLASS>::replace( const int& index, const T& object ) {
+	    CLASS& ref = static_cast<CLASS&>(*this) ;
+        if( static_cast<R_xlen_t>(index) >= ::Rf_xlength(ref.get__()) ) throw index_out_of_bounds() ;
+
+        Shield<SEXP> x( pairlist( object ) );
+        SEXP y = ref.get__() ;
+        int i=0;
+        while( i<index ){ y = CDR(y) ; i++; }
+
+        SETCAR( y, CAR(x) );
+        SET_TAG( y, TAG(x) );
+	}
+
+	template <typename CLASS>
+    void DottedPairImpl<CLASS>::remove( const size_t& index ) {
+        CLASS& ref = static_cast<CLASS&>(*this) ;
+        if( static_cast<R_xlen_t>(index) >= Rf_xlength(ref.get__()) ) throw index_out_of_bounds() ;
+        if( index == 0 ){
+            ref.set__( CDR( ref.get__() ) ) ;
+        } else{
+            SEXP x = ref.get__() ;
+            size_t i=1;
+            while( i<index ){ x = CDR(x) ; i++; }
+            SETCDR( x, CDDR(x) ) ;
+        }
+    }
+
+
+
+} // namespace Rcpp
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/meat/export.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/meat/export.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/meat/export.h	(revision 2477)
@@ -0,0 +1,72 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+//
+// export.h: Rcpp R/C++ interface class library -- export implementations
+//
+// Copyright (C) 2013    Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp_api_meat_export_h
+#define Rcpp_api_meat_export_h
+
+namespace Rcpp{
+namespace internal{
+
+    template <typename InputIterator, typename value_type>
+    void export_range__dispatch( SEXP x, InputIterator first, ::Rcpp::traits::r_type_generic_tag ) {
+        R_xlen_t n = ::Rf_xlength(x) ;
+        for( R_xlen_t i=0; i<n; i++, ++first ){
+            *first = ::Rcpp::as<value_type>( VECTOR_ELT(x, i) ) ;
+        }
+    }
+
+
+} // namespace internal
+
+    namespace traits{
+
+        template < template <class, class> class ContainerTemplate, typename T > class ContainerExporter {
+        public:
+            typedef ContainerTemplate<T, std::allocator<T> > Container ;
+            const static int RTYPE = Rcpp::traits::r_sexptype_traits<T>::rtype ;
+
+            ContainerExporter( SEXP x ) : object(x){}
+            ~ContainerExporter(){}
+
+            Container get(){
+                if( TYPEOF(object) == RTYPE ){
+                   T* start = Rcpp::internal::r_vector_start<RTYPE>(object) ;
+                   return Container( start, start + Rf_xlength(object) ) ;
+                }
+                Container vec( ::Rf_xlength(object) );
+                ::Rcpp::internal::export_range( object, vec.begin() ) ;
+                return vec ;
+            }
+
+        private:
+        		SEXP object ;
+        } ;
+        template < template<class,class> class Container > struct container_exporter< Container, int >{
+            typedef ContainerExporter< Container, int > type ;
+        } ;
+        template < template<class,class> class Container > struct container_exporter< Container, double >{
+            typedef ContainerExporter< Container, double > type ;
+        } ;
+
+    }
+} // namespace Rcpp
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/meat/DataFrame.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/meat/DataFrame.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/meat/DataFrame.h	(revision 2477)
@@ -0,0 +1,31 @@
+// Copyright (C) 2013 Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp_api_meat_DataFrame_h
+#define Rcpp_api_meat_DataFrame_h
+
+namespace Rcpp{
+
+     template <template <class> class StoragePolicy>
+     template <class T>
+     DataFrame_Impl<StoragePolicy>::DataFrame_Impl( const T& obj){
+        set__( wrap(obj) ) ;
+     }
+
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/meat/Dimension.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/meat/Dimension.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/meat/Dimension.h	(revision 2477)
@@ -0,0 +1,31 @@
+// Copyright (C) 2013 Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp_api_meat_Dimension_h
+#define Rcpp_api_meat_Dimension_h
+
+namespace Rcpp{
+
+    inline Dimension::Dimension(SEXP dims_) : dims( as< std::vector<int> >(dims_) ){}
+
+    inline Dimension::operator SEXP() const {
+        return wrap( dims.begin(), dims.end() ) ;
+    }
+
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/meat/S4.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/meat/S4.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/meat/S4.h	(revision 2477)
@@ -0,0 +1,46 @@
+// Copyright (C) 2013 Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp_api_meat_S4_h
+#define Rcpp_api_meat_S4_h
+
+namespace Rcpp{
+
+    template <template <class> class StoragePolicy>
+    bool S4_Impl<StoragePolicy>::is( const std::string& clazz) const {
+        CharacterVector cl = AttributeProxyPolicy<S4_Impl>::attr("class");
+
+        // simple test for exact match
+        if( ! clazz.compare( cl[0] ) ) return true ;
+
+        try{
+            SEXP containsSym = Rf_install("contains");
+            Shield<SEXP> classDef( R_getClassDef(CHAR(Rf_asChar(cl))) ) ;
+            CharacterVector res( Rf_getAttrib( R_do_slot( classDef, containsSym), R_NamesSymbol));
+
+            return any( res.begin(), res.end(), clazz.c_str() ) ;
+        } catch( ... ){
+            // we catch eval_error and also not_compatible when
+            // contains is NULL
+        }
+        return false ;
+    }
+
+
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/meat/meat.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/meat/meat.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/meat/meat.h	(revision 2477)
@@ -0,0 +1,47 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+//
+// meat.h: Rcpp R/C++ interface class library --
+//
+// Copyright (C) 2012 - 2013    Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp_api_meat_meat_h
+#define Rcpp_api_meat_meat_h
+
+#include <Rcpp/api/meat/Rcpp_eval.h>
+#include <Rcpp/api/meat/Dimension.h>
+
+#include <Rcpp/api/meat/Date.h>
+#include <Rcpp/api/meat/Datetime.h>
+#include <Rcpp/api/meat/DataFrame.h>
+#include <Rcpp/api/meat/S4.h>
+#include <Rcpp/api/meat/Environment.h>
+
+#include <Rcpp/api/meat/proxy.h>
+
+#include <Rcpp/api/meat/DottedPairImpl.h>
+#include <Rcpp/api/meat/StretchyList.h>
+#include <Rcpp/api/meat/Vector.h>
+#include <Rcpp/api/meat/is.h>
+#include <Rcpp/api/meat/as.h>
+#include <Rcpp/api/meat/export.h>
+#include <Rcpp/api/meat/protection.h>
+#include <Rcpp/api/meat/wrap.h>
+
+#include <Rcpp/api/meat/module/Module.h>
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/meat/protection.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/meat/protection.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/meat/protection.h	(revision 2477)
@@ -0,0 +1,38 @@
+// Copyright (C) 2013    Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp_protection_meat_H
+#define Rcpp_protection_meat_H
+
+namespace Rcpp{
+
+    template <typename T>
+    template <typename U>
+    Armor<T>::Armor( U x ) : data() {
+        init( wrap(x) ) ;
+    }
+
+    template <typename T>
+    template <typename U>
+    inline Armor<T>& Armor<T>::operator=( const U& x ){
+        REPROTECT(data = wrap(x), index) ;
+        return *this ;
+    }
+
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/meat/Datetime.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/meat/Datetime.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/meat/Datetime.h	(revision 2477)
@@ -0,0 +1,50 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+//
+// Copyright (C) 2013 - 2015  Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp_api_meat_Datetime_h
+#define Rcpp_api_meat_Datetime_h
+
+namespace Rcpp {
+
+    inline Datetime::Datetime(SEXP d) {
+        m_dt = Rcpp::as<double>(d);
+        update_tm();
+    }
+
+    inline Datetime::Datetime(const std::string &s, const std::string &fmt) {
+        Rcpp::Function strptime("strptime");    // we cheat and call strptime() from R
+        Rcpp::Function asPOSIXct("as.POSIXct"); // and we need to convert to POSIXct
+        m_dt = Rcpp::as<double>(asPOSIXct(strptime(s, fmt)));
+        update_tm();
+    }
+
+    template<>
+    inline SEXP wrap_extra_steps<Rcpp::Datetime>(SEXP x) {
+        Rf_setAttrib(x, R_ClassSymbol, internal::getPosixClasses());
+        return x;
+    }
+
+    template <>
+    inline SEXP wrap<Datetime>(const Datetime &date) {
+        return internal::new_posixt_object(date.getFractionalTimestamp());
+    }
+
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/meat/module/Module.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/meat/module/Module.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/meat/module/Module.h	(revision 2477)
@@ -0,0 +1,50 @@
+// Module.h: Rcpp R/C++ interface class library -- Rcpp modules
+//
+// Copyright (C) 2013 Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp_api_meat_Module_h
+#define Rcpp_api_meat_Module_h
+
+namespace Rcpp {
+
+    inline List Module::classes_info(){
+	    int n = classes.size() ;
+	    CharacterVector names(n) ;
+	    List info(n);
+	    CLASS_MAP::iterator it = classes.begin() ;
+	    std::string buffer ;
+	    for( int i=0; i<n; i++, ++it){
+	        names[i] = it->first ;
+	        info[i]  = CppClass( this , it->second, buffer ) ;
+	    }
+	    info.names() = names ;
+	    return info ;
+	}
+
+    inline CppClass Module::get_class( const std::string& cl ){
+        BEGIN_RCPP
+            CLASS_MAP::iterator it = classes.find(cl) ;
+            if( it == classes.end() ) throw std::range_error( "no such class" ) ;
+            std::string buffer ;
+            return CppClass( this, it->second, buffer ) ;
+        END_RCPP
+    }
+
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/meat/StretchyList.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/meat/StretchyList.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/meat/StretchyList.h	(revision 2477)
@@ -0,0 +1,74 @@
+// Copyright (C) 2013    Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp_api_meat_StretchyList_h
+#define Rcpp_api_meat_StretchyList_h
+
+namespace Rcpp{
+
+    template< template <class> class StoragePolicy>
+    template< typename T>
+    StretchyList_Impl<StoragePolicy>& StretchyList_Impl<StoragePolicy>::push_back__impl( const T& obj, traits::false_type ){
+        Shield<SEXP> s( wrap(obj) ) ;
+        SEXP tmp  = Rf_cons( s, R_NilValue );
+        SEXP self = Storage::get__() ;
+        SETCDR( CAR(self), tmp) ;
+        SETCAR( self, tmp ) ;
+        return *this ;
+    }
+
+    template< template <class> class StoragePolicy>
+    template< typename T>
+    StretchyList_Impl<StoragePolicy>& StretchyList_Impl<StoragePolicy>::push_back__impl( const T& obj, traits::true_type ){
+        Shield<SEXP> s( wrap(obj.object) ) ;
+        SEXP tmp  = Rf_cons( s, R_NilValue );
+        Symbol tag  = obj.name ;
+        SET_TAG(tmp, tag) ;
+        SEXP self = Storage::get__() ;
+        SETCDR( CAR(self), tmp) ;
+        SETCAR( self, tmp ) ;
+        return *this ;
+    }
+
+    template< template <class> class StoragePolicy>
+    template< typename T>
+    StretchyList_Impl<StoragePolicy>& StretchyList_Impl<StoragePolicy>::push_front__impl( const T& obj, traits::false_type){
+        SEXP tmp ;
+        SEXP self = Storage::get__() ;
+        Shield<SEXP> s( wrap(obj) ) ;
+        tmp = Rf_cons(s, CDR(self) ) ;
+        SETCDR(self, tmp) ;
+        return *this ;
+    }
+
+    template< template <class> class StoragePolicy>
+    template< typename T>
+    StretchyList_Impl<StoragePolicy>& StretchyList_Impl<StoragePolicy>::push_front__impl( const T& obj, traits::true_type){
+        SEXP tmp ;
+        SEXP self = Storage::get__() ;
+        Shield<SEXP> s( wrap(obj.object) ) ;
+        Symbol tag = obj.name ;
+        tmp = Rf_cons(s, CDR(self) ) ;
+        SET_TAG(tmp, tag );
+        SETCDR(self, tmp) ;
+        return *this ;
+    }
+
+
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/meat/Vector.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/meat/Vector.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/meat/Vector.h	(revision 2477)
@@ -0,0 +1,40 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+//
+// Vector.h: Rcpp R/C++ interface class library -- Vector meat
+//
+// Copyright (C) 2012 - 2013    Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp_api_meat_Vector_h
+#define Rcpp_api_meat_Vector_h
+
+namespace Rcpp{
+
+    namespace internal {
+
+        template <typename T>
+        inline SEXP wrap_range_sugar_expression( const T& object, Rcpp::traits::true_type) {
+            RCPP_DEBUG_1( "wrap_range_sugar_expression<%s>(., true  )", DEMANGLE(T) )
+            const int RTYPE = T::r_type::value ;
+            return Rcpp::Vector<RTYPE>(object) ;
+        }
+
+    }
+
+} // namespace Rcpp
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/meat/as.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/meat/as.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/meat/as.h	(revision 2477)
@@ -0,0 +1,33 @@
+// Copyright (C) 2013    Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp_api_meat_as_h
+#define Rcpp_api_meat_as_h
+
+namespace Rcpp{
+namespace internal{
+
+    inline void* as_module_object_internal(SEXP obj){
+        Environment env(obj) ;
+        SEXP xp = env.get(".pointer") ;
+        return R_ExternalPtrAddr(xp );
+    }
+
+}
+}
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/meat/Environment.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/meat/Environment.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/meat/Environment.h	(revision 2477)
@@ -0,0 +1,50 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+//
+// Environment.h: Rcpp R/C++ interface class library --
+//
+// Copyright (C) 2012 - 2013    Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp_api_meat_Environment_h
+#define Rcpp_api_meat_Environment_h
+
+namespace Rcpp{
+
+template <template <class> class StoragePolicy>
+template <typename WRAPPABLE>
+bool Environment_Impl<StoragePolicy>::assign( const std::string& name, const WRAPPABLE& x) const {
+    return assign( name, wrap( x ) ) ;
+}
+
+template <template <class> class StoragePolicy>
+Environment_Impl<StoragePolicy>::Environment_Impl( const std::string& name ){
+    Shield<SEXP> wrapped(wrap(name));
+    Shield<SEXP> env(as_environment(wrapped));
+   Storage::set__(env) ;
+}
+
+template <template <class> class StoragePolicy>
+Environment_Impl<StoragePolicy>::Environment_Impl( int pos ){
+    Shield<SEXP> wrapped(wrap(pos));
+    Shield<SEXP> env(as_environment(wrapped));
+   Storage::set__(env) ;
+}
+
+
+} // namespace Rcpp
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/meat/wrap.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/meat/wrap.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/Rcpp/api/meat/wrap.h	(revision 2477)
@@ -0,0 +1,66 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+//
+// wrap.h: Rcpp R/C++ interface class library -- wrap implementations
+//
+// Copyright (C) 2013    Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef Rcpp_api_meat_wrap_h
+#define Rcpp_api_meat_wrap_h
+
+namespace Rcpp{
+namespace internal{
+
+template <typename InputIterator, typename KEY, typename VALUE, int RTYPE>
+inline SEXP range_wrap_dispatch___impl__pair( InputIterator first, InputIterator last, Rcpp::traits::true_type ){
+	RCPP_DEBUG_3( "range_wrap_dispatch___impl__pair<KEY = %s, VALUE = %s, RTYPE = %d>\n", DEMANGLE(KEY), DEMANGLE(VALUE), RTYPE)
+    R_xlen_t size = std::distance( first, last ) ;
+	//typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
+
+	CharacterVector names(size) ;
+	Vector<RTYPE> x(size) ;
+	Rcpp::String buffer ;
+	for( R_xlen_t i = 0; i < size ; i++, ++first){
+        buffer   = first->first ;
+        x[i]     = first->second ;
+        names[i] = buffer ;
+	}
+	x.attr( "names" ) = names ;
+	return x ;
+}
+
+template <typename InputIterator, typename KEY, typename VALUE, int RTYPE>
+inline SEXP range_wrap_dispatch___impl__pair( InputIterator first, InputIterator last, Rcpp::traits::false_type ){
+	R_xlen_t size = std::distance( first, last ) ;
+
+	Shield<SEXP> names( Rf_allocVector(STRSXP, size) ) ;
+	Shield<SEXP> x( Rf_allocVector(VECSXP, size) ) ;
+	Rcpp::String buffer ;
+	for( R_xlen_t i = 0; i < size ; i++, ++first){
+        buffer = first->first ;
+        SET_VECTOR_ELT( x, i, Rcpp::wrap(first->second) );
+        SET_STRING_ELT( names, i, buffer.get_sexp() ) ;
+	}
+	::Rf_setAttrib( x, R_NamesSymbol, names) ;
+	return x ;
+}
+
+
+} // namespace internal
+} // namespace Rcpp
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/doxygen/Examples.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/doxygen/Examples.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/include/doxygen/Examples.h	(revision 2477)
@@ -0,0 +1,155 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 4 -*-
+//
+// doxygen/Examples.h: R/C++ interface class library --- Examples definitions for Doxygen
+//
+// Copyright (C) 2009 - 2011 Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+
+
+// This file is not used by any code but exists solely to group
+// example macros for Doxygen.
+//
+// Note that there is some serious brain-damagedness going on doxygen will only
+// include the examples if we do this:
+//
+//    cd src && ln -s ../inst/examples examples cd -
+//    doxygen doxyfile
+//    cd src && rm examples cd -
+//
+// ie without the softlink nothing happens, despite the recursive example path set
+// in doxyfile etc and numerous other attempts I made.
+
+
+
+//! \example functionCallback/RcppFunctionCallExample.cpp
+//! An example providing a class RVectorFuncCall derived from class RcppFunction which
+//! implements a vector-values function transformVector(); the class gets initialized
+//! with an R function vecfunc passed along using Rcpp.
+
+//! \example functionCallback/ExampleRCode.R
+//! This files defines the R function vecfunc passed down to C++ and called via the
+//! wrapper function built using the sub-class of RcppFunction to call it.
+
+
+
+//! \example RcppInline/external_pointer.r
+//! A simple example (using inline) of external Pointer use via Rcpp::XPtr
+
+//! \example RcppInline/RcppInlineExample.r
+//! The 'distribution of determinant' example as a demonstration of how to use
+//! inline and Rcpp for a simple function.
+
+//! \example RcppInline/RcppInlineWithLibsExamples.r
+//! Four simple examples of how to combine Rcpp and an external library
+//! (where we use the GNU GSL) using inline.
+
+//! \example RcppInline/RObject.r
+//! A number of examples on how to use wrap() to automatically convert data types.
+
+//! \example RcppInline/RcppSimpleExample.r
+//! A very simple example of using inline without Rcpp.
+
+//! \example RcppInline/RcppSimpleTests.r
+//! This file provides a few simple tests that preceded the creation of the
+//! numerous formal unit tests that followed.
+
+//! \example RcppInline/UncaughtExceptions.r
+//! An example of how to catch C++ exceptions even without a try / catch block.
+
+
+
+//! \example ConvolveBenchmarks/convolve2_c.c
+//! The basic convolution example from Section 5.10.1 of 'Writing R Extensions'
+
+//! \example ConvolveBenchmarks/convolve2_cpp.cpp
+//! A simple version of the basic convolution example from Section 5.10.1
+//! of 'Writing R Extensions', now rewritten for Rcpp using RcppVector<double>.
+
+//! \example ConvolveBenchmarks/convolve3_cpp.cpp
+//! A more efficient version of the basic convolution example from Section 5.10.1
+//! of 'Writing R Extensions', now rewritten for Rcpp and using Rcpp::NumericVector.
+
+//! \example ConvolveBenchmarks/convolve4_cpp.cpp
+//! An even more efficient version of the basic convolution example from Section 5.10.1
+//! of 'Writing R Extensions', now rewritten for Rcpp and using Rcpp::NumericVector as
+//! well as direct pointer operations for better performance.
+
+//! \example ConvolveBenchmarks/convolve7_c.c
+//! The basic convolution example from Section 5.10.1 of 'Writing R Extensions', written
+//! using REAL(x)[i] accessor macros to demonstrate the performance hit imposed by these.
+
+//! \example ConvolveBenchmarks/exampleRCode.r
+//! R file / littler script to run and time the various implementations.
+
+
+
+//! \example FastLM/benchmark.r
+//! Linear model benchmark master file
+
+//! \example FastLM/fastLMviaArmadillo.r
+//! Runs lm via Armadillo and times the run
+
+//! \example FastLM/fastLMviaGSL.r
+//! Runs lm via GSL and times the run
+
+//! \example FastLM/lmArmadillo.r
+//! Armadillo-based implementation of a bare-boned lm()
+
+//! \example FastLM/lmGSL.r
+//! GSL-based implementation of a bare-boned lm()
+
+
+
+//! \example SugarPerformance/sugarBenchmarks.R
+//! Benchmarking the 'Rcpp sugar' extensions
+
+//! \example SugarPerformance/Timer.h
+//! Simple C++ timer class in a headers-only implementation
+
+//! \example SugarPerformance/Timertest.cpp
+//! Simple test program for the C++ timer class
+
+
+
+//! \example OpenMP/piWithInterrupts.cpp.R
+//! Computing pi via MPI, and letting the user interupt via Ctrl-C
+
+//! \example OpenMP/check.R
+//! Compares both approaches
+
+//! \example OpenMP/OpenMPandInline.r
+//! Example of using OpenMP compilation via inline
+
+
+
+//! \example RcppGibbs/RcppGibbs.R
+//! Implementation of a MCMC Gibbs sampler using Rcpp
+
+//! \example RcppGibbs/timeRNGs.R
+//! Illustration of speed differences between Nornal and Uniform RNG draws from R and GSL
+
+
+//! \example Misc/fibonacci.r
+//! Faster recursive computation of Fibonacci numbers via Rcpp
+
+//! \example Misc/ifelseLooped.r
+//! Nice example of accelerating path-dependent loops with Rcpp
+
+
+
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/skeleton/rcpp_hello_world.h
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/skeleton/rcpp_hello_world.h	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/skeleton/rcpp_hello_world.h	(revision 2477)
@@ -0,0 +1,19 @@
+#ifndef _@PKG@_RCPP_HELLO_WORLD_H
+#define _@PKG@_RCPP_HELLO_WORLD_H
+
+#include <Rcpp.h>
+
+/*
+ * note : RcppExport is an alias to `extern "C"` defined by Rcpp.
+ *
+ * It gives C calling convention to the rcpp_hello_world function so that
+ * it can be called from .Call in R. Otherwise, the C++ compiler mangles the
+ * name of the function and .Call cannot find it.
+ *
+ * It is only useful to use RcppExport when the function is intended to be called
+ * by .Call. See the thread http://thread.gmane.org/gmane.comp.lang.r.rcpp/649/focus=672
+ * on Rcpp-devel for a misuse of RcppExport
+ */
+RcppExport SEXP rcpp_hello_world() ;
+
+#endif
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/skeleton/rcpp_hello_world_attributes.cpp
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/skeleton/rcpp_hello_world_attributes.cpp	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/skeleton/rcpp_hello_world_attributes.cpp	(revision 2477)
@@ -0,0 +1,13 @@
+
+#include <Rcpp.h>
+using namespace Rcpp;
+
+// [[Rcpp::export]]
+List rcpp_hello_world() {
+
+    CharacterVector x = CharacterVector::create( "foo", "bar" )  ;
+    NumericVector y   = NumericVector::create( 0.0, 1.0 ) ;
+    List z            = List::create( x, y ) ;
+
+    return z ;
+}
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/skeleton/manual-page-stub.Rd
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/skeleton/manual-page-stub.Rd	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/skeleton/manual-page-stub.Rd	(revision 2477)
@@ -0,0 +1,34 @@
+\name{__placeholder__-package}
+\alias{__placeholder__-package}
+\alias{__placeholder__}
+\docType{package}
+\title{
+  A short title line describing what the package does
+}
+\description{
+  A more detailed description of what the package does. A length
+  of about one to five lines is recommended.
+}
+\details{
+  This section should provide a more detailed overview of how to use the
+  package, including the most important functions.
+}
+\author{
+Who wrote it, email optional.
+
+Maintainer: Who to complain to <yourfault@somewhere.net>
+}
+\references{
+  This optional section can contain literature or other references for
+  background information.
+}
+\keyword{ package }
+\seealso{
+  Optional links to other man pages
+}
+\examples{
+  \dontrun{
+     ## Optional simple examples of the most important functions
+     ## These can be in \dontrun{} and \donttest{} blocks.   
+  }
+}
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/skeleton/rcpp_module.cpp
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/skeleton/rcpp_module.cpp	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/skeleton/rcpp_module.cpp	(revision 2477)
@@ -0,0 +1,85 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+//
+// rcpp_module.cpp: Rcpp R/C++ interface class library -- Rcpp Module examples
+//
+// Copyright (C) 2010 - 2012  Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#include <Rcpp.h>
+
+std::string hello() {
+    throw std::range_error( "boom" ) ;
+}
+
+int bar(int x) {
+    return x*2;
+}
+
+double foo(int x, double y) {
+    return x * y;
+}
+
+void bla() {
+    Rprintf("hello\\n");
+}
+
+void bla1(int x) {
+    Rprintf("hello (x = %d)\\n", x);
+}
+
+void bla2( int x, double y) {
+    Rprintf("hello (x = %d, y = %5.2f)\\n", x, y);
+}
+
+class World {
+public:
+    World() : msg("hello") {}
+    void set(std::string msg) { this->msg = msg; }
+    std::string greet() { return msg; }
+
+private:
+    std::string msg;
+};
+
+
+
+RCPP_MODULE(yada){
+    using namespace Rcpp ;
+
+    function("hello" , &hello  , "documentation for hello ");
+    function("bla"   , &bla    , "documentation for bla ");
+    function("bla1"  , &bla1   , "documentation for bla1 ");
+    function("bla2"  , &bla2   , "documentation for bla2 ");
+
+    // with formal arguments specification
+    function("bar"   , &bar    ,
+             List::create( _["x"] = 0.0),
+             "documentation for bar ");
+    function("foo"   , &foo    ,
+             List::create( _["x"] = 1, _["y"] = 1.0),
+             "documentation for foo ");
+
+    class_<World>("World")
+    // expose the default constructor
+    .constructor()
+
+    .method("greet", &World::greet , "get the message")
+    .method("set", &World::set     , "set the message")
+    ;
+}
+
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/skeleton/zzz.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/skeleton/zzz.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/skeleton/zzz.R	(revision 2477)
@@ -0,0 +1,16 @@
+
+## Up until R 2.15.0, the require("methods") is needed but (now)
+## triggers an warning from R CMD check
+#.onLoad <- function(libname, pkgname){
+#    #require("methods")  ## needed with R <= 2.15.0
+#    loadRcppModules()
+#}
+
+
+## For R 2.15.1 and later this also works. Note that calling loadModule() triggers
+## a load action, so this does not have to be placed in .onLoad() or evalqOnLoad().
+loadModule("NumEx", TRUE)
+loadModule("yada", TRUE)
+loadModule("stdVector", TRUE)
+
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/skeleton/Rcpp_modules_examples.Rd
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/skeleton/Rcpp_modules_examples.Rd	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/skeleton/Rcpp_modules_examples.Rd	(revision 2477)
@@ -0,0 +1,24 @@
+\name{Rcpp Modules Examples}
+\alias{Num}
+\alias{World}
+\alias{bar}
+\alias{bla}
+\alias{bla1}
+\alias{bla2}
+\alias{foo}
+\alias{vec}
+\alias{hello}
+\alias{Rcpp_Num-class}
+\alias{Rcpp_World-class}
+\alias{Rcpp_vec-class}
+\alias{C++Object-class}
+\title{
+  Functions and Objects created by Rcpp Modules Example
+}
+\description{
+  These function and objects are accessible from R via the Rcpp Modules mechanism
+  which creates them based on the declaration in the C++ file.  
+}
+\seealso{
+  The Rcpp Modules vignette.
+}
\ No newline at end of file
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/skeleton/rcpp_hello_world.R
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/skeleton/rcpp_hello_world.R	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/skeleton/rcpp_hello_world.R	(revision 2477)
@@ -0,0 +1,5 @@
+
+rcpp_hello_world <- function() {
+    .Call("rcpp_hello_world", PACKAGE = "@PKG@")
+}
+
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/skeleton/stdVector.cpp
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/skeleton/stdVector.cpp	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/skeleton/stdVector.cpp	(revision 2477)
@@ -0,0 +1,90 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+//
+// stdVector.cpp: Rcpp R/C++ interface class library -- Rcpp Module class example
+//
+// Copyright (C) 2010 - 2012  Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#include <Rcpp.h>               // need to include the main Rcpp header file only
+
+// convenience typedef
+typedef std::vector<double> vec;
+
+// helpers
+void vec_assign( vec* obj, Rcpp::NumericVector data) {
+    obj->assign( data.begin(), data.end() ) ;
+}
+
+void vec_insert( vec* obj, int position, Rcpp::NumericVector data) {
+    vec::iterator it = obj->begin() + position;
+    obj->insert( it, data.begin(), data.end() );
+}
+
+Rcpp::NumericVector vec_asR( vec* obj) {
+    return Rcpp::wrap( *obj );
+}
+
+void vec_set( vec* obj, int i, double value) {
+    obj->at( i ) = value;
+}
+
+void vec_resize( vec* obj, int n) { obj->resize( n ); }
+void vec_push_back( vec* obj, double x ) { obj->push_back( x ); }
+
+// Wrappers for member functions that return a reference
+// Required on Solaris
+double vec_back(vec *obj){ return obj->back() ; }
+double vec_front(vec *obj){ return obj->front() ; }
+double vec_at(vec *obj, int i){ return obj->at(i) ; }
+
+RCPP_MODULE(stdVector){
+    using namespace Rcpp ;
+
+    // we expose the class std::vector<double> as "vec" on the R side
+    class_<vec>("vec")
+
+    // exposing the default constructor
+    .constructor()
+
+    // exposing member functions -- taken directly from std::vector<double>
+    .method( "size",     &vec::size)
+    .method( "max_size", &vec::max_size)
+    .method( "capacity", &vec::capacity)
+    .method( "empty",    &vec::empty)
+    .method( "reserve",  &vec::reserve)
+    .method( "pop_back", &vec::pop_back )
+    .method( "clear",    &vec::clear )
+
+    // specifically exposing const member functions defined above
+    .method( "back",     &vec_back )
+    .method( "front",    &vec_front )
+    .method( "at",       &vec_at )
+
+    // exposing free functions taking a std::vector<double>*
+    // as their first argument
+    .method( "assign",   &vec_assign )
+    .method( "insert",   &vec_insert )
+    .method( "as.vector",&vec_asR )
+    .method( "push_back",&vec_push_back )
+    .method( "resize",   &vec_resize)
+
+    // special methods for indexing
+    .method( "[[",       &vec_at )
+    .method( "[[<-",     &vec_set )
+
+    ;
+}
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/skeleton/rcpp_hello_world.cpp
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/skeleton/rcpp_hello_world.cpp	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/skeleton/rcpp_hello_world.cpp	(revision 2477)
@@ -0,0 +1,11 @@
+#include "rcpp_hello_world.h"
+
+SEXP rcpp_hello_world(){
+    using namespace Rcpp ;
+
+    CharacterVector x = CharacterVector::create( "foo", "bar" )  ;
+    NumericVector y   = NumericVector::create( 0.0, 1.0 ) ;
+    List z            = List::create( x, y ) ;
+
+    return z ;
+}
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/skeleton/Num.cpp
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/skeleton/Num.cpp	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/skeleton/Num.cpp	(revision 2477)
@@ -0,0 +1,51 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
+//
+// Num.cpp: Rcpp R/C++ interface class library -- Rcpp Module example
+//
+// Copyright (C) 2010 - 2012  Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of Rcpp.
+//
+// Rcpp is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// Rcpp is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
+
+#include <Rcpp.h>
+
+class Num {                     // simple class with two private variables
+public:                         // which have a getter/setter and getter
+    Num() : x(0.0), y(0){} ;
+
+    double getX() { return x ; }
+    void setX(double value){ x = value ; }
+
+    int getY() { return y ; }
+
+private:
+    double x ;
+    int y ;
+};
+
+RCPP_MODULE(NumEx){
+    using namespace Rcpp ;
+
+    class_<Num>( "Num" )
+
+    .default_constructor()
+
+    // read and write property
+    .property( "x", &Num::getX, &Num::setX )
+
+    // read-only property
+    .property( "y", &Num::getY )
+    ;
+}
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/skeleton/rcpp_hello_world.Rd
===================================================================
--- tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/skeleton/rcpp_hello_world.Rd	(revision 0)
+++ tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/skeleton/rcpp_hello_world.Rd	(revision 2477)
@@ -0,0 +1,17 @@
+\name{rcpp_hello_world}
+\alias{rcpp_hello_world}
+\docType{package}
+\title{
+Simple function using Rcpp
+}
+\description{
+Simple function using Rcpp
+}
+\usage{
+rcpp_hello_world()	
+}
+\examples{
+\dontrun{
+rcpp_hello_world()
+}
+}
Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/Meta/links.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/Meta/links.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/Meta/Rd.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/Meta/Rd.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/Meta/vignette.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/Meta/vignette.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/Meta/package.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/Meta/package.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/Meta/nsInfo.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/Meta/nsInfo.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/Meta/hsearch.rds
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.statsengine.r.core.macosx/res/macosx/library/Rcpp/Meta/hsearch.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

